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
@@ -0,0 +1,291 @@
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 Riskv1authenticationexemptionsPaymentInformationTokenizedCard
17
+ # 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)
18
+ attr_accessor :type
19
+
20
+ # One of two possible meanings: - The two-digit month in which a token expires. - The two-digit month in which a card expires. Format: `MM` Possible values: `01` through `12` **NOTE** The meaning of this field is dependent on the payment processor that is returning the value in an authorization reply. Please see the processor-specific details below. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`01` through `12`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (`card_type=039`), if there is no expiration date on the card, use `12`.\\ **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. #### Samsung Pay and Apple Pay Month in which the token expires. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. For processor-specific information, see the `customer_cc_expmo` field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
21
+ attr_accessor :expiration_month
22
+
23
+ # One of two possible meanings: - The four-digit year in which a token expires. - The four-digit year in which a card expires. Format: `YYYY` Possible values: `1900` through `3000` Data type: Non-negative integer **NOTE** The meaning of this field is dependent on the payment processor that is returning the value in an authorization reply. Please see the processor-specific details below. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (1900 through 3000) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (`card_ type=039`), if there is no expiration date on the card, use `2021`. #### FDC Nashville Global and FDMS South You can send in 2 digits or 4 digits. When you send in 2 digits, they must be the last 2 digits of the year. #### Samsung Pay and Apple Pay Year in which the token expires. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. **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_cc_expyr` or `token_expiration_year` field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
24
+ attr_accessor :expiration_year
25
+
26
+ # Customer’s payment network token value.
27
+ attr_accessor :number
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'type' => :'type',
33
+ :'expiration_month' => :'expirationMonth',
34
+ :'expiration_year' => :'expirationYear',
35
+ :'number' => :'number'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'type' => :'String',
43
+ :'expiration_month' => :'String',
44
+ :'expiration_year' => :'String',
45
+ :'number' => :'String'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'type')
58
+ self.type = attributes[:'type']
59
+ end
60
+
61
+ if attributes.has_key?(:'expirationMonth')
62
+ self.expiration_month = attributes[:'expirationMonth']
63
+ end
64
+
65
+ if attributes.has_key?(:'expirationYear')
66
+ self.expiration_year = attributes[:'expirationYear']
67
+ end
68
+
69
+ if attributes.has_key?(:'number')
70
+ self.number = attributes[:'number']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ if @type.nil?
79
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
80
+ end
81
+
82
+ if @expiration_month.nil?
83
+ invalid_properties.push('invalid value for "expiration_month", expiration_month cannot be nil.')
84
+ end
85
+
86
+ if @expiration_month.to_s.length > 2
87
+ invalid_properties.push('invalid value for "expiration_month", the character length must be smaller than or equal to 2.')
88
+ end
89
+
90
+ if @expiration_year.nil?
91
+ invalid_properties.push('invalid value for "expiration_year", expiration_year cannot be nil.')
92
+ end
93
+
94
+ if @expiration_year.to_s.length > 4
95
+ invalid_properties.push('invalid value for "expiration_year", the character length must be smaller than or equal to 4.')
96
+ end
97
+
98
+ if @number.nil?
99
+ invalid_properties.push('invalid value for "number", number cannot be nil.')
100
+ end
101
+
102
+ if @number.to_s.length > 20
103
+ invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ return false if @type.nil?
113
+ return false if @expiration_month.nil?
114
+ return false if @expiration_month.to_s.length > 2
115
+ return false if @expiration_year.nil?
116
+ return false if @expiration_year.to_s.length > 4
117
+ return false if @number.nil?
118
+ return false if @number.to_s.length > 20
119
+ true
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param [Object] expiration_month Value to be assigned
124
+ def expiration_month=(expiration_month)
125
+ if expiration_month.nil?
126
+ fail ArgumentError, 'expiration_month cannot be nil'
127
+ end
128
+
129
+ if expiration_month.to_s.length > 2
130
+ fail ArgumentError, 'invalid value for "expiration_month", the character length must be smaller than or equal to 2.'
131
+ end
132
+
133
+ @expiration_month = expiration_month
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param [Object] expiration_year Value to be assigned
138
+ def expiration_year=(expiration_year)
139
+ if expiration_year.nil?
140
+ fail ArgumentError, 'expiration_year cannot be nil'
141
+ end
142
+
143
+ if expiration_year.to_s.length > 4
144
+ fail ArgumentError, 'invalid value for "expiration_year", the character length must be smaller than or equal to 4.'
145
+ end
146
+
147
+ @expiration_year = expiration_year
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] number Value to be assigned
152
+ def number=(number)
153
+ if number.nil?
154
+ fail ArgumentError, 'number cannot be nil'
155
+ end
156
+
157
+ if number.to_s.length > 20
158
+ fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.'
159
+ end
160
+
161
+ @number = number
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ type == o.type &&
170
+ expiration_month == o.expiration_month &&
171
+ expiration_year == o.expiration_year &&
172
+ number == o.number
173
+ end
174
+
175
+ # @see the `==` method
176
+ # @param [Object] Object to be compared
177
+ def eql?(o)
178
+ self == o
179
+ end
180
+
181
+ # Calculates hash code according to all attributes.
182
+ # @return [Fixnum] Hash code
183
+ def hash
184
+ [type, expiration_month, expiration_year, number].hash
185
+ end
186
+
187
+ # Builds the object from hash
188
+ # @param [Hash] attributes Model attributes in the form of hash
189
+ # @return [Object] Returns the model itself
190
+ def build_from_hash(attributes)
191
+ return nil unless attributes.is_a?(Hash)
192
+ self.class.swagger_types.each_pair do |key, type|
193
+ if type =~ /\AArray<(.*)>/i
194
+ # check to ensure the input is an array given that the the attribute
195
+ # is documented as an array but the input is not
196
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
197
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
198
+ end
199
+ elsif !attributes[self.class.attribute_map[key]].nil?
200
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
201
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
202
+ end
203
+
204
+ self
205
+ end
206
+
207
+ # Deserializes the data based on type
208
+ # @param string type Data type
209
+ # @param string value Value to be deserialized
210
+ # @return [Object] Deserialized data
211
+ def _deserialize(type, value)
212
+ case type.to_sym
213
+ when :DateTime
214
+ DateTime.parse(value)
215
+ when :Date
216
+ Date.parse(value)
217
+ when :String
218
+ value.to_s
219
+ when :Integer
220
+ value.to_i
221
+ when :Float
222
+ value.to_f
223
+ when :BOOLEAN
224
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
225
+ true
226
+ else
227
+ false
228
+ end
229
+ when :Object
230
+ # generic object (usually a Hash), return directly
231
+ value
232
+ when /\AArray<(?<inner_type>.+)>\z/
233
+ inner_type = Regexp.last_match[:inner_type]
234
+ value.map { |v| _deserialize(inner_type, v) }
235
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
236
+ k_type = Regexp.last_match[:k_type]
237
+ v_type = Regexp.last_match[:v_type]
238
+ {}.tap do |hash|
239
+ value.each do |k, v|
240
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
241
+ end
242
+ end
243
+ else # model
244
+ temp_model = CyberSource.const_get(type).new
245
+ temp_model.build_from_hash(value)
246
+ end
247
+ end
248
+
249
+ # Returns the string representation of the object
250
+ # @return [String] String presentation of the object
251
+ def to_s
252
+ to_hash.to_s
253
+ end
254
+
255
+ # to_body is an alias to to_hash (backward compatibility)
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_body
258
+ to_hash
259
+ end
260
+
261
+ # Returns the object in the form of hash
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_hash
264
+ hash = {}
265
+ self.class.attribute_map.each_pair do |attr, param|
266
+ value = self.send(attr)
267
+ next if value.nil?
268
+ hash[param] = _to_hash(value)
269
+ end
270
+ hash
271
+ end
272
+
273
+ # Outputs non-array value in the form of hash
274
+ # For object, use to_hash. Otherwise, just return the value
275
+ # @param [Object] value Any valid value
276
+ # @return [Hash] Returns the value in the form of hash
277
+ def _to_hash(value)
278
+ if value.is_a?(Array)
279
+ value.compact.map { |v| _to_hash(v) }
280
+ elsif value.is_a?(Hash)
281
+ {}.tap do |hash|
282
+ value.each { |k, v| hash[k] = _to_hash(v) }
283
+ end
284
+ elsif value.respond_to? :to_hash
285
+ value.to_hash
286
+ else
287
+ value
288
+ end
289
+ end
290
+ end
291
+ end
@@ -0,0 +1,524 @@
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 Riskv1authenticationresultsConsumerAuthenticationInformation
17
+ # Identifies the UI Type the ACS will use to complete the challenge. **NOTE**: Only available for App transactions using the Cardinal Mobile SDK.
18
+ attr_accessor :acs_rendering_type
19
+
20
+ # Unique transaction identifier assigned by the ACS to identify a single transaction.
21
+ attr_accessor :acs_transaction_id
22
+
23
+ # Payer authentication transaction identifier passed to link the check enrollment and validate authentication messages. **Note**: Required for Standard integration for enroll service. Required for Hybrid integration for validate service.
24
+ attr_accessor :authentication_transaction_id
25
+
26
+ # Indicates the type of authentication that will be used to challenge the card holder. Possible Values: 01 - Static 02 - Dynamic 03 - OOB (Out of Band) 04 - Decoupled **NOTE**: EMV 3-D Secure version 2.1.0 supports values 01-03. Version 2.2.0 supports values 01-04. Decoupled authentication is not supported at this time.
27
+ attr_accessor :authentication_type
28
+
29
+ # An indicator as to why the transaction was canceled. Possible Values: - `01`: Cardholder selected Cancel. - `02`: Reserved for future EMVCo use (values invalid until defined by EMVCo). - `03`: Transaction Timed Out—Decoupled Authentication - `04`: Transaction timed out at ACS—other timeouts - `05`: Transaction Timed out at ACS - First CReq not received by ACS - `06`: Transaction Error - `07`: Unknown - `08`: Transaction Timed Out at SDK
30
+ attr_accessor :challenge_cancel_code
31
+
32
+ # This field describes the type of 3DS transaction flow that took place. It can be one of three possible flows; CH - Challenge FR - Frictionless FD - Frictionless with delegation, (challenge not generated by the issuer but by the scheme on behalf of the issuer).
33
+ attr_accessor :effective_authentication_type
34
+
35
+ # The directory server error code indicating a problem with this transaction.
36
+ attr_accessor :directory_server_error_code
37
+
38
+ # Directory server text and additional detail about the error for this transaction.
39
+ attr_accessor :directory_server_error_description
40
+
41
+ # Indicates the number of authentication cycles attempted by the cardholder and is tracked by the Issuing Banks ACS.Example: if customer gets the challenge window and enter in their one time password and hit submit then that interaction counter should just be 1. When customer gets the challenge window and the bank asks if they want to have the one time password sent to their phone or their email and they have to choose before going to the next screen to enter in their one time password then this interaction count would be 2. One for the selection of how they want the one time password delivered and another with them actually entering in the one time password and hitting the submit button.
42
+ attr_accessor :interaction_counter
43
+
44
+ # Provides additional information as to why the PAResStatus has a specific value.
45
+ attr_accessor :signed_pares_status_reason
46
+
47
+ # SDK unique transaction identifier that is generated on each new transaction.
48
+ attr_accessor :sdk_transaction_id
49
+
50
+ # Payer authentication result (PARes) message returned by the card-issuing bank. If you need to show proof of enrollment checking, you may need to decrypt and parse the string for the information required by the payment card company. For more information, see \"Storing Payer Authentication Data,\" page 160. Important The value is in base64. You must remove all carriage returns and line feeds before adding the PARes to the request.
51
+ attr_accessor :signed_pares
52
+
53
+ # Unique transaction identifier assigned by the 3DS Server to identify a single transaction.
54
+ attr_accessor :three_ds_server_transaction_id
55
+
56
+ # Enables the communication of trusted beneficiary/whitelist status between the ACS, the DS and the 3DS Requestor. Possible Values: Y - 3DS Requestor is whitelisted by cardholder N - 3DS Requestor is not whitelisted by cardholder
57
+ attr_accessor :white_list_status
58
+
59
+ # This data element will be populated by the system setting Whitelist Status. Possible Values: 01 - 3DS/ Server/ 02 – DS/03 - ACS
60
+ attr_accessor :white_list_status_source
61
+
62
+ # Attribute mapping from ruby-style variable name to JSON key.
63
+ def self.attribute_map
64
+ {
65
+ :'acs_rendering_type' => :'acsRenderingType',
66
+ :'acs_transaction_id' => :'acsTransactionId',
67
+ :'authentication_transaction_id' => :'authenticationTransactionId',
68
+ :'authentication_type' => :'authenticationType',
69
+ :'challenge_cancel_code' => :'challengeCancelCode',
70
+ :'effective_authentication_type' => :'effectiveAuthenticationType',
71
+ :'directory_server_error_code' => :'directoryServerErrorCode',
72
+ :'directory_server_error_description' => :'directoryServerErrorDescription',
73
+ :'interaction_counter' => :'interactionCounter',
74
+ :'signed_pares_status_reason' => :'signedParesStatusReason',
75
+ :'sdk_transaction_id' => :'sdkTransactionId',
76
+ :'signed_pares' => :'signedPares',
77
+ :'three_ds_server_transaction_id' => :'threeDSServerTransactionId',
78
+ :'white_list_status' => :'whiteListStatus',
79
+ :'white_list_status_source' => :'whiteListStatusSource'
80
+ }
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.swagger_types
85
+ {
86
+ :'acs_rendering_type' => :'String',
87
+ :'acs_transaction_id' => :'String',
88
+ :'authentication_transaction_id' => :'String',
89
+ :'authentication_type' => :'String',
90
+ :'challenge_cancel_code' => :'String',
91
+ :'effective_authentication_type' => :'String',
92
+ :'directory_server_error_code' => :'String',
93
+ :'directory_server_error_description' => :'String',
94
+ :'interaction_counter' => :'String',
95
+ :'signed_pares_status_reason' => :'String',
96
+ :'sdk_transaction_id' => :'String',
97
+ :'signed_pares' => :'String',
98
+ :'three_ds_server_transaction_id' => :'String',
99
+ :'white_list_status' => :'String',
100
+ :'white_list_status_source' => :'String'
101
+ }
102
+ end
103
+
104
+ # Initializes the object
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ def initialize(attributes = {})
107
+ return unless attributes.is_a?(Hash)
108
+
109
+ # convert string to symbol for hash key
110
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
111
+
112
+ if attributes.has_key?(:'acsRenderingType')
113
+ self.acs_rendering_type = attributes[:'acsRenderingType']
114
+ end
115
+
116
+ if attributes.has_key?(:'acsTransactionId')
117
+ self.acs_transaction_id = attributes[:'acsTransactionId']
118
+ end
119
+
120
+ if attributes.has_key?(:'authenticationTransactionId')
121
+ self.authentication_transaction_id = attributes[:'authenticationTransactionId']
122
+ end
123
+
124
+ if attributes.has_key?(:'authenticationType')
125
+ self.authentication_type = attributes[:'authenticationType']
126
+ end
127
+
128
+ if attributes.has_key?(:'challengeCancelCode')
129
+ self.challenge_cancel_code = attributes[:'challengeCancelCode']
130
+ end
131
+
132
+ if attributes.has_key?(:'effectiveAuthenticationType')
133
+ self.effective_authentication_type = attributes[:'effectiveAuthenticationType']
134
+ end
135
+
136
+ if attributes.has_key?(:'directoryServerErrorCode')
137
+ self.directory_server_error_code = attributes[:'directoryServerErrorCode']
138
+ end
139
+
140
+ if attributes.has_key?(:'directoryServerErrorDescription')
141
+ self.directory_server_error_description = attributes[:'directoryServerErrorDescription']
142
+ end
143
+
144
+ if attributes.has_key?(:'interactionCounter')
145
+ self.interaction_counter = attributes[:'interactionCounter']
146
+ end
147
+
148
+ if attributes.has_key?(:'signedParesStatusReason')
149
+ self.signed_pares_status_reason = attributes[:'signedParesStatusReason']
150
+ end
151
+
152
+ if attributes.has_key?(:'sdkTransactionId')
153
+ self.sdk_transaction_id = attributes[:'sdkTransactionId']
154
+ end
155
+
156
+ if attributes.has_key?(:'signedPares')
157
+ self.signed_pares = attributes[:'signedPares']
158
+ end
159
+
160
+ if attributes.has_key?(:'threeDSServerTransactionId')
161
+ self.three_ds_server_transaction_id = attributes[:'threeDSServerTransactionId']
162
+ end
163
+
164
+ if attributes.has_key?(:'whiteListStatus')
165
+ self.white_list_status = attributes[:'whiteListStatus']
166
+ end
167
+
168
+ if attributes.has_key?(:'whiteListStatusSource')
169
+ self.white_list_status_source = attributes[:'whiteListStatusSource']
170
+ end
171
+ end
172
+
173
+ # Show invalid properties with the reasons. Usually used together with valid?
174
+ # @return Array for valid properties with the reasons
175
+ def list_invalid_properties
176
+ invalid_properties = Array.new
177
+ if !@acs_transaction_id.nil? && @acs_transaction_id.to_s.length > 36
178
+ invalid_properties.push('invalid value for "acs_transaction_id", the character length must be smaller than or equal to 36.')
179
+ end
180
+
181
+ if !@authentication_transaction_id.nil? && @authentication_transaction_id.to_s.length > 20
182
+ invalid_properties.push('invalid value for "authentication_transaction_id", the character length must be smaller than or equal to 20.')
183
+ end
184
+
185
+ if !@authentication_type.nil? && @authentication_type.to_s.length > 2
186
+ invalid_properties.push('invalid value for "authentication_type", the character length must be smaller than or equal to 2.')
187
+ end
188
+
189
+ if !@challenge_cancel_code.nil? && @challenge_cancel_code.to_s.length > 2
190
+ invalid_properties.push('invalid value for "challenge_cancel_code", the character length must be smaller than or equal to 2.')
191
+ end
192
+
193
+ if !@effective_authentication_type.nil? && @effective_authentication_type.to_s.length > 2
194
+ invalid_properties.push('invalid value for "effective_authentication_type", the character length must be smaller than or equal to 2.')
195
+ end
196
+
197
+ if !@directory_server_error_code.nil? && @directory_server_error_code.to_s.length > 3
198
+ invalid_properties.push('invalid value for "directory_server_error_code", the character length must be smaller than or equal to 3.')
199
+ end
200
+
201
+ if !@directory_server_error_description.nil? && @directory_server_error_description.to_s.length > 4096
202
+ invalid_properties.push('invalid value for "directory_server_error_description", the character length must be smaller than or equal to 4096.')
203
+ end
204
+
205
+ if !@interaction_counter.nil? && @interaction_counter.to_s.length > 2
206
+ invalid_properties.push('invalid value for "interaction_counter", the character length must be smaller than or equal to 2.')
207
+ end
208
+
209
+ if !@signed_pares_status_reason.nil? && @signed_pares_status_reason.to_s.length > 2
210
+ invalid_properties.push('invalid value for "signed_pares_status_reason", the character length must be smaller than or equal to 2.')
211
+ end
212
+
213
+ if !@sdk_transaction_id.nil? && @sdk_transaction_id.to_s.length > 36
214
+ invalid_properties.push('invalid value for "sdk_transaction_id", the character length must be smaller than or equal to 36.')
215
+ end
216
+
217
+ if @signed_pares.nil?
218
+ invalid_properties.push('invalid value for "signed_pares", signed_pares cannot be nil.')
219
+ end
220
+
221
+ if !@three_ds_server_transaction_id.nil? && @three_ds_server_transaction_id.to_s.length > 36
222
+ invalid_properties.push('invalid value for "three_ds_server_transaction_id", the character length must be smaller than or equal to 36.')
223
+ end
224
+
225
+ if !@white_list_status.nil? && @white_list_status.to_s.length > 1
226
+ invalid_properties.push('invalid value for "white_list_status", the character length must be smaller than or equal to 1.')
227
+ end
228
+
229
+ if !@white_list_status_source.nil? && @white_list_status_source.to_s.length > 2
230
+ invalid_properties.push('invalid value for "white_list_status_source", the character length must be smaller than or equal to 2.')
231
+ end
232
+
233
+ invalid_properties
234
+ end
235
+
236
+ # Check to see if the all the properties in the model are valid
237
+ # @return true if the model is valid
238
+ def valid?
239
+ return false if !@acs_transaction_id.nil? && @acs_transaction_id.to_s.length > 36
240
+ return false if !@authentication_transaction_id.nil? && @authentication_transaction_id.to_s.length > 20
241
+ return false if !@authentication_type.nil? && @authentication_type.to_s.length > 2
242
+ return false if !@challenge_cancel_code.nil? && @challenge_cancel_code.to_s.length > 2
243
+ return false if !@effective_authentication_type.nil? && @effective_authentication_type.to_s.length > 2
244
+ return false if !@directory_server_error_code.nil? && @directory_server_error_code.to_s.length > 3
245
+ return false if !@directory_server_error_description.nil? && @directory_server_error_description.to_s.length > 4096
246
+ return false if !@interaction_counter.nil? && @interaction_counter.to_s.length > 2
247
+ return false if !@signed_pares_status_reason.nil? && @signed_pares_status_reason.to_s.length > 2
248
+ return false if !@sdk_transaction_id.nil? && @sdk_transaction_id.to_s.length > 36
249
+ return false if @signed_pares.nil?
250
+ return false if !@three_ds_server_transaction_id.nil? && @three_ds_server_transaction_id.to_s.length > 36
251
+ return false if !@white_list_status.nil? && @white_list_status.to_s.length > 1
252
+ return false if !@white_list_status_source.nil? && @white_list_status_source.to_s.length > 2
253
+ true
254
+ end
255
+
256
+ # Custom attribute writer method with validation
257
+ # @param [Object] acs_transaction_id Value to be assigned
258
+ def acs_transaction_id=(acs_transaction_id)
259
+ if !acs_transaction_id.nil? && acs_transaction_id.to_s.length > 36
260
+ fail ArgumentError, 'invalid value for "acs_transaction_id", the character length must be smaller than or equal to 36.'
261
+ end
262
+
263
+ @acs_transaction_id = acs_transaction_id
264
+ end
265
+
266
+ # Custom attribute writer method with validation
267
+ # @param [Object] authentication_transaction_id Value to be assigned
268
+ def authentication_transaction_id=(authentication_transaction_id)
269
+ if !authentication_transaction_id.nil? && authentication_transaction_id.to_s.length > 20
270
+ fail ArgumentError, 'invalid value for "authentication_transaction_id", the character length must be smaller than or equal to 20.'
271
+ end
272
+
273
+ @authentication_transaction_id = authentication_transaction_id
274
+ end
275
+
276
+ # Custom attribute writer method with validation
277
+ # @param [Object] authentication_type Value to be assigned
278
+ def authentication_type=(authentication_type)
279
+ if !authentication_type.nil? && authentication_type.to_s.length > 2
280
+ fail ArgumentError, 'invalid value for "authentication_type", the character length must be smaller than or equal to 2.'
281
+ end
282
+
283
+ @authentication_type = authentication_type
284
+ end
285
+
286
+ # Custom attribute writer method with validation
287
+ # @param [Object] challenge_cancel_code Value to be assigned
288
+ def challenge_cancel_code=(challenge_cancel_code)
289
+ if !challenge_cancel_code.nil? && challenge_cancel_code.to_s.length > 2
290
+ fail ArgumentError, 'invalid value for "challenge_cancel_code", the character length must be smaller than or equal to 2.'
291
+ end
292
+
293
+ @challenge_cancel_code = challenge_cancel_code
294
+ end
295
+
296
+ # Custom attribute writer method with validation
297
+ # @param [Object] effective_authentication_type Value to be assigned
298
+ def effective_authentication_type=(effective_authentication_type)
299
+ if !effective_authentication_type.nil? && effective_authentication_type.to_s.length > 2
300
+ fail ArgumentError, 'invalid value for "effective_authentication_type", the character length must be smaller than or equal to 2.'
301
+ end
302
+
303
+ @effective_authentication_type = effective_authentication_type
304
+ end
305
+
306
+ # Custom attribute writer method with validation
307
+ # @param [Object] directory_server_error_code Value to be assigned
308
+ def directory_server_error_code=(directory_server_error_code)
309
+ if !directory_server_error_code.nil? && directory_server_error_code.to_s.length > 3
310
+ fail ArgumentError, 'invalid value for "directory_server_error_code", the character length must be smaller than or equal to 3.'
311
+ end
312
+
313
+ @directory_server_error_code = directory_server_error_code
314
+ end
315
+
316
+ # Custom attribute writer method with validation
317
+ # @param [Object] directory_server_error_description Value to be assigned
318
+ def directory_server_error_description=(directory_server_error_description)
319
+ if !directory_server_error_description.nil? && directory_server_error_description.to_s.length > 4096
320
+ fail ArgumentError, 'invalid value for "directory_server_error_description", the character length must be smaller than or equal to 4096.'
321
+ end
322
+
323
+ @directory_server_error_description = directory_server_error_description
324
+ end
325
+
326
+ # Custom attribute writer method with validation
327
+ # @param [Object] interaction_counter Value to be assigned
328
+ def interaction_counter=(interaction_counter)
329
+ if !interaction_counter.nil? && interaction_counter.to_s.length > 2
330
+ fail ArgumentError, 'invalid value for "interaction_counter", the character length must be smaller than or equal to 2.'
331
+ end
332
+
333
+ @interaction_counter = interaction_counter
334
+ end
335
+
336
+ # Custom attribute writer method with validation
337
+ # @param [Object] signed_pares_status_reason Value to be assigned
338
+ def signed_pares_status_reason=(signed_pares_status_reason)
339
+ if !signed_pares_status_reason.nil? && signed_pares_status_reason.to_s.length > 2
340
+ fail ArgumentError, 'invalid value for "signed_pares_status_reason", the character length must be smaller than or equal to 2.'
341
+ end
342
+
343
+ @signed_pares_status_reason = signed_pares_status_reason
344
+ end
345
+
346
+ # Custom attribute writer method with validation
347
+ # @param [Object] sdk_transaction_id Value to be assigned
348
+ def sdk_transaction_id=(sdk_transaction_id)
349
+ if !sdk_transaction_id.nil? && sdk_transaction_id.to_s.length > 36
350
+ fail ArgumentError, 'invalid value for "sdk_transaction_id", the character length must be smaller than or equal to 36.'
351
+ end
352
+
353
+ @sdk_transaction_id = sdk_transaction_id
354
+ end
355
+
356
+ # Custom attribute writer method with validation
357
+ # @param [Object] three_ds_server_transaction_id Value to be assigned
358
+ def three_ds_server_transaction_id=(three_ds_server_transaction_id)
359
+ if !three_ds_server_transaction_id.nil? && three_ds_server_transaction_id.to_s.length > 36
360
+ fail ArgumentError, 'invalid value for "three_ds_server_transaction_id", the character length must be smaller than or equal to 36.'
361
+ end
362
+
363
+ @three_ds_server_transaction_id = three_ds_server_transaction_id
364
+ end
365
+
366
+ # Custom attribute writer method with validation
367
+ # @param [Object] white_list_status Value to be assigned
368
+ def white_list_status=(white_list_status)
369
+ if !white_list_status.nil? && white_list_status.to_s.length > 1
370
+ fail ArgumentError, 'invalid value for "white_list_status", the character length must be smaller than or equal to 1.'
371
+ end
372
+
373
+ @white_list_status = white_list_status
374
+ end
375
+
376
+ # Custom attribute writer method with validation
377
+ # @param [Object] white_list_status_source Value to be assigned
378
+ def white_list_status_source=(white_list_status_source)
379
+ if !white_list_status_source.nil? && white_list_status_source.to_s.length > 2
380
+ fail ArgumentError, 'invalid value for "white_list_status_source", the character length must be smaller than or equal to 2.'
381
+ end
382
+
383
+ @white_list_status_source = white_list_status_source
384
+ end
385
+
386
+ # Checks equality by comparing each attribute.
387
+ # @param [Object] Object to be compared
388
+ def ==(o)
389
+ return true if self.equal?(o)
390
+ self.class == o.class &&
391
+ acs_rendering_type == o.acs_rendering_type &&
392
+ acs_transaction_id == o.acs_transaction_id &&
393
+ authentication_transaction_id == o.authentication_transaction_id &&
394
+ authentication_type == o.authentication_type &&
395
+ challenge_cancel_code == o.challenge_cancel_code &&
396
+ effective_authentication_type == o.effective_authentication_type &&
397
+ directory_server_error_code == o.directory_server_error_code &&
398
+ directory_server_error_description == o.directory_server_error_description &&
399
+ interaction_counter == o.interaction_counter &&
400
+ signed_pares_status_reason == o.signed_pares_status_reason &&
401
+ sdk_transaction_id == o.sdk_transaction_id &&
402
+ signed_pares == o.signed_pares &&
403
+ three_ds_server_transaction_id == o.three_ds_server_transaction_id &&
404
+ white_list_status == o.white_list_status &&
405
+ white_list_status_source == o.white_list_status_source
406
+ end
407
+
408
+ # @see the `==` method
409
+ # @param [Object] Object to be compared
410
+ def eql?(o)
411
+ self == o
412
+ end
413
+
414
+ # Calculates hash code according to all attributes.
415
+ # @return [Fixnum] Hash code
416
+ def hash
417
+ [acs_rendering_type, acs_transaction_id, authentication_transaction_id, authentication_type, challenge_cancel_code, effective_authentication_type, directory_server_error_code, directory_server_error_description, interaction_counter, signed_pares_status_reason, sdk_transaction_id, signed_pares, three_ds_server_transaction_id, white_list_status, white_list_status_source].hash
418
+ end
419
+
420
+ # Builds the object from hash
421
+ # @param [Hash] attributes Model attributes in the form of hash
422
+ # @return [Object] Returns the model itself
423
+ def build_from_hash(attributes)
424
+ return nil unless attributes.is_a?(Hash)
425
+ self.class.swagger_types.each_pair do |key, type|
426
+ if type =~ /\AArray<(.*)>/i
427
+ # check to ensure the input is an array given that the the attribute
428
+ # is documented as an array but the input is not
429
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
430
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
431
+ end
432
+ elsif !attributes[self.class.attribute_map[key]].nil?
433
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
434
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
435
+ end
436
+
437
+ self
438
+ end
439
+
440
+ # Deserializes the data based on type
441
+ # @param string type Data type
442
+ # @param string value Value to be deserialized
443
+ # @return [Object] Deserialized data
444
+ def _deserialize(type, value)
445
+ case type.to_sym
446
+ when :DateTime
447
+ DateTime.parse(value)
448
+ when :Date
449
+ Date.parse(value)
450
+ when :String
451
+ value.to_s
452
+ when :Integer
453
+ value.to_i
454
+ when :Float
455
+ value.to_f
456
+ when :BOOLEAN
457
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
458
+ true
459
+ else
460
+ false
461
+ end
462
+ when :Object
463
+ # generic object (usually a Hash), return directly
464
+ value
465
+ when /\AArray<(?<inner_type>.+)>\z/
466
+ inner_type = Regexp.last_match[:inner_type]
467
+ value.map { |v| _deserialize(inner_type, v) }
468
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
469
+ k_type = Regexp.last_match[:k_type]
470
+ v_type = Regexp.last_match[:v_type]
471
+ {}.tap do |hash|
472
+ value.each do |k, v|
473
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
474
+ end
475
+ end
476
+ else # model
477
+ temp_model = CyberSource.const_get(type).new
478
+ temp_model.build_from_hash(value)
479
+ end
480
+ end
481
+
482
+ # Returns the string representation of the object
483
+ # @return [String] String presentation of the object
484
+ def to_s
485
+ to_hash.to_s
486
+ end
487
+
488
+ # to_body is an alias to to_hash (backward compatibility)
489
+ # @return [Hash] Returns the object in the form of hash
490
+ def to_body
491
+ to_hash
492
+ end
493
+
494
+ # Returns the object in the form of hash
495
+ # @return [Hash] Returns the object in the form of hash
496
+ def to_hash
497
+ hash = {}
498
+ self.class.attribute_map.each_pair do |attr, param|
499
+ value = self.send(attr)
500
+ next if value.nil?
501
+ hash[param] = _to_hash(value)
502
+ end
503
+ hash
504
+ end
505
+
506
+ # Outputs non-array value in the form of hash
507
+ # For object, use to_hash. Otherwise, just return the value
508
+ # @param [Object] value Any valid value
509
+ # @return [Hash] Returns the value in the form of hash
510
+ def _to_hash(value)
511
+ if value.is_a?(Array)
512
+ value.compact.map { |v| _to_hash(v) }
513
+ elsif value.is_a?(Hash)
514
+ {}.tap do |hash|
515
+ value.each { |k, v| hash[k] = _to_hash(v) }
516
+ end
517
+ elsif value.respond_to? :to_hash
518
+ value.to_hash
519
+ else
520
+ value
521
+ end
522
+ end
523
+ end
524
+ end