onlinepayments-sdk-ruby 5.0.0 → 6.0.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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/onlinepayments/sdk/communication/metadata_provider.rb +1 -1
  3. data/lib/onlinepayments/sdk/domain/account_on_file.rb +1 -1
  4. data/lib/onlinepayments/sdk/domain/cancel_payment_request.rb +9 -0
  5. data/lib/onlinepayments/sdk/domain/card_essentials.rb +100 -0
  6. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +9 -0
  7. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +18 -0
  8. data/lib/onlinepayments/sdk/domain/click_to_pay.rb +30 -0
  9. data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +7 -0
  10. data/lib/onlinepayments/sdk/domain/feedbacks.rb +12 -0
  11. data/lib/onlinepayments/sdk/domain/get_iin_details_response.rb +93 -0
  12. data/lib/onlinepayments/sdk/domain/iin_detail.rb +100 -0
  13. data/lib/onlinepayments/sdk/domain/merchant_action.rb +9 -0
  14. data/lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb +23 -0
  15. data/lib/onlinepayments/sdk/domain/network_token_data.rb +65 -0
  16. data/lib/onlinepayments/sdk/domain/operation_payment_references.rb +7 -0
  17. data/lib/onlinepayments/sdk/domain/order_references.rb +7 -0
  18. data/lib/onlinepayments/sdk/domain/payment_link_order_input.rb +1 -0
  19. data/lib/onlinepayments/sdk/domain/payment_link_response.rb +7 -0
  20. data/lib/onlinepayments/sdk/domain/payment_product3204_specific_output.rb +30 -0
  21. data/lib/onlinepayments/sdk/domain/payment_product5001.rb +37 -0
  22. data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +9 -0
  23. data/lib/onlinepayments/sdk/domain/payment_references.rb +7 -0
  24. data/lib/onlinepayments/sdk/domain/product320_recurring.rb +30 -0
  25. data/lib/onlinepayments/sdk/domain/reattempt_instructions.rb +46 -0
  26. data/lib/onlinepayments/sdk/domain/reattempt_instructions_conditions.rb +37 -0
  27. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +27 -0
  28. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb +9 -0
  29. data/lib/onlinepayments/sdk/domain/redirect_payment_product3204_specific_input.rb +37 -0
  30. data/lib/onlinepayments/sdk/domain/redirect_payment_product5001_specific_input.rb +7 -0
  31. data/lib/onlinepayments/sdk/domain/redirect_payment_product5300_specific_input.rb +3 -5
  32. data/lib/onlinepayments/sdk/domain/redirect_payment_product5402_specific_input.rb +30 -0
  33. data/lib/onlinepayments/sdk/domain/redirect_payment_product5403_specific_input.rb +30 -0
  34. data/lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb +1 -0
  35. data/lib/onlinepayments/sdk/domain/refund_request.rb +7 -0
  36. data/lib/onlinepayments/sdk/domain/revoke_mandate_request.rb +30 -0
  37. data/lib/onlinepayments/sdk/domain/show_form_data.rb +9 -0
  38. data/lib/onlinepayments/sdk/domain/show_instructions_data.rb +30 -0
  39. data/lib/onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input.rb +7 -0
  40. data/lib/onlinepayments/sdk/merchant/mandates/mandates_client.rb +3 -2
  41. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +1 -0
  42. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +1 -0
  43. data/onlinepayments-sdk-ruby.gemspec +1 -1
  44. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6dc4e740cbc9653b392253ba2f6266a6ca88f5b2721c029dfc2e11b08c3bea93
4
- data.tar.gz: 1d7f251e223133008f132baac2d771a4349744868ce381ab8d294333014beaa9
3
+ metadata.gz: d4c7c51ce06ee3c9e13435cb798349204820c8df80ee669bb84ce603a8d16ad8
4
+ data.tar.gz: a0a09fcd1647bcf2164e0f2c1a0f6f13cdd49cd8b107090b629b6494032977aa
5
5
  SHA512:
6
- metadata.gz: 206a8aec1a179fb3b3918f20c5e4aad8ff5737087de7194fffa7bc6ee6eaf09d44c5f87ee98f2436dd3b290359518678822367a1b09ef3d76cf1d674e739b4b1
7
- data.tar.gz: 93c319108e40291f2f5ae50acbe6df67e1000f77214008b70a81e5c7e1bc030e7286cd4b7139942bae39249139b6bdf398b57b7d526cc81bdad5ff5e014a2143
6
+ metadata.gz: fa585b83e2ae826c90527f70a8781e49655f4d92848054b1eaab9029d090b3c8b0366371dfdb5a1306468afaf7fbb58e38181015d61d173bdf4bad7a24b2cb1e
7
+ data.tar.gz: 4689e19579d5b07bb45fa5b9f509e2863e4e573e0e7e7366bda34e49cf9f350c434df1b232a9f3bd9c067e717d0ce71d6086d1d821638a46ca92ae7b9b7ec628
@@ -13,7 +13,7 @@ module OnlinePayments
13
13
  class MetadataProvider
14
14
  private
15
15
 
16
- SDK_VERSION = '5.0.0'.freeze
16
+ SDK_VERSION = '6.0.0'.freeze
17
17
  SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'.freeze
18
18
  PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key', 'Date', 'Content-Type', 'Authorization'].sort!.freeze
19
19
  CHARSET = 'utf-8'.freeze
@@ -10,7 +10,7 @@ module OnlinePayments
10
10
  module Domain
11
11
  # @attr [Array<OnlinePayments::SDK::Domain::AccountOnFileAttribute>] attributes
12
12
  # @attr [OnlinePayments::SDK::Domain::AccountOnFileDisplayHints] display_hints
13
- # @attr [Integer] id
13
+ # @attr [String] id
14
14
  # @attr [Integer] payment_product_id
15
15
  class AccountOnFile < OnlinePayments::SDK::Domain::DataObject
16
16
 
@@ -3,23 +3,28 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/amount_of_money'
5
5
  require 'onlinepayments/sdk/domain/data_object'
6
+ require 'onlinepayments/sdk/domain/operation_payment_references'
6
7
 
7
8
  module OnlinePayments
8
9
  module SDK
9
10
  module Domain
10
11
  # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
11
12
  # @attr [true/false] is_final
13
+ # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
12
14
  class CancelPaymentRequest < OnlinePayments::SDK::Domain::DataObject
13
15
 
14
16
  attr_accessor :amount_of_money
15
17
 
16
18
  attr_accessor :is_final
17
19
 
20
+ attr_accessor :operation_references
21
+
18
22
  # @return (Hash)
19
23
  def to_h
20
24
  hash = super
21
25
  hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
22
26
  hash['isFinal'] = @is_final unless @is_final.nil?
27
+ hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
23
28
  hash
24
29
  end
25
30
 
@@ -32,6 +37,10 @@ module OnlinePayments
32
37
  if hash.has_key? 'isFinal'
33
38
  @is_final = hash['isFinal']
34
39
  end
40
+ if hash.has_key? 'operationReferences'
41
+ raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
42
+ @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
43
+ end
35
44
  end
36
45
  end
37
46
  end
@@ -1,32 +1,90 @@
1
1
  #
2
2
  # This file was automatically generated.
3
3
  #
4
+ require 'date'
5
+
4
6
  require 'onlinepayments/sdk/domain/data_object'
5
7
 
6
8
  module OnlinePayments
7
9
  module SDK
8
10
  module Domain
9
11
  # @attr [String] bin
12
+ # @attr [true/false] card_corporate_indicator
13
+ # @attr [Date] card_effective_date
14
+ # @attr [true/false] card_effective_date_indicator
10
15
  # @attr [String] card_number
16
+ # @attr [String] card_pan_type
17
+ # @attr [String] card_product_code
18
+ # @attr [String] card_product_usage_label
19
+ # @attr [String] card_scheme
20
+ # @attr [String] card_type
11
21
  # @attr [String] country_code
12
22
  # @attr [String] expiry_date
23
+ # @attr [String] issuer_code
24
+ # @attr [String] issuer_name
25
+ # @attr [String] issuing_country_code
26
+ # @attr [Integer] pan_length_max
27
+ # @attr [Integer] pan_length_min
28
+ # @attr [true/false] pan_luhn_check
13
29
  class CardEssentials < OnlinePayments::SDK::Domain::DataObject
14
30
 
15
31
  attr_accessor :bin
16
32
 
33
+ attr_accessor :card_corporate_indicator
34
+
35
+ attr_accessor :card_effective_date
36
+
37
+ attr_accessor :card_effective_date_indicator
38
+
17
39
  attr_accessor :card_number
18
40
 
41
+ attr_accessor :card_pan_type
42
+
43
+ attr_accessor :card_product_code
44
+
45
+ attr_accessor :card_product_usage_label
46
+
47
+ attr_accessor :card_scheme
48
+
49
+ attr_accessor :card_type
50
+
19
51
  attr_accessor :country_code
20
52
 
21
53
  attr_accessor :expiry_date
22
54
 
55
+ attr_accessor :issuer_code
56
+
57
+ attr_accessor :issuer_name
58
+
59
+ attr_accessor :issuing_country_code
60
+
61
+ attr_accessor :pan_length_max
62
+
63
+ attr_accessor :pan_length_min
64
+
65
+ attr_accessor :pan_luhn_check
66
+
23
67
  # @return (Hash)
24
68
  def to_h
25
69
  hash = super
26
70
  hash['bin'] = @bin unless @bin.nil?
71
+ hash['cardCorporateIndicator'] = @card_corporate_indicator unless @card_corporate_indicator.nil?
72
+ hash['cardEffectiveDate'] = @card_effective_date.iso8601 unless @card_effective_date.nil?
73
+ hash['cardEffectiveDateIndicator'] = @card_effective_date_indicator unless @card_effective_date_indicator.nil?
27
74
  hash['cardNumber'] = @card_number unless @card_number.nil?
75
+ hash['cardPanType'] = @card_pan_type unless @card_pan_type.nil?
76
+ hash['cardProductCode'] = @card_product_code unless @card_product_code.nil?
77
+ hash['cardProductUsageLabel'] = @card_product_usage_label unless @card_product_usage_label.nil?
78
+ hash['cardScheme'] = @card_scheme unless @card_scheme.nil?
79
+ hash['cardType'] = @card_type unless @card_type.nil?
28
80
  hash['countryCode'] = @country_code unless @country_code.nil?
29
81
  hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
82
+ hash['issuerCode'] = @issuer_code unless @issuer_code.nil?
83
+ hash['issuerName'] = @issuer_name unless @issuer_name.nil?
84
+ hash['issuingCountryCode'] = @issuing_country_code unless @issuing_country_code.nil?
85
+ hash['panLengthMax'] = @pan_length_max unless @pan_length_max.nil?
86
+ hash['panLengthMin'] = @pan_length_min unless @pan_length_min.nil?
87
+ hash['panLuhnCheck'] = @pan_luhn_check unless @pan_luhn_check.nil?
30
88
  hash
31
89
  end
32
90
 
@@ -35,15 +93,57 @@ module OnlinePayments
35
93
  if hash.has_key? 'bin'
36
94
  @bin = hash['bin']
37
95
  end
96
+ if hash.has_key? 'cardCorporateIndicator'
97
+ @card_corporate_indicator = hash['cardCorporateIndicator']
98
+ end
99
+ if hash.has_key? 'cardEffectiveDate'
100
+ @card_effective_date = Date.parse(hash['cardEffectiveDate'])
101
+ end
102
+ if hash.has_key? 'cardEffectiveDateIndicator'
103
+ @card_effective_date_indicator = hash['cardEffectiveDateIndicator']
104
+ end
38
105
  if hash.has_key? 'cardNumber'
39
106
  @card_number = hash['cardNumber']
40
107
  end
108
+ if hash.has_key? 'cardPanType'
109
+ @card_pan_type = hash['cardPanType']
110
+ end
111
+ if hash.has_key? 'cardProductCode'
112
+ @card_product_code = hash['cardProductCode']
113
+ end
114
+ if hash.has_key? 'cardProductUsageLabel'
115
+ @card_product_usage_label = hash['cardProductUsageLabel']
116
+ end
117
+ if hash.has_key? 'cardScheme'
118
+ @card_scheme = hash['cardScheme']
119
+ end
120
+ if hash.has_key? 'cardType'
121
+ @card_type = hash['cardType']
122
+ end
41
123
  if hash.has_key? 'countryCode'
42
124
  @country_code = hash['countryCode']
43
125
  end
44
126
  if hash.has_key? 'expiryDate'
45
127
  @expiry_date = hash['expiryDate']
46
128
  end
129
+ if hash.has_key? 'issuerCode'
130
+ @issuer_code = hash['issuerCode']
131
+ end
132
+ if hash.has_key? 'issuerName'
133
+ @issuer_name = hash['issuerName']
134
+ end
135
+ if hash.has_key? 'issuingCountryCode'
136
+ @issuing_country_code = hash['issuingCountryCode']
137
+ end
138
+ if hash.has_key? 'panLengthMax'
139
+ @pan_length_max = hash['panLengthMax']
140
+ end
141
+ if hash.has_key? 'panLengthMin'
142
+ @pan_length_min = hash['panLengthMin']
143
+ end
144
+ if hash.has_key? 'panLuhnCheck'
145
+ @pan_luhn_check = hash['panLuhnCheck']
146
+ end
47
147
  end
48
148
  end
49
149
  end
@@ -6,6 +6,7 @@ require 'onlinepayments/sdk/domain/card_recurrence_details'
6
6
  require 'onlinepayments/sdk/domain/currency_conversion_input'
7
7
  require 'onlinepayments/sdk/domain/data_object'
8
8
  require 'onlinepayments/sdk/domain/multiple_payment_information'
9
+ require 'onlinepayments/sdk/domain/network_token_data'
9
10
  require 'onlinepayments/sdk/domain/payment_product130_specific_input'
10
11
  require 'onlinepayments/sdk/domain/payment_product3012_specific_input'
11
12
  require 'onlinepayments/sdk/domain/payment_product3208_specific_input'
@@ -25,6 +26,7 @@ module OnlinePayments
25
26
  # @attr [String] initial_scheme_transaction_id
26
27
  # @attr [true/false] is_recurring
27
28
  # @attr [OnlinePayments::SDK::Domain::MultiplePaymentInformation] multiple_payment_information
29
+ # @attr [OnlinePayments::SDK::Domain::NetworkTokenData] network_token_data
28
30
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
29
31
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct3012SpecificInput] payment_product3012_specific_input
30
32
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput] payment_product3208_specific_input
@@ -62,6 +64,8 @@ module OnlinePayments
62
64
 
63
65
  attr_accessor :multiple_payment_information
64
66
 
67
+ attr_accessor :network_token_data
68
+
65
69
  attr_accessor :payment_product130_specific_input
66
70
 
67
71
  attr_accessor :payment_product3012_specific_input
@@ -106,6 +110,7 @@ module OnlinePayments
106
110
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
107
111
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
108
112
  hash['multiplePaymentInformation'] = @multiple_payment_information.to_h unless @multiple_payment_information.nil?
113
+ hash['networkTokenData'] = @network_token_data.to_h unless @network_token_data.nil?
109
114
  hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h unless @payment_product130_specific_input.nil?
110
115
  hash['paymentProduct3012SpecificInput'] = @payment_product3012_specific_input.to_h unless @payment_product3012_specific_input.nil?
111
116
  hash['paymentProduct3208SpecificInput'] = @payment_product3208_specific_input.to_h unless @payment_product3208_specific_input.nil?
@@ -159,6 +164,10 @@ module OnlinePayments
159
164
  raise TypeError, "value '%s' is not a Hash" % [hash['multiplePaymentInformation']] unless hash['multiplePaymentInformation'].is_a? Hash
160
165
  @multiple_payment_information = OnlinePayments::SDK::Domain::MultiplePaymentInformation.new_from_hash(hash['multiplePaymentInformation'])
161
166
  end
167
+ if hash.has_key? 'networkTokenData'
168
+ raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenData']] unless hash['networkTokenData'].is_a? Hash
169
+ @network_token_data = OnlinePayments::SDK::Domain::NetworkTokenData.new_from_hash(hash['networkTokenData'])
170
+ end
162
171
  if hash.has_key? 'paymentProduct130SpecificInput'
163
172
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
164
173
  @payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
@@ -4,11 +4,13 @@
4
4
  require 'onlinepayments/sdk/domain/acquirer_information'
5
5
  require 'onlinepayments/sdk/domain/card_essentials'
6
6
  require 'onlinepayments/sdk/domain/card_fraud_results'
7
+ require 'onlinepayments/sdk/domain/click_to_pay'
7
8
  require 'onlinepayments/sdk/domain/currency_conversion'
8
9
  require 'onlinepayments/sdk/domain/data_object'
9
10
  require 'onlinepayments/sdk/domain/external_token_linked'
10
11
  require 'onlinepayments/sdk/domain/payment_product3208_specific_output'
11
12
  require 'onlinepayments/sdk/domain/payment_product3209_specific_output'
13
+ require 'onlinepayments/sdk/domain/reattempt_instructions'
12
14
  require 'onlinepayments/sdk/domain/three_d_secure_results'
13
15
 
14
16
  module OnlinePayments
@@ -18,6 +20,7 @@ module OnlinePayments
18
20
  # @attr [Integer] authenticated_amount
19
21
  # @attr [String] authorisation_code
20
22
  # @attr [OnlinePayments::SDK::Domain::CardEssentials] card
23
+ # @attr [OnlinePayments::SDK::Domain::ClickToPay] click_to_pay
21
24
  # @attr [OnlinePayments::SDK::Domain::CurrencyConversion] currency_conversion
22
25
  # @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
23
26
  # @attr [OnlinePayments::SDK::Domain::CardFraudResults] fraud_results
@@ -27,6 +30,7 @@ module OnlinePayments
27
30
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput] payment_product3208_specific_output
28
31
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct3209SpecificOutput] payment_product3209_specific_output
29
32
  # @attr [Integer] payment_product_id
33
+ # @attr [OnlinePayments::SDK::Domain::ReattemptInstructions] reattempt_instructions
30
34
  # @attr [String] scheme_reference_data
31
35
  # @attr [OnlinePayments::SDK::Domain::ThreeDSecureResults] three_d_secure_results
32
36
  # @attr [String] token
@@ -40,6 +44,8 @@ module OnlinePayments
40
44
 
41
45
  attr_accessor :card
42
46
 
47
+ attr_accessor :click_to_pay
48
+
43
49
  attr_accessor :currency_conversion
44
50
 
45
51
  attr_accessor :external_token_linked
@@ -58,6 +64,8 @@ module OnlinePayments
58
64
 
59
65
  attr_accessor :payment_product_id
60
66
 
67
+ attr_accessor :reattempt_instructions
68
+
61
69
  attr_accessor :scheme_reference_data
62
70
 
63
71
  attr_accessor :three_d_secure_results
@@ -71,6 +79,7 @@ module OnlinePayments
71
79
  hash['authenticatedAmount'] = @authenticated_amount unless @authenticated_amount.nil?
72
80
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
73
81
  hash['card'] = @card.to_h unless @card.nil?
82
+ hash['clickToPay'] = @click_to_pay.to_h unless @click_to_pay.nil?
74
83
  hash['currencyConversion'] = @currency_conversion.to_h unless @currency_conversion.nil?
75
84
  hash['externalTokenLinked'] = @external_token_linked.to_h unless @external_token_linked.nil?
76
85
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
@@ -80,6 +89,7 @@ module OnlinePayments
80
89
  hash['paymentProduct3208SpecificOutput'] = @payment_product3208_specific_output.to_h unless @payment_product3208_specific_output.nil?
81
90
  hash['paymentProduct3209SpecificOutput'] = @payment_product3209_specific_output.to_h unless @payment_product3209_specific_output.nil?
82
91
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
92
+ hash['reattemptInstructions'] = @reattempt_instructions.to_h unless @reattempt_instructions.nil?
83
93
  hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
84
94
  hash['threeDSecureResults'] = @three_d_secure_results.to_h unless @three_d_secure_results.nil?
85
95
  hash['token'] = @token unless @token.nil?
@@ -102,6 +112,10 @@ module OnlinePayments
102
112
  raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
103
113
  @card = OnlinePayments::SDK::Domain::CardEssentials.new_from_hash(hash['card'])
104
114
  end
115
+ if hash.has_key? 'clickToPay'
116
+ raise TypeError, "value '%s' is not a Hash" % [hash['clickToPay']] unless hash['clickToPay'].is_a? Hash
117
+ @click_to_pay = OnlinePayments::SDK::Domain::ClickToPay.new_from_hash(hash['clickToPay'])
118
+ end
105
119
  if hash.has_key? 'currencyConversion'
106
120
  raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
107
121
  @currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
@@ -134,6 +148,10 @@ module OnlinePayments
134
148
  if hash.has_key? 'paymentProductId'
135
149
  @payment_product_id = hash['paymentProductId']
136
150
  end
151
+ if hash.has_key? 'reattemptInstructions'
152
+ raise TypeError, "value '%s' is not a Hash" % [hash['reattemptInstructions']] unless hash['reattemptInstructions'].is_a? Hash
153
+ @reattempt_instructions = OnlinePayments::SDK::Domain::ReattemptInstructions.new_from_hash(hash['reattemptInstructions'])
154
+ end
137
155
  if hash.has_key? 'schemeReferenceData'
138
156
  @scheme_reference_data = hash['schemeReferenceData']
139
157
  end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [true/false] is_click_to_pay_payment
10
+ class ClickToPay < OnlinePayments::SDK::Domain::DataObject
11
+
12
+ attr_accessor :is_click_to_pay_payment
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['IsClickToPayPayment'] = @is_click_to_pay_payment unless @is_click_to_pay_payment.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'IsClickToPayPayment'
24
+ @is_click_to_pay_payment = hash['IsClickToPayPayment']
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -24,6 +24,7 @@ module OnlinePayments
24
24
  # @attr [OnlinePayments::SDK::Domain::Feedbacks] feedbacks
25
25
  # @attr [OnlinePayments::SDK::Domain::FraudFields] fraud_fields
26
26
  # @attr [OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput] hosted_checkout_specific_input
27
+ # @attr [true/false] is_reusable_link
27
28
  # @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodHostedCheckoutSpecificInput] mobile_payment_method_specific_input
28
29
  # @attr [OnlinePayments::SDK::Domain::Order] order
29
30
  # @attr [OnlinePayments::SDK::Domain::PaymentLinkOrderInput] payment_link_order
@@ -47,6 +48,8 @@ module OnlinePayments
47
48
 
48
49
  attr_accessor :hosted_checkout_specific_input
49
50
 
51
+ attr_accessor :is_reusable_link
52
+
50
53
  attr_accessor :mobile_payment_method_specific_input
51
54
 
52
55
  attr_accessor :order
@@ -71,6 +74,7 @@ module OnlinePayments
71
74
  hash['feedbacks'] = @feedbacks.to_h unless @feedbacks.nil?
72
75
  hash['fraudFields'] = @fraud_fields.to_h unless @fraud_fields.nil?
73
76
  hash['hostedCheckoutSpecificInput'] = @hosted_checkout_specific_input.to_h unless @hosted_checkout_specific_input.nil?
77
+ hash['isReusableLink'] = @is_reusable_link unless @is_reusable_link.nil?
74
78
  hash['mobilePaymentMethodSpecificInput'] = @mobile_payment_method_specific_input.to_h unless @mobile_payment_method_specific_input.nil?
75
79
  hash['order'] = @order.to_h unless @order.nil?
76
80
  hash['paymentLinkOrder'] = @payment_link_order.to_h unless @payment_link_order.nil?
@@ -105,6 +109,9 @@ module OnlinePayments
105
109
  raise TypeError, "value '%s' is not a Hash" % [hash['hostedCheckoutSpecificInput']] unless hash['hostedCheckoutSpecificInput'].is_a? Hash
106
110
  @hosted_checkout_specific_input = OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput.new_from_hash(hash['hostedCheckoutSpecificInput'])
107
111
  end
112
+ if hash.has_key? 'isReusableLink'
113
+ @is_reusable_link = hash['isReusableLink']
114
+ end
108
115
  if hash.has_key? 'mobilePaymentMethodSpecificInput'
109
116
  raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificInput']] unless hash['mobilePaymentMethodSpecificInput'].is_a? Hash
110
117
  @mobile_payment_method_specific_input = OnlinePayments::SDK::Domain::MobilePaymentMethodHostedCheckoutSpecificInput.new_from_hash(hash['mobilePaymentMethodSpecificInput'])
@@ -7,14 +7,19 @@ module OnlinePayments
7
7
  module SDK
8
8
  module Domain
9
9
  # @attr [String] webhook_url
10
+ # @attr [Array<String>] webhooks_urls
10
11
  class Feedbacks < OnlinePayments::SDK::Domain::DataObject
11
12
 
13
+ # @deprecated The URL where the webhook will be dispatched for all status change events related to this payment.
12
14
  attr_accessor :webhook_url
13
15
 
16
+ attr_accessor :webhooks_urls
17
+
14
18
  # @return (Hash)
15
19
  def to_h
16
20
  hash = super
17
21
  hash['webhookUrl'] = @webhook_url unless @webhook_url.nil?
22
+ hash['webhooksUrls'] = @webhooks_urls unless @webhooks_urls.nil?
18
23
  hash
19
24
  end
20
25
 
@@ -23,6 +28,13 @@ module OnlinePayments
23
28
  if hash.has_key? 'webhookUrl'
24
29
  @webhook_url = hash['webhookUrl']
25
30
  end
31
+ if hash.has_key? 'webhooksUrls'
32
+ raise TypeError, "value '%s' is not an Array" % [hash['webhooksUrls']] unless hash['webhooksUrls'].is_a? Array
33
+ @webhooks_urls = []
34
+ hash['webhooksUrls'].each do |e|
35
+ @webhooks_urls << e
36
+ end
37
+ end
26
38
  end
27
39
  end
28
40
  end
@@ -1,19 +1,48 @@
1
1
  #
2
2
  # This file was automatically generated.
3
3
  #
4
+ require 'date'
5
+
4
6
  require 'onlinepayments/sdk/domain/data_object'
5
7
  require 'onlinepayments/sdk/domain/iin_detail'
6
8
 
7
9
  module OnlinePayments
8
10
  module SDK
9
11
  module Domain
12
+ # @attr [true/false] card_corporate_indicator
13
+ # @attr [Date] card_effective_date
14
+ # @attr [true/false] card_effective_date_indicator
15
+ # @attr [String] card_pan_type
16
+ # @attr [String] card_product_code
17
+ # @attr [String] card_product_usage_label
18
+ # @attr [String] card_scheme
10
19
  # @attr [String] card_type
11
20
  # @attr [Array<OnlinePayments::SDK::Domain::IINDetail>] co_brands
12
21
  # @attr [String] country_code
13
22
  # @attr [true/false] is_allowed_in_context
23
+ # @attr [String] issuer_code
24
+ # @attr [String] issuer_name
25
+ # @attr [String] issuing_country_code
26
+ # @attr [Integer] pan_length_max
27
+ # @attr [Integer] pan_length_min
28
+ # @attr [true/false] pan_luhn_check
14
29
  # @attr [Integer] payment_product_id
15
30
  class GetIINDetailsResponse < OnlinePayments::SDK::Domain::DataObject
16
31
 
32
+ attr_accessor :card_corporate_indicator
33
+
34
+ attr_accessor :card_effective_date
35
+
36
+ attr_accessor :card_effective_date_indicator
37
+
38
+ attr_accessor :card_pan_type
39
+
40
+ attr_accessor :card_product_code
41
+
42
+ attr_accessor :card_product_usage_label
43
+
44
+ attr_accessor :card_scheme
45
+
17
46
  attr_accessor :card_type
18
47
 
19
48
  attr_accessor :co_brands
@@ -22,21 +51,67 @@ module OnlinePayments
22
51
 
23
52
  attr_accessor :is_allowed_in_context
24
53
 
54
+ attr_accessor :issuer_code
55
+
56
+ attr_accessor :issuer_name
57
+
58
+ attr_accessor :issuing_country_code
59
+
60
+ attr_accessor :pan_length_max
61
+
62
+ attr_accessor :pan_length_min
63
+
64
+ attr_accessor :pan_luhn_check
65
+
25
66
  attr_accessor :payment_product_id
26
67
 
27
68
  # @return (Hash)
28
69
  def to_h
29
70
  hash = super
71
+ hash['cardCorporateIndicator'] = @card_corporate_indicator unless @card_corporate_indicator.nil?
72
+ hash['cardEffectiveDate'] = @card_effective_date.iso8601 unless @card_effective_date.nil?
73
+ hash['cardEffectiveDateIndicator'] = @card_effective_date_indicator unless @card_effective_date_indicator.nil?
74
+ hash['cardPanType'] = @card_pan_type unless @card_pan_type.nil?
75
+ hash['cardProductCode'] = @card_product_code unless @card_product_code.nil?
76
+ hash['cardProductUsageLabel'] = @card_product_usage_label unless @card_product_usage_label.nil?
77
+ hash['cardScheme'] = @card_scheme unless @card_scheme.nil?
30
78
  hash['cardType'] = @card_type unless @card_type.nil?
31
79
  hash['coBrands'] = @co_brands.collect{|val| val.to_h} unless @co_brands.nil?
32
80
  hash['countryCode'] = @country_code unless @country_code.nil?
33
81
  hash['isAllowedInContext'] = @is_allowed_in_context unless @is_allowed_in_context.nil?
82
+ hash['issuerCode'] = @issuer_code unless @issuer_code.nil?
83
+ hash['issuerName'] = @issuer_name unless @issuer_name.nil?
84
+ hash['issuingCountryCode'] = @issuing_country_code unless @issuing_country_code.nil?
85
+ hash['panLengthMax'] = @pan_length_max unless @pan_length_max.nil?
86
+ hash['panLengthMin'] = @pan_length_min unless @pan_length_min.nil?
87
+ hash['panLuhnCheck'] = @pan_luhn_check unless @pan_luhn_check.nil?
34
88
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
35
89
  hash
36
90
  end
37
91
 
38
92
  def from_hash(hash)
39
93
  super
94
+ if hash.has_key? 'cardCorporateIndicator'
95
+ @card_corporate_indicator = hash['cardCorporateIndicator']
96
+ end
97
+ if hash.has_key? 'cardEffectiveDate'
98
+ @card_effective_date = Date.parse(hash['cardEffectiveDate'])
99
+ end
100
+ if hash.has_key? 'cardEffectiveDateIndicator'
101
+ @card_effective_date_indicator = hash['cardEffectiveDateIndicator']
102
+ end
103
+ if hash.has_key? 'cardPanType'
104
+ @card_pan_type = hash['cardPanType']
105
+ end
106
+ if hash.has_key? 'cardProductCode'
107
+ @card_product_code = hash['cardProductCode']
108
+ end
109
+ if hash.has_key? 'cardProductUsageLabel'
110
+ @card_product_usage_label = hash['cardProductUsageLabel']
111
+ end
112
+ if hash.has_key? 'cardScheme'
113
+ @card_scheme = hash['cardScheme']
114
+ end
40
115
  if hash.has_key? 'cardType'
41
116
  @card_type = hash['cardType']
42
117
  end
@@ -53,6 +128,24 @@ module OnlinePayments
53
128
  if hash.has_key? 'isAllowedInContext'
54
129
  @is_allowed_in_context = hash['isAllowedInContext']
55
130
  end
131
+ if hash.has_key? 'issuerCode'
132
+ @issuer_code = hash['issuerCode']
133
+ end
134
+ if hash.has_key? 'issuerName'
135
+ @issuer_name = hash['issuerName']
136
+ end
137
+ if hash.has_key? 'issuingCountryCode'
138
+ @issuing_country_code = hash['issuingCountryCode']
139
+ end
140
+ if hash.has_key? 'panLengthMax'
141
+ @pan_length_max = hash['panLengthMax']
142
+ end
143
+ if hash.has_key? 'panLengthMin'
144
+ @pan_length_min = hash['panLengthMin']
145
+ end
146
+ if hash.has_key? 'panLuhnCheck'
147
+ @pan_luhn_check = hash['panLuhnCheck']
148
+ end
56
149
  if hash.has_key? 'paymentProductId'
57
150
  @payment_product_id = hash['paymentProductId']
58
151
  end