cybersource_rest_client 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (264) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client/api/download_dtd_api.rb +88 -0
  3. data/lib/cybersource_rest_client/api/download_xsd_api.rb +88 -0
  4. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +2 -2
  5. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +154 -0
  6. data/lib/cybersource_rest_client/api/reversal_api.rb +0 -65
  7. data/lib/cybersource_rest_client/api/search_transactions_api.rb +2 -2
  8. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +2 -76
  9. data/lib/cybersource_rest_client/api/user_management_api.rb +2 -2
  10. data/lib/cybersource_rest_client/api/void_api.rb +0 -65
  11. data/lib/cybersource_rest_client/models/{mit_void_request.rb → authorization_options.rb} +8 -8
  12. data/lib/cybersource_rest_client/models/bill_to.rb +467 -0
  13. data/lib/cybersource_rest_client/models/buyer_information.rb +278 -0
  14. data/lib/cybersource_rest_client/models/card_info.rb +224 -0
  15. data/lib/cybersource_rest_client/models/check_payer_auth_enrollment_request.rb +275 -0
  16. data/lib/cybersource_rest_client/models/der_public_key.rb +205 -0
  17. data/lib/cybersource_rest_client/models/detail.rb +194 -0
  18. data/lib/cybersource_rest_client/models/embedded_instrument_identifier.rb +319 -0
  19. data/lib/cybersource_rest_client/models/error.rb +202 -0
  20. data/lib/cybersource_rest_client/models/error_bean.rb +247 -0
  21. data/lib/cybersource_rest_client/models/error_field_bean.rb +205 -0
  22. data/lib/cybersource_rest_client/models/{inline_response_200.rb → error_links.rb} +24 -22
  23. data/lib/cybersource_rest_client/models/error_response.rb +174 -0
  24. data/lib/cybersource_rest_client/models/error_response_with_hal.rb +174 -0
  25. data/lib/cybersource_rest_client/models/existing_instrument_identifier_id.rb +175 -0
  26. data/lib/cybersource_rest_client/models/file_bean.rb +202 -0
  27. data/lib/cybersource_rest_client/models/file_detail.rb +278 -0
  28. data/lib/cybersource_rest_client/models/file_details_response.rb +194 -0
  29. data/lib/cybersource_rest_client/models/initiator.rb +183 -0
  30. data/lib/cybersource_rest_client/models/instrument_identifier.rb +295 -0
  31. data/lib/cybersource_rest_client/models/instrument_identifier_bank_account.rb +242 -0
  32. data/lib/cybersource_rest_client/models/instrument_identifier_card.rb +208 -0
  33. data/lib/cybersource_rest_client/models/instrument_identifier_enrollable_card.rb +202 -0
  34. data/lib/cybersource_rest_client/models/instrument_identifier_processing_information.rb +183 -0
  35. data/lib/cybersource_rest_client/models/instrument_identifier_update.rb +183 -0
  36. data/lib/cybersource_rest_client/models/json_web_key.rb +225 -0
  37. data/lib/cybersource_rest_client/models/key_parameters.rb +189 -0
  38. data/lib/cybersource_rest_client/models/key_result.rb +202 -0
  39. data/lib/cybersource_rest_client/models/link.rb +183 -0
  40. data/lib/cybersource_rest_client/models/links.rb +201 -0
  41. data/lib/cybersource_rest_client/models/merchant_information.rb +183 -0
  42. data/lib/cybersource_rest_client/models/merchant_initiated_transaction.rb +199 -0
  43. data/lib/cybersource_rest_client/models/metadata.rb +184 -0
  44. data/lib/cybersource_rest_client/models/model_409_link.rb +183 -0
  45. data/lib/cybersource_rest_client/models/model_409_links.rb +183 -0
  46. data/lib/cybersource_rest_client/models/payment_instrument.rb +331 -0
  47. data/lib/cybersource_rest_client/models/payment_instrument_bank_account.rb +218 -0
  48. data/lib/cybersource_rest_client/models/payment_instrument_card.rb +403 -0
  49. data/lib/cybersource_rest_client/models/payment_instrument_for_instrument_identifier_links.rb +219 -0
  50. data/lib/cybersource_rest_client/models/payment_instruments_array.rb +175 -0
  51. data/lib/cybersource_rest_client/models/payment_instruments_for_instrument_identifier.rb +276 -0
  52. data/lib/cybersource_rest_client/models/personal_identification.rb +237 -0
  53. data/lib/cybersource_rest_client/models/personal_identification_array.rb +174 -0
  54. data/lib/cybersource_rest_client/models/pi_for_ii_link_first.rb +184 -0
  55. data/lib/cybersource_rest_client/models/pi_for_ii_link_last.rb +184 -0
  56. data/lib/cybersource_rest_client/models/pi_for_ii_link_next.rb +184 -0
  57. data/lib/cybersource_rest_client/models/pi_for_ii_link_prev.rb +184 -0
  58. data/lib/cybersource_rest_client/models/pi_for_ii_link_self.rb +184 -0
  59. data/lib/cybersource_rest_client/models/processing_information.rb +195 -0
  60. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_credit_amount_details.rb +1 -1
  61. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_processing_information_bank_transfer_options.rb +1 -1
  62. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details.rb +1 -1
  63. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_client_reference_information.rb +2 -2
  64. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb +3 -3
  65. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +15 -15
  66. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_issuer_information.rb +2 -2
  67. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_amount_details.rb +1 -1
  68. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_invoice_details.rb +1 -1
  69. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_account_features.rb +13 -13
  70. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_bank_account.rb +1 -1
  71. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_card.rb +1 -1
  72. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +7 -7
  73. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information.rb +1 -1
  74. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv.rb +1 -1
  75. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information_bank_transfer_options.rb +2 -2
  76. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +9 -9
  77. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_ach_verification.rb +2 -2
  78. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_card_verification.rb +2 -2
  79. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_consumer_authentication_response.rb +2 -2
  80. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_customer.rb +1 -1
  81. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results.rb +5 -5
  82. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb +2 -2
  83. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_routing.rb +3 -3
  84. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +1 -1
  85. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_refund_amount_details.rb +1 -1
  86. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb +2 -2
  87. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +4 -4
  88. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_reversal_amount_details.rb +3 -3
  89. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb +2 -2
  90. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_void_amount_details.rb +1 -1
  91. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response.rb +0 -6
  92. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information_merchant_descriptor.rb +3 -3
  93. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_order_information_amount_details.rb +2 -2
  94. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information.rb +1 -1
  95. data/lib/cybersource_rest_client/models/pts_v2_payouts_post400_response.rb +0 -24
  96. data/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information.rb +1 -1
  97. data/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information_emv.rb +2 -2
  98. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +4 -4
  99. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information_bank_transfer_options.rb +3 -3
  100. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information.rb +1 -1
  101. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +2 -2
  102. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information.rb +4 -4
  103. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb +3 -3
  104. data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb +2 -2
  105. data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information_partner.rb +2 -2
  106. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +1 -1
  107. data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +3 -3
  108. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +10 -10
  109. data/lib/cybersource_rest_client/models/ptsv2payments_issuer_information.rb +1 -1
  110. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_defined_information.rb +2 -2
  111. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +7 -7
  112. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +8 -8
  113. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_initiated_transaction.rb +1 -1
  114. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +7 -7
  115. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_amex_additional_amounts.rb +1 -1
  116. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details.rb +9 -9
  117. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +62 -12
  118. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to_company.rb +3 -3
  119. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +8 -8
  120. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +6 -6
  121. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.rb +2 -17
  122. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +8 -8
  123. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_customer.rb +1 -1
  124. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_fluid_data.rb +3 -3
  125. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +7 -7
  126. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +9 -9
  127. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb +3 -3
  128. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +4 -4
  129. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +8 -8
  130. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.rb +2 -2
  131. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_bank_transfer_options.rb +6 -6
  132. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb +2 -2
  133. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_recurring_options.rb +2 -2
  134. data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +3 -3
  135. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information.rb +1 -1
  136. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +2 -2
  137. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_buyer_information.rb +1 -1
  138. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +18 -18
  139. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_merchant_information.rb +4 -4
  140. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +6 -6
  141. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to.rb +10 -10
  142. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_invoice_details.rb +6 -6
  143. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information.rb +1 -1
  144. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb +1 -1
  145. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +4 -4
  146. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_authorization_options.rb +3 -3
  147. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_capture_options.rb +2 -2
  148. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_merchant_information.rb +4 -4
  149. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb +6 -6
  150. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +4 -4
  151. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb +4 -4
  152. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_recurring_options.rb +1 -1
  153. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_information.rb +1 -1
  154. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_information_partner.rb +2 -2
  155. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items.rb +2 -2
  156. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_processing_information.rb +4 -4
  157. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information.rb +1 -1
  158. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information_amount_details.rb +2 -2
  159. data/lib/cybersource_rest_client/models/ptsv2payouts_client_reference_information.rb +1 -1
  160. data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information.rb +2 -26
  161. data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.rb +6 -6
  162. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details.rb +2 -2
  163. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information_bill_to.rb +10 -10
  164. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +5 -5
  165. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +1 -1
  166. data/lib/cybersource_rest_client/models/{mit_reversal_request.rb → request.rb} +19 -28
  167. data/lib/cybersource_rest_client/models/response_status.rb +225 -0
  168. data/lib/cybersource_rest_client/models/response_status_details.rb +194 -0
  169. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response.rb +285 -0
  170. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +324 -0
  171. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response.rb +294 -0
  172. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_consumer_authentication_information.rb +429 -0
  173. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information.rb +183 -0
  174. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information_amount_details.rb +199 -0
  175. data/lib/cybersource_rest_client/models/risk_v1_authentications_post400_response.rb +225 -0
  176. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response.rb +10 -1
  177. data/lib/cybersource_rest_client/models/{risk_v1_decisions_post201_response_risk_information_payment_information.rb → risk_v1_decisions_post201_response_payment_information.rb} +6 -6
  178. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information.rb +15 -15
  179. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_info_codes.rb +8 -8
  180. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_ip_address.rb +34 -34
  181. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_profile.rb +1 -1
  182. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_providers_provider_name.rb +1 -1
  183. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_score.rb +2 -2
  184. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_travel.rb +210 -0
  185. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_travel_actual_final_destination.rb +274 -0
  186. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_travel_first_departure.rb +274 -0
  187. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_travel_first_destination.rb +274 -0
  188. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_travel_last_destination.rb +274 -0
  189. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_velocity.rb +1 -0
  190. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_velocity_morphing.rb +3 -3
  191. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +214 -0
  192. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information.rb +194 -0
  193. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information_line_items.rb +267 -0
  194. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information.rb +192 -0
  195. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +264 -0
  196. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +264 -0
  197. data/lib/cybersource_rest_client/models/riskv1authentications_buyer_information.rb +196 -0
  198. data/lib/cybersource_rest_client/models/riskv1authentications_client_reference_information.rb +208 -0
  199. data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information.rb +552 -0
  200. data/lib/cybersource_rest_client/models/riskv1authentications_device_information.rb +285 -0
  201. data/lib/cybersource_rest_client/models/riskv1authentications_device_information_raw_data.rb +209 -0
  202. data/lib/cybersource_rest_client/models/{inline_response_200_payment_batch_summaries.rb → riskv1authentications_merchant_information.rb} +18 -101
  203. data/lib/cybersource_rest_client/models/riskv1authentications_order_information.rb +258 -0
  204. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_bill_to.rb +496 -0
  205. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_line_items.rb +371 -0
  206. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_ship_to.rb +434 -0
  207. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information.rb +192 -0
  208. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_card.rb +291 -0
  209. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +291 -0
  210. data/lib/cybersource_rest_client/models/riskv1authentications_recurring_payment_information.rb +235 -0
  211. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information.rb +183 -0
  212. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history.rb +262 -0
  213. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_account_history.rb +209 -0
  214. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_customer_account.rb +279 -0
  215. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information.rb +206 -0
  216. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_legs.rb +259 -0
  217. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_passengers.rb +224 -0
  218. data/lib/cybersource_rest_client/models/riskv1decisions_buyer_information.rb +28 -3
  219. data/lib/cybersource_rest_client/models/riskv1decisions_card_verification.rb +1 -1
  220. data/lib/cybersource_rest_client/models/riskv1decisions_client_reference_information.rb +1 -1
  221. data/lib/cybersource_rest_client/models/riskv1decisions_device_information.rb +5 -5
  222. data/lib/cybersource_rest_client/models/riskv1decisions_merchant_defined_information.rb +1 -1
  223. data/lib/cybersource_rest_client/models/riskv1decisions_order_information.rb +2 -17
  224. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_amount_details.rb +2 -2
  225. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_bill_to.rb +10 -10
  226. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_line_items.rb +5 -22
  227. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_passenger.rb +30 -5
  228. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_shipping_details.rb +2 -17
  229. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +4 -4
  230. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +3 -3
  231. data/lib/cybersource_rest_client/models/riskv1decisions_risk_information.rb +29 -4
  232. data/lib/cybersource_rest_client/models/riskv1decisions_risk_information_profile.rb +1 -1
  233. data/lib/cybersource_rest_client/models/riskv1decisions_travel_information.rb +26 -1
  234. data/lib/cybersource_rest_client/models/riskv1decisions_travel_information_legs.rb +31 -6
  235. data/lib/cybersource_rest_client/models/self_link_bean.rb +192 -0
  236. data/lib/cybersource_rest_client/models/tokenize_parameters.rb +198 -0
  237. data/lib/cybersource_rest_client/models/tokenize_request.rb +1 -1
  238. data/lib/cybersource_rest_client/models/tokenize_result.rb +255 -0
  239. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information_applications.rb +6 -6
  240. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_buyer_information.rb +2 -2
  241. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb +1 -1
  242. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_device_information.rb +3 -3
  243. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor.rb +1 -1
  244. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +2 -2
  245. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_bill_to.rb +9 -9
  246. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_line_items.rb +1 -1
  247. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_shipping_details.rb +2 -17
  248. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_account_features.rb +1 -1
  249. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +5 -5
  250. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_point_of_sale_information.rb +2 -2
  251. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +1 -1
  252. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options.rb +1 -1
  253. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +3 -3
  254. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results.rb +4 -4
  255. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_buyer_information.rb +1 -1
  256. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb +1 -1
  257. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_device_information.rb +1 -1
  258. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to.rb +5 -5
  259. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +2 -2
  260. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb +2 -2
  261. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb +1 -1
  262. data/lib/cybersource_rest_client.rb +96 -8
  263. metadata +100 -8
  264. data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +0 -135
@@ -0,0 +1,175 @@
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
+ # Array of Payment Instruments returned for the supplied Instrument Identifier.
17
+ class PaymentInstrumentsArray
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ }
22
+ end
23
+
24
+ # Attribute type mapping.
25
+ def self.swagger_types
26
+ {
27
+ }
28
+ end
29
+
30
+ # Initializes the object
31
+ # @param [Hash] attributes Model attributes in the form of hash
32
+ def initialize(attributes = {})
33
+ return unless attributes.is_a?(Hash)
34
+
35
+ # convert string to symbol for hash key
36
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
37
+ end
38
+
39
+ # Show invalid properties with the reasons. Usually used together with valid?
40
+ # @return Array for valid properties with the reasons
41
+ def list_invalid_properties
42
+ invalid_properties = Array.new
43
+ invalid_properties
44
+ end
45
+
46
+ # Check to see if the all the properties in the model are valid
47
+ # @return true if the model is valid
48
+ def valid?
49
+ true
50
+ end
51
+
52
+ # Checks equality by comparing each attribute.
53
+ # @param [Object] Object to be compared
54
+ def ==(o)
55
+ return true if self.equal?(o)
56
+ self.class == o.class
57
+ end
58
+
59
+ # @see the `==` method
60
+ # @param [Object] Object to be compared
61
+ def eql?(o)
62
+ self == o
63
+ end
64
+
65
+ # Calculates hash code according to all attributes.
66
+ # @return [Fixnum] Hash code
67
+ def hash
68
+ [].hash
69
+ end
70
+
71
+ # Builds the object from hash
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ # @return [Object] Returns the model itself
74
+ def build_from_hash(attributes)
75
+ return nil unless attributes.is_a?(Hash)
76
+ self.class.swagger_types.each_pair do |key, type|
77
+ if type =~ /\AArray<(.*)>/i
78
+ # check to ensure the input is an array given that the the attribute
79
+ # is documented as an array but the input is not
80
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
81
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
82
+ end
83
+ elsif !attributes[self.class.attribute_map[key]].nil?
84
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
85
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
86
+ end
87
+
88
+ self
89
+ end
90
+
91
+ # Deserializes the data based on type
92
+ # @param string type Data type
93
+ # @param string value Value to be deserialized
94
+ # @return [Object] Deserialized data
95
+ def _deserialize(type, value)
96
+ case type.to_sym
97
+ when :DateTime
98
+ DateTime.parse(value)
99
+ when :Date
100
+ Date.parse(value)
101
+ when :String
102
+ value.to_s
103
+ when :Integer
104
+ value.to_i
105
+ when :Float
106
+ value.to_f
107
+ when :BOOLEAN
108
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
109
+ true
110
+ else
111
+ false
112
+ end
113
+ when :Object
114
+ # generic object (usually a Hash), return directly
115
+ value
116
+ when /\AArray<(?<inner_type>.+)>\z/
117
+ inner_type = Regexp.last_match[:inner_type]
118
+ value.map { |v| _deserialize(inner_type, v) }
119
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
120
+ k_type = Regexp.last_match[:k_type]
121
+ v_type = Regexp.last_match[:v_type]
122
+ {}.tap do |hash|
123
+ value.each do |k, v|
124
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
125
+ end
126
+ end
127
+ else # model
128
+ temp_model = CyberSource.const_get(type).new
129
+ temp_model.build_from_hash(value)
130
+ end
131
+ end
132
+
133
+ # Returns the string representation of the object
134
+ # @return [String] String presentation of the object
135
+ def to_s
136
+ to_hash.to_s
137
+ end
138
+
139
+ # to_body is an alias to to_hash (backward compatibility)
140
+ # @return [Hash] Returns the object in the form of hash
141
+ def to_body
142
+ to_hash
143
+ end
144
+
145
+ # Returns the object in the form of hash
146
+ # @return [Hash] Returns the object in the form of hash
147
+ def to_hash
148
+ hash = {}
149
+ self.class.attribute_map.each_pair do |attr, param|
150
+ value = self.send(attr)
151
+ next if value.nil?
152
+ hash[param] = _to_hash(value)
153
+ end
154
+ hash
155
+ end
156
+
157
+ # Outputs non-array value in the form of hash
158
+ # For object, use to_hash. Otherwise, just return the value
159
+ # @param [Object] value Any valid value
160
+ # @return [Hash] Returns the value in the form of hash
161
+ def _to_hash(value)
162
+ if value.is_a?(Array)
163
+ value.compact.map { |v| _to_hash(v) }
164
+ elsif value.is_a?(Hash)
165
+ {}.tap do |hash|
166
+ value.each { |k, v| hash[k] = _to_hash(v) }
167
+ end
168
+ elsif value.respond_to? :to_hash
169
+ value.to_hash
170
+ else
171
+ value
172
+ end
173
+ end
174
+ end
175
+ end
@@ -0,0 +1,276 @@
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 PaymentInstrumentsForInstrumentIdentifier
17
+ attr_accessor :_links
18
+
19
+ # Shows the response is a collection of objects.
20
+ attr_accessor :object
21
+
22
+ # The offset parameter supplied in the request.
23
+ attr_accessor :offset
24
+
25
+ # The limit parameter supplied in the request.
26
+ attr_accessor :limit
27
+
28
+ # The number of Payment Instruments returned in the array.
29
+ attr_accessor :count
30
+
31
+ # The total number of Payment Instruments associated with the Instrument Identifier in the zero-based dataset.
32
+ attr_accessor :total
33
+
34
+ attr_accessor :_embedded
35
+
36
+ class EnumAttributeValidator
37
+ attr_reader :datatype
38
+ attr_reader :allowable_values
39
+
40
+ def initialize(datatype, allowable_values)
41
+ @allowable_values = allowable_values.map do |value|
42
+ case datatype.to_s
43
+ when /Integer/i
44
+ value.to_i
45
+ when /Float/i
46
+ value.to_f
47
+ else
48
+ value
49
+ end
50
+ end
51
+ end
52
+
53
+ def valid?(value)
54
+ !value || allowable_values.include?(value)
55
+ end
56
+ end
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'_links' => :'_links',
62
+ :'object' => :'object',
63
+ :'offset' => :'offset',
64
+ :'limit' => :'limit',
65
+ :'count' => :'count',
66
+ :'total' => :'total',
67
+ :'_embedded' => :'_embedded'
68
+ }
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.swagger_types
73
+ {
74
+ :'_links' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseLinks',
75
+ :'object' => :'String',
76
+ :'offset' => :'String',
77
+ :'limit' => :'String',
78
+ :'count' => :'String',
79
+ :'total' => :'String',
80
+ :'_embedded' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseEmbedded'
81
+ }
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ return unless attributes.is_a?(Hash)
88
+
89
+ # convert string to symbol for hash key
90
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
91
+
92
+ if attributes.has_key?(:'_links')
93
+ self._links = attributes[:'_links']
94
+ end
95
+
96
+ if attributes.has_key?(:'object')
97
+ self.object = attributes[:'object']
98
+ end
99
+
100
+ if attributes.has_key?(:'offset')
101
+ self.offset = attributes[:'offset']
102
+ end
103
+
104
+ if attributes.has_key?(:'limit')
105
+ self.limit = attributes[:'limit']
106
+ end
107
+
108
+ if attributes.has_key?(:'count')
109
+ self.count = attributes[:'count']
110
+ end
111
+
112
+ if attributes.has_key?(:'total')
113
+ self.total = attributes[:'total']
114
+ end
115
+
116
+ if attributes.has_key?(:'_embedded')
117
+ self._embedded = attributes[:'_embedded']
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ invalid_properties = Array.new
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ object_validator = EnumAttributeValidator.new('String', ['collection'])
132
+ return false unless object_validator.valid?(@object)
133
+ true
134
+ end
135
+
136
+ # Custom attribute writer method checking allowed values (enum).
137
+ # @param [Object] object Object to be assigned
138
+ def object=(object)
139
+ validator = EnumAttributeValidator.new('String', ['collection'])
140
+ unless validator.valid?(object)
141
+ fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.'
142
+ end
143
+ @object = object
144
+ end
145
+
146
+ # Checks equality by comparing each attribute.
147
+ # @param [Object] Object to be compared
148
+ def ==(o)
149
+ return true if self.equal?(o)
150
+ self.class == o.class &&
151
+ _links == o._links &&
152
+ object == o.object &&
153
+ offset == o.offset &&
154
+ limit == o.limit &&
155
+ count == o.count &&
156
+ total == o.total &&
157
+ _embedded == o._embedded
158
+ end
159
+
160
+ # @see the `==` method
161
+ # @param [Object] Object to be compared
162
+ def eql?(o)
163
+ self == o
164
+ end
165
+
166
+ # Calculates hash code according to all attributes.
167
+ # @return [Fixnum] Hash code
168
+ def hash
169
+ [_links, object, offset, limit, count, total, _embedded].hash
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ self.class.swagger_types.each_pair do |key, type|
178
+ if type =~ /\AArray<(.*)>/i
179
+ # check to ensure the input is an array given that the the attribute
180
+ # is documented as an array but the input is not
181
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
182
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
183
+ end
184
+ elsif !attributes[self.class.attribute_map[key]].nil?
185
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
186
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
187
+ end
188
+
189
+ self
190
+ end
191
+
192
+ # Deserializes the data based on type
193
+ # @param string type Data type
194
+ # @param string value Value to be deserialized
195
+ # @return [Object] Deserialized data
196
+ def _deserialize(type, value)
197
+ case type.to_sym
198
+ when :DateTime
199
+ DateTime.parse(value)
200
+ when :Date
201
+ Date.parse(value)
202
+ when :String
203
+ value.to_s
204
+ when :Integer
205
+ value.to_i
206
+ when :Float
207
+ value.to_f
208
+ when :BOOLEAN
209
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
+ true
211
+ else
212
+ false
213
+ end
214
+ when :Object
215
+ # generic object (usually a Hash), return directly
216
+ value
217
+ when /\AArray<(?<inner_type>.+)>\z/
218
+ inner_type = Regexp.last_match[:inner_type]
219
+ value.map { |v| _deserialize(inner_type, v) }
220
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
+ k_type = Regexp.last_match[:k_type]
222
+ v_type = Regexp.last_match[:v_type]
223
+ {}.tap do |hash|
224
+ value.each do |k, v|
225
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
226
+ end
227
+ end
228
+ else # model
229
+ temp_model = CyberSource.const_get(type).new
230
+ temp_model.build_from_hash(value)
231
+ end
232
+ end
233
+
234
+ # Returns the string representation of the object
235
+ # @return [String] String presentation of the object
236
+ def to_s
237
+ to_hash.to_s
238
+ end
239
+
240
+ # to_body is an alias to to_hash (backward compatibility)
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_body
243
+ to_hash
244
+ end
245
+
246
+ # Returns the object in the form of hash
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_hash
249
+ hash = {}
250
+ self.class.attribute_map.each_pair do |attr, param|
251
+ value = self.send(attr)
252
+ next if value.nil?
253
+ hash[param] = _to_hash(value)
254
+ end
255
+ hash
256
+ end
257
+
258
+ # Outputs non-array value in the form of hash
259
+ # For object, use to_hash. Otherwise, just return the value
260
+ # @param [Object] value Any valid value
261
+ # @return [Hash] Returns the value in the form of hash
262
+ def _to_hash(value)
263
+ if value.is_a?(Array)
264
+ value.compact.map { |v| _to_hash(v) }
265
+ elsif value.is_a?(Hash)
266
+ {}.tap do |hash|
267
+ value.each { |k, v| hash[k] = _to_hash(v) }
268
+ end
269
+ elsif value.respond_to? :to_hash
270
+ value.to_hash
271
+ else
272
+ value
273
+ end
274
+ end
275
+ end
276
+ end
@@ -0,0 +1,237 @@
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 PersonalIdentification
17
+ # Customer's identification number. **Important**: Contact your TeleCheck representative to learn whether this field is required or optional.
18
+ attr_accessor :id
19
+
20
+ # Type of personal identification. **Important**: Contact your TeleCheck representative to learn whether this field is required or optional.
21
+ attr_accessor :type
22
+
23
+ attr_accessor :issued_by
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'id' => :'id',
51
+ :'type' => :'type',
52
+ :'issued_by' => :'issuedBy'
53
+ }
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.swagger_types
58
+ {
59
+ :'id' => :'String',
60
+ :'type' => :'String',
61
+ :'issued_by' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseEmbeddedBuyerInformationIssuedBy'
62
+ }
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ return unless attributes.is_a?(Hash)
69
+
70
+ # convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
72
+
73
+ if attributes.has_key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.has_key?(:'type')
78
+ self.type = attributes[:'type']
79
+ end
80
+
81
+ if attributes.has_key?(:'issuedBy')
82
+ self.issued_by = attributes[:'issuedBy']
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ type_validator = EnumAttributeValidator.new('String', ['driver license'])
97
+ return false unless type_validator.valid?(@type)
98
+ true
99
+ end
100
+
101
+ # Custom attribute writer method checking allowed values (enum).
102
+ # @param [Object] type Object to be assigned
103
+ def type=(type)
104
+ validator = EnumAttributeValidator.new('String', ['driver license'])
105
+ unless validator.valid?(type)
106
+ fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
107
+ end
108
+ @type = type
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ id == o.id &&
117
+ type == o.type &&
118
+ issued_by == o.issued_by
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Fixnum] Hash code
129
+ def hash
130
+ [id, type, issued_by].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ self.class.swagger_types.each_pair do |key, type|
139
+ if type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
143
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
+ end
145
+ elsif !attributes[self.class.attribute_map[key]].nil?
146
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
147
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
148
+ end
149
+
150
+ self
151
+ end
152
+
153
+ # Deserializes the data based on type
154
+ # @param string type Data type
155
+ # @param string value Value to be deserialized
156
+ # @return [Object] Deserialized data
157
+ def _deserialize(type, value)
158
+ case type.to_sym
159
+ when :DateTime
160
+ DateTime.parse(value)
161
+ when :Date
162
+ Date.parse(value)
163
+ when :String
164
+ value.to_s
165
+ when :Integer
166
+ value.to_i
167
+ when :Float
168
+ value.to_f
169
+ when :BOOLEAN
170
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
+ true
172
+ else
173
+ false
174
+ end
175
+ when :Object
176
+ # generic object (usually a Hash), return directly
177
+ value
178
+ when /\AArray<(?<inner_type>.+)>\z/
179
+ inner_type = Regexp.last_match[:inner_type]
180
+ value.map { |v| _deserialize(inner_type, v) }
181
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
182
+ k_type = Regexp.last_match[:k_type]
183
+ v_type = Regexp.last_match[:v_type]
184
+ {}.tap do |hash|
185
+ value.each do |k, v|
186
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
187
+ end
188
+ end
189
+ else # model
190
+ temp_model = CyberSource.const_get(type).new
191
+ temp_model.build_from_hash(value)
192
+ end
193
+ end
194
+
195
+ # Returns the string representation of the object
196
+ # @return [String] String presentation of the object
197
+ def to_s
198
+ to_hash.to_s
199
+ end
200
+
201
+ # to_body is an alias to to_hash (backward compatibility)
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_body
204
+ to_hash
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ next if value.nil?
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+ end
237
+ end