Skip to content

Instantly share code, notes, and snippets.

View ricardokdz's full-sized avatar

Ricardo Pedrosa ricardokdz

View GitHub Profile
@ricardokdz
ricardokdz / gist:34505a57f88d3e5d4706a40e34e15a32
Last active November 7, 2018 14:44
multa fixa + juro fixo diário
{
"amount": "300",
"currency": "BRL",
"on_behalf_of": "{{SELLER_ID}}",
"customer": "{{BUYER_ID}}",
"payment_type": "boleto",
"payment_method": {
"expiration_date": "{{BOLETO_EXPIRATION_DATE}}",
"billing_instructions": {
"late_fee": {
swagger: '2.0'
host: api.zoop.ws
info:
title: Objetos Base
version: "1.1"
securityDefinitions:
basicAuth:
type: basic
security:
TransactionResponse:
type: object
properties:
id:
type: string
example: 0009462369b14ee596aabfd27faa97f7
status:
type: string
enum:
- new
import React, {Component} from 'react'
import {View, Text, Alert, Button as ReactButton} from 'react-native'
import {Container, Content, Form, Item, Input, Label, Button, Spinner} from 'native-base'
import {bindActionCreators} from 'redux'
import {connect} from 'react-redux'
import {loginByEmail, loginByFacebook} from '../actions/auth'
import {pushSubscribe} from '../actions/device'
// styles
import apiRegister from '../api/register'
import apiLogin from '../api/login'
import apiLoginFacebook from '../api/login-facebook'
import apiLogout from '../api/logout'
import apiGetUser from '../api/get-user'
import apiPasswordRecovery from '../api/password-recovery'
import apiUpdateUser from '../api/update-user'
import apiSaveAvatar from '../api/save-avatar'
import store from '../store'
import React, {Component} from 'react'
import {View, Text} from 'react-native'
import {Provider} from 'react-redux'
import store from './store'
import SplashScreen from 'react-native-splash-screen'
import push from './push'
import {NavigationActions} from 'react-navigation'
import {createRootNavigator} from './RouterNavigation'
import {AsyncStorage} from 'react-native'
import {compose, createStore, applyMiddleware} from 'redux'
import {reactReduxFirebase, firebaseStateReducer} from 'react-redux-firebase'
import {Provider} from 'react-redux'
import ReduxThunk from 'redux-thunk'
import promiseMiddleware from 'redux-promise'
import {createLogger} from 'redux-logger'
import {getStoredState, persistStore, autoRehydrate} from 'redux-persist'
import reducers from './reducers'
class Home extends Component {
render(){
const Buses = this.props.home.buses.map((b) => {
return (
<MapView.Marker
title={b.title}
description={b.route}
key={b.id}
coordinate={{
latitude: parseFloat(b.latitude),
class Register extends Component {
constructor(props){
super(props)
this.state = {}
}
handleSubmit(){
const {name, email} = this.state
this.props.register(name, email)
Card.create!([
{user_id: 1, card_brand: "mastercard", card_number: "1234-1234-1234-1234", card_expiration_date: "07/2018", card_cvv: "321"}
])
Bus.create!([
{company_id: 1, code: "D0001", plate: "KYH6182", carrying_capacity: 10, station_id: nil},
{company_id: 2, code: "P2017", plate: "KOA3006", carrying_capacity: 50, station_id: nil}
])
Company.create!([
{name: "Expresso Recreio"},
{name: "Ideal"}