cybersource_rest_client 0.0.75 → 0.0.77

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 (210) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +6 -17
  3. data/lib/AuthenticationSDK/core/MerchantConfig.rb +132 -54
  4. data/lib/AuthenticationSDK/util/Cache.rb +135 -30
  5. data/lib/AuthenticationSDK/util/CacheValue.rb +18 -0
  6. data/lib/AuthenticationSDK/util/CertificateUtility.rb +124 -0
  7. data/lib/AuthenticationSDK/util/Constants.rb +6 -0
  8. data/lib/AuthenticationSDK/util/JWEUtility.rb +1 -2
  9. data/lib/AuthenticationSDK/util/MLEUtility.rb +26 -35
  10. data/lib/AuthenticationSDK/util/Utility.rb +1 -16
  11. data/lib/cybersource_rest_client/api/batches_api.rb +17 -17
  12. data/lib/cybersource_rest_client/api/billing_agreements_api.rb +6 -6
  13. data/lib/cybersource_rest_client/api/bin_lookup_api.rb +2 -2
  14. data/lib/cybersource_rest_client/api/capture_api.rb +2 -2
  15. data/lib/cybersource_rest_client/api/chargeback_details_api.rb +2 -2
  16. data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +2 -2
  17. data/lib/cybersource_rest_client/api/conversion_details_api.rb +2 -2
  18. data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +6 -6
  19. data/lib/cybersource_rest_client/api/credit_api.rb +2 -2
  20. data/lib/cybersource_rest_client/api/customer_api.rb +8 -8
  21. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +10 -10
  22. data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +10 -10
  23. data/lib/cybersource_rest_client/api/decision_manager_api.rb +10 -10
  24. data/lib/cybersource_rest_client/api/device_de_association_api.rb +7 -7
  25. data/lib/cybersource_rest_client/api/device_search_api.rb +10 -10
  26. data/lib/cybersource_rest_client/api/download_dtd_api.rb +2 -2
  27. data/lib/cybersource_rest_client/api/download_xsd_api.rb +2 -2
  28. data/lib/cybersource_rest_client/api/emv_tag_details_api.rb +4 -4
  29. data/lib/cybersource_rest_client/api/flex_api_api.rb +2 -2
  30. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +12 -12
  31. data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +2 -2
  32. data/lib/cybersource_rest_client/api/invoice_settings_api.rb +4 -4
  33. data/lib/cybersource_rest_client/api/invoices_api.rb +87 -12
  34. data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +18 -17
  35. data/lib/cybersource_rest_client/api/merchant_boarding_api.rb +4 -4
  36. data/lib/cybersource_rest_client/api/microform_integration_api.rb +2 -2
  37. data/lib/cybersource_rest_client/api/net_fundings_api.rb +2 -2
  38. data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +2 -2
  39. data/lib/cybersource_rest_client/api/orders_api.rb +4 -4
  40. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +6 -6
  41. data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +2 -2
  42. data/lib/cybersource_rest_client/api/payment_instrument_api.rb +8 -8
  43. data/lib/cybersource_rest_client/api/payment_links_api.rb +12 -12
  44. data/lib/cybersource_rest_client/api/payment_tokens_api.rb +2 -2
  45. data/lib/cybersource_rest_client/api/payments_api.rb +12 -12
  46. data/lib/cybersource_rest_client/api/payouts_api.rb +2 -2
  47. data/lib/cybersource_rest_client/api/plans_api.rb +16 -16
  48. data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +2 -2
  49. data/lib/cybersource_rest_client/api/push_funds_api.rb +2 -2
  50. data/lib/cybersource_rest_client/api/refund_api.rb +4 -4
  51. data/lib/cybersource_rest_client/api/report_definitions_api.rb +4 -4
  52. data/lib/cybersource_rest_client/api/report_downloads_api.rb +2 -2
  53. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +10 -10
  54. data/lib/cybersource_rest_client/api/reports_api.rb +6 -6
  55. data/lib/cybersource_rest_client/api/retrieval_details_api.rb +2 -2
  56. data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +2 -2
  57. data/lib/cybersource_rest_client/api/reversal_api.rb +4 -4
  58. data/lib/cybersource_rest_client/api/search_transactions_api.rb +4 -4
  59. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +4 -4
  60. data/lib/cybersource_rest_client/api/subscriptions_api.rb +16 -16
  61. data/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +4 -4
  62. data/lib/cybersource_rest_client/api/taxes_api.rb +4 -4
  63. data/lib/cybersource_rest_client/api/token_api.rb +4 -4
  64. data/lib/cybersource_rest_client/api/tokenized_card_api.rb +6 -6
  65. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +8 -8
  66. data/lib/cybersource_rest_client/api/transaction_details_api.rb +2 -2
  67. data/lib/cybersource_rest_client/api/transient_token_data_api.rb +4 -4
  68. data/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb +2 -2
  69. data/lib/cybersource_rest_client/api/user_management_api.rb +2 -2
  70. data/lib/cybersource_rest_client/api/user_management_search_api.rb +2 -2
  71. data/lib/cybersource_rest_client/api/verification_api.rb +4 -4
  72. data/lib/cybersource_rest_client/api/void_api.rb +10 -10
  73. data/lib/cybersource_rest_client/api_client.rb +3 -1
  74. data/lib/cybersource_rest_client/ethon_extensions.rb +38 -0
  75. data/lib/cybersource_rest_client/models/create_order_request.rb +269 -269
  76. data/lib/cybersource_rest_client/models/create_webhook.rb +16 -3
  77. data/lib/cybersource_rest_client/models/inline_response_200_10.rb +47 -49
  78. data/lib/cybersource_rest_client/models/{inline_response_200_8__links.rb → inline_response_200_10__links.rb} +18 -17
  79. data/lib/cybersource_rest_client/models/{inline_response_200_9__links_report.rb → inline_response_200_10__links_report.rb} +1 -1
  80. data/lib/cybersource_rest_client/models/{inline_response_200_9_billing.rb → inline_response_200_10_billing.rb} +1 -1
  81. data/lib/cybersource_rest_client/models/inline_response_200_11.rb +292 -0
  82. data/lib/cybersource_rest_client/models/{inline_response_200_10_records.rb → inline_response_200_11_records.rb} +3 -3
  83. data/lib/cybersource_rest_client/models/{inline_response_200_10_response_record.rb → inline_response_200_11_response_record.rb} +2 -2
  84. data/lib/cybersource_rest_client/models/{inline_response_200_10_response_record_additional_updates.rb → inline_response_200_11_response_record_additional_updates.rb} +1 -1
  85. data/lib/cybersource_rest_client/models/{inline_response_200_10_source_record.rb → inline_response_200_11_source_record.rb} +1 -1
  86. data/lib/cybersource_rest_client/models/inline_response_200_2.rb +253 -253
  87. data/lib/cybersource_rest_client/models/inline_response_200_4.rb +12 -10
  88. data/lib/cybersource_rest_client/models/inline_response_200_5.rb +129 -51
  89. data/lib/cybersource_rest_client/models/inline_response_200_6.rb +55 -10
  90. data/lib/cybersource_rest_client/models/{inline_response_200_5_devices.rb → inline_response_200_6_devices.rb} +1 -1
  91. data/lib/cybersource_rest_client/models/inline_response_200_7.rb +10 -55
  92. data/lib/cybersource_rest_client/models/inline_response_200_8.rb +33 -37
  93. data/lib/cybersource_rest_client/models/{inline_response_200_7_devices.rb → inline_response_200_8_devices.rb} +2 -2
  94. data/lib/cybersource_rest_client/models/{inline_response_200_7_payment_processor_to_terminal_map.rb → inline_response_200_8_payment_processor_to_terminal_map.rb} +1 -1
  95. data/lib/cybersource_rest_client/models/inline_response_200_9.rb +47 -86
  96. data/lib/cybersource_rest_client/models/{inline_response_200_8__embedded.rb → inline_response_200_9__embedded.rb} +2 -2
  97. data/lib/cybersource_rest_client/models/{inline_response_200_8__embedded__links.rb → inline_response_200_9__embedded__links.rb} +2 -2
  98. data/lib/cybersource_rest_client/models/{inline_response_200_8__embedded__links_reports.rb → inline_response_200_9__embedded__links_reports.rb} +1 -1
  99. data/lib/cybersource_rest_client/models/{inline_response_200_8__embedded_batches.rb → inline_response_200_9__embedded_batches.rb} +3 -3
  100. data/lib/cybersource_rest_client/models/{inline_response_200_8__embedded_totals.rb → inline_response_200_9__embedded_totals.rb} +1 -1
  101. data/lib/cybersource_rest_client/models/inline_response_200_9__links.rb +16 -17
  102. data/lib/cybersource_rest_client/models/inline_response_201.rb +227 -227
  103. data/lib/cybersource_rest_client/models/inline_response_201_1.rb +218 -218
  104. data/lib/cybersource_rest_client/models/inline_response_201_2.rb +248 -248
  105. data/lib/cybersource_rest_client/models/inline_response_201_2_payout_information.rb +216 -216
  106. data/lib/cybersource_rest_client/models/inline_response_201_2_payout_information_pull_funds.rb +213 -213
  107. data/lib/cybersource_rest_client/models/inline_response_201_2_payout_information_push_funds.rb +417 -417
  108. data/lib/cybersource_rest_client/models/inline_response_201_3.rb +281 -281
  109. data/lib/cybersource_rest_client/models/inline_response_201_3_integration_information.rb +192 -192
  110. data/lib/cybersource_rest_client/models/inline_response_201_3_integration_information_tenant_configurations.rb +253 -253
  111. data/lib/cybersource_rest_client/models/inline_response_201_3_organization_information.rb +217 -217
  112. data/lib/cybersource_rest_client/models/inline_response_201_3_product_information_setups.rb +214 -214
  113. data/lib/cybersource_rest_client/models/inline_response_201_3_registration_information.rb +222 -222
  114. data/lib/cybersource_rest_client/models/inline_response_201_3_setups.rb +219 -219
  115. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_commerce_solutions.rb +209 -209
  116. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_payments.rb +369 -369
  117. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_payments_alternative_payment_methods.rb +221 -221
  118. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_payments_alternative_payment_methods_configuration_status.rb +200 -200
  119. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_payments_card_processing.rb +199 -199
  120. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_payments_card_processing_configuration_status.rb +255 -255
  121. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_payments_card_processing_subscription_status.rb +234 -234
  122. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_payments_digital_payments.rb +189 -189
  123. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_risk.rb +199 -199
  124. data/lib/cybersource_rest_client/models/inline_response_201_3_setups_value_added_services.rb +209 -209
  125. data/lib/cybersource_rest_client/models/inline_response_201_4.rb +222 -222
  126. data/lib/cybersource_rest_client/models/inline_response_201_4_key_information.rb +300 -300
  127. data/lib/cybersource_rest_client/models/inline_response_201_4_key_information_error_information.rb +202 -202
  128. data/lib/cybersource_rest_client/models/inline_response_201_4_key_information_error_information_details.rb +201 -201
  129. data/lib/cybersource_rest_client/models/inline_response_201_5.rb +314 -312
  130. data/lib/cybersource_rest_client/models/inline_response_201_6.rb +277 -277
  131. data/lib/cybersource_rest_client/models/inline_response_201_6_payloads.rb +189 -189
  132. data/lib/cybersource_rest_client/models/inline_response_201_6_payloads_test_payload.rb +190 -190
  133. data/lib/cybersource_rest_client/models/inline_response_201_7.rb +202 -202
  134. data/lib/cybersource_rest_client/models/inline_response_201_order_information.rb +189 -189
  135. data/lib/cybersource_rest_client/models/inline_response_201_order_information_ship_to.rb +315 -315
  136. data/lib/cybersource_rest_client/models/inline_response_201_payment_information.rb +199 -199
  137. data/lib/cybersource_rest_client/models/inline_response_201_payment_information_e_wallet.rb +196 -196
  138. data/lib/cybersource_rest_client/models/inline_response_201_payment_information_tokenized_payment_method.rb +213 -213
  139. data/lib/cybersource_rest_client/models/invoicing_v2_invoice_settings_get200_response_invoice_settings_information.rb +18 -5
  140. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_post201_response_invoice_information.rb +18 -5
  141. data/lib/cybersource_rest_client/models/{notificationsubscriptionsv2webhooks_security_policy_1_config.rb → invoicing_v2_invoices_post201_response_invoice_information_custom_labels.rb} +57 -34
  142. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_publish200_response.rb +268 -0
  143. data/lib/cybersource_rest_client/models/invoicingv2invoice_settings_invoice_settings_information.rb +18 -5
  144. data/lib/cybersource_rest_client/models/notificationsubscriptionsv2webhooks_retry_policy.rb +2 -0
  145. data/lib/cybersource_rest_client/models/notificationsubscriptionsv2webhooks_security_policy.rb +1 -1
  146. data/lib/cybersource_rest_client/models/notificationsubscriptionsv2webhooks_security_policy_config.rb +16 -17
  147. data/lib/cybersource_rest_client/models/{notificationsubscriptionsv2webhooks_security_policy_1_config_additional_config.rb → notificationsubscriptionsv2webhooks_security_policy_config_additional_config.rb} +1 -1
  148. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +609 -609
  149. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +269 -269
  150. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +364 -364
  151. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +309 -309
  152. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_payment_method.rb +213 -213
  153. data/lib/cybersource_rest_client/models/pts_v2_retrieve_payment_token_get400_response.rb +252 -252
  154. data/lib/cybersource_rest_client/models/pts_v2_retrieve_payment_token_get502_response.rb +240 -240
  155. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_card.rb +258 -258
  156. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_tokenized_card.rb +275 -275
  157. data/lib/cybersource_rest_client/models/ptsv2intents_event_information.rb +212 -212
  158. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_ship_to.rb +354 -354
  159. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information.rb +220 -220
  160. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information_e_wallet.rb +196 -196
  161. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information_tokenized_payment_method.rb +241 -241
  162. data/lib/cybersource_rest_client/models/ptsv2intents_processing_information.rb +351 -351
  163. data/lib/cybersource_rest_client/models/ptsv2intents_recipient_information.rb +245 -245
  164. data/lib/cybersource_rest_client/models/ptsv2intents_sender_information.rb +277 -277
  165. data/lib/cybersource_rest_client/models/ptsv2intents_sender_information_account.rb +190 -190
  166. data/lib/cybersource_rest_client/models/ptsv2intents_travel_information.rb +211 -211
  167. data/lib/cybersource_rest_client/models/ptsv2intents_travel_information_agency.rb +245 -245
  168. data/lib/cybersource_rest_client/models/ptsv2intentsid_payment_information.rb +189 -189
  169. data/lib/cybersource_rest_client/models/ptsv2paymentreferences_order_information_amount_details.rb +417 -417
  170. data/lib/cybersource_rest_client/models/ptsv2paymentreferences_payment_information_card.rb +275 -275
  171. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +461 -433
  172. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +668 -668
  173. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +716 -716
  174. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +356 -356
  175. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +445 -445
  176. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_payment_type_method.rb +1 -1
  177. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +377 -377
  178. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_payment_method.rb +196 -196
  179. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +604 -604
  180. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_payment_information_payment_type_method.rb +1 -1
  181. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +377 -377
  182. data/lib/cybersource_rest_client/models/ptsv2paymenttokens_payment_information.rb +199 -199
  183. data/lib/cybersource_rest_client/models/ptsv2paymenttokens_processing_information.rb +192 -192
  184. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +258 -258
  185. data/lib/cybersource_rest_client/models/request.rb +199 -199
  186. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +241 -241
  187. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +258 -258
  188. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +351 -351
  189. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_card.rb +268 -268
  190. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +299 -299
  191. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +259 -259
  192. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +259 -259
  193. data/lib/cybersource_rest_client/models/riskv1liststypeentries_payment_information_card.rb +224 -224
  194. data/lib/cybersource_rest_client/models/tms_bin_lookup_issuer_information.rb +264 -264
  195. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_card.rb +277 -277
  196. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_card_brands.rb +213 -213
  197. data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_features.rb +430 -430
  198. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb +11 -1
  199. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_bank_account_validation.rb +211 -0
  200. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_brands.rb +201 -201
  201. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +365 -365
  202. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +16 -5
  203. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +15 -5
  204. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +218 -218
  205. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processor_information.rb +245 -245
  206. data/lib/cybersource_rest_client/models/update_order_request.rb +229 -229
  207. data/lib/cybersource_rest_client/models/update_webhook.rb +19 -19
  208. data/lib/cybersource_rest_client.rb +20 -18
  209. metadata +25 -20
  210. data/lib/cybersource_rest_client/models/notificationsubscriptionsv2webhooks_security_policy_1.rb +0 -201
@@ -1,433 +1,461 @@
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
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
+ # Indicates if the installment plan has interest. Possible values: -Y - with interest -N - without interest -NULL - Do not send the field if no information available
65
+ attr_accessor :interest_indicator
66
+
67
+ # Indicates if an installment plan is a government sponsored or part of a government program. Possible values: -true -false This field defaults to false when no value is provided.
68
+ attr_accessor :is_government_plan
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'amount' => :'amount',
74
+ :'frequency' => :'frequency',
75
+ :'plan_type' => :'planType',
76
+ :'sequence' => :'sequence',
77
+ :'total_amount' => :'totalAmount',
78
+ :'total_count' => :'totalCount',
79
+ :'first_installment_date' => :'firstInstallmentDate',
80
+ :'invoice_data' => :'invoiceData',
81
+ :'payment_type' => :'paymentType',
82
+ :'eligibility_inquiry' => :'eligibilityInquiry',
83
+ :'grace_period_duration' => :'gracePeriodDuration',
84
+ :'grace_period_duration_type' => :'gracePeriodDurationType',
85
+ :'first_installment_amount' => :'firstInstallmentAmount',
86
+ :'validation_indicator' => :'validationIndicator',
87
+ :'identifier' => :'identifier',
88
+ :'annual_interest_rate' => :'annualInterestRate',
89
+ :'interest_indicator' => :'interestIndicator',
90
+ :'is_government_plan' => :'isGovernmentPlan'
91
+ }
92
+ end
93
+
94
+ # Attribute mapping from JSON key to ruby-style variable name.
95
+ def self.json_map
96
+ {
97
+ :'amount' => :'amount',
98
+ :'frequency' => :'frequency',
99
+ :'plan_type' => :'plan_type',
100
+ :'sequence' => :'sequence',
101
+ :'total_amount' => :'total_amount',
102
+ :'total_count' => :'total_count',
103
+ :'first_installment_date' => :'first_installment_date',
104
+ :'invoice_data' => :'invoice_data',
105
+ :'payment_type' => :'payment_type',
106
+ :'eligibility_inquiry' => :'eligibility_inquiry',
107
+ :'grace_period_duration' => :'grace_period_duration',
108
+ :'grace_period_duration_type' => :'grace_period_duration_type',
109
+ :'first_installment_amount' => :'first_installment_amount',
110
+ :'validation_indicator' => :'validation_indicator',
111
+ :'identifier' => :'identifier',
112
+ :'annual_interest_rate' => :'annual_interest_rate',
113
+ :'interest_indicator' => :'interest_indicator',
114
+ :'is_government_plan' => :'is_government_plan'
115
+ }
116
+ end
117
+
118
+ # Attribute type mapping.
119
+ def self.swagger_types
120
+ {
121
+ :'amount' => :'String',
122
+ :'frequency' => :'String',
123
+ :'plan_type' => :'String',
124
+ :'sequence' => :'Integer',
125
+ :'total_amount' => :'String',
126
+ :'total_count' => :'Integer',
127
+ :'first_installment_date' => :'String',
128
+ :'invoice_data' => :'String',
129
+ :'payment_type' => :'String',
130
+ :'eligibility_inquiry' => :'String',
131
+ :'grace_period_duration' => :'String',
132
+ :'grace_period_duration_type' => :'String',
133
+ :'first_installment_amount' => :'String',
134
+ :'validation_indicator' => :'String',
135
+ :'identifier' => :'String',
136
+ :'annual_interest_rate' => :'String',
137
+ :'interest_indicator' => :'String',
138
+ :'is_government_plan' => :'BOOLEAN'
139
+ }
140
+ end
141
+
142
+ # Initializes the object
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ def initialize(attributes = {})
145
+ return unless attributes.is_a?(Hash)
146
+
147
+ # convert string to symbol for hash key
148
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
149
+
150
+ if attributes.has_key?(:'amount')
151
+ self.amount = attributes[:'amount']
152
+ end
153
+
154
+ if attributes.has_key?(:'frequency')
155
+ self.frequency = attributes[:'frequency']
156
+ end
157
+
158
+ if attributes.has_key?(:'planType')
159
+ self.plan_type = attributes[:'planType']
160
+ end
161
+
162
+ if attributes.has_key?(:'sequence')
163
+ self.sequence = attributes[:'sequence']
164
+ end
165
+
166
+ if attributes.has_key?(:'totalAmount')
167
+ self.total_amount = attributes[:'totalAmount']
168
+ end
169
+
170
+ if attributes.has_key?(:'totalCount')
171
+ self.total_count = attributes[:'totalCount']
172
+ end
173
+
174
+ if attributes.has_key?(:'firstInstallmentDate')
175
+ self.first_installment_date = attributes[:'firstInstallmentDate']
176
+ end
177
+
178
+ if attributes.has_key?(:'invoiceData')
179
+ self.invoice_data = attributes[:'invoiceData']
180
+ end
181
+
182
+ if attributes.has_key?(:'paymentType')
183
+ self.payment_type = attributes[:'paymentType']
184
+ end
185
+
186
+ if attributes.has_key?(:'eligibilityInquiry')
187
+ self.eligibility_inquiry = attributes[:'eligibilityInquiry']
188
+ end
189
+
190
+ if attributes.has_key?(:'gracePeriodDuration')
191
+ self.grace_period_duration = attributes[:'gracePeriodDuration']
192
+ end
193
+
194
+ if attributes.has_key?(:'gracePeriodDurationType')
195
+ self.grace_period_duration_type = attributes[:'gracePeriodDurationType']
196
+ end
197
+
198
+ if attributes.has_key?(:'firstInstallmentAmount')
199
+ self.first_installment_amount = attributes[:'firstInstallmentAmount']
200
+ end
201
+
202
+ if attributes.has_key?(:'validationIndicator')
203
+ self.validation_indicator = attributes[:'validationIndicator']
204
+ end
205
+
206
+ if attributes.has_key?(:'identifier')
207
+ self.identifier = attributes[:'identifier']
208
+ end
209
+
210
+ if attributes.has_key?(:'annualInterestRate')
211
+ self.annual_interest_rate = attributes[:'annualInterestRate']
212
+ end
213
+
214
+ if attributes.has_key?(:'interestIndicator')
215
+ self.interest_indicator = attributes[:'interestIndicator']
216
+ end
217
+
218
+ if attributes.has_key?(:'isGovernmentPlan')
219
+ self.is_government_plan = attributes[:'isGovernmentPlan']
220
+ end
221
+ end
222
+
223
+ # Show invalid properties with the reasons. Usually used together with valid?
224
+ # @return Array for valid properties with the reasons
225
+ def list_invalid_properties
226
+ invalid_properties = Array.new
227
+ invalid_properties
228
+ end
229
+
230
+ # Check to see if the all the properties in the model are valid
231
+ # @return true if the model is valid
232
+ def valid?
233
+ true
234
+ end
235
+
236
+ # Custom attribute writer method with validation
237
+ # @param [Object] amount Value to be assigned
238
+ def amount=(amount)
239
+ @amount = amount
240
+ end
241
+
242
+ # Custom attribute writer method with validation
243
+ # @param [Object] frequency Value to be assigned
244
+ def frequency=(frequency)
245
+ @frequency = frequency
246
+ end
247
+
248
+ # Custom attribute writer method with validation
249
+ # @param [Object] plan_type Value to be assigned
250
+ def plan_type=(plan_type)
251
+ @plan_type = plan_type
252
+ end
253
+
254
+ # Custom attribute writer method with validation
255
+ # @param [Object] sequence Value to be assigned
256
+ def sequence=(sequence)
257
+ @sequence = sequence
258
+ end
259
+
260
+ # Custom attribute writer method with validation
261
+ # @param [Object] total_amount Value to be assigned
262
+ def total_amount=(total_amount)
263
+ @total_amount = total_amount
264
+ end
265
+
266
+ # Custom attribute writer method with validation
267
+ # @param [Object] total_count Value to be assigned
268
+ def total_count=(total_count)
269
+ @total_count = total_count
270
+ end
271
+
272
+ # Custom attribute writer method with validation
273
+ # @param [Object] first_installment_date Value to be assigned
274
+ def first_installment_date=(first_installment_date)
275
+ @first_installment_date = first_installment_date
276
+ end
277
+
278
+ # Custom attribute writer method with validation
279
+ # @param [Object] invoice_data Value to be assigned
280
+ def invoice_data=(invoice_data)
281
+ @invoice_data = invoice_data
282
+ end
283
+
284
+ # Custom attribute writer method with validation
285
+ # @param [Object] payment_type Value to be assigned
286
+ def payment_type=(payment_type)
287
+ @payment_type = payment_type
288
+ end
289
+
290
+ # Custom attribute writer method with validation
291
+ # @param [Object] eligibility_inquiry Value to be assigned
292
+ def eligibility_inquiry=(eligibility_inquiry)
293
+ @eligibility_inquiry = eligibility_inquiry
294
+ end
295
+
296
+ # Custom attribute writer method with validation
297
+ # @param [Object] grace_period_duration_type Value to be assigned
298
+ def grace_period_duration_type=(grace_period_duration_type)
299
+ @grace_period_duration_type = grace_period_duration_type
300
+ end
301
+
302
+ # Custom attribute writer method with validation
303
+ # @param [Object] first_installment_amount Value to be assigned
304
+ def first_installment_amount=(first_installment_amount)
305
+ @first_installment_amount = first_installment_amount
306
+ end
307
+
308
+ # Custom attribute writer method with validation
309
+ # @param [Object] annual_interest_rate Value to be assigned
310
+ def annual_interest_rate=(annual_interest_rate)
311
+ @annual_interest_rate = annual_interest_rate
312
+ end
313
+
314
+ # Custom attribute writer method with validation
315
+ # @param [Object] interest_indicator Value to be assigned
316
+ def interest_indicator=(interest_indicator)
317
+ @interest_indicator = interest_indicator
318
+ end
319
+
320
+ # Checks equality by comparing each attribute.
321
+ # @param [Object] Object to be compared
322
+ def ==(o)
323
+ return true if self.equal?(o)
324
+ self.class == o.class &&
325
+ amount == o.amount &&
326
+ frequency == o.frequency &&
327
+ plan_type == o.plan_type &&
328
+ sequence == o.sequence &&
329
+ total_amount == o.total_amount &&
330
+ total_count == o.total_count &&
331
+ first_installment_date == o.first_installment_date &&
332
+ invoice_data == o.invoice_data &&
333
+ payment_type == o.payment_type &&
334
+ eligibility_inquiry == o.eligibility_inquiry &&
335
+ grace_period_duration == o.grace_period_duration &&
336
+ grace_period_duration_type == o.grace_period_duration_type &&
337
+ first_installment_amount == o.first_installment_amount &&
338
+ validation_indicator == o.validation_indicator &&
339
+ identifier == o.identifier &&
340
+ annual_interest_rate == o.annual_interest_rate &&
341
+ interest_indicator == o.interest_indicator &&
342
+ is_government_plan == o.is_government_plan
343
+ end
344
+
345
+ # @see the `==` method
346
+ # @param [Object] Object to be compared
347
+ def eql?(o)
348
+ self == o
349
+ end
350
+
351
+ # Calculates hash code according to all attributes.
352
+ # @return [Fixnum] Hash code
353
+ def hash
354
+ [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, interest_indicator, is_government_plan].hash
355
+ end
356
+
357
+ # Builds the object from hash
358
+ # @param [Hash] attributes Model attributes in the form of hash
359
+ # @return [Object] Returns the model itself
360
+ def build_from_hash(attributes)
361
+ return nil unless attributes.is_a?(Hash)
362
+ self.class.swagger_types.each_pair do |key, type|
363
+ if type =~ /\AArray<(.*)>/i
364
+ # check to ensure the input is an array given that the the attribute
365
+ # is documented as an array but the input is not
366
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
367
+ self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
368
+ end
369
+ elsif !attributes[self.class.attribute_map[key]].nil?
370
+ self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
371
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
372
+ end
373
+
374
+ self
375
+ end
376
+
377
+ # Deserializes the data based on type
378
+ # @param string type Data type
379
+ # @param string value Value to be deserialized
380
+ # @return [Object] Deserialized data
381
+ def _deserialize(type, value)
382
+ case type.to_sym
383
+ when :DateTime
384
+ DateTime.parse(value)
385
+ when :Date
386
+ Date.parse(value)
387
+ when :String
388
+ value.to_s
389
+ when :Integer
390
+ value.to_i
391
+ when :Float
392
+ value.to_f
393
+ when :BOOLEAN
394
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
395
+ true
396
+ else
397
+ false
398
+ end
399
+ when :Object
400
+ # generic object (usually a Hash), return directly
401
+ value
402
+ when /\AArray<(?<inner_type>.+)>\z/
403
+ inner_type = Regexp.last_match[:inner_type]
404
+ value.map { |v| _deserialize(inner_type, v) }
405
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
406
+ k_type = Regexp.last_match[:k_type]
407
+ v_type = Regexp.last_match[:v_type]
408
+ {}.tap do |hash|
409
+ value.each do |k, v|
410
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
411
+ end
412
+ end
413
+ else # model
414
+ temp_model = CyberSource.const_get(type).new
415
+ temp_model.build_from_hash(value)
416
+ end
417
+ end
418
+
419
+ # Returns the string representation of the object
420
+ # @return [String] String presentation of the object
421
+ def to_s
422
+ to_hash.to_s
423
+ end
424
+
425
+ # to_body is an alias to to_hash (backward compatibility)
426
+ # @return [Hash] Returns the object in the form of hash
427
+ def to_body
428
+ to_hash
429
+ end
430
+
431
+ # Returns the object in the form of hash
432
+ # @return [Hash] Returns the object in the form of hash
433
+ def to_hash
434
+ hash = {}
435
+ self.class.attribute_map.each_pair do |attr, param|
436
+ value = self.send(attr)
437
+ next if value.nil?
438
+ hash[param] = _to_hash(value)
439
+ end
440
+ hash
441
+ end
442
+
443
+ # Outputs non-array value in the form of hash
444
+ # For object, use to_hash. Otherwise, just return the value
445
+ # @param [Object] value Any valid value
446
+ # @return [Hash] Returns the value in the form of hash
447
+ def _to_hash(value)
448
+ if value.is_a?(Array)
449
+ value.compact.map { |v| _to_hash(v) }
450
+ elsif value.is_a?(Hash)
451
+ {}.tap do |hash|
452
+ value.each { |k, v| hash[k] = _to_hash(v) }
453
+ end
454
+ elsif value.respond_to? :to_hash
455
+ value.to_hash
456
+ else
457
+ value
458
+ end
459
+ end
460
+ end
461
+ end