onlinepayments-sdk-ruby 5.1.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 (32) 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 +9 -0
  8. data/lib/onlinepayments/sdk/domain/click_to_pay.rb +30 -0
  9. data/lib/onlinepayments/sdk/domain/get_iin_details_response.rb +93 -0
  10. data/lib/onlinepayments/sdk/domain/iin_detail.rb +100 -0
  11. data/lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb +23 -0
  12. data/lib/onlinepayments/sdk/domain/network_token_data.rb +65 -0
  13. data/lib/onlinepayments/sdk/domain/operation_payment_references.rb +7 -0
  14. data/lib/onlinepayments/sdk/domain/order_references.rb +7 -0
  15. data/lib/onlinepayments/sdk/domain/payment_link_order_input.rb +1 -0
  16. data/lib/onlinepayments/sdk/domain/payment_product3204_specific_output.rb +30 -0
  17. data/lib/onlinepayments/sdk/domain/payment_product5001.rb +37 -0
  18. data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +9 -0
  19. data/lib/onlinepayments/sdk/domain/payment_references.rb +7 -0
  20. data/lib/onlinepayments/sdk/domain/product320_recurring.rb +30 -0
  21. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb +9 -0
  22. data/lib/onlinepayments/sdk/domain/redirect_payment_product3204_specific_input.rb +7 -0
  23. data/lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb +1 -0
  24. data/lib/onlinepayments/sdk/domain/refund_request.rb +7 -0
  25. data/lib/onlinepayments/sdk/domain/revoke_mandate_request.rb +30 -0
  26. data/lib/onlinepayments/sdk/domain/show_form_data.rb +9 -0
  27. data/lib/onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input.rb +7 -0
  28. data/lib/onlinepayments/sdk/merchant/mandates/mandates_client.rb +3 -2
  29. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +1 -0
  30. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +1 -0
  31. data/onlinepayments-sdk-ruby.gemspec +1 -1
  32. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6987f9c255f3b188e829f19f9fead3bd245ee17cf865fbd31495291b59b7d5dc
4
- data.tar.gz: e586ef2c85d0a1c0fb39b953d95096f1dcf4a167d7723bb79f509ee95938a600
3
+ metadata.gz: d4c7c51ce06ee3c9e13435cb798349204820c8df80ee669bb84ce603a8d16ad8
4
+ data.tar.gz: a0a09fcd1647bcf2164e0f2c1a0f6f13cdd49cd8b107090b629b6494032977aa
5
5
  SHA512:
6
- metadata.gz: aeb66a311492611e256e399509285f001e6f864e0c4dbc13a28e94db77591070fd34a6e1e8adb4534b6125865287726f9671ef690033b22eb834272a6fc1e7a0
7
- data.tar.gz: 52179edf9713ad9360cdfb5122c6b97a9dcb576d434ee37f454873257066af7aee8564a98f2ea0a8c5d0dde7650bb30830c41276026df8afcd7e8daa9f86926d
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.1.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,6 +4,7 @@
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'
@@ -19,6 +20,7 @@ module OnlinePayments
19
20
  # @attr [Integer] authenticated_amount
20
21
  # @attr [String] authorisation_code
21
22
  # @attr [OnlinePayments::SDK::Domain::CardEssentials] card
23
+ # @attr [OnlinePayments::SDK::Domain::ClickToPay] click_to_pay
22
24
  # @attr [OnlinePayments::SDK::Domain::CurrencyConversion] currency_conversion
23
25
  # @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
24
26
  # @attr [OnlinePayments::SDK::Domain::CardFraudResults] fraud_results
@@ -42,6 +44,8 @@ module OnlinePayments
42
44
 
43
45
  attr_accessor :card
44
46
 
47
+ attr_accessor :click_to_pay
48
+
45
49
  attr_accessor :currency_conversion
46
50
 
47
51
  attr_accessor :external_token_linked
@@ -75,6 +79,7 @@ module OnlinePayments
75
79
  hash['authenticatedAmount'] = @authenticated_amount unless @authenticated_amount.nil?
76
80
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
77
81
  hash['card'] = @card.to_h unless @card.nil?
82
+ hash['clickToPay'] = @click_to_pay.to_h unless @click_to_pay.nil?
78
83
  hash['currencyConversion'] = @currency_conversion.to_h unless @currency_conversion.nil?
79
84
  hash['externalTokenLinked'] = @external_token_linked.to_h unless @external_token_linked.nil?
80
85
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
@@ -107,6 +112,10 @@ module OnlinePayments
107
112
  raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
108
113
  @card = OnlinePayments::SDK::Domain::CardEssentials.new_from_hash(hash['card'])
109
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
110
119
  if hash.has_key? 'currencyConversion'
111
120
  raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
112
121
  @currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
@@ -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
@@ -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
@@ -1,39 +1,139 @@
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
11
+ # @attr [true/false] card_corporate_indicator
12
+ # @attr [Date] card_effective_date
13
+ # @attr [true/false] card_effective_date_indicator
14
+ # @attr [String] card_pan_type
15
+ # @attr [String] card_product_code
16
+ # @attr [String] card_product_usage_label
17
+ # @attr [String] card_scheme
9
18
  # @attr [String] card_type
19
+ # @attr [String] country_code
10
20
  # @attr [true/false] is_allowed_in_context
21
+ # @attr [String] issuer_code
22
+ # @attr [String] issuer_name
23
+ # @attr [String] issuing_country_code
24
+ # @attr [Integer] pan_length_max
25
+ # @attr [Integer] pan_length_min
26
+ # @attr [true/false] pan_luhn_check
11
27
  # @attr [Integer] payment_product_id
12
28
  class IINDetail < OnlinePayments::SDK::Domain::DataObject
13
29
 
30
+ attr_accessor :card_corporate_indicator
31
+
32
+ attr_accessor :card_effective_date
33
+
34
+ attr_accessor :card_effective_date_indicator
35
+
36
+ attr_accessor :card_pan_type
37
+
38
+ attr_accessor :card_product_code
39
+
40
+ attr_accessor :card_product_usage_label
41
+
42
+ attr_accessor :card_scheme
43
+
14
44
  attr_accessor :card_type
15
45
 
46
+ attr_accessor :country_code
47
+
16
48
  attr_accessor :is_allowed_in_context
17
49
 
50
+ attr_accessor :issuer_code
51
+
52
+ attr_accessor :issuer_name
53
+
54
+ attr_accessor :issuing_country_code
55
+
56
+ attr_accessor :pan_length_max
57
+
58
+ attr_accessor :pan_length_min
59
+
60
+ attr_accessor :pan_luhn_check
61
+
18
62
  attr_accessor :payment_product_id
19
63
 
20
64
  # @return (Hash)
21
65
  def to_h
22
66
  hash = super
67
+ hash['cardCorporateIndicator'] = @card_corporate_indicator unless @card_corporate_indicator.nil?
68
+ hash['cardEffectiveDate'] = @card_effective_date.iso8601 unless @card_effective_date.nil?
69
+ hash['cardEffectiveDateIndicator'] = @card_effective_date_indicator unless @card_effective_date_indicator.nil?
70
+ hash['cardPanType'] = @card_pan_type unless @card_pan_type.nil?
71
+ hash['cardProductCode'] = @card_product_code unless @card_product_code.nil?
72
+ hash['cardProductUsageLabel'] = @card_product_usage_label unless @card_product_usage_label.nil?
73
+ hash['cardScheme'] = @card_scheme unless @card_scheme.nil?
23
74
  hash['cardType'] = @card_type unless @card_type.nil?
75
+ hash['countryCode'] = @country_code unless @country_code.nil?
24
76
  hash['isAllowedInContext'] = @is_allowed_in_context unless @is_allowed_in_context.nil?
77
+ hash['issuerCode'] = @issuer_code unless @issuer_code.nil?
78
+ hash['issuerName'] = @issuer_name unless @issuer_name.nil?
79
+ hash['issuingCountryCode'] = @issuing_country_code unless @issuing_country_code.nil?
80
+ hash['panLengthMax'] = @pan_length_max unless @pan_length_max.nil?
81
+ hash['panLengthMin'] = @pan_length_min unless @pan_length_min.nil?
82
+ hash['panLuhnCheck'] = @pan_luhn_check unless @pan_luhn_check.nil?
25
83
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
26
84
  hash
27
85
  end
28
86
 
29
87
  def from_hash(hash)
30
88
  super
89
+ if hash.has_key? 'cardCorporateIndicator'
90
+ @card_corporate_indicator = hash['cardCorporateIndicator']
91
+ end
92
+ if hash.has_key? 'cardEffectiveDate'
93
+ @card_effective_date = Date.parse(hash['cardEffectiveDate'])
94
+ end
95
+ if hash.has_key? 'cardEffectiveDateIndicator'
96
+ @card_effective_date_indicator = hash['cardEffectiveDateIndicator']
97
+ end
98
+ if hash.has_key? 'cardPanType'
99
+ @card_pan_type = hash['cardPanType']
100
+ end
101
+ if hash.has_key? 'cardProductCode'
102
+ @card_product_code = hash['cardProductCode']
103
+ end
104
+ if hash.has_key? 'cardProductUsageLabel'
105
+ @card_product_usage_label = hash['cardProductUsageLabel']
106
+ end
107
+ if hash.has_key? 'cardScheme'
108
+ @card_scheme = hash['cardScheme']
109
+ end
31
110
  if hash.has_key? 'cardType'
32
111
  @card_type = hash['cardType']
33
112
  end
113
+ if hash.has_key? 'countryCode'
114
+ @country_code = hash['countryCode']
115
+ end
34
116
  if hash.has_key? 'isAllowedInContext'
35
117
  @is_allowed_in_context = hash['isAllowedInContext']
36
118
  end
119
+ if hash.has_key? 'issuerCode'
120
+ @issuer_code = hash['issuerCode']
121
+ end
122
+ if hash.has_key? 'issuerName'
123
+ @issuer_name = hash['issuerName']
124
+ end
125
+ if hash.has_key? 'issuingCountryCode'
126
+ @issuing_country_code = hash['issuingCountryCode']
127
+ end
128
+ if hash.has_key? 'panLengthMax'
129
+ @pan_length_max = hash['panLengthMax']
130
+ end
131
+ if hash.has_key? 'panLengthMin'
132
+ @pan_length_min = hash['panLengthMin']
133
+ end
134
+ if hash.has_key? 'panLuhnCheck'
135
+ @pan_luhn_check = hash['panLuhnCheck']
136
+ end
37
137
  if hash.has_key? 'paymentProductId'
38
138
  @payment_product_id = hash['paymentProductId']
39
139
  end
@@ -3,28 +3,51 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/data_object'
5
5
  require 'onlinepayments/sdk/domain/g_pay_three_d_secure'
6
+ require 'onlinepayments/sdk/domain/product320_recurring'
6
7
 
7
8
  module OnlinePayments
8
9
  module SDK
9
10
  module Domain
11
+ # @attr [true/false] is_recurring
12
+ # @attr [OnlinePayments::SDK::Domain::Product320Recurring] recurring
10
13
  # @attr [OnlinePayments::SDK::Domain::GPayThreeDSecure] three_d_secure
14
+ # @attr [true/false] tokenize
11
15
  class MobilePaymentProduct320SpecificInput < OnlinePayments::SDK::Domain::DataObject
12
16
 
17
+ attr_accessor :is_recurring
18
+
19
+ attr_accessor :recurring
20
+
13
21
  attr_accessor :three_d_secure
14
22
 
23
+ attr_accessor :tokenize
24
+
15
25
  # @return (Hash)
16
26
  def to_h
17
27
  hash = super
28
+ hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
29
+ hash['recurring'] = @recurring.to_h unless @recurring.nil?
18
30
  hash['threeDSecure'] = @three_d_secure.to_h unless @three_d_secure.nil?
31
+ hash['tokenize'] = @tokenize unless @tokenize.nil?
19
32
  hash
20
33
  end
21
34
 
22
35
  def from_hash(hash)
23
36
  super
37
+ if hash.has_key? 'isRecurring'
38
+ @is_recurring = hash['isRecurring']
39
+ end
40
+ if hash.has_key? 'recurring'
41
+ raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
42
+ @recurring = OnlinePayments::SDK::Domain::Product320Recurring.new_from_hash(hash['recurring'])
43
+ end
24
44
  if hash.has_key? 'threeDSecure'
25
45
  raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
26
46
  @three_d_secure = OnlinePayments::SDK::Domain::GPayThreeDSecure.new_from_hash(hash['threeDSecure'])
27
47
  end
48
+ if hash.has_key? 'tokenize'
49
+ @tokenize = hash['tokenize']
50
+ end
28
51
  end
29
52
  end
30
53
  end