onlinepayments-sdk-ruby 3.2.0 → 3.5.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: 1625d5958e5373ae388278001a214ff4bf2b1f8b94839e0e8b35e1e71615442e
4
- data.tar.gz: 683427d180e452dc361475aafc16e1288c36b4d34d5999c435040de6c7dcda96
3
+ metadata.gz: 716c246b8a4ea8548e73e8c941989b813714367a15f37a7cc954ceb679a31107
4
+ data.tar.gz: 716b84eae40a2ea26fc05d1fcd7a54f9bbd1415302db69b585945aaa145d7aa1
5
5
  SHA512:
6
- metadata.gz: 8331bf3b75977e24338ccb862cf379a508ef529610a19acd7b2e2941d9347d75a93d3f22e1600c2326bfaaa35281b9093fbeee0365bf14e1969c6852b506f748
7
- data.tar.gz: 47e6a845f1962b64ec4c08c1aba7560b973a294f501d729139102aef2b68d23bd183fe6d64279a8207ad2dfb15f5fee759c2e03052b8c09915ef9159f58f3740
6
+ metadata.gz: 5c81e3b4bfd2b9d76eb2c18da50c11f477f4ef3abf59ed264cf40f70bdb98976df541f2423db924ac70a436ec0899781ab90aeb7b0de0d1d91efc9ac161910e8
7
+ data.tar.gz: 1b292d156441c3a7b86dcb6706397d5ef19a50059615a46f071bfa5a0401340c079c7a9f079403bc69303a45fd731be52ba1e5ce5e69d7d46d778149aaefc248
@@ -8,6 +8,7 @@ module OnlinePayments::SDK
8
8
 
9
9
  # @attr [String] category
10
10
  # @attr [String] code
11
+ # @attr [String] error_code
11
12
  # @attr [Integer] http_status_code
12
13
  # @attr [String] id
13
14
  # @attr [String] message
@@ -15,6 +16,7 @@ module OnlinePayments::SDK
15
16
  class APIError < OnlinePayments::SDK::DataObject
16
17
  attr_accessor :category
17
18
  attr_accessor :code
19
+ attr_accessor :error_code
18
20
  attr_accessor :http_status_code
19
21
  attr_accessor :id
20
22
  attr_accessor :message
@@ -25,6 +27,7 @@ module OnlinePayments::SDK
25
27
  hash = super
26
28
  hash['category'] = @category unless @category.nil?
27
29
  hash['code'] = @code unless @code.nil?
30
+ hash['errorCode'] = @error_code unless @error_code.nil?
28
31
  hash['httpStatusCode'] = @http_status_code unless @http_status_code.nil?
29
32
  hash['id'] = @id unless @id.nil?
30
33
  hash['message'] = @message unless @message.nil?
@@ -36,6 +39,7 @@ module OnlinePayments::SDK
36
39
  super
37
40
  @category = hash['category'] if hash.key? 'category'
38
41
  @code = hash['code'] if hash.key? 'code'
42
+ @error_code = hash['errorCode'] if hash.key? 'errorCode'
39
43
  @http_status_code = hash['httpStatusCode'] if hash.key? 'httpStatusCode'
40
44
  @id = hash['id'] if hash.key? 'id'
41
45
  @message = hash['message'] if hash.key? 'message'
@@ -5,6 +5,7 @@ require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/card'
6
6
  require 'onlinepayments/sdk/domain/card_recurrence_details'
7
7
  require 'onlinepayments/sdk/domain/payment_product130_specific_input'
8
+ require 'onlinepayments/sdk/domain/payment_product3012_specific_input'
8
9
  require 'onlinepayments/sdk/domain/three_d_secure'
9
10
 
10
11
  module OnlinePayments::SDK
@@ -15,6 +16,7 @@ module OnlinePayments::SDK
15
16
  # @attr [String] initial_scheme_transaction_id
16
17
  # @attr [true/false] is_recurring
17
18
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
19
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput] payment_product3012_specific_input
18
20
  # @attr [Integer] payment_product_id
19
21
  # @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
20
22
  # @attr [String] return_url
@@ -31,6 +33,7 @@ module OnlinePayments::SDK
31
33
  attr_accessor :initial_scheme_transaction_id
32
34
  attr_accessor :is_recurring
33
35
  attr_accessor :payment_product130_specific_input
36
+ attr_accessor :payment_product3012_specific_input
34
37
  attr_accessor :payment_product_id
35
38
  attr_accessor :recurring
36
39
  attr_accessor :return_url
@@ -50,6 +53,7 @@ module OnlinePayments::SDK
50
53
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
51
54
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
52
55
  hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
56
+ hash['paymentProduct3012SpecificInput'] = @payment_product3012_specific_input.to_h if @payment_product3012_specific_input
53
57
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
54
58
  hash['recurring'] = @recurring.to_h if @recurring
55
59
  hash['returnUrl'] = @return_url unless @return_url.nil?
@@ -76,6 +80,10 @@ module OnlinePayments::SDK
76
80
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
77
81
  @payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
78
82
  end
83
+ if hash.key? 'paymentProduct3012SpecificInput'
84
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3012SpecificInput']] unless hash['paymentProduct3012SpecificInput'].is_a? Hash
85
+ @payment_product3012_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput.new_from_hash(hash['paymentProduct3012SpecificInput'])
86
+ end
79
87
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
80
88
  if hash.key? 'recurring'
81
89
  raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
@@ -4,6 +4,7 @@
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/card_recurrence_details'
6
6
  require 'onlinepayments/sdk/domain/payment_product130_specific_input'
7
+ require 'onlinepayments/sdk/domain/payment_product3012_specific_input'
7
8
  require 'onlinepayments/sdk/domain/payment_product5100_specific_input'
8
9
  require 'onlinepayments/sdk/domain/three_d_secure_base'
9
10
 
@@ -13,6 +14,7 @@ module OnlinePayments::SDK
13
14
  # @attr [String] authorization_mode
14
15
  # @attr [String] initial_scheme_transaction_id
15
16
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
17
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput] payment_product3012_specific_input
16
18
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput] payment_product5100_specific_input
17
19
  # @attr [Integer] payment_product_id
18
20
  # @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
@@ -26,6 +28,7 @@ module OnlinePayments::SDK
26
28
  attr_accessor :authorization_mode
27
29
  attr_accessor :initial_scheme_transaction_id
28
30
  attr_accessor :payment_product130_specific_input
31
+ attr_accessor :payment_product3012_specific_input
29
32
  attr_accessor :payment_product5100_specific_input
30
33
  attr_accessor :payment_product_id
31
34
  attr_accessor :recurring
@@ -42,6 +45,7 @@ module OnlinePayments::SDK
42
45
  hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
43
46
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
44
47
  hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
48
+ hash['paymentProduct3012SpecificInput'] = @payment_product3012_specific_input.to_h if @payment_product3012_specific_input
45
49
  hash['paymentProduct5100SpecificInput'] = @payment_product5100_specific_input.to_h if @payment_product5100_specific_input
46
50
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
47
51
  hash['recurring'] = @recurring.to_h if @recurring
@@ -62,6 +66,10 @@ module OnlinePayments::SDK
62
66
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
63
67
  @payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
64
68
  end
69
+ if hash.key? 'paymentProduct3012SpecificInput'
70
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3012SpecificInput']] unless hash['paymentProduct3012SpecificInput'].is_a? Hash
71
+ @payment_product3012_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput.new_from_hash(hash['paymentProduct3012SpecificInput'])
72
+ end
65
73
  if hash.key? 'paymentProduct5100SpecificInput'
66
74
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5100SpecificInput']] unless hash['paymentProduct5100SpecificInput'].is_a? Hash
67
75
  @payment_product5100_specific_input = OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput.new_from_hash(hash['paymentProduct5100SpecificInput'])
@@ -0,0 +1,26 @@
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] ip_address_country_code
10
+ class CustomerDeviceOutput < OnlinePayments::SDK::DataObject
11
+ attr_accessor :ip_address_country_code
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['ipAddressCountryCode'] = @ip_address_country_code unless @ip_address_country_code.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ @ip_address_country_code = hash['ipAddressCountryCode'] if hash.key? 'ipAddressCountryCode'
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/customer_device_output'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::CustomerDeviceOutput] device
11
+ class CustomerOutput < OnlinePayments::SDK::DataObject
12
+ attr_accessor :device
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['device'] = @device.to_h if @device
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.key? 'device'
24
+ raise TypeError, "value '%s' is not a Hash" % [hash['device']] unless hash['device'].is_a? Hash
25
+ @device = OnlinePayments::SDK::Domain::CustomerDeviceOutput.new_from_hash(hash['device'])
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -4,6 +4,7 @@
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/amount_of_money'
6
6
  require 'onlinepayments/sdk/domain/card_payment_method_specific_output'
7
+ require 'onlinepayments/sdk/domain/customer_output'
7
8
  require 'onlinepayments/sdk/domain/mobile_payment_method_specific_output'
8
9
  require 'onlinepayments/sdk/domain/payment_references'
9
10
  require 'onlinepayments/sdk/domain/redirect_payment_method_specific_output'
@@ -15,6 +16,7 @@ module OnlinePayments::SDK
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
19
+ # @attr [OnlinePayments::SDK::Domain::CustomerOutput] customer
18
20
  # @attr [String] merchant_parameters
19
21
  # @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificOutput] mobile_payment_method_specific_output
20
22
  # @attr [String] payment_method
@@ -25,6 +27,7 @@ module OnlinePayments::SDK
25
27
  attr_accessor :amount_of_money
26
28
  attr_accessor :amount_paid
27
29
  attr_accessor :card_payment_method_specific_output
30
+ attr_accessor :customer
28
31
  attr_accessor :merchant_parameters
29
32
  attr_accessor :mobile_payment_method_specific_output
30
33
  attr_accessor :payment_method
@@ -38,6 +41,7 @@ module OnlinePayments::SDK
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
44
+ hash['customer'] = @customer.to_h if @customer
41
45
  hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
42
46
  hash['mobilePaymentMethodSpecificOutput'] = @mobile_payment_method_specific_output.to_h if @mobile_payment_method_specific_output
43
47
  hash['paymentMethod'] = @payment_method unless @payment_method.nil?
@@ -58,6 +62,10 @@ module OnlinePayments::SDK
58
62
  raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificOutput']] unless hash['cardPaymentMethodSpecificOutput'].is_a? Hash
59
63
  @card_payment_method_specific_output = OnlinePayments::SDK::Domain::CardPaymentMethodSpecificOutput.new_from_hash(hash['cardPaymentMethodSpecificOutput'])
60
64
  end
65
+ if hash.key? 'customer'
66
+ raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash
67
+ @customer = OnlinePayments::SDK::Domain::CustomerOutput.new_from_hash(hash['customer'])
68
+ end
61
69
  @merchant_parameters = hash['merchantParameters'] if hash.key? 'merchantParameters'
62
70
  if hash.key? 'mobilePaymentMethodSpecificOutput'
63
71
  raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificOutput']] unless hash['mobilePaymentMethodSpecificOutput'].is_a? Hash
@@ -0,0 +1,30 @@
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 [true/false] force_authentication
10
+ # @attr [true/false] is_wip_transaction
11
+ class PaymentProduct3012SpecificInput < OnlinePayments::SDK::DataObject
12
+ attr_accessor :force_authentication
13
+ attr_accessor :is_wip_transaction
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['forceAuthentication'] = @force_authentication unless @force_authentication.nil?
19
+ hash['isWipTransaction'] = @is_wip_transaction unless @is_wip_transaction.nil?
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ @force_authentication = hash['forceAuthentication'] if hash.key? 'forceAuthentication'
26
+ @is_wip_transaction = hash['isWipTransaction'] if hash.key? 'isWipTransaction'
27
+ end
28
+ end
29
+ end
30
+ end
@@ -6,23 +6,63 @@ require 'onlinepayments/sdk/data_object'
6
6
  module OnlinePayments::SDK
7
7
  module Domain
8
8
 
9
+ # @attr [String] acs_transaction_id
10
+ # @attr [String] applied_exemption
11
+ # @attr [String] authentication_status
12
+ # @attr [String] cavv
13
+ # @attr [String] challenge_indicator
14
+ # @attr [String] ds_transaction_id
9
15
  # @attr [String] eci
16
+ # @attr [String] flow
17
+ # @attr [String] liability
18
+ # @attr [String] scheme_eci
19
+ # @attr [String] version
10
20
  # @attr [String] xid
11
21
  class ThreeDSecureResults < OnlinePayments::SDK::DataObject
22
+ attr_accessor :acs_transaction_id
23
+ attr_accessor :applied_exemption
24
+ attr_accessor :authentication_status
25
+ attr_accessor :cavv
26
+ attr_accessor :challenge_indicator
27
+ attr_accessor :ds_transaction_id
12
28
  attr_accessor :eci
29
+ attr_accessor :flow
30
+ attr_accessor :liability
31
+ attr_accessor :scheme_eci
32
+ attr_accessor :version
13
33
  attr_accessor :xid
14
34
 
15
35
  # @return (Hash)
16
36
  def to_h
17
37
  hash = super
38
+ hash['acsTransactionId'] = @acs_transaction_id unless @acs_transaction_id.nil?
39
+ hash['appliedExemption'] = @applied_exemption unless @applied_exemption.nil?
40
+ hash['authenticationStatus'] = @authentication_status unless @authentication_status.nil?
41
+ hash['cavv'] = @cavv unless @cavv.nil?
42
+ hash['challengeIndicator'] = @challenge_indicator unless @challenge_indicator.nil?
43
+ hash['dsTransactionId'] = @ds_transaction_id unless @ds_transaction_id.nil?
18
44
  hash['eci'] = @eci unless @eci.nil?
45
+ hash['flow'] = @flow unless @flow.nil?
46
+ hash['liability'] = @liability unless @liability.nil?
47
+ hash['schemeEci'] = @scheme_eci unless @scheme_eci.nil?
48
+ hash['version'] = @version unless @version.nil?
19
49
  hash['xid'] = @xid unless @xid.nil?
20
50
  hash
21
51
  end
22
52
 
23
53
  def from_hash(hash)
24
54
  super
55
+ @acs_transaction_id = hash['acsTransactionId'] if hash.key? 'acsTransactionId'
56
+ @applied_exemption = hash['appliedExemption'] if hash.key? 'appliedExemption'
57
+ @authentication_status = hash['authenticationStatus'] if hash.key? 'authenticationStatus'
58
+ @cavv = hash['cavv'] if hash.key? 'cavv'
59
+ @challenge_indicator = hash['challengeIndicator'] if hash.key? 'challengeIndicator'
60
+ @ds_transaction_id = hash['dsTransactionId'] if hash.key? 'dsTransactionId'
25
61
  @eci = hash['eci'] if hash.key? 'eci'
62
+ @flow = hash['flow'] if hash.key? 'flow'
63
+ @liability = hash['liability'] if hash.key? 'liability'
64
+ @scheme_eci = hash['schemeEci'] if hash.key? 'schemeEci'
65
+ @version = hash['version'] if hash.key? 'version'
26
66
  @xid = hash['xid'] if hash.key? 'xid'
27
67
  end
28
68
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'onlinepayments-sdk-ruby'
3
- spec.version = '3.2.0'
3
+ spec.version = '3.5.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: 3.2.0
4
+ version: 3.5.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-04-05 00:00:00.000000000 Z
11
+ date: 2022-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -200,6 +200,8 @@ files:
200
200
  - lib/onlinepayments/sdk/domain/customer_account.rb
201
201
  - lib/onlinepayments/sdk/domain/customer_account_authentication.rb
202
202
  - lib/onlinepayments/sdk/domain/customer_device.rb
203
+ - lib/onlinepayments/sdk/domain/customer_device_output.rb
204
+ - lib/onlinepayments/sdk/domain/customer_output.rb
203
205
  - lib/onlinepayments/sdk/domain/customer_payment_activity.rb
204
206
  - lib/onlinepayments/sdk/domain/customer_token.rb
205
207
  - lib/onlinepayments/sdk/domain/decrypted_payment_data.rb
@@ -258,6 +260,7 @@ files:
258
260
  - lib/onlinepayments/sdk/domain/payment_product.rb
259
261
  - lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb
260
262
  - lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb
263
+ - lib/onlinepayments/sdk/domain/payment_product3012_specific_input.rb
261
264
  - lib/onlinepayments/sdk/domain/payment_product302_specific_data.rb
262
265
  - lib/onlinepayments/sdk/domain/payment_product320_specific_data.rb
263
266
  - lib/onlinepayments/sdk/domain/payment_product5100_specific_input.rb