onlinepayments-sdk-ruby 4.0.0 → 4.2.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: 798ac2c299201457114d254ca4dd555af4ece6e3c0e9835f23dc7034f00565df
4
- data.tar.gz: f75a681a88a307aafe5562ae4c23e0be5efd1ab8ef8c94ff8a5b84abc0b87768
3
+ metadata.gz: 509ed0abebf4ad014fa56a0f78bb28245b91f1f9e768613b6d40145640f0b19c
4
+ data.tar.gz: c94f23d76e3c39c079657b4d277d5d633548f479f1817f699a4afbda470dc7c8
5
5
  SHA512:
6
- metadata.gz: 28cbab7009596844bcb2ef116155c6243a4c8457c747f544d0eed3a6a3b9bbb7c56d996f438b5e33143605441d39d01a7b4febfbd89338faeed2fb31f16dfd18
7
- data.tar.gz: 81abd4440383843dcb5afb318eeed0c5e7e5af61d061fdf9758d0d03661e936df2ed97b258aef4d56a1926ad73547425b79c0304e49693571ada27c2fc5c371c
6
+ metadata.gz: 3aa613d5462be0fd784eca17354a4836d409184e72d1297b92995eeda6deafc9b653926b72053a1ea8981a8a5c4fef2720e17a65c7d45a7ed74e0cef76605c25
7
+ data.tar.gz: 3f3f5d2d9954fb0b9677080c80e278a4d59223826cdeefa063eb464f0423d448d7c94de3f79082d41d7a9ae3611eec9ad966e170ba42b68c6d11f045634f2ed8
@@ -12,6 +12,7 @@ require 'onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_out
12
12
  module OnlinePayments::SDK
13
13
  module Domain
14
14
 
15
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] acquired_amount
15
16
  # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
16
17
  # @attr [Long] amount_paid
17
18
  # @attr [OnlinePayments::SDK::Domain::CardPaymentMethodSpecificOutput] card_payment_method_specific_output
@@ -22,6 +23,7 @@ module OnlinePayments::SDK
22
23
  # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
23
24
  # @attr [OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput] sepa_direct_debit_payment_method_specific_output
24
25
  class CaptureOutput < OnlinePayments::SDK::DataObject
26
+ attr_accessor :acquired_amount
25
27
  attr_accessor :amount_of_money
26
28
  attr_accessor :amount_paid
27
29
  attr_accessor :card_payment_method_specific_output
@@ -35,6 +37,7 @@ module OnlinePayments::SDK
35
37
  # @return (Hash)
36
38
  def to_h
37
39
  hash = super
40
+ hash['acquiredAmount'] = @acquired_amount.to_h if @acquired_amount
38
41
  hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
39
42
  hash['amountPaid'] = @amount_paid unless @amount_paid.nil?
40
43
  hash['cardPaymentMethodSpecificOutput'] = @card_payment_method_specific_output.to_h if @card_payment_method_specific_output
@@ -49,6 +52,10 @@ module OnlinePayments::SDK
49
52
 
50
53
  def from_hash(hash)
51
54
  super
55
+ if hash.key? 'acquiredAmount'
56
+ raise TypeError, "value '%s' is not a Hash" % [hash['acquiredAmount']] unless hash['acquiredAmount'].is_a? Hash
57
+ @acquired_amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['acquiredAmount'])
58
+ end
52
59
  if hash.key? 'amountOfMoney'
53
60
  raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
54
61
  @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
@@ -18,6 +18,7 @@ module OnlinePayments::SDK
18
18
  # @attr [String] initial_scheme_transaction_id
19
19
  # @attr [String] payment_option
20
20
  # @attr [Integer] payment_product_id
21
+ # @attr [String] scheme_reference_data
21
22
  # @attr [OnlinePayments::SDK::Domain::ThreeDSecureResults] three_d_secure_results
22
23
  # @attr [String] token
23
24
  class CardPaymentMethodSpecificOutput < OnlinePayments::SDK::DataObject
@@ -29,6 +30,7 @@ module OnlinePayments::SDK
29
30
  attr_accessor :initial_scheme_transaction_id
30
31
  attr_accessor :payment_option
31
32
  attr_accessor :payment_product_id
33
+ attr_accessor :scheme_reference_data
32
34
  attr_accessor :three_d_secure_results
33
35
  attr_accessor :token
34
36
 
@@ -43,6 +45,7 @@ module OnlinePayments::SDK
43
45
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
44
46
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
45
47
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
48
+ hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
46
49
  hash['threeDSecureResults'] = @three_d_secure_results.to_h if @three_d_secure_results
47
50
  hash['token'] = @token unless @token.nil?
48
51
  hash
@@ -67,6 +70,7 @@ module OnlinePayments::SDK
67
70
  @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
68
71
  @payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
69
72
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
73
+ @scheme_reference_data = hash['schemeReferenceData'] if hash.key? 'schemeReferenceData'
70
74
  if hash.key? 'threeDSecureResults'
71
75
  raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecureResults']] unless hash['threeDSecureResults'].is_a? Hash
72
76
  @three_d_secure_results = OnlinePayments::SDK::Domain::ThreeDSecureResults.new_from_hash(hash['threeDSecureResults'])
@@ -12,6 +12,7 @@ module OnlinePayments::SDK
12
12
  # @attr [String] cavv_algorithm
13
13
  # @attr [String] directory_server_transaction_id
14
14
  # @attr [Integer] eci
15
+ # @attr [String] flow
15
16
  # @attr [Integer] scheme_risk_score
16
17
  # @attr [String] three_d_secure_version
17
18
  # @attr [String] xid
@@ -22,6 +23,7 @@ module OnlinePayments::SDK
22
23
  attr_accessor :cavv_algorithm
23
24
  attr_accessor :directory_server_transaction_id
24
25
  attr_accessor :eci
26
+ attr_accessor :flow
25
27
  attr_accessor :scheme_risk_score
26
28
  attr_accessor :three_d_secure_version
27
29
  attr_accessor :xid
@@ -35,6 +37,7 @@ module OnlinePayments::SDK
35
37
  hash['cavvAlgorithm'] = @cavv_algorithm unless @cavv_algorithm.nil?
36
38
  hash['directoryServerTransactionId'] = @directory_server_transaction_id unless @directory_server_transaction_id.nil?
37
39
  hash['eci'] = @eci unless @eci.nil?
40
+ hash['flow'] = @flow unless @flow.nil?
38
41
  hash['schemeRiskScore'] = @scheme_risk_score unless @scheme_risk_score.nil?
39
42
  hash['threeDSecureVersion'] = @three_d_secure_version unless @three_d_secure_version.nil?
40
43
  hash['xid'] = @xid unless @xid.nil?
@@ -49,6 +52,7 @@ module OnlinePayments::SDK
49
52
  @cavv_algorithm = hash['cavvAlgorithm'] if hash.key? 'cavvAlgorithm'
50
53
  @directory_server_transaction_id = hash['directoryServerTransactionId'] if hash.key? 'directoryServerTransactionId'
51
54
  @eci = hash['eci'] if hash.key? 'eci'
55
+ @flow = hash['flow'] if hash.key? 'flow'
52
56
  @scheme_risk_score = hash['schemeRiskScore'] if hash.key? 'schemeRiskScore'
53
57
  @three_d_secure_version = hash['threeDSecureVersion'] if hash.key? 'threeDSecureVersion'
54
58
  @xid = hash['xid'] if hash.key? 'xid'
@@ -8,15 +8,18 @@ module OnlinePayments::SDK
8
8
 
9
9
  # @attr [String] black_list_data
10
10
  # @attr [String] customer_ip_address
11
+ # @attr [Array<String>] product_categories
11
12
  class FraudFields < OnlinePayments::SDK::DataObject
12
13
  attr_accessor :black_list_data
13
14
  attr_accessor :customer_ip_address
15
+ attr_accessor :product_categories
14
16
 
15
17
  # @return (Hash)
16
18
  def to_h
17
19
  hash = super
18
20
  hash['blackListData'] = @black_list_data unless @black_list_data.nil?
19
21
  hash['customerIpAddress'] = @customer_ip_address unless @customer_ip_address.nil?
22
+ hash['productCategories'] = @product_categories unless @product_categories.nil?
20
23
  hash
21
24
  end
22
25
 
@@ -24,6 +27,13 @@ module OnlinePayments::SDK
24
27
  super
25
28
  @black_list_data = hash['blackListData'] if hash.key? 'blackListData'
26
29
  @customer_ip_address = hash['customerIpAddress'] if hash.key? 'customerIpAddress'
30
+ if hash.key? 'productCategories'
31
+ raise TypeError, "value '%s' is not an Array" % [hash['productCategories']] unless hash['productCategories'].is_a? Array
32
+ @product_categories = []
33
+ hash['productCategories'].each do |e|
34
+ @product_categories << e
35
+ end
36
+ end
27
37
  end
28
38
  end
29
39
  end
@@ -13,6 +13,7 @@ require 'onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_out
13
13
  module OnlinePayments::SDK
14
14
  module Domain
15
15
 
16
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] acquired_amount
16
17
  # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
17
18
  # @attr [Long] amount_paid
18
19
  # @attr [OnlinePayments::SDK::Domain::CardPaymentMethodSpecificOutput] card_payment_method_specific_output
@@ -24,6 +25,7 @@ module OnlinePayments::SDK
24
25
  # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
25
26
  # @attr [OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput] sepa_direct_debit_payment_method_specific_output
26
27
  class PaymentOutput < OnlinePayments::SDK::DataObject
28
+ attr_accessor :acquired_amount
27
29
  attr_accessor :amount_of_money
28
30
  attr_accessor :amount_paid
29
31
  attr_accessor :card_payment_method_specific_output
@@ -38,6 +40,7 @@ module OnlinePayments::SDK
38
40
  # @return (Hash)
39
41
  def to_h
40
42
  hash = super
43
+ hash['acquiredAmount'] = @acquired_amount.to_h if @acquired_amount
41
44
  hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
42
45
  hash['amountPaid'] = @amount_paid unless @amount_paid.nil?
43
46
  hash['cardPaymentMethodSpecificOutput'] = @card_payment_method_specific_output.to_h if @card_payment_method_specific_output
@@ -53,6 +56,10 @@ module OnlinePayments::SDK
53
56
 
54
57
  def from_hash(hash)
55
58
  super
59
+ if hash.key? 'acquiredAmount'
60
+ raise TypeError, "value '%s' is not a Hash" % [hash['acquiredAmount']] unless hash['acquiredAmount'].is_a? Hash
61
+ @acquired_amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['acquiredAmount'])
62
+ end
56
63
  if hash.key? 'amountOfMoney'
57
64
  raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
58
65
  @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
@@ -3,6 +3,7 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/address_personal'
6
+ require 'onlinepayments/sdk/domain/shipping_method'
6
7
 
7
8
  module OnlinePayments::SDK
8
9
  module Domain
@@ -12,6 +13,7 @@ module OnlinePayments::SDK
12
13
  # @attr [String] email_address
13
14
  # @attr [String] first_usage_date
14
15
  # @attr [true/false] is_first_usage
16
+ # @attr [OnlinePayments::SDK::Domain::ShippingMethod] method
15
17
  # @attr [Long] shipping_cost
16
18
  # @attr [Long] shipping_cost_tax
17
19
  # @attr [String] type
@@ -21,6 +23,7 @@ module OnlinePayments::SDK
21
23
  attr_accessor :email_address
22
24
  attr_accessor :first_usage_date
23
25
  attr_accessor :is_first_usage
26
+ attr_accessor :method
24
27
  attr_accessor :shipping_cost
25
28
  attr_accessor :shipping_cost_tax
26
29
  attr_accessor :type
@@ -33,6 +36,7 @@ module OnlinePayments::SDK
33
36
  hash['emailAddress'] = @email_address unless @email_address.nil?
34
37
  hash['firstUsageDate'] = @first_usage_date unless @first_usage_date.nil?
35
38
  hash['isFirstUsage'] = @is_first_usage unless @is_first_usage.nil?
39
+ hash['method'] = @method.to_h if @method
36
40
  hash['shippingCost'] = @shipping_cost unless @shipping_cost.nil?
37
41
  hash['shippingCostTax'] = @shipping_cost_tax unless @shipping_cost_tax.nil?
38
42
  hash['type'] = @type unless @type.nil?
@@ -49,6 +53,10 @@ module OnlinePayments::SDK
49
53
  @email_address = hash['emailAddress'] if hash.key? 'emailAddress'
50
54
  @first_usage_date = hash['firstUsageDate'] if hash.key? 'firstUsageDate'
51
55
  @is_first_usage = hash['isFirstUsage'] if hash.key? 'isFirstUsage'
56
+ if hash.key? 'method'
57
+ raise TypeError, "value '%s' is not a Hash" % [hash['method']] unless hash['method'].is_a? Hash
58
+ @method = OnlinePayments::SDK::Domain::ShippingMethod.new_from_hash(hash['method'])
59
+ end
52
60
  @shipping_cost = hash['shippingCost'] if hash.key? 'shippingCost'
53
61
  @shipping_cost_tax = hash['shippingCostTax'] if hash.key? 'shippingCostTax'
54
62
  @type = hash['type'] if hash.key? 'type'
@@ -0,0 +1,38 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] details
10
+ # @attr [String] name
11
+ # @attr [Integer] speed
12
+ # @attr [String] type
13
+ class ShippingMethod < OnlinePayments::SDK::DataObject
14
+ attr_accessor :details
15
+ attr_accessor :name
16
+ attr_accessor :speed
17
+ attr_accessor :type
18
+
19
+ # @return (Hash)
20
+ def to_h
21
+ hash = super
22
+ hash['details'] = @details unless @details.nil?
23
+ hash['name'] = @name unless @name.nil?
24
+ hash['speed'] = @speed unless @speed.nil?
25
+ hash['type'] = @type unless @type.nil?
26
+ hash
27
+ end
28
+
29
+ def from_hash(hash)
30
+ super
31
+ @details = hash['details'] if hash.key? 'details'
32
+ @name = hash['name'] if hash.key? 'name'
33
+ @speed = hash['speed'] if hash.key? 'speed'
34
+ @type = hash['type'] if hash.key? 'type'
35
+ end
36
+ end
37
+ end
38
+ end
@@ -13,6 +13,7 @@ module OnlinePayments::SDK
13
13
  # @attr [String] challenge_indicator
14
14
  # @attr [String] ds_transaction_id
15
15
  # @attr [String] eci
16
+ # @attr [String] exemption_engine_flow
16
17
  # @attr [String] flow
17
18
  # @attr [String] liability
18
19
  # @attr [String] scheme_eci
@@ -26,6 +27,7 @@ module OnlinePayments::SDK
26
27
  attr_accessor :challenge_indicator
27
28
  attr_accessor :ds_transaction_id
28
29
  attr_accessor :eci
30
+ attr_accessor :exemption_engine_flow
29
31
  attr_accessor :flow
30
32
  attr_accessor :liability
31
33
  attr_accessor :scheme_eci
@@ -42,6 +44,7 @@ module OnlinePayments::SDK
42
44
  hash['challengeIndicator'] = @challenge_indicator unless @challenge_indicator.nil?
43
45
  hash['dsTransactionId'] = @ds_transaction_id unless @ds_transaction_id.nil?
44
46
  hash['eci'] = @eci unless @eci.nil?
47
+ hash['exemptionEngineFlow'] = @exemption_engine_flow unless @exemption_engine_flow.nil?
45
48
  hash['flow'] = @flow unless @flow.nil?
46
49
  hash['liability'] = @liability unless @liability.nil?
47
50
  hash['schemeEci'] = @scheme_eci unless @scheme_eci.nil?
@@ -59,6 +62,7 @@ module OnlinePayments::SDK
59
62
  @challenge_indicator = hash['challengeIndicator'] if hash.key? 'challengeIndicator'
60
63
  @ds_transaction_id = hash['dsTransactionId'] if hash.key? 'dsTransactionId'
61
64
  @eci = hash['eci'] if hash.key? 'eci'
65
+ @exemption_engine_flow = hash['exemptionEngineFlow'] if hash.key? 'exemptionEngineFlow'
62
66
  @flow = hash['flow'] if hash.key? 'flow'
63
67
  @liability = hash['liability'] if hash.key? 'liability'
64
68
  @scheme_eci = hash['schemeEci'] if hash.key? 'schemeEci'
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'onlinepayments-sdk-ruby'
3
- spec.version = '4.0.0'
3
+ spec.version = '4.2.0'
4
4
  spec.authors = ['Worldline Direct support team']
5
5
  spec.email = ['82139942+worldline-direct-support-team@users.noreply.github.com']
6
6
  spec.summary = %q{SDK to communicate with the Online Payments platform using the Online Payments Server API}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlinepayments-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Worldline Direct support team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-12 00:00:00.000000000 Z
11
+ date: 2022-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -323,6 +323,7 @@ files:
323
323
  - lib/onlinepayments/sdk/domain/session_request.rb
324
324
  - lib/onlinepayments/sdk/domain/session_response.rb
325
325
  - lib/onlinepayments/sdk/domain/shipping.rb
326
+ - lib/onlinepayments/sdk/domain/shipping_method.rb
326
327
  - lib/onlinepayments/sdk/domain/shopping_cart.rb
327
328
  - lib/onlinepayments/sdk/domain/shopping_cart_extension.rb
328
329
  - lib/onlinepayments/sdk/domain/test_connection.rb