promise_pay 0.0.1 → 0.0.2

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: 657fe7151abb7b6dd76fbdb0e610697bf0f4e831
4
- data.tar.gz: 2244b5986a100793fae53900ea53aebcc39ade4c
3
+ metadata.gz: e0c048107ccfebb6495ee2ae85ba653759e0223e
4
+ data.tar.gz: b40fcdfac8462ce175d35a19bc059140f5d6dcd7
5
5
  SHA512:
6
- metadata.gz: bee824f5f09fb802a33f336d8c6e9434ae1b195f2eddf0d61d7838c4ed6d2a2a6804e696afcc6341a841a856057bfea3b12c5ccad931795f97a0fa9c51fe80ba
7
- data.tar.gz: 7d3bed8cbd8f7019952ebb1d028dddcac849e16aacf1910f42c7f8aa126e56e3e058688b82c790f0a98b8ac1cba209151cf52f6d7e51b73dfd01beab0ad22892
6
+ metadata.gz: 16805d5abd93e49ec63297768c880ace48b95a97e80f95499d8d380f799d6bdd6cb50d7601f581d6624c3b01924b0c549a06a7faa6b63fd5c5c76d2e89c2c1fa
7
+ data.tar.gz: b65aa2b9604341517f614d3a817be23b6d6f55d44b1b06b5ac06d623ae0c598f7391c9b905b413d949a7e3212ae5ace65377f68ab08f639ee96e09a9396680a3
@@ -72,7 +72,7 @@ module PromisePay
72
72
  external_buyer_id: external_buyer_id,
73
73
  fee_ids: fee_ids,
74
74
  payment_type_id: payment_type_id
75
- }.to_param
75
+ }.reject { |k,v| v.nil? }.to_param
76
76
  end
77
77
 
78
78
  def enforce_valid_params!
@@ -89,9 +89,7 @@ module PromisePay
89
89
  :currency,
90
90
  :item_name,
91
91
  :amount,
92
- :seller_lastname,
93
92
  :seller_firstname,
94
- :buyer_lastname,
95
93
  :buyer_firstname,
96
94
  :seller_email,
97
95
  :buyer_email,
@@ -1,3 +1,3 @@
1
1
  module PromisePay
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -47,8 +47,25 @@ describe PromisePay::Session do
47
47
  end
48
48
 
49
49
  context "with invalid params" do
50
- valid_params.each do |param|
51
- let(:invalid_params) { valid_params.reject { |k, v| k == param[0] } }
50
+ required_params =
51
+ [
52
+ :current_user_id,
53
+ :currency,
54
+ :item_name,
55
+ :amount,
56
+ :seller_firstname,
57
+ :buyer_firstname,
58
+ :seller_email,
59
+ :buyer_email,
60
+ :external_item_id,
61
+ :external_seller_id,
62
+ :external_buyer_id,
63
+ :fee_ids,
64
+ :payment_type_id
65
+ ]
66
+
67
+ required_params.each do |param|
68
+ let(:invalid_params) { valid_params.reject { |k, v| k == param } }
52
69
  let(:session) { described_class.new(invalid_params) }
53
70
 
54
71
  it "raises an error if #{param[0]} option is missing" do
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.1
4
+ version: 0.0.2
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-16 00:00:00.000000000 Z
11
+ date: 2014-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler