payhyper 0.4.1 → 0.4.2

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: e1ac55a84709d172ef973b489f55b3177003bd96
4
- data.tar.gz: 93f9fd2ba44ade6de09c8a4ae523f978260129d5
3
+ metadata.gz: 1ede27e56ce574fa5c57843db384ddbea934a3d7
4
+ data.tar.gz: bc69b3038c925b4beb2abf7e7827cdc73b683954
5
5
  SHA512:
6
- metadata.gz: 4eb4f20157023d55319add05ae5ce0f5e38142f54a556899a57c30cb1a471094914d6062bace4f406d6d1c6c5a6a95d2d8d6cf3ca528040d98833fb20417d3b0
7
- data.tar.gz: 2b1e0f0d66831d9d6411b1b3da04b92a690c4f9d2a0ed8a474555db1541c3b9872a4821f74ff5a39f5c804f910f293b89198c39b699581ee08735a8bf47f954c
6
+ metadata.gz: b391f1793b7c1767a787fc4e8bb9e868f6b295ed53f374313739249507f780c603a549075c52c5b2d919ad89d83cf3971883ee63d5e213437ebd08542e2634f9
7
+ data.tar.gz: 343e893aa2b3368a3979bfe0e4345c9512dc600e77009316ff6943d2bc30da50761122d8476702763b6944c8d35d2e1c39f91bdc04c4234fd5b2665bb12e34b9
@@ -1,3 +1,3 @@
1
1
  module PayHyper
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
data/lib/payhyper.rb CHANGED
@@ -26,6 +26,7 @@ module PayHyper
26
26
  COUNTRY_CODES = {
27
27
  "JO" => "962",
28
28
  "SA" => "966",
29
+ "KW" => "965",
29
30
  "PK" => "92",
30
31
  }
31
32
  COUNTRIES = COUNTRY_CODES.keys
@@ -37,7 +38,7 @@ module PayHyper
37
38
  @base_url = BASE_URLS[mode]
38
39
  end
39
40
 
40
- def self.at_door!(name, phone, email, country, city, amount, currency, address = nil, invoice = nil, tag = nil, stickiness_id = nil) # TODO: There is a lot of overlap with "in_store!", refactor.
41
+ def self.at_door!(name, phone, email, country, city, amount, currency, address = nil, invoice = nil, tag = nil, stickiness_id = nil, details = nil) # TODO: There is a lot of overlap with "in_store!", refactor.
41
42
  raise_if_not_setup!
42
43
  # == Clean-up fields ==
43
44
  currency = currency.upcase if currency && currency.is_a?(String)
@@ -58,7 +59,7 @@ module PayHyper
58
59
  raise ValidationError, "Invalid email." if email.nil? || !email.match(/\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/)
59
60
  raise ValidationError, "Name is mandatory." if name.nil? || name.strip.length == 0
60
61
  # == Do the request ==
61
- make_call("/v1/at-door", { :name => name, :phone => phone, :email => email, :country => country, :city => city, :amount => amount, :currency => currency, :address => address, :invoice => invoice, :tag => tag, :stickiness_id => stickiness_id })
62
+ make_call("/v1/at-door", { :name => name, :phone => phone, :email => email, :country => country, :city => city, :amount => amount, :currency => currency, :address => address, :invoice => invoice, :tag => tag, :stickiness_id => stickiness_id, :details => details })
62
63
  end
63
64
 
64
65
  def self.in_store!(name, phone, email, country, amount, currency, tag = nil) # TODO: There is a lot of overlap with "at_door!", refactor.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payhyper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sinan Taifour