promise_pay 0.0.2 → 0.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0c048107ccfebb6495ee2ae85ba653759e0223e
4
- data.tar.gz: b40fcdfac8462ce175d35a19bc059140f5d6dcd7
3
+ metadata.gz: bbfcc4589cdff4d4dd83eaf0c2a4a9dadc16f77a
4
+ data.tar.gz: 215489ae8b9a25459346066d1d299c088f2d1509
5
5
  SHA512:
6
- metadata.gz: 16805d5abd93e49ec63297768c880ace48b95a97e80f95499d8d380f799d6bdd6cb50d7601f581d6624c3b01924b0c549a06a7faa6b63fd5c5c76d2e89c2c1fa
7
- data.tar.gz: b65aa2b9604341517f614d3a817be23b6d6f55d44b1b06b5ac06d623ae0c598f7391c9b905b413d949a7e3212ae5ace65377f68ab08f639ee96e09a9396680a3
6
+ metadata.gz: b07e8aed015bf198afb737906d34ff5512d9351aa6e87cbef60e8b473e019204f92826526d8f98cb12a4c5c0473a969f5ffc8d21c88fbe7139f7e900fd8d19b0
7
+ data.tar.gz: 85a622893c611b0f54c277c50a69028e056271d6a8ed3f8bc79bfa552fad289ccb0687f03218df4a192f46d51ac58bad7e9bb15b795b57b966d64f1f849b90f8
data/README.md CHANGED
@@ -56,9 +56,7 @@ item.amount => 10
56
56
 
57
57
  ## TODO:
58
58
 
59
- 1. Write .find_all methods
60
- 2. Move all errors into shared file
61
- 3. Don't enforce full params match on session request (?)
59
+ 1. Move all errors into shared file
62
60
 
63
61
  ## Contributing
64
62
 
data/lib/promise_pay.rb CHANGED
@@ -14,6 +14,7 @@ module PromisePay
14
14
  attr_accessor :api_user
15
15
  attr_accessor :api_key
16
16
  attr_accessor :env
17
+ attr_accessor :fee_ids
17
18
  end
18
19
 
19
20
  class InvalidRequest < StandardError; end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PromisePay
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -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.2
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-07-17 00:00:00.000000000 Z
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.1.9
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: