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,264 @@
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 Riskv1authenticationresultsPaymentInformationCard
17
+ # Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
18
+ attr_accessor :type
19
+
20
+ # Two-digit month in which the payment card expires. Format: `MM`. Valid values: `01` through `12`. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`01` through `12`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (_type_=039), if there is no expiration date on the card, use `12`. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. For processor-specific information, see the `customer_cc_expmo` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
21
+ attr_accessor :expiration_month
22
+
23
+ # Four-digit year in which the credit card expires. Format: `YYYY`. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`1900` through `3000`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (**_type_**`=039`), if there is no expiration date on the card, use `2021`. #### FDC Nashville Global and FDMS South You can send in 2 digits or 4 digits. If you send in 2 digits, they must be the last 2 digits of the year. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. For processor-specific information, see the `customer_cc_expyr` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
24
+ attr_accessor :expiration_year
25
+
26
+ # The customer’s payment card number, also knows as the Primary Account Nunmber (PAN). You can also use this field for encoded account numbers. For processor-specific information, see the `customer_cc_number` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
27
+ attr_accessor :number
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'type' => :'type',
33
+ :'expiration_month' => :'expirationMonth',
34
+ :'expiration_year' => :'expirationYear',
35
+ :'number' => :'number'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'type' => :'String',
43
+ :'expiration_month' => :'String',
44
+ :'expiration_year' => :'String',
45
+ :'number' => :'String'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'type')
58
+ self.type = attributes[:'type']
59
+ end
60
+
61
+ if attributes.has_key?(:'expirationMonth')
62
+ self.expiration_month = attributes[:'expirationMonth']
63
+ end
64
+
65
+ if attributes.has_key?(:'expirationYear')
66
+ self.expiration_year = attributes[:'expirationYear']
67
+ end
68
+
69
+ if attributes.has_key?(:'number')
70
+ self.number = attributes[:'number']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ if @type.nil?
79
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
80
+ end
81
+
82
+ if !@expiration_month.nil? && @expiration_month.to_s.length > 2
83
+ invalid_properties.push('invalid value for "expiration_month", the character length must be smaller than or equal to 2.')
84
+ end
85
+
86
+ if !@expiration_year.nil? && @expiration_year.to_s.length > 4
87
+ invalid_properties.push('invalid value for "expiration_year", the character length must be smaller than or equal to 4.')
88
+ end
89
+
90
+ if !@number.nil? && @number.to_s.length > 20
91
+ invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.')
92
+ end
93
+
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ return false if @type.nil?
101
+ return false if !@expiration_month.nil? && @expiration_month.to_s.length > 2
102
+ return false if !@expiration_year.nil? && @expiration_year.to_s.length > 4
103
+ return false if !@number.nil? && @number.to_s.length > 20
104
+ true
105
+ end
106
+
107
+ # Custom attribute writer method with validation
108
+ # @param [Object] expiration_month Value to be assigned
109
+ def expiration_month=(expiration_month)
110
+ if !expiration_month.nil? && expiration_month.to_s.length > 2
111
+ fail ArgumentError, 'invalid value for "expiration_month", the character length must be smaller than or equal to 2.'
112
+ end
113
+
114
+ @expiration_month = expiration_month
115
+ end
116
+
117
+ # Custom attribute writer method with validation
118
+ # @param [Object] expiration_year Value to be assigned
119
+ def expiration_year=(expiration_year)
120
+ if !expiration_year.nil? && expiration_year.to_s.length > 4
121
+ fail ArgumentError, 'invalid value for "expiration_year", the character length must be smaller than or equal to 4.'
122
+ end
123
+
124
+ @expiration_year = expiration_year
125
+ end
126
+
127
+ # Custom attribute writer method with validation
128
+ # @param [Object] number Value to be assigned
129
+ def number=(number)
130
+ if !number.nil? && number.to_s.length > 20
131
+ fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.'
132
+ end
133
+
134
+ @number = number
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ type == o.type &&
143
+ expiration_month == o.expiration_month &&
144
+ expiration_year == o.expiration_year &&
145
+ number == o.number
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Fixnum] Hash code
156
+ def hash
157
+ [type, expiration_month, expiration_year, number].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ self.class.swagger_types.each_pair do |key, type|
166
+ if type =~ /\AArray<(.*)>/i
167
+ # check to ensure the input is an array given that the the attribute
168
+ # is documented as an array but the input is not
169
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
170
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ end
172
+ elsif !attributes[self.class.attribute_map[key]].nil?
173
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
176
+
177
+ self
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def _deserialize(type, value)
185
+ case type.to_sym
186
+ when :DateTime
187
+ DateTime.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :BOOLEAN
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ temp_model = CyberSource.const_get(type).new
218
+ temp_model.build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ next if value.nil?
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ # Outputs non-array value in the form of hash
247
+ # For object, use to_hash. Otherwise, just return the value
248
+ # @param [Object] value Any valid value
249
+ # @return [Hash] Returns the value in the form of hash
250
+ def _to_hash(value)
251
+ if value.is_a?(Array)
252
+ value.compact.map { |v| _to_hash(v) }
253
+ elsif value.is_a?(Hash)
254
+ {}.tap do |hash|
255
+ value.each { |k, v| hash[k] = _to_hash(v) }
256
+ end
257
+ elsif value.respond_to? :to_hash
258
+ value.to_hash
259
+ else
260
+ value
261
+ end
262
+ end
263
+ end
264
+ end
@@ -0,0 +1,264 @@
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 Riskv1authenticationresultsPaymentInformationTokenizedCard
17
+ # Three-digit value that indicates the card type. Type of card to authorize. - 001 Visa - 002 Mastercard - 003 Amex - 004 Discover - 005: Diners Club - 007: JCB - 024: Maestro (UK Domestic) - 039 Encoded account number - 042: Maestro (International) For the complete list of possible values, see `card_type` field description in the [Credit Card Services Using the SCMP API Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
18
+ attr_accessor :type
19
+
20
+ # One of two possible meanings: - The two-digit month in which a token expires. - The two-digit month in which a card expires. Format: `MM` Possible values: `01` through `12` **NOTE** The meaning of this field is dependent on the payment processor that is returning the value in an authorization reply. Please see the processor-specific details below. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`01` through `12`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (`card_type=039`), if there is no expiration date on the card, use `12`.\\ **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. #### Samsung Pay and Apple Pay Month in which the token expires. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. For processor-specific information, see the `customer_cc_expmo` field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
21
+ attr_accessor :expiration_month
22
+
23
+ # One of two possible meanings: - The four-digit year in which a token expires. - The four-digit year in which a card expires. Format: `YYYY` Possible values: `1900` through `3000` Data type: Non-negative integer **NOTE** The meaning of this field is dependent on the payment processor that is returning the value in an authorization reply. Please see the processor-specific details below. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (1900 through 3000) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (`card_ type=039`), if there is no expiration date on the card, use `2021`. #### FDC Nashville Global and FDMS South You can send in 2 digits or 4 digits. When you send in 2 digits, they must be the last 2 digits of the year. #### Samsung Pay and Apple Pay Year in which the token expires. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. For processor-specific information, see the `customer_cc_expyr` or `token_expiration_year` field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
24
+ attr_accessor :expiration_year
25
+
26
+ # Customer’s payment network token value.
27
+ attr_accessor :number
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'type' => :'type',
33
+ :'expiration_month' => :'expirationMonth',
34
+ :'expiration_year' => :'expirationYear',
35
+ :'number' => :'number'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'type' => :'String',
43
+ :'expiration_month' => :'String',
44
+ :'expiration_year' => :'String',
45
+ :'number' => :'String'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'type')
58
+ self.type = attributes[:'type']
59
+ end
60
+
61
+ if attributes.has_key?(:'expirationMonth')
62
+ self.expiration_month = attributes[:'expirationMonth']
63
+ end
64
+
65
+ if attributes.has_key?(:'expirationYear')
66
+ self.expiration_year = attributes[:'expirationYear']
67
+ end
68
+
69
+ if attributes.has_key?(:'number')
70
+ self.number = attributes[:'number']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ if @type.nil?
79
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
80
+ end
81
+
82
+ if !@expiration_month.nil? && @expiration_month.to_s.length > 2
83
+ invalid_properties.push('invalid value for "expiration_month", the character length must be smaller than or equal to 2.')
84
+ end
85
+
86
+ if !@expiration_year.nil? && @expiration_year.to_s.length > 4
87
+ invalid_properties.push('invalid value for "expiration_year", the character length must be smaller than or equal to 4.')
88
+ end
89
+
90
+ if !@number.nil? && @number.to_s.length > 20
91
+ invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 20.')
92
+ end
93
+
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ return false if @type.nil?
101
+ return false if !@expiration_month.nil? && @expiration_month.to_s.length > 2
102
+ return false if !@expiration_year.nil? && @expiration_year.to_s.length > 4
103
+ return false if !@number.nil? && @number.to_s.length > 20
104
+ true
105
+ end
106
+
107
+ # Custom attribute writer method with validation
108
+ # @param [Object] expiration_month Value to be assigned
109
+ def expiration_month=(expiration_month)
110
+ if !expiration_month.nil? && expiration_month.to_s.length > 2
111
+ fail ArgumentError, 'invalid value for "expiration_month", the character length must be smaller than or equal to 2.'
112
+ end
113
+
114
+ @expiration_month = expiration_month
115
+ end
116
+
117
+ # Custom attribute writer method with validation
118
+ # @param [Object] expiration_year Value to be assigned
119
+ def expiration_year=(expiration_year)
120
+ if !expiration_year.nil? && expiration_year.to_s.length > 4
121
+ fail ArgumentError, 'invalid value for "expiration_year", the character length must be smaller than or equal to 4.'
122
+ end
123
+
124
+ @expiration_year = expiration_year
125
+ end
126
+
127
+ # Custom attribute writer method with validation
128
+ # @param [Object] number Value to be assigned
129
+ def number=(number)
130
+ if !number.nil? && number.to_s.length > 20
131
+ fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 20.'
132
+ end
133
+
134
+ @number = number
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ type == o.type &&
143
+ expiration_month == o.expiration_month &&
144
+ expiration_year == o.expiration_year &&
145
+ number == o.number
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Fixnum] Hash code
156
+ def hash
157
+ [type, expiration_month, expiration_year, number].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ self.class.swagger_types.each_pair do |key, type|
166
+ if type =~ /\AArray<(.*)>/i
167
+ # check to ensure the input is an array given that the the attribute
168
+ # is documented as an array but the input is not
169
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
170
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ end
172
+ elsif !attributes[self.class.attribute_map[key]].nil?
173
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
176
+
177
+ self
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def _deserialize(type, value)
185
+ case type.to_sym
186
+ when :DateTime
187
+ DateTime.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :BOOLEAN
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ temp_model = CyberSource.const_get(type).new
218
+ temp_model.build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ next if value.nil?
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ # Outputs non-array value in the form of hash
247
+ # For object, use to_hash. Otherwise, just return the value
248
+ # @param [Object] value Any valid value
249
+ # @return [Hash] Returns the value in the form of hash
250
+ def _to_hash(value)
251
+ if value.is_a?(Array)
252
+ value.compact.map { |v| _to_hash(v) }
253
+ elsif value.is_a?(Hash)
254
+ {}.tap do |hash|
255
+ value.each { |k, v| hash[k] = _to_hash(v) }
256
+ end
257
+ elsif value.respond_to? :to_hash
258
+ value.to_hash
259
+ else
260
+ value
261
+ end
262
+ end
263
+ end
264
+ end