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,291 +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 Riskv1authenticationsPaymentInformationTokenizedCard
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) - 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
@@ -1,235 +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
- # This object contains recurring payment information.
17
- class Riskv1authenticationsRecurringPaymentInformation
18
- # The date after which no further recurring authorizations should be performed. Format: `YYYYMMDD` **Note** This field is required for recurring transactions.
19
- attr_accessor :end_date
20
-
21
- # Integer value indicating the minimum number of days between recurring authorizations. A frequency of monthly is indicated by the value 28. Multiple of 28 days will be used to indicate months. Example: 6 months = 168 **Note** This field is required for recurring transactions.
22
- attr_accessor :frequency
23
-
24
- # Date of original purchase. Required for recurring transactions. Format: `YYYYMMDD:HH:MM:SS` **Note**: If this field is empty, the current date is used.
25
- attr_accessor :original_purchase_date
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'end_date' => :'endDate',
31
- :'frequency' => :'frequency',
32
- :'original_purchase_date' => :'originalPurchaseDate'
33
- }
34
- end
35
-
36
- # Attribute type mapping.
37
- def self.swagger_types
38
- {
39
- :'end_date' => :'String',
40
- :'frequency' => :'Integer',
41
- :'original_purchase_date' => :'String'
42
- }
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- return unless attributes.is_a?(Hash)
49
-
50
- # convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
-
53
- if attributes.has_key?(:'endDate')
54
- self.end_date = attributes[:'endDate']
55
- end
56
-
57
- if attributes.has_key?(:'frequency')
58
- self.frequency = attributes[:'frequency']
59
- end
60
-
61
- if attributes.has_key?(:'originalPurchaseDate')
62
- self.original_purchase_date = attributes[:'originalPurchaseDate']
63
- end
64
- end
65
-
66
- # Show invalid properties with the reasons. Usually used together with valid?
67
- # @return Array for valid properties with the reasons
68
- def list_invalid_properties
69
- invalid_properties = Array.new
70
- if !@end_date.nil? && @end_date.to_s.length > 10
71
- invalid_properties.push('invalid value for "end_date", the character length must be smaller than or equal to 10.')
72
- end
73
-
74
- if !@original_purchase_date.nil? && @original_purchase_date.to_s.length > 17
75
- invalid_properties.push('invalid value for "original_purchase_date", the character length must be smaller than or equal to 17.')
76
- end
77
-
78
- invalid_properties
79
- end
80
-
81
- # Check to see if the all the properties in the model are valid
82
- # @return true if the model is valid
83
- def valid?
84
- return false if !@end_date.nil? && @end_date.to_s.length > 10
85
- return false if !@original_purchase_date.nil? && @original_purchase_date.to_s.length > 17
86
- true
87
- end
88
-
89
- # Custom attribute writer method with validation
90
- # @param [Object] end_date Value to be assigned
91
- def end_date=(end_date)
92
- if !end_date.nil? && end_date.to_s.length > 10
93
- fail ArgumentError, 'invalid value for "end_date", the character length must be smaller than or equal to 10.'
94
- end
95
-
96
- @end_date = end_date
97
- end
98
-
99
- # Custom attribute writer method with validation
100
- # @param [Object] original_purchase_date Value to be assigned
101
- def original_purchase_date=(original_purchase_date)
102
- if !original_purchase_date.nil? && original_purchase_date.to_s.length > 17
103
- fail ArgumentError, 'invalid value for "original_purchase_date", the character length must be smaller than or equal to 17.'
104
- end
105
-
106
- @original_purchase_date = original_purchase_date
107
- end
108
-
109
- # Checks equality by comparing each attribute.
110
- # @param [Object] Object to be compared
111
- def ==(o)
112
- return true if self.equal?(o)
113
- self.class == o.class &&
114
- end_date == o.end_date &&
115
- frequency == o.frequency &&
116
- original_purchase_date == o.original_purchase_date
117
- end
118
-
119
- # @see the `==` method
120
- # @param [Object] Object to be compared
121
- def eql?(o)
122
- self == o
123
- end
124
-
125
- # Calculates hash code according to all attributes.
126
- # @return [Fixnum] Hash code
127
- def hash
128
- [end_date, frequency, original_purchase_date].hash
129
- end
130
-
131
- # Builds the object from hash
132
- # @param [Hash] attributes Model attributes in the form of hash
133
- # @return [Object] Returns the model itself
134
- def build_from_hash(attributes)
135
- return nil unless attributes.is_a?(Hash)
136
- self.class.swagger_types.each_pair do |key, type|
137
- if type =~ /\AArray<(.*)>/i
138
- # check to ensure the input is an array given that the the attribute
139
- # is documented as an array but the input is not
140
- if attributes[self.class.attribute_map[key]].is_a?(Array)
141
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
142
- end
143
- elsif !attributes[self.class.attribute_map[key]].nil?
144
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
145
- end # or else data not found in attributes(hash), not an issue as the data can be optional
146
- end
147
-
148
- self
149
- end
150
-
151
- # Deserializes the data based on type
152
- # @param string type Data type
153
- # @param string value Value to be deserialized
154
- # @return [Object] Deserialized data
155
- def _deserialize(type, value)
156
- case type.to_sym
157
- when :DateTime
158
- DateTime.parse(value)
159
- when :Date
160
- Date.parse(value)
161
- when :String
162
- value.to_s
163
- when :Integer
164
- value.to_i
165
- when :Float
166
- value.to_f
167
- when :BOOLEAN
168
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
169
- true
170
- else
171
- false
172
- end
173
- when :Object
174
- # generic object (usually a Hash), return directly
175
- value
176
- when /\AArray<(?<inner_type>.+)>\z/
177
- inner_type = Regexp.last_match[:inner_type]
178
- value.map { |v| _deserialize(inner_type, v) }
179
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
180
- k_type = Regexp.last_match[:k_type]
181
- v_type = Regexp.last_match[:v_type]
182
- {}.tap do |hash|
183
- value.each do |k, v|
184
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
- end
186
- end
187
- else # model
188
- temp_model = CyberSource.const_get(type).new
189
- temp_model.build_from_hash(value)
190
- end
191
- end
192
-
193
- # Returns the string representation of the object
194
- # @return [String] String presentation of the object
195
- def to_s
196
- to_hash.to_s
197
- end
198
-
199
- # to_body is an alias to to_hash (backward compatibility)
200
- # @return [Hash] Returns the object in the form of hash
201
- def to_body
202
- to_hash
203
- end
204
-
205
- # Returns the object in the form of hash
206
- # @return [Hash] Returns the object in the form of hash
207
- def to_hash
208
- hash = {}
209
- self.class.attribute_map.each_pair do |attr, param|
210
- value = self.send(attr)
211
- next if value.nil?
212
- hash[param] = _to_hash(value)
213
- end
214
- hash
215
- end
216
-
217
- # Outputs non-array value in the form of hash
218
- # For object, use to_hash. Otherwise, just return the value
219
- # @param [Object] value Any valid value
220
- # @return [Hash] Returns the value in the form of hash
221
- def _to_hash(value)
222
- if value.is_a?(Array)
223
- value.compact.map { |v| _to_hash(v) }
224
- elsif value.is_a?(Hash)
225
- {}.tap do |hash|
226
- value.each { |k, v| hash[k] = _to_hash(v) }
227
- end
228
- elsif value.respond_to? :to_hash
229
- value.to_hash
230
- else
231
- value
232
- end
233
- end
234
- end
235
- end