cybersource_rest_client 0.0.73 → 0.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/core/MerchantConfig.rb +2 -1
  3. data/lib/cybersource_rest_client/api/batches_api.rb +9 -9
  4. data/lib/cybersource_rest_client/api/bin_lookup_api.rb +5 -5
  5. data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +6 -6
  6. data/lib/cybersource_rest_client/api/decision_manager_api.rb +3 -3
  7. data/lib/cybersource_rest_client/api/device_de_association_api.rb +168 -0
  8. data/lib/cybersource_rest_client/api/device_search_api.rb +78 -5
  9. data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +9 -9
  10. data/lib/cybersource_rest_client/api/merchant_boarding_api.rb +3 -3
  11. data/lib/cybersource_rest_client/api/payment_tokens_api.rb +96 -0
  12. data/lib/cybersource_rest_client/api/subscriptions_api.rb +5 -2
  13. data/lib/cybersource_rest_client/models/create_order_request.rb +269 -229
  14. data/lib/cybersource_rest_client/models/de_association_request_body.rb +190 -0
  15. data/lib/cybersource_rest_client/models/generate_capture_context_request.rb +1 -1
  16. data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +2 -2
  17. data/lib/cybersource_rest_client/models/get_subscription_response.rb +15 -5
  18. data/lib/cybersource_rest_client/models/get_subscription_response_reactivation_information.rb +213 -0
  19. data/lib/cybersource_rest_client/models/inline_response_200_10.rb +292 -0
  20. data/lib/cybersource_rest_client/models/{inline_response_200_9_records.rb → inline_response_200_10_records.rb} +3 -3
  21. data/lib/cybersource_rest_client/models/{inline_response_200_9_response_record.rb → inline_response_200_10_response_record.rb} +2 -2
  22. data/lib/cybersource_rest_client/models/{inline_response_200_9_response_record_additional_updates.rb → inline_response_200_10_response_record_additional_updates.rb} +1 -1
  23. data/lib/cybersource_rest_client/models/{inline_response_200_9_source_record.rb → inline_response_200_10_source_record.rb} +1 -1
  24. data/lib/cybersource_rest_client/models/inline_response_200_2.rb +253 -253
  25. data/lib/cybersource_rest_client/models/inline_response_200_5.rb +55 -10
  26. data/lib/cybersource_rest_client/models/inline_response_200_5_devices.rb +357 -0
  27. data/lib/cybersource_rest_client/models/inline_response_200_6.rb +10 -55
  28. data/lib/cybersource_rest_client/models/inline_response_200_7.rb +33 -37
  29. data/lib/cybersource_rest_client/models/{inline_response_200_6_devices.rb → inline_response_200_7_devices.rb} +2 -2
  30. data/lib/cybersource_rest_client/models/{inline_response_200_6_payment_processor_to_terminal_map.rb → inline_response_200_7_payment_processor_to_terminal_map.rb} +1 -1
  31. data/lib/cybersource_rest_client/models/inline_response_200_8.rb +47 -86
  32. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded.rb → inline_response_200_8__embedded.rb} +2 -2
  33. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded__links.rb → inline_response_200_8__embedded__links.rb} +2 -2
  34. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded__links_reports.rb → inline_response_200_8__embedded__links_reports.rb} +1 -1
  35. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded_batches.rb → inline_response_200_8__embedded_batches.rb} +3 -3
  36. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded_totals.rb → inline_response_200_8__embedded_totals.rb} +1 -1
  37. data/lib/cybersource_rest_client/models/inline_response_200_8__links.rb +16 -17
  38. data/lib/cybersource_rest_client/models/inline_response_200_9.rb +47 -49
  39. data/lib/cybersource_rest_client/models/inline_response_200_9__links.rb +201 -0
  40. data/lib/cybersource_rest_client/models/{inline_response_200_8__links_report.rb → inline_response_200_9__links_report.rb} +1 -1
  41. data/lib/cybersource_rest_client/models/{inline_response_200_8_billing.rb → inline_response_200_9_billing.rb} +1 -1
  42. data/lib/cybersource_rest_client/models/inline_response_201.rb +227 -218
  43. data/lib/cybersource_rest_client/models/inline_response_201_1.rb +218 -248
  44. data/lib/cybersource_rest_client/models/inline_response_201_2.rb +248 -281
  45. data/lib/cybersource_rest_client/models/{inline_response_201_1_payout_information.rb → inline_response_201_2_payout_information.rb} +216 -216
  46. data/lib/cybersource_rest_client/models/{inline_response_201_1_payout_information_pull_funds.rb → inline_response_201_2_payout_information_pull_funds.rb} +213 -213
  47. data/lib/cybersource_rest_client/models/{inline_response_201_1_payout_information_push_funds.rb → inline_response_201_2_payout_information_push_funds.rb} +417 -417
  48. data/lib/cybersource_rest_client/models/inline_response_201_3.rb +281 -222
  49. data/lib/cybersource_rest_client/models/{inline_response_201_2_integration_information.rb → inline_response_201_3_integration_information.rb} +192 -192
  50. data/lib/cybersource_rest_client/models/{inline_response_201_2_integration_information_tenant_configurations.rb → inline_response_201_3_integration_information_tenant_configurations.rb} +253 -253
  51. data/lib/cybersource_rest_client/models/{inline_response_201_2_organization_information.rb → inline_response_201_3_organization_information.rb} +217 -217
  52. data/lib/cybersource_rest_client/models/{inline_response_201_2_product_information_setups.rb → inline_response_201_3_product_information_setups.rb} +214 -214
  53. data/lib/cybersource_rest_client/models/{inline_response_201_2_registration_information.rb → inline_response_201_3_registration_information.rb} +222 -222
  54. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups.rb → inline_response_201_3_setups.rb} +219 -219
  55. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_commerce_solutions.rb → inline_response_201_3_setups_commerce_solutions.rb} +209 -209
  56. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments.rb → inline_response_201_3_setups_payments.rb} +369 -369
  57. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_alternative_payment_methods.rb → inline_response_201_3_setups_payments_alternative_payment_methods.rb} +221 -221
  58. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_alternative_payment_methods_configuration_status.rb → inline_response_201_3_setups_payments_alternative_payment_methods_configuration_status.rb} +200 -200
  59. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_card_processing.rb → inline_response_201_3_setups_payments_card_processing.rb} +199 -199
  60. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_card_processing_configuration_status.rb → inline_response_201_3_setups_payments_card_processing_configuration_status.rb} +255 -255
  61. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_card_processing_subscription_status.rb → inline_response_201_3_setups_payments_card_processing_subscription_status.rb} +234 -234
  62. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_payments_digital_payments.rb → inline_response_201_3_setups_payments_digital_payments.rb} +189 -189
  63. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_risk.rb → inline_response_201_3_setups_risk.rb} +199 -199
  64. data/lib/cybersource_rest_client/models/{inline_response_201_2_setups_value_added_services.rb → inline_response_201_3_setups_value_added_services.rb} +209 -209
  65. data/lib/cybersource_rest_client/models/inline_response_201_4.rb +222 -312
  66. data/lib/cybersource_rest_client/models/{inline_response_201_3_key_information.rb → inline_response_201_4_key_information.rb} +300 -300
  67. data/lib/cybersource_rest_client/models/{inline_response_201_3_key_information_error_information.rb → inline_response_201_4_key_information_error_information.rb} +202 -202
  68. data/lib/cybersource_rest_client/models/{inline_response_201_3_key_information_error_information_details.rb → inline_response_201_4_key_information_error_information_details.rb} +201 -201
  69. data/lib/cybersource_rest_client/models/inline_response_201_5.rb +312 -277
  70. data/lib/cybersource_rest_client/models/inline_response_201_6.rb +277 -202
  71. data/lib/cybersource_rest_client/models/{inline_response_201_5_payloads.rb → inline_response_201_6_payloads.rb} +189 -189
  72. data/lib/cybersource_rest_client/models/{inline_response_201_5_payloads_test_payload.rb → inline_response_201_6_payloads_test_payload.rb} +190 -190
  73. data/lib/cybersource_rest_client/models/inline_response_201_7.rb +202 -0
  74. data/lib/cybersource_rest_client/models/inline_response_201_order_information.rb +189 -0
  75. data/lib/cybersource_rest_client/models/inline_response_201_order_information_ship_to.rb +315 -0
  76. data/lib/cybersource_rest_client/models/inline_response_201_payment_information.rb +199 -0
  77. data/lib/cybersource_rest_client/models/inline_response_201_payment_information_e_wallet.rb +196 -0
  78. data/lib/cybersource_rest_client/models/inline_response_201_payment_information_tokenized_payment_method.rb +213 -0
  79. data/lib/cybersource_rest_client/models/payments_products.rb +1 -1
  80. data/lib/cybersource_rest_client/models/payments_products_unified_checkout.rb +199 -0
  81. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information.rb +189 -0
  82. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information_configurations.rb +189 -0
  83. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information_configurations_features.rb +189 -0
  84. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information_configurations_features_paze.rb +213 -0
  85. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information.rb +225 -0
  86. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features.rb +189 -0
  87. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_paze_for_unified_checkout.rb +190 -0
  88. data/lib/cybersource_rest_client/models/post_device_search_request.rb +223 -0
  89. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +609 -609
  90. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +269 -269
  91. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +364 -354
  92. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +309 -309
  93. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_payment_method.rb +213 -0
  94. data/lib/cybersource_rest_client/models/pts_v2_retrieve_payment_token_get400_response.rb +252 -0
  95. data/lib/cybersource_rest_client/models/pts_v2_retrieve_payment_token_get502_response.rb +240 -0
  96. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_card.rb +258 -258
  97. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_tokenized_card.rb +275 -275
  98. data/lib/cybersource_rest_client/models/ptsv2intents_event_information.rb +212 -0
  99. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_ship_to.rb +354 -332
  100. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information.rb +220 -189
  101. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information_e_wallet.rb +196 -0
  102. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information_tokenized_payment_method.rb +241 -0
  103. data/lib/cybersource_rest_client/models/ptsv2intents_processing_information.rb +351 -219
  104. data/lib/cybersource_rest_client/models/ptsv2intents_recipient_information.rb +245 -0
  105. data/lib/cybersource_rest_client/models/ptsv2intents_sender_information.rb +277 -0
  106. data/lib/cybersource_rest_client/models/ptsv2intents_sender_information_account.rb +190 -0
  107. data/lib/cybersource_rest_client/models/ptsv2intents_travel_information.rb +211 -0
  108. data/lib/cybersource_rest_client/models/ptsv2intents_travel_information_agency.rb +245 -0
  109. data/lib/cybersource_rest_client/models/{inline_response_200_7__links.rb → ptsv2intentsid_payment_information.rb} +189 -200
  110. data/lib/cybersource_rest_client/models/ptsv2paymentreferences_order_information_amount_details.rb +417 -400
  111. data/lib/cybersource_rest_client/models/ptsv2paymentreferences_payment_information_card.rb +275 -275
  112. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +433 -416
  113. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +668 -651
  114. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +716 -699
  115. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +356 -346
  116. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +445 -445
  117. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +377 -377
  118. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_payment_method.rb +196 -0
  119. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +604 -604
  120. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +377 -377
  121. data/lib/cybersource_rest_client/models/ptsv2paymenttokens_payment_information.rb +199 -0
  122. data/lib/cybersource_rest_client/models/ptsv2paymenttokens_processing_information.rb +192 -0
  123. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +258 -258
  124. data/lib/cybersource_rest_client/models/request.rb +199 -0
  125. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +241 -241
  126. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +258 -258
  127. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +351 -351
  128. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_card.rb +268 -268
  129. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +299 -299
  130. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +259 -259
  131. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +259 -259
  132. data/lib/cybersource_rest_client/models/riskv1decisions_travel_information_legs.rb +16 -5
  133. data/lib/cybersource_rest_client/models/riskv1liststypeentries_payment_information_card.rb +224 -224
  134. data/lib/cybersource_rest_client/models/tms_bin_lookup_issuer_information.rb +264 -264
  135. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_card.rb +277 -277
  136. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_card_brands.rb +213 -213
  137. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_features.rb +430 -430
  138. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_brands.rb +201 -201
  139. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +365 -365
  140. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +12 -1
  141. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +218 -218
  142. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processor_information.rb +245 -234
  143. data/lib/cybersource_rest_client/models/update_order_request.rb +229 -229
  144. data/lib/cybersource_rest_client/models/upv1capturecontexts_capture_mandate.rb +12 -1
  145. data/lib/cybersource_rest_client/models/upv1capturecontexts_complete_mandate.rb +18 -7
  146. data/lib/cybersource_rest_client.rb +75 -39
  147. metadata +77 -41
  148. data/lib/cybersource_rest_client/api/device_de_association_v3_api.rb +0 -96
@@ -1,416 +1,433 @@
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.4.38
10
- =end
11
-
12
- require 'date'
13
-
14
- module CyberSource
15
- class Ptsv2paymentsInstallmentInformation
16
- # Amount for the current installment payment. This field is supported only for CyberSource through VisaNet.
17
- attr_accessor :amount
18
-
19
- # Frequency of the installment payments. When you do not include this field in a request for a Crediario installment payment, CyberSource sends a space character to the processor. This field is supported only for CyberSource through VisaNet. Possible values: - `B`: Biweekly - `M`: Monthly - `W`: Weekly For Crediario installment payments, the value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP01 TCR9 - Position: 41 - Field: Installment Frequency
20
- attr_accessor :frequency
21
-
22
- # #### American Express Direct, Cielo, and CyberSource Latin American Processing Flag that indicates the type of funding for the installment plan associated with the payment. Possible values: - `1`: Merchant-funded installment plan - `2`: Issuer-funded installment plan If you do not include this field in the request, CyberSource uses the value in your CyberSource account. To change the value in your CyberSource account, contact CyberSource Customer Service. #### CyberSource through VisaNet and American Express Defined code that indicates the type of installment plan for this transaction. Contact American Express for: - Information about the kinds of installment plans that American Express provides - Values for this field For installment payments with American Express in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP07 TCR3 - Position: 5-6 - Field: Plan Type * The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant's acquirer, who uses this information to facilitate end-of-day clearing processing with payment card companies. #### CyberSource through VisaNet with Visa or Mastercard Flag indicating the type of funding for the installment plan associated with the payment. Possible values: - 1 or 01: Merchant-funded installment plan - 2 or 02: Issuer-funded installment plan - 43: Crediario installment plan—only with Visa in Brazil For installment payments with Visa in Brazil, the value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP07 TCR1 - Position: 5-6 - Field: Installment Type For all other kinds of installment payments, the value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP01 TCR5 - Position: 39-40 - Field: Installment Plan Type (Issuer or Merchant)
23
- attr_accessor :plan_type
24
-
25
- # Installment number when making payments in installments. Used along with `totalCount` to track which payment is being processed. For example, the second of 5 payments would be passed to CyberSource as `sequence` = 2 and `totalCount` = 5. #### Chase Paymentech Solutions and FDC Compass This field is optional because this value is required in the merchant descriptors. #### CyberSource through VisaNet When you do not include this field in a request for a Crediario installment payment, CyberSource sends a value of 0 to the processor. For Crediario installment payments, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP01 TCR9 - Position: 38-40 - Field: Installment Payment Number * The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant's acquirer, who uses this information to facilitate end-of-day clearing processing with payment card companies.
26
- attr_accessor :sequence
27
-
28
- # Total amount of the loan that is being paid in installments. This field is supported only for CyberSource through VisaNet.
29
- attr_accessor :total_amount
30
-
31
- # Total number of installments when making payments in installments. #### Chase Paymentech Solutions and FDC Compass This field is optional because this value is required in the merchant descriptors. #### American Express Direct, Cielo, and Comercio Latino This value is the total number of installments you approved. #### CyberSource Latin American Processing in Brazil This value is the total number of installments that you approved. The default is 1. #### All Other Processors This value is used along with _sequence_ to track which payment is being processed. For example, the second of 5 payments would be passed to CyberSource as _sequence_ = 2 and _totalCount_ = 5. #### CyberSource through VisaNet For Crediario installment payments, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP01 TCR9 - Position: 23-25 - Field: Number of Installments For installment payments with American Express in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP07 TCR3 - Position: 7-8 - Field: Number of Installments For installment payments with Visa in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP07 TCR1 - Position: 7-8 - Field: Number of Installments For all other kinds of installment payments, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP01 TCR5 - Position: 20-22 - Field: Installment Total Count **Note** The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant's acquirer, who uses this information to facilitate end-of-day clearing processing with payment card companies.
32
- attr_accessor :total_count
33
-
34
- # Date of the first installment payment. Format: YYMMDD. When you do not include this field, CyberSource sends a string of six zeros (000000) to the processor. This field is supported only for Crediario installment payments in Brazil on CyberSource through VisaNet. The value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR9 - Position: 42-47 - Field: Date of First Installment
35
- attr_accessor :first_installment_date
36
-
37
- # Invoice information that you want to provide to the issuer. This value is similar to a tracking number and is the same for all installment payments for one purchase. This field is supported only for installment payments with Mastercard on CyberSource through VisaNet in Brazil. The value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP07 TCR4 - Position: 51-70 - Field: Purchase Identification
38
- attr_accessor :invoice_data
39
-
40
- # Payment plan for the installments. This field is supported only for installment payments on Visa Platform Connect, RuPay and SPG-KSA seamless flow. Possible values for a standing-instruction (SI) merchant-initiated transaction (MIT) with Diners Club or Mastercard in India or with an India-issued card: - 1: SI with a fixed amount. - 2: SI with a maximum amount. - 3: Other kind of SI. Possible values for a type of Installment transaction for on-soil transaction in Kingdom of Saudi Arabia - 1: Registration or first transaction. - 2: Subsequent transaction. Possible values for other kinds of installment payments: - 0 (default): Regular installment. This value is not allowed for airline transactions. - 1: Installment payment with down payment. - 2: Installment payment without down payment. This value is supported only for airline transactions. - 3: Installment payment; down payment and boarding fee will follow. This value is supported only for airline transactions. - 4: Down payment only; regular installment payment will follow. - 5: Boarding fee only. This value is supported only for airline transactions. - 6: SI de-registration on RuPay for the payer authentication seamless flow.
41
- attr_accessor :payment_type
42
-
43
- # Indicates whether the authorization request is a Crediario eligibility inquiry. Set the value for this field to `Crediario`. This field is supported only for Crediario installment payments in Brazil on CyberSource through VisaNet.
44
- attr_accessor :eligibility_inquiry
45
-
46
- # Grace period requested by the customer before the first installment payment is due. When you include this field in a request, you must also include the grace period duration type field. The value for this field corresponds to the following data in the TC 33 capture file3: Record: CP01 TCR5, Position: 100-101, Field: Mastercard Grace Period Details. This field is supported only for Mastercard installment payments in Brazil and Greece.
47
- attr_accessor :grace_period_duration
48
-
49
- # Unit for the requested grace period duration. Possible values: - `D`: Days - `W`: Weeks - `M`: Months The value for this field corresponds to the following data in the TC 33 capture file3: Record: CP01 TCR5, Position: 99, Field: Mastercard Grace Period Details This field is supported only for Mastercard installment payments in Brazil and Greece on CyberSource through VisaNet.
50
- attr_accessor :grace_period_duration_type
51
-
52
- # Amount of the first installment payment. The issuer provides this value when the first installment payment is successful. This field is supported for Mastercard installment payments on CyberSource through VisaNet in all countries except Brazil,Croatia, Georgia, and Greece. The value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR5 - Position: 23-34 - Field: Amount of Each Installment
53
- attr_accessor :first_installment_amount
54
-
55
- # Standing Instruction/Installment validation indicator. - '1': Prevalidated - '2': Not Validated
56
- attr_accessor :validation_indicator
57
-
58
- # Standing Instruction/Installment identifier.
59
- attr_accessor :identifier
60
-
61
- # Attribute mapping from ruby-style variable name to JSON key.
62
- def self.attribute_map
63
- {
64
- :'amount' => :'amount',
65
- :'frequency' => :'frequency',
66
- :'plan_type' => :'planType',
67
- :'sequence' => :'sequence',
68
- :'total_amount' => :'totalAmount',
69
- :'total_count' => :'totalCount',
70
- :'first_installment_date' => :'firstInstallmentDate',
71
- :'invoice_data' => :'invoiceData',
72
- :'payment_type' => :'paymentType',
73
- :'eligibility_inquiry' => :'eligibilityInquiry',
74
- :'grace_period_duration' => :'gracePeriodDuration',
75
- :'grace_period_duration_type' => :'gracePeriodDurationType',
76
- :'first_installment_amount' => :'firstInstallmentAmount',
77
- :'validation_indicator' => :'validationIndicator',
78
- :'identifier' => :'identifier'
79
- }
80
- end
81
-
82
- # Attribute mapping from JSON key to ruby-style variable name.
83
- def self.json_map
84
- {
85
- :'amount' => :'amount',
86
- :'frequency' => :'frequency',
87
- :'plan_type' => :'plan_type',
88
- :'sequence' => :'sequence',
89
- :'total_amount' => :'total_amount',
90
- :'total_count' => :'total_count',
91
- :'first_installment_date' => :'first_installment_date',
92
- :'invoice_data' => :'invoice_data',
93
- :'payment_type' => :'payment_type',
94
- :'eligibility_inquiry' => :'eligibility_inquiry',
95
- :'grace_period_duration' => :'grace_period_duration',
96
- :'grace_period_duration_type' => :'grace_period_duration_type',
97
- :'first_installment_amount' => :'first_installment_amount',
98
- :'validation_indicator' => :'validation_indicator',
99
- :'identifier' => :'identifier'
100
- }
101
- end
102
-
103
- # Attribute type mapping.
104
- def self.swagger_types
105
- {
106
- :'amount' => :'String',
107
- :'frequency' => :'String',
108
- :'plan_type' => :'String',
109
- :'sequence' => :'Integer',
110
- :'total_amount' => :'String',
111
- :'total_count' => :'Integer',
112
- :'first_installment_date' => :'String',
113
- :'invoice_data' => :'String',
114
- :'payment_type' => :'String',
115
- :'eligibility_inquiry' => :'String',
116
- :'grace_period_duration' => :'String',
117
- :'grace_period_duration_type' => :'String',
118
- :'first_installment_amount' => :'String',
119
- :'validation_indicator' => :'String',
120
- :'identifier' => :'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?(:'amount')
133
- self.amount = attributes[:'amount']
134
- end
135
-
136
- if attributes.has_key?(:'frequency')
137
- self.frequency = attributes[:'frequency']
138
- end
139
-
140
- if attributes.has_key?(:'planType')
141
- self.plan_type = attributes[:'planType']
142
- end
143
-
144
- if attributes.has_key?(:'sequence')
145
- self.sequence = attributes[:'sequence']
146
- end
147
-
148
- if attributes.has_key?(:'totalAmount')
149
- self.total_amount = attributes[:'totalAmount']
150
- end
151
-
152
- if attributes.has_key?(:'totalCount')
153
- self.total_count = attributes[:'totalCount']
154
- end
155
-
156
- if attributes.has_key?(:'firstInstallmentDate')
157
- self.first_installment_date = attributes[:'firstInstallmentDate']
158
- end
159
-
160
- if attributes.has_key?(:'invoiceData')
161
- self.invoice_data = attributes[:'invoiceData']
162
- end
163
-
164
- if attributes.has_key?(:'paymentType')
165
- self.payment_type = attributes[:'paymentType']
166
- end
167
-
168
- if attributes.has_key?(:'eligibilityInquiry')
169
- self.eligibility_inquiry = attributes[:'eligibilityInquiry']
170
- end
171
-
172
- if attributes.has_key?(:'gracePeriodDuration')
173
- self.grace_period_duration = attributes[:'gracePeriodDuration']
174
- end
175
-
176
- if attributes.has_key?(:'gracePeriodDurationType')
177
- self.grace_period_duration_type = attributes[:'gracePeriodDurationType']
178
- end
179
-
180
- if attributes.has_key?(:'firstInstallmentAmount')
181
- self.first_installment_amount = attributes[:'firstInstallmentAmount']
182
- end
183
-
184
- if attributes.has_key?(:'validationIndicator')
185
- self.validation_indicator = attributes[:'validationIndicator']
186
- end
187
-
188
- if attributes.has_key?(:'identifier')
189
- self.identifier = attributes[:'identifier']
190
- end
191
- end
192
-
193
- # Show invalid properties with the reasons. Usually used together with valid?
194
- # @return Array for valid properties with the reasons
195
- def list_invalid_properties
196
- invalid_properties = Array.new
197
- invalid_properties
198
- end
199
-
200
- # Check to see if the all the properties in the model are valid
201
- # @return true if the model is valid
202
- def valid?
203
- true
204
- end
205
-
206
- # Custom attribute writer method with validation
207
- # @param [Object] amount Value to be assigned
208
- def amount=(amount)
209
- @amount = amount
210
- end
211
-
212
- # Custom attribute writer method with validation
213
- # @param [Object] frequency Value to be assigned
214
- def frequency=(frequency)
215
- @frequency = frequency
216
- end
217
-
218
- # Custom attribute writer method with validation
219
- # @param [Object] plan_type Value to be assigned
220
- def plan_type=(plan_type)
221
- @plan_type = plan_type
222
- end
223
-
224
- # Custom attribute writer method with validation
225
- # @param [Object] sequence Value to be assigned
226
- def sequence=(sequence)
227
- @sequence = sequence
228
- end
229
-
230
- # Custom attribute writer method with validation
231
- # @param [Object] total_amount Value to be assigned
232
- def total_amount=(total_amount)
233
- @total_amount = total_amount
234
- end
235
-
236
- # Custom attribute writer method with validation
237
- # @param [Object] total_count Value to be assigned
238
- def total_count=(total_count)
239
- @total_count = total_count
240
- end
241
-
242
- # Custom attribute writer method with validation
243
- # @param [Object] first_installment_date Value to be assigned
244
- def first_installment_date=(first_installment_date)
245
- @first_installment_date = first_installment_date
246
- end
247
-
248
- # Custom attribute writer method with validation
249
- # @param [Object] invoice_data Value to be assigned
250
- def invoice_data=(invoice_data)
251
- @invoice_data = invoice_data
252
- end
253
-
254
- # Custom attribute writer method with validation
255
- # @param [Object] payment_type Value to be assigned
256
- def payment_type=(payment_type)
257
- @payment_type = payment_type
258
- end
259
-
260
- # Custom attribute writer method with validation
261
- # @param [Object] eligibility_inquiry Value to be assigned
262
- def eligibility_inquiry=(eligibility_inquiry)
263
- @eligibility_inquiry = eligibility_inquiry
264
- end
265
-
266
- # Custom attribute writer method with validation
267
- # @param [Object] grace_period_duration_type Value to be assigned
268
- def grace_period_duration_type=(grace_period_duration_type)
269
- @grace_period_duration_type = grace_period_duration_type
270
- end
271
-
272
- # Custom attribute writer method with validation
273
- # @param [Object] first_installment_amount Value to be assigned
274
- def first_installment_amount=(first_installment_amount)
275
- @first_installment_amount = first_installment_amount
276
- end
277
-
278
- # Checks equality by comparing each attribute.
279
- # @param [Object] Object to be compared
280
- def ==(o)
281
- return true if self.equal?(o)
282
- self.class == o.class &&
283
- amount == o.amount &&
284
- frequency == o.frequency &&
285
- plan_type == o.plan_type &&
286
- sequence == o.sequence &&
287
- total_amount == o.total_amount &&
288
- total_count == o.total_count &&
289
- first_installment_date == o.first_installment_date &&
290
- invoice_data == o.invoice_data &&
291
- payment_type == o.payment_type &&
292
- eligibility_inquiry == o.eligibility_inquiry &&
293
- grace_period_duration == o.grace_period_duration &&
294
- grace_period_duration_type == o.grace_period_duration_type &&
295
- first_installment_amount == o.first_installment_amount &&
296
- validation_indicator == o.validation_indicator &&
297
- identifier == o.identifier
298
- end
299
-
300
- # @see the `==` method
301
- # @param [Object] Object to be compared
302
- def eql?(o)
303
- self == o
304
- end
305
-
306
- # Calculates hash code according to all attributes.
307
- # @return [Fixnum] Hash code
308
- def hash
309
- [amount, frequency, plan_type, sequence, total_amount, total_count, first_installment_date, invoice_data, payment_type, eligibility_inquiry, grace_period_duration, grace_period_duration_type, first_installment_amount, validation_indicator, identifier].hash
310
- end
311
-
312
- # Builds the object from hash
313
- # @param [Hash] attributes Model attributes in the form of hash
314
- # @return [Object] Returns the model itself
315
- def build_from_hash(attributes)
316
- return nil unless attributes.is_a?(Hash)
317
- self.class.swagger_types.each_pair do |key, type|
318
- if type =~ /\AArray<(.*)>/i
319
- # check to ensure the input is an array given that the the attribute
320
- # is documented as an array but the input is not
321
- if attributes[self.class.attribute_map[key]].is_a?(Array)
322
- self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
323
- end
324
- elsif !attributes[self.class.attribute_map[key]].nil?
325
- self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
326
- end # or else data not found in attributes(hash), not an issue as the data can be optional
327
- end
328
-
329
- self
330
- end
331
-
332
- # Deserializes the data based on type
333
- # @param string type Data type
334
- # @param string value Value to be deserialized
335
- # @return [Object] Deserialized data
336
- def _deserialize(type, value)
337
- case type.to_sym
338
- when :DateTime
339
- DateTime.parse(value)
340
- when :Date
341
- Date.parse(value)
342
- when :String
343
- value.to_s
344
- when :Integer
345
- value.to_i
346
- when :Float
347
- value.to_f
348
- when :BOOLEAN
349
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
350
- true
351
- else
352
- false
353
- end
354
- when :Object
355
- # generic object (usually a Hash), return directly
356
- value
357
- when /\AArray<(?<inner_type>.+)>\z/
358
- inner_type = Regexp.last_match[:inner_type]
359
- value.map { |v| _deserialize(inner_type, v) }
360
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
361
- k_type = Regexp.last_match[:k_type]
362
- v_type = Regexp.last_match[:v_type]
363
- {}.tap do |hash|
364
- value.each do |k, v|
365
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
366
- end
367
- end
368
- else # model
369
- temp_model = CyberSource.const_get(type).new
370
- temp_model.build_from_hash(value)
371
- end
372
- end
373
-
374
- # Returns the string representation of the object
375
- # @return [String] String presentation of the object
376
- def to_s
377
- to_hash.to_s
378
- end
379
-
380
- # to_body is an alias to to_hash (backward compatibility)
381
- # @return [Hash] Returns the object in the form of hash
382
- def to_body
383
- to_hash
384
- end
385
-
386
- # Returns the object in the form of hash
387
- # @return [Hash] Returns the object in the form of hash
388
- def to_hash
389
- hash = {}
390
- self.class.attribute_map.each_pair do |attr, param|
391
- value = self.send(attr)
392
- next if value.nil?
393
- hash[param] = _to_hash(value)
394
- end
395
- hash
396
- end
397
-
398
- # Outputs non-array value in the form of hash
399
- # For object, use to_hash. Otherwise, just return the value
400
- # @param [Object] value Any valid value
401
- # @return [Hash] Returns the value in the form of hash
402
- def _to_hash(value)
403
- if value.is_a?(Array)
404
- value.compact.map { |v| _to_hash(v) }
405
- elsif value.is_a?(Hash)
406
- {}.tap do |hash|
407
- value.each { |k, v| hash[k] = _to_hash(v) }
408
- end
409
- elsif value.respond_to? :to_hash
410
- value.to_hash
411
- else
412
- value
413
- end
414
- end
415
- end
416
- end
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.4.38
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module CyberSource
15
+ class Ptsv2paymentsInstallmentInformation
16
+ # Amount for the current installment payment. This field is supported only for CyberSource through VisaNet.
17
+ attr_accessor :amount
18
+
19
+ # Frequency of the installment payments. When you do not include this field in a request for a Crediario installment payment, CyberSource sends a space character to the processor. This field is supported only for CyberSource through VisaNet. Possible values: - `B`: Biweekly - `M`: Monthly - `W`: Weekly For Crediario installment payments, the value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP01 TCR9 - Position: 41 - Field: Installment Frequency
20
+ attr_accessor :frequency
21
+
22
+ # #### American Express Direct, Cielo, and CyberSource Latin American Processing Flag that indicates the type of funding for the installment plan associated with the payment. Possible values: - `1`: Merchant-funded installment plan - `2`: Issuer-funded installment plan If you do not include this field in the request, CyberSource uses the value in your CyberSource account. To change the value in your CyberSource account, contact CyberSource Customer Service. #### CyberSource through VisaNet and American Express Defined code that indicates the type of installment plan for this transaction. Contact American Express for: - Information about the kinds of installment plans that American Express provides - Values for this field For installment payments with American Express in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP07 TCR3 - Position: 5-6 - Field: Plan Type * The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant's acquirer, who uses this information to facilitate end-of-day clearing processing with payment card companies. #### CyberSource through VisaNet with Visa or Mastercard Flag indicating the type of funding for the installment plan associated with the payment. Possible values: - 1 or 01: Merchant-funded installment plan - 2 or 02: Issuer-funded installment plan - 43: Crediario installment plan—only with Visa in Brazil For installment payments with Visa in Brazil, the value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP07 TCR1 - Position: 5-6 - Field: Installment Type For all other kinds of installment payments, the value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP01 TCR5 - Position: 39-40 - Field: Installment Plan Type (Issuer or Merchant)
23
+ attr_accessor :plan_type
24
+
25
+ # Installment number when making payments in installments. Used along with `totalCount` to track which payment is being processed. For example, the second of 5 payments would be passed to CyberSource as `sequence` = 2 and `totalCount` = 5. #### Chase Paymentech Solutions and FDC Compass This field is optional because this value is required in the merchant descriptors. #### CyberSource through VisaNet When you do not include this field in a request for a Crediario installment payment, CyberSource sends a value of 0 to the processor. For Crediario installment payments, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP01 TCR9 - Position: 38-40 - Field: Installment Payment Number * The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant's acquirer, who uses this information to facilitate end-of-day clearing processing with payment card companies.
26
+ attr_accessor :sequence
27
+
28
+ # Total amount of the loan that is being paid in installments. This field is supported only for CyberSource through VisaNet.
29
+ attr_accessor :total_amount
30
+
31
+ # Total number of installments when making payments in installments. #### Chase Paymentech Solutions and FDC Compass This field is optional because this value is required in the merchant descriptors. #### American Express Direct, Cielo, and Comercio Latino This value is the total number of installments you approved. #### CyberSource Latin American Processing in Brazil This value is the total number of installments that you approved. The default is 1. #### All Other Processors This value is used along with _sequence_ to track which payment is being processed. For example, the second of 5 payments would be passed to CyberSource as _sequence_ = 2 and _totalCount_ = 5. #### CyberSource through VisaNet For Crediario installment payments, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP01 TCR9 - Position: 23-25 - Field: Number of Installments For installment payments with American Express in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP07 TCR3 - Position: 7-8 - Field: Number of Installments For installment payments with Visa in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP07 TCR1 - Position: 7-8 - Field: Number of Installments For all other kinds of installment payments, the value for this field corresponds to the following data in the TC 33 capture file*: - Record: CP01 TCR5 - Position: 20-22 - Field: Installment Total Count **Note** The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant's acquirer, who uses this information to facilitate end-of-day clearing processing with payment card companies.
32
+ attr_accessor :total_count
33
+
34
+ # Date of the first installment payment. Format: YYMMDD. When you do not include this field, CyberSource sends a string of six zeros (000000) to the processor. This field is supported only for Crediario installment payments in Brazil on CyberSource through VisaNet. The value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR9 - Position: 42-47 - Field: Date of First Installment
35
+ attr_accessor :first_installment_date
36
+
37
+ # Invoice information that you want to provide to the issuer. This value is similar to a tracking number and is the same for all installment payments for one purchase. This field is supported only for installment payments with Mastercard on CyberSource through VisaNet in Brazil. The value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP07 TCR4 - Position: 51-70 - Field: Purchase Identification
38
+ attr_accessor :invoice_data
39
+
40
+ # Payment plan for the installments. This field is supported only for installment payments on Visa Platform Connect, RuPay and SPG-KSA seamless flow. Possible values for a standing-instruction (SI) merchant-initiated transaction (MIT) with Diners Club or Mastercard in India or with an India-issued card: - 1: SI with a fixed amount. - 2: SI with a maximum amount. - 3: Other kind of SI. Possible values for a type of Installment transaction for on-soil transaction in Kingdom of Saudi Arabia - 1: Registration or first transaction. - 2: Subsequent transaction. Possible values for other kinds of installment payments: - 0 (default): Regular installment. This value is not allowed for airline transactions. - 1: Installment payment with down payment. - 2: Installment payment without down payment. This value is supported only for airline transactions. - 3: Installment payment; down payment and boarding fee will follow. This value is supported only for airline transactions. - 4: Down payment only; regular installment payment will follow. - 5: Boarding fee only. This value is supported only for airline transactions. - 6: SI de-registration on RuPay for the payer authentication seamless flow.
41
+ attr_accessor :payment_type
42
+
43
+ # Indicates whether the authorization request is a Crediario eligibility inquiry. Set the value for this field to `Crediario`. This field is supported only for Crediario installment payments in Brazil on CyberSource through VisaNet.
44
+ attr_accessor :eligibility_inquiry
45
+
46
+ # Grace period requested by the customer before the first installment payment is due. When you include this field in a request, you must also include the grace period duration type field. The value for this field corresponds to the following data in the TC 33 capture file3: Record: CP01 TCR5, Position: 100-101, Field: Mastercard Grace Period Details. This field is supported only for Mastercard installment payments in Brazil and Greece.
47
+ attr_accessor :grace_period_duration
48
+
49
+ # Unit for the requested grace period duration. Possible values: - `D`: Days - `W`: Weeks - `M`: Months The value for this field corresponds to the following data in the TC 33 capture file3: Record: CP01 TCR5, Position: 99, Field: Mastercard Grace Period Details This field is supported only for Mastercard installment payments in Brazil and Greece on CyberSource through VisaNet.
50
+ attr_accessor :grace_period_duration_type
51
+
52
+ # Amount of the first installment payment. The issuer provides this value when the first installment payment is successful. This field is supported for Mastercard installment payments on CyberSource through VisaNet in all countries except Brazil,Croatia, Georgia, and Greece. The value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR5 - Position: 23-34 - Field: Amount of Each Installment
53
+ attr_accessor :first_installment_amount
54
+
55
+ # Standing Instruction/Installment validation indicator. - '1': Prevalidated - '2': Not Validated
56
+ attr_accessor :validation_indicator
57
+
58
+ # Standing Instruction/Installment identifier.
59
+ attr_accessor :identifier
60
+
61
+ # Annual interest rate. This field is returned only for two kinds of installment payments on Visa Platform Connect: - Crediario with Visa in Brazil: this field is included in the authorization response for the Crediario eligibility request when the issuer approves the customer's request for Crediario installment payments. - Mastercard in all countries except Brazil, Croatia, Georgia, and Greece. Example: A value of 1.0 specifies 1%. Example: A value of 4.0 specifies 4%. #### Brazil The value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR9 - Position: 151-157 - Field: Annual Interest Rate #### Other Countries The value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR5 - Position: 58-62 SCMP API Fields| 216 - Field: Mastercard Annual Percentage Rate
62
+ attr_accessor :annual_interest_rate
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'amount' => :'amount',
68
+ :'frequency' => :'frequency',
69
+ :'plan_type' => :'planType',
70
+ :'sequence' => :'sequence',
71
+ :'total_amount' => :'totalAmount',
72
+ :'total_count' => :'totalCount',
73
+ :'first_installment_date' => :'firstInstallmentDate',
74
+ :'invoice_data' => :'invoiceData',
75
+ :'payment_type' => :'paymentType',
76
+ :'eligibility_inquiry' => :'eligibilityInquiry',
77
+ :'grace_period_duration' => :'gracePeriodDuration',
78
+ :'grace_period_duration_type' => :'gracePeriodDurationType',
79
+ :'first_installment_amount' => :'firstInstallmentAmount',
80
+ :'validation_indicator' => :'validationIndicator',
81
+ :'identifier' => :'identifier',
82
+ :'annual_interest_rate' => :'annualInterestRate'
83
+ }
84
+ end
85
+
86
+ # Attribute mapping from JSON key to ruby-style variable name.
87
+ def self.json_map
88
+ {
89
+ :'amount' => :'amount',
90
+ :'frequency' => :'frequency',
91
+ :'plan_type' => :'plan_type',
92
+ :'sequence' => :'sequence',
93
+ :'total_amount' => :'total_amount',
94
+ :'total_count' => :'total_count',
95
+ :'first_installment_date' => :'first_installment_date',
96
+ :'invoice_data' => :'invoice_data',
97
+ :'payment_type' => :'payment_type',
98
+ :'eligibility_inquiry' => :'eligibility_inquiry',
99
+ :'grace_period_duration' => :'grace_period_duration',
100
+ :'grace_period_duration_type' => :'grace_period_duration_type',
101
+ :'first_installment_amount' => :'first_installment_amount',
102
+ :'validation_indicator' => :'validation_indicator',
103
+ :'identifier' => :'identifier',
104
+ :'annual_interest_rate' => :'annual_interest_rate'
105
+ }
106
+ end
107
+
108
+ # Attribute type mapping.
109
+ def self.swagger_types
110
+ {
111
+ :'amount' => :'String',
112
+ :'frequency' => :'String',
113
+ :'plan_type' => :'String',
114
+ :'sequence' => :'Integer',
115
+ :'total_amount' => :'String',
116
+ :'total_count' => :'Integer',
117
+ :'first_installment_date' => :'String',
118
+ :'invoice_data' => :'String',
119
+ :'payment_type' => :'String',
120
+ :'eligibility_inquiry' => :'String',
121
+ :'grace_period_duration' => :'String',
122
+ :'grace_period_duration_type' => :'String',
123
+ :'first_installment_amount' => :'String',
124
+ :'validation_indicator' => :'String',
125
+ :'identifier' => :'String',
126
+ :'annual_interest_rate' => :'String'
127
+ }
128
+ end
129
+
130
+ # Initializes the object
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ def initialize(attributes = {})
133
+ return unless attributes.is_a?(Hash)
134
+
135
+ # convert string to symbol for hash key
136
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
137
+
138
+ if attributes.has_key?(:'amount')
139
+ self.amount = attributes[:'amount']
140
+ end
141
+
142
+ if attributes.has_key?(:'frequency')
143
+ self.frequency = attributes[:'frequency']
144
+ end
145
+
146
+ if attributes.has_key?(:'planType')
147
+ self.plan_type = attributes[:'planType']
148
+ end
149
+
150
+ if attributes.has_key?(:'sequence')
151
+ self.sequence = attributes[:'sequence']
152
+ end
153
+
154
+ if attributes.has_key?(:'totalAmount')
155
+ self.total_amount = attributes[:'totalAmount']
156
+ end
157
+
158
+ if attributes.has_key?(:'totalCount')
159
+ self.total_count = attributes[:'totalCount']
160
+ end
161
+
162
+ if attributes.has_key?(:'firstInstallmentDate')
163
+ self.first_installment_date = attributes[:'firstInstallmentDate']
164
+ end
165
+
166
+ if attributes.has_key?(:'invoiceData')
167
+ self.invoice_data = attributes[:'invoiceData']
168
+ end
169
+
170
+ if attributes.has_key?(:'paymentType')
171
+ self.payment_type = attributes[:'paymentType']
172
+ end
173
+
174
+ if attributes.has_key?(:'eligibilityInquiry')
175
+ self.eligibility_inquiry = attributes[:'eligibilityInquiry']
176
+ end
177
+
178
+ if attributes.has_key?(:'gracePeriodDuration')
179
+ self.grace_period_duration = attributes[:'gracePeriodDuration']
180
+ end
181
+
182
+ if attributes.has_key?(:'gracePeriodDurationType')
183
+ self.grace_period_duration_type = attributes[:'gracePeriodDurationType']
184
+ end
185
+
186
+ if attributes.has_key?(:'firstInstallmentAmount')
187
+ self.first_installment_amount = attributes[:'firstInstallmentAmount']
188
+ end
189
+
190
+ if attributes.has_key?(:'validationIndicator')
191
+ self.validation_indicator = attributes[:'validationIndicator']
192
+ end
193
+
194
+ if attributes.has_key?(:'identifier')
195
+ self.identifier = attributes[:'identifier']
196
+ end
197
+
198
+ if attributes.has_key?(:'annualInterestRate')
199
+ self.annual_interest_rate = attributes[:'annualInterestRate']
200
+ end
201
+ end
202
+
203
+ # Show invalid properties with the reasons. Usually used together with valid?
204
+ # @return Array for valid properties with the reasons
205
+ def list_invalid_properties
206
+ invalid_properties = Array.new
207
+ invalid_properties
208
+ end
209
+
210
+ # Check to see if the all the properties in the model are valid
211
+ # @return true if the model is valid
212
+ def valid?
213
+ true
214
+ end
215
+
216
+ # Custom attribute writer method with validation
217
+ # @param [Object] amount Value to be assigned
218
+ def amount=(amount)
219
+ @amount = amount
220
+ end
221
+
222
+ # Custom attribute writer method with validation
223
+ # @param [Object] frequency Value to be assigned
224
+ def frequency=(frequency)
225
+ @frequency = frequency
226
+ end
227
+
228
+ # Custom attribute writer method with validation
229
+ # @param [Object] plan_type Value to be assigned
230
+ def plan_type=(plan_type)
231
+ @plan_type = plan_type
232
+ end
233
+
234
+ # Custom attribute writer method with validation
235
+ # @param [Object] sequence Value to be assigned
236
+ def sequence=(sequence)
237
+ @sequence = sequence
238
+ end
239
+
240
+ # Custom attribute writer method with validation
241
+ # @param [Object] total_amount Value to be assigned
242
+ def total_amount=(total_amount)
243
+ @total_amount = total_amount
244
+ end
245
+
246
+ # Custom attribute writer method with validation
247
+ # @param [Object] total_count Value to be assigned
248
+ def total_count=(total_count)
249
+ @total_count = total_count
250
+ end
251
+
252
+ # Custom attribute writer method with validation
253
+ # @param [Object] first_installment_date Value to be assigned
254
+ def first_installment_date=(first_installment_date)
255
+ @first_installment_date = first_installment_date
256
+ end
257
+
258
+ # Custom attribute writer method with validation
259
+ # @param [Object] invoice_data Value to be assigned
260
+ def invoice_data=(invoice_data)
261
+ @invoice_data = invoice_data
262
+ end
263
+
264
+ # Custom attribute writer method with validation
265
+ # @param [Object] payment_type Value to be assigned
266
+ def payment_type=(payment_type)
267
+ @payment_type = payment_type
268
+ end
269
+
270
+ # Custom attribute writer method with validation
271
+ # @param [Object] eligibility_inquiry Value to be assigned
272
+ def eligibility_inquiry=(eligibility_inquiry)
273
+ @eligibility_inquiry = eligibility_inquiry
274
+ end
275
+
276
+ # Custom attribute writer method with validation
277
+ # @param [Object] grace_period_duration_type Value to be assigned
278
+ def grace_period_duration_type=(grace_period_duration_type)
279
+ @grace_period_duration_type = grace_period_duration_type
280
+ end
281
+
282
+ # Custom attribute writer method with validation
283
+ # @param [Object] first_installment_amount Value to be assigned
284
+ def first_installment_amount=(first_installment_amount)
285
+ @first_installment_amount = first_installment_amount
286
+ end
287
+
288
+ # Custom attribute writer method with validation
289
+ # @param [Object] annual_interest_rate Value to be assigned
290
+ def annual_interest_rate=(annual_interest_rate)
291
+ @annual_interest_rate = annual_interest_rate
292
+ end
293
+
294
+ # Checks equality by comparing each attribute.
295
+ # @param [Object] Object to be compared
296
+ def ==(o)
297
+ return true if self.equal?(o)
298
+ self.class == o.class &&
299
+ amount == o.amount &&
300
+ frequency == o.frequency &&
301
+ plan_type == o.plan_type &&
302
+ sequence == o.sequence &&
303
+ total_amount == o.total_amount &&
304
+ total_count == o.total_count &&
305
+ first_installment_date == o.first_installment_date &&
306
+ invoice_data == o.invoice_data &&
307
+ payment_type == o.payment_type &&
308
+ eligibility_inquiry == o.eligibility_inquiry &&
309
+ grace_period_duration == o.grace_period_duration &&
310
+ grace_period_duration_type == o.grace_period_duration_type &&
311
+ first_installment_amount == o.first_installment_amount &&
312
+ validation_indicator == o.validation_indicator &&
313
+ identifier == o.identifier &&
314
+ annual_interest_rate == o.annual_interest_rate
315
+ end
316
+
317
+ # @see the `==` method
318
+ # @param [Object] Object to be compared
319
+ def eql?(o)
320
+ self == o
321
+ end
322
+
323
+ # Calculates hash code according to all attributes.
324
+ # @return [Fixnum] Hash code
325
+ def hash
326
+ [amount, frequency, plan_type, sequence, total_amount, total_count, first_installment_date, invoice_data, payment_type, eligibility_inquiry, grace_period_duration, grace_period_duration_type, first_installment_amount, validation_indicator, identifier, annual_interest_rate].hash
327
+ end
328
+
329
+ # Builds the object from hash
330
+ # @param [Hash] attributes Model attributes in the form of hash
331
+ # @return [Object] Returns the model itself
332
+ def build_from_hash(attributes)
333
+ return nil unless attributes.is_a?(Hash)
334
+ self.class.swagger_types.each_pair do |key, type|
335
+ if type =~ /\AArray<(.*)>/i
336
+ # check to ensure the input is an array given that the the attribute
337
+ # is documented as an array but the input is not
338
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
339
+ self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
340
+ end
341
+ elsif !attributes[self.class.attribute_map[key]].nil?
342
+ self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
343
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
344
+ end
345
+
346
+ self
347
+ end
348
+
349
+ # Deserializes the data based on type
350
+ # @param string type Data type
351
+ # @param string value Value to be deserialized
352
+ # @return [Object] Deserialized data
353
+ def _deserialize(type, value)
354
+ case type.to_sym
355
+ when :DateTime
356
+ DateTime.parse(value)
357
+ when :Date
358
+ Date.parse(value)
359
+ when :String
360
+ value.to_s
361
+ when :Integer
362
+ value.to_i
363
+ when :Float
364
+ value.to_f
365
+ when :BOOLEAN
366
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
367
+ true
368
+ else
369
+ false
370
+ end
371
+ when :Object
372
+ # generic object (usually a Hash), return directly
373
+ value
374
+ when /\AArray<(?<inner_type>.+)>\z/
375
+ inner_type = Regexp.last_match[:inner_type]
376
+ value.map { |v| _deserialize(inner_type, v) }
377
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
378
+ k_type = Regexp.last_match[:k_type]
379
+ v_type = Regexp.last_match[:v_type]
380
+ {}.tap do |hash|
381
+ value.each do |k, v|
382
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
383
+ end
384
+ end
385
+ else # model
386
+ temp_model = CyberSource.const_get(type).new
387
+ temp_model.build_from_hash(value)
388
+ end
389
+ end
390
+
391
+ # Returns the string representation of the object
392
+ # @return [String] String presentation of the object
393
+ def to_s
394
+ to_hash.to_s
395
+ end
396
+
397
+ # to_body is an alias to to_hash (backward compatibility)
398
+ # @return [Hash] Returns the object in the form of hash
399
+ def to_body
400
+ to_hash
401
+ end
402
+
403
+ # Returns the object in the form of hash
404
+ # @return [Hash] Returns the object in the form of hash
405
+ def to_hash
406
+ hash = {}
407
+ self.class.attribute_map.each_pair do |attr, param|
408
+ value = self.send(attr)
409
+ next if value.nil?
410
+ hash[param] = _to_hash(value)
411
+ end
412
+ hash
413
+ end
414
+
415
+ # Outputs non-array value in the form of hash
416
+ # For object, use to_hash. Otherwise, just return the value
417
+ # @param [Object] value Any valid value
418
+ # @return [Hash] Returns the value in the form of hash
419
+ def _to_hash(value)
420
+ if value.is_a?(Array)
421
+ value.compact.map { |v| _to_hash(v) }
422
+ elsif value.is_a?(Hash)
423
+ {}.tap do |hash|
424
+ value.each { |k, v| hash[k] = _to_hash(v) }
425
+ end
426
+ elsif value.respond_to? :to_hash
427
+ value.to_hash
428
+ else
429
+ value
430
+ end
431
+ end
432
+ end
433
+ end