mollie-ruby-multi-version 0.3.0 → 0.3.1
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.
- checksums.yaml +4 -4
- data/lib/{mollie → mollie_api}/client.rb +1 -1
- data/lib/mollie_api/version.rb +3 -0
- data/lib/mollie_ruby_multi_version.rb +2 -0
- data/{mollie.gemspec → mollie_ruby_multi_version.gemspec} +2 -2
- data/spec/mollie/client_spec.rb +8 -8
- data/spec/spec_helper.rb +1 -1
- metadata +6 -6
- data/lib/mollie/version.rb +0 -3
- data/lib/mollie.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f4cc49a5584c816eeede0f7e55dab3d1126264f
|
4
|
+
data.tar.gz: 38fc30d782e577d7abf55c5fb20e37f07dbce739
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fb02c500e5b83a608b30601f78f94df5db53fa61f48f47d62a73b6dc7122af4d60cc4c3e0e38fda6b8e3213f2297fb31e8e22d652c51bff4c3e5894a4b830f7
|
7
|
+
data.tar.gz: 91461bfe37b48956667d2d4383adc7b57204fc3a552826385f7554a1b3c412bf8021e4b125a60332887f922e111266a8d1ff9d487c70e52d49b6cf4800f7007e
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'mollie_api/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "mollie-ruby-multi-version"
|
8
|
-
spec.version =
|
8
|
+
spec.version = MollieApi::VERSION
|
9
9
|
spec.authors = ["Isabella Santos"]
|
10
10
|
spec.email = ["isabella.cdossantos@gmail.com"]
|
11
11
|
spec.description = %q{Ruby API Client for Mollie}
|
data/spec/mollie/client_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe MollieApi::Client do
|
4
4
|
|
5
5
|
let(:api_key) { "test_4drFuX5HdjBaFxdXoaABYD8yO4HjuT" }
|
6
6
|
|
@@ -9,7 +9,7 @@ describe Mollie::Client do
|
|
9
9
|
it "will setup the payment on mollie" do
|
10
10
|
|
11
11
|
VCR.use_cassette('prepare_payment') do
|
12
|
-
client =
|
12
|
+
client = MollieApi::Client.new(api_key)
|
13
13
|
amount = 99.99
|
14
14
|
description = "My fantastic product"
|
15
15
|
redirect_url = "http://localhost:3000/payments/1/update"
|
@@ -32,7 +32,7 @@ describe Mollie::Client do
|
|
32
32
|
context "issuers" do
|
33
33
|
it "returns a hash with the iDeal issuers" do
|
34
34
|
VCR.use_cassette('get_issuers_list') do
|
35
|
-
client =
|
35
|
+
client = MollieApi::Client.new(api_key)
|
36
36
|
response = client.issuers
|
37
37
|
expect(response.first[:id]).to eql "ideal_TESTNL99"
|
38
38
|
expect(response.first[:name]).to eql "TBM Bank"
|
@@ -44,7 +44,7 @@ describe Mollie::Client do
|
|
44
44
|
context 'when payment is paid' do
|
45
45
|
it "returns the paid status" do
|
46
46
|
VCR.use_cassette('get_status_paid') do
|
47
|
-
client =
|
47
|
+
client = MollieApi::Client.new(api_key)
|
48
48
|
response = client.payment_status("tr_8NQDMOE7EC")
|
49
49
|
expect(response["status"]).to eql "paid"
|
50
50
|
end
|
@@ -55,7 +55,7 @@ describe Mollie::Client do
|
|
55
55
|
context "refund" do
|
56
56
|
it "refunds the payment" do
|
57
57
|
VCR.use_cassette('refund payment') do
|
58
|
-
client =
|
58
|
+
client = MollieApi::Client.new(api_key)
|
59
59
|
response = client.refund_payment("tr_8NQDMOE7EC")
|
60
60
|
expect(response["payment"]["status"]).to eql "refunded"
|
61
61
|
end
|
@@ -65,7 +65,7 @@ describe Mollie::Client do
|
|
65
65
|
context 'payment_methods' do
|
66
66
|
it 'returns a hash with payment methods' do
|
67
67
|
VCR.use_cassette('get methods list') do
|
68
|
-
client =
|
68
|
+
client = MollieApi::Client.new(api_key)
|
69
69
|
response = client.payment_methods
|
70
70
|
|
71
71
|
expect(response['totalCount']).to eql 8
|
@@ -83,7 +83,7 @@ describe Mollie::Client do
|
|
83
83
|
it 'returns a hash for ideal method' do
|
84
84
|
VCR.use_cassette('get ideal method') do
|
85
85
|
|
86
|
-
client =
|
86
|
+
client = MollieApi::Client.new(api_key)
|
87
87
|
response = client.payment_methods('ideal')
|
88
88
|
|
89
89
|
expect(response['id']).to eql 'ideal'
|
@@ -101,7 +101,7 @@ describe Mollie::Client do
|
|
101
101
|
context "error response" do
|
102
102
|
it "will raise an Exception" do
|
103
103
|
VCR.use_cassette('invalid_key') do
|
104
|
-
client =
|
104
|
+
client = MollieApi::Client.new(api_key << "foo")
|
105
105
|
response = client.refund_payment("tr_8NQDMOE7EC")
|
106
106
|
expect(response["error"]).to_not be nil
|
107
107
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mollie-ruby-multi-version
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isabella Santos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -135,10 +135,10 @@ files:
|
|
135
135
|
- LICENSE.txt
|
136
136
|
- README.md
|
137
137
|
- Rakefile
|
138
|
-
- lib/
|
139
|
-
- lib/
|
140
|
-
- lib/
|
141
|
-
-
|
138
|
+
- lib/mollie_api/client.rb
|
139
|
+
- lib/mollie_api/version.rb
|
140
|
+
- lib/mollie_ruby_multi_version.rb
|
141
|
+
- mollie_ruby_multi_version.gemspec
|
142
142
|
- spec/mollie/client_spec.rb
|
143
143
|
- spec/spec_helper.rb
|
144
144
|
- spec/vcr_cassettes/get_ideal_method.yml
|
data/lib/mollie/version.rb
DELETED
data/lib/mollie.rb
DELETED