cybersource_rest_client 0.0.49 → 0.0.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) 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/plans_api.rb +573 -0
  13. data/lib/cybersource_rest_client/api/subscriptions_api.rb +568 -0
  14. data/lib/cybersource_rest_client/api/taxes_api.rb +2 -2
  15. data/lib/cybersource_rest_client/api/token_api.rb +112 -0
  16. data/lib/cybersource_rest_client/api/transient_token_data_api.rb +2 -2
  17. data/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb +6 -5
  18. data/lib/cybersource_rest_client/api_client.rb +11 -0
  19. data/lib/cybersource_rest_client/models/accountupdaterv1batches_included.rb +185 -0
  20. data/lib/cybersource_rest_client/models/accountupdaterv1batches_included_tokens.rb +228 -0
  21. data/lib/cybersource_rest_client/models/body.rb +42 -32
  22. data/lib/cybersource_rest_client/models/create_plan_request.rb +201 -0
  23. data/lib/cybersource_rest_client/models/create_report_subscription_request.rb +0 -18
  24. data/lib/cybersource_rest_client/models/{flexv1tokens_card_info.rb → create_subscription_request.rb} +44 -40
  25. data/lib/cybersource_rest_client/models/generate_capture_context_request.rb +216 -0
  26. data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +1 -1
  27. data/lib/cybersource_rest_client/models/inline_response_200.rb +19 -41
  28. data/lib/cybersource_rest_client/models/inline_response_200_1.rb +227 -0
  29. data/lib/cybersource_rest_client/models/inline_response_200_10.rb +200 -0
  30. data/lib/cybersource_rest_client/models/inline_response_200_11.rb +236 -0
  31. data/lib/cybersource_rest_client/models/{inline_response_200_keys.rb → inline_response_200_11_keys.rb} +1 -1
  32. data/lib/cybersource_rest_client/models/inline_response_200_12.rb +239 -0
  33. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded.rb +185 -0
  34. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded__links.rb +185 -0
  35. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded__links_reports.rb +184 -0
  36. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded_batches.rb +280 -0
  37. data/lib/cybersource_rest_client/models/inline_response_200_12__embedded_totals.rb +219 -0
  38. data/lib/cybersource_rest_client/models/inline_response_200_12__links.rb +193 -0
  39. data/lib/cybersource_rest_client/models/inline_response_200_13.rb +275 -0
  40. data/lib/cybersource_rest_client/models/inline_response_200_13__links.rb +194 -0
  41. data/lib/cybersource_rest_client/models/inline_response_200_13__links_report.rb +183 -0
  42. data/lib/cybersource_rest_client/models/{tokenize_request.rb → inline_response_200_13_billing.rb} +32 -20
  43. data/lib/cybersource_rest_client/models/inline_response_200_14.rb +277 -0
  44. data/lib/cybersource_rest_client/models/inline_response_200_14_records.rb +201 -0
  45. data/lib/cybersource_rest_client/models/inline_response_200_14_response_record.rb +292 -0
  46. data/lib/cybersource_rest_client/models/inline_response_200_14_response_record_additional_updates.rb +232 -0
  47. data/lib/cybersource_rest_client/models/inline_response_200_14_source_record.rb +282 -0
  48. data/lib/cybersource_rest_client/models/inline_response_200_2.rb +194 -0
  49. data/lib/cybersource_rest_client/models/inline_response_200_3.rb +228 -0
  50. data/lib/cybersource_rest_client/models/inline_response_200_3_plan_information.rb +200 -0
  51. data/lib/cybersource_rest_client/models/inline_response_200_4.rb +228 -0
  52. data/lib/cybersource_rest_client/models/inline_response_200_5.rb +200 -0
  53. data/lib/cybersource_rest_client/models/inline_response_200_6.rb +214 -0
  54. data/lib/cybersource_rest_client/models/inline_response_200_6__links.rb +210 -0
  55. data/lib/cybersource_rest_client/models/inline_response_200_6_order_information.rb +192 -0
  56. data/lib/cybersource_rest_client/models/inline_response_200_6_order_information_bill_to.rb +206 -0
  57. data/lib/cybersource_rest_client/models/inline_response_200_6_payment_information.rb +183 -0
  58. data/lib/cybersource_rest_client/models/inline_response_200_6_payment_information_customer.rb +190 -0
  59. data/lib/cybersource_rest_client/models/{flex_v1_keys_post200_response_jwk.rb → inline_response_200_6_plan_information.rb} +40 -41
  60. data/lib/cybersource_rest_client/models/inline_response_200_6_plan_information_billing_cycles.rb +194 -0
  61. data/lib/cybersource_rest_client/models/inline_response_200_6_subscription_information.rb +242 -0
  62. data/lib/cybersource_rest_client/models/inline_response_200_6_subscriptions.rb +236 -0
  63. data/lib/cybersource_rest_client/models/inline_response_200_7.rb +245 -0
  64. data/lib/cybersource_rest_client/models/inline_response_200_8.rb +228 -0
  65. data/lib/cybersource_rest_client/models/{generate_public_key_request.rb → inline_response_200_9.rb} +50 -21
  66. data/lib/cybersource_rest_client/models/inline_response_200_9_subscription_information.rb +200 -0
  67. data/lib/cybersource_rest_client/models/{flex_v1_keys_post200_response.rb → inline_response_200__links.rb} +20 -21
  68. data/lib/cybersource_rest_client/models/inline_response_200_order_information.rb +183 -0
  69. data/lib/cybersource_rest_client/models/inline_response_200_order_information_amount_details.rb +222 -0
  70. data/lib/cybersource_rest_client/models/inline_response_200_plan_information.rb +250 -0
  71. data/lib/cybersource_rest_client/models/inline_response_200_plan_information_billing_cycles.rb +184 -0
  72. data/lib/cybersource_rest_client/models/inline_response_200_plan_information_billing_period.rb +195 -0
  73. data/lib/cybersource_rest_client/models/inline_response_200_plans.rb +218 -0
  74. data/lib/cybersource_rest_client/models/inline_response_201.rb +228 -0
  75. data/lib/cybersource_rest_client/models/inline_response_201_1.rb +228 -0
  76. data/lib/cybersource_rest_client/models/{invoicing_v2_invoices_all_get200_response__links_1.rb → inline_response_201_1__links.rb} +23 -14
  77. data/lib/cybersource_rest_client/models/inline_response_201_1_subscription_information.rb +200 -0
  78. data/lib/cybersource_rest_client/models/inline_response_201_plan_information.rb +200 -0
  79. data/lib/cybersource_rest_client/models/inline_response_202.rb +228 -0
  80. data/lib/cybersource_rest_client/models/inline_response_202_1.rb +228 -0
  81. data/lib/cybersource_rest_client/models/inline_response_202_1_subscription_information.rb +200 -0
  82. data/lib/cybersource_rest_client/models/inline_response_202_2.rb +202 -0
  83. data/lib/cybersource_rest_client/models/inline_response_202_2__links.rb +194 -0
  84. data/lib/cybersource_rest_client/models/inline_response_202_2__links_status.rb +183 -0
  85. data/lib/cybersource_rest_client/models/inline_response_202_subscription_information.rb +200 -0
  86. data/lib/cybersource_rest_client/models/inline_response_400_1.rb +33 -55
  87. data/lib/cybersource_rest_client/models/inline_response_400_2.rb +10 -9
  88. data/lib/cybersource_rest_client/models/inline_response_400_3.rb +55 -33
  89. data/lib/cybersource_rest_client/models/{inline_response_400_1_fields.rb → inline_response_400_3_fields.rb} +1 -1
  90. data/lib/cybersource_rest_client/models/inline_response_400_4.rb +30 -71
  91. data/lib/cybersource_rest_client/models/inline_response_400_5.rb +225 -0
  92. data/lib/cybersource_rest_client/models/inline_response_400_6.rb +265 -0
  93. data/lib/cybersource_rest_client/models/{inline_response_400_4_details.rb → inline_response_400_6_details.rb} +1 -1
  94. data/lib/cybersource_rest_client/models/inline_response_400_errors.rb +2 -2
  95. data/lib/cybersource_rest_client/models/inline_response_401.rb +241 -0
  96. data/lib/cybersource_rest_client/models/inline_response_401__links.rb +183 -0
  97. data/lib/cybersource_rest_client/models/inline_response_401__links_self.rb +183 -0
  98. data/lib/cybersource_rest_client/models/inline_response_401_fields.rb +202 -0
  99. data/lib/cybersource_rest_client/models/inline_response_403.rb +185 -0
  100. data/lib/cybersource_rest_client/models/inline_response_403_errors.rb +194 -0
  101. data/lib/cybersource_rest_client/models/inline_response_404.rb +194 -0
  102. data/lib/cybersource_rest_client/models/inline_response_409.rb +185 -0
  103. data/lib/cybersource_rest_client/models/inline_response_409_errors.rb +194 -0
  104. data/lib/cybersource_rest_client/models/inline_response_410.rb +185 -0
  105. data/lib/cybersource_rest_client/models/inline_response_410_errors.rb +194 -0
  106. data/lib/cybersource_rest_client/models/inline_response_412.rb +185 -0
  107. data/lib/cybersource_rest_client/models/inline_response_412_errors.rb +194 -0
  108. data/lib/cybersource_rest_client/models/inline_response_424.rb +185 -0
  109. data/lib/cybersource_rest_client/models/inline_response_424_errors.rb +194 -0
  110. data/lib/cybersource_rest_client/models/inline_response_500.rb +9 -38
  111. data/lib/cybersource_rest_client/models/inline_response_500_1.rb +214 -0
  112. data/lib/cybersource_rest_client/models/inline_response_500_errors.rb +194 -0
  113. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_all_get200_response.rb +1 -1
  114. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_all_get200_response__links.rb +22 -13
  115. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_all_get200_response_invoices.rb +1 -1
  116. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_get200_response.rb +1 -1
  117. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_post201_response.rb +1 -1
  118. data/lib/cybersource_rest_client/models/invoicingv2invoices_order_information_line_items.rb +0 -18
  119. data/lib/cybersource_rest_client/models/{flex_v1_tokens_post200_response.rb → microformv2sessions_checkout_api_initialization.rb} +68 -59
  120. data/lib/cybersource_rest_client/models/patch_customer_payment_instrument_request.rb +15 -5
  121. data/lib/cybersource_rest_client/models/patch_customer_request.rb +1 -1
  122. data/lib/cybersource_rest_client/models/patch_customer_shipping_address_request.rb +2 -2
  123. data/lib/cybersource_rest_client/models/patch_instrument_identifier_request.rb +4 -4
  124. data/lib/cybersource_rest_client/models/patch_payment_instrument_request.rb +15 -5
  125. data/lib/cybersource_rest_client/models/post_customer_payment_instrument_request.rb +15 -5
  126. data/lib/cybersource_rest_client/models/post_customer_request.rb +1 -1
  127. data/lib/cybersource_rest_client/models/post_customer_shipping_address_request.rb +2 -2
  128. data/lib/cybersource_rest_client/models/post_instrument_identifier_enrollment_request.rb +4 -4
  129. data/lib/cybersource_rest_client/models/post_instrument_identifier_request.rb +4 -4
  130. data/lib/cybersource_rest_client/models/post_payment_instrument_request.rb +15 -5
  131. data/lib/cybersource_rest_client/models/predefined_subscription_request_bean.rb +0 -18
  132. data/lib/cybersource_rest_client/models/pts_v2_incremental_authorization_patch400_response.rb +1 -1
  133. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post400_response.rb +1 -1
  134. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information_ship_to.rb +1 -1
  135. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +0 -18
  136. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_invoice_details.rb +0 -9
  137. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +1 -1
  138. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +1 -1
  139. data/lib/cybersource_rest_client/models/pts_v2_payments_post400_response.rb +1 -1
  140. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb +1 -1
  141. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb +1 -1
  142. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post400_response.rb +1 -1
  143. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +0 -18
  144. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +0 -18
  145. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +0 -9
  146. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +1 -19
  147. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_ship_to.rb +1 -1
  148. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +1 -21
  149. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +1 -1
  150. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +1 -1
  151. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +12 -47
  152. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb +0 -36
  153. data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb +0 -36
  154. data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging_room.rb +0 -18
  155. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +0 -18
  156. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_merchant_information.rb +0 -9
  157. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_ship_to.rb +1 -1
  158. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_capture_options.rb +0 -36
  159. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_merchant_information.rb +0 -9
  160. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb +1 -19
  161. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +1 -1
  162. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items.rb +0 -18
  163. data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information.rb +0 -9
  164. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +1 -1
  165. data/lib/cybersource_rest_client/models/rbsv1plans_client_reference_information.rb +229 -0
  166. data/lib/cybersource_rest_client/models/rbsv1plans_order_information.rb +183 -0
  167. data/lib/cybersource_rest_client/models/rbsv1plans_order_information_amount_details.rb +240 -0
  168. data/lib/cybersource_rest_client/models/rbsv1plans_plan_information.rb +259 -0
  169. data/lib/cybersource_rest_client/models/rbsv1plans_plan_information_billing_cycles.rb +185 -0
  170. data/lib/cybersource_rest_client/models/rbsv1plansid_plan_information.rb +250 -0
  171. data/lib/cybersource_rest_client/models/rbsv1plansid_processing_information.rb +183 -0
  172. data/lib/cybersource_rest_client/models/rbsv1plansid_processing_information_subscription_billing_options.rb +184 -0
  173. data/lib/cybersource_rest_client/models/rbsv1subscriptions_client_reference_information.rb +245 -0
  174. data/lib/cybersource_rest_client/models/rbsv1subscriptions_payment_information.rb +183 -0
  175. data/lib/cybersource_rest_client/models/rbsv1subscriptions_payment_information_customer.rb +199 -0
  176. data/lib/cybersource_rest_client/models/rbsv1subscriptions_plan_information.rb +192 -0
  177. data/lib/cybersource_rest_client/models/rbsv1subscriptions_processing_information.rb +199 -0
  178. data/lib/cybersource_rest_client/models/rbsv1subscriptions_processing_information_authorization_options.rb +183 -0
  179. data/lib/cybersource_rest_client/models/rbsv1subscriptions_processing_information_authorization_options_initiator.rb +184 -0
  180. data/lib/cybersource_rest_client/models/rbsv1subscriptions_subscription_information.rb +246 -0
  181. data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_order_information.rb +183 -0
  182. data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_order_information_amount_details.rb +206 -0
  183. data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_plan_information.rb +183 -0
  184. data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_subscription_information.rb +232 -0
  185. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_consumer_authentication_information.rb +88 -4
  186. data/lib/cybersource_rest_client/models/risk_v1_export_compliance_inquiries_post201_response_export_compliance_information.rb +0 -18
  187. data/lib/cybersource_rest_client/models/riskv1addressverifications_order_information_line_items.rb +1 -19
  188. data/lib/cybersource_rest_client/models/riskv1addressverifications_order_information_ship_to.rb +1 -1
  189. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +20 -4
  190. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information_line_items.rb +0 -18
  191. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +1 -1
  192. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +1 -1
  193. data/lib/cybersource_rest_client/models/riskv1authentications_buyer_information.rb +14 -4
  194. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_bill_to.rb +17 -1
  195. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_line_items.rb +152 -22
  196. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_card.rb +1 -1
  197. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +1 -1
  198. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_card.rb +1 -1
  199. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +1 -1
  200. data/lib/cybersource_rest_client/models/riskv1decisions_consumer_authentication_information.rb +14 -4
  201. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_line_items.rb +1 -19
  202. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_ship_to.rb +34 -2
  203. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +1 -1
  204. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
  205. data/lib/cybersource_rest_client/models/riskv1exportcomplianceinquiries_order_information_line_items.rb +1 -19
  206. data/lib/cybersource_rest_client/models/riskv1liststypeentries_order_information_ship_to.rb +1 -1
  207. data/lib/cybersource_rest_client/models/riskv1liststypeentries_payment_information_card.rb +1 -1
  208. data/lib/cybersource_rest_client/models/tms_v2_customers_response.rb +1 -1
  209. data/lib/cybersource_rest_client/models/tmsv2customers__embedded.rb +1 -1
  210. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument.rb +15 -5
  211. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded.rb +1 -1
  212. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded_instrument_identifier.rb +4 -4
  213. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded_instrument_identifier_bill_to.rb +1 -1
  214. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded_instrument_identifier_card.rb +3 -3
  215. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument__embedded_instrument_identifier_metadata.rb +1 -1
  216. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_bank_account.rb +1 -1
  217. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_buyer_information_personal_identification.rb +1 -1
  218. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_card.rb +22 -4
  219. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_card_tokenized_information.rb +1 -1
  220. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_instrument_identifier.rb +1 -1
  221. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_merchant_information_merchant_descriptor.rb +1 -1
  222. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_metadata.rb +1 -1
  223. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_processing_information.rb +1 -1
  224. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_payment_instrument_processing_information_bank_transfer_options.rb +1 -1
  225. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_shipping_address.rb +2 -2
  226. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_shipping_address_metadata.rb +1 -1
  227. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_default_shipping_address_ship_to.rb +1 -1
  228. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_merchant_initiated_transaction.rb +20 -4
  229. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_tokenized_card.rb +15 -5
  230. data/lib/cybersource_rest_client/models/tmsv2customers__embedded_tokenized_card_card.rb +1 -1
  231. data/lib/cybersource_rest_client/models/tmsv2customers_default_payment_instrument.rb +1 -1
  232. data/lib/cybersource_rest_client/models/tmsv2customers_default_shipping_address.rb +1 -1
  233. data/lib/cybersource_rest_client/models/tmsv2customers_merchant_defined_information.rb +2 -2
  234. data/lib/cybersource_rest_client/models/tmsv2customers_metadata.rb +1 -1
  235. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_invoice_details.rb +0 -9
  236. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_line_items.rb +0 -18
  237. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +1 -1
  238. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_point_of_sale_information.rb +0 -18
  239. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +1 -1
  240. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb +13 -4
  241. data/lib/cybersource_rest_client/models/ums_v1_users_get200_response_users.rb +15 -4
  242. data/lib/cybersource_rest_client/models/{flex_v1_keys_post200_response_der.rb → update_plan_request.rb} +20 -24
  243. data/lib/cybersource_rest_client/models/update_subscription.rb +219 -0
  244. data/lib/cybersource_rest_client/models/vas_v2_payments_post201_response_tax_information.rb +2 -2
  245. data/lib/cybersource_rest_client/models/vas_v2_payments_post400_response.rb +1 -1
  246. data/lib/cybersource_rest_client/models/vasv2tax_order_information_line_items.rb +1 -19
  247. data/lib/cybersource_rest_client/models/vasv2tax_order_information_order_acceptance.rb +5 -5
  248. data/lib/cybersource_rest_client/models/vasv2tax_order_information_order_origin.rb +5 -5
  249. data/lib/cybersource_rest_client/models/vasv2tax_order_information_ship_to.rb +1 -1
  250. data/lib/cybersource_rest_client/models/vasv2tax_tax_information.rb +3 -3
  251. data/lib/cybersource_rest_client.rb +112 -13
  252. metadata +114 -15
  253. data/lib/cybersource_rest_client/api/key_generation_api.rb +0 -96
  254. data/lib/cybersource_rest_client/api/tokenization_api.rb +0 -89
@@ -0,0 +1,218 @@
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
+ # Plan list.
17
+ class InlineResponse200Plans
18
+ attr_accessor :_links
19
+
20
+ # An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response.
21
+ attr_accessor :id
22
+
23
+ attr_accessor :plan_information
24
+
25
+ attr_accessor :order_information
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'_links' => :'_links',
31
+ :'id' => :'id',
32
+ :'plan_information' => :'planInformation',
33
+ :'order_information' => :'orderInformation'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.swagger_types
39
+ {
40
+ :'_links' => :'PtsV2IncrementalAuthorizationPatch201ResponseLinks',
41
+ :'id' => :'String',
42
+ :'plan_information' => :'InlineResponse200PlanInformation',
43
+ :'order_information' => :'InlineResponse200OrderInformation'
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?(:'id')
60
+ self.id = attributes[:'id']
61
+ end
62
+
63
+ if attributes.has_key?(:'planInformation')
64
+ self.plan_information = attributes[:'planInformation']
65
+ end
66
+
67
+ if attributes.has_key?(:'orderInformation')
68
+ self.order_information = attributes[:'orderInformation']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ true
83
+ end
84
+
85
+ # Custom attribute writer method with validation
86
+ # @param [Object] id Value to be assigned
87
+ def id=(id)
88
+ @id = id
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] Object to be compared
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ _links == o._links &&
97
+ id == o.id &&
98
+ plan_information == o.plan_information &&
99
+ order_information == o.order_information
100
+ end
101
+
102
+ # @see the `==` method
103
+ # @param [Object] Object to be compared
104
+ def eql?(o)
105
+ self == o
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Fixnum] Hash code
110
+ def hash
111
+ [_links, id, plan_information, order_information].hash
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.swagger_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ DateTime.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :BOOLEAN
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ temp_model = CyberSource.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ next if value.nil?
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+ end
218
+ end
@@ -0,0 +1,228 @@
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 InlineResponse201
17
+ attr_accessor :_links
18
+
19
+ # An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response.
20
+ attr_accessor :id
21
+
22
+ # 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.
23
+ attr_accessor :submit_time_utc
24
+
25
+ # The status of the submitted transaction. Possible values: - COMPLETED
26
+ attr_accessor :status
27
+
28
+ attr_accessor :plan_information
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'_links' => :'_links',
34
+ :'id' => :'id',
35
+ :'submit_time_utc' => :'submitTimeUtc',
36
+ :'status' => :'status',
37
+ :'plan_information' => :'planInformation'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.swagger_types
43
+ {
44
+ :'_links' => :'PtsV2IncrementalAuthorizationPatch201ResponseLinks',
45
+ :'id' => :'String',
46
+ :'submit_time_utc' => :'String',
47
+ :'status' => :'String',
48
+ :'plan_information' => :'InlineResponse201PlanInformation'
49
+ }
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ return unless attributes.is_a?(Hash)
56
+
57
+ # convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
59
+
60
+ if attributes.has_key?(:'_links')
61
+ self._links = attributes[:'_links']
62
+ end
63
+
64
+ if attributes.has_key?(:'id')
65
+ self.id = attributes[:'id']
66
+ end
67
+
68
+ if attributes.has_key?(:'submitTimeUtc')
69
+ self.submit_time_utc = attributes[:'submitTimeUtc']
70
+ end
71
+
72
+ if attributes.has_key?(:'status')
73
+ self.status = attributes[:'status']
74
+ end
75
+
76
+ if attributes.has_key?(:'planInformation')
77
+ self.plan_information = attributes[:'planInformation']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] id Value to be assigned
96
+ def id=(id)
97
+ @id = id
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ _links == o._links &&
106
+ id == o.id &&
107
+ submit_time_utc == o.submit_time_utc &&
108
+ status == o.status &&
109
+ plan_information == o.plan_information
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Fixnum] Hash code
120
+ def hash
121
+ [_links, id, submit_time_utc, status, plan_information].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.swagger_types.each_pair do |key, type|
130
+ if type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
134
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
135
+ end
136
+ elsif !attributes[self.class.attribute_map[key]].nil?
137
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
138
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
139
+ end
140
+
141
+ self
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def _deserialize(type, value)
149
+ case type.to_sym
150
+ when :DateTime
151
+ DateTime.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :BOOLEAN
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ temp_model = CyberSource.const_get(type).new
182
+ temp_model.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ next if value.nil?
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+ end
228
+ end
@@ -0,0 +1,228 @@
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 InlineResponse2011
17
+ attr_accessor :_links
18
+
19
+ # An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response.
20
+ attr_accessor :id
21
+
22
+ # 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.
23
+ attr_accessor :submit_time_utc
24
+
25
+ # The status of the submitted transaction. Possible values: - COMPLETED - PENDING_REVIEW - DECLINED - INVALID_REQUEST
26
+ attr_accessor :status
27
+
28
+ attr_accessor :subscription_information
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'_links' => :'_links',
34
+ :'id' => :'id',
35
+ :'submit_time_utc' => :'submitTimeUtc',
36
+ :'status' => :'status',
37
+ :'subscription_information' => :'subscriptionInformation'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.swagger_types
43
+ {
44
+ :'_links' => :'InlineResponse2011Links',
45
+ :'id' => :'String',
46
+ :'submit_time_utc' => :'String',
47
+ :'status' => :'String',
48
+ :'subscription_information' => :'InlineResponse2011SubscriptionInformation'
49
+ }
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ return unless attributes.is_a?(Hash)
56
+
57
+ # convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
59
+
60
+ if attributes.has_key?(:'_links')
61
+ self._links = attributes[:'_links']
62
+ end
63
+
64
+ if attributes.has_key?(:'id')
65
+ self.id = attributes[:'id']
66
+ end
67
+
68
+ if attributes.has_key?(:'submitTimeUtc')
69
+ self.submit_time_utc = attributes[:'submitTimeUtc']
70
+ end
71
+
72
+ if attributes.has_key?(:'status')
73
+ self.status = attributes[:'status']
74
+ end
75
+
76
+ if attributes.has_key?(:'subscriptionInformation')
77
+ self.subscription_information = attributes[:'subscriptionInformation']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] id Value to be assigned
96
+ def id=(id)
97
+ @id = id
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ _links == o._links &&
106
+ id == o.id &&
107
+ submit_time_utc == o.submit_time_utc &&
108
+ status == o.status &&
109
+ subscription_information == o.subscription_information
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Fixnum] Hash code
120
+ def hash
121
+ [_links, id, submit_time_utc, status, subscription_information].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.swagger_types.each_pair do |key, type|
130
+ if type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
134
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
135
+ end
136
+ elsif !attributes[self.class.attribute_map[key]].nil?
137
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
138
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
139
+ end
140
+
141
+ self
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def _deserialize(type, value)
149
+ case type.to_sym
150
+ when :DateTime
151
+ DateTime.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :BOOLEAN
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ temp_model = CyberSource.const_get(type).new
182
+ temp_model.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ next if value.nil?
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+ end
228
+ end