promise_pay 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -3
- data/lib/promise_pay.rb +1 -0
- data/lib/promise_pay/session.rb +6 -2
- data/lib/promise_pay/version.rb +1 -1
- data/spec/promise_pay/session_spec.rb +4 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbfcc4589cdff4d4dd83eaf0c2a4a9dadc16f77a
|
4
|
+
data.tar.gz: 215489ae8b9a25459346066d1d299c088f2d1509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b07e8aed015bf198afb737906d34ff5512d9351aa6e87cbef60e8b473e019204f92826526d8f98cb12a4c5c0473a969f5ffc8d21c88fbe7139f7e900fd8d19b0
|
7
|
+
data.tar.gz: 85a622893c611b0f54c277c50a69028e056271d6a8ed3f8bc79bfa552fad289ccb0687f03218df4a192f46d51ac58bad7e9bb15b795b57b966d64f1f849b90f8
|
data/README.md
CHANGED
data/lib/promise_pay.rb
CHANGED
data/lib/promise_pay/session.rb
CHANGED
@@ -20,6 +20,7 @@ module PromisePay
|
|
20
20
|
attr_accessor :external_buyer_id
|
21
21
|
attr_accessor :fee_ids
|
22
22
|
attr_accessor :payment_type_id
|
23
|
+
attr_accessor :country_code
|
23
24
|
|
24
25
|
def initialize(options = {})
|
25
26
|
@current_user_id = options.fetch :current_user_id, nil
|
@@ -37,6 +38,7 @@ module PromisePay
|
|
37
38
|
@external_buyer_id = options.fetch :external_buyer_id, nil
|
38
39
|
@fee_ids = options.fetch :fee_ids, nil
|
39
40
|
@payment_type_id = options.fetch :payment_type_id, nil
|
41
|
+
@country_code = options.fetch :country_code, nil
|
40
42
|
end
|
41
43
|
|
42
44
|
def request_token
|
@@ -71,7 +73,8 @@ module PromisePay
|
|
71
73
|
external_seller_id: external_seller_id,
|
72
74
|
external_buyer_id: external_buyer_id,
|
73
75
|
fee_ids: fee_ids,
|
74
|
-
payment_type_id: payment_type_id
|
76
|
+
payment_type_id: payment_type_id,
|
77
|
+
country_code: country_code
|
75
78
|
}.reject { |k,v| v.nil? }.to_param
|
76
79
|
end
|
77
80
|
|
@@ -97,7 +100,8 @@ module PromisePay
|
|
97
100
|
:external_seller_id,
|
98
101
|
:external_buyer_id,
|
99
102
|
:fee_ids,
|
100
|
-
:payment_type_id
|
103
|
+
:payment_type_id,
|
104
|
+
:country_code
|
101
105
|
]
|
102
106
|
end
|
103
107
|
end
|
data/lib/promise_pay/version.rb
CHANGED
@@ -16,7 +16,8 @@ describe PromisePay::Session do
|
|
16
16
|
external_seller_id: "1",
|
17
17
|
external_buyer_id: "2",
|
18
18
|
fee_ids: "3bfc26e3-093d-4f75-ac06-d2023294882b",
|
19
|
-
payment_type_id: "1"
|
19
|
+
payment_type_id: "1",
|
20
|
+
country_code: "AU"
|
20
21
|
}
|
21
22
|
|
22
23
|
let(:request) { double("RestClient::Request", execute: sample_response) }
|
@@ -61,7 +62,8 @@ describe PromisePay::Session do
|
|
61
62
|
:external_seller_id,
|
62
63
|
:external_buyer_id,
|
63
64
|
:fee_ids,
|
64
|
-
:payment_type_id
|
65
|
+
:payment_type_id,
|
66
|
+
:country_code
|
65
67
|
]
|
66
68
|
|
67
69
|
required_params.each do |param|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: promise_pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liam Norton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
123
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.0.14
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: PromisePay gem
|
@@ -137,3 +137,4 @@ test_files:
|
|
137
137
|
- spec/support/fixtures/token_generation.json
|
138
138
|
- spec/support/fixtures/user/find.json
|
139
139
|
- spec/support/fixtures/user/find_all.json
|
140
|
+
has_rdoc:
|