README.md in moip2-0.1.1 vs README.md in moip2-0.1.3

- old
+ new

@@ -34,10 +34,33 @@ api = Moip2::Api.new(client) ``` ## Criando um Pedido +```ruby +order = api.order.create( + { + own_id: "ruby_sdk_1", + items: [ + { + product: "Nome do produto", + quantity: 1, + detail: "Mais info...", + price: 1000 + } + ], + customer: { + own_id: "ruby_sdk_customer_1", + fullname: "Jose da Silva", + email: "sandbox_v2_1401147277@email.com", + } + } +) +``` + +### Pedido com dados completos do Comprador + Agora basta criar o pedido: ```ruby order = api.order.create( { @@ -72,9 +95,33 @@ } ) ``` ## Criando um pagamento + +### Cartão de crédito com hash + +```ruby +api.payment.create(order.id, + { + installment_count: 1, + funding_instrument: { + method: "CREDIT_CARD", + credit_card: { + hash: "valor do cartã criptografado vindo do JS", + holder: { + fullname: "Jose Portador da Silva", + birthdate: "1988-10-10", + tax_document: { + type: "CPF", + number: "22222222222" + } + } + } + } + } +) +``` ### Cartão de crédito ```ruby api.payment.create(order.id,