cybersource_rest_client 0.0.83 → 0.0.84

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 (222) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +46 -27
  3. data/lib/AuthenticationSDK/core/MerchantConfig.rb +82 -48
  4. data/lib/AuthenticationSDK/util/Cache.rb +7 -4
  5. data/lib/AuthenticationSDK/util/Constants.rb +6 -0
  6. data/lib/AuthenticationSDK/util/MLEUtility.rb +9 -0
  7. data/lib/cybersource_rest_client/api/batches_api.rb +1 -1
  8. data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +14 -22
  9. data/lib/cybersource_rest_client/api/credentials_api.rb +104 -0
  10. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +3 -3
  11. data/lib/cybersource_rest_client/api/enrollment_api.rb +2 -2
  12. data/lib/cybersource_rest_client/api/instructions_api.rb +10 -10
  13. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +3 -3
  14. data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +20 -28
  15. data/lib/cybersource_rest_client/api/network_tokens_api.rb +654 -0
  16. data/lib/cybersource_rest_client/api/plans_api.rb +1 -1
  17. data/lib/cybersource_rest_client/api/subscriptions_api.rb +183 -1
  18. data/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +1 -1
  19. data/lib/cybersource_rest_client/api_client.rb +4 -0
  20. data/lib/cybersource_rest_client/models/account_validations_request.rb +15 -5
  21. data/lib/cybersource_rest_client/models/acpv1instructions_decline_threshold.rb +1 -1
  22. data/lib/cybersource_rest_client/models/acpv1instructions_mandates.rb +1 -1
  23. data/lib/cybersource_rest_client/models/acpv1instructions_recurring_payment_information.rb +1 -1
  24. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb +1 -1
  25. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information_payment_instrument.rb +1 -1
  26. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_amount_detail.rb +1 -1
  27. data/lib/cybersource_rest_client/models/acpv1mppcredentials_challenge.rb +369 -0
  28. data/lib/cybersource_rest_client/models/acpv1mppcredentials_challenge_encryption_jwk.rb +336 -0
  29. data/lib/cybersource_rest_client/models/acpv1tokens_assurance_data.rb +7 -7
  30. data/lib/cybersource_rest_client/models/acpv1tokens_authenticated_identities.rb +1 -1
  31. data/lib/cybersource_rest_client/models/acpv1tokens_authentication_context.rb +1 -1
  32. data/lib/cybersource_rest_client/models/acpv1tokens_bill_to.rb +1 -1
  33. data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information.rb +1 -1
  34. data/lib/cybersource_rest_client/models/acpv1tokens_consumer_identity.rb +1 -1
  35. data/lib/cybersource_rest_client/models/acpv1tokens_device_information.rb +1 -1
  36. data/lib/cybersource_rest_client/models/acpv1tokens_enrollment_reference_data.rb +1 -1
  37. data/lib/cybersource_rest_client/models/acpv1tokens_payment_information.rb +1 -1
  38. data/lib/cybersource_rest_client/models/auth_reversal_request.rb +11 -1
  39. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information.rb +32 -6
  40. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_bank.rb +1 -1
  41. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_bank_account.rb +1 -1
  42. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_customer.rb +196 -0
  43. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_instrument_identifier.rb +196 -0
  44. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_payment_instrument.rb +196 -0
  45. data/lib/cybersource_rest_client/models/bavsv1accountvalidations_token_information.rb +208 -0
  46. data/lib/cybersource_rest_client/models/card_processing_config_common_processors.rb +105 -1
  47. data/lib/cybersource_rest_client/models/commerce_solutions_products.rb +15 -5
  48. data/lib/cybersource_rest_client/models/create_credit_request.rb +15 -5
  49. data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information_amount_details_surcharge.rb +22 -5
  50. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response.rb +247 -0
  51. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_1.rb +224 -0
  52. data/lib/cybersource_rest_client/models/{pbl_payment_links_post201_response__links.rb → get_subscriptions_payments_response_1__links.rb} +1 -1
  53. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response__links.rb +209 -0
  54. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_cycles_completed_count.rb +191 -0
  55. data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_subscription_payment.rb +356 -0
  56. data/lib/cybersource_rest_client/models/inline_response_201_1_tokenized_card.rb +26 -5
  57. data/lib/cybersource_rest_client/models/inline_response_201_4_setups_commerce_solutions.rb +15 -5
  58. data/lib/cybersource_rest_client/models/inline_response_201_4_setups_payments.rb +25 -5
  59. data/lib/cybersource_rest_client/models/inline_response_201_4_setups_risk.rb +15 -5
  60. data/lib/cybersource_rest_client/models/inline_response_201_4_setups_value_added_services.rb +25 -5
  61. data/lib/cybersource_rest_client/models/inline_response_400_10.rb +30 -75
  62. data/lib/cybersource_rest_client/models/{inline_response_400_8_details.rb → inline_response_400_10_details.rb} +1 -1
  63. data/lib/cybersource_rest_client/models/inline_response_400_11.rb +235 -0
  64. data/lib/cybersource_rest_client/models/{inline_response_400_7_details.rb → inline_response_400_11_details.rb} +3 -3
  65. data/lib/cybersource_rest_client/models/inline_response_400_12.rb +281 -0
  66. data/lib/cybersource_rest_client/models/inline_response_400_6.rb +37 -60
  67. data/lib/cybersource_rest_client/models/inline_response_400_7.rb +6 -6
  68. data/lib/cybersource_rest_client/models/inline_response_400_8.rb +58 -36
  69. data/lib/cybersource_rest_client/models/{inline_response_400_6_fields.rb → inline_response_400_8_fields.rb} +1 -1
  70. data/lib/cybersource_rest_client/models/inline_response_400_9.rb +16 -16
  71. data/lib/cybersource_rest_client/models/inline_response_400_9_details.rb +2 -2
  72. data/lib/cybersource_rest_client/models/inline_response_404_3.rb +1 -1
  73. data/lib/cybersource_rest_client/models/inline_response_422_1.rb +1 -1
  74. data/lib/cybersource_rest_client/models/iplv2paymentlinks_order_information_line_items.rb +73 -5
  75. data/lib/cybersource_rest_client/models/mit_reversal_request.rb +11 -1
  76. data/lib/cybersource_rest_client/models/mpp_credentials_request.rb +221 -0
  77. data/lib/cybersource_rest_client/models/mpp_credentials_response200.rb +338 -0
  78. data/lib/cybersource_rest_client/models/patch_customer_payment_instrument_request.rb +1 -1
  79. data/lib/cybersource_rest_client/models/patch_customer_request.rb +1 -1
  80. data/lib/cybersource_rest_client/models/patch_payment_instrument_request.rb +1 -1
  81. data/lib/cybersource_rest_client/models/payment_instrument_list_1__embedded.rb +1 -1
  82. data/lib/cybersource_rest_client/models/payment_instrument_list__embedded.rb +1 -1
  83. data/lib/cybersource_rest_client/models/{payment_instrument_list_1__embedded__embedded.rb → payment_instrument_list__embedded__embedded.rb} +1 -1
  84. data/lib/cybersource_rest_client/models/{payment_instrument_list_1__embedded_payment_instruments.rb → payment_instrument_list__embedded_payment_instruments.rb} +2 -2
  85. data/lib/cybersource_rest_client/models/payments_products.rb +25 -5
  86. data/lib/cybersource_rest_client/models/payments_products_currency_conversion_configuration_information_configurations_processors.rb +14 -2
  87. data/lib/cybersource_rest_client/models/payments_products_microform.rb +199 -0
  88. data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information.rb +199 -0
  89. data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations.rb +189 -0
  90. data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations_features.rb +189 -0
  91. data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations_features_gateway_agnostic.rb +189 -0
  92. data/lib/cybersource_rest_client/models/payments_products_microform_subscription_information.rb +227 -0
  93. data/lib/cybersource_rest_client/models/pbl_payment_links_get200_response.rb +1 -1
  94. data/lib/cybersource_rest_client/models/pbl_payment_links_post201_response.rb +1 -1
  95. data/lib/cybersource_rest_client/models/post_customer_payment_instrument_request.rb +1 -1
  96. data/lib/cybersource_rest_client/models/post_customer_request.rb +1 -1
  97. data/lib/cybersource_rest_client/models/post_payment_instrument_request.rb +1 -1
  98. data/lib/cybersource_rest_client/models/post_tokenized_card_request.rb +15 -5
  99. data/lib/cybersource_rest_client/models/pts_v2_create_billing_agreement_post201_response_agreement_information.rb +80 -1
  100. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb +41 -1
  101. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_merchant_information.rb +196 -0
  102. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_account_information.rb +189 -0
  103. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information.rb +15 -5
  104. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information_account_features.rb +196 -0
  105. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_token_information.rb +189 -0
  106. data/lib/cybersource_rest_client/models/pts_v2_modify_billing_agreement_post201_response_agreement_information.rb +35 -1
  107. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_point_of_sale_information.rb +22 -5
  108. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_processor_information.rb +1 -1
  109. data/lib/cybersource_rest_client/models/pts_v2_payments_order_post201_response_order_information_shipping_details.rb +1 -1
  110. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +106 -5
  111. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_strong_authentication.rb +22 -5
  112. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information.rb +15 -5
  113. data/lib/cybersource_rest_client/models/{pts_v2_payments_post201_response_payment_information_tokenized_card.rb → pts_v2_payments_post201_response_payment_account_information_tokenized_card.rb} +1 -1
  114. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +1 -1
  115. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information.rb +18 -1
  116. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +23 -6
  117. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_token_information.rb +15 -5
  118. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_token_information_third_party_token.rb +213 -0
  119. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +1 -1
  120. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_error_information.rb +1 -1
  121. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_order_information_amount_details.rb +18 -1
  122. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +19 -2
  123. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +1 -1
  124. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_processor_information.rb +7 -1
  125. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information.rb +45 -5
  126. data/lib/cybersource_rest_client/models/{pull_funds201_response_processor_information_avs.rb → pts_v2_payouts_post201_response_processor_information_avs.rb} +1 -1
  127. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information_customer.rb +196 -0
  128. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information_electronic_verification_results.rb +281 -0
  129. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_buyer_information.rb +196 -0
  130. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_order_information_amount_details.rb +1 -1
  131. data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information.rb +18 -5
  132. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information.rb +19 -6
  133. data/lib/cybersource_rest_client/models/ptsv2billingagreements_agreement_information.rb +84 -5
  134. data/lib/cybersource_rest_client/models/ptsv2billingagreements_order_information.rb +12 -2
  135. data/lib/cybersource_rest_client/models/ptsv2billingagreements_order_information_amount_details.rb +230 -0
  136. data/lib/cybersource_rest_client/models/{ptsv2intents_order_information_invoice_details.rb → ptsv2billingagreements_order_information_invoice_details.rb} +1 -1
  137. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_bank.rb +15 -5
  138. data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_bank_account_alias.rb +207 -0
  139. data/lib/cybersource_rest_client/models/ptsv2billingagreements_processing_information.rb +18 -1
  140. data/lib/cybersource_rest_client/models/ptsv2billingagreementsid_agreement_information.rb +56 -5
  141. data/lib/cybersource_rest_client/models/ptsv2billingagreementsid_processing_information.rb +18 -1
  142. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +35 -5
  143. data/lib/cybersource_rest_client/models/ptsv2credits_token_information.rb +228 -0
  144. data/lib/cybersource_rest_client/models/ptsv2intents_order_information.rb +1 -1
  145. data/lib/cybersource_rest_client/models/ptsv2intentsid_order_information.rb +1 -1
  146. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +15 -5
  147. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +16 -5
  148. data/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb +28 -1
  149. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_digital_currency.rb +231 -0
  150. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.rb +23 -6
  151. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +32 -5
  152. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +15 -5
  153. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank_account_alias.rb +207 -0
  154. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_third_party_token.rb +196 -0
  155. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +18 -1
  156. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +72 -6
  157. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_program_indicators.rb +202 -0
  158. data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +56 -5
  159. data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +16 -5
  160. data/lib/cybersource_rest_client/models/ptsv2payments_sender_information.rb +16 -5
  161. data/lib/cybersource_rest_client/models/ptsv2payments_token_information.rb +32 -5
  162. data/lib/cybersource_rest_client/models/ptsv2payments_token_information_token_authentication_information.rb +193 -0
  163. data/lib/cybersource_rest_client/models/ptsv2payments_token_information_token_authentication_information_authenticated_identities.rb +252 -0
  164. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +15 -5
  165. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_shipping_details.rb +100 -5
  166. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information.rb +22 -5
  167. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +18 -1
  168. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processor_information.rb +39 -5
  169. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information.rb +15 -5
  170. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_shipping_details.rb +196 -0
  171. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +32 -5
  172. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_device_information.rb +196 -0
  173. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_payment_information.rb +22 -5
  174. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +18 -5
  175. data/lib/cybersource_rest_client/models/pull_funds201_response_processor_information.rb +36 -6
  176. data/lib/cybersource_rest_client/models/pull_funds_request.rb +11 -1
  177. data/lib/cybersource_rest_client/models/push_funds201_response_processor_information.rb +45 -5
  178. data/lib/cybersource_rest_client/models/risk_products.rb +15 -5
  179. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_ship_to.rb +39 -5
  180. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_shipping_details.rb +1 -1
  181. data/lib/cybersource_rest_client/models/tms_card_art.rb +23 -1
  182. data/lib/cybersource_rest_client/models/tms_embedded_instrument_identifier_bill_to.rb +22 -5
  183. data/lib/cybersource_rest_client/models/tms_tokenized_card_delete_request.rb +189 -0
  184. data/lib/cybersource_rest_client/models/tmsv1paymentinstruments__embedded.rb +190 -0
  185. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card.rb +22 -1
  186. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_card.rb +1 -1
  187. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata.rb +16 -5
  188. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer.rb +41 -8
  189. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer_bank_applications.rb +201 -0
  190. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer_capabilities.rb +257 -0
  191. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_verification_results.rb +202 -0
  192. data/lib/cybersource_rest_client/models/tmsv2customers__embedded.rb +200 -0
  193. data/lib/cybersource_rest_client/models/{tmsv3tokenstoken_idpaymentcredentials_order_information_bill_to.rb → tmsv2tokenizedcards_bill_to.rb} +1 -1
  194. data/lib/cybersource_rest_client/models/tmsv2tokenizedcardstokenized_card_iddelete_reason.rb +208 -0
  195. data/lib/cybersource_rest_client/models/tmsv3tokenstoken_idpaymentcredentials_order_information.rb +1 -1
  196. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_shipping_details.rb +1 -1
  197. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_sender_information.rb +1 -1
  198. data/lib/cybersource_rest_client/models/ucv1sessions_data.rb +44 -14
  199. data/lib/cybersource_rest_client/models/ucv1sessions_data_aggregator_information.rb +325 -0
  200. data/lib/cybersource_rest_client/models/ucv1sessions_data_aggregator_information_sub_merchant.rb +366 -0
  201. data/lib/cybersource_rest_client/models/ucv1sessions_data_consumer_authentication_information.rb +22 -5
  202. data/lib/cybersource_rest_client/models/ucv1sessions_data_installment_information.rb +196 -0
  203. data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information.rb +22 -5
  204. data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information_merchant_descriptor.rb +18 -1
  205. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information.rb +16 -6
  206. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_amount_details.rb +86 -12
  207. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_invoice_details.rb +242 -0
  208. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_invoice_details_transaction_advice_addendum.rb +196 -0
  209. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_line_items.rb +702 -0
  210. data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_shipping_details.rb +213 -0
  211. data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information.rb +38 -1
  212. data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_bank_transfer_options.rb +196 -0
  213. data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_recurring_options.rb +192 -0
  214. data/lib/cybersource_rest_client/models/ucv1sessions_data_recipient_information.rb +107 -53
  215. data/lib/cybersource_rest_client/models/ucv1sessions_data_sender_information.rb +376 -0
  216. data/lib/cybersource_rest_client/models/ucv1sessions_data_sender_information_account.rb +213 -0
  217. data/lib/cybersource_rest_client/models/update_payments.rb +192 -0
  218. data/lib/cybersource_rest_client/models/value_added_services_products.rb +25 -5
  219. data/lib/cybersource_rest_client.rb +71 -12
  220. metadata +78 -19
  221. data/lib/cybersource_rest_client/api/token_api.rb +0 -306
  222. data/lib/cybersource_rest_client/api/tokenized_card_api.rb +0 -371
@@ -13,72 +13,93 @@ require 'date'
13
13
 
14
14
  module CyberSource
15
15
  class Ucv1sessionsDataRecipientInformation
16
+ # Identifier for the recipient's account. This field is applicable for AFT transactions.
17
+ attr_accessor :account_id
18
+
19
+ # Identifies the recipient's account type. This field is applicable for AFT transactions. Valid values are: - `00` for Other - `01` for Routing Transit Number (RTN) + Bank Account Number (BAN) - `02` for International Bank Account Number (IBAN) - `03` for Card Account - `06` for Bank Account Number (BAN) + Bank Identification Code (BIC), also known as a SWIFT code
20
+ attr_accessor :account_type
21
+
22
+ # First name of the recipient. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to sent to the processor.
16
23
  attr_accessor :first_name
17
24
 
25
+ # Middle name of the recipient. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to sent to the processor.
18
26
  attr_accessor :middle_name
19
27
 
28
+ # Last name of the recipient. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to sent to the processor.
20
29
  attr_accessor :last_name
21
30
 
22
- # The country code of the recipient's country<br><br> Optional field: This field cannot be configured through the Merchant Experience screens in the Business Center, but if required should be provided on a per‑transaction basis in the uc/v1/sessions API request.
23
- attr_accessor :country
24
-
25
- # The account ID of the recipient<br><br> Optional field: This field cannot be configured through the Merchant Experience screens in the Business Center, but if required should be provided on a per‑transaction basis in the uc/v1/sessions API request.
26
- attr_accessor :account_id
31
+ # The street address of the recipient This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set are not supported and will be stripped before being sent to sent to the processor.
32
+ attr_accessor :address1
27
33
 
28
- # The administrative area of the recipient<br><br> Optional field: This field cannot be configured through the Merchant Experience screens in the Business Center, but if required should be provided on a per‑transaction basis in the uc/v1/sessions API request.
34
+ # The state or province of the recipient. This field is applicable for AFT transactions when the recipient country is US or CA. Else it is optional. Must be a two character value
29
35
  attr_accessor :administrative_area
30
36
 
31
- # The account type of the recipient<br><br> Optional field: This field cannot be configured through the Merchant Experience screens in the Business Center, but if required should be provided on a per‑transaction basis in the uc/v1/sessions API request.
32
- attr_accessor :account_type
37
+ # Partial postal code for the recipient's address. For example, if the postal code is **NN5 7SG**, the value for this field should be the first part of the postal code: **NN5**. This field is a _pass-through_, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor.
38
+ attr_accessor :postal_code
39
+
40
+ # The country associated with the address of the recipient. This field is applicable for AFT and OCT transactions. Must be a two character ISO country code. For example, see [ISO Country Code](https://developer.cybersource.com/docs/cybs/en-us/country-codes/reference/all/na/country-codes/country-codes.html)
41
+ attr_accessor :country
42
+
43
+ # Account Owner phone number
44
+ attr_accessor :phone_number
33
45
 
34
- # The date of birth of the recipient<br><br> Optional field: This field cannot be configured through the Merchant Experience screens in the Business Center, but if required should be provided on a per‑transaction basis in the uc/v1/sessions API request.
46
+ # Recipient's date of birth. **Format**: `YYYYMMDD`. This field is a `pass-through`, which means that CyberSource ensures that the value is eight numeric characters but otherwise does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor.
35
47
  attr_accessor :date_of_birth
36
48
 
37
- # The postal code of the recipient<br><br> Optional field: This field cannot be configured through the Merchant Experience screens in the Business Center, but if required should be provided on a per‑transaction basis in the uc/v1/sessions API request.
38
- attr_accessor :postal_code
49
+ # The city of the recipient. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set are not supported and will be stripped before being sent to sent to the processor.
50
+ attr_accessor :locality
39
51
 
40
52
  # Attribute mapping from ruby-style variable name to JSON key.
41
53
  def self.attribute_map
42
54
  {
55
+ :'account_id' => :'accountId',
56
+ :'account_type' => :'accountType',
43
57
  :'first_name' => :'firstName',
44
58
  :'middle_name' => :'middleName',
45
59
  :'last_name' => :'lastName',
46
- :'country' => :'country',
47
- :'account_id' => :'accountId',
60
+ :'address1' => :'address1',
48
61
  :'administrative_area' => :'administrativeArea',
49
- :'account_type' => :'accountType',
62
+ :'postal_code' => :'postalCode',
63
+ :'country' => :'country',
64
+ :'phone_number' => :'phoneNumber',
50
65
  :'date_of_birth' => :'dateOfBirth',
51
- :'postal_code' => :'postalCode'
66
+ :'locality' => :'locality'
52
67
  }
53
68
  end
54
69
 
55
70
  # Attribute mapping from JSON key to ruby-style variable name.
56
71
  def self.json_map
57
72
  {
73
+ :'account_id' => :'account_id',
74
+ :'account_type' => :'account_type',
58
75
  :'first_name' => :'first_name',
59
76
  :'middle_name' => :'middle_name',
60
77
  :'last_name' => :'last_name',
61
- :'country' => :'country',
62
- :'account_id' => :'account_id',
78
+ :'address1' => :'address1',
63
79
  :'administrative_area' => :'administrative_area',
64
- :'account_type' => :'account_type',
80
+ :'postal_code' => :'postal_code',
81
+ :'country' => :'country',
82
+ :'phone_number' => :'phone_number',
65
83
  :'date_of_birth' => :'date_of_birth',
66
- :'postal_code' => :'postal_code'
84
+ :'locality' => :'locality'
67
85
  }
68
86
  end
69
87
 
70
88
  # Attribute type mapping.
71
89
  def self.swagger_types
72
90
  {
91
+ :'account_id' => :'String',
92
+ :'account_type' => :'String',
73
93
  :'first_name' => :'String',
74
94
  :'middle_name' => :'String',
75
95
  :'last_name' => :'String',
76
- :'country' => :'String',
77
- :'account_id' => :'String',
96
+ :'address1' => :'String',
78
97
  :'administrative_area' => :'String',
79
- :'account_type' => :'String',
98
+ :'postal_code' => :'String',
99
+ :'country' => :'String',
100
+ :'phone_number' => :'String',
80
101
  :'date_of_birth' => :'String',
81
- :'postal_code' => :'String'
102
+ :'locality' => :'String'
82
103
  }
83
104
  end
84
105
 
@@ -90,6 +111,14 @@ module CyberSource
90
111
  # convert string to symbol for hash key
91
112
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
92
113
 
114
+ if attributes.has_key?(:'accountId')
115
+ self.account_id = attributes[:'accountId']
116
+ end
117
+
118
+ if attributes.has_key?(:'accountType')
119
+ self.account_type = attributes[:'accountType']
120
+ end
121
+
93
122
  if attributes.has_key?(:'firstName')
94
123
  self.first_name = attributes[:'firstName']
95
124
  end
@@ -102,28 +131,32 @@ module CyberSource
102
131
  self.last_name = attributes[:'lastName']
103
132
  end
104
133
 
105
- if attributes.has_key?(:'country')
106
- self.country = attributes[:'country']
107
- end
108
-
109
- if attributes.has_key?(:'accountId')
110
- self.account_id = attributes[:'accountId']
134
+ if attributes.has_key?(:'address1')
135
+ self.address1 = attributes[:'address1']
111
136
  end
112
137
 
113
138
  if attributes.has_key?(:'administrativeArea')
114
139
  self.administrative_area = attributes[:'administrativeArea']
115
140
  end
116
141
 
117
- if attributes.has_key?(:'accountType')
118
- self.account_type = attributes[:'accountType']
142
+ if attributes.has_key?(:'postalCode')
143
+ self.postal_code = attributes[:'postalCode']
144
+ end
145
+
146
+ if attributes.has_key?(:'country')
147
+ self.country = attributes[:'country']
148
+ end
149
+
150
+ if attributes.has_key?(:'phoneNumber')
151
+ self.phone_number = attributes[:'phoneNumber']
119
152
  end
120
153
 
121
154
  if attributes.has_key?(:'dateOfBirth')
122
155
  self.date_of_birth = attributes[:'dateOfBirth']
123
156
  end
124
157
 
125
- if attributes.has_key?(:'postalCode')
126
- self.postal_code = attributes[:'postalCode']
158
+ if attributes.has_key?(:'locality')
159
+ self.locality = attributes[:'locality']
127
160
  end
128
161
  end
129
162
 
@@ -140,6 +173,18 @@ module CyberSource
140
173
  true
141
174
  end
142
175
 
176
+ # Custom attribute writer method with validation
177
+ # @param [Object] account_id Value to be assigned
178
+ def account_id=(account_id)
179
+ @account_id = account_id
180
+ end
181
+
182
+ # Custom attribute writer method with validation
183
+ # @param [Object] account_type Value to be assigned
184
+ def account_type=(account_type)
185
+ @account_type = account_type
186
+ end
187
+
143
188
  # Custom attribute writer method with validation
144
189
  # @param [Object] first_name Value to be assigned
145
190
  def first_name=(first_name)
@@ -159,15 +204,9 @@ module CyberSource
159
204
  end
160
205
 
161
206
  # Custom attribute writer method with validation
162
- # @param [Object] country Value to be assigned
163
- def country=(country)
164
- @country = country
165
- end
166
-
167
- # Custom attribute writer method with validation
168
- # @param [Object] account_id Value to be assigned
169
- def account_id=(account_id)
170
- @account_id = account_id
207
+ # @param [Object] address1 Value to be assigned
208
+ def address1=(address1)
209
+ @address1 = address1
171
210
  end
172
211
 
173
212
  # Custom attribute writer method with validation
@@ -177,9 +216,21 @@ module CyberSource
177
216
  end
178
217
 
179
218
  # Custom attribute writer method with validation
180
- # @param [Object] account_type Value to be assigned
181
- def account_type=(account_type)
182
- @account_type = account_type
219
+ # @param [Object] postal_code Value to be assigned
220
+ def postal_code=(postal_code)
221
+ @postal_code = postal_code
222
+ end
223
+
224
+ # Custom attribute writer method with validation
225
+ # @param [Object] country Value to be assigned
226
+ def country=(country)
227
+ @country = country
228
+ end
229
+
230
+ # Custom attribute writer method with validation
231
+ # @param [Object] phone_number Value to be assigned
232
+ def phone_number=(phone_number)
233
+ @phone_number = phone_number
183
234
  end
184
235
 
185
236
  # Custom attribute writer method with validation
@@ -189,9 +240,9 @@ module CyberSource
189
240
  end
190
241
 
191
242
  # Custom attribute writer method with validation
192
- # @param [Object] postal_code Value to be assigned
193
- def postal_code=(postal_code)
194
- @postal_code = postal_code
243
+ # @param [Object] locality Value to be assigned
244
+ def locality=(locality)
245
+ @locality = locality
195
246
  end
196
247
 
197
248
  # Checks equality by comparing each attribute.
@@ -199,15 +250,18 @@ module CyberSource
199
250
  def ==(o)
200
251
  return true if self.equal?(o)
201
252
  self.class == o.class &&
253
+ account_id == o.account_id &&
254
+ account_type == o.account_type &&
202
255
  first_name == o.first_name &&
203
256
  middle_name == o.middle_name &&
204
257
  last_name == o.last_name &&
205
- country == o.country &&
206
- account_id == o.account_id &&
258
+ address1 == o.address1 &&
207
259
  administrative_area == o.administrative_area &&
208
- account_type == o.account_type &&
260
+ postal_code == o.postal_code &&
261
+ country == o.country &&
262
+ phone_number == o.phone_number &&
209
263
  date_of_birth == o.date_of_birth &&
210
- postal_code == o.postal_code
264
+ locality == o.locality
211
265
  end
212
266
 
213
267
  # @see the `==` method
@@ -219,7 +273,7 @@ module CyberSource
219
273
  # Calculates hash code according to all attributes.
220
274
  # @return [Fixnum] Hash code
221
275
  def hash
222
- [first_name, middle_name, last_name, country, account_id, administrative_area, account_type, date_of_birth, postal_code].hash
276
+ [account_id, account_type, first_name, middle_name, last_name, address1, administrative_area, postal_code, country, phone_number, date_of_birth, locality].hash
223
277
  end
224
278
 
225
279
  # Builds the object from hash
@@ -0,0 +1,376 @@
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 Ucv1sessionsDataSenderInformation
16
+ # First name of the sender. This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported.Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to the processor.
17
+ attr_accessor :first_name
18
+
19
+ # Middle name of the sender. This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to sent to the processor.
20
+ attr_accessor :middle_name
21
+
22
+ # Last name of the sender. This field is applicable for AFT and OCT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set, are not supported and will be stripped before being sent to sent to the processor.
23
+ attr_accessor :last_name
24
+
25
+ # The street address of the sender. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set are not supported and will be stripped before being sent to sent to the processor.
26
+ attr_accessor :address1
27
+
28
+ # The city or locality of the sender. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set are not supported and will be stripped before being sent to sent to the processor.
29
+ attr_accessor :locality
30
+
31
+ # The state or province of the sender. This field is applicable for AFT transactions when the sender country is US or CA. Else it is optional. Must be a two character value
32
+ attr_accessor :administrative_area
33
+
34
+ # Postal code of sender.
35
+ attr_accessor :postal_code
36
+
37
+ # The country associated with the address of the sender. This field is applicable for AFT transactions. Must be a two character ISO country code. For example, see [ISO Country Code](https://developer.cybersource.com/docs/cybs/en-us/country-codes/reference/all/na/country-codes/country-codes.html)
38
+ attr_accessor :country_code
39
+
40
+ # Sender phone number
41
+ attr_accessor :phone_number
42
+
43
+ # Sender's date of birth. **Format**: `YYYYMMDD`. This field is a `pass-through`, which means that CyberSource ensures that the value is eight numeric characters but otherwise does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor.
44
+ attr_accessor :date_of_birth
45
+
46
+ # Identifies the sender's account type. This field is applicable for AFT transactions. Valid values are: - `00` for Other - `01` for Routing Transit Number (RTN) + Bank Account Number (BAN) - `02` for International Bank Account Number (IBAN) - `03` for Card Account - `04` for Email - `05` for Phone Number - `06` for Bank Account Number (BAN) + Bank Identification Code (BIC), also known as a SWIFT code - `07` for Wallet ID - `08` for Social Network ID
47
+ attr_accessor :account_type
48
+
49
+ attr_accessor :account
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'first_name' => :'firstName',
55
+ :'middle_name' => :'middleName',
56
+ :'last_name' => :'lastName',
57
+ :'address1' => :'address1',
58
+ :'locality' => :'locality',
59
+ :'administrative_area' => :'administrativeArea',
60
+ :'postal_code' => :'postalCode',
61
+ :'country_code' => :'countryCode',
62
+ :'phone_number' => :'phoneNumber',
63
+ :'date_of_birth' => :'dateOfBirth',
64
+ :'account_type' => :'accountType',
65
+ :'account' => :'account'
66
+ }
67
+ end
68
+
69
+ # Attribute mapping from JSON key to ruby-style variable name.
70
+ def self.json_map
71
+ {
72
+ :'first_name' => :'first_name',
73
+ :'middle_name' => :'middle_name',
74
+ :'last_name' => :'last_name',
75
+ :'address1' => :'address1',
76
+ :'locality' => :'locality',
77
+ :'administrative_area' => :'administrative_area',
78
+ :'postal_code' => :'postal_code',
79
+ :'country_code' => :'country_code',
80
+ :'phone_number' => :'phone_number',
81
+ :'date_of_birth' => :'date_of_birth',
82
+ :'account_type' => :'account_type',
83
+ :'account' => :'account'
84
+ }
85
+ end
86
+
87
+ # Attribute type mapping.
88
+ def self.swagger_types
89
+ {
90
+ :'first_name' => :'String',
91
+ :'middle_name' => :'String',
92
+ :'last_name' => :'String',
93
+ :'address1' => :'String',
94
+ :'locality' => :'String',
95
+ :'administrative_area' => :'String',
96
+ :'postal_code' => :'String',
97
+ :'country_code' => :'String',
98
+ :'phone_number' => :'String',
99
+ :'date_of_birth' => :'String',
100
+ :'account_type' => :'String',
101
+ :'account' => :'Ucv1sessionsDataSenderInformationAccount'
102
+ }
103
+ end
104
+
105
+ # Initializes the object
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ def initialize(attributes = {})
108
+ return unless attributes.is_a?(Hash)
109
+
110
+ # convert string to symbol for hash key
111
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
112
+
113
+ if attributes.has_key?(:'firstName')
114
+ self.first_name = attributes[:'firstName']
115
+ end
116
+
117
+ if attributes.has_key?(:'middleName')
118
+ self.middle_name = attributes[:'middleName']
119
+ end
120
+
121
+ if attributes.has_key?(:'lastName')
122
+ self.last_name = attributes[:'lastName']
123
+ end
124
+
125
+ if attributes.has_key?(:'address1')
126
+ self.address1 = attributes[:'address1']
127
+ end
128
+
129
+ if attributes.has_key?(:'locality')
130
+ self.locality = attributes[:'locality']
131
+ end
132
+
133
+ if attributes.has_key?(:'administrativeArea')
134
+ self.administrative_area = attributes[:'administrativeArea']
135
+ end
136
+
137
+ if attributes.has_key?(:'postalCode')
138
+ self.postal_code = attributes[:'postalCode']
139
+ end
140
+
141
+ if attributes.has_key?(:'countryCode')
142
+ self.country_code = attributes[:'countryCode']
143
+ end
144
+
145
+ if attributes.has_key?(:'phoneNumber')
146
+ self.phone_number = attributes[:'phoneNumber']
147
+ end
148
+
149
+ if attributes.has_key?(:'dateOfBirth')
150
+ self.date_of_birth = attributes[:'dateOfBirth']
151
+ end
152
+
153
+ if attributes.has_key?(:'accountType')
154
+ self.account_type = attributes[:'accountType']
155
+ end
156
+
157
+ if attributes.has_key?(:'account')
158
+ self.account = attributes[:'account']
159
+ end
160
+ end
161
+
162
+ # Show invalid properties with the reasons. Usually used together with valid?
163
+ # @return Array for valid properties with the reasons
164
+ def list_invalid_properties
165
+ invalid_properties = Array.new
166
+ invalid_properties
167
+ end
168
+
169
+ # Check to see if the all the properties in the model are valid
170
+ # @return true if the model is valid
171
+ def valid?
172
+ true
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] first_name Value to be assigned
177
+ def first_name=(first_name)
178
+ @first_name = first_name
179
+ end
180
+
181
+ # Custom attribute writer method with validation
182
+ # @param [Object] middle_name Value to be assigned
183
+ def middle_name=(middle_name)
184
+ @middle_name = middle_name
185
+ end
186
+
187
+ # Custom attribute writer method with validation
188
+ # @param [Object] last_name Value to be assigned
189
+ def last_name=(last_name)
190
+ @last_name = last_name
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] address1 Value to be assigned
195
+ def address1=(address1)
196
+ @address1 = address1
197
+ end
198
+
199
+ # Custom attribute writer method with validation
200
+ # @param [Object] locality Value to be assigned
201
+ def locality=(locality)
202
+ @locality = locality
203
+ end
204
+
205
+ # Custom attribute writer method with validation
206
+ # @param [Object] administrative_area Value to be assigned
207
+ def administrative_area=(administrative_area)
208
+ @administrative_area = administrative_area
209
+ end
210
+
211
+ # Custom attribute writer method with validation
212
+ # @param [Object] postal_code Value to be assigned
213
+ def postal_code=(postal_code)
214
+ @postal_code = postal_code
215
+ end
216
+
217
+ # Custom attribute writer method with validation
218
+ # @param [Object] country_code Value to be assigned
219
+ def country_code=(country_code)
220
+ @country_code = country_code
221
+ end
222
+
223
+ # Custom attribute writer method with validation
224
+ # @param [Object] phone_number Value to be assigned
225
+ def phone_number=(phone_number)
226
+ @phone_number = phone_number
227
+ end
228
+
229
+ # Custom attribute writer method with validation
230
+ # @param [Object] date_of_birth Value to be assigned
231
+ def date_of_birth=(date_of_birth)
232
+ @date_of_birth = date_of_birth
233
+ end
234
+
235
+ # Custom attribute writer method with validation
236
+ # @param [Object] account_type Value to be assigned
237
+ def account_type=(account_type)
238
+ @account_type = account_type
239
+ end
240
+
241
+ # Checks equality by comparing each attribute.
242
+ # @param [Object] Object to be compared
243
+ def ==(o)
244
+ return true if self.equal?(o)
245
+ self.class == o.class &&
246
+ first_name == o.first_name &&
247
+ middle_name == o.middle_name &&
248
+ last_name == o.last_name &&
249
+ address1 == o.address1 &&
250
+ locality == o.locality &&
251
+ administrative_area == o.administrative_area &&
252
+ postal_code == o.postal_code &&
253
+ country_code == o.country_code &&
254
+ phone_number == o.phone_number &&
255
+ date_of_birth == o.date_of_birth &&
256
+ account_type == o.account_type &&
257
+ account == o.account
258
+ end
259
+
260
+ # @see the `==` method
261
+ # @param [Object] Object to be compared
262
+ def eql?(o)
263
+ self == o
264
+ end
265
+
266
+ # Calculates hash code according to all attributes.
267
+ # @return [Fixnum] Hash code
268
+ def hash
269
+ [first_name, middle_name, last_name, address1, locality, administrative_area, postal_code, country_code, phone_number, date_of_birth, account_type, account].hash
270
+ end
271
+
272
+ # Builds the object from hash
273
+ # @param [Hash] attributes Model attributes in the form of hash
274
+ # @return [Object] Returns the model itself
275
+ def build_from_hash(attributes)
276
+ return nil unless attributes.is_a?(Hash)
277
+ self.class.swagger_types.each_pair do |key, type|
278
+ if type =~ /\AArray<(.*)>/i
279
+ # check to ensure the input is an array given that the the attribute
280
+ # is documented as an array but the input is not
281
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
282
+ self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
283
+ end
284
+ elsif !attributes[self.class.attribute_map[key]].nil?
285
+ self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
286
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
287
+ end
288
+
289
+ self
290
+ end
291
+
292
+ # Deserializes the data based on type
293
+ # @param string type Data type
294
+ # @param string value Value to be deserialized
295
+ # @return [Object] Deserialized data
296
+ def _deserialize(type, value)
297
+ case type.to_sym
298
+ when :DateTime
299
+ DateTime.parse(value)
300
+ when :Date
301
+ Date.parse(value)
302
+ when :String
303
+ value.to_s
304
+ when :Integer
305
+ value.to_i
306
+ when :Float
307
+ value.to_f
308
+ when :BOOLEAN
309
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
310
+ true
311
+ else
312
+ false
313
+ end
314
+ when :Object
315
+ # generic object (usually a Hash), return directly
316
+ value
317
+ when /\AArray<(?<inner_type>.+)>\z/
318
+ inner_type = Regexp.last_match[:inner_type]
319
+ value.map { |v| _deserialize(inner_type, v) }
320
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
321
+ k_type = Regexp.last_match[:k_type]
322
+ v_type = Regexp.last_match[:v_type]
323
+ {}.tap do |hash|
324
+ value.each do |k, v|
325
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
326
+ end
327
+ end
328
+ else # model
329
+ temp_model = CyberSource.const_get(type).new
330
+ temp_model.build_from_hash(value)
331
+ end
332
+ end
333
+
334
+ # Returns the string representation of the object
335
+ # @return [String] String presentation of the object
336
+ def to_s
337
+ to_hash.to_s
338
+ end
339
+
340
+ # to_body is an alias to to_hash (backward compatibility)
341
+ # @return [Hash] Returns the object in the form of hash
342
+ def to_body
343
+ to_hash
344
+ end
345
+
346
+ # Returns the object in the form of hash
347
+ # @return [Hash] Returns the object in the form of hash
348
+ def to_hash
349
+ hash = {}
350
+ self.class.attribute_map.each_pair do |attr, param|
351
+ value = self.send(attr)
352
+ next if value.nil?
353
+ hash[param] = _to_hash(value)
354
+ end
355
+ hash
356
+ end
357
+
358
+ # Outputs non-array value in the form of hash
359
+ # For object, use to_hash. Otherwise, just return the value
360
+ # @param [Object] value Any valid value
361
+ # @return [Hash] Returns the value in the form of hash
362
+ def _to_hash(value)
363
+ if value.is_a?(Array)
364
+ value.compact.map { |v| _to_hash(v) }
365
+ elsif value.is_a?(Hash)
366
+ {}.tap do |hash|
367
+ value.each { |k, v| hash[k] = _to_hash(v) }
368
+ end
369
+ elsif value.respond_to? :to_hash
370
+ value.to_hash
371
+ else
372
+ value
373
+ end
374
+ end
375
+ end
376
+ end