cybersource_rest_client 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client.rb +3 -39
  3. data/lib/cybersource_rest_client/api/conversion_details_api.rb +4 -4
  4. data/lib/cybersource_rest_client/api/decision_manager_api.rb +2 -2
  5. data/lib/cybersource_rest_client/api/net_fundings_api.rb +4 -4
  6. data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +4 -4
  7. data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +4 -10
  8. data/lib/cybersource_rest_client/api/report_downloads_api.rb +2 -2
  9. data/lib/cybersource_rest_client/api/reports_api.rb +12 -25
  10. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +4 -4
  11. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +6 -6
  12. data/lib/cybersource_rest_client/models/capture_payment_request.rb +1 -1
  13. data/lib/cybersource_rest_client/models/create_credit_request.rb +1 -1
  14. data/lib/cybersource_rest_client/models/create_payment_instrument_request.rb +2 -48
  15. data/lib/cybersource_rest_client/models/create_payment_request.rb +1 -1
  16. data/lib/cybersource_rest_client/models/create_search_request.rb +2 -2
  17. data/lib/cybersource_rest_client/models/embedded_instrument_identifier.rb +2 -48
  18. data/lib/cybersource_rest_client/models/file_detail.rb +1 -35
  19. data/lib/cybersource_rest_client/models/instrument_identifier.rb +2 -48
  20. data/lib/cybersource_rest_client/models/payment_instrument.rb +2 -48
  21. data/lib/cybersource_rest_client/models/payment_instrument_bank_account.rb +0 -34
  22. data/lib/cybersource_rest_client/models/payment_instrument_card.rb +2 -36
  23. data/lib/cybersource_rest_client/models/payment_instruments_for_instrument_identifier.rb +1 -35
  24. data/lib/cybersource_rest_client/models/personal_identification.rb +1 -35
  25. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb +0 -34
  26. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response.rb +0 -34
  27. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post400_response.rb +0 -46
  28. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +0 -34
  29. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb +0 -34
  30. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information_details.rb +0 -34
  31. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_issuer_information.rb +1 -1
  32. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_account_features.rb +13 -37
  33. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_bank.rb +1 -1
  34. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +2 -2
  35. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +7 -7
  36. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_avs.rb +15 -0
  37. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_card_verification.rb +1 -1
  38. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb +1 -1
  39. data/lib/cybersource_rest_client/models/pts_v2_payments_post400_response.rb +0 -46
  40. data/lib/cybersource_rest_client/models/pts_v2_payments_post502_response.rb +1 -47
  41. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +0 -34
  42. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +1 -1
  43. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb +0 -46
  44. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb +0 -34
  45. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +3 -3
  46. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb +0 -46
  47. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response.rb +0 -34
  48. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post400_response.rb +0 -46
  49. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response.rb +0 -34
  50. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_error_information.rb +0 -34
  51. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_order_information_amount_details.rb +1 -1
  52. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information.rb +1 -1
  53. data/lib/cybersource_rest_client/models/pts_v2_payouts_post400_response.rb +0 -34
  54. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information_bank_transfer_options.rb +1 -1
  55. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information.rb +2 -2
  56. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +9 -9
  57. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb +0 -34
  58. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +6 -6
  59. data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +5 -5
  60. data/lib/cybersource_rest_client/models/ptsv2payments_issuer_information.rb +1 -1
  61. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_defined_information.rb +1 -1
  62. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +1 -1
  63. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_initiated_transaction.rb +2 -2
  64. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +3 -3
  65. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_amex_additional_amounts.rb +1 -1
  66. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_surcharge.rb +1 -1
  67. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details.rb +7 -41
  68. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +32 -50
  69. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +1 -1
  70. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +4 -4
  71. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +1 -1
  72. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank_account.rb +1 -1
  73. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +3 -3
  74. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +1 -1
  75. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +4 -26
  76. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.rb +1 -35
  77. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_bank_transfer_options.rb +2 -2
  78. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb +1 -1
  79. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_recurring_options.rb +2 -2
  80. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information.rb +2 -2
  81. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +8 -8
  82. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +3 -3
  83. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to.rb +32 -16
  84. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb +3 -3
  85. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_recurring_options.rb +1 -1
  86. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information_amount_details.rb +1 -1
  87. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details.rb +1 -1
  88. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details_surcharge.rb +1 -1
  89. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information_bill_to.rb +14 -48
  90. data/lib/cybersource_rest_client/models/refund_capture_request.rb +1 -1
  91. data/lib/cybersource_rest_client/models/refund_payment_request.rb +1 -1
  92. data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response.rb +1 -1
  93. data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response_net_funding_summaries.rb +1 -34
  94. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb +0 -22
  95. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response.rb +0 -22
  96. data/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb +2 -48
  97. data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response.rb +8 -8
  98. data/lib/cybersource_rest_client/models/{reporting_v3_reports_get200_response_reports.rb → reporting_v3_reports_get200_response_report_search_results.rb} +4 -62
  99. data/lib/cybersource_rest_client/models/reporting_v3_reports_id_get200_response.rb +3 -61
  100. data/lib/cybersource_rest_client/models/reportingv3reports_report_preferences.rb +1 -35
  101. data/lib/cybersource_rest_client/models/request_body.rb +1 -35
  102. data/lib/cybersource_rest_client/models/request_body_1.rb +2 -47
  103. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_ip_address.rb +1 -1
  104. data/lib/cybersource_rest_client/models/risk_v1_decisions_post400_response.rb +0 -34
  105. data/lib/cybersource_rest_client/models/riskv1decisions_card_verification.rb +1 -1
  106. data/lib/cybersource_rest_client/models/riskv1decisions_device_information.rb +5 -5
  107. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_amount_details.rb +1 -1
  108. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_bill_to.rb +15 -15
  109. data/lib/cybersource_rest_client/models/riskv1decisions_travel_information_legs.rb +1 -1
  110. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response.rb +1 -35
  111. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_bank_account.rb +0 -34
  112. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_card.rb +2 -36
  113. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_bank_transfer_options.rb +0 -34
  114. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_instrument_identifier.rb +2 -48
  115. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_payment_instruments.rb +2 -48
  116. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_personal_identification.rb +1 -35
  117. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response.rb +2 -48
  118. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb +2 -2
  119. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information.rb +3 -3
  120. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_consumer_authentication_information.rb +2 -2
  121. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_device_information.rb +5 -5
  122. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_error_information.rb +2 -2
  123. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_fraud_marking_information.rb +1 -1
  124. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +1 -1
  125. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_bill_to.rb +47 -31
  126. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_line_items.rb +1 -1
  127. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_ship_to.rb +6 -6
  128. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank.rb +5 -5
  129. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_account.rb +5 -5
  130. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_mandate.rb +3 -3
  131. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb +23 -34
  132. data/lib/cybersource_rest_client/models/{risk_v1_authentications_post400_response.rb → tss_v2_transactions_get200_response_payment_information_payment_type_funding_source.rb} +37 -38
  133. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +1 -1
  134. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_bank_transfer_options.rb +1 -1
  135. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +3 -3
  136. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response.rb +14 -4
  137. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_consumer_authentication_information.rb +1 -1
  138. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_device_information.rb +5 -5
  139. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to.rb +5 -5
  140. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_type.rb +9 -9
  141. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb +2 -2
  142. data/lib/cybersource_rest_client/models/{riskv1authentications_device_information_raw_data.rb → tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner.rb} +17 -27
  143. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb +1 -1
  144. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint.rb +3 -3
  145. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_transaction_summaries.rb +2 -2
  146. data/lib/cybersource_rest_client/models/tss_v2_transactions_post400_response.rb +0 -34
  147. data/lib/cybersource_rest_client/models/ums_v1_users_get200_response_account_information.rb +1 -34
  148. data/lib/cybersource_rest_client/models/update_payment_instrument_request.rb +2 -48
  149. data/lib/cybersource_rest_client/models/v1_file_details_get200_response_file_details.rb +1 -35
  150. metadata +5 -43
  151. data/lib/cybersource_rest_client/api/download_dtd_api.rb +0 -88
  152. data/lib/cybersource_rest_client/api/download_xsd_api.rb +0 -88
  153. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +0 -154
  154. data/lib/cybersource_rest_client/models/check_payer_auth_enrollment_request.rb +0 -275
  155. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to_company.rb +0 -349
  156. data/lib/cybersource_rest_client/models/request.rb +0 -210
  157. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response.rb +0 -285
  158. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +0 -324
  159. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response.rb +0 -294
  160. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_consumer_authentication_information.rb +0 -429
  161. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information.rb +0 -183
  162. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information_amount_details.rb +0 -199
  163. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +0 -214
  164. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information.rb +0 -194
  165. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information_line_items.rb +0 -267
  166. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information.rb +0 -192
  167. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +0 -264
  168. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +0 -264
  169. data/lib/cybersource_rest_client/models/riskv1authentications_buyer_information.rb +0 -196
  170. data/lib/cybersource_rest_client/models/riskv1authentications_client_reference_information.rb +0 -208
  171. data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information.rb +0 -552
  172. data/lib/cybersource_rest_client/models/riskv1authentications_device_information.rb +0 -285
  173. data/lib/cybersource_rest_client/models/riskv1authentications_merchant_information.rb +0 -199
  174. data/lib/cybersource_rest_client/models/riskv1authentications_order_information.rb +0 -258
  175. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_bill_to.rb +0 -496
  176. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_line_items.rb +0 -371
  177. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_ship_to.rb +0 -434
  178. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information.rb +0 -192
  179. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_card.rb +0 -291
  180. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +0 -291
  181. data/lib/cybersource_rest_client/models/riskv1authentications_recurring_payment_information.rb +0 -235
  182. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information.rb +0 -183
  183. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history.rb +0 -262
  184. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_account_history.rb +0 -209
  185. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_customer_account.rb +0 -279
  186. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information.rb +0 -206
  187. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_legs.rb +0 -259
  188. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_passengers.rb +0 -224
@@ -1,196 +0,0 @@
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 Riskv1authenticationsBuyerInformation
17
- # This array contains detailed information about the buyer's form of persoanl identification.
18
- attr_accessor :personal_identification
19
-
20
- # Cardholder’s mobile phone number. **Important** Required for Visa Secure transactions in Brazil. Do not use this request field for any other types of transactions.
21
- attr_accessor :mobile_phone
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'personal_identification' => :'personalIdentification',
27
- :'mobile_phone' => :'mobilePhone'
28
- }
29
- end
30
-
31
- # Attribute type mapping.
32
- def self.swagger_types
33
- {
34
- :'personal_identification' => :'Array<Ptsv2paymentsBuyerInformationPersonalIdentification>',
35
- :'mobile_phone' => :'Integer'
36
- }
37
- end
38
-
39
- # Initializes the object
40
- # @param [Hash] attributes Model attributes in the form of hash
41
- def initialize(attributes = {})
42
- return unless attributes.is_a?(Hash)
43
-
44
- # convert string to symbol for hash key
45
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
-
47
- if attributes.has_key?(:'personalIdentification')
48
- if (value = attributes[:'personalIdentification']).is_a?(Array)
49
- self.personal_identification = value
50
- end
51
- end
52
-
53
- if attributes.has_key?(:'mobilePhone')
54
- self.mobile_phone = attributes[:'mobilePhone']
55
- end
56
- end
57
-
58
- # Show invalid properties with the reasons. Usually used together with valid?
59
- # @return Array for valid properties with the reasons
60
- def list_invalid_properties
61
- invalid_properties = Array.new
62
- invalid_properties
63
- end
64
-
65
- # Check to see if the all the properties in the model are valid
66
- # @return true if the model is valid
67
- def valid?
68
- true
69
- end
70
-
71
- # Checks equality by comparing each attribute.
72
- # @param [Object] Object to be compared
73
- def ==(o)
74
- return true if self.equal?(o)
75
- self.class == o.class &&
76
- personal_identification == o.personal_identification &&
77
- mobile_phone == o.mobile_phone
78
- end
79
-
80
- # @see the `==` method
81
- # @param [Object] Object to be compared
82
- def eql?(o)
83
- self == o
84
- end
85
-
86
- # Calculates hash code according to all attributes.
87
- # @return [Fixnum] Hash code
88
- def hash
89
- [personal_identification, mobile_phone].hash
90
- end
91
-
92
- # Builds the object from hash
93
- # @param [Hash] attributes Model attributes in the form of hash
94
- # @return [Object] Returns the model itself
95
- def build_from_hash(attributes)
96
- return nil unless attributes.is_a?(Hash)
97
- self.class.swagger_types.each_pair do |key, type|
98
- if type =~ /\AArray<(.*)>/i
99
- # check to ensure the input is an array given that the the attribute
100
- # is documented as an array but the input is not
101
- if attributes[self.class.attribute_map[key]].is_a?(Array)
102
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
103
- end
104
- elsif !attributes[self.class.attribute_map[key]].nil?
105
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
106
- end # or else data not found in attributes(hash), not an issue as the data can be optional
107
- end
108
-
109
- self
110
- end
111
-
112
- # Deserializes the data based on type
113
- # @param string type Data type
114
- # @param string value Value to be deserialized
115
- # @return [Object] Deserialized data
116
- def _deserialize(type, value)
117
- case type.to_sym
118
- when :DateTime
119
- DateTime.parse(value)
120
- when :Date
121
- Date.parse(value)
122
- when :String
123
- value.to_s
124
- when :Integer
125
- value.to_i
126
- when :Float
127
- value.to_f
128
- when :BOOLEAN
129
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
130
- true
131
- else
132
- false
133
- end
134
- when :Object
135
- # generic object (usually a Hash), return directly
136
- value
137
- when /\AArray<(?<inner_type>.+)>\z/
138
- inner_type = Regexp.last_match[:inner_type]
139
- value.map { |v| _deserialize(inner_type, v) }
140
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
141
- k_type = Regexp.last_match[:k_type]
142
- v_type = Regexp.last_match[:v_type]
143
- {}.tap do |hash|
144
- value.each do |k, v|
145
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
146
- end
147
- end
148
- else # model
149
- temp_model = CyberSource.const_get(type).new
150
- temp_model.build_from_hash(value)
151
- end
152
- end
153
-
154
- # Returns the string representation of the object
155
- # @return [String] String presentation of the object
156
- def to_s
157
- to_hash.to_s
158
- end
159
-
160
- # to_body is an alias to to_hash (backward compatibility)
161
- # @return [Hash] Returns the object in the form of hash
162
- def to_body
163
- to_hash
164
- end
165
-
166
- # Returns the object in the form of hash
167
- # @return [Hash] Returns the object in the form of hash
168
- def to_hash
169
- hash = {}
170
- self.class.attribute_map.each_pair do |attr, param|
171
- value = self.send(attr)
172
- next if value.nil?
173
- hash[param] = _to_hash(value)
174
- end
175
- hash
176
- end
177
-
178
- # Outputs non-array value in the form of hash
179
- # For object, use to_hash. Otherwise, just return the value
180
- # @param [Object] value Any valid value
181
- # @return [Hash] Returns the value in the form of hash
182
- def _to_hash(value)
183
- if value.is_a?(Array)
184
- value.compact.map { |v| _to_hash(v) }
185
- elsif value.is_a?(Hash)
186
- {}.tap do |hash|
187
- value.each { |k, v| hash[k] = _to_hash(v) }
188
- end
189
- elsif value.respond_to? :to_hash
190
- value.to_hash
191
- else
192
- value
193
- end
194
- end
195
- end
196
- end
@@ -1,208 +0,0 @@
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 Riskv1authenticationsClientReferenceInformation
17
- # Client-generated order reference or tracking number. CyberSource recommends that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. For information about tracking orders, see \"Tracking and Reconciling Your Orders\" in [Getting Started with CyberSource Advanced for the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/Getting_Started_SCMP/html/wwhelp/wwhimpl/js/html/wwhelp.htm) #### FDC Nashville Global Certain circumstances can cause the processor to truncate this value to 15 or 17 characters for Level II and Level III processing, which can cause a discrepancy between the value you submit and the value included in some processor reports.
18
- attr_accessor :code
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'code' => :'code'
24
- }
25
- end
26
-
27
- # Attribute type mapping.
28
- def self.swagger_types
29
- {
30
- :'code' => :'String'
31
- }
32
- end
33
-
34
- # Initializes the object
35
- # @param [Hash] attributes Model attributes in the form of hash
36
- def initialize(attributes = {})
37
- return unless attributes.is_a?(Hash)
38
-
39
- # convert string to symbol for hash key
40
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
41
-
42
- if attributes.has_key?(:'code')
43
- self.code = attributes[:'code']
44
- end
45
- end
46
-
47
- # Show invalid properties with the reasons. Usually used together with valid?
48
- # @return Array for valid properties with the reasons
49
- def list_invalid_properties
50
- invalid_properties = Array.new
51
- if @code.nil?
52
- invalid_properties.push('invalid value for "code", code cannot be nil.')
53
- end
54
-
55
- if @code.to_s.length > 50
56
- invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 50.')
57
- end
58
-
59
- invalid_properties
60
- end
61
-
62
- # Check to see if the all the properties in the model are valid
63
- # @return true if the model is valid
64
- def valid?
65
- return false if @code.nil?
66
- return false if @code.to_s.length > 50
67
- true
68
- end
69
-
70
- # Custom attribute writer method with validation
71
- # @param [Object] code Value to be assigned
72
- def code=(code)
73
- if code.nil?
74
- fail ArgumentError, 'code cannot be nil'
75
- end
76
-
77
- if code.to_s.length > 50
78
- fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 50.'
79
- end
80
-
81
- @code = code
82
- end
83
-
84
- # Checks equality by comparing each attribute.
85
- # @param [Object] Object to be compared
86
- def ==(o)
87
- return true if self.equal?(o)
88
- self.class == o.class &&
89
- code == o.code
90
- end
91
-
92
- # @see the `==` method
93
- # @param [Object] Object to be compared
94
- def eql?(o)
95
- self == o
96
- end
97
-
98
- # Calculates hash code according to all attributes.
99
- # @return [Fixnum] Hash code
100
- def hash
101
- [code].hash
102
- end
103
-
104
- # Builds the object from hash
105
- # @param [Hash] attributes Model attributes in the form of hash
106
- # @return [Object] Returns the model itself
107
- def build_from_hash(attributes)
108
- return nil unless attributes.is_a?(Hash)
109
- self.class.swagger_types.each_pair do |key, type|
110
- if type =~ /\AArray<(.*)>/i
111
- # check to ensure the input is an array given that the the attribute
112
- # is documented as an array but the input is not
113
- if attributes[self.class.attribute_map[key]].is_a?(Array)
114
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
- end
116
- elsif !attributes[self.class.attribute_map[key]].nil?
117
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
- end # or else data not found in attributes(hash), not an issue as the data can be optional
119
- end
120
-
121
- self
122
- end
123
-
124
- # Deserializes the data based on type
125
- # @param string type Data type
126
- # @param string value Value to be deserialized
127
- # @return [Object] Deserialized data
128
- def _deserialize(type, value)
129
- case type.to_sym
130
- when :DateTime
131
- DateTime.parse(value)
132
- when :Date
133
- Date.parse(value)
134
- when :String
135
- value.to_s
136
- when :Integer
137
- value.to_i
138
- when :Float
139
- value.to_f
140
- when :BOOLEAN
141
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
- true
143
- else
144
- false
145
- end
146
- when :Object
147
- # generic object (usually a Hash), return directly
148
- value
149
- when /\AArray<(?<inner_type>.+)>\z/
150
- inner_type = Regexp.last_match[:inner_type]
151
- value.map { |v| _deserialize(inner_type, v) }
152
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
- k_type = Regexp.last_match[:k_type]
154
- v_type = Regexp.last_match[:v_type]
155
- {}.tap do |hash|
156
- value.each do |k, v|
157
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
- end
159
- end
160
- else # model
161
- temp_model = CyberSource.const_get(type).new
162
- temp_model.build_from_hash(value)
163
- end
164
- end
165
-
166
- # Returns the string representation of the object
167
- # @return [String] String presentation of the object
168
- def to_s
169
- to_hash.to_s
170
- end
171
-
172
- # to_body is an alias to to_hash (backward compatibility)
173
- # @return [Hash] Returns the object in the form of hash
174
- def to_body
175
- to_hash
176
- end
177
-
178
- # Returns the object in the form of hash
179
- # @return [Hash] Returns the object in the form of hash
180
- def to_hash
181
- hash = {}
182
- self.class.attribute_map.each_pair do |attr, param|
183
- value = self.send(attr)
184
- next if value.nil?
185
- hash[param] = _to_hash(value)
186
- end
187
- hash
188
- end
189
-
190
- # Outputs non-array value in the form of hash
191
- # For object, use to_hash. Otherwise, just return the value
192
- # @param [Object] value Any valid value
193
- # @return [Hash] Returns the value in the form of hash
194
- def _to_hash(value)
195
- if value.is_a?(Array)
196
- value.compact.map { |v| _to_hash(v) }
197
- elsif value.is_a?(Hash)
198
- {}.tap do |hash|
199
- value.each { |k, v| hash[k] = _to_hash(v) }
200
- end
201
- elsif value.respond_to? :to_hash
202
- value.to_hash
203
- else
204
- value
205
- end
206
- end
207
- end
208
- end
@@ -1,552 +0,0 @@
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 Riskv1authenticationsConsumerAuthenticationInformation
17
- # Data that documents and supports a specific authentication process.
18
- attr_accessor :alternate_authentication_data
19
-
20
- # Date and time in UTC of the cardholder authentication. Format: YYYYMMDDHHMM
21
- attr_accessor :alternate_authentication_date
22
-
23
- # Mechanism used by the cardholder to authenticate to the 3D Secure requestor. Possible values: - `01`: No authentication occurred - `02`: Login using merchant system credentials - `03`: Login using Federated ID - `04`: Login using FIDO Authenticator
24
- attr_accessor :alternate_authentication_method
25
-
26
- # 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.
27
- attr_accessor :authentication_transaction_id
28
-
29
- # Possible values: - `01`: No preference - `02`: No challenge request - `03`: Challenge requested (3D Secure requestor preference) - `04`: Challenge requested (mandate) - `05-79`: Reserved for EMVCo future use (values invalid until defined by EMVCo) - `80-99`: Reserved for DS use For details, see `pa_challenge_code` field description in [CyberSource Payer Authentication Using the SCMP API.] (https://apps.cybersource.com/library/documentation/dev_guides/Payer_Authentication_SCMP_API/html/wwhelp/wwhimpl/js/html/wwhelp.htm)
30
- attr_accessor :challenge_code
31
-
32
- # An alias that uniquely identifies the customer's account and credit card on file. Note This field is required if Tokenization is enabled in the merchant profile settings.
33
- attr_accessor :customer_card_alias
34
-
35
- # Indicates that the card being used is the one designated as the primary payment card for purchase. Recommended for Discover ProtectBuy.
36
- attr_accessor :default_card
37
-
38
- # An integer value greater than 1 indicating the max number of permitted authorizations for installment payments. **Note** This is required if the merchant and cardholder have agreed to installment payments.
39
- attr_accessor :installment_total_count
40
-
41
- # Indicates whether the customer has opted in for marketing offers. Recommended for Discover ProtectBuy.
42
- attr_accessor :marketing_opt_in
43
-
44
- # Indicates origin of the marketing offer. Recommended for Discover ProtectBuy.
45
- attr_accessor :marketing_source
46
-
47
- # Merchant category code. **Important** Required only for Visa Secure transactions in Brazil. Do not use this request field for any other types of transactions.
48
- attr_accessor :mcc
49
-
50
- # Category of the message for a specific use case. Possible values: - `01`: PA- payment authentication - `02`: NPA- non-payment authentication - `03-79`: Reserved for EMVCo future use (values invalid until defined by EMVCo) - `80-99`: Reserved for DS use
51
- attr_accessor :message_category
52
-
53
- # Non-Payer Authentication Indicator. Possible values: - `01`: Add card - `02`: Maintain card information - `03`: Cardholder verification for EMV token - `04-80` Reserved for EMVCo - `80-90` Reserved DS
54
- attr_accessor :npa_code
55
-
56
- # Specifies the Brazilian payment account type used for the transaction. This field overrides other payment types that might be specified in the request. Use one of the following values for this field: - `NA`: Not applicable. Do not override other payment types that are specified in the request. - `CR`: Credit card. - `DB`: Debit card. - `VSAVR`: Visa Vale Refeicao - `VSAVA`: Visa Vale Alimentacao **Important** Required only for Visa Secure transactions in Brazil. Do not use this request field for any other types of transactions.
57
- attr_accessor :override_payment_method
58
-
59
- # Specifies the product code, which designates the type of transaction. Specify one of the following values for this field: - AIR: Airline purchase Important Required for American Express SafeKey (U.S.). - `ACC`: Accommodation Rental - `ACF`: Account funding - `CHA`: Check acceptance - `DIG`: Digital Goods - `DSP`: Cash Dispensing - `GAS`: Fuel - `GEN`: General Retail - `LUX`: Luxury Retail - `PAL`: Prepaid activation and load - `PHY`: Goods or services purchase - `QCT`: Quasi-cash transaction - `REN`: Car Rental - `RES`: Restaurant - `SVC`: Services - `TBD`: Other - `TRA`: Travel **Important** Required for Visa Secure transactions in Brazil. Do not use this request field for any other types of transactions.
60
- attr_accessor :product_code
61
-
62
- # Cardinal's directory server assigned 3DS Requestor ID value
63
- attr_accessor :requestor_id
64
-
65
- # Cardinal's directory server assigned 3DS Requestor Name value
66
- attr_accessor :requestor_name
67
-
68
- # Reference ID that corresponds to the device fingerprinting data that was collected previously. Note Required for Hybrid integration.
69
- attr_accessor :reference_id
70
-
71
- # Transaction mode identifier. Identifies the channel from which the transaction originates. Possible values: - `MOTO` - MOTO (Mail Order Telephone Order) - `RETAIL` - Retail - `ECOMMERCE` - eCommerce - `MOBILE` - Mobile Device - `TABLET` - Tablet
72
- attr_accessor :transaction_mode
73
-
74
- # Attribute mapping from ruby-style variable name to JSON key.
75
- def self.attribute_map
76
- {
77
- :'alternate_authentication_data' => :'alternateAuthenticationData',
78
- :'alternate_authentication_date' => :'alternateAuthenticationDate',
79
- :'alternate_authentication_method' => :'alternateAuthenticationMethod',
80
- :'authentication_transaction_id' => :'authenticationTransactionId',
81
- :'challenge_code' => :'challengeCode',
82
- :'customer_card_alias' => :'customerCardAlias',
83
- :'default_card' => :'defaultCard',
84
- :'installment_total_count' => :'installmentTotalCount',
85
- :'marketing_opt_in' => :'marketingOptIn',
86
- :'marketing_source' => :'marketingSource',
87
- :'mcc' => :'mcc',
88
- :'message_category' => :'messageCategory',
89
- :'npa_code' => :'npaCode',
90
- :'override_payment_method' => :'overridePaymentMethod',
91
- :'product_code' => :'productCode',
92
- :'requestor_id' => :'requestorId',
93
- :'requestor_name' => :'requestorName',
94
- :'reference_id' => :'referenceId',
95
- :'transaction_mode' => :'transactionMode'
96
- }
97
- end
98
-
99
- # Attribute type mapping.
100
- def self.swagger_types
101
- {
102
- :'alternate_authentication_data' => :'String',
103
- :'alternate_authentication_date' => :'String',
104
- :'alternate_authentication_method' => :'String',
105
- :'authentication_transaction_id' => :'String',
106
- :'challenge_code' => :'String',
107
- :'customer_card_alias' => :'String',
108
- :'default_card' => :'BOOLEAN',
109
- :'installment_total_count' => :'Integer',
110
- :'marketing_opt_in' => :'BOOLEAN',
111
- :'marketing_source' => :'String',
112
- :'mcc' => :'String',
113
- :'message_category' => :'String',
114
- :'npa_code' => :'String',
115
- :'override_payment_method' => :'String',
116
- :'product_code' => :'String',
117
- :'requestor_id' => :'String',
118
- :'requestor_name' => :'String',
119
- :'reference_id' => :'String',
120
- :'transaction_mode' => :'String'
121
- }
122
- end
123
-
124
- # Initializes the object
125
- # @param [Hash] attributes Model attributes in the form of hash
126
- def initialize(attributes = {})
127
- return unless attributes.is_a?(Hash)
128
-
129
- # convert string to symbol for hash key
130
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
131
-
132
- if attributes.has_key?(:'alternateAuthenticationData')
133
- self.alternate_authentication_data = attributes[:'alternateAuthenticationData']
134
- end
135
-
136
- if attributes.has_key?(:'alternateAuthenticationDate')
137
- self.alternate_authentication_date = attributes[:'alternateAuthenticationDate']
138
- end
139
-
140
- if attributes.has_key?(:'alternateAuthenticationMethod')
141
- self.alternate_authentication_method = attributes[:'alternateAuthenticationMethod']
142
- end
143
-
144
- if attributes.has_key?(:'authenticationTransactionId')
145
- self.authentication_transaction_id = attributes[:'authenticationTransactionId']
146
- end
147
-
148
- if attributes.has_key?(:'challengeCode')
149
- self.challenge_code = attributes[:'challengeCode']
150
- end
151
-
152
- if attributes.has_key?(:'customerCardAlias')
153
- self.customer_card_alias = attributes[:'customerCardAlias']
154
- end
155
-
156
- if attributes.has_key?(:'defaultCard')
157
- self.default_card = attributes[:'defaultCard']
158
- end
159
-
160
- if attributes.has_key?(:'installmentTotalCount')
161
- self.installment_total_count = attributes[:'installmentTotalCount']
162
- end
163
-
164
- if attributes.has_key?(:'marketingOptIn')
165
- self.marketing_opt_in = attributes[:'marketingOptIn']
166
- end
167
-
168
- if attributes.has_key?(:'marketingSource')
169
- self.marketing_source = attributes[:'marketingSource']
170
- end
171
-
172
- if attributes.has_key?(:'mcc')
173
- self.mcc = attributes[:'mcc']
174
- end
175
-
176
- if attributes.has_key?(:'messageCategory')
177
- self.message_category = attributes[:'messageCategory']
178
- end
179
-
180
- if attributes.has_key?(:'npaCode')
181
- self.npa_code = attributes[:'npaCode']
182
- end
183
-
184
- if attributes.has_key?(:'overridePaymentMethod')
185
- self.override_payment_method = attributes[:'overridePaymentMethod']
186
- end
187
-
188
- if attributes.has_key?(:'productCode')
189
- self.product_code = attributes[:'productCode']
190
- end
191
-
192
- if attributes.has_key?(:'requestorId')
193
- self.requestor_id = attributes[:'requestorId']
194
- end
195
-
196
- if attributes.has_key?(:'requestorName')
197
- self.requestor_name = attributes[:'requestorName']
198
- end
199
-
200
- if attributes.has_key?(:'referenceId')
201
- self.reference_id = attributes[:'referenceId']
202
- end
203
-
204
- if attributes.has_key?(:'transactionMode')
205
- self.transaction_mode = attributes[:'transactionMode']
206
- end
207
- end
208
-
209
- # Show invalid properties with the reasons. Usually used together with valid?
210
- # @return Array for valid properties with the reasons
211
- def list_invalid_properties
212
- invalid_properties = Array.new
213
- if !@alternate_authentication_data.nil? && @alternate_authentication_data.to_s.length > 2048
214
- invalid_properties.push('invalid value for "alternate_authentication_data", the character length must be smaller than or equal to 2048.')
215
- end
216
-
217
- if !@alternate_authentication_date.nil? && @alternate_authentication_date.to_s.length > 14
218
- invalid_properties.push('invalid value for "alternate_authentication_date", the character length must be smaller than or equal to 14.')
219
- end
220
-
221
- if !@authentication_transaction_id.nil? && @authentication_transaction_id.to_s.length > 20
222
- invalid_properties.push('invalid value for "authentication_transaction_id", the character length must be smaller than or equal to 20.')
223
- end
224
-
225
- if !@customer_card_alias.nil? && @customer_card_alias.to_s.length > 128
226
- invalid_properties.push('invalid value for "customer_card_alias", the character length must be smaller than or equal to 128.')
227
- end
228
-
229
- if !@marketing_source.nil? && @marketing_source.to_s.length > 40
230
- invalid_properties.push('invalid value for "marketing_source", the character length must be smaller than or equal to 40.')
231
- end
232
-
233
- if @mcc.nil?
234
- invalid_properties.push('invalid value for "mcc", mcc cannot be nil.')
235
- end
236
-
237
- if @mcc.to_s.length > 4
238
- invalid_properties.push('invalid value for "mcc", the character length must be smaller than or equal to 4.')
239
- end
240
-
241
- if !@npa_code.nil? && @npa_code.to_s.length > 2
242
- invalid_properties.push('invalid value for "npa_code", the character length must be smaller than or equal to 2.')
243
- end
244
-
245
- if !@product_code.nil? && @product_code.to_s.length > 3
246
- invalid_properties.push('invalid value for "product_code", the character length must be smaller than or equal to 3.')
247
- end
248
-
249
- if !@requestor_id.nil? && @requestor_id.to_s.length > 35
250
- invalid_properties.push('invalid value for "requestor_id", the character length must be smaller than or equal to 35.')
251
- end
252
-
253
- if !@requestor_name.nil? && @requestor_name.to_s.length > 40
254
- invalid_properties.push('invalid value for "requestor_name", the character length must be smaller than or equal to 40.')
255
- end
256
-
257
- if @reference_id.nil?
258
- invalid_properties.push('invalid value for "reference_id", reference_id cannot be nil.')
259
- end
260
-
261
- if @reference_id.to_s.length > 50
262
- invalid_properties.push('invalid value for "reference_id", the character length must be smaller than or equal to 50.')
263
- end
264
-
265
- if @transaction_mode.nil?
266
- invalid_properties.push('invalid value for "transaction_mode", transaction_mode cannot be nil.')
267
- end
268
-
269
- invalid_properties
270
- end
271
-
272
- # Check to see if the all the properties in the model are valid
273
- # @return true if the model is valid
274
- def valid?
275
- return false if !@alternate_authentication_data.nil? && @alternate_authentication_data.to_s.length > 2048
276
- return false if !@alternate_authentication_date.nil? && @alternate_authentication_date.to_s.length > 14
277
- return false if !@authentication_transaction_id.nil? && @authentication_transaction_id.to_s.length > 20
278
- return false if !@customer_card_alias.nil? && @customer_card_alias.to_s.length > 128
279
- return false if !@marketing_source.nil? && @marketing_source.to_s.length > 40
280
- return false if @mcc.nil?
281
- return false if @mcc.to_s.length > 4
282
- return false if !@npa_code.nil? && @npa_code.to_s.length > 2
283
- return false if !@product_code.nil? && @product_code.to_s.length > 3
284
- return false if !@requestor_id.nil? && @requestor_id.to_s.length > 35
285
- return false if !@requestor_name.nil? && @requestor_name.to_s.length > 40
286
- return false if @reference_id.nil?
287
- return false if @reference_id.to_s.length > 50
288
- return false if @transaction_mode.nil?
289
- true
290
- end
291
-
292
- # Custom attribute writer method with validation
293
- # @param [Object] alternate_authentication_data Value to be assigned
294
- def alternate_authentication_data=(alternate_authentication_data)
295
- if !alternate_authentication_data.nil? && alternate_authentication_data.to_s.length > 2048
296
- fail ArgumentError, 'invalid value for "alternate_authentication_data", the character length must be smaller than or equal to 2048.'
297
- end
298
-
299
- @alternate_authentication_data = alternate_authentication_data
300
- end
301
-
302
- # Custom attribute writer method with validation
303
- # @param [Object] alternate_authentication_date Value to be assigned
304
- def alternate_authentication_date=(alternate_authentication_date)
305
- if !alternate_authentication_date.nil? && alternate_authentication_date.to_s.length > 14
306
- fail ArgumentError, 'invalid value for "alternate_authentication_date", the character length must be smaller than or equal to 14.'
307
- end
308
-
309
- @alternate_authentication_date = alternate_authentication_date
310
- end
311
-
312
- # Custom attribute writer method with validation
313
- # @param [Object] authentication_transaction_id Value to be assigned
314
- def authentication_transaction_id=(authentication_transaction_id)
315
- if !authentication_transaction_id.nil? && authentication_transaction_id.to_s.length > 20
316
- fail ArgumentError, 'invalid value for "authentication_transaction_id", the character length must be smaller than or equal to 20.'
317
- end
318
-
319
- @authentication_transaction_id = authentication_transaction_id
320
- end
321
-
322
- # Custom attribute writer method with validation
323
- # @param [Object] customer_card_alias Value to be assigned
324
- def customer_card_alias=(customer_card_alias)
325
- if !customer_card_alias.nil? && customer_card_alias.to_s.length > 128
326
- fail ArgumentError, 'invalid value for "customer_card_alias", the character length must be smaller than or equal to 128.'
327
- end
328
-
329
- @customer_card_alias = customer_card_alias
330
- end
331
-
332
- # Custom attribute writer method with validation
333
- # @param [Object] marketing_source Value to be assigned
334
- def marketing_source=(marketing_source)
335
- if !marketing_source.nil? && marketing_source.to_s.length > 40
336
- fail ArgumentError, 'invalid value for "marketing_source", the character length must be smaller than or equal to 40.'
337
- end
338
-
339
- @marketing_source = marketing_source
340
- end
341
-
342
- # Custom attribute writer method with validation
343
- # @param [Object] mcc Value to be assigned
344
- def mcc=(mcc)
345
- if mcc.nil?
346
- fail ArgumentError, 'mcc cannot be nil'
347
- end
348
-
349
- if mcc.to_s.length > 4
350
- fail ArgumentError, 'invalid value for "mcc", the character length must be smaller than or equal to 4.'
351
- end
352
-
353
- @mcc = mcc
354
- end
355
-
356
- # Custom attribute writer method with validation
357
- # @param [Object] npa_code Value to be assigned
358
- def npa_code=(npa_code)
359
- if !npa_code.nil? && npa_code.to_s.length > 2
360
- fail ArgumentError, 'invalid value for "npa_code", the character length must be smaller than or equal to 2.'
361
- end
362
-
363
- @npa_code = npa_code
364
- end
365
-
366
- # Custom attribute writer method with validation
367
- # @param [Object] product_code Value to be assigned
368
- def product_code=(product_code)
369
- if !product_code.nil? && product_code.to_s.length > 3
370
- fail ArgumentError, 'invalid value for "product_code", the character length must be smaller than or equal to 3.'
371
- end
372
-
373
- @product_code = product_code
374
- end
375
-
376
- # Custom attribute writer method with validation
377
- # @param [Object] requestor_id Value to be assigned
378
- def requestor_id=(requestor_id)
379
- if !requestor_id.nil? && requestor_id.to_s.length > 35
380
- fail ArgumentError, 'invalid value for "requestor_id", the character length must be smaller than or equal to 35.'
381
- end
382
-
383
- @requestor_id = requestor_id
384
- end
385
-
386
- # Custom attribute writer method with validation
387
- # @param [Object] requestor_name Value to be assigned
388
- def requestor_name=(requestor_name)
389
- if !requestor_name.nil? && requestor_name.to_s.length > 40
390
- fail ArgumentError, 'invalid value for "requestor_name", the character length must be smaller than or equal to 40.'
391
- end
392
-
393
- @requestor_name = requestor_name
394
- end
395
-
396
- # Custom attribute writer method with validation
397
- # @param [Object] reference_id Value to be assigned
398
- def reference_id=(reference_id)
399
- if reference_id.nil?
400
- fail ArgumentError, 'reference_id cannot be nil'
401
- end
402
-
403
- if reference_id.to_s.length > 50
404
- fail ArgumentError, 'invalid value for "reference_id", the character length must be smaller than or equal to 50.'
405
- end
406
-
407
- @reference_id = reference_id
408
- end
409
-
410
- # Checks equality by comparing each attribute.
411
- # @param [Object] Object to be compared
412
- def ==(o)
413
- return true if self.equal?(o)
414
- self.class == o.class &&
415
- alternate_authentication_data == o.alternate_authentication_data &&
416
- alternate_authentication_date == o.alternate_authentication_date &&
417
- alternate_authentication_method == o.alternate_authentication_method &&
418
- authentication_transaction_id == o.authentication_transaction_id &&
419
- challenge_code == o.challenge_code &&
420
- customer_card_alias == o.customer_card_alias &&
421
- default_card == o.default_card &&
422
- installment_total_count == o.installment_total_count &&
423
- marketing_opt_in == o.marketing_opt_in &&
424
- marketing_source == o.marketing_source &&
425
- mcc == o.mcc &&
426
- message_category == o.message_category &&
427
- npa_code == o.npa_code &&
428
- override_payment_method == o.override_payment_method &&
429
- product_code == o.product_code &&
430
- requestor_id == o.requestor_id &&
431
- requestor_name == o.requestor_name &&
432
- reference_id == o.reference_id &&
433
- transaction_mode == o.transaction_mode
434
- end
435
-
436
- # @see the `==` method
437
- # @param [Object] Object to be compared
438
- def eql?(o)
439
- self == o
440
- end
441
-
442
- # Calculates hash code according to all attributes.
443
- # @return [Fixnum] Hash code
444
- def hash
445
- [alternate_authentication_data, alternate_authentication_date, alternate_authentication_method, authentication_transaction_id, challenge_code, customer_card_alias, default_card, installment_total_count, marketing_opt_in, marketing_source, mcc, message_category, npa_code, override_payment_method, product_code, requestor_id, requestor_name, reference_id, transaction_mode].hash
446
- end
447
-
448
- # Builds the object from hash
449
- # @param [Hash] attributes Model attributes in the form of hash
450
- # @return [Object] Returns the model itself
451
- def build_from_hash(attributes)
452
- return nil unless attributes.is_a?(Hash)
453
- self.class.swagger_types.each_pair do |key, type|
454
- if type =~ /\AArray<(.*)>/i
455
- # check to ensure the input is an array given that the the attribute
456
- # is documented as an array but the input is not
457
- if attributes[self.class.attribute_map[key]].is_a?(Array)
458
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
459
- end
460
- elsif !attributes[self.class.attribute_map[key]].nil?
461
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
462
- end # or else data not found in attributes(hash), not an issue as the data can be optional
463
- end
464
-
465
- self
466
- end
467
-
468
- # Deserializes the data based on type
469
- # @param string type Data type
470
- # @param string value Value to be deserialized
471
- # @return [Object] Deserialized data
472
- def _deserialize(type, value)
473
- case type.to_sym
474
- when :DateTime
475
- DateTime.parse(value)
476
- when :Date
477
- Date.parse(value)
478
- when :String
479
- value.to_s
480
- when :Integer
481
- value.to_i
482
- when :Float
483
- value.to_f
484
- when :BOOLEAN
485
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
486
- true
487
- else
488
- false
489
- end
490
- when :Object
491
- # generic object (usually a Hash), return directly
492
- value
493
- when /\AArray<(?<inner_type>.+)>\z/
494
- inner_type = Regexp.last_match[:inner_type]
495
- value.map { |v| _deserialize(inner_type, v) }
496
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
497
- k_type = Regexp.last_match[:k_type]
498
- v_type = Regexp.last_match[:v_type]
499
- {}.tap do |hash|
500
- value.each do |k, v|
501
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
502
- end
503
- end
504
- else # model
505
- temp_model = CyberSource.const_get(type).new
506
- temp_model.build_from_hash(value)
507
- end
508
- end
509
-
510
- # Returns the string representation of the object
511
- # @return [String] String presentation of the object
512
- def to_s
513
- to_hash.to_s
514
- end
515
-
516
- # to_body is an alias to to_hash (backward compatibility)
517
- # @return [Hash] Returns the object in the form of hash
518
- def to_body
519
- to_hash
520
- end
521
-
522
- # Returns the object in the form of hash
523
- # @return [Hash] Returns the object in the form of hash
524
- def to_hash
525
- hash = {}
526
- self.class.attribute_map.each_pair do |attr, param|
527
- value = self.send(attr)
528
- next if value.nil?
529
- hash[param] = _to_hash(value)
530
- end
531
- hash
532
- end
533
-
534
- # Outputs non-array value in the form of hash
535
- # For object, use to_hash. Otherwise, just return the value
536
- # @param [Object] value Any valid value
537
- # @return [Hash] Returns the value in the form of hash
538
- def _to_hash(value)
539
- if value.is_a?(Array)
540
- value.compact.map { |v| _to_hash(v) }
541
- elsif value.is_a?(Hash)
542
- {}.tap do |hash|
543
- value.each { |k, v| hash[k] = _to_hash(v) }
544
- end
545
- elsif value.respond_to? :to_hash
546
- value.to_hash
547
- else
548
- value
549
- end
550
- end
551
- end
552
- end