cybersource_rest_client 0.0.65 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/core/MerchantConfig.rb +2 -0
  3. data/lib/cybersource_rest_client/api/batches_api.rb +1 -1
  4. data/lib/cybersource_rest_client/api/billing_agreements_api.rb +3 -3
  5. data/lib/cybersource_rest_client/api/bin_lookup_api.rb +1 -1
  6. data/lib/cybersource_rest_client/api/capture_api.rb +1 -1
  7. data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +2 -2
  8. data/lib/cybersource_rest_client/api/credit_api.rb +1 -1
  9. data/lib/cybersource_rest_client/api/customer_api.rb +2 -2
  10. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +2 -2
  11. data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +2 -2
  12. data/lib/cybersource_rest_client/api/decision_manager_api.rb +5 -5
  13. data/lib/cybersource_rest_client/api/emv_tag_details_api.rb +1 -1
  14. data/lib/cybersource_rest_client/api/flex_api_api.rb +92 -0
  15. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +3 -3
  16. data/lib/cybersource_rest_client/api/invoice_settings_api.rb +1 -1
  17. data/lib/cybersource_rest_client/api/invoices_api.rb +2 -2
  18. data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +2 -2
  19. data/lib/cybersource_rest_client/api/merchant_boarding_api.rb +1 -3
  20. data/lib/cybersource_rest_client/api/microform_integration_api.rb +1 -1
  21. data/lib/cybersource_rest_client/api/orders_api.rb +167 -0
  22. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +3 -3
  23. data/lib/cybersource_rest_client/api/payment_instrument_api.rb +2 -2
  24. data/lib/cybersource_rest_client/api/payments_api.rb +6 -6
  25. data/lib/cybersource_rest_client/api/payouts_api.rb +1 -1
  26. data/lib/cybersource_rest_client/api/plans_api.rb +2 -2
  27. data/lib/cybersource_rest_client/api/push_funds_api.rb +1 -1
  28. data/lib/cybersource_rest_client/api/refund_api.rb +2 -2
  29. data/lib/cybersource_rest_client/api/replay_webhooks_api.rb +1 -1
  30. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +2 -2
  31. data/lib/cybersource_rest_client/api/reports_api.rb +1 -1
  32. data/lib/cybersource_rest_client/api/reversal_api.rb +2 -2
  33. data/lib/cybersource_rest_client/api/search_transactions_api.rb +1 -1
  34. data/lib/cybersource_rest_client/api/subscriptions_api.rb +2 -2
  35. data/lib/cybersource_rest_client/api/taxes_api.rb +2 -2
  36. data/lib/cybersource_rest_client/api/token_api.rb +1 -1
  37. data/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb +1 -1
  38. data/lib/cybersource_rest_client/api/user_management_search_api.rb +1 -1
  39. data/lib/cybersource_rest_client/api/verification_api.rb +2 -2
  40. data/lib/cybersource_rest_client/api/void_api.rb +5 -5
  41. data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information.rb +314 -360
  42. data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb +437 -483
  43. data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information_kyc.rb +337 -381
  44. data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information_kyc_deposit_bank_account.rb +297 -330
  45. data/lib/cybersource_rest_client/models/boardingv1registrations_registration_information.rb +271 -329
  46. data/lib/cybersource_rest_client/models/card_processing_config_common.rb +433 -445
  47. data/lib/cybersource_rest_client/models/card_processing_config_common_acquirer.rb +23 -1
  48. data/lib/cybersource_rest_client/models/card_processing_config_common_merchant_descriptor_information.rb +16 -5
  49. data/lib/cybersource_rest_client/models/card_processing_config_common_processors.rb +719 -720
  50. data/lib/cybersource_rest_client/models/check_payer_auth_enrollment_request.rb +321 -321
  51. data/lib/cybersource_rest_client/models/create_order_request.rb +229 -0
  52. data/lib/cybersource_rest_client/models/create_payment_request.rb +462 -462
  53. data/lib/cybersource_rest_client/models/flexv2sessions_fields.rb +199 -0
  54. data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information.rb +209 -0
  55. data/lib/cybersource_rest_client/models/{inline_response_400_5_details.rb → flexv2sessions_fields_order_information_amount_details.rb} +199 -201
  56. data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_amount_details_total_amount.rb +189 -0
  57. data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_bill_to.rb +309 -0
  58. data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_ship_to.rb +289 -0
  59. data/lib/cybersource_rest_client/models/flexv2sessions_fields_payment_information.rb +189 -0
  60. data/lib/cybersource_rest_client/models/flexv2sessions_fields_payment_information_card.rb +229 -0
  61. data/lib/cybersource_rest_client/models/generate_capture_context_request.rb +227 -225
  62. data/lib/cybersource_rest_client/models/generate_flex_api_capture_context_request.rb +189 -0
  63. data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +293 -290
  64. data/lib/cybersource_rest_client/models/inline_response_200_1.rb +253 -253
  65. data/lib/cybersource_rest_client/models/inline_response_200_1_integration_information.rb +204 -204
  66. data/lib/cybersource_rest_client/models/inline_response_200_1_integration_information_tenant_configurations.rb +1 -34
  67. data/lib/cybersource_rest_client/models/inline_response_200_2.rb +213 -213
  68. data/lib/cybersource_rest_client/models/inline_response_200_3.rb +335 -335
  69. data/lib/cybersource_rest_client/models/inline_response_200_5.rb +251 -251
  70. data/lib/cybersource_rest_client/models/inline_response_200_5__embedded.rb +191 -191
  71. data/lib/cybersource_rest_client/models/inline_response_200_5__embedded__links.rb +191 -191
  72. data/lib/cybersource_rest_client/models/inline_response_200_5__embedded__links_reports.rb +190 -190
  73. data/lib/cybersource_rest_client/models/inline_response_200_5__embedded_batches.rb +295 -295
  74. data/lib/cybersource_rest_client/models/inline_response_200_5__embedded_totals.rb +229 -229
  75. data/lib/cybersource_rest_client/models/inline_response_200_5__links.rb +200 -200
  76. data/lib/cybersource_rest_client/models/inline_response_200_6.rb +290 -290
  77. data/lib/cybersource_rest_client/models/inline_response_200_6__links.rb +201 -201
  78. data/lib/cybersource_rest_client/models/inline_response_200_6__links_report.rb +189 -189
  79. data/lib/cybersource_rest_client/models/inline_response_200_6_billing.rb +219 -219
  80. data/lib/cybersource_rest_client/models/inline_response_200_7.rb +292 -292
  81. data/lib/cybersource_rest_client/models/inline_response_200_7_records.rb +209 -209
  82. data/lib/cybersource_rest_client/models/inline_response_200_7_response_record.rb +307 -307
  83. data/lib/cybersource_rest_client/models/inline_response_200_7_response_record_additional_updates.rb +242 -242
  84. data/lib/cybersource_rest_client/models/inline_response_200_7_source_record.rb +295 -295
  85. data/lib/cybersource_rest_client/models/inline_response_201_2.rb +281 -315
  86. data/lib/cybersource_rest_client/models/inline_response_201_2_integration_information_tenant_configurations.rb +253 -286
  87. data/lib/cybersource_rest_client/models/inline_response_201_2_registration_information.rb +222 -256
  88. data/lib/cybersource_rest_client/models/inline_response_201_2_setups_payments.rb +359 -359
  89. data/lib/cybersource_rest_client/models/inline_response_201_2_setups_payments_card_processing_configuration_status.rb +255 -299
  90. data/lib/cybersource_rest_client/models/inline_response_201_2_setups_payments_card_processing_subscription_status.rb +234 -278
  91. data/lib/cybersource_rest_client/models/inline_response_400_1.rb +242 -235
  92. data/lib/cybersource_rest_client/models/inline_response_400_1_details.rb +199 -0
  93. data/lib/cybersource_rest_client/models/inline_response_400_2.rb +3 -3
  94. data/lib/cybersource_rest_client/models/inline_response_400_3.rb +1 -1
  95. data/lib/cybersource_rest_client/models/inline_response_400_4.rb +37 -60
  96. data/lib/cybersource_rest_client/models/inline_response_400_5.rb +258 -269
  97. data/lib/cybersource_rest_client/models/{inline_response_400_4_fields.rb → inline_response_400_5_fields.rb} +1 -1
  98. data/lib/cybersource_rest_client/models/inline_response_400_6.rb +35 -75
  99. data/lib/cybersource_rest_client/models/inline_response_400_6_details.rb +201 -199
  100. data/lib/cybersource_rest_client/models/inline_response_404_1.rb +2 -36
  101. data/lib/cybersource_rest_client/models/inline_response_422_1.rb +2 -36
  102. data/lib/cybersource_rest_client/models/inline_response_500_2.rb +1 -35
  103. data/lib/cybersource_rest_client/models/microformv2sessions_checkout_api_initialization.rb +281 -279
  104. data/lib/cybersource_rest_client/models/patch_instrument_identifier_request.rb +1 -1
  105. data/lib/cybersource_rest_client/models/payer_auth_config_card_types_verified_by_visa_currencies.rb +244 -244
  106. data/lib/cybersource_rest_client/models/payer_auth_setup_request.rb +219 -219
  107. data/lib/cybersource_rest_client/models/payments_products.rb +369 -369
  108. data/lib/cybersource_rest_client/models/payments_products_card_present_connect_subscription_information.rb +202 -236
  109. data/lib/cybersource_rest_client/models/payments_products_card_processing_subscription_information.rb +215 -249
  110. data/lib/cybersource_rest_client/models/payments_products_differential_fee_subscription_information.rb +212 -246
  111. data/lib/cybersource_rest_client/models/payments_products_digital_payments_subscription_information.rb +215 -249
  112. data/lib/cybersource_rest_client/models/payments_products_e_check_subscription_information.rb +215 -249
  113. data/lib/cybersource_rest_client/models/payments_products_payer_authentication_subscription_information.rb +202 -236
  114. data/lib/cybersource_rest_client/models/payments_products_service_fee.rb +199 -199
  115. data/lib/cybersource_rest_client/models/payments_products_service_fee_configuration_information.rb +189 -189
  116. data/lib/cybersource_rest_client/models/payments_products_service_fee_configuration_information_configurations.rb +266 -266
  117. data/lib/cybersource_rest_client/models/payments_products_service_fee_configuration_information_configurations_merchant_information.rb +239 -239
  118. data/lib/cybersource_rest_client/models/payments_products_service_fee_configuration_information_configurations_payment_information.rb +2 -48
  119. data/lib/cybersource_rest_client/models/payments_products_service_fee_configuration_information_configurations_products.rb +190 -190
  120. data/lib/cybersource_rest_client/models/post_instrument_identifier_enrollment_request.rb +1 -1
  121. data/lib/cybersource_rest_client/models/post_instrument_identifier_request.rb +1 -1
  122. data/lib/cybersource_rest_client/models/pts_v2_create_order_post201_response.rb +269 -0
  123. data/lib/cybersource_rest_client/models/{tss_v2_transactions_post201_response__embedded_buyer_information.rb → pts_v2_create_order_post201_response_buyer_information.rb} +196 -196
  124. data/lib/cybersource_rest_client/models/pts_v2_create_order_post201_response_processor_information.rb +224 -0
  125. data/lib/cybersource_rest_client/models/{bin_lookupv400_response.rb → pts_v2_create_order_post400_response.rb} +224 -224
  126. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_1_processor_information.rb +213 -213
  127. data/lib/cybersource_rest_client/models/pts_v2_incremental_authorization_patch201_response_processor_information.rb +295 -284
  128. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response.rb +305 -295
  129. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_embedded_actions.rb +189 -0
  130. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_embedded_actions_ap_capture.rb +190 -0
  131. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_processor_information.rb +263 -252
  132. data/lib/cybersource_rest_client/models/pts_v2_payments_order_post201_response_buyer_information_personal_identification.rb +207 -207
  133. data/lib/cybersource_rest_client/models/pts_v2_payments_order_post201_response_payment_information_e_wallet.rb +241 -230
  134. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_embedded_actions_consumer_authentication.rb +212 -212
  135. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +309 -309
  136. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information.rb +227 -217
  137. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information_capture_options.rb +196 -0
  138. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +67 -6
  139. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_seller_protection.rb +237 -218
  140. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +313 -302
  141. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb +1 -1
  142. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +309 -309
  143. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_processor_information.rb +224 -224
  144. data/lib/cybersource_rest_client/models/pts_v2_update_order_patch201_response.rb +200 -0
  145. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_aggregator_information.rb +240 -0
  146. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_aggregator_information_sub_merchant.rb +196 -0
  147. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_information.rb +205 -0
  148. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_order_information_amount_details.rb +302 -292
  149. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_point_of_service_information.rb +189 -0
  150. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_point_of_service_information_emv.rb +196 -0
  151. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information.rb +318 -232
  152. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information_payouts_options.rb +282 -231
  153. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information.rb +446 -378
  154. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card.rb +321 -321
  155. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_personal_identification.rb +256 -239
  156. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information.rb +533 -448
  157. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_account.rb +222 -222
  158. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_payment_information_card.rb +317 -317
  159. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_personal_identification.rb +256 -256
  160. data/lib/cybersource_rest_client/models/ptsv2intents_client_reference_information.rb +196 -0
  161. data/lib/cybersource_rest_client/models/ptsv2intents_merchant_information.rb +223 -0
  162. data/lib/cybersource_rest_client/models/ptsv2intents_merchant_information_merchant_descriptor.rb +207 -0
  163. data/lib/cybersource_rest_client/models/ptsv2intents_order_information.rb +231 -0
  164. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_amount_details.rb +315 -0
  165. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_bill_to.rb +196 -0
  166. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_invoice_details.rb +190 -0
  167. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_line_items.rb +309 -0
  168. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_ship_to.rb +332 -0
  169. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information.rb +189 -0
  170. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information_payment_type.rb +200 -0
  171. data/lib/cybersource_rest_client/models/ptsv2intents_payment_information_payment_type_method.rb +190 -0
  172. data/lib/cybersource_rest_client/models/ptsv2intents_processing_information.rb +219 -0
  173. data/lib/cybersource_rest_client/models/ptsv2intents_processing_information_authorization_options.rb +196 -0
  174. data/lib/cybersource_rest_client/models/ptsv2intentsid_merchant_information.rb +189 -0
  175. data/lib/cybersource_rest_client/models/ptsv2intentsid_order_information.rb +221 -0
  176. data/lib/cybersource_rest_client/models/ptsv2intentsid_processing_information.rb +192 -0
  177. data/lib/cybersource_rest_client/models/ptsv2payments_agreement_information.rb +207 -190
  178. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb +229 -229
  179. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +651 -641
  180. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_octsurcharge.rb +196 -0
  181. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +721 -704
  182. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +1 -1
  183. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb +264 -247
  184. data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +383 -383
  185. data/lib/cybersource_rest_client/models/ptsv2payments_recurring_payment_information.rb +14 -0
  186. data/lib/cybersource_rest_client/models/ptsv2payments_sender_information.rb +298 -298
  187. data/lib/cybersource_rest_client/models/ptsv2paymentsid_client_reference_information.rb +22 -5
  188. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_authorization_options.rb +230 -230
  189. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_capture_options.rb +247 -230
  190. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_processing_information.rb +192 -192
  191. data/lib/cybersource_rest_client/models/push_funds201_response.rb +337 -317
  192. data/lib/cybersource_rest_client/models/push_funds201_response_error_information.rb +225 -225
  193. data/lib/cybersource_rest_client/models/push_funds201_response_payment_information.rb +189 -0
  194. data/lib/cybersource_rest_client/models/push_funds201_response_payment_information_tokenized_card.rb +205 -0
  195. data/lib/cybersource_rest_client/models/push_funds201_response_processing_information.rb +189 -0
  196. data/lib/cybersource_rest_client/models/push_funds201_response_processing_information_domestic_national_net.rb +197 -0
  197. data/lib/cybersource_rest_client/models/push_funds201_response_processor_information.rb +329 -241
  198. data/lib/cybersource_rest_client/models/push_funds201_response_processor_information_routing.rb +196 -0
  199. data/lib/cybersource_rest_client/models/push_funds201_response_processor_information_settlement.rb +207 -0
  200. data/lib/cybersource_rest_client/models/push_funds201_response_recipient_information.rb +206 -189
  201. data/lib/cybersource_rest_client/models/push_funds502_response.rb +246 -246
  202. data/lib/cybersource_rest_client/models/push_funds_request.rb +264 -239
  203. data/lib/cybersource_rest_client/models/rbsv1subscriptions_processing_information.rb +206 -206
  204. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response.rb +269 -269
  205. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +622 -622
  206. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response.rb +279 -279
  207. data/lib/cybersource_rest_client/models/risk_v1_authentications_post400_response_1.rb +235 -235
  208. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +312 -312
  209. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information.rb +1 -1
  210. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +241 -241
  211. data/lib/cybersource_rest_client/models/riskv1authentications_device_information.rb +434 -434
  212. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information.rb +219 -219
  213. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_customer.rb +222 -0
  214. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_client_reference_information.rb +240 -240
  215. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_customer.rb +9 -0
  216. data/lib/cybersource_rest_client/models/riskv1decisions_consumer_authentication_information.rb +795 -812
  217. data/lib/cybersource_rest_client/models/sa_config_payment_methods.rb +191 -213
  218. data/lib/cybersource_rest_client/models/tms_embedded_instrument_identifier.rb +1 -1
  219. data/lib/cybersource_rest_client/models/{tms_embedded_instrument_identifier_tokenized_card.rb → tmsv2_tokenized_card.rb} +16 -6
  220. data/lib/cybersource_rest_client/models/{tms_embedded_instrument_identifier_tokenized_card_card.rb → tmsv2_tokenized_card_card.rb} +1 -1
  221. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata.rb +189 -0
  222. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art.rb +250 -0
  223. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_background_asset.rb +200 -0
  224. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_background_asset__links.rb +189 -0
  225. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_background_asset__links_self.rb +190 -0
  226. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_brand_logo_asset.rb +200 -0
  227. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_brand_logo_asset__links.rb +189 -0
  228. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_brand_logo_asset__links_self.rb +190 -0
  229. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_co_brand_logo_asset.rb +200 -0
  230. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_co_brand_logo_asset__links.rb +189 -0
  231. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_co_brand_logo_asset__links_self.rb +190 -0
  232. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_combined_asset.rb +200 -0
  233. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_combined_asset__links.rb +189 -0
  234. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_combined_asset__links_self.rb +190 -0
  235. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_icon_asset.rb +200 -0
  236. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_icon_asset__links.rb +189 -0
  237. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_icon_asset__links_self.rb +190 -0
  238. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_issuer_logo_asset.rb +200 -0
  239. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_issuer_logo_asset__links.rb +189 -0
  240. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_issuer_logo_asset__links_self.rb +190 -0
  241. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options.rb +245 -245
  242. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +383 -383
  243. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_multi_processor_routing.rb +235 -235
  244. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processor_information.rb +223 -206
  245. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_transaction_summaries.rb +392 -392
  246. data/lib/cybersource_rest_client/models/update_order_request.rb +229 -0
  247. data/lib/cybersource_rest_client/models/upv1capturecontexts_capture_mandate.rb +253 -253
  248. data/lib/cybersource_rest_client/models/upv1capturecontexts_checkout_api_initialization.rb +280 -279
  249. data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information_amount_details.rb +201 -199
  250. data/lib/cybersource_rest_client/models/validate_request.rb +249 -249
  251. data/lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_basic_information.rb +273 -317
  252. data/lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_payment_information.rb +315 -337
  253. data/lib/cybersource_rest_client/utilities/tracking/sdk_tracker.rb +5 -1
  254. data/lib/cybersource_rest_client.rb +75 -6
  255. metadata +78 -29
@@ -1,641 +1,651 @@
1
- =begin
2
- #CyberSource Merged Spec
3
-
4
- #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
-
6
- OpenAPI spec version: 0.0.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.38
10
- =end
11
-
12
- require 'date'
13
-
14
- module CyberSource
15
- class Ptsv2paymentsOrderInformationAmountDetails
16
- # Amount being charged as gift wrap fee.
17
- attr_accessor :gift_wrap_amount
18
-
19
- # Grand total for the order. This value cannot be negative. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. **Note** For CTV, FDCCompass, Paymentech processors, the maximum length for this field is 12. **Important** Some processors have specific requirements and limitations, such as maximum amounts and maximum field lengths. If your processor supports zero amount authorizations, you can set this field to 0 for the authorization to check if the card is lost or stolen. #### Card Present Required to include either this field or `orderInformation.lineItems[].unitPrice` for the order. #### Invoicing Required for creating a new invoice. #### PIN Debit Amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit; however, for all other processors, these fields are required. #### DCC with a Third-Party Provider Set this field to the converted amount that was returned by the DCC provider. You must include either this field or the 1st line item in the order and the specific line-order amount in your request. #### DCC for First Data Not used.
20
- attr_accessor :total_amount
21
-
22
- # Subtotal amount of all the items.This amount (which is the value of all items in the cart, not including the additional amounts such as tax, shipping, etc.) cannot change after a sessions request. When there is a change to any of the additional amounts, this field should be resent in the order request. When the sub total amount changes, you must initiate a new transaction starting with a sessions request. Note The amount value must be a non-negative number containing 2 decimal places and limited to 7 digits before the decimal point. This value can not be changed after a sessions request.
23
- attr_accessor :sub_total_amount
24
-
25
- # Currency used for the order. Use the three-character [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) #### Used by **Authorization** Required field. **Authorization Reversal** For an authorization reversal (`reversalInformation`) or a capture (`processingOptions.capture` is set to `true`), you must use the same currency that you used in your payment authorization request. #### PIN Debit Currency for the amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Returned by PIN debit purchase. For PIN debit reversal requests, you must use the same currency that was used for the PIN debit purchase or PIN debit credit that you are reversing. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit. #### DCC for First Data Your local currency. #### Tax Calculation Required for international tax and value added tax only. Optional for U.S. and Canadian taxes. Your local currency.
26
- attr_accessor :currency
27
-
28
- # Total discount amount applied to the order.
29
- attr_accessor :discount_amount
30
-
31
- # Total charges for any import or export duties included in the order.
32
- attr_accessor :duty_amount
33
-
34
- # Gratuity or tip amount for restaurants. Allowed only when industryDatatype=restaurant. When your customer uses a debit card or prepaid card, and you receive a partial authorization, the payment networks recommend that you do not submit a capture amount that is higher than the authorized amount. When the capture amount exceeds the partial amount that was approved, the issuer has chargeback rights for the excess amount. Used by **Capture** Optional field. #### CyberSource through VisaNet Restaurant data is supported only on CyberSource through VisaNet when card is present.
35
- attr_accessor :gratuity_amount
36
-
37
- # Total tax amount for all the items in the order.
38
- attr_accessor :tax_amount
39
-
40
- # Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included
41
- attr_accessor :national_tax_included
42
-
43
- # Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total
44
- attr_accessor :tax_applied_after_discount
45
-
46
- # Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction
47
- attr_accessor :tax_applied_level
48
-
49
- # For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space.
50
- attr_accessor :tax_type_code
51
-
52
- # Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field.
53
- attr_accessor :freight_amount
54
-
55
- # Set this field to the converted amount that was returned by the DCC provider.
56
- attr_accessor :foreign_amount
57
-
58
- # Set this field to the converted amount that was returned by the DCC provider.
59
- attr_accessor :foreign_currency
60
-
61
- # Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places.
62
- attr_accessor :exchange_rate
63
-
64
- # Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space.
65
- attr_accessor :exchange_rate_time_stamp
66
-
67
- attr_accessor :surcharge
68
-
69
- # This is a multicurrency field. It contains the transaction amount (field 4), converted to the Currency used to bill the cardholder's account. This field is returned for OCT transactions.
70
- attr_accessor :settlement_amount
71
-
72
- # This is a multicurrency-only field. It contains a 3-digit numeric code that identifies the currency used by the issuer to bill the cardholder's account. This field is returned for OCT transactions.
73
- attr_accessor :settlement_currency
74
-
75
- attr_accessor :amex_additional_amounts
76
-
77
- attr_accessor :tax_details
78
-
79
- # Service fee. Required for service fee transactions.
80
- attr_accessor :service_fee_amount
81
-
82
- # Amount in your original local pricing currency. This value cannot be negative. You can include a decimal point (.) in this field to denote the currency exponent, but you cannot include any other special characters. If needed, CyberSource truncates the amount to the correct number of decimal places.
83
- attr_accessor :original_amount
84
-
85
- # Your local pricing currency code. For the possible values, see the [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf)
86
- attr_accessor :original_currency
87
-
88
- # Cashback amount in the acquirer's currency. If a cashback amount is included in the request, it must be included in the `orderInformation.amountDetails.totalAmount` value. This field is supported only on CyberSource through VisaNet. #### Used by **Authorization** Optional. **Authorization Reversal** Optional. #### PIN debit Optional field for PIN debit purchase, PIN debit credit or PIN debit reversal.
89
- attr_accessor :cashback_amount
90
-
91
- attr_accessor :currency_conversion
92
-
93
- attr_accessor :order
94
-
95
- # This API Field contains the anticipated amount details. This supports use cases where the Merchant does not wish to have funds held against the account, but needs to confirm an amount prior to authorization, such as for a trial subscription, reservation service, or loyalty program. In an account verification, the anticipated amount is used to confirm the account has availability to accept purchases.
96
- attr_accessor :anticipated_amount
97
-
98
- # Attribute mapping from ruby-style variable name to JSON key.
99
- def self.attribute_map
100
- {
101
- :'gift_wrap_amount' => :'giftWrapAmount',
102
- :'total_amount' => :'totalAmount',
103
- :'sub_total_amount' => :'subTotalAmount',
104
- :'currency' => :'currency',
105
- :'discount_amount' => :'discountAmount',
106
- :'duty_amount' => :'dutyAmount',
107
- :'gratuity_amount' => :'gratuityAmount',
108
- :'tax_amount' => :'taxAmount',
109
- :'national_tax_included' => :'nationalTaxIncluded',
110
- :'tax_applied_after_discount' => :'taxAppliedAfterDiscount',
111
- :'tax_applied_level' => :'taxAppliedLevel',
112
- :'tax_type_code' => :'taxTypeCode',
113
- :'freight_amount' => :'freightAmount',
114
- :'foreign_amount' => :'foreignAmount',
115
- :'foreign_currency' => :'foreignCurrency',
116
- :'exchange_rate' => :'exchangeRate',
117
- :'exchange_rate_time_stamp' => :'exchangeRateTimeStamp',
118
- :'surcharge' => :'surcharge',
119
- :'settlement_amount' => :'settlementAmount',
120
- :'settlement_currency' => :'settlementCurrency',
121
- :'amex_additional_amounts' => :'amexAdditionalAmounts',
122
- :'tax_details' => :'taxDetails',
123
- :'service_fee_amount' => :'serviceFeeAmount',
124
- :'original_amount' => :'originalAmount',
125
- :'original_currency' => :'originalCurrency',
126
- :'cashback_amount' => :'cashbackAmount',
127
- :'currency_conversion' => :'currencyConversion',
128
- :'order' => :'order',
129
- :'anticipated_amount' => :'anticipatedAmount'
130
- }
131
- end
132
-
133
- # Attribute mapping from JSON key to ruby-style variable name.
134
- def self.json_map
135
- {
136
- :'gift_wrap_amount' => :'gift_wrap_amount',
137
- :'total_amount' => :'total_amount',
138
- :'sub_total_amount' => :'sub_total_amount',
139
- :'currency' => :'currency',
140
- :'discount_amount' => :'discount_amount',
141
- :'duty_amount' => :'duty_amount',
142
- :'gratuity_amount' => :'gratuity_amount',
143
- :'tax_amount' => :'tax_amount',
144
- :'national_tax_included' => :'national_tax_included',
145
- :'tax_applied_after_discount' => :'tax_applied_after_discount',
146
- :'tax_applied_level' => :'tax_applied_level',
147
- :'tax_type_code' => :'tax_type_code',
148
- :'freight_amount' => :'freight_amount',
149
- :'foreign_amount' => :'foreign_amount',
150
- :'foreign_currency' => :'foreign_currency',
151
- :'exchange_rate' => :'exchange_rate',
152
- :'exchange_rate_time_stamp' => :'exchange_rate_time_stamp',
153
- :'surcharge' => :'surcharge',
154
- :'settlement_amount' => :'settlement_amount',
155
- :'settlement_currency' => :'settlement_currency',
156
- :'amex_additional_amounts' => :'amex_additional_amounts',
157
- :'tax_details' => :'tax_details',
158
- :'service_fee_amount' => :'service_fee_amount',
159
- :'original_amount' => :'original_amount',
160
- :'original_currency' => :'original_currency',
161
- :'cashback_amount' => :'cashback_amount',
162
- :'currency_conversion' => :'currency_conversion',
163
- :'order' => :'order',
164
- :'anticipated_amount' => :'anticipated_amount'
165
- }
166
- end
167
-
168
- # Attribute type mapping.
169
- def self.swagger_types
170
- {
171
- :'gift_wrap_amount' => :'String',
172
- :'total_amount' => :'String',
173
- :'sub_total_amount' => :'String',
174
- :'currency' => :'String',
175
- :'discount_amount' => :'String',
176
- :'duty_amount' => :'String',
177
- :'gratuity_amount' => :'String',
178
- :'tax_amount' => :'String',
179
- :'national_tax_included' => :'String',
180
- :'tax_applied_after_discount' => :'String',
181
- :'tax_applied_level' => :'String',
182
- :'tax_type_code' => :'String',
183
- :'freight_amount' => :'String',
184
- :'foreign_amount' => :'String',
185
- :'foreign_currency' => :'String',
186
- :'exchange_rate' => :'String',
187
- :'exchange_rate_time_stamp' => :'String',
188
- :'surcharge' => :'Ptsv2paymentsOrderInformationAmountDetailsSurcharge',
189
- :'settlement_amount' => :'String',
190
- :'settlement_currency' => :'String',
191
- :'amex_additional_amounts' => :'Array<Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts>',
192
- :'tax_details' => :'Array<Ptsv2paymentsOrderInformationAmountDetailsTaxDetails>',
193
- :'service_fee_amount' => :'String',
194
- :'original_amount' => :'String',
195
- :'original_currency' => :'String',
196
- :'cashback_amount' => :'String',
197
- :'currency_conversion' => :'Ptsv2paymentsOrderInformationAmountDetailsCurrencyConversion',
198
- :'order' => :'Ptsv2paymentsOrderInformationAmountDetailsOrder',
199
- :'anticipated_amount' => :'String'
200
- }
201
- end
202
-
203
- # Initializes the object
204
- # @param [Hash] attributes Model attributes in the form of hash
205
- def initialize(attributes = {})
206
- return unless attributes.is_a?(Hash)
207
-
208
- # convert string to symbol for hash key
209
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
210
-
211
- if attributes.has_key?(:'giftWrapAmount')
212
- self.gift_wrap_amount = attributes[:'giftWrapAmount']
213
- end
214
-
215
- if attributes.has_key?(:'totalAmount')
216
- self.total_amount = attributes[:'totalAmount']
217
- end
218
-
219
- if attributes.has_key?(:'subTotalAmount')
220
- self.sub_total_amount = attributes[:'subTotalAmount']
221
- end
222
-
223
- if attributes.has_key?(:'currency')
224
- self.currency = attributes[:'currency']
225
- end
226
-
227
- if attributes.has_key?(:'discountAmount')
228
- self.discount_amount = attributes[:'discountAmount']
229
- end
230
-
231
- if attributes.has_key?(:'dutyAmount')
232
- self.duty_amount = attributes[:'dutyAmount']
233
- end
234
-
235
- if attributes.has_key?(:'gratuityAmount')
236
- self.gratuity_amount = attributes[:'gratuityAmount']
237
- end
238
-
239
- if attributes.has_key?(:'taxAmount')
240
- self.tax_amount = attributes[:'taxAmount']
241
- end
242
-
243
- if attributes.has_key?(:'nationalTaxIncluded')
244
- self.national_tax_included = attributes[:'nationalTaxIncluded']
245
- end
246
-
247
- if attributes.has_key?(:'taxAppliedAfterDiscount')
248
- self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount']
249
- end
250
-
251
- if attributes.has_key?(:'taxAppliedLevel')
252
- self.tax_applied_level = attributes[:'taxAppliedLevel']
253
- end
254
-
255
- if attributes.has_key?(:'taxTypeCode')
256
- self.tax_type_code = attributes[:'taxTypeCode']
257
- end
258
-
259
- if attributes.has_key?(:'freightAmount')
260
- self.freight_amount = attributes[:'freightAmount']
261
- end
262
-
263
- if attributes.has_key?(:'foreignAmount')
264
- self.foreign_amount = attributes[:'foreignAmount']
265
- end
266
-
267
- if attributes.has_key?(:'foreignCurrency')
268
- self.foreign_currency = attributes[:'foreignCurrency']
269
- end
270
-
271
- if attributes.has_key?(:'exchangeRate')
272
- self.exchange_rate = attributes[:'exchangeRate']
273
- end
274
-
275
- if attributes.has_key?(:'exchangeRateTimeStamp')
276
- self.exchange_rate_time_stamp = attributes[:'exchangeRateTimeStamp']
277
- end
278
-
279
- if attributes.has_key?(:'surcharge')
280
- self.surcharge = attributes[:'surcharge']
281
- end
282
-
283
- if attributes.has_key?(:'settlementAmount')
284
- self.settlement_amount = attributes[:'settlementAmount']
285
- end
286
-
287
- if attributes.has_key?(:'settlementCurrency')
288
- self.settlement_currency = attributes[:'settlementCurrency']
289
- end
290
-
291
- if attributes.has_key?(:'amexAdditionalAmounts')
292
- if (value = attributes[:'amexAdditionalAmounts']).is_a?(Array)
293
- self.amex_additional_amounts = value
294
- end
295
- end
296
-
297
- if attributes.has_key?(:'taxDetails')
298
- if (value = attributes[:'taxDetails']).is_a?(Array)
299
- self.tax_details = value
300
- end
301
- end
302
-
303
- if attributes.has_key?(:'serviceFeeAmount')
304
- self.service_fee_amount = attributes[:'serviceFeeAmount']
305
- end
306
-
307
- if attributes.has_key?(:'originalAmount')
308
- self.original_amount = attributes[:'originalAmount']
309
- end
310
-
311
- if attributes.has_key?(:'originalCurrency')
312
- self.original_currency = attributes[:'originalCurrency']
313
- end
314
-
315
- if attributes.has_key?(:'cashbackAmount')
316
- self.cashback_amount = attributes[:'cashbackAmount']
317
- end
318
-
319
- if attributes.has_key?(:'currencyConversion')
320
- self.currency_conversion = attributes[:'currencyConversion']
321
- end
322
-
323
- if attributes.has_key?(:'order')
324
- self.order = attributes[:'order']
325
- end
326
-
327
- if attributes.has_key?(:'anticipatedAmount')
328
- self.anticipated_amount = attributes[:'anticipatedAmount']
329
- end
330
- end
331
-
332
- # Show invalid properties with the reasons. Usually used together with valid?
333
- # @return Array for valid properties with the reasons
334
- def list_invalid_properties
335
- invalid_properties = Array.new
336
- invalid_properties
337
- end
338
-
339
- # Check to see if the all the properties in the model are valid
340
- # @return true if the model is valid
341
- def valid?
342
- true
343
- end
344
-
345
- # Custom attribute writer method with validation
346
- # @param [Object] gift_wrap_amount Value to be assigned
347
- def gift_wrap_amount=(gift_wrap_amount)
348
- @gift_wrap_amount = gift_wrap_amount
349
- end
350
-
351
- # Custom attribute writer method with validation
352
- # @param [Object] total_amount Value to be assigned
353
- def total_amount=(total_amount)
354
- @total_amount = total_amount
355
- end
356
-
357
- # Custom attribute writer method with validation
358
- # @param [Object] sub_total_amount Value to be assigned
359
- def sub_total_amount=(sub_total_amount)
360
- @sub_total_amount = sub_total_amount
361
- end
362
-
363
- # Custom attribute writer method with validation
364
- # @param [Object] currency Value to be assigned
365
- def currency=(currency)
366
- @currency = currency
367
- end
368
-
369
- # Custom attribute writer method with validation
370
- # @param [Object] discount_amount Value to be assigned
371
- def discount_amount=(discount_amount)
372
- @discount_amount = discount_amount
373
- end
374
-
375
- # Custom attribute writer method with validation
376
- # @param [Object] duty_amount Value to be assigned
377
- def duty_amount=(duty_amount)
378
- @duty_amount = duty_amount
379
- end
380
-
381
- # Custom attribute writer method with validation
382
- # @param [Object] gratuity_amount Value to be assigned
383
- def gratuity_amount=(gratuity_amount)
384
- @gratuity_amount = gratuity_amount
385
- end
386
-
387
- # Custom attribute writer method with validation
388
- # @param [Object] tax_amount Value to be assigned
389
- def tax_amount=(tax_amount)
390
- @tax_amount = tax_amount
391
- end
392
-
393
- # Custom attribute writer method with validation
394
- # @param [Object] national_tax_included Value to be assigned
395
- def national_tax_included=(national_tax_included)
396
- @national_tax_included = national_tax_included
397
- end
398
-
399
- # Custom attribute writer method with validation
400
- # @param [Object] tax_applied_after_discount Value to be assigned
401
- def tax_applied_after_discount=(tax_applied_after_discount)
402
- @tax_applied_after_discount = tax_applied_after_discount
403
- end
404
-
405
- # Custom attribute writer method with validation
406
- # @param [Object] tax_applied_level Value to be assigned
407
- def tax_applied_level=(tax_applied_level)
408
- @tax_applied_level = tax_applied_level
409
- end
410
-
411
- # Custom attribute writer method with validation
412
- # @param [Object] tax_type_code Value to be assigned
413
- def tax_type_code=(tax_type_code)
414
- @tax_type_code = tax_type_code
415
- end
416
-
417
- # Custom attribute writer method with validation
418
- # @param [Object] freight_amount Value to be assigned
419
- def freight_amount=(freight_amount)
420
- @freight_amount = freight_amount
421
- end
422
-
423
- # Custom attribute writer method with validation
424
- # @param [Object] foreign_amount Value to be assigned
425
- def foreign_amount=(foreign_amount)
426
- @foreign_amount = foreign_amount
427
- end
428
-
429
- # Custom attribute writer method with validation
430
- # @param [Object] foreign_currency Value to be assigned
431
- def foreign_currency=(foreign_currency)
432
- @foreign_currency = foreign_currency
433
- end
434
-
435
- # Custom attribute writer method with validation
436
- # @param [Object] exchange_rate Value to be assigned
437
- def exchange_rate=(exchange_rate)
438
- @exchange_rate = exchange_rate
439
- end
440
-
441
- # Custom attribute writer method with validation
442
- # @param [Object] exchange_rate_time_stamp Value to be assigned
443
- def exchange_rate_time_stamp=(exchange_rate_time_stamp)
444
- @exchange_rate_time_stamp = exchange_rate_time_stamp
445
- end
446
-
447
- # Custom attribute writer method with validation
448
- # @param [Object] settlement_amount Value to be assigned
449
- def settlement_amount=(settlement_amount)
450
- @settlement_amount = settlement_amount
451
- end
452
-
453
- # Custom attribute writer method with validation
454
- # @param [Object] settlement_currency Value to be assigned
455
- def settlement_currency=(settlement_currency)
456
- @settlement_currency = settlement_currency
457
- end
458
-
459
- # Custom attribute writer method with validation
460
- # @param [Object] service_fee_amount Value to be assigned
461
- def service_fee_amount=(service_fee_amount)
462
- @service_fee_amount = service_fee_amount
463
- end
464
-
465
- # Custom attribute writer method with validation
466
- # @param [Object] original_amount Value to be assigned
467
- def original_amount=(original_amount)
468
- @original_amount = original_amount
469
- end
470
-
471
- # Custom attribute writer method with validation
472
- # @param [Object] original_currency Value to be assigned
473
- def original_currency=(original_currency)
474
- @original_currency = original_currency
475
- end
476
-
477
- # Custom attribute writer method with validation
478
- # @param [Object] cashback_amount Value to be assigned
479
- def cashback_amount=(cashback_amount)
480
- @cashback_amount = cashback_amount
481
- end
482
-
483
- # Custom attribute writer method with validation
484
- # @param [Object] anticipated_amount Value to be assigned
485
- def anticipated_amount=(anticipated_amount)
486
- @anticipated_amount = anticipated_amount
487
- end
488
-
489
- # Checks equality by comparing each attribute.
490
- # @param [Object] Object to be compared
491
- def ==(o)
492
- return true if self.equal?(o)
493
- self.class == o.class &&
494
- gift_wrap_amount == o.gift_wrap_amount &&
495
- total_amount == o.total_amount &&
496
- sub_total_amount == o.sub_total_amount &&
497
- currency == o.currency &&
498
- discount_amount == o.discount_amount &&
499
- duty_amount == o.duty_amount &&
500
- gratuity_amount == o.gratuity_amount &&
501
- tax_amount == o.tax_amount &&
502
- national_tax_included == o.national_tax_included &&
503
- tax_applied_after_discount == o.tax_applied_after_discount &&
504
- tax_applied_level == o.tax_applied_level &&
505
- tax_type_code == o.tax_type_code &&
506
- freight_amount == o.freight_amount &&
507
- foreign_amount == o.foreign_amount &&
508
- foreign_currency == o.foreign_currency &&
509
- exchange_rate == o.exchange_rate &&
510
- exchange_rate_time_stamp == o.exchange_rate_time_stamp &&
511
- surcharge == o.surcharge &&
512
- settlement_amount == o.settlement_amount &&
513
- settlement_currency == o.settlement_currency &&
514
- amex_additional_amounts == o.amex_additional_amounts &&
515
- tax_details == o.tax_details &&
516
- service_fee_amount == o.service_fee_amount &&
517
- original_amount == o.original_amount &&
518
- original_currency == o.original_currency &&
519
- cashback_amount == o.cashback_amount &&
520
- currency_conversion == o.currency_conversion &&
521
- order == o.order &&
522
- anticipated_amount == o.anticipated_amount
523
- end
524
-
525
- # @see the `==` method
526
- # @param [Object] Object to be compared
527
- def eql?(o)
528
- self == o
529
- end
530
-
531
- # Calculates hash code according to all attributes.
532
- # @return [Fixnum] Hash code
533
- def hash
534
- [gift_wrap_amount, total_amount, sub_total_amount, currency, discount_amount, duty_amount, gratuity_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, surcharge, settlement_amount, settlement_currency, amex_additional_amounts, tax_details, service_fee_amount, original_amount, original_currency, cashback_amount, currency_conversion, order, anticipated_amount].hash
535
- end
536
-
537
- # Builds the object from hash
538
- # @param [Hash] attributes Model attributes in the form of hash
539
- # @return [Object] Returns the model itself
540
- def build_from_hash(attributes)
541
- return nil unless attributes.is_a?(Hash)
542
- self.class.swagger_types.each_pair do |key, type|
543
- if type =~ /\AArray<(.*)>/i
544
- # check to ensure the input is an array given that the the attribute
545
- # is documented as an array but the input is not
546
- if attributes[self.class.attribute_map[key]].is_a?(Array)
547
- self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
548
- end
549
- elsif !attributes[self.class.attribute_map[key]].nil?
550
- self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
551
- end # or else data not found in attributes(hash), not an issue as the data can be optional
552
- end
553
-
554
- self
555
- end
556
-
557
- # Deserializes the data based on type
558
- # @param string type Data type
559
- # @param string value Value to be deserialized
560
- # @return [Object] Deserialized data
561
- def _deserialize(type, value)
562
- case type.to_sym
563
- when :DateTime
564
- DateTime.parse(value)
565
- when :Date
566
- Date.parse(value)
567
- when :String
568
- value.to_s
569
- when :Integer
570
- value.to_i
571
- when :Float
572
- value.to_f
573
- when :BOOLEAN
574
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
575
- true
576
- else
577
- false
578
- end
579
- when :Object
580
- # generic object (usually a Hash), return directly
581
- value
582
- when /\AArray<(?<inner_type>.+)>\z/
583
- inner_type = Regexp.last_match[:inner_type]
584
- value.map { |v| _deserialize(inner_type, v) }
585
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
586
- k_type = Regexp.last_match[:k_type]
587
- v_type = Regexp.last_match[:v_type]
588
- {}.tap do |hash|
589
- value.each do |k, v|
590
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
591
- end
592
- end
593
- else # model
594
- temp_model = CyberSource.const_get(type).new
595
- temp_model.build_from_hash(value)
596
- end
597
- end
598
-
599
- # Returns the string representation of the object
600
- # @return [String] String presentation of the object
601
- def to_s
602
- to_hash.to_s
603
- end
604
-
605
- # to_body is an alias to to_hash (backward compatibility)
606
- # @return [Hash] Returns the object in the form of hash
607
- def to_body
608
- to_hash
609
- end
610
-
611
- # Returns the object in the form of hash
612
- # @return [Hash] Returns the object in the form of hash
613
- def to_hash
614
- hash = {}
615
- self.class.attribute_map.each_pair do |attr, param|
616
- value = self.send(attr)
617
- next if value.nil?
618
- hash[param] = _to_hash(value)
619
- end
620
- hash
621
- end
622
-
623
- # Outputs non-array value in the form of hash
624
- # For object, use to_hash. Otherwise, just return the value
625
- # @param [Object] value Any valid value
626
- # @return [Hash] Returns the value in the form of hash
627
- def _to_hash(value)
628
- if value.is_a?(Array)
629
- value.compact.map { |v| _to_hash(v) }
630
- elsif value.is_a?(Hash)
631
- {}.tap do |hash|
632
- value.each { |k, v| hash[k] = _to_hash(v) }
633
- end
634
- elsif value.respond_to? :to_hash
635
- value.to_hash
636
- else
637
- value
638
- end
639
- end
640
- end
641
- end
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.38
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module CyberSource
15
+ class Ptsv2paymentsOrderInformationAmountDetails
16
+ # Amount being charged as gift wrap fee.
17
+ attr_accessor :gift_wrap_amount
18
+
19
+ # Grand total for the order. This value cannot be negative. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. **Note** For CTV, FDCCompass, Paymentech processors, the maximum length for this field is 12. **Important** Some processors have specific requirements and limitations, such as maximum amounts and maximum field lengths. If your processor supports zero amount authorizations, you can set this field to 0 for the authorization to check if the card is lost or stolen. #### Card Present Required to include either this field or `orderInformation.lineItems[].unitPrice` for the order. #### Invoicing Required for creating a new invoice. #### PIN Debit Amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit; however, for all other processors, these fields are required. #### DCC with a Third-Party Provider Set this field to the converted amount that was returned by the DCC provider. You must include either this field or the 1st line item in the order and the specific line-order amount in your request. #### DCC for First Data Not used.
20
+ attr_accessor :total_amount
21
+
22
+ # Subtotal amount of all the items.This amount (which is the value of all items in the cart, not including the additional amounts such as tax, shipping, etc.) cannot change after a sessions request. When there is a change to any of the additional amounts, this field should be resent in the order request. When the sub total amount changes, you must initiate a new transaction starting with a sessions request. Note The amount value must be a non-negative number containing 2 decimal places and limited to 7 digits before the decimal point. This value can not be changed after a sessions request.
23
+ attr_accessor :sub_total_amount
24
+
25
+ # Currency used for the order. Use the three-character [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) #### Used by **Authorization** Required field. **Authorization Reversal** For an authorization reversal (`reversalInformation`) or a capture (`processingOptions.capture` is set to `true`), you must use the same currency that you used in your payment authorization request. #### PIN Debit Currency for the amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Returned by PIN debit purchase. For PIN debit reversal requests, you must use the same currency that was used for the PIN debit purchase or PIN debit credit that you are reversing. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit. #### DCC for First Data Your local currency. #### Tax Calculation Required for international tax and value added tax only. Optional for U.S. and Canadian taxes. Your local currency.
26
+ attr_accessor :currency
27
+
28
+ # Total discount amount applied to the order.
29
+ attr_accessor :discount_amount
30
+
31
+ # Total charges for any import or export duties included in the order.
32
+ attr_accessor :duty_amount
33
+
34
+ # Gratuity or tip amount for restaurants. Allowed only when industryDatatype=restaurant. When your customer uses a debit card or prepaid card, and you receive a partial authorization, the payment networks recommend that you do not submit a capture amount that is higher than the authorized amount. When the capture amount exceeds the partial amount that was approved, the issuer has chargeback rights for the excess amount. Used by **Capture** Optional field. #### CyberSource through VisaNet Restaurant data is supported only on CyberSource through VisaNet when card is present.
35
+ attr_accessor :gratuity_amount
36
+
37
+ # Total tax amount for all the items in the order.
38
+ attr_accessor :tax_amount
39
+
40
+ # Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included
41
+ attr_accessor :national_tax_included
42
+
43
+ # Flag that indicates how the merchant manages discounts. Possible values: - **0**: no invoice level discount included - **1**: tax calculated on the postdiscount invoice total - **2**: tax calculated on the prediscount invoice total
44
+ attr_accessor :tax_applied_after_discount
45
+
46
+ # Flag that indicates how you calculate tax. Possible values: - **0**: net prices with tax calculated at line item level - **1**: net prices with tax calculated at invoice level - **2**: gross prices with tax provided at line item level - **3**: gross prices with tax provided at invoice level - **4**: no tax applies on the invoice for the transaction
47
+ attr_accessor :tax_applied_level
48
+
49
+ # For tax amounts that can be categorized as one tax type. This field contains the tax type code that corresponds to the entry in the _lineItems.taxAmount_ field. Possible values: - **056**: sales tax (U.S only) - **TX~**: all taxes (Canada only) Note ~ = space.
50
+ attr_accessor :tax_type_code
51
+
52
+ # Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field.
53
+ attr_accessor :freight_amount
54
+
55
+ # Set this field to the converted amount that was returned by the DCC provider.
56
+ attr_accessor :foreign_amount
57
+
58
+ # Set this field to the converted amount that was returned by the DCC provider.
59
+ attr_accessor :foreign_currency
60
+
61
+ # Exchange rate returned by the DCC service. Includes a decimal point and a maximum of 4 decimal places.
62
+ attr_accessor :exchange_rate
63
+
64
+ # Time stamp for the exchange rate. This value is returned by the DCC service. Format: `YYYYMMDD~HH:MM` where ~ denotes a space.
65
+ attr_accessor :exchange_rate_time_stamp
66
+
67
+ attr_accessor :surcharge
68
+
69
+ # This is a multicurrency field. It contains the transaction amount (field 4), converted to the Currency used to bill the cardholder's account. This field is returned for OCT transactions.
70
+ attr_accessor :settlement_amount
71
+
72
+ # This is a multicurrency-only field. It contains a 3-digit numeric code that identifies the currency used by the issuer to bill the cardholder's account. This field is returned for OCT transactions.
73
+ attr_accessor :settlement_currency
74
+
75
+ attr_accessor :amex_additional_amounts
76
+
77
+ attr_accessor :tax_details
78
+
79
+ # Service fee. Required for service fee transactions.
80
+ attr_accessor :service_fee_amount
81
+
82
+ # Amount in your original local pricing currency. This value cannot be negative. You can include a decimal point (.) in this field to denote the currency exponent, but you cannot include any other special characters. If needed, CyberSource truncates the amount to the correct number of decimal places.
83
+ attr_accessor :original_amount
84
+
85
+ # Your local pricing currency code. For the possible values, see the [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf)
86
+ attr_accessor :original_currency
87
+
88
+ # Cashback amount in the acquirer's currency. If a cashback amount is included in the request, it must be included in the `orderInformation.amountDetails.totalAmount` value. This field is supported only on CyberSource through VisaNet. #### Used by **Authorization** Optional. **Authorization Reversal** Optional. #### PIN debit Optional field for PIN debit purchase, PIN debit credit or PIN debit reversal.
89
+ attr_accessor :cashback_amount
90
+
91
+ attr_accessor :currency_conversion
92
+
93
+ attr_accessor :oct_surcharge
94
+
95
+ attr_accessor :order
96
+
97
+ # This API Field contains the anticipated amount details. This supports use cases where the Merchant does not wish to have funds held against the account, but needs to confirm an amount prior to authorization, such as for a trial subscription, reservation service, or loyalty program. In an account verification, the anticipated amount is used to confirm the account has availability to accept purchases.
98
+ attr_accessor :anticipated_amount
99
+
100
+ # Attribute mapping from ruby-style variable name to JSON key.
101
+ def self.attribute_map
102
+ {
103
+ :'gift_wrap_amount' => :'giftWrapAmount',
104
+ :'total_amount' => :'totalAmount',
105
+ :'sub_total_amount' => :'subTotalAmount',
106
+ :'currency' => :'currency',
107
+ :'discount_amount' => :'discountAmount',
108
+ :'duty_amount' => :'dutyAmount',
109
+ :'gratuity_amount' => :'gratuityAmount',
110
+ :'tax_amount' => :'taxAmount',
111
+ :'national_tax_included' => :'nationalTaxIncluded',
112
+ :'tax_applied_after_discount' => :'taxAppliedAfterDiscount',
113
+ :'tax_applied_level' => :'taxAppliedLevel',
114
+ :'tax_type_code' => :'taxTypeCode',
115
+ :'freight_amount' => :'freightAmount',
116
+ :'foreign_amount' => :'foreignAmount',
117
+ :'foreign_currency' => :'foreignCurrency',
118
+ :'exchange_rate' => :'exchangeRate',
119
+ :'exchange_rate_time_stamp' => :'exchangeRateTimeStamp',
120
+ :'surcharge' => :'surcharge',
121
+ :'settlement_amount' => :'settlementAmount',
122
+ :'settlement_currency' => :'settlementCurrency',
123
+ :'amex_additional_amounts' => :'amexAdditionalAmounts',
124
+ :'tax_details' => :'taxDetails',
125
+ :'service_fee_amount' => :'serviceFeeAmount',
126
+ :'original_amount' => :'originalAmount',
127
+ :'original_currency' => :'originalCurrency',
128
+ :'cashback_amount' => :'cashbackAmount',
129
+ :'currency_conversion' => :'currencyConversion',
130
+ :'oct_surcharge' => :'oct-surcharge',
131
+ :'order' => :'order',
132
+ :'anticipated_amount' => :'anticipatedAmount'
133
+ }
134
+ end
135
+
136
+ # Attribute mapping from JSON key to ruby-style variable name.
137
+ def self.json_map
138
+ {
139
+ :'gift_wrap_amount' => :'gift_wrap_amount',
140
+ :'total_amount' => :'total_amount',
141
+ :'sub_total_amount' => :'sub_total_amount',
142
+ :'currency' => :'currency',
143
+ :'discount_amount' => :'discount_amount',
144
+ :'duty_amount' => :'duty_amount',
145
+ :'gratuity_amount' => :'gratuity_amount',
146
+ :'tax_amount' => :'tax_amount',
147
+ :'national_tax_included' => :'national_tax_included',
148
+ :'tax_applied_after_discount' => :'tax_applied_after_discount',
149
+ :'tax_applied_level' => :'tax_applied_level',
150
+ :'tax_type_code' => :'tax_type_code',
151
+ :'freight_amount' => :'freight_amount',
152
+ :'foreign_amount' => :'foreign_amount',
153
+ :'foreign_currency' => :'foreign_currency',
154
+ :'exchange_rate' => :'exchange_rate',
155
+ :'exchange_rate_time_stamp' => :'exchange_rate_time_stamp',
156
+ :'surcharge' => :'surcharge',
157
+ :'settlement_amount' => :'settlement_amount',
158
+ :'settlement_currency' => :'settlement_currency',
159
+ :'amex_additional_amounts' => :'amex_additional_amounts',
160
+ :'tax_details' => :'tax_details',
161
+ :'service_fee_amount' => :'service_fee_amount',
162
+ :'original_amount' => :'original_amount',
163
+ :'original_currency' => :'original_currency',
164
+ :'cashback_amount' => :'cashback_amount',
165
+ :'currency_conversion' => :'currency_conversion',
166
+ :'oct_surcharge' => :'oct_surcharge',
167
+ :'order' => :'order',
168
+ :'anticipated_amount' => :'anticipated_amount'
169
+ }
170
+ end
171
+
172
+ # Attribute type mapping.
173
+ def self.swagger_types
174
+ {
175
+ :'gift_wrap_amount' => :'String',
176
+ :'total_amount' => :'String',
177
+ :'sub_total_amount' => :'String',
178
+ :'currency' => :'String',
179
+ :'discount_amount' => :'String',
180
+ :'duty_amount' => :'String',
181
+ :'gratuity_amount' => :'String',
182
+ :'tax_amount' => :'String',
183
+ :'national_tax_included' => :'String',
184
+ :'tax_applied_after_discount' => :'String',
185
+ :'tax_applied_level' => :'String',
186
+ :'tax_type_code' => :'String',
187
+ :'freight_amount' => :'String',
188
+ :'foreign_amount' => :'String',
189
+ :'foreign_currency' => :'String',
190
+ :'exchange_rate' => :'String',
191
+ :'exchange_rate_time_stamp' => :'String',
192
+ :'surcharge' => :'Ptsv2paymentsOrderInformationAmountDetailsSurcharge',
193
+ :'settlement_amount' => :'String',
194
+ :'settlement_currency' => :'String',
195
+ :'amex_additional_amounts' => :'Array<Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts>',
196
+ :'tax_details' => :'Array<Ptsv2paymentsOrderInformationAmountDetailsTaxDetails>',
197
+ :'service_fee_amount' => :'String',
198
+ :'original_amount' => :'String',
199
+ :'original_currency' => :'String',
200
+ :'cashback_amount' => :'String',
201
+ :'currency_conversion' => :'Ptsv2paymentsOrderInformationAmountDetailsCurrencyConversion',
202
+ :'oct_surcharge' => :'Ptsv2paymentsOrderInformationAmountDetailsOctsurcharge',
203
+ :'order' => :'Ptsv2paymentsOrderInformationAmountDetailsOrder',
204
+ :'anticipated_amount' => :'String'
205
+ }
206
+ end
207
+
208
+ # Initializes the object
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ def initialize(attributes = {})
211
+ return unless attributes.is_a?(Hash)
212
+
213
+ # convert string to symbol for hash key
214
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
215
+
216
+ if attributes.has_key?(:'giftWrapAmount')
217
+ self.gift_wrap_amount = attributes[:'giftWrapAmount']
218
+ end
219
+
220
+ if attributes.has_key?(:'totalAmount')
221
+ self.total_amount = attributes[:'totalAmount']
222
+ end
223
+
224
+ if attributes.has_key?(:'subTotalAmount')
225
+ self.sub_total_amount = attributes[:'subTotalAmount']
226
+ end
227
+
228
+ if attributes.has_key?(:'currency')
229
+ self.currency = attributes[:'currency']
230
+ end
231
+
232
+ if attributes.has_key?(:'discountAmount')
233
+ self.discount_amount = attributes[:'discountAmount']
234
+ end
235
+
236
+ if attributes.has_key?(:'dutyAmount')
237
+ self.duty_amount = attributes[:'dutyAmount']
238
+ end
239
+
240
+ if attributes.has_key?(:'gratuityAmount')
241
+ self.gratuity_amount = attributes[:'gratuityAmount']
242
+ end
243
+
244
+ if attributes.has_key?(:'taxAmount')
245
+ self.tax_amount = attributes[:'taxAmount']
246
+ end
247
+
248
+ if attributes.has_key?(:'nationalTaxIncluded')
249
+ self.national_tax_included = attributes[:'nationalTaxIncluded']
250
+ end
251
+
252
+ if attributes.has_key?(:'taxAppliedAfterDiscount')
253
+ self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount']
254
+ end
255
+
256
+ if attributes.has_key?(:'taxAppliedLevel')
257
+ self.tax_applied_level = attributes[:'taxAppliedLevel']
258
+ end
259
+
260
+ if attributes.has_key?(:'taxTypeCode')
261
+ self.tax_type_code = attributes[:'taxTypeCode']
262
+ end
263
+
264
+ if attributes.has_key?(:'freightAmount')
265
+ self.freight_amount = attributes[:'freightAmount']
266
+ end
267
+
268
+ if attributes.has_key?(:'foreignAmount')
269
+ self.foreign_amount = attributes[:'foreignAmount']
270
+ end
271
+
272
+ if attributes.has_key?(:'foreignCurrency')
273
+ self.foreign_currency = attributes[:'foreignCurrency']
274
+ end
275
+
276
+ if attributes.has_key?(:'exchangeRate')
277
+ self.exchange_rate = attributes[:'exchangeRate']
278
+ end
279
+
280
+ if attributes.has_key?(:'exchangeRateTimeStamp')
281
+ self.exchange_rate_time_stamp = attributes[:'exchangeRateTimeStamp']
282
+ end
283
+
284
+ if attributes.has_key?(:'surcharge')
285
+ self.surcharge = attributes[:'surcharge']
286
+ end
287
+
288
+ if attributes.has_key?(:'settlementAmount')
289
+ self.settlement_amount = attributes[:'settlementAmount']
290
+ end
291
+
292
+ if attributes.has_key?(:'settlementCurrency')
293
+ self.settlement_currency = attributes[:'settlementCurrency']
294
+ end
295
+
296
+ if attributes.has_key?(:'amexAdditionalAmounts')
297
+ if (value = attributes[:'amexAdditionalAmounts']).is_a?(Array)
298
+ self.amex_additional_amounts = value
299
+ end
300
+ end
301
+
302
+ if attributes.has_key?(:'taxDetails')
303
+ if (value = attributes[:'taxDetails']).is_a?(Array)
304
+ self.tax_details = value
305
+ end
306
+ end
307
+
308
+ if attributes.has_key?(:'serviceFeeAmount')
309
+ self.service_fee_amount = attributes[:'serviceFeeAmount']
310
+ end
311
+
312
+ if attributes.has_key?(:'originalAmount')
313
+ self.original_amount = attributes[:'originalAmount']
314
+ end
315
+
316
+ if attributes.has_key?(:'originalCurrency')
317
+ self.original_currency = attributes[:'originalCurrency']
318
+ end
319
+
320
+ if attributes.has_key?(:'cashbackAmount')
321
+ self.cashback_amount = attributes[:'cashbackAmount']
322
+ end
323
+
324
+ if attributes.has_key?(:'currencyConversion')
325
+ self.currency_conversion = attributes[:'currencyConversion']
326
+ end
327
+
328
+ if attributes.has_key?(:'oct-surcharge')
329
+ self.oct_surcharge = attributes[:'oct-surcharge']
330
+ end
331
+
332
+ if attributes.has_key?(:'order')
333
+ self.order = attributes[:'order']
334
+ end
335
+
336
+ if attributes.has_key?(:'anticipatedAmount')
337
+ self.anticipated_amount = attributes[:'anticipatedAmount']
338
+ end
339
+ end
340
+
341
+ # Show invalid properties with the reasons. Usually used together with valid?
342
+ # @return Array for valid properties with the reasons
343
+ def list_invalid_properties
344
+ invalid_properties = Array.new
345
+ invalid_properties
346
+ end
347
+
348
+ # Check to see if the all the properties in the model are valid
349
+ # @return true if the model is valid
350
+ def valid?
351
+ true
352
+ end
353
+
354
+ # Custom attribute writer method with validation
355
+ # @param [Object] gift_wrap_amount Value to be assigned
356
+ def gift_wrap_amount=(gift_wrap_amount)
357
+ @gift_wrap_amount = gift_wrap_amount
358
+ end
359
+
360
+ # Custom attribute writer method with validation
361
+ # @param [Object] total_amount Value to be assigned
362
+ def total_amount=(total_amount)
363
+ @total_amount = total_amount
364
+ end
365
+
366
+ # Custom attribute writer method with validation
367
+ # @param [Object] sub_total_amount Value to be assigned
368
+ def sub_total_amount=(sub_total_amount)
369
+ @sub_total_amount = sub_total_amount
370
+ end
371
+
372
+ # Custom attribute writer method with validation
373
+ # @param [Object] currency Value to be assigned
374
+ def currency=(currency)
375
+ @currency = currency
376
+ end
377
+
378
+ # Custom attribute writer method with validation
379
+ # @param [Object] discount_amount Value to be assigned
380
+ def discount_amount=(discount_amount)
381
+ @discount_amount = discount_amount
382
+ end
383
+
384
+ # Custom attribute writer method with validation
385
+ # @param [Object] duty_amount Value to be assigned
386
+ def duty_amount=(duty_amount)
387
+ @duty_amount = duty_amount
388
+ end
389
+
390
+ # Custom attribute writer method with validation
391
+ # @param [Object] gratuity_amount Value to be assigned
392
+ def gratuity_amount=(gratuity_amount)
393
+ @gratuity_amount = gratuity_amount
394
+ end
395
+
396
+ # Custom attribute writer method with validation
397
+ # @param [Object] tax_amount Value to be assigned
398
+ def tax_amount=(tax_amount)
399
+ @tax_amount = tax_amount
400
+ end
401
+
402
+ # Custom attribute writer method with validation
403
+ # @param [Object] national_tax_included Value to be assigned
404
+ def national_tax_included=(national_tax_included)
405
+ @national_tax_included = national_tax_included
406
+ end
407
+
408
+ # Custom attribute writer method with validation
409
+ # @param [Object] tax_applied_after_discount Value to be assigned
410
+ def tax_applied_after_discount=(tax_applied_after_discount)
411
+ @tax_applied_after_discount = tax_applied_after_discount
412
+ end
413
+
414
+ # Custom attribute writer method with validation
415
+ # @param [Object] tax_applied_level Value to be assigned
416
+ def tax_applied_level=(tax_applied_level)
417
+ @tax_applied_level = tax_applied_level
418
+ end
419
+
420
+ # Custom attribute writer method with validation
421
+ # @param [Object] tax_type_code Value to be assigned
422
+ def tax_type_code=(tax_type_code)
423
+ @tax_type_code = tax_type_code
424
+ end
425
+
426
+ # Custom attribute writer method with validation
427
+ # @param [Object] freight_amount Value to be assigned
428
+ def freight_amount=(freight_amount)
429
+ @freight_amount = freight_amount
430
+ end
431
+
432
+ # Custom attribute writer method with validation
433
+ # @param [Object] foreign_amount Value to be assigned
434
+ def foreign_amount=(foreign_amount)
435
+ @foreign_amount = foreign_amount
436
+ end
437
+
438
+ # Custom attribute writer method with validation
439
+ # @param [Object] foreign_currency Value to be assigned
440
+ def foreign_currency=(foreign_currency)
441
+ @foreign_currency = foreign_currency
442
+ end
443
+
444
+ # Custom attribute writer method with validation
445
+ # @param [Object] exchange_rate Value to be assigned
446
+ def exchange_rate=(exchange_rate)
447
+ @exchange_rate = exchange_rate
448
+ end
449
+
450
+ # Custom attribute writer method with validation
451
+ # @param [Object] exchange_rate_time_stamp Value to be assigned
452
+ def exchange_rate_time_stamp=(exchange_rate_time_stamp)
453
+ @exchange_rate_time_stamp = exchange_rate_time_stamp
454
+ end
455
+
456
+ # Custom attribute writer method with validation
457
+ # @param [Object] settlement_amount Value to be assigned
458
+ def settlement_amount=(settlement_amount)
459
+ @settlement_amount = settlement_amount
460
+ end
461
+
462
+ # Custom attribute writer method with validation
463
+ # @param [Object] settlement_currency Value to be assigned
464
+ def settlement_currency=(settlement_currency)
465
+ @settlement_currency = settlement_currency
466
+ end
467
+
468
+ # Custom attribute writer method with validation
469
+ # @param [Object] service_fee_amount Value to be assigned
470
+ def service_fee_amount=(service_fee_amount)
471
+ @service_fee_amount = service_fee_amount
472
+ end
473
+
474
+ # Custom attribute writer method with validation
475
+ # @param [Object] original_amount Value to be assigned
476
+ def original_amount=(original_amount)
477
+ @original_amount = original_amount
478
+ end
479
+
480
+ # Custom attribute writer method with validation
481
+ # @param [Object] original_currency Value to be assigned
482
+ def original_currency=(original_currency)
483
+ @original_currency = original_currency
484
+ end
485
+
486
+ # Custom attribute writer method with validation
487
+ # @param [Object] cashback_amount Value to be assigned
488
+ def cashback_amount=(cashback_amount)
489
+ @cashback_amount = cashback_amount
490
+ end
491
+
492
+ # Custom attribute writer method with validation
493
+ # @param [Object] anticipated_amount Value to be assigned
494
+ def anticipated_amount=(anticipated_amount)
495
+ @anticipated_amount = anticipated_amount
496
+ end
497
+
498
+ # Checks equality by comparing each attribute.
499
+ # @param [Object] Object to be compared
500
+ def ==(o)
501
+ return true if self.equal?(o)
502
+ self.class == o.class &&
503
+ gift_wrap_amount == o.gift_wrap_amount &&
504
+ total_amount == o.total_amount &&
505
+ sub_total_amount == o.sub_total_amount &&
506
+ currency == o.currency &&
507
+ discount_amount == o.discount_amount &&
508
+ duty_amount == o.duty_amount &&
509
+ gratuity_amount == o.gratuity_amount &&
510
+ tax_amount == o.tax_amount &&
511
+ national_tax_included == o.national_tax_included &&
512
+ tax_applied_after_discount == o.tax_applied_after_discount &&
513
+ tax_applied_level == o.tax_applied_level &&
514
+ tax_type_code == o.tax_type_code &&
515
+ freight_amount == o.freight_amount &&
516
+ foreign_amount == o.foreign_amount &&
517
+ foreign_currency == o.foreign_currency &&
518
+ exchange_rate == o.exchange_rate &&
519
+ exchange_rate_time_stamp == o.exchange_rate_time_stamp &&
520
+ surcharge == o.surcharge &&
521
+ settlement_amount == o.settlement_amount &&
522
+ settlement_currency == o.settlement_currency &&
523
+ amex_additional_amounts == o.amex_additional_amounts &&
524
+ tax_details == o.tax_details &&
525
+ service_fee_amount == o.service_fee_amount &&
526
+ original_amount == o.original_amount &&
527
+ original_currency == o.original_currency &&
528
+ cashback_amount == o.cashback_amount &&
529
+ currency_conversion == o.currency_conversion &&
530
+ oct_surcharge == o.oct_surcharge &&
531
+ order == o.order &&
532
+ anticipated_amount == o.anticipated_amount
533
+ end
534
+
535
+ # @see the `==` method
536
+ # @param [Object] Object to be compared
537
+ def eql?(o)
538
+ self == o
539
+ end
540
+
541
+ # Calculates hash code according to all attributes.
542
+ # @return [Fixnum] Hash code
543
+ def hash
544
+ [gift_wrap_amount, total_amount, sub_total_amount, currency, discount_amount, duty_amount, gratuity_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, surcharge, settlement_amount, settlement_currency, amex_additional_amounts, tax_details, service_fee_amount, original_amount, original_currency, cashback_amount, currency_conversion, oct_surcharge, order, anticipated_amount].hash
545
+ end
546
+
547
+ # Builds the object from hash
548
+ # @param [Hash] attributes Model attributes in the form of hash
549
+ # @return [Object] Returns the model itself
550
+ def build_from_hash(attributes)
551
+ return nil unless attributes.is_a?(Hash)
552
+ self.class.swagger_types.each_pair do |key, type|
553
+ if type =~ /\AArray<(.*)>/i
554
+ # check to ensure the input is an array given that the the attribute
555
+ # is documented as an array but the input is not
556
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
557
+ self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
558
+ end
559
+ elsif !attributes[self.class.attribute_map[key]].nil?
560
+ self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
561
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
562
+ end
563
+
564
+ self
565
+ end
566
+
567
+ # Deserializes the data based on type
568
+ # @param string type Data type
569
+ # @param string value Value to be deserialized
570
+ # @return [Object] Deserialized data
571
+ def _deserialize(type, value)
572
+ case type.to_sym
573
+ when :DateTime
574
+ DateTime.parse(value)
575
+ when :Date
576
+ Date.parse(value)
577
+ when :String
578
+ value.to_s
579
+ when :Integer
580
+ value.to_i
581
+ when :Float
582
+ value.to_f
583
+ when :BOOLEAN
584
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
585
+ true
586
+ else
587
+ false
588
+ end
589
+ when :Object
590
+ # generic object (usually a Hash), return directly
591
+ value
592
+ when /\AArray<(?<inner_type>.+)>\z/
593
+ inner_type = Regexp.last_match[:inner_type]
594
+ value.map { |v| _deserialize(inner_type, v) }
595
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
596
+ k_type = Regexp.last_match[:k_type]
597
+ v_type = Regexp.last_match[:v_type]
598
+ {}.tap do |hash|
599
+ value.each do |k, v|
600
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
601
+ end
602
+ end
603
+ else # model
604
+ temp_model = CyberSource.const_get(type).new
605
+ temp_model.build_from_hash(value)
606
+ end
607
+ end
608
+
609
+ # Returns the string representation of the object
610
+ # @return [String] String presentation of the object
611
+ def to_s
612
+ to_hash.to_s
613
+ end
614
+
615
+ # to_body is an alias to to_hash (backward compatibility)
616
+ # @return [Hash] Returns the object in the form of hash
617
+ def to_body
618
+ to_hash
619
+ end
620
+
621
+ # Returns the object in the form of hash
622
+ # @return [Hash] Returns the object in the form of hash
623
+ def to_hash
624
+ hash = {}
625
+ self.class.attribute_map.each_pair do |attr, param|
626
+ value = self.send(attr)
627
+ next if value.nil?
628
+ hash[param] = _to_hash(value)
629
+ end
630
+ hash
631
+ end
632
+
633
+ # Outputs non-array value in the form of hash
634
+ # For object, use to_hash. Otherwise, just return the value
635
+ # @param [Object] value Any valid value
636
+ # @return [Hash] Returns the value in the form of hash
637
+ def _to_hash(value)
638
+ if value.is_a?(Array)
639
+ value.compact.map { |v| _to_hash(v) }
640
+ elsif value.is_a?(Hash)
641
+ {}.tap do |hash|
642
+ value.each { |k, v| hash[k] = _to_hash(v) }
643
+ end
644
+ elsif value.respond_to? :to_hash
645
+ value.to_hash
646
+ else
647
+ value
648
+ end
649
+ end
650
+ end
651
+ end