cybersource_rest_client 0.0.25 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client.rb +2 -0
  3. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +2 -0
  4. data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +2 -0
  5. data/lib/cybersource_rest_client/api/payment_instrument_api.rb +2 -0
  6. data/lib/cybersource_rest_client/models/invoice_settings_request.rb +1 -1
  7. data/lib/cybersource_rest_client/models/invoicing_v2_invoice_settings_get200_response_invoice_settings_information.rb +29 -4
  8. data/lib/cybersource_rest_client/models/invoicingv2invoice_settings_invoice_settings_information.rb +343 -0
  9. data/lib/cybersource_rest_client/models/patch_customer_payment_instrument_request.rb +11 -1
  10. data/lib/cybersource_rest_client/models/patch_customer_shipping_address_request.rb +11 -1
  11. data/lib/cybersource_rest_client/models/patch_payment_instrument_request.rb +11 -1
  12. data/lib/cybersource_rest_client/models/post_customer_payment_instrument_request.rb +11 -1
  13. data/lib/cybersource_rest_client/models/post_customer_shipping_address_request.rb +11 -1
  14. data/lib/cybersource_rest_client/models/post_payment_instrument_request.rb +11 -1
  15. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +1 -16
  16. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +129 -4
  17. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_risk_information_velocity_morphing.rb +1 -1
  18. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +1 -1
  19. data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +5 -5
  20. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +1 -1
  21. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +1 -1
  22. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_device_information.rb +5 -5
  23. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +1 -1
  24. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +1 -16
  25. data/lib/cybersource_rest_client/models/risk_v1_authentication_setups_post201_response_consumer_authentication_information.rb +1 -16
  26. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_consumer_authentication_information.rb +2 -32
  27. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +1 -16
  28. data/lib/cybersource_rest_client/models/riskv1authentications_device_information.rb +5 -5
  29. data/lib/cybersource_rest_client/models/riskv1decisions_device_information.rb +5 -5
  30. data/lib/cybersource_rest_client/models/riskv1exportcomplianceinquiries_device_information.rb +5 -5
  31. data/lib/cybersource_rest_client/models/riskv1liststypeentries_device_information.rb +5 -5
  32. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument.rb +11 -1
  33. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_bank_account.rb +7 -7
  34. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_shipping_address.rb +11 -1
  35. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_device_information.rb +5 -5
  36. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +1 -1
  37. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +13 -1
  38. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_multi_processor_routing.rb +244 -0
  39. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_device_information.rb +5 -5
  40. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb +1 -1
  41. metadata +8 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65b1ad68d8b109d4a9dcb5fa5d77ee513f358b3bee5164f510cf8b4a651062f3
4
- data.tar.gz: 4f5fe1e59869f57f1a0d2c25e5321ab2f97fab4f3ce3c1da60ab90cbf4624419
3
+ metadata.gz: 15e623e8f884be7cc13882474110f37ae4ac20d2f6755ebe38a7733c46a96ef6
4
+ data.tar.gz: cb337d4e66cfbe014f5c81d25bd72e177627c56fac05871d4b2d023c14c09156
5
5
  SHA512:
6
- metadata.gz: f878314373eb41806ca112cc621afc61279d0dd02af4a8ba9c815ecf3c8859db1baf734baa16151a092575d7361e653eeb1872c6440f3a986eb9284bfbf758d6
7
- data.tar.gz: 24f31d97550967c66cc63f114cd422013343071f44ab4cb8d76563b91de5fe6871207fe1edc4ebf639ea34f612328d26e73ff7331024e6a11e0c862832ed392d
6
+ metadata.gz: 1cc4a564465d654f421d272fd62d578b02c16e00a28abd5e55df01a783648e20a0ed94129c5905a21783b805545e05745e4fc1c9984dbc70307db79b75493ede
7
+ data.tar.gz: ea2fe4f83741e37db6d96ecc2bbf3002eb22e685df2dafbfc1023df01872fa3615a27e2671e032960fe8375dc2e6ec6800316630a203a6d8868ff8346542beef
@@ -89,6 +89,7 @@ require 'cybersource_rest_client/models/invoicing_v2_invoices_post201_response_i
89
89
  require 'cybersource_rest_client/models/invoicing_v2_invoices_post201_response_order_information'
90
90
  require 'cybersource_rest_client/models/invoicing_v2_invoices_post201_response_order_information_amount_details'
91
91
  require 'cybersource_rest_client/models/invoicing_v2_invoices_post202_response'
92
+ require 'cybersource_rest_client/models/invoicingv2invoice_settings_invoice_settings_information'
92
93
  require 'cybersource_rest_client/models/invoicingv2invoices_customer_information'
93
94
  require 'cybersource_rest_client/models/invoicingv2invoices_invoice_information'
94
95
  require 'cybersource_rest_client/models/invoicingv2invoices_order_information'
@@ -644,6 +645,7 @@ require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_proc
644
645
  require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_japan_payment_options'
645
646
  require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information'
646
647
  require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results'
648
+ require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_multi_processor_routing'
647
649
  require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_processor'
648
650
  require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information'
649
651
  require 'cybersource_rest_client/models/tss_v2_transactions_get200_response_risk_information_profile'
@@ -425,6 +425,7 @@ module CyberSource
425
425
  return data, status_code, headers
426
426
  end
427
427
  # Create a Customer Payment Instrument
428
+ # Include an existing TMS Customer & Instrument Identifier token id in the request. * A Customer token can be created by calling: **POST */tms/v2/customers*** * An Instrument Identifier token can be created by calling: **POST */tms/v1/instrumentidentifiers***
428
429
  # @param customer_token_id The TokenId of a customer.
429
430
  # @param post_customer_payment_instrument_request
430
431
  # @param [Hash] opts the optional parameters
@@ -436,6 +437,7 @@ module CyberSource
436
437
  end
437
438
 
438
439
  # Create a Customer Payment Instrument
440
+ # Include an existing TMS Customer & Instrument Identifier token id in the request. * A Customer token can be created by calling: **POST */tms/v2/customers*** * An Instrument Identifier token can be created by calling: **POST */tms/v1/instrumentidentifiers***
439
441
  # @param customer_token_id The TokenId of a customer.
440
442
  # @param post_customer_payment_instrument_request
441
443
  # @param [Hash] opts the optional parameters
@@ -425,6 +425,7 @@ module CyberSource
425
425
  return data, status_code, headers
426
426
  end
427
427
  # Create a Customer Shipping Address
428
+ # Include an existing TMS Customer token id in the request URI. * A Customer token can be created by calling: **POST */tms/v2/customers***
428
429
  # @param customer_token_id The TokenId of a customer.
429
430
  # @param post_customer_shipping_address_request
430
431
  # @param [Hash] opts the optional parameters
@@ -436,6 +437,7 @@ module CyberSource
436
437
  end
437
438
 
438
439
  # Create a Customer Shipping Address
440
+ # Include an existing TMS Customer token id in the request URI. * A Customer token can be created by calling: **POST */tms/v2/customers***
439
441
  # @param customer_token_id The TokenId of a customer.
440
442
  # @param post_customer_shipping_address_request
441
443
  # @param [Hash] opts the optional parameters
@@ -283,6 +283,7 @@ module CyberSource
283
283
  return data, status_code, headers
284
284
  end
285
285
  # Create a Payment Instrument
286
+ # Include an existing TMS Instrument Identifier id in the request body. * An Instrument Identifier token can be created by calling: **POST */tms/v1/instrumentidentifiers***
286
287
  # @param post_payment_instrument_request
287
288
  # @param [Hash] opts the optional parameters
288
289
  # @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
@@ -293,6 +294,7 @@ module CyberSource
293
294
  end
294
295
 
295
296
  # Create a Payment Instrument
297
+ # Include an existing TMS Instrument Identifier id in the request body. * An Instrument Identifier token can be created by calling: **POST */tms/v1/instrumentidentifiers***
296
298
  # @param post_payment_instrument_request
297
299
  # @param [Hash] opts the optional parameters
298
300
  # @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
@@ -26,7 +26,7 @@ module CyberSource
26
26
  # Attribute type mapping.
27
27
  def self.swagger_types
28
28
  {
29
- :'invoice_settings_information' => :'InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformation'
29
+ :'invoice_settings_information' => :'Invoicingv2invoiceSettingsInvoiceSettingsInformation'
30
30
  }
31
31
  end
32
32
 
@@ -34,6 +34,9 @@ module CyberSource
34
34
  # Currency used for the order. Use the three-character [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) #### Used by **Authorization** Required field. **Authorization Reversal** For an authorization reversal (`reversalInformation`) or a capture (`processingOptions.capture` is set to `true`), you must use the same currency that you used in your payment authorization request. #### PIN Debit Currency for the amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Returned by PIN debit purchase. For PIN debit reversal requests, you must use the same currency that was used for the PIN debit purchase or PIN debit credit that you are reversing. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit. #### DCC for First Data Your local currency. For details, see the `currency` field description in [Dynamic Currency Conversion For First Data Using the SCMP API](http://apps.cybersource.com/library/documentation/dev_guides/DCC_FirstData_SCMP/DCC_FirstData_SCMP_API.pdf). #### Tax Calculation Required for international tax and value added tax only. Optional for U.S. and Canadian taxes. Your local currency.
35
35
  attr_accessor :default_currency_code
36
36
 
37
+ # The 3D Secure payer authentication version or status for a merchant's invoice payments. Possible values are: - `1` - `2` - `None` - `Disabled`
38
+ attr_accessor :payer_authentication3_ds_version
39
+
37
40
  # Attribute mapping from ruby-style variable name to JSON key.
38
41
  def self.attribute_map
39
42
  {
@@ -43,7 +46,8 @@ module CyberSource
43
46
  :'enable_reminders' => :'enableReminders',
44
47
  :'header_style' => :'headerStyle',
45
48
  :'delivery_language' => :'deliveryLanguage',
46
- :'default_currency_code' => :'defaultCurrencyCode'
49
+ :'default_currency_code' => :'defaultCurrencyCode',
50
+ :'payer_authentication3_ds_version' => :'payerAuthentication3DSVersion'
47
51
  }
48
52
  end
49
53
 
@@ -56,7 +60,8 @@ module CyberSource
56
60
  :'enable_reminders' => :'BOOLEAN',
57
61
  :'header_style' => :'InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformationHeaderStyle',
58
62
  :'delivery_language' => :'String',
59
- :'default_currency_code' => :'String'
63
+ :'default_currency_code' => :'String',
64
+ :'payer_authentication3_ds_version' => :'String'
60
65
  }
61
66
  end
62
67
 
@@ -95,6 +100,10 @@ module CyberSource
95
100
  if attributes.has_key?(:'defaultCurrencyCode')
96
101
  self.default_currency_code = attributes[:'defaultCurrencyCode']
97
102
  end
103
+
104
+ if attributes.has_key?(:'payerAuthentication3DSVersion')
105
+ self.payer_authentication3_ds_version = attributes[:'payerAuthentication3DSVersion']
106
+ end
98
107
  end
99
108
 
100
109
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -121,6 +130,10 @@ module CyberSource
121
130
  invalid_properties.push('invalid value for "default_currency_code", the character length must be smaller than or equal to 3.')
122
131
  end
123
132
 
133
+ if !@payer_authentication3_ds_version.nil? && @payer_authentication3_ds_version.to_s.length > 8
134
+ invalid_properties.push('invalid value for "payer_authentication3_ds_version", the character length must be smaller than or equal to 8.')
135
+ end
136
+
124
137
  invalid_properties
125
138
  end
126
139
 
@@ -132,6 +145,7 @@ module CyberSource
132
145
  return false if !@custom_email_message.nil? && @custom_email_message.to_s.length > 2000
133
146
  return false if !@delivery_language.nil? && @delivery_language.to_s.length > 6
134
147
  return false if !@default_currency_code.nil? && @default_currency_code.to_s.length > 3
148
+ return false if !@payer_authentication3_ds_version.nil? && @payer_authentication3_ds_version.to_s.length > 8
135
149
  true
136
150
  end
137
151
 
@@ -185,6 +199,16 @@ module CyberSource
185
199
  @default_currency_code = default_currency_code
186
200
  end
187
201
 
202
+ # Custom attribute writer method with validation
203
+ # @param [Object] payer_authentication3_ds_version Value to be assigned
204
+ def payer_authentication3_ds_version=(payer_authentication3_ds_version)
205
+ if !payer_authentication3_ds_version.nil? && payer_authentication3_ds_version.to_s.length > 8
206
+ fail ArgumentError, 'invalid value for "payer_authentication3_ds_version", the character length must be smaller than or equal to 8.'
207
+ end
208
+
209
+ @payer_authentication3_ds_version = payer_authentication3_ds_version
210
+ end
211
+
188
212
  # Checks equality by comparing each attribute.
189
213
  # @param [Object] Object to be compared
190
214
  def ==(o)
@@ -196,7 +220,8 @@ module CyberSource
196
220
  enable_reminders == o.enable_reminders &&
197
221
  header_style == o.header_style &&
198
222
  delivery_language == o.delivery_language &&
199
- default_currency_code == o.default_currency_code
223
+ default_currency_code == o.default_currency_code &&
224
+ payer_authentication3_ds_version == o.payer_authentication3_ds_version
200
225
  end
201
226
 
202
227
  # @see the `==` method
@@ -208,7 +233,7 @@ module CyberSource
208
233
  # Calculates hash code according to all attributes.
209
234
  # @return [Fixnum] Hash code
210
235
  def hash
211
- [merchant_logo, merchant_display_name, custom_email_message, enable_reminders, header_style, delivery_language, default_currency_code].hash
236
+ [merchant_logo, merchant_display_name, custom_email_message, enable_reminders, header_style, delivery_language, default_currency_code, payer_authentication3_ds_version].hash
212
237
  end
213
238
 
214
239
  # Builds the object from hash
@@ -0,0 +1,343 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CyberSource
16
+ class Invoicingv2invoiceSettingsInvoiceSettingsInformation
17
+ # The image file, which must be encoded in Base64 format. Supported file formats are `png`, `jpg`, and `gif`. The image file size restriction is 1 MB.
18
+ attr_accessor :merchant_logo
19
+
20
+ # The merchant's display name shown on the invoice.
21
+ attr_accessor :merchant_display_name
22
+
23
+ # The content of the email message that we send to your customers.
24
+ attr_accessor :custom_email_message
25
+
26
+ # Whether you would like us to send an auto-generated reminder email to your invoice recipients. Currently, this reminder email is sent five days before the invoice is due and one day after it is past due.
27
+ attr_accessor :enable_reminders
28
+
29
+ attr_accessor :header_style
30
+
31
+ # The language of the email that we send to your customers. Possible values are `zh-CN`, `zh-TW`, `en-US`, `fr-FR`, `de-DE`, `ja-JP`, `pt-BR`, `ru-RU` and `es-419`.
32
+ attr_accessor :delivery_language
33
+
34
+ # Currency used for the order. Use the three-character [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) #### Used by **Authorization** Required field. **Authorization Reversal** For an authorization reversal (`reversalInformation`) or a capture (`processingOptions.capture` is set to `true`), you must use the same currency that you used in your payment authorization request. #### PIN Debit Currency for the amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Returned by PIN debit purchase. For PIN debit reversal requests, you must use the same currency that was used for the PIN debit purchase or PIN debit credit that you are reversing. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit. #### DCC for First Data Your local currency. For details, see the `currency` field description in [Dynamic Currency Conversion For First Data Using the SCMP API](http://apps.cybersource.com/library/documentation/dev_guides/DCC_FirstData_SCMP/DCC_FirstData_SCMP_API.pdf). #### Tax Calculation Required for international tax and value added tax only. Optional for U.S. and Canadian taxes. Your local currency.
35
+ attr_accessor :default_currency_code
36
+
37
+ # For a merchant's invoice payments, enable 3D Secure payer authentication version 1, update to 3D Secure version 2, or disable 3D Secure. Possible values are: - `enable` - `update` - `disable`
38
+ attr_accessor :payer_authentication_in_invoicing
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'merchant_logo' => :'merchantLogo',
44
+ :'merchant_display_name' => :'merchantDisplayName',
45
+ :'custom_email_message' => :'customEmailMessage',
46
+ :'enable_reminders' => :'enableReminders',
47
+ :'header_style' => :'headerStyle',
48
+ :'delivery_language' => :'deliveryLanguage',
49
+ :'default_currency_code' => :'defaultCurrencyCode',
50
+ :'payer_authentication_in_invoicing' => :'payerAuthenticationInInvoicing'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'merchant_logo' => :'String',
58
+ :'merchant_display_name' => :'String',
59
+ :'custom_email_message' => :'String',
60
+ :'enable_reminders' => :'BOOLEAN',
61
+ :'header_style' => :'InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformationHeaderStyle',
62
+ :'delivery_language' => :'String',
63
+ :'default_currency_code' => :'String',
64
+ :'payer_authentication_in_invoicing' => :'String'
65
+ }
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ return unless attributes.is_a?(Hash)
72
+
73
+ # convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
75
+
76
+ if attributes.has_key?(:'merchantLogo')
77
+ self.merchant_logo = attributes[:'merchantLogo']
78
+ end
79
+
80
+ if attributes.has_key?(:'merchantDisplayName')
81
+ self.merchant_display_name = attributes[:'merchantDisplayName']
82
+ end
83
+
84
+ if attributes.has_key?(:'customEmailMessage')
85
+ self.custom_email_message = attributes[:'customEmailMessage']
86
+ end
87
+
88
+ if attributes.has_key?(:'enableReminders')
89
+ self.enable_reminders = attributes[:'enableReminders']
90
+ end
91
+
92
+ if attributes.has_key?(:'headerStyle')
93
+ self.header_style = attributes[:'headerStyle']
94
+ end
95
+
96
+ if attributes.has_key?(:'deliveryLanguage')
97
+ self.delivery_language = attributes[:'deliveryLanguage']
98
+ end
99
+
100
+ if attributes.has_key?(:'defaultCurrencyCode')
101
+ self.default_currency_code = attributes[:'defaultCurrencyCode']
102
+ end
103
+
104
+ if attributes.has_key?(:'payerAuthenticationInInvoicing')
105
+ self.payer_authentication_in_invoicing = attributes[:'payerAuthenticationInInvoicing']
106
+ end
107
+ end
108
+
109
+ # Show invalid properties with the reasons. Usually used together with valid?
110
+ # @return Array for valid properties with the reasons
111
+ def list_invalid_properties
112
+ invalid_properties = Array.new
113
+ if !@merchant_logo.nil? && @merchant_logo.to_s.length > 10000000
114
+ invalid_properties.push('invalid value for "merchant_logo", the character length must be smaller than or equal to 10000000.')
115
+ end
116
+
117
+ if !@merchant_display_name.nil? && @merchant_display_name.to_s.length > 100
118
+ invalid_properties.push('invalid value for "merchant_display_name", the character length must be smaller than or equal to 100.')
119
+ end
120
+
121
+ if !@custom_email_message.nil? && @custom_email_message.to_s.length > 2000
122
+ invalid_properties.push('invalid value for "custom_email_message", the character length must be smaller than or equal to 2000.')
123
+ end
124
+
125
+ if !@delivery_language.nil? && @delivery_language.to_s.length > 6
126
+ invalid_properties.push('invalid value for "delivery_language", the character length must be smaller than or equal to 6.')
127
+ end
128
+
129
+ if !@default_currency_code.nil? && @default_currency_code.to_s.length > 3
130
+ invalid_properties.push('invalid value for "default_currency_code", the character length must be smaller than or equal to 3.')
131
+ end
132
+
133
+ if !@payer_authentication_in_invoicing.nil? && @payer_authentication_in_invoicing.to_s.length > 7
134
+ invalid_properties.push('invalid value for "payer_authentication_in_invoicing", the character length must be smaller than or equal to 7.')
135
+ end
136
+
137
+ invalid_properties
138
+ end
139
+
140
+ # Check to see if the all the properties in the model are valid
141
+ # @return true if the model is valid
142
+ def valid?
143
+ return false if !@merchant_logo.nil? && @merchant_logo.to_s.length > 10000000
144
+ return false if !@merchant_display_name.nil? && @merchant_display_name.to_s.length > 100
145
+ return false if !@custom_email_message.nil? && @custom_email_message.to_s.length > 2000
146
+ return false if !@delivery_language.nil? && @delivery_language.to_s.length > 6
147
+ return false if !@default_currency_code.nil? && @default_currency_code.to_s.length > 3
148
+ return false if !@payer_authentication_in_invoicing.nil? && @payer_authentication_in_invoicing.to_s.length > 7
149
+ true
150
+ end
151
+
152
+ # Custom attribute writer method with validation
153
+ # @param [Object] merchant_logo Value to be assigned
154
+ def merchant_logo=(merchant_logo)
155
+ if !merchant_logo.nil? && merchant_logo.to_s.length > 10000000
156
+ fail ArgumentError, 'invalid value for "merchant_logo", the character length must be smaller than or equal to 10000000.'
157
+ end
158
+
159
+ @merchant_logo = merchant_logo
160
+ end
161
+
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] merchant_display_name Value to be assigned
164
+ def merchant_display_name=(merchant_display_name)
165
+ if !merchant_display_name.nil? && merchant_display_name.to_s.length > 100
166
+ fail ArgumentError, 'invalid value for "merchant_display_name", the character length must be smaller than or equal to 100.'
167
+ end
168
+
169
+ @merchant_display_name = merchant_display_name
170
+ end
171
+
172
+ # Custom attribute writer method with validation
173
+ # @param [Object] custom_email_message Value to be assigned
174
+ def custom_email_message=(custom_email_message)
175
+ if !custom_email_message.nil? && custom_email_message.to_s.length > 2000
176
+ fail ArgumentError, 'invalid value for "custom_email_message", the character length must be smaller than or equal to 2000.'
177
+ end
178
+
179
+ @custom_email_message = custom_email_message
180
+ end
181
+
182
+ # Custom attribute writer method with validation
183
+ # @param [Object] delivery_language Value to be assigned
184
+ def delivery_language=(delivery_language)
185
+ if !delivery_language.nil? && delivery_language.to_s.length > 6
186
+ fail ArgumentError, 'invalid value for "delivery_language", the character length must be smaller than or equal to 6.'
187
+ end
188
+
189
+ @delivery_language = delivery_language
190
+ end
191
+
192
+ # Custom attribute writer method with validation
193
+ # @param [Object] default_currency_code Value to be assigned
194
+ def default_currency_code=(default_currency_code)
195
+ if !default_currency_code.nil? && default_currency_code.to_s.length > 3
196
+ fail ArgumentError, 'invalid value for "default_currency_code", the character length must be smaller than or equal to 3.'
197
+ end
198
+
199
+ @default_currency_code = default_currency_code
200
+ end
201
+
202
+ # Custom attribute writer method with validation
203
+ # @param [Object] payer_authentication_in_invoicing Value to be assigned
204
+ def payer_authentication_in_invoicing=(payer_authentication_in_invoicing)
205
+ if !payer_authentication_in_invoicing.nil? && payer_authentication_in_invoicing.to_s.length > 7
206
+ fail ArgumentError, 'invalid value for "payer_authentication_in_invoicing", the character length must be smaller than or equal to 7.'
207
+ end
208
+
209
+ @payer_authentication_in_invoicing = payer_authentication_in_invoicing
210
+ end
211
+
212
+ # Checks equality by comparing each attribute.
213
+ # @param [Object] Object to be compared
214
+ def ==(o)
215
+ return true if self.equal?(o)
216
+ self.class == o.class &&
217
+ merchant_logo == o.merchant_logo &&
218
+ merchant_display_name == o.merchant_display_name &&
219
+ custom_email_message == o.custom_email_message &&
220
+ enable_reminders == o.enable_reminders &&
221
+ header_style == o.header_style &&
222
+ delivery_language == o.delivery_language &&
223
+ default_currency_code == o.default_currency_code &&
224
+ payer_authentication_in_invoicing == o.payer_authentication_in_invoicing
225
+ end
226
+
227
+ # @see the `==` method
228
+ # @param [Object] Object to be compared
229
+ def eql?(o)
230
+ self == o
231
+ end
232
+
233
+ # Calculates hash code according to all attributes.
234
+ # @return [Fixnum] Hash code
235
+ def hash
236
+ [merchant_logo, merchant_display_name, custom_email_message, enable_reminders, header_style, delivery_language, default_currency_code, payer_authentication_in_invoicing].hash
237
+ end
238
+
239
+ # Builds the object from hash
240
+ # @param [Hash] attributes Model attributes in the form of hash
241
+ # @return [Object] Returns the model itself
242
+ def build_from_hash(attributes)
243
+ return nil unless attributes.is_a?(Hash)
244
+ self.class.swagger_types.each_pair do |key, type|
245
+ if type =~ /\AArray<(.*)>/i
246
+ # check to ensure the input is an array given that the the attribute
247
+ # is documented as an array but the input is not
248
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
249
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
250
+ end
251
+ elsif !attributes[self.class.attribute_map[key]].nil?
252
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
253
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
254
+ end
255
+
256
+ self
257
+ end
258
+
259
+ # Deserializes the data based on type
260
+ # @param string type Data type
261
+ # @param string value Value to be deserialized
262
+ # @return [Object] Deserialized data
263
+ def _deserialize(type, value)
264
+ case type.to_sym
265
+ when :DateTime
266
+ DateTime.parse(value)
267
+ when :Date
268
+ Date.parse(value)
269
+ when :String
270
+ value.to_s
271
+ when :Integer
272
+ value.to_i
273
+ when :Float
274
+ value.to_f
275
+ when :BOOLEAN
276
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
277
+ true
278
+ else
279
+ false
280
+ end
281
+ when :Object
282
+ # generic object (usually a Hash), return directly
283
+ value
284
+ when /\AArray<(?<inner_type>.+)>\z/
285
+ inner_type = Regexp.last_match[:inner_type]
286
+ value.map { |v| _deserialize(inner_type, v) }
287
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
288
+ k_type = Regexp.last_match[:k_type]
289
+ v_type = Regexp.last_match[:v_type]
290
+ {}.tap do |hash|
291
+ value.each do |k, v|
292
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
293
+ end
294
+ end
295
+ else # model
296
+ temp_model = CyberSource.const_get(type).new
297
+ temp_model.build_from_hash(value)
298
+ end
299
+ end
300
+
301
+ # Returns the string representation of the object
302
+ # @return [String] String presentation of the object
303
+ def to_s
304
+ to_hash.to_s
305
+ end
306
+
307
+ # to_body is an alias to to_hash (backward compatibility)
308
+ # @return [Hash] Returns the object in the form of hash
309
+ def to_body
310
+ to_hash
311
+ end
312
+
313
+ # Returns the object in the form of hash
314
+ # @return [Hash] Returns the object in the form of hash
315
+ def to_hash
316
+ hash = {}
317
+ self.class.attribute_map.each_pair do |attr, param|
318
+ value = self.send(attr)
319
+ next if value.nil?
320
+ hash[param] = _to_hash(value)
321
+ end
322
+ hash
323
+ end
324
+
325
+ # Outputs non-array value in the form of hash
326
+ # For object, use to_hash. Otherwise, just return the value
327
+ # @param [Object] value Any valid value
328
+ # @return [Hash] Returns the value in the form of hash
329
+ def _to_hash(value)
330
+ if value.is_a?(Array)
331
+ value.compact.map { |v| _to_hash(v) }
332
+ elsif value.is_a?(Hash)
333
+ {}.tap do |hash|
334
+ value.each { |k, v| hash[k] = _to_hash(v) }
335
+ end
336
+ elsif value.respond_to? :to_hash
337
+ value.to_hash
338
+ else
339
+ value
340
+ end
341
+ end
342
+ end
343
+ end