moip2 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +47 -0
  4. data/Rakefile +4 -0
  5. data/lib/moip2/client.rb +1 -1
  6. data/lib/moip2/keys_api.rb +19 -0
  7. data/lib/moip2/resource/webhooks.rb +14 -0
  8. data/lib/moip2/version.rb +1 -1
  9. data/lib/moip2/webhooks_api.rb +17 -0
  10. data/lib/moip2.rb +5 -1
  11. data/spec/moip2/client_spec.rb +2 -2
  12. data/spec/moip2/customer_api_spec.rb +3 -3
  13. data/spec/moip2/keys_spec.rb +1 -1
  14. data/spec/moip2/order_api_spec.rb +1 -1
  15. data/spec/moip2/webhooks_spec.rb +23 -0
  16. data/spec/spec_helper.rb +1 -79
  17. data/vcr_cassettes/create_customer.yml +2 -2
  18. data/vcr_cassettes/create_customer_with_funding_instrument.yml +2 -2
  19. data/vcr_cassettes/create_full_order_refunded.yml +2 -2
  20. data/vcr_cassettes/create_invoice.yml +1 -1
  21. data/vcr_cassettes/create_multi_order_fail.yml +1 -1
  22. data/vcr_cassettes/create_multi_order_success.yml +1 -1
  23. data/vcr_cassettes/create_multi_payment_success.yml +3 -3
  24. data/vcr_cassettes/create_order_fail.yml +1 -1
  25. data/vcr_cassettes/create_order_success.yml +3 -3
  26. data/vcr_cassettes/create_partial_refunded_order.yml +2 -2
  27. data/vcr_cassettes/create_payment_success.yml +2 -2
  28. data/vcr_cassettes/create_payment_with_hash_success.yml +2 -2
  29. data/vcr_cassettes/get_customer.yml +2 -2
  30. data/vcr_cassettes/get_invoice.yml +1 -1
  31. data/vcr_cassettes/get_keys.yml +1 -1
  32. data/vcr_cassettes/get_webhooks.yml +62 -0
  33. data/vcr_cassettes/list_invoices.yml +1 -1
  34. data/vcr_cassettes/show_multi_order.yml +1 -1
  35. data/vcr_cassettes/show_multi_order_not_found.yml +1 -1
  36. data/vcr_cassettes/show_multi_payment.yml +3 -3
  37. data/vcr_cassettes/show_order.yml +3 -3
  38. data/vcr_cassettes/show_order_not_found.yml +1 -1
  39. data/vcr_cassettes/show_refund.yml +2 -2
  40. data/vcr_cassettes/update_invoice.yml +1 -1
  41. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b4acff1c3428103f4562ef3cab573ea3b2f8e62
4
- data.tar.gz: 856ce1149f6ba75bc2f700f0287602432ae323eb
3
+ metadata.gz: 8bc02ff5e9b9a1e432ac91664bd4a0f1fd3c8d42
4
+ data.tar.gz: 325b392f8db8d3cfcc9ecbec0ff6fdb039a4d60b
5
5
  SHA512:
6
- metadata.gz: d262920caba0a926656d82ca80c32192bb8c696ed95fdf4eb8a076b887acecba9e982bcbc6aa62d71df455b1d5e0290f076ea6cf07c067e9b6324d203cced636
7
- data.tar.gz: fc295e9abe35465820dbc5258ce32a708066ba89d3c7637cd26232cb1a264d47a043f3a3bfad63fae55d3cb51fa7464c684de927f2357b5e81f3e4a2bd899af0
6
+ metadata.gz: 751de0323f5e2f99c7c17f42b90a51ee17cb08db4b3b236f106e69a274e71c087d3dd8c35dc1881e34c2da6dbcba677974826f4d0b0182ba88b8e32688bb2325
7
+ data.tar.gz: f8bed9cce7ce40f86af1f83360e871b92170957f07165f203e4fa6e98dec26d332c40bc6a88296cf44e12fc33482f54d7e34d8b493619d70749cb04889ba4c97
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- moip2 (0.1.1)
4
+ moip2 (0.1.3)
5
5
  httparty
6
6
  recursive-open-struct
7
7
 
@@ -35,7 +35,7 @@ GEM
35
35
  guard-compat (~> 1.1)
36
36
  rspec (>= 2.99.0, < 4.0)
37
37
  hitimes (1.2.2)
38
- httparty (0.13.5)
38
+ httparty (0.13.7)
39
39
  json (~> 1.8)
40
40
  multi_xml (>= 0.5.2)
41
41
  json (1.8.3)
@@ -58,7 +58,7 @@ GEM
58
58
  rb-fsevent (0.9.5)
59
59
  rb-inotify (0.9.5)
60
60
  ffi (>= 0.5.0)
61
- recursive-open-struct (0.6.4)
61
+ recursive-open-struct (0.6.5)
62
62
  rspec (3.3.0)
63
63
  rspec-core (~> 3.3.0)
64
64
  rspec-expectations (~> 3.3.0)
data/README.md CHANGED
@@ -36,6 +36,29 @@ api = Moip2::Api.new(client)
36
36
 
37
37
  ## Criando um Pedido
38
38
 
39
+ ```ruby
40
+ order = api.order.create(
41
+ {
42
+ own_id: "ruby_sdk_1",
43
+ items: [
44
+ {
45
+ product: "Nome do produto",
46
+ quantity: 1,
47
+ detail: "Mais info...",
48
+ price: 1000
49
+ }
50
+ ],
51
+ customer: {
52
+ own_id: "ruby_sdk_customer_1",
53
+ fullname: "Jose da Silva",
54
+ email: "sandbox_v2_1401147277@email.com",
55
+ }
56
+ }
57
+ )
58
+ ```
59
+
60
+ ### Pedido com dados completos do Comprador
61
+
39
62
  Agora basta criar o pedido:
40
63
 
41
64
  ```ruby
@@ -75,6 +98,30 @@ order = api.order.create(
75
98
 
76
99
  ## Criando um pagamento
77
100
 
101
+ ### Cartão de crédito com hash
102
+
103
+ ```ruby
104
+ api.payment.create(order.id,
105
+ {
106
+ installment_count: 1,
107
+ funding_instrument: {
108
+ method: "CREDIT_CARD",
109
+ credit_card: {
110
+ hash: "valor do cartã criptografado vindo do JS",
111
+ holder: {
112
+ fullname: "Jose Portador da Silva",
113
+ birthdate: "1988-10-10",
114
+ tax_document: {
115
+ type: "CPF",
116
+ number: "22222222222"
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ )
123
+ ```
124
+
78
125
  ### Cartão de crédito
79
126
 
80
127
  ```ruby
data/Rakefile CHANGED
@@ -8,4 +8,8 @@ begin
8
8
  task :default => :spec
9
9
  rescue LoadError
10
10
  # no rspec available
11
+ <<<<<<< HEAD
11
12
  end
13
+ =======
14
+ end
15
+ >>>>>>> webhooks
data/lib/moip2/client.rb CHANGED
@@ -61,7 +61,7 @@ module Moip2
61
61
  if production?
62
62
  "https://api.moip.com.br"
63
63
  else
64
- "https://test.moip.com.br"
64
+ "https://sandbox.moip.com.br"
65
65
  end
66
66
 
67
67
  end
@@ -1,4 +1,5 @@
1
1
  module Moip2
2
+ <<<<<<< HEAD
2
3
  class KeysApi
3
4
  attr_reader :client
4
5
 
@@ -15,3 +16,21 @@ module Moip2
15
16
  end
16
17
  end
17
18
  end
19
+ =======
20
+ class KeysApi
21
+ attr_reader :client
22
+
23
+ def initialize(client)
24
+ @client = client
25
+ end
26
+
27
+ def base_path
28
+ "/v2/keys"
29
+ end
30
+
31
+ def show
32
+ Resource::Keys.new(client, client.get("#{base_path}"))
33
+ end
34
+ end
35
+ end
36
+ >>>>>>> webhooks
@@ -0,0 +1,14 @@
1
+ module Moip2
2
+ module Resource
3
+
4
+ class Webhooks < SimpleDelegator
5
+ attr_reader :client
6
+
7
+ def initialize(client, response)
8
+ super(response)
9
+ @client = client
10
+ end
11
+ end
12
+
13
+ end
14
+ end
data/lib/moip2/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Moip2
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -0,0 +1,17 @@
1
+ module Moip2
2
+ class WebhooksApi
3
+ attr_reader :client
4
+
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def base_path
10
+ "/v2/webhooks"
11
+ end
12
+
13
+ def show
14
+ Resource::Webhooks.new(client, client.get("#{base_path}"))
15
+ end
16
+ end
17
+ end
data/lib/moip2.rb CHANGED
@@ -14,7 +14,11 @@ require "moip2/resource/multi_payment"
14
14
  require "moip2/resource/customer"
15
15
  require "moip2/resource/invoice"
16
16
  require "moip2/resource/keys"
17
+ <<<<<<< HEAD
17
18
  require "moip2/resource/refund"
19
+ =======
20
+ require "moip2/resource/webhooks"
21
+ >>>>>>> webhooks
18
22
 
19
23
  require "moip2/response"
20
24
  require "moip2/client"
@@ -26,8 +30,8 @@ require "moip2/customer_api"
26
30
  require "moip2/invoice_api"
27
31
  require "moip2/refund_api"
28
32
  require "moip2/api"
29
-
30
33
  require "moip2/keys_api"
34
+ require "moip2/webhooks_api"
31
35
 
32
36
  require "moip2/exceptions/invalid_enviroment_error"
33
37
 
@@ -23,7 +23,7 @@ describe Moip2::Client do
23
23
  end
24
24
 
25
25
  let(:client) { described_class.new :sandbox, oauth }
26
- it { expect(client.uri).to eq "https://test.moip.com.br" }
26
+ it { expect(client.uri).to eq ENV['sandbox_url'] }
27
27
  it { expect(client.env).to eq :sandbox }
28
28
  it { expect(client.opts[:headers]["Authorization"]).to eq "OAuth d63tz2xwyu0ewrembove4j5cbv2otpd" }
29
29
 
@@ -115,7 +115,7 @@ describe Moip2::Client do
115
115
  described_class.new :sandbox, auth
116
116
  end
117
117
 
118
- it { expect(client.uri).to eq "https://test.moip.com.br" }
118
+ it { expect(client.uri).to eq ENV['sandbox_url'] }
119
119
  it { expect(client.env).to eq :sandbox }
120
120
  it { expect(client.opts[:headers]["Authorization"]).to eq "Basic VE9LRU46U0VDUkVU" }
121
121
  end
@@ -24,7 +24,7 @@ describe Moip2::CustomerApi do
24
24
  it { expect(customer.shipping_address).to_not be_nil }
25
25
  it { expect(customer.shipping_address.zip_code).to eq "01234000" }
26
26
  it { expect(customer._links).to_not be_nil }
27
- it { expect(customer._links.self.href).to eq "https://test.moip.com.br/v2/customers/CUS-B6LE6HLFFXKF" }
27
+ it { expect(customer._links.self.href).to eq "#{ENV['sandbox_url']}/v2/customers/CUS-B6LE6HLFFXKF" }
28
28
 
29
29
  end
30
30
 
@@ -96,7 +96,7 @@ describe Moip2::CustomerApi do
96
96
  it { expect(created_customer_with_funding_instrument.shipping_address).to_not be_nil }
97
97
  it { expect(created_customer_with_funding_instrument.shipping_address.zip_code).to eq "01234000" }
98
98
  it { expect(created_customer_with_funding_instrument._links).to_not be_nil }
99
- it { expect(created_customer_with_funding_instrument._links.self.href).to eq "https://test.moip.com.br/v2/customers/CUS-E5CO735TBXTI" }
99
+ it { expect(created_customer_with_funding_instrument._links.self.href).to eq "#{ENV['sandbox_url']}/v2/customers/CUS-E5CO735TBXTI" }
100
100
 
101
101
  end
102
102
 
@@ -145,7 +145,7 @@ describe Moip2::CustomerApi do
145
145
  it { expect(created_customer.shipping_address).to_not be_nil }
146
146
  it { expect(created_customer.shipping_address.zip_code).to eq "01234000" }
147
147
  it { expect(created_customer._links).to_not be_nil }
148
- it { expect(created_customer._links.self.href).to eq "https://test.moip.com.br/v2/customers/CUS-4GESZSOAH7HX" }
148
+ it { expect(created_customer._links.self.href).to eq "#{ENV['sandbox_url']}/v2/customers/CUS-4GESZSOAH7HX" }
149
149
 
150
150
  end
151
151
 
@@ -9,7 +9,7 @@ describe Moip2::KeysApi do
9
9
  end
10
10
  end
11
11
 
12
- context 'when shooting request' do
12
+ context 'when shooting request by keys' do
13
13
  it { expect(keys).not_to be_nil }
14
14
  it { expect(keys.keys.basic_auth.secret).to eq "ABABABABABABABABABABABABABABABABABABABAB" }
15
15
  it { expect(keys.keys.basic_auth.token).to eq "01010101010101010101010101010101"}
@@ -76,7 +76,7 @@ describe Moip2::OrderApi do
76
76
  expect(created_order.customer.shipping_address).to_not be_nil
77
77
 
78
78
  expect(created_order.customer._links).to_not be_nil
79
- expect(created_order.customer._links.self.href).to eq "https://test.moip.com.br/v2/customers/CUS-B6LE6HLFFXKF"
79
+ expect(created_order.customer._links.self.href).to eq "#{ENV['sandbox_url']}/v2/customers/CUS-B6LE6HLFFXKF"
80
80
  end
81
81
 
82
82
  it "returns an Order object" do
@@ -0,0 +1,23 @@
1
+ describe Moip2::WebhooksApi do
2
+ let(:webhooks_api) { described_class.new sandbox_oauth_client }
3
+
4
+ describe "#show" do
5
+
6
+ let(:get_webhooks) do
7
+ VCR.use_cassette("get_webhooks") do
8
+ webhooks_api.show
9
+ end
10
+ end
11
+
12
+ context 'when shooting request by webhooks' do
13
+ it { expect(get_webhooks.webhooks[0][:id]).not_to be_nil }
14
+ it { expect(get_webhooks.webhooks[0][:resource_id]).to eq "ORD-2M8Q09MMCCE2" }
15
+ it { expect(get_webhooks.webhooks[0][:event]).to eq "ORDER.PAID" }
16
+ it { expect(get_webhooks.webhooks[0][:url]) .to eq "http://www.100escolha.com/moip_suporte/" }
17
+ it { expect(get_webhooks.webhooks[0][:status]).to eq "CREATED" }
18
+ it { expect(get_webhooks.webhooks[0][:sent_at]).to eq "May 13, 2015 7:09:06 PM" }
19
+ end
20
+
21
+ end
22
+
23
+ end
data/spec/spec_helper.rb CHANGED
@@ -6,88 +6,10 @@ require "moip2"
6
6
  require "vcr"
7
7
  require "webmock"
8
8
 
9
- # This file was generated by the `rspec --init` command. Conventionally, all
10
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
11
- # The generated `.rspec` file contains `--require spec_helper` which will cause this
12
- # file to always be loaded, without a need to explicitly require it in any files.
13
- #
14
- # Given that it is always loaded, you are encouraged to keep this file as
15
- # light-weight as possible. Requiring heavyweight dependencies from this file
16
- # (such as loading up an entire rails app) will add to the boot time of your
17
- # test suite on EVERY test run, even for an individual file that may not need
18
- # all of that loaded.
19
- #
20
- # The `.rspec` file also contains a few flags that are not defaults but that
21
- # users commonly want.
22
- #
23
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
24
9
  RSpec.configure do |config|
25
- # The settings below are suggested to provide a good initial experience
26
- # with RSpec, but feel free to customize to your heart's content.
27
- =begin
28
- # These two settings work together to allow you to limit a spec run
29
- # to individual examples or groups you care about by tagging them with
30
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
31
- # get run.
32
- config.filter_run :focus
33
- config.run_all_when_everything_filtered = true
34
10
 
35
- # Many RSpec users commonly either run the entire suite or an individual
36
- # file, and it's useful to allow more verbose output when running an
37
- # individual spec file.
38
- if config.files_to_run.one?
39
- # RSpec filters the backtrace by default so as not to be so noisy.
40
- # This causes the full backtrace to be printed when running a single
41
- # spec file (e.g. to troubleshoot a particular spec failure).
42
- config.full_backtrace = true
43
-
44
- # Use the documentation formatter for detailed output,
45
- # unless a formatter has already been configured
46
- # (e.g. via a command-line flag).
47
- config.formatter = 'doc' if config.formatters.none?
48
- end
49
-
50
- # Print the 10 slowest examples and example groups at the
51
- # end of the spec run, to help surface which specs are running
52
- # particularly slow.
53
- config.profile_examples = 10
54
-
55
- # Run specs in random order to surface order dependencies. If you find an
56
- # order dependency and want to debug it, you can fix the order by providing
57
- # the seed, which is printed after each run.
58
- # --seed 1234
59
- config.order = :random
60
-
61
- # Seed global randomization in this process using the `--seed` CLI option.
62
- # Setting this allows you to use `--seed` to deterministically reproduce
63
- # test failures related to randomization by passing the same `--seed` value
64
- # as the one that triggered the failure.
65
- Kernel.srand config.seed
66
-
67
- # rspec-expectations config goes here. You can use an alternate
68
- # assertion/expectation library such as wrong or the stdlib/minitest
69
- # assertions if you prefer.
70
- config.expect_with :rspec do |expectations|
71
- # Enable only the newer, non-monkey-patching expect syntax.
72
- # For more details, see:
73
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
74
- expectations.syntax = :expect
75
- end
76
-
77
- # rspec-mocks config goes here. You can use an alternate test double
78
- # library (such as bogus or mocha) by changing the `mock_with` option here.
79
- config.mock_with :rspec do |mocks|
80
- # Enable only the newer, non-monkey-patching expect syntax.
81
- # For more details, see:
82
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
83
- mocks.syntax = :expect
84
-
85
- # Prevents you from mocking or stubbing a method that does not exist on
86
- # a real object. This is generally recommended.
87
- mocks.verify_partial_doubles = true
88
- end
89
- =end
90
11
  end
12
+ ENV['sandbox_url'] = 'https://sandbox.moip.com.br'
91
13
 
92
14
  VCR.configure do |c|
93
15
  c.cassette_library_dir = 'vcr_cassettes'
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/customers
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/customers
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"ownId":"meu_id_sandbox_1231234","fullname":"Jose Silva","email":"jose_silva0@email.com","birthDate":"1988-12-30","taxDocument":{"type":"CPF","number":"22222222222"},"phone":{"countryCode":"55","areaCode":"11","number":"66778899"},"shippingAddress":{"city":"Sao
@@ -37,7 +37,7 @@ http_interactions:
37
37
  encoding: UTF-8
38
38
  string: '{"id":"CUS-4GESZSOAH7HX","ownId":"meu_id_sandbox_1231234","fullname":"Jose
39
39
  Silva","createdAt":"2015-03-02T10:59:31-0300","birthDate":"1988-12-30T00:00:00-0200","email":"jose_silva0@email.com","phone":{"countryCode":"55","areaCode":"11","number":"66778899"},"taxDocument":{"type":"CPF","number":"22222222222"},"shippingAddress":{"zipCode":"01234000","street":"Avenida
40
- Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://test.moip.com.br/v2/customers/CUS-4GESZSOAH7HX"}}}'
40
+ Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/customers/CUS-4GESZSOAH7HX"}}}'
41
41
  http_version:
42
42
  recorded_at: Mon, 02 Mar 2015 13:59:16 GMT
43
43
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/customers
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/customers
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"ownId":"meu_id_de_cliente","fullname":"Jose Silva","email":"josedasilva@email.com","phone":{"areaCode":"11","number":"66778899"},"birthDate":"1988-12-30","taxDocument":{"type":"CPF","number":"22222222222"},"shippingAddress":{"street":"Avenida
@@ -39,7 +39,7 @@ http_interactions:
39
39
  encoding: UTF-8
40
40
  string: '{"id":"CUS-E5CO735TBXTI","ownId":"meu_id_de_cliente","fullname":"Jose
41
41
  Silva","createdAt":"2015-03-02T11:05:28-0300","birthDate":"1988-12-30T00:00:00-0200","email":"josedasilva@email.com","fundingInstrument":{"creditCard":{"id":"CRC-F5DR8SVINCUI","brand":"VISA","first6":"407302","last4":"0002"},"method":"CREDIT_CARD"},"phone":{"countryCode":"55","areaCode":"11","number":"66778899"},"taxDocument":{"type":"CPF","number":"22222222222"},"shippingAddress":{"zipCode":"01234000","street":"Avenida
42
- Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://test.moip.com.br/v2/customers/CUS-E5CO735TBXTI"}}}'
42
+ Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/customers/CUS-E5CO735TBXTI"}}}'
43
43
  http_version:
44
44
  recorded_at: Mon, 02 Mar 2015 14:05:15 GMT
45
45
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders/ORD-7JOU41NX4M1S/refunds
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/orders/ORD-7JOU41NX4M1S/refunds
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: "{}"
@@ -32,7 +32,7 @@ http_interactions:
32
32
  - nosniff
33
33
  body:
34
34
  encoding: UTF-8
35
- string: '{"id":"REF-766MUWOO8CSS","status":"COMPLETED","events":[{"createdAt":"2015-02-27T15:25:33-0300","type":"REFUND.COMPLETED"},{"createdAt":"2015-02-27T15:25:31-0300","type":"REFUND.REQUESTED"}],"amount":{"fees":0,"currency":"BRL","total":100},"type":"FULL","refundingInstrument":{"creditCard":{"brand":"VISA","first6":"401200","last4":"3335"},"method":"CREDIT_CARD"},"createdAt":"2015-02-27T15:25:31-0300","_links":{"payment":{"title":"PAY-EJWQRB89JGQ2","href":"https://test.moip.com.br/v2/payments/PAY-EJWQRB89JGQ2"},"order":{"title":"ORD-7JOU41NX4M1S","href":"https://test.moip.com.br/v2/orders/ORD-7JOU41NX4M1S"},"self":{"href":"https://test.moip.com.br/v2/refunds/REF-766MUWOO8CSS"}}}'
35
+ string: '{"id":"REF-766MUWOO8CSS","status":"COMPLETED","events":[{"createdAt":"2015-02-27T15:25:33-0300","type":"REFUND.COMPLETED"},{"createdAt":"2015-02-27T15:25:31-0300","type":"REFUND.REQUESTED"}],"amount":{"fees":0,"currency":"BRL","total":100},"type":"FULL","refundingInstrument":{"creditCard":{"brand":"VISA","first6":"401200","last4":"3335"},"method":"CREDIT_CARD"},"createdAt":"2015-02-27T15:25:31-0300","_links":{"payment":{"title":"PAY-EJWQRB89JGQ2","href":"https://sandbox.moip.com.br/v2/payments/PAY-EJWQRB89JGQ2"},"order":{"title":"ORD-7JOU41NX4M1S","href":"https://sandbox.moip.com.br/v2/orders/ORD-7JOU41NX4M1S"},"self":{"href":"https://sandbox.moip.com.br/v2/refunds/REF-766MUWOO8CSS"}}}'
36
36
  http_version:
37
37
  recorded_at: Fri, 27 Feb 2015 18:25:32 GMT
38
38
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://test.moip.com.br/v2/invoices
5
+ uri: https://sandbox.moip.com.br/v2/invoices
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"amount":13470,"email":"caio.gama@moip.com.br","invoiceType":"subscription","description":"Assinatura
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/multiorders
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/multiorders
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: "{}"
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/multiorders
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/multiorders
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"ownId":"meu_multiorder_id","orders":[{"ownId":"pedido_1_id","amount":{"currency":"BRL","subtotals":{"shipping":2000}},"items":[{"product":"Camisa
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/multiorders/MOR-IVKZDU55LXJU/multipayments
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/multiorders/MOR-IVKZDU55LXJU/multipayments
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"installmentCount":1,"fundingInstrument":{"method":"CREDIT_CARD","creditCard":{"expirationMonth":5,"expirationYear":18,"number":"4012001038443335","cvc":"123","holder":{"fullname":"Jose
@@ -36,8 +36,8 @@ http_interactions:
36
36
  body:
37
37
  encoding: UTF-8
38
38
  string: '{"id":"MPY-DSA3I67FOKES","status":"WAITING","amount":{"currency":"BRL","total":8000},"installmentCount":1,"payments":[{"id":"PAY-T3YDOW7IPAML","status":"WAITING","amount":{"fees":335,"refunds":0,"liquid":3665,"currency":"BRL","total":4000},"installmentCount":1,"fundingInstrument":{"creditCard":{"id":"CRC-AQY93MP1MBPX","brand":"VISA","first6":"401200","last4":"3335","holder":{"birthdate":"30/12/1988","taxDocument":{"type":"CPF","number":"33333333333"},"fullname":"Jose
39
- Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":335}],"events":[{"createdAt":"2015-02-27T18:16:02-0300","type":"PAYMENT.WAITING"},{"createdAt":"2015-02-27T18:16:00-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-TLEDJRICCU8E","href":"https://test.moip.com.br/v2/orders/ORD-TLEDJRICCU8E"},"self":{"href":"https://test.moip.com.br/v2/payments/PAY-T3YDOW7IPAML"}},"createdAt":"2015-02-27T18:16:00-0300","updatedAt":"2015-02-27T18:16:02-0300"},{"id":"PAY-TDN29LCT376R","status":"WAITING","amount":{"fees":335,"refunds":0,"liquid":3665,"currency":"BRL","total":4000},"installmentCount":1,"fundingInstrument":{"creditCard":{"id":"CRC-J2IQXSTS2Z9O","brand":"VISA","first6":"401200","last4":"3335","holder":{"birthdate":"30/12/1988","taxDocument":{"type":"CPF","number":"33333333333"},"fullname":"Jose
40
- Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":335}],"events":[{"createdAt":"2015-02-27T18:16:02-0300","type":"PAYMENT.WAITING"},{"createdAt":"2015-02-27T18:16:01-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-25B02M8CTKOF","href":"https://test.moip.com.br/v2/orders/ORD-25B02M8CTKOF"},"self":{"href":"https://test.moip.com.br/v2/payments/PAY-TDN29LCT376R"}},"createdAt":"2015-02-27T18:16:01-0300","updatedAt":"2015-02-27T18:16:02-0300"}],"_links":{"multiorder":{"href":"https://test.moip.com.br/v2/multiorders/MOR-IVKZDU55LXJU"},"self":{"href":"https://test.moip.com.br/v2/multipayments/MPY-DSA3I67FOKES"}}}'
39
+ Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":335}],"events":[{"createdAt":"2015-02-27T18:16:02-0300","type":"PAYMENT.WAITING"},{"createdAt":"2015-02-27T18:16:00-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-TLEDJRICCU8E","href":"https://sandbox.moip.com.br/v2/orders/ORD-TLEDJRICCU8E"},"self":{"href":"https://sandbox.moip.com.br/v2/payments/PAY-T3YDOW7IPAML"}},"createdAt":"2015-02-27T18:16:00-0300","updatedAt":"2015-02-27T18:16:02-0300"},{"id":"PAY-TDN29LCT376R","status":"WAITING","amount":{"fees":335,"refunds":0,"liquid":3665,"currency":"BRL","total":4000},"installmentCount":1,"fundingInstrument":{"creditCard":{"id":"CRC-J2IQXSTS2Z9O","brand":"VISA","first6":"401200","last4":"3335","holder":{"birthdate":"30/12/1988","taxDocument":{"type":"CPF","number":"33333333333"},"fullname":"Jose
40
+ Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":335}],"events":[{"createdAt":"2015-02-27T18:16:02-0300","type":"PAYMENT.WAITING"},{"createdAt":"2015-02-27T18:16:01-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-25B02M8CTKOF","href":"https://sandbox.moip.com.br/v2/orders/ORD-25B02M8CTKOF"},"self":{"href":"https://sandbox.moip.com.br/v2/payments/PAY-TDN29LCT376R"}},"createdAt":"2015-02-27T18:16:01-0300","updatedAt":"2015-02-27T18:16:02-0300"}],"_links":{"multiorder":{"href":"https://sandbox.moip.com.br/v2/multiorders/MOR-IVKZDU55LXJU"},"self":{"href":"https://sandbox.moip.com.br/v2/multipayments/MPY-DSA3I67FOKES"}}}'
41
41
  http_version:
42
42
  recorded_at: Fri, 27 Feb 2015 21:16:01 GMT
43
43
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/orders
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: "{}"
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/orders
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"ownId":"your_own_id_1","amount":{"currency":"BRL"},"items":[{"product":"Some
@@ -39,9 +39,9 @@ http_interactions:
39
39
  string: '{"id":"ORD-7JOU41NX4M1S","ownId":"your_own_id_1","status":"CREATED","createdAt":"2015-02-27T10:23:13-0300","amount":{"total":100,"fees":0,"refunds":0,"liquid":0,"otherReceivers":0,"currency":"BRL","subtotals":{"shipping":0,"addition":0,"discount":0,"items":100}},"items":[{"product":"Some
40
40
  Product","price":100,"detail":"Some Product Detail","quantity":1}],"customer":{"id":"CUS-B6LE6HLFFXKF","ownId":"your_customer_own_id","fullname":"John
41
41
  Doe","createdAt":"2015-02-27T10:23:13-0300","email":"john.doe@mailinator.com","phone":{"countryCode":"55","areaCode":"55","number":"66778899"},"taxDocument":{"type":"CPF","number":"22222222222"},"shippingAddress":{"zipCode":"01234000","street":"Avenida
42
- Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://test.moip.com.br/v2/customers/CUS-B6LE6HLFFXKF"}}},"payments":[],"refunds":[],"entries":[],"events":[{"createdAt":"2015-02-27T10:23:13-0300","description":"","type":"ORDER.CREATED"}],"receivers":[{"amount":{"fees":0,"refunds":0,"total":100},"moipAccount":{"fullname":"Moip
42
+ Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/customers/CUS-B6LE6HLFFXKF"}}},"payments":[],"refunds":[],"entries":[],"events":[{"createdAt":"2015-02-27T10:23:13-0300","description":"","type":"ORDER.CREATED"}],"receivers":[{"amount":{"fees":0,"refunds":0,"total":100},"moipAccount":{"fullname":"Moip
43
43
  SandBox","login":"integracao@labs.moip.com.br","id":"MPA-CULBBYHD11"},"type":"PRIMARY"}],"shippingAddress":{"zipCode":"01234000","street":"Avenida
44
- Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://test.moip.com.br/v2/orders/ORD-7JOU41NX4M1S"},"checkout":{"payOnlineBankDebitItau":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/itau/ORD-7JOU41NX4M1S"},"payOnlineBankDebitBB":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/bancobrasil/ORD-7JOU41NX4M1S"},"payCreditCard":{"redirectHref":"https://checkout-sandbox.moip.com.br/creditcard/ORD-7JOU41NX4M1S"},"payOnlineBankDebitBradesco":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/bradesco/ORD-7JOU41NX4M1S"},"payBoleto":{"redirectHref":"https://checkout-sandbox.moip.com.br/boleto/ORD-7JOU41NX4M1S"},"payOnlineBankDebitBanrisul":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/banrisul/ORD-7JOU41NX4M1S"}}}}'
44
+ Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/orders/ORD-7JOU41NX4M1S"},"checkout":{"payOnlineBankDebitItau":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/itau/ORD-7JOU41NX4M1S"},"payOnlineBankDebitBB":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/bancobrasil/ORD-7JOU41NX4M1S"},"payCreditCard":{"redirectHref":"https://checkout-sandbox.moip.com.br/creditcard/ORD-7JOU41NX4M1S"},"payOnlineBankDebitBradesco":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/bradesco/ORD-7JOU41NX4M1S"},"payBoleto":{"redirectHref":"https://checkout-sandbox.moip.com.br/boleto/ORD-7JOU41NX4M1S"},"payOnlineBankDebitBanrisul":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/banrisul/ORD-7JOU41NX4M1S"}}}}'
45
45
  http_version:
46
46
  recorded_at: Fri, 27 Feb 2015 13:23:12 GMT
47
47
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders/ORD-6K8XPJD9O2KH/refunds
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/orders/ORD-6K8XPJD9O2KH/refunds
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"amount":100}'
@@ -32,7 +32,7 @@ http_interactions:
32
32
  - nosniff
33
33
  body:
34
34
  encoding: UTF-8
35
- string: '{"id":"REF-QW4T48M7NDFH","status":"COMPLETED","events":[{"createdAt":"2015-02-27T17:56:22-0300","type":"REFUND.COMPLETED"},{"createdAt":"2015-02-27T17:56:21-0300","type":"REFUND.REQUESTED"}],"amount":{"fees":0,"currency":"BRL","total":100},"type":"PARTIAL","refundingInstrument":{"creditCard":{"brand":"VISA","first6":"401200","last4":"3335"},"method":"CREDIT_CARD"},"createdAt":"2015-02-27T17:56:21-0300","_links":{"payment":{"title":"PAY-5VWJOESX1BWB","href":"https://test.moip.com.br/v2/payments/PAY-5VWJOESX1BWB"},"order":{"title":"ORD-6K8XPJD9O2KH","href":"https://test.moip.com.br/v2/orders/ORD-6K8XPJD9O2KH"},"self":{"href":"https://test.moip.com.br/v2/refunds/REF-QW4T48M7NDFH"}}}'
35
+ string: '{"id":"REF-QW4T48M7NDFH","status":"COMPLETED","events":[{"createdAt":"2015-02-27T17:56:22-0300","type":"REFUND.COMPLETED"},{"createdAt":"2015-02-27T17:56:21-0300","type":"REFUND.REQUESTED"}],"amount":{"fees":0,"currency":"BRL","total":100},"type":"PARTIAL","refundingInstrument":{"creditCard":{"brand":"VISA","first6":"401200","last4":"3335"},"method":"CREDIT_CARD"},"createdAt":"2015-02-27T17:56:21-0300","_links":{"payment":{"title":"PAY-5VWJOESX1BWB","href":"https://sandbox.moip.com.br/v2/payments/PAY-5VWJOESX1BWB"},"order":{"title":"ORD-6K8XPJD9O2KH","href":"https://sandbox.moip.com.br/v2/orders/ORD-6K8XPJD9O2KH"},"self":{"href":"https://sandbox.moip.com.br/v2/refunds/REF-QW4T48M7NDFH"}}}'
36
36
  http_version:
37
37
  recorded_at: Fri, 27 Feb 2015 20:56:21 GMT
38
38
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders/ORD-UEK2XGEXNWL9/payments
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/orders/ORD-UEK2XGEXNWL9/payments
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"installmentCount":1,"fundingInstrument":{"method":"CREDIT_CARD","creditCard":{"expirationMonth":5,"expirationYear":18,"number":"4012001038443335","cvc":"123","holder":{"fullname":"Jose
@@ -33,7 +33,7 @@ http_interactions:
33
33
  - nosniff
34
34
  body:
35
35
  encoding: UTF-8
36
- string: '{"id":"PAY-W3MNW718O3AI","status":"IN_ANALYSIS","amount":{"refunds":0,"fees":46,"liquid":54,"currency":"BRL","total":100},"installmentCount":1,"fundingInstrument":{"creditCard":{"first6":"401200","last4":"3335","brand":"VISA","id":"CRC-9M8TE96A8K71"},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":46}],"events":[{"createdAt":"2014-06-09T21:36:41-0300","type":"PAYMENT.IN_ANALYSIS"},{"createdAt":"2014-06-09T21:36:39-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-UEK2XGEXNWL9","href":"https://test.moip.com.br/v2/orders/ORD-UEK2XGEXNWL9"},"self":{"href":"https://test.moip.com.br/v2/payments/PAY-W3MNW718O3AI"}},"updatedAt":"2014-06-09T21:36:41-0300","createdAt":"2014-06-09T21:36:39-0300"}'
36
+ string: '{"id":"PAY-W3MNW718O3AI","status":"IN_ANALYSIS","amount":{"refunds":0,"fees":46,"liquid":54,"currency":"BRL","total":100},"installmentCount":1,"fundingInstrument":{"creditCard":{"first6":"401200","last4":"3335","brand":"VISA","id":"CRC-9M8TE96A8K71"},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":46}],"events":[{"createdAt":"2014-06-09T21:36:41-0300","type":"PAYMENT.IN_ANALYSIS"},{"createdAt":"2014-06-09T21:36:39-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-UEK2XGEXNWL9","href":"https://sandbox.moip.com.br/v2/orders/ORD-UEK2XGEXNWL9"},"self":{"href":"https://sandbox.moip.com.br/v2/payments/PAY-W3MNW718O3AI"}},"updatedAt":"2014-06-09T21:36:41-0300","createdAt":"2014-06-09T21:36:39-0300"}'
37
37
  http_version:
38
38
  recorded_at: Tue, 10 Jun 2014 00:36:42 GMT
39
39
  recorded_with: VCR 2.8.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders/ORD-DDT31SU6LXZO/payments
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/orders/ORD-DDT31SU6LXZO/payments
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"installmentCount":1,"fundingInstrument":{"method":"CREDIT_CARD","creditCard":{"hash":"Pf/FTHX09EwW+9mAd2+jhqhVWE8LtdYp+rfoqrSXelFqgkRRdpvcQTKKGA3TVbuInIrH03Cq0Fq1XVwBDgF9EDtFO+L3kacfAl4hfKr55wkvi7yAAZ9MnhqXCzxm+0aOdoc/0UqnsHlxCzpwaGqBZZkQ6Mt+V1e26fxne4OJw2XJeLMOHpPnMM23Uk8BhSsCUVffmiIuE+Ep9VD9b3HkJPqGRPFiKnYT29J6PH2mKYT61u8KM6ZKQu7FmKTtYs25tHtQ2mN7WhfLbAqLARnfBrCKg1a3W+kcWSf4Wjc0z7LWHzFCvT9vxnq8W/fDBAbue102mouV37dlKR8yN7UgZA==","holder":{"fullname":"Jose
@@ -34,7 +34,7 @@ http_interactions:
34
34
  body:
35
35
  encoding: UTF-8
36
36
  string: '{"id":"PAY-CRUP19YU2VE1","status":"IN_ANALYSIS","amount":{"fees":76,"refunds":0,"liquid":424,"currency":"BRL","total":500},"installmentCount":1,"fundingInstrument":{"creditCard":{"id":"CRC-W6DHWUOQLLF1","brand":"MASTERCARD","first6":"555566","last4":"8884","holder":{"birthdate":"30/12/1988","taxDocument":{"type":"CPF","number":"33333333333"},"fullname":"Jose
37
- Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":76}],"events":[{"createdAt":"2015-06-14T21:13:50-0300","type":"PAYMENT.IN_ANALYSIS"},{"createdAt":"2015-06-14T21:13:45-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-DDT31SU6LXZO","href":"https://test.moip.com.br/v2/orders/ORD-DDT31SU6LXZO"},"self":{"href":"https://test.moip.com.br/v2/payments/PAY-CRUP19YU2VE1"}},"updatedAt":"2015-06-14T21:13:50-0300","createdAt":"2015-06-14T21:13:45-0300"}'
37
+ Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":76}],"events":[{"createdAt":"2015-06-14T21:13:50-0300","type":"PAYMENT.IN_ANALYSIS"},{"createdAt":"2015-06-14T21:13:45-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-DDT31SU6LXZO","href":"https://sandbox.moip.com.br/v2/orders/ORD-DDT31SU6LXZO"},"self":{"href":"https://sandbox.moip.com.br/v2/payments/PAY-CRUP19YU2VE1"}},"updatedAt":"2015-06-14T21:13:50-0300","createdAt":"2015-06-14T21:13:45-0300"}'
38
38
  http_version:
39
39
  recorded_at: Mon, 15 Jun 2015 00:13:51 GMT
40
40
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/customers/CUS-B6LE6HLFFXKF
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/customers/CUS-B6LE6HLFFXKF
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -36,7 +36,7 @@ http_interactions:
36
36
  encoding: UTF-8
37
37
  string: '{"id":"CUS-B6LE6HLFFXKF","ownId":"your_customer_own_id","fullname":"John
38
38
  Doe","createdAt":"2015-02-27T10:23:13-0300","email":"john.doe@mailinator.com","fundingInstrument":{"creditCard":{"id":"CRC-OQPJYLGZOY7P","brand":"VISA","first6":"401200","last4":"3335"},"method":"CREDIT_CARD"},"phone":{"countryCode":"55","areaCode":"55","number":"66778899"},"taxDocument":{"type":"CPF","number":"22222222222"},"shippingAddress":{"zipCode":"01234000","street":"Avenida
39
- Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://test.moip.com.br/v2/customers/CUS-B6LE6HLFFXKF"}}}'
39
+ Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/customers/CUS-B6LE6HLFFXKF"}}}'
40
40
  http_version:
41
41
  recorded_at: Mon, 02 Mar 2015 13:26:45 GMT
42
42
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://test.moip.com.br/v2/invoices/INV-4517A209DDA9
5
+ uri: https://sandbox.moip.com.br/v2/invoices/INV-4517A209DDA9
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://test.moip.com.br/v2/keys
5
+ uri: https://sandbox.moip.com.br/v2/keys
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://sandbox.moip.com.br/v2/webhooks
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Authorization:
13
+ - OAuth d63tz2xwyu0ewrembove4j5cbv2otpd
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Server:
20
+ - nginx
21
+ Date:
22
+ - Thu, 14 May 2015 13:53:22 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Content-Length:
26
+ - '3734'
27
+ Connection:
28
+ - keep-alive
29
+ Status:
30
+ - 200 OK
31
+ X-Newrelic-App-Data:
32
+ - PxQFUlBXAQoTV1VbAwcGVEYdFGQHBDcQUQxLA1tMXV1dORYzVBJHNQFUZAQUFVFQVThOFAVtGBEBU15cDQ0QQhglfTYRGhgCHVUVUR9TAVBQDwdXV08IHxJQBFIFUAcFUgIFAloAWlUIQGU=
33
+ Vary:
34
+ - Accept-Encoding
35
+ X-Content-Type-Options:
36
+ - nosniff
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"webhooks":[{"id":"EVE-DYPUJBZLJAPP","resourceId":"ORD-2M8Q09MMCCE2","event":"ORDER.PAID","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
40
+ 13, 2015 7:09:06 PM"},{"id":"EVE-OLM7SXFQPFMH","resourceId":"PAY-XWNRC9MZTCO8","event":"PAYMENT.AUTHORIZED","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
41
+ 13, 2015 7:09:06 PM"},{"id":"EVE-UZ6T5LIUYOSK","resourceId":"PAY-BKMBBD0BDEZP","event":"PAYMENT.IN_ANALYSIS","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
42
+ 13, 2015 7:09:02 PM"},{"id":"EVE-DBE86H574UEN","resourceId":"PAY-XWNRC9MZTCO8","event":"PAYMENT.IN_ANALYSIS","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
43
+ 13, 2015 7:09:01 PM"},{"id":"EVE-C3PSMS9LZTSD","resourceId":"PAY-XWNRC9MZTCO8","event":"PAYMENT.WAITING","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
44
+ 13, 2015 7:08:58 PM"},{"id":"EVE-KKBSIL2U3DZ2","resourceId":"PAY-BKMBBD0BDEZP","event":"PAYMENT.WAITING","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
45
+ 13, 2015 7:08:58 PM"},{"id":"EVE-OOGZLD67C4GR","resourceId":"ORD-XLPPHQNZ5ZGH","event":"ORDER.CREATED","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
46
+ 13, 2015 7:08:51 PM"},{"id":"EVE-MAZ7BV8JR8TP","resourceId":"ORD-2M8Q09MMCCE2","event":"ORDER.CREATED","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
47
+ 13, 2015 7:08:50 PM"},{"id":"EVE-CM30SKZSXQK3","resourceId":"ORD-PCF4FW4B3PE9","event":"ORDER.PAID","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
48
+ 12, 2015 7:09:01 PM"},{"id":"EVE-5C791OGOLBHF","resourceId":"ORD-65HG3W408X5K","event":"ORDER.PAID","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
49
+ 12, 2015 7:09:01 PM"},{"id":"EVE-NBIW53UT95VL","resourceId":"PAY-M1A3GR2L5GF6","event":"PAYMENT.AUTHORIZED","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
50
+ 12, 2015 7:09:00 PM"},{"id":"EVE-PSRTDV9H62R4","resourceId":"PAY-RUSSO3TPNZ58","event":"PAYMENT.AUTHORIZED","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
51
+ 12, 2015 7:09:00 PM"},{"id":"EVE-CKNTF1IL5ARA","resourceId":"PAY-M1A3GR2L5GF6","event":"PAYMENT.IN_ANALYSIS","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
52
+ 12, 2015 7:08:57 PM"},{"id":"EVE-UG6P1YFTGL2F","resourceId":"PAY-RUSSO3TPNZ58","event":"PAYMENT.IN_ANALYSIS","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
53
+ 12, 2015 7:08:56 PM"},{"id":"EVE-6CVUB9TQLKKO","resourceId":"PAY-M1A3GR2L5GF6","event":"PAYMENT.WAITING","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
54
+ 12, 2015 7:08:55 PM"},{"id":"EVE-AR52H0D3OIM3","resourceId":"PAY-RUSSO3TPNZ58","event":"PAYMENT.WAITING","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
55
+ 12, 2015 7:08:54 PM"},{"id":"EVE-3JOZY9CJEALJ","resourceId":"ORD-65HG3W408X5K","event":"ORDER.CREATED","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
56
+ 12, 2015 7:08:49 PM"},{"id":"EVE-PJ2IJXF1A5UL","resourceId":"ORD-PCF4FW4B3PE9","event":"ORDER.CREATED","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
57
+ 12, 2015 7:08:48 PM"},{"id":"EVE-ZAR096ZLQ051","resourceId":"ORD-DKG99MYRX4Q1","event":"ORDER.PAID","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
58
+ 11, 2015 7:09:02 PM"},{"id":"EVE-3ES924OCIWMO","resourceId":"PAY-Z8WI7ZQQNE20","event":"PAYMENT.AUTHORIZED","url":"http://www.100escolha.com/moip_suporte/","status":"CREATED","sentAt":"May
59
+ 11, 2015 7:09:02 PM"}]}'
60
+ http_version:
61
+ recorded_at: Thu, 14 May 2015 13:53:19 GMT
62
+ recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://test.moip.com.br/v2/invoices?begin=2015-01-01&end=2015-03-31
5
+ uri: https://sandbox.moip.com.br/v2/invoices?begin=2015-01-01&end=2015-03-31
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/multiorders/MOR-IVKZDU55LXJU
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/multiorders/MOR-IVKZDU55LXJU
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/multiorders/MOR-INVALID
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/multiorders/MOR-INVALID
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/multipayments/MPY-DSA3I67FOKES
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/multipayments/MPY-DSA3I67FOKES
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -35,8 +35,8 @@ http_interactions:
35
35
  body:
36
36
  encoding: UTF-8
37
37
  string: '{"id":"MPY-DSA3I67FOKES","status":"AUTHORIZED","amount":{"currency":"BRL","total":8000},"installmentCount":1,"payments":[{"id":"PAY-T3YDOW7IPAML","status":"AUTHORIZED","amount":{"fees":335,"refunds":0,"liquid":3665,"currency":"BRL","total":4000},"installmentCount":1,"fundingInstrument":{"creditCard":{"id":"CRC-AQY93MP1MBPX","brand":"VISA","first6":"401200","last4":"3335","holder":{"birthdate":"30/12/1988","taxDocument":{"type":"CPF","number":"33333333333"},"fullname":"Jose
38
- Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":335}],"events":[{"createdAt":"2015-02-27T18:16:08-0300","type":"PAYMENT.AUTHORIZED"},{"createdAt":"2015-02-27T18:16:05-0300","type":"PAYMENT.IN_ANALYSIS"},{"createdAt":"2015-02-27T18:16:02-0300","type":"PAYMENT.WAITING"},{"createdAt":"2015-02-27T18:16:00-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-TLEDJRICCU8E","href":"https://test.moip.com.br/v2/orders/ORD-TLEDJRICCU8E"},"self":{"href":"https://test.moip.com.br/v2/payments/PAY-T3YDOW7IPAML"}},"createdAt":"2015-02-27T18:16:00-0300","updatedAt":"2015-02-27T18:16:08-0300"},{"id":"PAY-TDN29LCT376R","status":"AUTHORIZED","amount":{"fees":335,"refunds":0,"liquid":3665,"currency":"BRL","total":4000},"installmentCount":1,"fundingInstrument":{"creditCard":{"id":"CRC-J2IQXSTS2Z9O","brand":"VISA","first6":"401200","last4":"3335","holder":{"birthdate":"30/12/1988","taxDocument":{"type":"CPF","number":"33333333333"},"fullname":"Jose
39
- Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":335}],"events":[{"createdAt":"2015-02-27T18:16:08-0300","type":"PAYMENT.AUTHORIZED"},{"createdAt":"2015-02-27T18:16:05-0300","type":"PAYMENT.IN_ANALYSIS"},{"createdAt":"2015-02-27T18:16:02-0300","type":"PAYMENT.WAITING"},{"createdAt":"2015-02-27T18:16:01-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-25B02M8CTKOF","href":"https://test.moip.com.br/v2/orders/ORD-25B02M8CTKOF"},"self":{"href":"https://test.moip.com.br/v2/payments/PAY-TDN29LCT376R"}},"createdAt":"2015-02-27T18:16:01-0300","updatedAt":"2015-02-27T18:16:08-0300"}],"_links":{"multiorder":{"href":"https://test.moip.com.br/v2/multiorders/MOR-IVKZDU55LXJU"},"self":{"href":"https://test.moip.com.br/v2/multipayments/MPY-DSA3I67FOKES"}}}'
38
+ Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":335}],"events":[{"createdAt":"2015-02-27T18:16:08-0300","type":"PAYMENT.AUTHORIZED"},{"createdAt":"2015-02-27T18:16:05-0300","type":"PAYMENT.IN_ANALYSIS"},{"createdAt":"2015-02-27T18:16:02-0300","type":"PAYMENT.WAITING"},{"createdAt":"2015-02-27T18:16:00-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-TLEDJRICCU8E","href":"https://sandbox.moip.com.br/v2/orders/ORD-TLEDJRICCU8E"},"self":{"href":"https://sandbox.moip.com.br/v2/payments/PAY-T3YDOW7IPAML"}},"createdAt":"2015-02-27T18:16:00-0300","updatedAt":"2015-02-27T18:16:08-0300"},{"id":"PAY-TDN29LCT376R","status":"AUTHORIZED","amount":{"fees":335,"refunds":0,"liquid":3665,"currency":"BRL","total":4000},"installmentCount":1,"fundingInstrument":{"creditCard":{"id":"CRC-J2IQXSTS2Z9O","brand":"VISA","first6":"401200","last4":"3335","holder":{"birthdate":"30/12/1988","taxDocument":{"type":"CPF","number":"33333333333"},"fullname":"Jose
39
+ Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":335}],"events":[{"createdAt":"2015-02-27T18:16:08-0300","type":"PAYMENT.AUTHORIZED"},{"createdAt":"2015-02-27T18:16:05-0300","type":"PAYMENT.IN_ANALYSIS"},{"createdAt":"2015-02-27T18:16:02-0300","type":"PAYMENT.WAITING"},{"createdAt":"2015-02-27T18:16:01-0300","type":"PAYMENT.CREATED"}],"_links":{"order":{"title":"ORD-25B02M8CTKOF","href":"https://sandbox.moip.com.br/v2/orders/ORD-25B02M8CTKOF"},"self":{"href":"https://sandbox.moip.com.br/v2/payments/PAY-TDN29LCT376R"}},"createdAt":"2015-02-27T18:16:01-0300","updatedAt":"2015-02-27T18:16:08-0300"}],"_links":{"multiorder":{"href":"https://sandbox.moip.com.br/v2/multiorders/MOR-IVKZDU55LXJU"},"self":{"href":"https://sandbox.moip.com.br/v2/multipayments/MPY-DSA3I67FOKES"}}}'
40
40
  http_version:
41
41
  recorded_at: Fri, 27 Feb 2015 21:24:35 GMT
42
42
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders/ORD-EQE16JGCM52O
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/orders/ORD-EQE16JGCM52O
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -36,8 +36,8 @@ http_interactions:
36
36
  2 de testes Sandbox - 1395095603","detail":"","quantity":1,"price":10000}],"addresses":[{"city":"Sao
37
37
  Paulo","complement":"8","district":"Itaim","street":"Avenida Faria Lima","streetNumber":"2927","zipCode":"01234000","state":"SP","type":"BILLING","country":"BRA"}],"customer":{"id":"CUS-G2LOTWNNG04D","ownId":"sandbox_3_1395095603_1","fullname":"Jose
38
38
  Silva","birthDate":"1988-12-30","email":"josedasilva@email.com","phone":{"areaCode":"11","countryCode":"55","number":"66778899"},"taxDocument":{"type":"CPF","number":"22222222222"},"addresses":[{"city":"Sao
39
- Paulo","complement":"8","district":"Itaim","street":"Avenida Faria Lima","streetNumber":"2927","zipCode":"01234000","state":"SP","type":"BILLING","country":"BRA"}],"_links":{"self":{"href":"https://test.moip.com.br/v2/customers/CUS-G2LOTWNNG04D"}}},"payments":[],"refunds":[],"entries":[],"events":[{"createdAt":"2014-03-17T19:37:19-0300","description":"","type":"ORDER.CREATED"}],"receivers":[{"moipAccount":{"fullname":"Moip
40
- SandBox","login":"integracao@labs.moip.com.br","id":"MPA-CULBBYHD11"},"secondary":false,"amount":{"fees":0,"refunds":0,"total":15000},"payerFee":false,"type":"PRIMARY"}],"_links":{"self":{"href":"https://test.moip.com.br/v2/orders/ORD-EQE16JGCM52O"},"checkout":{"payOnlineBankDebitItau":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/itau/ORD-EQE16JGCM52O"},"payOnlineBankDebitBB":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/bancobrasil/ORD-EQE16JGCM52O"},"payCreditCard":{"redirectHref":"https://checkout-sandbox.moip.com.br/creditcard/ORD-EQE16JGCM52O"},"payOnlineBankDebitBradesco":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/bradesco/ORD-EQE16JGCM52O"},"payBoleto":{"redirectHref":"https://checkout-sandbox.moip.com.br/boleto/ORD-EQE16JGCM52O"},"payOnlineBankDebitBanrisul":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/banrisul/ORD-EQE16JGCM52O"}}}}'
39
+ Paulo","complement":"8","district":"Itaim","street":"Avenida Faria Lima","streetNumber":"2927","zipCode":"01234000","state":"SP","type":"BILLING","country":"BRA"}],"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/customers/CUS-G2LOTWNNG04D"}}},"payments":[],"refunds":[],"entries":[],"events":[{"createdAt":"2014-03-17T19:37:19-0300","description":"","type":"ORDER.CREATED"}],"receivers":[{"moipAccount":{"fullname":"Moip
40
+ SandBox","login":"integracao@labs.moip.com.br","id":"MPA-CULBBYHD11"},"secondary":false,"amount":{"fees":0,"refunds":0,"total":15000},"payerFee":false,"type":"PRIMARY"}],"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/orders/ORD-EQE16JGCM52O"},"checkout":{"payOnlineBankDebitItau":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/itau/ORD-EQE16JGCM52O"},"payOnlineBankDebitBB":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/bancobrasil/ORD-EQE16JGCM52O"},"payCreditCard":{"redirectHref":"https://checkout-sandbox.moip.com.br/creditcard/ORD-EQE16JGCM52O"},"payOnlineBankDebitBradesco":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/bradesco/ORD-EQE16JGCM52O"},"payBoleto":{"redirectHref":"https://checkout-sandbox.moip.com.br/boleto/ORD-EQE16JGCM52O"},"payOnlineBankDebitBanrisul":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/banrisul/ORD-EQE16JGCM52O"}}}}'
41
41
  http_version:
42
42
  recorded_at: Thu, 29 May 2014 01:54:58 GMT
43
43
  recorded_with: VCR 2.8.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders/ORD-INVALID
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/orders/ORD-INVALID
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/refunds/REF-QW4T48M7NDFH
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@sandbox.moip.com.br/v2/refunds/REF-QW4T48M7NDFH
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -34,7 +34,7 @@ http_interactions:
34
34
  - nosniff
35
35
  body:
36
36
  encoding: UTF-8
37
- string: '{"id":"REF-QW4T48M7NDFH","status":"COMPLETED","events":[{"createdAt":"2015-02-27T17:56:22-0300","type":"REFUND.COMPLETED"},{"createdAt":"2015-02-27T17:56:21-0300","type":"REFUND.REQUESTED"}],"amount":{"fees":0,"currency":"BRL","total":100},"type":"PARTIAL","refundingInstrument":{"creditCard":{"brand":"VISA","first6":"401200","last4":"3335"},"method":"CREDIT_CARD"},"createdAt":"2015-02-27T17:56:21-0300","_links":{"payment":{"title":"PAY-5VWJOESX1BWB","href":"https://test.moip.com.br/v2/payments/PAY-5VWJOESX1BWB"},"order":{"title":"ORD-6K8XPJD9O2KH","href":"https://test.moip.com.br/v2/orders/ORD-6K8XPJD9O2KH"},"self":{"href":"https://test.moip.com.br/v2/refunds/REF-QW4T48M7NDFH"}}}'
37
+ string: '{"id":"REF-QW4T48M7NDFH","status":"COMPLETED","events":[{"createdAt":"2015-02-27T17:56:22-0300","type":"REFUND.COMPLETED"},{"createdAt":"2015-02-27T17:56:21-0300","type":"REFUND.REQUESTED"}],"amount":{"fees":0,"currency":"BRL","total":100},"type":"PARTIAL","refundingInstrument":{"creditCard":{"brand":"VISA","first6":"401200","last4":"3335"},"method":"CREDIT_CARD"},"createdAt":"2015-02-27T17:56:21-0300","_links":{"payment":{"title":"PAY-5VWJOESX1BWB","href":"https://sandbox.moip.com.br/v2/payments/PAY-5VWJOESX1BWB"},"order":{"title":"ORD-6K8XPJD9O2KH","href":"https://sandbox.moip.com.br/v2/orders/ORD-6K8XPJD9O2KH"},"self":{"href":"https://sandbox.moip.com.br/v2/refunds/REF-QW4T48M7NDFH"}}}'
38
38
  http_version:
39
39
  recorded_at: Fri, 27 Feb 2015 21:02:03 GMT
40
40
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://test.moip.com.br/v2/invoices/INV-4517A209DDA9
5
+ uri: https://sandbox.moip.com.br/v2/invoices/INV-4517A209DDA9
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"orderExternalId":"ORD-NLQ916TW81TN","customerExternalId":"CUS-GF45QI98NST1"}'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moip2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Saito
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-06-15 00:00:00.000000000 Z
13
+ date: 2015-09-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -180,8 +180,10 @@ files:
180
180
  - lib/moip2/resource/order.rb
181
181
  - lib/moip2/resource/payment.rb
182
182
  - lib/moip2/resource/refund.rb
183
+ - lib/moip2/resource/webhooks.rb
183
184
  - lib/moip2/response.rb
184
185
  - lib/moip2/version.rb
186
+ - lib/moip2/webhooks_api.rb
185
187
  - moip2.gemspec
186
188
  - spec/moip2/api_spec.rb
187
189
  - spec/moip2/auth/basic_spec.rb
@@ -197,6 +199,7 @@ files:
197
199
  - spec/moip2/refund_api_spec.rb
198
200
  - spec/moip2/resource/order_spec.rb
199
201
  - spec/moip2/response_spec.rb
202
+ - spec/moip2/webhooks_spec.rb
200
203
  - spec/moip2_spec.rb
201
204
  - spec/spec_helper.rb
202
205
  - vcr_cassettes/create_customer.yml
@@ -214,6 +217,7 @@ files:
214
217
  - vcr_cassettes/get_customer.yml
215
218
  - vcr_cassettes/get_invoice.yml
216
219
  - vcr_cassettes/get_keys.yml
220
+ - vcr_cassettes/get_webhooks.yml
217
221
  - vcr_cassettes/list_invoices.yml
218
222
  - vcr_cassettes/show_multi_order.yml
219
223
  - vcr_cassettes/show_multi_order_not_found.yml
@@ -261,5 +265,6 @@ test_files:
261
265
  - spec/moip2/refund_api_spec.rb
262
266
  - spec/moip2/resource/order_spec.rb
263
267
  - spec/moip2/response_spec.rb
268
+ - spec/moip2/webhooks_spec.rb
264
269
  - spec/moip2_spec.rb
265
270
  - spec/spec_helper.rb