connect-sdk-ruby 1.4.0 → 1.5.0

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: 92ddf530c4bc8aa130d7e3acc9f18d9412501fe7
4
- data.tar.gz: 4f4578b92ff0744963e8fca3dba64e687cbc6786
3
+ metadata.gz: 1fbce0636a60191953016983f15d8e0a3f02347e
4
+ data.tar.gz: 5676833dcc4cd193c438d52cf3ba4dd3b867db89
5
5
  SHA512:
6
- metadata.gz: c8614190aa2d58a914400ef6cb03dfe1ddfffd7586d07b8552aaba7328b6a9cc4a9ddac0d777d6e973e446056430535fe7cc444bf58b4890bac777537fd621fc
7
- data.tar.gz: 1c651bc294c6636724a7a2c9ef11fd69158becf45e6f136fb2da2d790fff856a150a61a65953b01ea3772216359798eec956153f6b6dc4d10ef5418133882d1d
6
+ metadata.gz: 25c09dbb1b0906082d3523e86710d36356272864b1a6d53d336ff1c15451025afa6d2773ffd77401dcc74970780e610f4047030cecd2ff315e86010cf40263cd
7
+ data.tar.gz: 7ad7c5a3edfff7dc69feb9ff095dd977f17cdff43c11269a21cf389ae8b9960c580faf78035d7586492f1410555a3e70f52b962b949c38407ed0aecd06341971
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '1.4.0'
3
+ spec.version = '1.5.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 GlobalCollect platform using the Ingenico Connect Server API}
@@ -18,6 +18,8 @@ module Ingenico::Connect::SDK
18
18
  attr_accessor :airline_data
19
19
 
20
20
  # {Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData}
21
+ #
22
+ # Deprecated; Use Order.shoppingCart instead
21
23
  attr_accessor :level3_summary_data
22
24
 
23
25
  # Integer
@@ -0,0 +1,39 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Payment
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_AmountBreakdown AmountBreakdown}
12
+ class AmountBreakdown < Ingenico::Connect::SDK::DataObject
13
+
14
+ # Integer
15
+ attr_accessor :amount
16
+
17
+ # String
18
+ attr_accessor :type
19
+
20
+ def to_h
21
+ hash = super
22
+ add_to_hash(hash, 'amount', @amount)
23
+ add_to_hash(hash, 'type', @type)
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ if hash.has_key?('amount')
30
+ @amount = hash['amount']
31
+ end
32
+ if hash.has_key?('type')
33
+ @type = hash['type']
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -9,15 +9,23 @@ module Ingenico::Connect::SDK
9
9
  module Payment
10
10
 
11
11
  # Class {https://developer.globalcollect.com/documentation/api/server/#schema_Level3SummaryData Level3SummaryData}
12
+ #
13
+ # Deprecated; Use ShoppingCart instead
12
14
  class Level3SummaryData < Ingenico::Connect::SDK::DataObject
13
15
 
14
16
  # Integer
17
+ #
18
+ # Deprecated; Use ShoppingCart.discountAmount instead
15
19
  attr_accessor :discount_amount
16
20
 
17
21
  # Integer
22
+ #
23
+ # Deprecated; Use ShoppingCart.dutyAmount instead
18
24
  attr_accessor :duty_amount
19
25
 
20
26
  # Integer
27
+ #
28
+ # Deprecated; Use ShoppingCart.shippingAmount instead
21
29
  attr_accessor :shipping_amount
22
30
 
23
31
  def to_h
@@ -6,6 +6,7 @@ require 'ingenico/connect/sdk/data_object'
6
6
  require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
7
7
  require 'ingenico/connect/sdk/domain/payment/line_item_invoice_data'
8
8
  require 'ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information'
9
+ require 'ingenico/connect/sdk/domain/payment/order_line_details'
9
10
 
10
11
  module Ingenico::Connect::SDK
11
12
  module Domain
@@ -21,13 +22,19 @@ module Ingenico::Connect::SDK
21
22
  attr_accessor :invoice_data
22
23
 
23
24
  # {Ingenico::Connect::SDK::Domain::Payment::LineItemLevel3InterchangeInformation}
25
+ #
26
+ # Deprecated; Use orderLineDetails instead
24
27
  attr_accessor :level3_interchange_information
25
28
 
29
+ # {Ingenico::Connect::SDK::Domain::Payment::OrderLineDetails}
30
+ attr_accessor :order_line_details
31
+
26
32
  def to_h
27
33
  hash = super
28
34
  add_to_hash(hash, 'amountOfMoney', @amount_of_money)
29
35
  add_to_hash(hash, 'invoiceData', @invoice_data)
30
36
  add_to_hash(hash, 'level3InterchangeInformation', @level3_interchange_information)
37
+ add_to_hash(hash, 'orderLineDetails', @order_line_details)
31
38
  hash
32
39
  end
33
40
 
@@ -51,6 +58,12 @@ module Ingenico::Connect::SDK
51
58
  end
52
59
  @level3_interchange_information = Ingenico::Connect::SDK::Domain::Payment::LineItemLevel3InterchangeInformation.new_from_hash(hash['level3InterchangeInformation'])
53
60
  end
61
+ if hash.has_key?('orderLineDetails')
62
+ if !(hash['orderLineDetails'].is_a? Hash)
63
+ raise TypeError, "value '%s' is not a Hash" % [hash['orderLineDetails']]
64
+ end
65
+ @order_line_details = Ingenico::Connect::SDK::Domain::Payment::OrderLineDetails.new_from_hash(hash['orderLineDetails'])
66
+ end
54
67
  end
55
68
  end
56
69
  end
@@ -8,6 +8,7 @@ require 'ingenico/connect/sdk/domain/payment/additional_order_input'
8
8
  require 'ingenico/connect/sdk/domain/payment/customer'
9
9
  require 'ingenico/connect/sdk/domain/payment/line_item'
10
10
  require 'ingenico/connect/sdk/domain/payment/order_references'
11
+ require 'ingenico/connect/sdk/domain/payment/shopping_cart'
11
12
 
12
13
  module Ingenico::Connect::SDK
13
14
  module Domain
@@ -31,6 +32,9 @@ module Ingenico::Connect::SDK
31
32
  # {Ingenico::Connect::SDK::Domain::Payment::OrderReferences}
32
33
  attr_accessor :references
33
34
 
35
+ # {Ingenico::Connect::SDK::Domain::Payment::ShoppingCart}
36
+ attr_accessor :shopping_cart
37
+
34
38
  def to_h
35
39
  hash = super
36
40
  add_to_hash(hash, 'additionalInput', @additional_input)
@@ -38,6 +42,7 @@ module Ingenico::Connect::SDK
38
42
  add_to_hash(hash, 'customer', @customer)
39
43
  add_to_hash(hash, 'items', @items)
40
44
  add_to_hash(hash, 'references', @references)
45
+ add_to_hash(hash, 'shoppingCart', @shopping_cart)
41
46
  hash
42
47
  end
43
48
 
@@ -76,6 +81,12 @@ module Ingenico::Connect::SDK
76
81
  end
77
82
  @references = Ingenico::Connect::SDK::Domain::Payment::OrderReferences.new_from_hash(hash['references'])
78
83
  end
84
+ if hash.has_key?('shoppingCart')
85
+ if !(hash['shoppingCart'].is_a? Hash)
86
+ raise TypeError, "value '%s' is not a Hash" % [hash['shoppingCart']]
87
+ end
88
+ @shopping_cart = Ingenico::Connect::SDK::Domain::Payment::ShoppingCart.new_from_hash(hash['shoppingCart'])
89
+ end
79
90
  end
80
91
  end
81
92
  end
@@ -0,0 +1,81 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Payment
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_OrderLineDetails OrderLineDetails}
12
+ class OrderLineDetails < Ingenico::Connect::SDK::DataObject
13
+
14
+ # Integer
15
+ attr_accessor :discount_amount
16
+
17
+ # Integer
18
+ attr_accessor :line_amount_total
19
+
20
+ # String
21
+ attr_accessor :product_code
22
+
23
+ # Integer
24
+ attr_accessor :product_price
25
+
26
+ # String
27
+ attr_accessor :product_type
28
+
29
+ # Integer
30
+ attr_accessor :quantity
31
+
32
+ # Integer
33
+ attr_accessor :tax_amount
34
+
35
+ # String
36
+ attr_accessor :unit
37
+
38
+ def to_h
39
+ hash = super
40
+ add_to_hash(hash, 'discountAmount', @discount_amount)
41
+ add_to_hash(hash, 'lineAmountTotal', @line_amount_total)
42
+ add_to_hash(hash, 'productCode', @product_code)
43
+ add_to_hash(hash, 'productPrice', @product_price)
44
+ add_to_hash(hash, 'productType', @product_type)
45
+ add_to_hash(hash, 'quantity', @quantity)
46
+ add_to_hash(hash, 'taxAmount', @tax_amount)
47
+ add_to_hash(hash, 'unit', @unit)
48
+ hash
49
+ end
50
+
51
+ def from_hash(hash)
52
+ super
53
+ if hash.has_key?('discountAmount')
54
+ @discount_amount = hash['discountAmount']
55
+ end
56
+ if hash.has_key?('lineAmountTotal')
57
+ @line_amount_total = hash['lineAmountTotal']
58
+ end
59
+ if hash.has_key?('productCode')
60
+ @product_code = hash['productCode']
61
+ end
62
+ if hash.has_key?('productPrice')
63
+ @product_price = hash['productPrice']
64
+ end
65
+ if hash.has_key?('productType')
66
+ @product_type = hash['productType']
67
+ end
68
+ if hash.has_key?('quantity')
69
+ @quantity = hash['quantity']
70
+ end
71
+ if hash.has_key?('taxAmount')
72
+ @tax_amount = hash['taxAmount']
73
+ end
74
+ if hash.has_key?('unit')
75
+ @unit = hash['unit']
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
@@ -11,6 +11,9 @@ module Ingenico::Connect::SDK
11
11
  # Class {https://developer.globalcollect.com/documentation/api/server/#schema_RedirectPaymentMethodSpecificInputBase RedirectPaymentMethodSpecificInputBase}
12
12
  class RedirectPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
13
13
 
14
+ # Integer
15
+ attr_accessor :expiration_period
16
+
14
17
  # String
15
18
  attr_accessor :recurring_payment_sequence_indicator
16
19
 
@@ -19,6 +22,7 @@ module Ingenico::Connect::SDK
19
22
 
20
23
  def to_h
21
24
  hash = super
25
+ add_to_hash(hash, 'expirationPeriod', @expiration_period)
22
26
  add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
23
27
  add_to_hash(hash, 'token', @token)
24
28
  hash
@@ -26,6 +30,9 @@ module Ingenico::Connect::SDK
26
30
 
27
31
  def from_hash(hash)
28
32
  super
33
+ if hash.has_key?('expirationPeriod')
34
+ @expiration_period = hash['expirationPeriod']
35
+ end
29
36
  if hash.has_key?('recurringPaymentSequenceIndicator')
30
37
  @recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
31
38
  end
@@ -12,6 +12,8 @@ module Ingenico::Connect::SDK
12
12
  class RedirectPaymentProduct809SpecificInput < Ingenico::Connect::SDK::DataObject
13
13
 
14
14
  # String
15
+ #
16
+ # Deprecated; Use RedirectPaymentMethodSpecificInput.expirationPeriod instead
15
17
  attr_accessor :expiration_period
16
18
 
17
19
  # String
@@ -0,0 +1,39 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+ require 'ingenico/connect/sdk/domain/payment/amount_breakdown'
7
+
8
+ module Ingenico::Connect::SDK
9
+ module Domain
10
+ module Payment
11
+
12
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_ShoppingCart ShoppingCart}
13
+ class ShoppingCart < Ingenico::Connect::SDK::DataObject
14
+
15
+ # Array of {Ingenico::Connect::SDK::Domain::Payment::AmountBreakdown}
16
+ attr_accessor :amount_breakdown
17
+
18
+ def to_h
19
+ hash = super
20
+ add_to_hash(hash, 'amountBreakdown', @amount_breakdown)
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ if hash.has_key?('amountBreakdown')
27
+ if !(hash['amountBreakdown'].is_a? Array)
28
+ raise TypeError, "value '%s' is not an Array" % [hash['amountBreakdown']]
29
+ end
30
+ @amount_breakdown = []
31
+ hash['amountBreakdown'].each do |e|
32
+ @amount_breakdown << Ingenico::Connect::SDK::Domain::Payment::AmountBreakdown.new_from_hash(e)
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -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.4.0'
8
+ @@SDK_VERSION = '1.5.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.4.0
4
+ version: 1.5.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: 2017-03-23 00:00:00.000000000 Z
11
+ date: 2017-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -208,6 +208,7 @@ files:
208
208
  - lib/ingenico/connect/sdk/domain/payment/abstract_payment_method_specific_output.rb
209
209
  - lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb
210
210
  - lib/ingenico/connect/sdk/domain/payment/address_personal.rb
211
+ - lib/ingenico/connect/sdk/domain/payment/amount_breakdown.rb
211
212
  - lib/ingenico/connect/sdk/domain/payment/approve_payment_card_payment_method_specific_output.rb
212
213
  - lib/ingenico/connect/sdk/domain/payment/approve_payment_mobile_payment_method_specific_output.rb
213
214
  - lib/ingenico/connect/sdk/domain/payment/approve_payment_non_sepa_direct_debit_payment_method_specific_input.rb
@@ -253,6 +254,7 @@ files:
253
254
  - lib/ingenico/connect/sdk/domain/payment/order.rb
254
255
  - lib/ingenico/connect/sdk/domain/payment/order_approve_payment.rb
255
256
  - lib/ingenico/connect/sdk/domain/payment/order_invoice_data.rb
257
+ - lib/ingenico/connect/sdk/domain/payment/order_line_details.rb
256
258
  - lib/ingenico/connect/sdk/domain/payment/order_output.rb
257
259
  - lib/ingenico/connect/sdk/domain/payment/order_references.rb
258
260
  - lib/ingenico/connect/sdk/domain/payment/order_references_approve_payment.rb
@@ -288,6 +290,7 @@ files:
288
290
  - lib/ingenico/connect/sdk/domain/payment/refund_payment_product840_specific_output.rb
289
291
  - lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input.rb
290
292
  - lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_output.rb
293
+ - lib/ingenico/connect/sdk/domain/payment/shopping_cart.rb
291
294
  - lib/ingenico/connect/sdk/domain/payment/three_d_secure_results.rb
292
295
  - lib/ingenico/connect/sdk/domain/payment/tokenize_payment_request.rb
293
296
  - lib/ingenico/connect/sdk/domain/payout/approve_payout_request.rb