cybersource_rest_client 0.0.49 → 0.0.51

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 (278) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/core/MerchantConfig.rb +5 -0
  3. data/lib/AuthenticationSDK/util/Constants.rb +2 -0
  4. data/lib/cybersource_rest_client/api/batches_api.rb +330 -0
  5. data/lib/cybersource_rest_client/api/customer_api.rb +55 -47
  6. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +112 -104
  7. data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +112 -104
  8. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +93 -81
  9. data/lib/cybersource_rest_client/api/keymanagement_api.rb +3 -3
  10. data/lib/cybersource_rest_client/api/microform_integration_api.rb +89 -0
  11. data/lib/cybersource_rest_client/api/payment_instrument_api.rb +55 -49
  12. data/lib/cybersource_rest_client/api/payments_api.rb +2 -2
  13. data/lib/cybersource_rest_client/api/plans_api.rb +573 -0
  14. data/lib/cybersource_rest_client/api/subscriptions_api.rb +568 -0
  15. data/lib/cybersource_rest_client/api/taxes_api.rb +2 -2
  16. data/lib/cybersource_rest_client/api/token_api.rb +112 -0
  17. data/lib/cybersource_rest_client/api/transient_token_data_api.rb +2 -2
  18. data/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb +6 -5
  19. data/lib/cybersource_rest_client/api_client.rb +11 -0
  20. data/lib/cybersource_rest_client/models/accountupdaterv1batches_included.rb +185 -0
  21. data/lib/cybersource_rest_client/models/accountupdaterv1batches_included_tokens.rb +228 -0
  22. data/lib/cybersource_rest_client/models/body.rb +42 -32
  23. data/lib/cybersource_rest_client/models/create_bundled_decision_manager_case_request.rb +13 -4
  24. data/lib/cybersource_rest_client/models/create_payment_request.rb +13 -4
  25. data/lib/cybersource_rest_client/models/create_plan_request.rb +201 -0
  26. data/lib/cybersource_rest_client/models/create_report_subscription_request.rb +0 -18
  27. data/lib/cybersource_rest_client/models/{flexv1tokens_card_info.rb → create_subscription_request.rb} +44 -40
  28. data/lib/cybersource_rest_client/models/generate_capture_context_request.rb +216 -0
  29. data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +1 -1
  30. data/lib/cybersource_rest_client/models/inline_response_200.rb +19 -41
  31. data/lib/cybersource_rest_client/models/inline_response_200_1.rb +227 -0
  32. data/lib/cybersource_rest_client/models/inline_response_200_10.rb +200 -0
  33. data/lib/cybersource_rest_client/models/inline_response_200_11.rb +236 -0
  34. data/lib/cybersource_rest_client/models/{inline_response_200_keys.rb → inline_response_200_11_keys.rb} +1 -1
  35. data/lib/cybersource_rest_client/models/inline_response_200_12.rb +239 -0
  36. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded.rb +185 -0
  37. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded__links.rb +185 -0
  38. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded__links_reports.rb +184 -0
  39. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded_batches.rb +280 -0
  40. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded_totals.rb +219 -0
  41. data/lib/cybersource_rest_client/models/inline_response_200_12__links.rb +193 -0
  42. data/lib/cybersource_rest_client/models/inline_response_200_13.rb +275 -0
  43. data/lib/cybersource_rest_client/models/inline_response_200_13__links.rb +194 -0
  44. data/lib/cybersource_rest_client/models/inline_response_200_13__links_report.rb +183 -0
  45. data/lib/cybersource_rest_client/models/{tokenize_request.rb → inline_response_200_13_billing.rb} +32 -20
  46. data/lib/cybersource_rest_client/models/inline_response_200_14.rb +277 -0
  47. data/lib/cybersource_rest_client/models/inline_response_200_14_records.rb +201 -0
  48. data/lib/cybersource_rest_client/models/inline_response_200_14_response_record.rb +292 -0
  49. data/lib/cybersource_rest_client/models/inline_response_200_14_response_record_additional_updates.rb +232 -0
  50. data/lib/cybersource_rest_client/models/inline_response_200_14_source_record.rb +282 -0
  51. data/lib/cybersource_rest_client/models/inline_response_200_2.rb +194 -0
  52. data/lib/cybersource_rest_client/models/inline_response_200_3.rb +228 -0
  53. data/lib/cybersource_rest_client/models/inline_response_200_3_plan_information.rb +200 -0
  54. data/lib/cybersource_rest_client/models/inline_response_200_4.rb +228 -0
  55. data/lib/cybersource_rest_client/models/inline_response_200_5.rb +200 -0
  56. data/lib/cybersource_rest_client/models/inline_response_200_6.rb +214 -0
  57. data/lib/cybersource_rest_client/models/inline_response_200_6__links.rb +210 -0
  58. data/lib/cybersource_rest_client/models/inline_response_200_6_order_information.rb +192 -0
  59. data/lib/cybersource_rest_client/models/inline_response_200_6_order_information_bill_to.rb +206 -0
  60. data/lib/cybersource_rest_client/models/inline_response_200_6_payment_information.rb +183 -0
  61. data/lib/cybersource_rest_client/models/inline_response_200_6_payment_information_customer.rb +190 -0
  62. data/lib/cybersource_rest_client/models/{flex_v1_keys_post200_response_jwk.rb → inline_response_200_6_plan_information.rb} +40 -41
  63. data/lib/cybersource_rest_client/models/inline_response_200_6_plan_information_billing_cycles.rb +194 -0
  64. data/lib/cybersource_rest_client/models/inline_response_200_6_subscription_information.rb +242 -0
  65. data/lib/cybersource_rest_client/models/inline_response_200_6_subscriptions.rb +236 -0
  66. data/lib/cybersource_rest_client/models/inline_response_200_7.rb +245 -0
  67. data/lib/cybersource_rest_client/models/inline_response_200_8.rb +228 -0
  68. data/lib/cybersource_rest_client/models/{generate_public_key_request.rb → inline_response_200_9.rb} +50 -21
  69. data/lib/cybersource_rest_client/models/inline_response_200_9_subscription_information.rb +200 -0
  70. data/lib/cybersource_rest_client/models/{flex_v1_keys_post200_response.rb → inline_response_200__links.rb} +20 -21
  71. data/lib/cybersource_rest_client/models/inline_response_200_order_information.rb +183 -0
  72. data/lib/cybersource_rest_client/models/inline_response_200_order_information_amount_details.rb +222 -0
  73. data/lib/cybersource_rest_client/models/inline_response_200_plan_information.rb +250 -0
  74. data/lib/cybersource_rest_client/models/inline_response_200_plan_information_billing_cycles.rb +184 -0
  75. data/lib/cybersource_rest_client/models/inline_response_200_plan_information_billing_period.rb +195 -0
  76. data/lib/cybersource_rest_client/models/inline_response_200_plans.rb +218 -0
  77. data/lib/cybersource_rest_client/models/inline_response_201.rb +228 -0
  78. data/lib/cybersource_rest_client/models/inline_response_201_1.rb +228 -0
  79. data/lib/cybersource_rest_client/models/{invoicing_v2_invoices_all_get200_response__links_1.rb → inline_response_201_1__links.rb} +23 -14
  80. data/lib/cybersource_rest_client/models/inline_response_201_1_subscription_information.rb +200 -0
  81. data/lib/cybersource_rest_client/models/inline_response_201_plan_information.rb +200 -0
  82. data/lib/cybersource_rest_client/models/inline_response_202.rb +228 -0
  83. data/lib/cybersource_rest_client/models/inline_response_202_1.rb +228 -0
  84. data/lib/cybersource_rest_client/models/inline_response_202_1_subscription_information.rb +200 -0
  85. data/lib/cybersource_rest_client/models/inline_response_202_2.rb +202 -0
  86. data/lib/cybersource_rest_client/models/inline_response_202_2__links.rb +194 -0
  87. data/lib/cybersource_rest_client/models/inline_response_202_2__links_status.rb +183 -0
  88. data/lib/cybersource_rest_client/models/inline_response_202_subscription_information.rb +200 -0
  89. data/lib/cybersource_rest_client/models/inline_response_400_1.rb +33 -55
  90. data/lib/cybersource_rest_client/models/inline_response_400_2.rb +10 -9
  91. data/lib/cybersource_rest_client/models/inline_response_400_3.rb +55 -33
  92. data/lib/cybersource_rest_client/models/{inline_response_400_1_fields.rb → inline_response_400_3_fields.rb} +1 -1
  93. data/lib/cybersource_rest_client/models/inline_response_400_4.rb +30 -71
  94. data/lib/cybersource_rest_client/models/inline_response_400_5.rb +225 -0
  95. data/lib/cybersource_rest_client/models/inline_response_400_6.rb +265 -0
  96. data/lib/cybersource_rest_client/models/{inline_response_400_4_details.rb → inline_response_400_6_details.rb} +1 -1
  97. data/lib/cybersource_rest_client/models/inline_response_400_errors.rb +2 -2
  98. data/lib/cybersource_rest_client/models/inline_response_401.rb +241 -0
  99. data/lib/cybersource_rest_client/models/inline_response_401__links.rb +183 -0
  100. data/lib/cybersource_rest_client/models/inline_response_401__links_self.rb +183 -0
  101. data/lib/cybersource_rest_client/models/inline_response_401_fields.rb +202 -0
  102. data/lib/cybersource_rest_client/models/inline_response_403.rb +185 -0
  103. data/lib/cybersource_rest_client/models/inline_response_403_errors.rb +194 -0
  104. data/lib/cybersource_rest_client/models/inline_response_404.rb +194 -0
  105. data/lib/cybersource_rest_client/models/inline_response_409.rb +185 -0
  106. data/lib/cybersource_rest_client/models/inline_response_409_errors.rb +194 -0
  107. data/lib/cybersource_rest_client/models/inline_response_410.rb +185 -0
  108. data/lib/cybersource_rest_client/models/inline_response_410_errors.rb +194 -0
  109. data/lib/cybersource_rest_client/models/inline_response_412.rb +185 -0
  110. data/lib/cybersource_rest_client/models/inline_response_412_errors.rb +194 -0
  111. data/lib/cybersource_rest_client/models/inline_response_424.rb +185 -0
  112. data/lib/cybersource_rest_client/models/inline_response_424_errors.rb +194 -0
  113. data/lib/cybersource_rest_client/models/inline_response_500.rb +9 -38
  114. data/lib/cybersource_rest_client/models/inline_response_500_1.rb +214 -0
  115. data/lib/cybersource_rest_client/models/inline_response_500_errors.rb +194 -0
  116. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_all_get200_response.rb +1 -1
  117. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_all_get200_response__links.rb +22 -13
  118. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_all_get200_response_invoices.rb +1 -1
  119. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_get200_response.rb +1 -1
  120. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_post201_response.rb +1 -1
  121. data/lib/cybersource_rest_client/models/invoicingv2invoices_order_information_line_items.rb +0 -18
  122. data/lib/cybersource_rest_client/models/{flex_v1_tokens_post200_response.rb → microformv2sessions_checkout_api_initialization.rb} +68 -59
  123. data/lib/cybersource_rest_client/models/patch_customer_payment_instrument_request.rb +15 -5
  124. data/lib/cybersource_rest_client/models/patch_customer_request.rb +1 -1
  125. data/lib/cybersource_rest_client/models/patch_customer_shipping_address_request.rb +2 -2
  126. data/lib/cybersource_rest_client/models/patch_instrument_identifier_request.rb +4 -4
  127. data/lib/cybersource_rest_client/models/patch_payment_instrument_request.rb +15 -5
  128. data/lib/cybersource_rest_client/models/post_customer_payment_instrument_request.rb +15 -5
  129. data/lib/cybersource_rest_client/models/post_customer_request.rb +1 -1
  130. data/lib/cybersource_rest_client/models/post_customer_shipping_address_request.rb +2 -2
  131. data/lib/cybersource_rest_client/models/post_instrument_identifier_enrollment_request.rb +4 -4
  132. data/lib/cybersource_rest_client/models/post_instrument_identifier_request.rb +4 -4
  133. data/lib/cybersource_rest_client/models/post_payment_instrument_request.rb +15 -5
  134. data/lib/cybersource_rest_client/models/predefined_subscription_request_bean.rb +0 -18
  135. data/lib/cybersource_rest_client/models/pts_v2_incremental_authorization_patch400_response.rb +1 -1
  136. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post400_response.rb +1 -1
  137. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +13 -4
  138. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information_ship_to.rb +1 -1
  139. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb +1 -1
  140. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +0 -18
  141. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information.rb +13 -4
  142. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_bill_to.rb +206 -0
  143. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_invoice_details.rb +0 -9
  144. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +1 -1
  145. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +22 -6
  146. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results.rb +102 -6
  147. data/lib/cybersource_rest_client/models/{risk_v1_export_compliance_inquiries_post201_response_export_compliance_information.rb → pts_v2_payments_post201_response_watchlist_screening_information.rb} +2 -20
  148. data/lib/cybersource_rest_client/models/{risk_v1_export_compliance_inquiries_post201_response_export_compliance_information_watch_list.rb → pts_v2_payments_post201_response_watchlist_screening_information_watch_list.rb} +2 -2
  149. data/lib/cybersource_rest_client/models/{risk_v1_export_compliance_inquiries_post201_response_watch_list_matches.rb → pts_v2_payments_post201_response_watchlist_screening_information_watch_list_matches.rb} +1 -1
  150. data/lib/cybersource_rest_client/models/pts_v2_payments_post400_response.rb +1 -1
  151. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb +1 -1
  152. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb +1 -1
  153. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post400_response.rb +1 -1
  154. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +0 -18
  155. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +26 -19
  156. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +20 -4
  157. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_service_location.rb +238 -0
  158. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +36 -4
  159. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +0 -9
  160. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +27 -23
  161. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_ship_to.rb +1 -1
  162. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +1 -21
  163. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +1 -1
  164. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +22 -6
  165. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +12 -47
  166. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +1 -1
  167. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +14 -4
  168. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb +0 -36
  169. data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb +0 -36
  170. data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging_room.rb +0 -18
  171. data/lib/cybersource_rest_client/models/ptsv2payments_watchlist_screening_information.rb +215 -0
  172. data/lib/cybersource_rest_client/models/{riskv1exportcomplianceinquiries_export_compliance_information_weights.rb → ptsv2payments_watchlist_screening_information_weights.rb} +1 -1
  173. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +0 -18
  174. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_merchant_information.rb +0 -9
  175. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_ship_to.rb +1 -1
  176. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_capture_options.rb +0 -36
  177. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_merchant_information.rb +0 -9
  178. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb +1 -19
  179. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +1 -1
  180. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items.rb +0 -18
  181. data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information.rb +0 -9
  182. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +1 -1
  183. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options.rb +20 -4
  184. data/lib/cybersource_rest_client/models/rbsv1plans_client_reference_information.rb +229 -0
  185. data/lib/cybersource_rest_client/models/rbsv1plans_order_information.rb +183 -0
  186. data/lib/cybersource_rest_client/models/rbsv1plans_order_information_amount_details.rb +240 -0
  187. data/lib/cybersource_rest_client/models/rbsv1plans_plan_information.rb +259 -0
  188. data/lib/cybersource_rest_client/models/rbsv1plans_plan_information_billing_cycles.rb +185 -0
  189. data/lib/cybersource_rest_client/models/rbsv1plansid_plan_information.rb +250 -0
  190. data/lib/cybersource_rest_client/models/rbsv1plansid_processing_information.rb +183 -0
  191. data/lib/cybersource_rest_client/models/rbsv1plansid_processing_information_subscription_billing_options.rb +184 -0
  192. data/lib/cybersource_rest_client/models/rbsv1subscriptions_client_reference_information.rb +245 -0
  193. data/lib/cybersource_rest_client/models/rbsv1subscriptions_payment_information.rb +183 -0
  194. data/lib/cybersource_rest_client/models/rbsv1subscriptions_payment_information_customer.rb +199 -0
  195. data/lib/cybersource_rest_client/models/rbsv1subscriptions_plan_information.rb +192 -0
  196. data/lib/cybersource_rest_client/models/rbsv1subscriptions_processing_information.rb +199 -0
  197. data/lib/cybersource_rest_client/models/rbsv1subscriptions_processing_information_authorization_options.rb +183 -0
  198. data/lib/cybersource_rest_client/models/rbsv1subscriptions_processing_information_authorization_options_initiator.rb +184 -0
  199. data/lib/cybersource_rest_client/models/rbsv1subscriptions_subscription_information.rb +246 -0
  200. data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_order_information.rb +183 -0
  201. data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_order_information_amount_details.rb +206 -0
  202. data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_plan_information.rb +183 -0
  203. data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_subscription_information.rb +232 -0
  204. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response.rb +10 -1
  205. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_consumer_authentication_information.rb +88 -4
  206. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_error_information.rb +1 -1
  207. data/lib/cybersource_rest_client/models/risk_v1_export_compliance_inquiries_post201_response.rb +1 -1
  208. data/lib/cybersource_rest_client/models/riskv1addressverifications_order_information_line_items.rb +1 -19
  209. data/lib/cybersource_rest_client/models/riskv1addressverifications_order_information_ship_to.rb +1 -1
  210. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +20 -4
  211. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information_line_items.rb +0 -18
  212. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +1 -1
  213. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +1 -1
  214. data/lib/cybersource_rest_client/models/riskv1authentications_buyer_information.rb +14 -4
  215. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_bill_to.rb +17 -1
  216. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_line_items.rb +152 -22
  217. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_card.rb +1 -1
  218. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +1 -1
  219. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_card.rb +1 -1
  220. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +1 -1
  221. data/lib/cybersource_rest_client/models/riskv1decisions_consumer_authentication_information.rb +14 -4
  222. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_line_items.rb +27 -23
  223. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_ship_to.rb +34 -2
  224. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +1 -1
  225. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
  226. data/lib/cybersource_rest_client/models/riskv1decisions_processing_information.rb +2 -2
  227. data/lib/cybersource_rest_client/models/riskv1exportcomplianceinquiries_export_compliance_information.rb +1 -1
  228. data/lib/cybersource_rest_client/models/riskv1exportcomplianceinquiries_order_information_line_items.rb +1 -19
  229. data/lib/cybersource_rest_client/models/riskv1liststypeentries_order_information_ship_to.rb +1 -1
  230. data/lib/cybersource_rest_client/models/riskv1liststypeentries_payment_information_card.rb +1 -1
  231. data/lib/cybersource_rest_client/models/tms_v2_customers_response.rb +1 -1
  232. data/lib/cybersource_rest_client/models/tmsv2customers__embedded.rb +1 -1
  233. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument.rb +15 -5
  234. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded.rb +1 -1
  235. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded_instrument_identifier.rb +4 -4
  236. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded_instrument_identifier_bill_to.rb +1 -1
  237. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded_instrument_identifier_card.rb +3 -3
  238. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded_instrument_identifier_metadata.rb +1 -1
  239. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_bank_account.rb +1 -1
  240. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_buyer_information_personal_identification.rb +1 -1
  241. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_card.rb +22 -4
  242. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_card_tokenized_information.rb +1 -1
  243. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_instrument_identifier.rb +1 -1
  244. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_merchant_information_merchant_descriptor.rb +1 -1
  245. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_metadata.rb +1 -1
  246. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_processing_information.rb +1 -1
  247. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_processing_information_bank_transfer_options.rb +1 -1
  248. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_shipping_address.rb +2 -2
  249. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_shipping_address_metadata.rb +1 -1
  250. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_shipping_address_ship_to.rb +1 -1
  251. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_merchant_initiated_transaction.rb +20 -4
  252. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_tokenized_card.rb +15 -5
  253. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_tokenized_card_card.rb +1 -1
  254. data/lib/cybersource_rest_client/models/tmsv2customers_default_payment_instrument.rb +1 -1
  255. data/lib/cybersource_rest_client/models/tmsv2customers_default_shipping_address.rb +1 -1
  256. data/lib/cybersource_rest_client/models/tmsv2customers_merchant_defined_information.rb +2 -2
  257. data/lib/cybersource_rest_client/models/tmsv2customers_metadata.rb +1 -1
  258. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_invoice_details.rb +0 -9
  259. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_line_items.rb +0 -18
  260. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +1 -1
  261. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_point_of_sale_information.rb +0 -18
  262. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results.rb +2 -2
  263. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +1 -1
  264. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb +13 -4
  265. data/lib/cybersource_rest_client/models/ums_v1_users_get200_response_users.rb +15 -4
  266. data/lib/cybersource_rest_client/models/{flex_v1_keys_post200_response_der.rb → update_plan_request.rb} +20 -24
  267. data/lib/cybersource_rest_client/models/update_subscription.rb +219 -0
  268. data/lib/cybersource_rest_client/models/vas_v2_payments_post201_response_tax_information.rb +2 -2
  269. data/lib/cybersource_rest_client/models/vas_v2_payments_post400_response.rb +1 -1
  270. data/lib/cybersource_rest_client/models/vasv2tax_order_information_line_items.rb +1 -19
  271. data/lib/cybersource_rest_client/models/vasv2tax_order_information_order_acceptance.rb +5 -5
  272. data/lib/cybersource_rest_client/models/vasv2tax_order_information_order_origin.rb +5 -5
  273. data/lib/cybersource_rest_client/models/vasv2tax_order_information_ship_to.rb +1 -1
  274. data/lib/cybersource_rest_client/models/vasv2tax_tax_information.rb +3 -3
  275. data/lib/cybersource_rest_client.rb +119 -17
  276. metadata +121 -19
  277. data/lib/cybersource_rest_client/api/key_generation_api.rb +0 -96
  278. data/lib/cybersource_rest_client/api/tokenization_api.rb +0 -89
@@ -0,0 +1,214 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CyberSource
16
+ class InlineResponse2006
17
+ attr_accessor :_links
18
+
19
+ # Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ` **Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The `T` separates the date and the time. The `Z` indicates UTC. Returned by Cybersource for all services.
20
+ attr_accessor :submit_time_utc
21
+
22
+ # total number of subscriptions created
23
+ attr_accessor :total_count
24
+
25
+ attr_accessor :subscriptions
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'_links' => :'_links',
31
+ :'submit_time_utc' => :'submitTimeUtc',
32
+ :'total_count' => :'totalCount',
33
+ :'subscriptions' => :'subscriptions'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.swagger_types
39
+ {
40
+ :'_links' => :'InlineResponse200Links',
41
+ :'submit_time_utc' => :'String',
42
+ :'total_count' => :'Integer',
43
+ :'subscriptions' => :'Array<InlineResponse2006Subscriptions>'
44
+ }
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ return unless attributes.is_a?(Hash)
51
+
52
+ # convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
54
+
55
+ if attributes.has_key?(:'_links')
56
+ self._links = attributes[:'_links']
57
+ end
58
+
59
+ if attributes.has_key?(:'submitTimeUtc')
60
+ self.submit_time_utc = attributes[:'submitTimeUtc']
61
+ end
62
+
63
+ if attributes.has_key?(:'totalCount')
64
+ self.total_count = attributes[:'totalCount']
65
+ end
66
+
67
+ if attributes.has_key?(:'subscriptions')
68
+ if (value = attributes[:'subscriptions']).is_a?(Array)
69
+ self.subscriptions = value
70
+ end
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ _links == o._links &&
93
+ submit_time_utc == o.submit_time_utc &&
94
+ total_count == o.total_count &&
95
+ subscriptions == o.subscriptions
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Fixnum] Hash code
106
+ def hash
107
+ [_links, submit_time_utc, total_count, subscriptions].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ self.class.swagger_types.each_pair do |key, type|
116
+ if type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
120
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ end
122
+ elsif !attributes[self.class.attribute_map[key]].nil?
123
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :DateTime
137
+ DateTime.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :BOOLEAN
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ temp_model = CyberSource.const_get(type).new
168
+ temp_model.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ next if value.nil?
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+ end
214
+ end
@@ -0,0 +1,210 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CyberSource
16
+ class InlineResponse2006Links
17
+ attr_accessor :_self
18
+
19
+ attr_accessor :cancel
20
+
21
+ attr_accessor :suspend
22
+
23
+ attr_accessor :activate
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'_self' => :'self',
29
+ :'cancel' => :'cancel',
30
+ :'suspend' => :'suspend',
31
+ :'activate' => :'activate'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'_self' => :'PtsV2PaymentsPost201ResponseLinksSelf',
39
+ :'cancel' => :'PtsV2PaymentsPost201ResponseLinksSelf',
40
+ :'suspend' => :'PtsV2PaymentsPost201ResponseLinksSelf',
41
+ :'activate' => :'PtsV2PaymentsPost201ResponseLinksSelf'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'self')
54
+ self._self = attributes[:'self']
55
+ end
56
+
57
+ if attributes.has_key?(:'cancel')
58
+ self.cancel = attributes[:'cancel']
59
+ end
60
+
61
+ if attributes.has_key?(:'suspend')
62
+ self.suspend = attributes[:'suspend']
63
+ end
64
+
65
+ if attributes.has_key?(:'activate')
66
+ self.activate = attributes[:'activate']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ _self == o._self &&
89
+ cancel == o.cancel &&
90
+ suspend == o.suspend &&
91
+ activate == o.activate
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Fixnum] Hash code
102
+ def hash
103
+ [_self, cancel, suspend, activate].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.swagger_types.each_pair do |key, type|
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :BOOLEAN
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ temp_model = CyberSource.const_get(type).new
164
+ temp_model.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ next if value.nil?
187
+ hash[param] = _to_hash(value)
188
+ end
189
+ hash
190
+ end
191
+
192
+ # Outputs non-array value in the form of hash
193
+ # For object, use to_hash. Otherwise, just return the value
194
+ # @param [Object] value Any valid value
195
+ # @return [Hash] Returns the value in the form of hash
196
+ def _to_hash(value)
197
+ if value.is_a?(Array)
198
+ value.compact.map { |v| _to_hash(v) }
199
+ elsif value.is_a?(Hash)
200
+ {}.tap do |hash|
201
+ value.each { |k, v| hash[k] = _to_hash(v) }
202
+ end
203
+ elsif value.respond_to? :to_hash
204
+ value.to_hash
205
+ else
206
+ value
207
+ end
208
+ end
209
+ end
210
+ end
@@ -0,0 +1,192 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CyberSource
16
+ class InlineResponse2006OrderInformation
17
+ attr_accessor :amount_details
18
+
19
+ attr_accessor :bill_to
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'amount_details' => :'amountDetails',
25
+ :'bill_to' => :'billTo'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'amount_details' => :'InlineResponse200OrderInformationAmountDetails',
33
+ :'bill_to' => :'InlineResponse2006OrderInformationBillTo'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ if attributes.has_key?(:'amountDetails')
46
+ self.amount_details = attributes[:'amountDetails']
47
+ end
48
+
49
+ if attributes.has_key?(:'billTo')
50
+ self.bill_to = attributes[:'billTo']
51
+ end
52
+ end
53
+
54
+ # Show invalid properties with the reasons. Usually used together with valid?
55
+ # @return Array for valid properties with the reasons
56
+ def list_invalid_properties
57
+ invalid_properties = Array.new
58
+ invalid_properties
59
+ end
60
+
61
+ # Check to see if the all the properties in the model are valid
62
+ # @return true if the model is valid
63
+ def valid?
64
+ true
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class &&
72
+ amount_details == o.amount_details &&
73
+ bill_to == o.bill_to
74
+ end
75
+
76
+ # @see the `==` method
77
+ # @param [Object] Object to be compared
78
+ def eql?(o)
79
+ self == o
80
+ end
81
+
82
+ # Calculates hash code according to all attributes.
83
+ # @return [Fixnum] Hash code
84
+ def hash
85
+ [amount_details, bill_to].hash
86
+ end
87
+
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+ self.class.swagger_types.each_pair do |key, type|
94
+ if type =~ /\AArray<(.*)>/i
95
+ # check to ensure the input is an array given that the the attribute
96
+ # is documented as an array but the input is not
97
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
98
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
99
+ end
100
+ elsif !attributes[self.class.attribute_map[key]].nil?
101
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
102
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
103
+ end
104
+
105
+ self
106
+ end
107
+
108
+ # Deserializes the data based on type
109
+ # @param string type Data type
110
+ # @param string value Value to be deserialized
111
+ # @return [Object] Deserialized data
112
+ def _deserialize(type, value)
113
+ case type.to_sym
114
+ when :DateTime
115
+ DateTime.parse(value)
116
+ when :Date
117
+ Date.parse(value)
118
+ when :String
119
+ value.to_s
120
+ when :Integer
121
+ value.to_i
122
+ when :Float
123
+ value.to_f
124
+ when :BOOLEAN
125
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
126
+ true
127
+ else
128
+ false
129
+ end
130
+ when :Object
131
+ # generic object (usually a Hash), return directly
132
+ value
133
+ when /\AArray<(?<inner_type>.+)>\z/
134
+ inner_type = Regexp.last_match[:inner_type]
135
+ value.map { |v| _deserialize(inner_type, v) }
136
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
137
+ k_type = Regexp.last_match[:k_type]
138
+ v_type = Regexp.last_match[:v_type]
139
+ {}.tap do |hash|
140
+ value.each do |k, v|
141
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
142
+ end
143
+ end
144
+ else # model
145
+ temp_model = CyberSource.const_get(type).new
146
+ temp_model.build_from_hash(value)
147
+ end
148
+ end
149
+
150
+ # Returns the string representation of the object
151
+ # @return [String] String presentation of the object
152
+ def to_s
153
+ to_hash.to_s
154
+ end
155
+
156
+ # to_body is an alias to to_hash (backward compatibility)
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_body
159
+ to_hash
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ next if value.nil?
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ # Outputs non-array value in the form of hash
175
+ # For object, use to_hash. Otherwise, just return the value
176
+ # @param [Object] value Any valid value
177
+ # @return [Hash] Returns the value in the form of hash
178
+ def _to_hash(value)
179
+ if value.is_a?(Array)
180
+ value.compact.map { |v| _to_hash(v) }
181
+ elsif value.is_a?(Hash)
182
+ {}.tap do |hash|
183
+ value.each { |k, v| hash[k] = _to_hash(v) }
184
+ end
185
+ elsif value.respond_to? :to_hash
186
+ value.to_hash
187
+ else
188
+ value
189
+ end
190
+ end
191
+ end
192
+ end