cybersource_rest_client 0.0.17 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/core/MerchantConfig.rb +2 -0
  3. data/lib/cybersource_rest_client.rb +81 -5
  4. data/lib/cybersource_rest_client/api/authentication_exemptions_api.rb +89 -0
  5. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +154 -0
  6. data/lib/cybersource_rest_client/api/report_definitions_api.rb +9 -0
  7. data/lib/cybersource_rest_client/api/report_downloads_api.rb +3 -0
  8. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +79 -0
  9. data/lib/cybersource_rest_client/api/reports_api.rb +2 -2
  10. data/lib/cybersource_rest_client/api_client.rb +12 -0
  11. data/lib/cybersource_rest_client/models/authentication_exemptions_request.rb +228 -0
  12. data/lib/cybersource_rest_client/models/buyer_information.rb +20 -20
  13. data/lib/cybersource_rest_client/models/check_payer_auth_enrollment_request.rb +284 -0
  14. data/lib/cybersource_rest_client/models/create_payment_instrument_request.rb +2 -41
  15. data/lib/cybersource_rest_client/models/create_report_subscription_request.rb +27 -2
  16. data/lib/cybersource_rest_client/models/embedded_instrument_identifier_request.rb +226 -0
  17. data/lib/cybersource_rest_client/models/{embedded_instrument_identifier.rb → embedded_instrument_identifier_response.rb} +11 -2
  18. data/lib/cybersource_rest_client/models/{tms_v1_instrument_identifiers_delete409_response__links_payment_instruments.rb → instrument_identifier_payment_instruments_link.rb} +1 -1
  19. data/lib/cybersource_rest_client/models/{instrument_identifier.rb → instrument_identifier_response.rb} +11 -2
  20. data/lib/cybersource_rest_client/models/issuer.rb +208 -0
  21. data/lib/cybersource_rest_client/models/links.rb +10 -1
  22. data/lib/cybersource_rest_client/models/model_409_links.rb +1 -1
  23. data/lib/cybersource_rest_client/models/payment_instrument.rb +9 -9
  24. data/lib/cybersource_rest_client/models/payment_instrument_card.rb +2 -2
  25. data/lib/cybersource_rest_client/models/payment_instrument_instrument_identifier_request.rb +246 -0
  26. data/lib/cybersource_rest_client/models/payment_instrument_self_link.rb +183 -0
  27. data/lib/cybersource_rest_client/models/payment_instruments_links.rb +183 -0
  28. data/lib/cybersource_rest_client/models/personal_identification.rb +1 -1
  29. data/lib/cybersource_rest_client/models/predefined_subscription_request_bean.rb +392 -0
  30. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +225 -0
  31. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +1 -1
  32. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv.rb +2 -2
  33. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information_merchant_descriptor.rb +0 -15
  34. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +2 -2
  35. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +1 -1
  36. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +60 -0
  37. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +22 -27
  38. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +2 -2
  39. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +26 -1
  40. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +4 -4
  41. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +2 -2
  42. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +1 -1
  43. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +2 -2
  44. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +1 -1
  45. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +270 -0
  46. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +2 -2
  47. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +1 -1
  48. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +2 -2
  49. data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.rb +0 -30
  50. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +2 -2
  51. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +2 -2
  52. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options.rb +1 -1
  53. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb +23 -4
  54. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response.rb +23 -4
  55. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response_default_settings.rb +255 -0
  56. data/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb +27 -2
  57. data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response__link.rb +183 -0
  58. data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response__link_report_download.rb +192 -0
  59. data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response_report_search_results.rb +13 -4
  60. data/lib/cybersource_rest_client/models/request.rb +210 -0
  61. data/lib/cybersource_rest_client/models/risk_v1_authentication_excemptions_post400_response.rb +225 -0
  62. data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_consumer_authentication_information_strong_authentication.rb +269 -0
  63. data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_post201_response.rb +255 -0
  64. data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_post201_response_consumer_authentication_information.rb +183 -0
  65. data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_post201_response_risk_information.rb +199 -0
  66. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response.rb +285 -0
  67. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +324 -0
  68. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response.rb +294 -0
  69. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_consumer_authentication_information.rb +444 -0
  70. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information.rb +183 -0
  71. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information_amount_details.rb +199 -0
  72. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_acquirer_information.rb +199 -0
  73. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_device_information.rb +183 -0
  74. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_merchant_information.rb +258 -0
  75. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_merchant_information_merchant_descriptor.rb +229 -0
  76. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information.rb +212 -0
  77. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information_bill_to.rb +496 -0
  78. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information_line_items.rb +283 -0
  79. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information_ship_to.rb +399 -0
  80. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_payment_information.rb +192 -0
  81. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_payment_information_card.rb +325 -0
  82. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_payment_information_tokenized_card.rb +291 -0
  83. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +524 -0
  84. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information.rb +194 -0
  85. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information_line_items.rb +267 -0
  86. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information.rb +192 -0
  87. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +298 -0
  88. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +264 -0
  89. data/lib/cybersource_rest_client/models/riskv1authentications_acquirer_information.rb +274 -0
  90. data/lib/cybersource_rest_client/models/riskv1authentications_buyer_information.rb +196 -0
  91. data/lib/cybersource_rest_client/models/riskv1authentications_client_reference_information.rb +208 -0
  92. data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information.rb +1359 -0
  93. data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information_ivr.rb +319 -0
  94. data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information_strong_authentication.rb +199 -0
  95. data/lib/cybersource_rest_client/models/riskv1authentications_device_information.rb +430 -0
  96. data/lib/cybersource_rest_client/models/riskv1authentications_device_information_raw_data.rb +209 -0
  97. data/lib/cybersource_rest_client/models/riskv1authentications_merchant_information.rb +208 -0
  98. data/lib/cybersource_rest_client/models/{tss_v2_transactions_get200_response_payment_information_payment_type_funding_source.rb → riskv1authentications_merchant_information_merchant_descriptor.rb} +25 -40
  99. data/lib/cybersource_rest_client/models/riskv1authentications_order_information.rb +283 -0
  100. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_line_items.rb +396 -0
  101. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_ship_to.rb +459 -0
  102. data/lib/cybersource_rest_client/models/riskv1authentications_recurring_payment_information.rb +235 -0
  103. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information.rb +183 -0
  104. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history.rb +262 -0
  105. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_account_history.rb +209 -0
  106. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_customer_account.rb +279 -0
  107. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information.rb +206 -0
  108. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_legs.rb +259 -0
  109. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_passengers.rb +224 -0
  110. data/lib/cybersource_rest_client/models/riskv1decisions_device_information.rb +26 -1
  111. data/lib/cybersource_rest_client/models/riskv1decisions_order_information.rb +13 -4
  112. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_address.rb +325 -0
  113. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_bill_to.rb +26 -1
  114. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information.rb +13 -4
  115. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_bank.rb +275 -0
  116. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +2 -2
  117. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
  118. data/lib/cybersource_rest_client/models/riskv1decisions_risk_information.rb +13 -4
  119. data/lib/cybersource_rest_client/models/riskv1decisions_risk_information_marking_details.rb +275 -0
  120. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_delete409_response__links.rb +1 -1
  121. data/lib/cybersource_rest_client/models/{tms_v1_instrument_identifiers_payment_instruments_get200_response_instrument_identifier.rb → tms_v1_instrument_identifiers_payment_instruments_embedded_instrument_identifier.rb} +11 -2
  122. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded__embedded.rb +183 -0
  123. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded__links.rb +183 -0
  124. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded__links_self.rb +183 -0
  125. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_buyer_information.rb +20 -20
  126. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_card.rb +2 -2
  127. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_payment_instruments.rb +9 -9
  128. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_personal_identification.rb +1 -1
  129. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response.rb +10 -1
  130. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response__links.rb +10 -1
  131. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response__links_payment_instruments.rb +183 -0
  132. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response_issuer.rb +208 -0
  133. data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_card.rb +1 -1
  134. data/lib/cybersource_rest_client/models/tmsv1paymentinstruments_instrument_identifier.rb +226 -0
  135. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information_applications.rb +1 -1
  136. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb +3 -3
  137. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +1 -1
  138. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb +12 -31
  139. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +1 -1
  140. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb +2 -2
  141. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +1 -1
  142. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_type.rb +9 -9
  143. data/lib/cybersource_rest_client/models/update_payment_instrument_request.rb +2 -41
  144. data/lib/cybersource_rest_client/utilities/flex/token_verification.rb +42 -0
  145. metadata +79 -7
@@ -41,6 +41,9 @@ module CyberSource
41
41
  # Customer's email address, including the full domain name. #### CyberSource through VisaNet Credit card networks cannot process transactions that contain non-ASCII characters. CyberSource through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent CyberSource through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, CyberSource through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. For processor-specific information, see the `customer_email` request-level field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html) #### Invoicing Email address for the customer for sending the invoice. If the invoice is in SENT status and email is updated, the old email customer payment link won't work and you must resend the invoice with the new payment link.
42
42
  attr_accessor :email
43
43
 
44
+ # Email domain of the customer. The domain of the email address comprises all characters that follow the @ symbol, such as mail.example.com. For the Risk Update service, if the email address and the domain are sent in the request, the domain supersedes the email address.
45
+ attr_accessor :email_domain
46
+
44
47
  # Postal code for the billing address. The postal code must consist of 5 to 9 digits. When the billing country is the U.S., the 9-digit postal code must follow this format: [5 digits][dash][4 digits] **Example** `12345-6789` When the billing country is Canada, the 6-digit postal code must follow this format: [alpha][numeric][alpha][space][numeric][alpha][numeric] **Example** `A1B 2C3` **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. #### For Payouts: This field may be sent only for FDC Compass. #### American Express Direct Before sending the postal code to the processor, CyberSource removes all nonalphanumeric characters and, if the remaining value is longer than nine characters, truncates the value starting from the right side. #### Atos This field must not contain colons (:). #### CyberSource through VisaNet Credit card networks cannot process transactions that contain non-ASCII characters. CyberSource through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent CyberSource through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, CyberSource through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks. For processor-specific information, see the `bill_zip` request-level field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
45
48
  attr_accessor :postal_code
46
49
 
@@ -56,6 +59,7 @@ module CyberSource
56
59
  :'last_name' => :'lastName',
57
60
  :'phone_number' => :'phoneNumber',
58
61
  :'email' => :'email',
62
+ :'email_domain' => :'emailDomain',
59
63
  :'postal_code' => :'postalCode'
60
64
  }
61
65
  end
@@ -72,6 +76,7 @@ module CyberSource
72
76
  :'last_name' => :'String',
73
77
  :'phone_number' => :'String',
74
78
  :'email' => :'String',
79
+ :'email_domain' => :'String',
75
80
  :'postal_code' => :'String'
76
81
  }
77
82
  end
@@ -120,6 +125,10 @@ module CyberSource
120
125
  self.email = attributes[:'email']
121
126
  end
122
127
 
128
+ if attributes.has_key?(:'emailDomain')
129
+ self.email_domain = attributes[:'emailDomain']
130
+ end
131
+
123
132
  if attributes.has_key?(:'postalCode')
124
133
  self.postal_code = attributes[:'postalCode']
125
134
  end
@@ -165,6 +174,10 @@ module CyberSource
165
174
  invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 255.')
166
175
  end
167
176
 
177
+ if !@email_domain.nil? && @email_domain.to_s.length > 100
178
+ invalid_properties.push('invalid value for "email_domain", the character length must be smaller than or equal to 100.')
179
+ end
180
+
168
181
  if !@postal_code.nil? && @postal_code.to_s.length > 10
169
182
  invalid_properties.push('invalid value for "postal_code", the character length must be smaller than or equal to 10.')
170
183
  end
@@ -184,6 +197,7 @@ module CyberSource
184
197
  return false if !@last_name.nil? && @last_name.to_s.length > 60
185
198
  return false if !@phone_number.nil? && @phone_number.to_s.length > 15
186
199
  return false if !@email.nil? && @email.to_s.length > 255
200
+ return false if !@email_domain.nil? && @email_domain.to_s.length > 100
187
201
  return false if !@postal_code.nil? && @postal_code.to_s.length > 10
188
202
  true
189
203
  end
@@ -278,6 +292,16 @@ module CyberSource
278
292
  @email = email
279
293
  end
280
294
 
295
+ # Custom attribute writer method with validation
296
+ # @param [Object] email_domain Value to be assigned
297
+ def email_domain=(email_domain)
298
+ if !email_domain.nil? && email_domain.to_s.length > 100
299
+ fail ArgumentError, 'invalid value for "email_domain", the character length must be smaller than or equal to 100.'
300
+ end
301
+
302
+ @email_domain = email_domain
303
+ end
304
+
281
305
  # Custom attribute writer method with validation
282
306
  # @param [Object] postal_code Value to be assigned
283
307
  def postal_code=(postal_code)
@@ -302,6 +326,7 @@ module CyberSource
302
326
  last_name == o.last_name &&
303
327
  phone_number == o.phone_number &&
304
328
  email == o.email &&
329
+ email_domain == o.email_domain &&
305
330
  postal_code == o.postal_code
306
331
  end
307
332
 
@@ -314,7 +339,7 @@ module CyberSource
314
339
  # Calculates hash code according to all attributes.
315
340
  # @return [Fixnum] Hash code
316
341
  def hash
317
- [address1, address2, administrative_area, country, locality, first_name, last_name, phone_number, email, postal_code].hash
342
+ [address1, address2, administrative_area, country, locality, first_name, last_name, phone_number, email, email_domain, postal_code].hash
318
343
  end
319
344
 
320
345
  # Builds the object from hash
@@ -19,11 +19,14 @@ module CyberSource
19
19
 
20
20
  attr_accessor :tokenized_card
21
21
 
22
+ attr_accessor :bank
23
+
22
24
  # Attribute mapping from ruby-style variable name to JSON key.
23
25
  def self.attribute_map
24
26
  {
25
27
  :'card' => :'card',
26
- :'tokenized_card' => :'tokenizedCard'
28
+ :'tokenized_card' => :'tokenizedCard',
29
+ :'bank' => :'bank'
27
30
  }
28
31
  end
29
32
 
@@ -31,7 +34,8 @@ module CyberSource
31
34
  def self.swagger_types
32
35
  {
33
36
  :'card' => :'Riskv1decisionsPaymentInformationCard',
34
- :'tokenized_card' => :'Riskv1decisionsPaymentInformationTokenizedCard'
37
+ :'tokenized_card' => :'Riskv1decisionsPaymentInformationTokenizedCard',
38
+ :'bank' => :'Riskv1decisionsPaymentInformationBank'
35
39
  }
36
40
  end
37
41
 
@@ -50,6 +54,10 @@ module CyberSource
50
54
  if attributes.has_key?(:'tokenizedCard')
51
55
  self.tokenized_card = attributes[:'tokenizedCard']
52
56
  end
57
+
58
+ if attributes.has_key?(:'bank')
59
+ self.bank = attributes[:'bank']
60
+ end
53
61
  end
54
62
 
55
63
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -71,7 +79,8 @@ module CyberSource
71
79
  return true if self.equal?(o)
72
80
  self.class == o.class &&
73
81
  card == o.card &&
74
- tokenized_card == o.tokenized_card
82
+ tokenized_card == o.tokenized_card &&
83
+ bank == o.bank
75
84
  end
76
85
 
77
86
  # @see the `==` method
@@ -83,7 +92,7 @@ module CyberSource
83
92
  # Calculates hash code according to all attributes.
84
93
  # @return [Fixnum] Hash code
85
94
  def hash
86
- [card, tokenized_card].hash
95
+ [card, tokenized_card, bank].hash
87
96
  end
88
97
 
89
98
  # Builds the object from hash
@@ -0,0 +1,275 @@
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
+ # Customer's bank account details
17
+ class Riskv1decisionsPaymentInformationBank
18
+ # Customer's bank account number. You can use this field only when scoring a direct debit transaction. Use this field if you do not or are not allowed to provide the IBAN. Note Do not use the IBAN in this field. Use nly the traditional account number information. For the IBAN, use bank_iban.
19
+ attr_accessor :account_number
20
+
21
+ # Country-specific code used to identify the customer’s bank. Required for some countries if you do not or are not allowed to provide the IBAN instead. You can use this field only when scoring a direct debit transaction. For specific requirements, see \"Required Bank Account Information by Country,\"
22
+ attr_accessor :code
23
+
24
+ # Country where the bank is located. Use the two-character ISO codes. You can use this field only when scoring a direct debit transaction.
25
+ attr_accessor :country
26
+
27
+ # International Bank Account Number (IBAN) for the bank account. For some countries you can provide this number instead of the traditional bank account information. You can use this field only when scoring a direct debit transaction. For specific requirements, see \"Required Bank Account Information by Country,\"
28
+ attr_accessor :iban
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'account_number' => :'accountNumber',
34
+ :'code' => :'code',
35
+ :'country' => :'country',
36
+ :'iban' => :'iban'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'account_number' => :'String',
44
+ :'code' => :'String',
45
+ :'country' => :'String',
46
+ :'iban' => :'String'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
+
58
+ if attributes.has_key?(:'accountNumber')
59
+ self.account_number = attributes[:'accountNumber']
60
+ end
61
+
62
+ if attributes.has_key?(:'code')
63
+ self.code = attributes[:'code']
64
+ end
65
+
66
+ if attributes.has_key?(:'country')
67
+ self.country = attributes[:'country']
68
+ end
69
+
70
+ if attributes.has_key?(:'iban')
71
+ self.iban = attributes[:'iban']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ if !@account_number.nil? && @account_number.to_s.length > 30
80
+ invalid_properties.push('invalid value for "account_number", the character length must be smaller than or equal to 30.')
81
+ end
82
+
83
+ if !@code.nil? && @code.to_s.length > 15
84
+ invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 15.')
85
+ end
86
+
87
+ if !@country.nil? && @country.to_s.length > 2
88
+ invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.')
89
+ end
90
+
91
+ if !@iban.nil? && @iban.to_s.length > 30
92
+ invalid_properties.push('invalid value for "iban", the character length must be smaller than or equal to 30.')
93
+ end
94
+
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ return false if !@account_number.nil? && @account_number.to_s.length > 30
102
+ return false if !@code.nil? && @code.to_s.length > 15
103
+ return false if !@country.nil? && @country.to_s.length > 2
104
+ return false if !@iban.nil? && @iban.to_s.length > 30
105
+ true
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param [Object] account_number Value to be assigned
110
+ def account_number=(account_number)
111
+ if !account_number.nil? && account_number.to_s.length > 30
112
+ fail ArgumentError, 'invalid value for "account_number", the character length must be smaller than or equal to 30.'
113
+ end
114
+
115
+ @account_number = account_number
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param [Object] code Value to be assigned
120
+ def code=(code)
121
+ if !code.nil? && code.to_s.length > 15
122
+ fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 15.'
123
+ end
124
+
125
+ @code = code
126
+ end
127
+
128
+ # Custom attribute writer method with validation
129
+ # @param [Object] country Value to be assigned
130
+ def country=(country)
131
+ if !country.nil? && country.to_s.length > 2
132
+ fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.'
133
+ end
134
+
135
+ @country = country
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] iban Value to be assigned
140
+ def iban=(iban)
141
+ if !iban.nil? && iban.to_s.length > 30
142
+ fail ArgumentError, 'invalid value for "iban", the character length must be smaller than or equal to 30.'
143
+ end
144
+
145
+ @iban = iban
146
+ end
147
+
148
+ # Checks equality by comparing each attribute.
149
+ # @param [Object] Object to be compared
150
+ def ==(o)
151
+ return true if self.equal?(o)
152
+ self.class == o.class &&
153
+ account_number == o.account_number &&
154
+ code == o.code &&
155
+ country == o.country &&
156
+ iban == o.iban
157
+ end
158
+
159
+ # @see the `==` method
160
+ # @param [Object] Object to be compared
161
+ def eql?(o)
162
+ self == o
163
+ end
164
+
165
+ # Calculates hash code according to all attributes.
166
+ # @return [Fixnum] Hash code
167
+ def hash
168
+ [account_number, code, country, iban].hash
169
+ end
170
+
171
+ # Builds the object from hash
172
+ # @param [Hash] attributes Model attributes in the form of hash
173
+ # @return [Object] Returns the model itself
174
+ def build_from_hash(attributes)
175
+ return nil unless attributes.is_a?(Hash)
176
+ self.class.swagger_types.each_pair do |key, type|
177
+ if type =~ /\AArray<(.*)>/i
178
+ # check to ensure the input is an array given that the the attribute
179
+ # is documented as an array but the input is not
180
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
181
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
182
+ end
183
+ elsif !attributes[self.class.attribute_map[key]].nil?
184
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
185
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
186
+ end
187
+
188
+ self
189
+ end
190
+
191
+ # Deserializes the data based on type
192
+ # @param string type Data type
193
+ # @param string value Value to be deserialized
194
+ # @return [Object] Deserialized data
195
+ def _deserialize(type, value)
196
+ case type.to_sym
197
+ when :DateTime
198
+ DateTime.parse(value)
199
+ when :Date
200
+ Date.parse(value)
201
+ when :String
202
+ value.to_s
203
+ when :Integer
204
+ value.to_i
205
+ when :Float
206
+ value.to_f
207
+ when :BOOLEAN
208
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
209
+ true
210
+ else
211
+ false
212
+ end
213
+ when :Object
214
+ # generic object (usually a Hash), return directly
215
+ value
216
+ when /\AArray<(?<inner_type>.+)>\z/
217
+ inner_type = Regexp.last_match[:inner_type]
218
+ value.map { |v| _deserialize(inner_type, v) }
219
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
220
+ k_type = Regexp.last_match[:k_type]
221
+ v_type = Regexp.last_match[:v_type]
222
+ {}.tap do |hash|
223
+ value.each do |k, v|
224
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
225
+ end
226
+ end
227
+ else # model
228
+ temp_model = CyberSource.const_get(type).new
229
+ temp_model.build_from_hash(value)
230
+ end
231
+ end
232
+
233
+ # Returns the string representation of the object
234
+ # @return [String] String presentation of the object
235
+ def to_s
236
+ to_hash.to_s
237
+ end
238
+
239
+ # to_body is an alias to to_hash (backward compatibility)
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_body
242
+ to_hash
243
+ end
244
+
245
+ # Returns the object in the form of hash
246
+ # @return [Hash] Returns the object in the form of hash
247
+ def to_hash
248
+ hash = {}
249
+ self.class.attribute_map.each_pair do |attr, param|
250
+ value = self.send(attr)
251
+ next if value.nil?
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ # Outputs non-array value in the form of hash
258
+ # For object, use to_hash. Otherwise, just return the value
259
+ # @param [Object] value Any valid value
260
+ # @return [Hash] Returns the value in the form of hash
261
+ def _to_hash(value)
262
+ if value.is_a?(Array)
263
+ value.compact.map { |v| _to_hash(v) }
264
+ elsif value.is_a?(Hash)
265
+ {}.tap do |hash|
266
+ value.each { |k, v| hash[k] = _to_hash(v) }
267
+ end
268
+ elsif value.respond_to? :to_hash
269
+ value.to_hash
270
+ else
271
+ value
272
+ end
273
+ end
274
+ end
275
+ end
@@ -15,10 +15,10 @@ require 'date'
15
15
  module CyberSource
16
16
  # Use this for a non-tokenized payment card.
17
17
  class Riskv1decisionsPaymentInformationCard
18
- # The customer’s payment card number, also knows as the Primary Account Nunmber (PAN). You can also use this field for encoded account numbers. For processor-specific information, see the `customer_cc_number` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
18
+ # The customer’s payment card number, also known as the Primary Account Number (PAN). You can also use this field for encoded account numbers. For processor-specific information, see the `customer_cc_number` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
19
19
  attr_accessor :number
20
20
 
21
- # Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
21
+ # Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 036: Cartes Bancaires - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
22
22
  attr_accessor :type
23
23
 
24
24
  # description: The BIN is the first six digits of the card's Primary Account Number (PAN).
@@ -15,7 +15,7 @@ require 'date'
15
15
  module CyberSource
16
16
  # Use this object to submit a payment network token instead of card-based values.
17
17
  class Riskv1decisionsPaymentInformationTokenizedCard
18
- # Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
18
+ # Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 036: Cartes Bancaires - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
19
19
  attr_accessor :type
20
20
 
21
21
  # Customer’s payment network token value.
@@ -19,11 +19,14 @@ module CyberSource
19
19
  # Specifies one of the following types of events: - login - account_creation - account_update For regular payment transactions, do not send this field.
20
20
  attr_accessor :event_type
21
21
 
22
+ attr_accessor :marking_details
23
+
22
24
  # Attribute mapping from ruby-style variable name to JSON key.
23
25
  def self.attribute_map
24
26
  {
25
27
  :'profile' => :'profile',
26
- :'event_type' => :'eventType'
28
+ :'event_type' => :'eventType',
29
+ :'marking_details' => :'markingDetails'
27
30
  }
28
31
  end
29
32
 
@@ -31,7 +34,8 @@ module CyberSource
31
34
  def self.swagger_types
32
35
  {
33
36
  :'profile' => :'Riskv1decisionsRiskInformationProfile',
34
- :'event_type' => :'String'
37
+ :'event_type' => :'String',
38
+ :'marking_details' => :'Riskv1decisionsRiskInformationMarkingDetails'
35
39
  }
36
40
  end
37
41
 
@@ -50,6 +54,10 @@ module CyberSource
50
54
  if attributes.has_key?(:'eventType')
51
55
  self.event_type = attributes[:'eventType']
52
56
  end
57
+
58
+ if attributes.has_key?(:'markingDetails')
59
+ self.marking_details = attributes[:'markingDetails']
60
+ end
53
61
  end
54
62
 
55
63
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -86,7 +94,8 @@ module CyberSource
86
94
  return true if self.equal?(o)
87
95
  self.class == o.class &&
88
96
  profile == o.profile &&
89
- event_type == o.event_type
97
+ event_type == o.event_type &&
98
+ marking_details == o.marking_details
90
99
  end
91
100
 
92
101
  # @see the `==` method
@@ -98,7 +107,7 @@ module CyberSource
98
107
  # Calculates hash code according to all attributes.
99
108
  # @return [Fixnum] Hash code
100
109
  def hash
101
- [profile, event_type].hash
110
+ [profile, event_type, marking_details].hash
102
111
  end
103
112
 
104
113
  # Builds the object from hash