connect-sdk-ruby 1.17.0 → 1.18.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
  SHA256:
3
- metadata.gz: 4434dcbab0689c4502a4e5d19451949d045fb889f51cccfe67c304d91bee0dea
4
- data.tar.gz: cd200d8ebcec68d787262958848af6aca8d59415105e2dd7717af62a9f25e13f
3
+ metadata.gz: c690dcff1a5e96c60281c3cabac2aa04f8d897cc3c3d3a5a25f9ecf6538d1133
4
+ data.tar.gz: 513e7d5d20137f3561186ba96c93e73a1bb3dd2b2d18b243a53e7f1659137bf8
5
5
  SHA512:
6
- metadata.gz: 3293a0353f763affb80aacbc129d070c58517e5053cd1b55a4e2b54323fad3db91383fd7f36a14661bd7e1871308ab5908f5f7325f2c8e0b8bb0cd1be31e23bd
7
- data.tar.gz: 21b42560b10bdbd5131aaf831b813355994b62c1d0532a2e835b2c955efdd712f47ef06141bbfb9418b16dac6e23ff71b06f9de74df3e09867d61a3112f7a602
6
+ metadata.gz: 092258bc9e9cf4619ee6e075cc37cab74e06c83e7f87bfaaa329c79cc0f7d6c0ef31277d3200fbb08b69983d12689b0caa3d89a123ea6203708dc44ed0290674
7
+ data.tar.gz: 94f89a2432bb17abf76093edefec5f3c852eee4ffea685ce3967d747eebd77484b1b5cf7c4c4e6c2868078937acaae16e543ad5d2d4bd7779efb56f846e73548
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '1.17.0'
3
+ spec.version = '1.18.0'
4
4
  spec.authors = ['Ingenico ePayments']
5
5
  spec.email = ['github@epay.ingenico.com']
6
6
  spec.summary = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API}
@@ -32,6 +32,9 @@ module Ingenico::Connect::SDK
32
32
  # String
33
33
  attr_accessor :tokens
34
34
 
35
+ # true/false
36
+ attr_accessor :validate_shopping_cart
37
+
35
38
  # String
36
39
  attr_accessor :variant
37
40
 
@@ -44,6 +47,7 @@ module Ingenico::Connect::SDK
44
47
  add_to_hash(hash, 'returnUrl', @return_url)
45
48
  add_to_hash(hash, 'showResultPage', @show_result_page)
46
49
  add_to_hash(hash, 'tokens', @tokens)
50
+ add_to_hash(hash, 'validateShoppingCart', @validate_shopping_cart)
47
51
  add_to_hash(hash, 'variant', @variant)
48
52
  hash
49
53
  end
@@ -74,6 +78,9 @@ module Ingenico::Connect::SDK
74
78
  if hash.has_key?('tokens')
75
79
  @tokens = hash['tokens']
76
80
  end
81
+ if hash.has_key?('validateShoppingCart')
82
+ @validate_shopping_cart = hash['validateShoppingCart']
83
+ end
77
84
  if hash.has_key?('variant')
78
85
  @variant = hash['variant']
79
86
  end
@@ -19,6 +19,9 @@ module Ingenico::Connect::SDK
19
19
  # Integer
20
20
  attr_accessor :line_amount_total
21
21
 
22
+ # String
23
+ attr_accessor :product_category
24
+
22
25
  # String
23
26
  attr_accessor :product_code
24
27
 
@@ -45,6 +48,7 @@ module Ingenico::Connect::SDK
45
48
  add_to_hash(hash, 'discountAmount', @discount_amount)
46
49
  add_to_hash(hash, 'googleProductCategoryId', @google_product_category_id)
47
50
  add_to_hash(hash, 'lineAmountTotal', @line_amount_total)
51
+ add_to_hash(hash, 'productCategory', @product_category)
48
52
  add_to_hash(hash, 'productCode', @product_code)
49
53
  add_to_hash(hash, 'productName', @product_name)
50
54
  add_to_hash(hash, 'productPrice', @product_price)
@@ -66,6 +70,9 @@ module Ingenico::Connect::SDK
66
70
  if hash.has_key?('lineAmountTotal')
67
71
  @line_amount_total = hash['lineAmountTotal']
68
72
  end
73
+ if hash.has_key?('productCategory')
74
+ @product_category = hash['productCategory']
75
+ end
69
76
  if hash.has_key?('productCode')
70
77
  @product_code = hash['productCode']
71
78
  end
@@ -28,6 +28,9 @@ module Ingenico::Connect::SDK
28
28
  # {Ingenico::Connect::SDK::Domain::Product::FixedListValidator}
29
29
  attr_accessor :fixed_list
30
30
 
31
+ # {Ingenico::Connect::SDK::Domain::Product::EmptyValidator}
32
+ attr_accessor :iban
33
+
31
34
  # {Ingenico::Connect::SDK::Domain::Product::LengthValidator}
32
35
  attr_accessor :length
33
36
 
@@ -49,6 +52,7 @@ module Ingenico::Connect::SDK
49
52
  add_to_hash(hash, 'emailAddress', @email_address)
50
53
  add_to_hash(hash, 'expirationDate', @expiration_date)
51
54
  add_to_hash(hash, 'fixedList', @fixed_list)
55
+ add_to_hash(hash, 'iban', @iban)
52
56
  add_to_hash(hash, 'length', @length)
53
57
  add_to_hash(hash, 'luhn', @luhn)
54
58
  add_to_hash(hash, 'range', @range)
@@ -83,6 +87,12 @@ module Ingenico::Connect::SDK
83
87
  end
84
88
  @fixed_list = Ingenico::Connect::SDK::Domain::Product::FixedListValidator.new_from_hash(hash['fixedList'])
85
89
  end
90
+ if hash.has_key?('iban')
91
+ if !(hash['iban'].is_a? Hash)
92
+ raise TypeError, "value '%s' is not a Hash" % [hash['iban']]
93
+ end
94
+ @iban = Ingenico::Connect::SDK::Domain::Product::EmptyValidator.new_from_hash(hash['iban'])
95
+ end
86
96
  if hash.has_key?('length')
87
97
  if !(hash['length'].is_a? Hash)
88
98
  raise TypeError, "value '%s' is not a Hash" % [hash['length']]
@@ -5,7 +5,7 @@ module Ingenico::Connect::SDK
5
5
 
6
6
  # Manages metadata about the server using the SDK
7
7
  class MetaDataProvider
8
- @@SDK_VERSION = '1.17.0'
8
+ @@SDK_VERSION = '1.18.0'
9
9
  @@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
10
10
  @@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
11
11
  'Date', 'Content-Type', 'Authorization'].sort!.freeze
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: connect-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ingenico ePayments
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-15 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient