moip2 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea24ded7f8ad4ce61b397ed6fa301330d4c0e9ee
4
- data.tar.gz: 055511449cfd2ab0e7b1a62c2bc0559121d23032
3
+ metadata.gz: 3b4acff1c3428103f4562ef3cab573ea3b2f8e62
4
+ data.tar.gz: 856ce1149f6ba75bc2f700f0287602432ae323eb
5
5
  SHA512:
6
- metadata.gz: abf681efbb30e56584aa53835abf971b42f5507d8a520473a843de679855a510db40dbf3bf0ace212b669c06b22cbd82358121b6318ab25173e34ce681fb614e
7
- data.tar.gz: e877e1686a986ee1de201c3680b8730370cfcaccf0b9ff0a2b03953b7d3b796da6a08f7c750137f06bbc2c44615e150f5877417f81459be774c7ebe95348ed92
6
+ metadata.gz: d262920caba0a926656d82ca80c32192bb8c696ed95fdf4eb8a076b887acecba9e982bcbc6aa62d71df455b1d5e0290f076ea6cf07c067e9b6324d203cced636
7
+ data.tar.gz: fc295e9abe35465820dbc5258ce32a708066ba89d3c7637cd26232cb1a264d47a043f3a3bfad63fae55d3cb51fa7464c684de927f2357b5e81f3e4a2bd899af0
data/.gitignore CHANGED
@@ -3,7 +3,6 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
- Gemfile.lock
7
6
  InstalledFiles
8
7
  _yardoc
9
8
  coverage
@@ -16,3 +15,4 @@ test/tmp
16
15
  test/version_tmp
17
16
  tmp
18
17
  .DS_Store
18
+ *.swp
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2
4
+ - 2.1
5
+ - 2.0.0
data/Gemfile.lock ADDED
@@ -0,0 +1,102 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ moip2 (0.1.1)
5
+ httparty
6
+ recursive-open-struct
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.3.8)
12
+ celluloid (0.16.0)
13
+ timers (~> 4.0.0)
14
+ codeclimate-test-reporter (0.4.7)
15
+ simplecov (>= 0.7.1, < 1.0.0)
16
+ coderay (1.1.0)
17
+ crack (0.4.2)
18
+ safe_yaml (~> 1.0.0)
19
+ diff-lcs (1.2.5)
20
+ docile (1.1.5)
21
+ ffi (1.9.8)
22
+ formatador (0.2.5)
23
+ guard (2.12.6)
24
+ formatador (>= 0.2.4)
25
+ listen (~> 2.7)
26
+ lumberjack (~> 1.0)
27
+ nenv (~> 0.1)
28
+ notiffany (~> 0.0)
29
+ pry (>= 0.9.12)
30
+ shellany (~> 0.0)
31
+ thor (>= 0.18.1)
32
+ guard-compat (1.2.1)
33
+ guard-rspec (4.5.2)
34
+ guard (~> 2.1)
35
+ guard-compat (~> 1.1)
36
+ rspec (>= 2.99.0, < 4.0)
37
+ hitimes (1.2.2)
38
+ httparty (0.13.5)
39
+ json (~> 1.8)
40
+ multi_xml (>= 0.5.2)
41
+ json (1.8.3)
42
+ listen (2.10.0)
43
+ celluloid (~> 0.16.0)
44
+ rb-fsevent (>= 0.9.3)
45
+ rb-inotify (>= 0.9)
46
+ lumberjack (1.0.9)
47
+ method_source (0.8.2)
48
+ multi_xml (0.5.5)
49
+ nenv (0.2.0)
50
+ notiffany (0.0.6)
51
+ nenv (~> 0.1)
52
+ shellany (~> 0.0)
53
+ pry (0.10.1)
54
+ coderay (~> 1.1.0)
55
+ method_source (~> 0.8.1)
56
+ slop (~> 3.4)
57
+ rake (10.4.2)
58
+ rb-fsevent (0.9.5)
59
+ rb-inotify (0.9.5)
60
+ ffi (>= 0.5.0)
61
+ recursive-open-struct (0.6.4)
62
+ rspec (3.3.0)
63
+ rspec-core (~> 3.3.0)
64
+ rspec-expectations (~> 3.3.0)
65
+ rspec-mocks (~> 3.3.0)
66
+ rspec-core (3.3.0)
67
+ rspec-support (~> 3.3.0)
68
+ rspec-expectations (3.3.0)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.3.0)
71
+ rspec-mocks (3.3.0)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.3.0)
74
+ rspec-support (3.3.0)
75
+ safe_yaml (1.0.4)
76
+ shellany (0.0.1)
77
+ simplecov (0.10.0)
78
+ docile (~> 1.1.0)
79
+ json (~> 1.8)
80
+ simplecov-html (~> 0.10.0)
81
+ simplecov-html (0.10.0)
82
+ slop (3.6.0)
83
+ thor (0.19.1)
84
+ timers (4.0.1)
85
+ hitimes
86
+ vcr (2.9.3)
87
+ webmock (1.21.0)
88
+ addressable (>= 2.3.6)
89
+ crack (>= 0.3.2)
90
+
91
+ PLATFORMS
92
+ ruby
93
+
94
+ DEPENDENCIES
95
+ bundler (~> 1.5)
96
+ codeclimate-test-reporter
97
+ guard-rspec
98
+ moip2!
99
+ rake
100
+ rspec
101
+ vcr
102
+ webmock
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Moip v2 Ruby SDK
2
2
 
3
- [![Circle CI](https://circleci.com/gh/moip/moip-sdk-ruby.svg?style=svg)](https://circleci.com/gh/moip/moip-sdk-ruby)
3
+ [![Build Status](https://travis-ci.org/moip/moip-sdk-ruby.svg?branch=master)](https://travis-ci.org/moip/moip-sdk-ruby)
4
+ [![Code Climate](https://codeclimate.com/github/moip/moip-sdk-ruby/badges/gpa.svg)](https://codeclimate.com/github/moip/moip-sdk-ruby)
5
+ [![Test Coverage](https://codeclimate.com/github/moip/moip-sdk-ruby/badges/coverage.svg)](https://codeclimate.com/github/moip/moip-sdk-ruby/coverage)
4
6
 
5
7
  O jeito mais simples e rápido de integrar o Moip a sua aplicação Ruby
6
8
 
@@ -27,12 +29,17 @@ Após deifinir o tipo de autenticação, é necessário gerar o client, informan
27
29
  client = Moip2::Client.new(:sandbox/:production, auth)
28
30
  ```
29
31
 
32
+ Agora você pode instanciar a Api:
33
+ ```ruby
34
+ api = Moip2::Api.new(client)
35
+ ```
36
+
30
37
  ## Criando um Pedido
31
38
 
32
39
  Agora basta criar o pedido:
33
40
 
34
41
  ```ruby
35
- order = Moip2::OrderApi.new(client).create(
42
+ order = api.order.create(
36
43
  {
37
44
  own_id: "ruby_sdk_1",
38
45
  items: [
@@ -71,7 +78,7 @@ order = Moip2::OrderApi.new(client).create(
71
78
  ### Cartão de crédito
72
79
 
73
80
  ```ruby
74
- Moip2::PaymentApi.new(client).create(order.id,
81
+ api.payment.create(order.id,
75
82
  {
76
83
  installment_count: 1,
77
84
  funding_instrument: {
@@ -103,7 +110,7 @@ Moip2::PaymentApi.new(client).create(order.id,
103
110
  ### Boleto
104
111
 
105
112
  ```ruby
106
- Moip2::PaymentApi.new(client).create(
113
+ api.payment.create(
107
114
  {
108
115
  funding_instrument: {
109
116
  method: "BOLETO",
data/Rakefile CHANGED
@@ -1 +1,11 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task :default => :spec
9
+ rescue LoadError
10
+ # no rspec available
11
+ end
data/lib/moip2/api.rb CHANGED
@@ -19,6 +19,14 @@ module Moip2
19
19
  Moip2::InvoiceApi.new client
20
20
  end
21
21
 
22
+ def refund
23
+ Moip2::RefundApi.new(client)
24
+ end
25
+
26
+ def keys
27
+ Moip2::KeysApi.new(client)
28
+ end
29
+
22
30
  end
23
31
 
24
32
  end
data/lib/moip2/client.rb CHANGED
@@ -37,7 +37,6 @@ module Moip2
37
37
  def post(path, resource)
38
38
  options = opts().merge(body: convert_hash_keys_to(:camel_case, resource).to_json)
39
39
  resp = self.class.post path, options
40
-
41
40
  create_response resp
42
41
  end
43
42
 
@@ -1,6 +1,6 @@
1
1
  module Moip2
2
-
3
- class InvalidEnviromentError < RuntimeError
4
- end
5
-
6
- end
2
+
3
+ class InvalidEnviromentError < RuntimeError
4
+ end
5
+
6
+ end
@@ -1,17 +1,17 @@
1
1
  module Moip2
2
- class KeysApi
3
- attr_reader :client
4
-
5
- def initialize(client)
6
- @client = client
7
- end
2
+ class KeysApi
3
+ attr_reader :client
4
+
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
8
 
9
- def base_path
10
- "/v2/keys"
11
- end
9
+ def base_path
10
+ "/v2/keys"
11
+ end
12
12
 
13
- def show
14
- Resource::Keys.new client, client.get("#{base_path}")
15
- end
16
- end
17
- end
13
+ def show
14
+ Resource::Keys.new client, client.get("#{base_path}")
15
+ end
16
+ end
17
+ end
@@ -1,6 +1,6 @@
1
1
  module Moip2
2
2
  class MultiPaymentApi
3
- attr_reader :client
3
+ attr_reader :client
4
4
 
5
5
  def initialize(client)
6
6
  @client = client
@@ -13,5 +13,9 @@ module Moip2
13
13
  def create(multi_order_id, payment)
14
14
  Resource::Payment.new client.post(base_path(multi_order_id), payment)
15
15
  end
16
+
17
+ def show(multi_payment_id)
18
+ Resource::MultiPayment.new client.get("/v2/multipayments/#{multi_payment_id}")
19
+ end
16
20
  end
17
21
  end
@@ -0,0 +1,26 @@
1
+ module Moip2
2
+ class RefundApi
3
+ attr_reader :client
4
+
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def base_path(id)
10
+ "/v2/#{base_resource(id)}/#{id}/refunds"
11
+ end
12
+
13
+ def create(id, refund = {})
14
+ Resource::Refund.new client, client.post(base_path(id), refund)
15
+ end
16
+
17
+ def show(id)
18
+ Resource::Refund.new client, client.get("/v2/refunds/#{id}")
19
+ end
20
+
21
+ private
22
+ def base_resource(id)
23
+ id.start_with?("PAY") ? "payments" : "orders"
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,13 @@
1
+ module Moip2
2
+ module Resource
3
+ class Refund < SimpleDelegator
4
+ attr_reader :client, :multi_payment_api, :external_id
5
+
6
+ def initialize(client, response)
7
+ super(response)
8
+ @client = client
9
+ end
10
+
11
+ end
12
+ end
13
+ end
data/lib/moip2/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Moip2
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/moip2.rb CHANGED
@@ -8,12 +8,13 @@ require "moip2/auth/basic"
8
8
  require "moip2/auth/oauth"
9
9
 
10
10
  require "moip2/resource/order"
11
- require "moip2/resource/multi_order"
12
11
  require "moip2/resource/payment"
12
+ require "moip2/resource/multi_order"
13
13
  require "moip2/resource/multi_payment"
14
14
  require "moip2/resource/customer"
15
15
  require "moip2/resource/invoice"
16
16
  require "moip2/resource/keys"
17
+ require "moip2/resource/refund"
17
18
 
18
19
  require "moip2/response"
19
20
  require "moip2/client"
@@ -23,6 +24,7 @@ require "moip2/payment_api"
23
24
  require "moip2/multi_payment_api"
24
25
  require "moip2/customer_api"
25
26
  require "moip2/invoice_api"
27
+ require "moip2/refund_api"
26
28
  require "moip2/api"
27
29
 
28
30
  require "moip2/keys_api"
data/moip2.gemspec CHANGED
@@ -23,8 +23,9 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.5"
25
25
  spec.add_development_dependency "rake"
26
- spec.add_development_dependency "rspec", "~> 3.0.0.beta2"
26
+ spec.add_development_dependency "rspec"
27
27
  spec.add_development_dependency "vcr"
28
28
  spec.add_development_dependency "webmock"
29
29
  spec.add_development_dependency "guard-rspec"
30
+ spec.add_development_dependency "codeclimate-test-reporter"
30
31
  end
@@ -5,7 +5,6 @@ describe Moip2::Api do
5
5
  let(:api) { described_class.new client }
6
6
 
7
7
  describe "#order" do
8
-
9
8
  it "returns an OrderApi" do
10
9
  expect(api.order).to be_a(Moip2::OrderApi)
11
10
  end
@@ -22,4 +21,12 @@ describe Moip2::Api do
22
21
  it { expect(api.invoice).to be_a Moip2::InvoiceApi }
23
22
  end
24
23
 
24
+ describe "#refund" do
25
+ it { expect(api.refund).to be_a Moip2::RefundApi }
26
+ end
27
+
28
+ describe "#keys" do
29
+ it { expect(api.keys).to be_a Moip2::KeysApi }
30
+ end
31
+
25
32
  end
@@ -127,7 +127,7 @@ describe Moip2::MultiOrderApi do
127
127
  end
128
128
 
129
129
  let(:created_multi_order) do
130
- VCR.use_cassette("create_mulit_order_success") do
130
+ VCR.use_cassette("create_multi_order_success") do
131
131
  multi_order_api.create(multi_order)
132
132
  end
133
133
  end
@@ -0,0 +1,62 @@
1
+ describe Moip2::MultiPaymentApi do
2
+ let(:multi_payment_api) { described_class.new(sandbox_client) }
3
+
4
+ describe "#create" do
5
+ let(:multi_payment) do
6
+ {
7
+ installmentCount: 1,
8
+ fundingInstrument: {
9
+ method: "CREDIT_CARD",
10
+ creditCard: {
11
+ expirationMonth: 05,
12
+ expirationYear: 18,
13
+ number: "4012001038443335",
14
+ cvc: "123",
15
+ holder: {
16
+ fullname: "Jose Portador da Silva",
17
+ birthdate: "1988-12-30",
18
+ taxDocument: {
19
+ type: "CPF",
20
+ number: "33333333333"
21
+ },
22
+ phone: {
23
+ countryCode: "55",
24
+ areaCode: "11",
25
+ number: "66778899"
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
31
+ end
32
+
33
+ let(:created_multi_payment) do
34
+ VCR.use_cassette("create_multi_payment_success") do
35
+ multi_payment_api.create("MOR-IVKZDU55LXJU", multi_payment)
36
+ end
37
+ end
38
+
39
+ it "creates a multiPayment at moip" do
40
+ expect(created_multi_payment.id).to eq "MPY-DSA3I67FOKES"
41
+ expect(created_multi_payment.payments).to_not be_nil
42
+ expect(created_multi_payment.status).to eq "WAITING"
43
+ end
44
+
45
+ end
46
+
47
+ describe "#show" do
48
+ let(:multi_payment) do
49
+ VCR.use_cassette("show_multi_payment") do
50
+ multi_payment_api.show("MPY-DSA3I67FOKES")
51
+ end
52
+ end
53
+
54
+ it "shows a multiPayment" do
55
+ expect(multi_payment.id).to eq "MPY-DSA3I67FOKES"
56
+ expect(multi_payment.payments).to_not be_nil
57
+ expect(multi_payment.status).to eq "AUTHORIZED"
58
+ end
59
+
60
+ end
61
+
62
+ end
@@ -2,42 +2,75 @@ describe Moip2::PaymentApi do
2
2
 
3
3
  let(:payment_api) { described_class.new(sandbox_client) }
4
4
 
5
- let(:created_payment) do
6
- VCR.use_cassette("create_payment_success") do
7
- payment_api.create("ORD-UEK2XGEXNWL9", {
8
- installmentCount: 1,
9
- fundingInstrument: {
10
- method: "CREDIT_CARD",
11
- creditCard: {
12
- expirationMonth: 05,
13
- expirationYear: 18,
14
- number: "4012001038443335",
15
- cvc: "123",
16
- holder: {
17
- fullname: "Jose Portador da Silva",
18
- birthdate: "1988-12-30",
19
- taxDocument: {
20
- type: "CPF",
21
- number: "33333333333"
22
- },
23
- phone: {
24
- countryCode: "55",
25
- areaCode: "11",
26
- number: "66778899"
5
+ context "with credit card data" do
6
+ let(:created_payment) do
7
+ VCR.use_cassette("create_payment_success") do
8
+ payment_api.create("ORD-UEK2XGEXNWL9", {
9
+ installmentCount: 1,
10
+ fundingInstrument: {
11
+ method: "CREDIT_CARD",
12
+ creditCard: {
13
+ expirationMonth: 05,
14
+ expirationYear: 18,
15
+ number: "4012001038443335",
16
+ cvc: "123",
17
+ holder: {
18
+ fullname: "Jose Portador da Silva",
19
+ birthdate: "1988-12-30",
20
+ taxDocument: {
21
+ type: "CPF",
22
+ number: "33333333333"
23
+ },
24
+ phone: {
25
+ countryCode: "55",
26
+ areaCode: "11",
27
+ number: "66778899"
28
+ }
27
29
  }
28
30
  }
29
31
  }
30
- }
31
- })
32
+ })
33
+ end
32
34
  end
33
- end
34
35
 
35
- it "creates a credit card payment on moip" do
36
- expect(created_payment.id).to eq("PAY-W3MNW718O3AI")
37
- end
36
+ it "creates a credit card payment on moip" do
37
+ expect(created_payment.id).to eq("PAY-W3MNW718O3AI")
38
+ end
38
39
 
39
- it "returns a Payment object" do
40
- expect(created_payment).to be_a(Moip2::Resource::Payment)
40
+ it "returns a Payment object" do
41
+ expect(created_payment).to be_a(Moip2::Resource::Payment)
42
+ end
41
43
  end
42
44
 
45
+ context "with credit card hash" do
46
+ let(:created_payment) do
47
+ VCR.use_cassette("create_payment_with_hash_success") do
48
+ payment_api.create("ORD-DDT31SU6LXZO", {
49
+ installmentCount: 1,
50
+ fundingInstrument: {
51
+ method: "CREDIT_CARD",
52
+ creditCard: {
53
+ hash: "Pf/FTHX09EwW+9mAd2+jhqhVWE8LtdYp+rfoqrSXelFqgkRRdpvcQTKKGA3TVbuInIrH03Cq0Fq1XVwBDgF9EDtFO+L3kacfAl4hfKr55wkvi7yAAZ9MnhqXCzxm+0aOdoc/0UqnsHlxCzpwaGqBZZkQ6Mt+V1e26fxne4OJw2XJeLMOHpPnMM23Uk8BhSsCUVffmiIuE+Ep9VD9b3HkJPqGRPFiKnYT29J6PH2mKYT61u8KM6ZKQu7FmKTtYs25tHtQ2mN7WhfLbAqLARnfBrCKg1a3W+kcWSf4Wjc0z7LWHzFCvT9vxnq8W/fDBAbue102mouV37dlKR8yN7UgZA==",
54
+ holder: {
55
+ fullname: "Jose Portador da Silva",
56
+ birthdate: "1988-12-30",
57
+ taxDocument: {
58
+ type: "CPF",
59
+ number: "33333333333"
60
+ },
61
+ }
62
+ }
63
+ }
64
+ })
65
+ end
66
+ end
67
+
68
+ it "creates a credit card payment on moip" do
69
+ expect(created_payment.id).to eq("PAY-CRUP19YU2VE1")
70
+ end
71
+
72
+ it "returns a Payment object" do
73
+ expect(created_payment).to be_a(Moip2::Resource::Payment)
74
+ end
75
+ end
43
76
  end
@@ -0,0 +1,47 @@
1
+ describe Moip2::RefundApi do
2
+ let(:refund_api) { described_class.new(sandbox_client) }
3
+
4
+ describe "#create order refund" do
5
+ describe "refund full" do
6
+
7
+ let(:order_refunded) do
8
+ VCR.use_cassette("create_full_order_refunded") do
9
+ refund_api.create("ORD-7JOU41NX4M1S")
10
+ end
11
+ end
12
+
13
+ it "refunds the entire amount" do
14
+ expect(order_refunded.status).to eq "COMPLETED"
15
+ end
16
+
17
+ end
18
+
19
+ describe "partial refund" do
20
+ let(:refunded_order) do
21
+ VCR.use_cassette("create_partial_refunded_order") do
22
+ refund_api.create("ORD-6K8XPJD9O2KH", { amount: 100 })
23
+ end
24
+ end
25
+
26
+ it "refunds a partial amount" do
27
+ expect(refunded_order.status).to eq "COMPLETED"
28
+ expect(refunded_order.type).to eq "PARTIAL"
29
+ expect(refunded_order.id).to eq "REF-QW4T48M7NDFH"
30
+ end
31
+ end
32
+ end
33
+
34
+ describe "#show" do
35
+ let(:refunded_order) do
36
+ VCR.use_cassette("show_refund") do
37
+ refund_api.show("REF-QW4T48M7NDFH")
38
+ end
39
+ end
40
+
41
+ it "shows a refund" do
42
+ expect(refunded_order.status).to eq "COMPLETED"
43
+ expect(refunded_order.type).to eq "PARTIAL"
44
+ expect(refunded_order.id).to eq "REF-QW4T48M7NDFH"
45
+ end
46
+ end
47
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,6 @@
1
+ require "codeclimate-test-reporter"
2
+ CodeClimate::TestReporter.start
3
+
1
4
  require "moip2"
2
5
 
3
6
  require "vcr"
@@ -89,6 +92,7 @@ end
89
92
  VCR.configure do |c|
90
93
  c.cassette_library_dir = 'vcr_cassettes'
91
94
  c.hook_into :webmock # or :fakeweb
95
+ c.ignore_hosts 'codeclimate.com'
92
96
  end
93
97
 
94
98
  # Helper methods
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders/ORD-7JOU41NX4M1S/refunds
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Fri, 27 Feb 2015 18:25:33 GMT
21
+ Content-Type:
22
+ - application/json
23
+ Content-Length:
24
+ - '685'
25
+ Connection:
26
+ - keep-alive
27
+ Status:
28
+ - 201 Created
29
+ Vary:
30
+ - Accept-Encoding
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ body:
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"}}}'
36
+ http_version:
37
+ recorded_at: Fri, 27 Feb 2015 18:25:32 GMT
38
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/multiorders/MOR-IVKZDU55LXJU/multipayments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"installmentCount":1,"fundingInstrument":{"method":"CREDIT_CARD","creditCard":{"expirationMonth":5,"expirationYear":18,"number":"4012001038443335","cvc":"123","holder":{"fullname":"Jose
9
+ Portador da Silva","birthdate":"1988-12-30","taxDocument":{"type":"CPF","number":"33333333333"},"phone":{"countryCode":"55","areaCode":"11","number":"66778899"}}}}}'
10
+ headers:
11
+ Content-Type:
12
+ - application/json
13
+ response:
14
+ status:
15
+ code: 201
16
+ message: Created
17
+ headers:
18
+ Server:
19
+ - nginx
20
+ Date:
21
+ - Fri, 27 Feb 2015 21:16:02 GMT
22
+ Content-Type:
23
+ - application/json
24
+ Content-Length:
25
+ - '1982'
26
+ Connection:
27
+ - keep-alive
28
+ Status:
29
+ - 201 Created
30
+ X-Newrelic-App-Data:
31
+ - PxQFUlBXAQoTV1VaDgIEV0YdFGQHBDcQUQxLA1tMXV1dORYzVBJHNQFUZAQUFVFQVThOFAVtGAsRXUJaDRQHB0IRZE1DV0ZWVhdwBUw9HA8RWkMIFgJBXlUKFREXGWcpN2UfEU5WTVIcUBZVDgkNBQVSFVIEUB9AXQEOVVECDlIIXVVQBwlSX0Zs
32
+ Vary:
33
+ - Accept-Encoding
34
+ X-Content-Type-Options:
35
+ - nosniff
36
+ body:
37
+ encoding: UTF-8
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"}}}'
41
+ http_version:
42
+ recorded_at: Fri, 27 Feb 2015 21:16:01 GMT
43
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders/ORD-6K8XPJD9O2KH/refunds
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"amount":100}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Fri, 27 Feb 2015 20:56:23 GMT
21
+ Content-Type:
22
+ - application/json
23
+ Content-Length:
24
+ - '688'
25
+ Connection:
26
+ - keep-alive
27
+ Status:
28
+ - 201 Created
29
+ Vary:
30
+ - Accept-Encoding
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ body:
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"}}}'
36
+ http_version:
37
+ recorded_at: Fri, 27 Feb 2015 20:56:21 GMT
38
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/orders/ORD-DDT31SU6LXZO/payments
6
+ body:
7
+ encoding: UTF-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
9
+ Portador da Silva","birthdate":"1988-12-30","taxDocument":{"type":"CPF","number":"33333333333"}}}}}'
10
+ headers:
11
+ Content-Type:
12
+ - application/json
13
+ response:
14
+ status:
15
+ code: 201
16
+ message: Created
17
+ headers:
18
+ Server:
19
+ - nginx
20
+ Date:
21
+ - Mon, 15 Jun 2015 00:13:51 GMT
22
+ Content-Type:
23
+ - application/json
24
+ Content-Length:
25
+ - '856'
26
+ Connection:
27
+ - keep-alive
28
+ Status:
29
+ - 201 Created
30
+ Vary:
31
+ - Accept-Encoding
32
+ X-Content-Type-Options:
33
+ - nosniff
34
+ body:
35
+ encoding: UTF-8
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"}'
38
+ http_version:
39
+ recorded_at: Mon, 15 Jun 2015 00:13:51 GMT
40
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,42 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/multipayments/MPY-DSA3I67FOKES
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Fri, 27 Feb 2015 21:24:36 GMT
21
+ Content-Type:
22
+ - application/json
23
+ Content-Length:
24
+ - '2269'
25
+ Connection:
26
+ - keep-alive
27
+ Status:
28
+ - 200 OK
29
+ X-Newrelic-App-Data:
30
+ - PxQFUlBXAQoTV1VaDgIEV0YdFGQHBDcQUQxLA1tMXV1dORYzVBJHNQFUZAQUFVFQVThOFAVtGAsRXUJaEgcaD1UMTBFkF09fRglNCGEASg8BWEMoAh4YG3chNUsVHQdIVB0GHVBSV1cFVwxWFAgYEAoBCAQDWAUAUAAFWVFSXQsSOQ==
31
+ Vary:
32
+ - Accept-Encoding
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ body:
36
+ encoding: UTF-8
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"}}}'
40
+ http_version:
41
+ recorded_at: Fri, 27 Feb 2015 21:24:35 GMT
42
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://01010101010101010101010101010101:ABABABABABABABABABABABABABABABABABABABAB@test.moip.com.br/v2/refunds/REF-QW4T48M7NDFH
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Fri, 27 Feb 2015 21:02:04 GMT
21
+ Content-Type:
22
+ - application/json
23
+ Content-Length:
24
+ - '688'
25
+ Connection:
26
+ - keep-alive
27
+ Status:
28
+ - 200 OK
29
+ X-Newrelic-App-Data:
30
+ - PxQFUlBXAQoTV1VaDgIEV0YdFGQHBDcQUQxLA1tMXV1dORYzVBJHNQFUZAQUFVFQVThOFAVtGBQBV0NdBhU/TUsLXB8YEHN3Z0wbTQFPA05VGANWV1oJAwRIUU4VUgJQUwQHUgNTUANUBFtQXBpp
31
+ Vary:
32
+ - Accept-Encoding
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ body:
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"}}}'
38
+ http_version:
39
+ recorded_at: Fri, 27 Feb 2015 21:02:03 GMT
40
+ recorded_with: VCR 2.9.3
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.0
4
+ version: 0.1.1
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-10 00:00:00.000000000 Z
13
+ date: 2015-06-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -72,16 +72,16 @@ dependencies:
72
72
  name: rspec
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - "~>"
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: 3.0.0.beta2
77
+ version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - "~>"
82
+ - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: 3.0.0.beta2
84
+ version: '0'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: vcr
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -124,6 +124,20 @@ dependencies:
124
124
  - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
+ - !ruby/object:Gem::Dependency
128
+ name: codeclimate-test-reporter
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
127
141
  description: Ruby client for moip v2 api
128
142
  email:
129
143
  - rodrigo.saito@moip.com.br
@@ -137,7 +151,9 @@ files:
137
151
  - ".rspec"
138
152
  - ".ruby-gemset"
139
153
  - ".ruby-version"
154
+ - ".travis.yml"
140
155
  - Gemfile
156
+ - Gemfile.lock
141
157
  - Guardfile
142
158
  - LICENSE.txt
143
159
  - README.md
@@ -155,6 +171,7 @@ files:
155
171
  - lib/moip2/multi_payment_api.rb
156
172
  - lib/moip2/order_api.rb
157
173
  - lib/moip2/payment_api.rb
174
+ - lib/moip2/refund_api.rb
158
175
  - lib/moip2/resource/customer.rb
159
176
  - lib/moip2/resource/invoice.rb
160
177
  - lib/moip2/resource/keys.rb
@@ -162,6 +179,7 @@ files:
162
179
  - lib/moip2/resource/multi_payment.rb
163
180
  - lib/moip2/resource/order.rb
164
181
  - lib/moip2/resource/payment.rb
182
+ - lib/moip2/resource/refund.rb
165
183
  - lib/moip2/response.rb
166
184
  - lib/moip2/version.rb
167
185
  - moip2.gemspec
@@ -173,30 +191,37 @@ files:
173
191
  - spec/moip2/invoice_spec.rb
174
192
  - spec/moip2/keys_spec.rb
175
193
  - spec/moip2/multi_order_api_spec.rb
194
+ - spec/moip2/multi_payment_api_spec.rb
176
195
  - spec/moip2/order_api_spec.rb
177
196
  - spec/moip2/payment_api_spec.rb
197
+ - spec/moip2/refund_api_spec.rb
178
198
  - spec/moip2/resource/order_spec.rb
179
199
  - spec/moip2/response_spec.rb
180
200
  - spec/moip2_spec.rb
181
201
  - spec/spec_helper.rb
182
202
  - vcr_cassettes/create_customer.yml
183
203
  - vcr_cassettes/create_customer_with_funding_instrument.yml
204
+ - vcr_cassettes/create_full_order_refunded.yml
184
205
  - vcr_cassettes/create_invoice.yml
185
- - vcr_cassettes/create_mulit_order_success.yml
186
206
  - vcr_cassettes/create_multi_order_fail.yml
207
+ - vcr_cassettes/create_multi_order_success.yml
208
+ - vcr_cassettes/create_multi_payment_success.yml
187
209
  - vcr_cassettes/create_order_fail.yml
188
210
  - vcr_cassettes/create_order_success.yml
211
+ - vcr_cassettes/create_partial_refunded_order.yml
189
212
  - vcr_cassettes/create_payment_success.yml
213
+ - vcr_cassettes/create_payment_with_hash_success.yml
190
214
  - vcr_cassettes/get_customer.yml
191
215
  - vcr_cassettes/get_invoice.yml
192
216
  - vcr_cassettes/get_keys.yml
193
217
  - vcr_cassettes/list_invoices.yml
194
218
  - vcr_cassettes/show_multi_order.yml
195
219
  - vcr_cassettes/show_multi_order_not_found.yml
220
+ - vcr_cassettes/show_multi_payment.yml
196
221
  - vcr_cassettes/show_order.yml
197
222
  - vcr_cassettes/show_order_not_found.yml
223
+ - vcr_cassettes/show_refund.yml
198
224
  - vcr_cassettes/update_invoice.yml
199
- - wercker.yml
200
225
  homepage: ''
201
226
  licenses:
202
227
  - MIT
@@ -230,8 +255,10 @@ test_files:
230
255
  - spec/moip2/invoice_spec.rb
231
256
  - spec/moip2/keys_spec.rb
232
257
  - spec/moip2/multi_order_api_spec.rb
258
+ - spec/moip2/multi_payment_api_spec.rb
233
259
  - spec/moip2/order_api_spec.rb
234
260
  - spec/moip2/payment_api_spec.rb
261
+ - spec/moip2/refund_api_spec.rb
235
262
  - spec/moip2/resource/order_spec.rb
236
263
  - spec/moip2/response_spec.rb
237
264
  - spec/moip2_spec.rb
data/wercker.yml DELETED
@@ -1,48 +0,0 @@
1
- box: wercker/rvm
2
- # Build definition
3
- build:
4
- # The steps that will be executed on build
5
- # See the Ruby section on the wercker devcenter:
6
- # http://devcenter.wercker.com/articles/languages/ruby.html
7
- steps:
8
- # Uncomment this to force RVM to use a specific Ruby version
9
- - rvm-use:
10
- version: 2.2.0
11
-
12
- # A step that executes `bundle install` command
13
- - bundle-install
14
-
15
- # A custom script step, name value is used in the UI
16
- # and the code value contains the command that get executed
17
- - script:
18
- name: echo ruby information
19
- code: |
20
- echo "ruby version $(ruby --version) running"
21
- echo "from location $(which ruby)"
22
- echo -p "gem list: $(gem list)"
23
-
24
- # Add more steps here:
25
- - script:
26
- name: rspec
27
- code: bundle exec rspec
28
-
29
- - rvm-use:
30
- version: 2.2.0
31
-
32
- # A step that executes `bundle install` command
33
- - bundle-install
34
-
35
- # A custom script step, name value is used in the UI
36
- # and the code value contains the command that get executed
37
- - script:
38
- name: echo ruby information
39
- code: |
40
- echo "ruby version $(ruby --version) running"
41
- echo "from location $(which ruby)"
42
- echo -p "gem list: $(gem list)"
43
-
44
- # Add more steps here:
45
- - script:
46
- name: rspec
47
- code: bundle exec rspec
48
-