cybersource_rest_client 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client.rb +68 -8
  3. data/lib/cybersource_rest_client/api/capture_api.rb +19 -8
  4. data/lib/cybersource_rest_client/api/conversion_details_api.rb +112 -0
  5. data/lib/cybersource_rest_client/api/credit_api.rb +19 -8
  6. data/lib/cybersource_rest_client/api/flex_token_api.rb +18 -7
  7. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +88 -55
  8. data/lib/cybersource_rest_client/api/instrument_identifiers_api.rb +24 -13
  9. data/lib/cybersource_rest_client/api/key_generation_api.rb +18 -7
  10. data/lib/cybersource_rest_client/api/net_fundings_api.rb +115 -0
  11. data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +20 -9
  12. data/lib/cybersource_rest_client/api/payment_instruments_api.rb +144 -89
  13. data/lib/cybersource_rest_client/api/payments_api.rb +19 -8
  14. data/lib/cybersource_rest_client/api/process_a_payout_api.rb +21 -9
  15. data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +27 -10
  16. data/lib/cybersource_rest_client/api/refund_api.rb +37 -15
  17. data/lib/cybersource_rest_client/api/report_definitions_api.rb +50 -19
  18. data/lib/cybersource_rest_client/api/report_downloads_api.rb +25 -10
  19. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +104 -43
  20. data/lib/cybersource_rest_client/api/reports_api.rb +83 -27
  21. data/lib/cybersource_rest_client/api/reversal_api.rb +19 -8
  22. data/lib/cybersource_rest_client/api/search_transactions_api.rb +39 -17
  23. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +45 -15
  24. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +89 -13
  25. data/lib/cybersource_rest_client/api/transaction_details_api.rb +19 -8
  26. data/lib/cybersource_rest_client/api/user_management_api.rb +19 -8
  27. data/lib/cybersource_rest_client/api/void_api.rb +73 -29
  28. data/lib/cybersource_rest_client/api_client.rb +24 -12
  29. data/lib/cybersource_rest_client/configuration.rb +1 -1
  30. data/lib/cybersource_rest_client/models/capture_payment_request.rb +14 -5
  31. data/lib/cybersource_rest_client/models/create_credit_request.rb +1 -1
  32. data/lib/cybersource_rest_client/models/create_payment_request.rb +23 -5
  33. data/lib/cybersource_rest_client/models/inline_response_400.rb +59 -14
  34. data/lib/cybersource_rest_client/models/inline_response_400_1.rb +202 -0
  35. data/lib/cybersource_rest_client/models/{reporting_v3_notificationof_changes_get400_response_fields.rb → inline_response_400_fields.rb} +1 -1
  36. data/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response_transaction_batches.rb +7 -7
  37. data/lib/cybersource_rest_client/models/pts_v1_transaction_batches_id_get200_response.rb +286 -0
  38. data/lib/cybersource_rest_client/models/{tmsv1instrumentidentifiers_authorization_options_merchant_initiated_transaction.rb → pts_v1_transaction_batches_id_get200_response__links.rb} +10 -9
  39. data/lib/cybersource_rest_client/models/pts_v1_transaction_batches_id_get200_response__links_transactions.rb +193 -0
  40. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb +20 -2
  41. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_credit_amount_details.rb +1 -1
  42. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information.rb +183 -0
  43. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_processing_information.rb +183 -0
  44. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_processing_information_bank_transfer_options.rb +199 -0
  45. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response.rb +1 -1
  46. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details.rb +1 -1
  47. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post400_response.rb +2 -2
  48. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +34 -7
  49. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_client_reference_information.rb +40 -5
  50. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb +1 -1
  51. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information_details.rb +1 -1
  52. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +519 -0
  53. data/lib/cybersource_rest_client/models/{pts_v2_payments_post201_response_processor_information_issuer.rb → pts_v2_payments_post201_response_issuer_information.rb} +31 -6
  54. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_amount_details.rb +1 -1
  55. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_invoice_details.rb +1 -1
  56. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +13 -4
  57. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_account_features.rb +1 -1
  58. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_bank.rb +208 -0
  59. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_bank_account.rb +199 -0
  60. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +2 -17
  61. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv.rb +1 -1
  62. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information.rb +183 -0
  63. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information_bank_transfer_options.rb +224 -0
  64. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +75 -16
  65. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_ach_verification.rb +224 -0
  66. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_avs.rb +0 -15
  67. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results.rb +2 -2
  68. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_routing.rb +249 -0
  69. data/lib/cybersource_rest_client/models/pts_v2_payments_post400_response.rb +2 -2
  70. data/lib/cybersource_rest_client/models/pts_v2_payments_post502_response.rb +2 -2
  71. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +1 -1
  72. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +63 -4
  73. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_refund_amount_details.rb +1 -1
  74. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb +2 -2
  75. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb +11 -2
  76. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_authorization_information.rb +29 -4
  77. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_issuer_information.rb +199 -0
  78. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_reversal_amount_details.rb +1 -1
  79. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb +2 -2
  80. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response.rb +1 -1
  81. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_void_amount_details.rb +1 -1
  82. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post400_response.rb +2 -2
  83. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response.rb +350 -0
  84. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_error_information.rb +239 -0
  85. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_error_information_details.rb +228 -0
  86. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information.rb +183 -0
  87. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information_merchant_descriptor.rb +234 -0
  88. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_order_information.rb +183 -0
  89. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_order_information_amount_details.rb +274 -0
  90. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information.rb +299 -0
  91. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_recipient_information.rb +183 -0
  92. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_recipient_information_card.rb +224 -0
  93. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_status_information.rb +228 -0
  94. data/lib/cybersource_rest_client/models/pts_v2_payouts_post400_response.rb +1 -1
  95. data/lib/cybersource_rest_client/models/pts_v2_payouts_post502_response.rb +260 -0
  96. data/lib/cybersource_rest_client/models/pts_v2_payouts_post_response.rb +1 -1
  97. data/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information.rb +186 -4
  98. data/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information_emv.rb +3 -3
  99. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +18 -9
  100. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information_bank_transfer_options.rb +349 -0
  101. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information.rb +2 -2
  102. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +9 -9
  103. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information.rb +29 -4
  104. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb +3 -2
  105. data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb +15 -6
  106. data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information_partner.rb +249 -0
  107. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +7 -7
  108. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +364 -0
  109. data/lib/cybersource_rest_client/models/{ptsv2payments_processing_information_issuer.rb → ptsv2payments_issuer_information.rb} +2 -2
  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 +66 -7
  112. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +0 -6
  113. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_service_fee_descriptor.rb +249 -0
  114. data/lib/cybersource_rest_client/models/{ptsv2payments_processing_information_authorization_options_merchant_initiated_transaction.rb → ptsv2payments_merchant_initiated_transaction.rb} +3 -3
  115. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +84 -9
  116. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_surcharge.rb +2 -2
  117. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details.rb +32 -7
  118. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +12 -28
  119. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to_company.rb +349 -0
  120. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +55 -5
  121. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +139 -14
  122. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_ship_to.rb +2 -2
  123. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.rb +2 -2
  124. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +13 -4
  125. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +208 -0
  126. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank_account.rb +299 -0
  127. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +47 -37
  128. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_customer.rb +1 -7
  129. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_fluid_data.rb +4 -4
  130. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +3 -18
  131. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +253 -16
  132. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb +12 -12
  133. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +20 -20
  134. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +32 -12
  135. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.rb +4 -4
  136. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_bank_transfer_options.rb +424 -0
  137. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb +1 -1
  138. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_recurring_options.rb +2 -2
  139. data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +3 -3
  140. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information.rb +2 -2
  141. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +8 -8
  142. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_buyer_information.rb +1 -1
  143. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +579 -0
  144. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_merchant_information.rb +39 -5
  145. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +59 -9
  146. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to.rb +11 -27
  147. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_invoice_details.rb +1 -1
  148. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_ship_to.rb +1 -1
  149. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb +2 -2
  150. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +5 -5
  151. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_authorization_options.rb +2 -2
  152. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_merchant_information.rb +30 -5
  153. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb +9 -9
  154. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +22 -4
  155. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +5 -20
  156. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb +4 -4
  157. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_recurring_options.rb +1 -1
  158. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_information.rb +14 -5
  159. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_information_partner.rb +224 -0
  160. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information.rb +10 -1
  161. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_amount_details.rb +199 -0
  162. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items.rb +2 -2
  163. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_processing_information.rb +5 -5
  164. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information.rb +0 -15
  165. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information_amount_details.rb +2 -2
  166. data/lib/cybersource_rest_client/models/ptsv2payouts_client_reference_information.rb +199 -0
  167. data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.rb +0 -15
  168. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +0 -15
  169. data/lib/cybersource_rest_client/models/refund_capture_request.rb +1 -1
  170. data/lib/cybersource_rest_client/models/refund_payment_request.rb +1 -1
  171. data/lib/cybersource_rest_client/models/reporting_v3_conversion_details_get200_response.rb +213 -0
  172. data/lib/cybersource_rest_client/models/reporting_v3_conversion_details_get200_response_conversion_details.rb +275 -0
  173. data/lib/cybersource_rest_client/models/reporting_v3_conversion_details_get200_response_notes.rb +204 -0
  174. data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response.rb +266 -0
  175. data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response_net_funding_summaries.rb +281 -0
  176. data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response_total_purchases.rb +203 -0
  177. data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response.rb +273 -0
  178. data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_authorizations.rb +255 -0
  179. data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_fee_and_funding_details.rb +290 -0
  180. data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_others.rb +260 -0
  181. data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_request_details.rb +235 -0
  182. data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_settlement_statuses.rb +240 -0
  183. data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_settlements.rb +304 -0
  184. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb +1 -0
  185. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response_attributes.rb +2 -0
  186. data/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb +13 -13
  187. data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response_reports.rb +18 -8
  188. data/lib/cybersource_rest_client/models/reporting_v3_reports_id_get200_response.rb +15 -15
  189. data/lib/cybersource_rest_client/models/{reporting_v3_report_subscriptions_get200_response_report_preferences.rb → reporting_v3_reports_id_get200_response_report_preferences.rb} +1 -1
  190. data/lib/cybersource_rest_client/models/{reporting_v3_notificationof_changes_get400_response.rb → reportingv3_report_downloads_get400_response.rb} +42 -52
  191. data/lib/cybersource_rest_client/models/reportingv3_report_downloads_get400_response_details.rb +195 -0
  192. data/lib/cybersource_rest_client/models/reportingv3reports_report_preferences.rb +229 -0
  193. data/lib/cybersource_rest_client/models/request_body.rb +74 -104
  194. data/lib/cybersource_rest_client/models/request_body_1.rb +159 -55
  195. data/lib/cybersource_rest_client/models/tms_v1_paymentinstruments_get200_response.rb +331 -0
  196. data/lib/cybersource_rest_client/models/tms_v1_paymentinstruments_post201_response.rb +1 -1
  197. data/lib/cybersource_rest_client/models/tms_v1_paymentinstruments_post201_response_card.rb +302 -0
  198. data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_bank_account.rb +48 -0
  199. data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_card.rb +24 -0
  200. data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_merchant_initiated_transaction.rb +199 -0
  201. data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator.rb +1 -1
  202. data/lib/cybersource_rest_client/models/tmsv1paymentinstruments_bill_to.rb +183 -0
  203. data/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information.rb +39 -0
  204. data/lib/cybersource_rest_client/models/tmsv1paymentinstruments_instrument_identifier.rb +24 -0
  205. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_error_information.rb +1 -1
  206. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor.rb +0 -15
  207. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information.rb +1 -1
  208. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +0 -30
  209. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_customer.rb +184 -0
  210. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information.rb +1 -1
  211. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_amount_details.rb +224 -0
  212. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information.rb +1 -1
  213. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +0 -15
  214. data/lib/cybersource_rest_client/models/tss_v2_transactions_post400_response.rb +1 -1
  215. data/lib/cybersource_rest_client/models/ums_v1_users_get400_response.rb +271 -0
  216. metadata +70 -10
  217. data/lib/cybersource_rest_client/api/transaction_batch_api.rb +0 -77
@@ -0,0 +1,229 @@
1
+ =begin
2
+ #CyberSource Flex API
3
+
4
+ #Simple PAN tokenization service
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
+ # Report Preferences
17
+ class Reportingv3reportsReportPreferences
18
+ # Indicator to determine whether negative sign infront of amount for all refunded transaction
19
+ attr_accessor :signed_amounts
20
+
21
+ # Specify the field naming convention to be followed in reports (applicable to only csv report formats
22
+ attr_accessor :field_name_convention
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'signed_amounts' => :'signedAmounts',
50
+ :'field_name_convention' => :'fieldNameConvention'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'signed_amounts' => :'BOOLEAN',
58
+ :'field_name_convention' => :'String'
59
+ }
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ return unless attributes.is_a?(Hash)
66
+
67
+ # convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
69
+
70
+ if attributes.has_key?(:'signedAmounts')
71
+ self.signed_amounts = attributes[:'signedAmounts']
72
+ end
73
+
74
+ if attributes.has_key?(:'fieldNameConvention')
75
+ self.field_name_convention = attributes[:'fieldNameConvention']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ field_name_convention_validator = EnumAttributeValidator.new('String', ['SOAPI', 'SCMP'])
90
+ return false unless field_name_convention_validator.valid?(@field_name_convention)
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method checking allowed values (enum).
95
+ # @param [Object] field_name_convention Object to be assigned
96
+ def field_name_convention=(field_name_convention)
97
+ validator = EnumAttributeValidator.new('String', ['SOAPI', 'SCMP'])
98
+ unless validator.valid?(field_name_convention)
99
+ fail ArgumentError, 'invalid value for "field_name_convention", must be one of #{validator.allowable_values}.'
100
+ end
101
+ @field_name_convention = field_name_convention
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ signed_amounts == o.signed_amounts &&
110
+ field_name_convention == o.field_name_convention
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Fixnum] Hash code
121
+ def hash
122
+ [signed_amounts, field_name_convention].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ self.class.swagger_types.each_pair do |key, type|
131
+ if type =~ /\AArray<(.*)>/i
132
+ # check to ensure the input is an array given that the the attribute
133
+ # is documented as an array but the input is not
134
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
135
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
136
+ end
137
+ elsif !attributes[self.class.attribute_map[key]].nil?
138
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
139
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
140
+ end
141
+
142
+ self
143
+ end
144
+
145
+ # Deserializes the data based on type
146
+ # @param string type Data type
147
+ # @param string value Value to be deserialized
148
+ # @return [Object] Deserialized data
149
+ def _deserialize(type, value)
150
+ case type.to_sym
151
+ when :DateTime
152
+ DateTime.parse(value)
153
+ when :Date
154
+ Date.parse(value)
155
+ when :String
156
+ value.to_s
157
+ when :Integer
158
+ value.to_i
159
+ when :Float
160
+ value.to_f
161
+ when :BOOLEAN
162
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
163
+ true
164
+ else
165
+ false
166
+ end
167
+ when :Object
168
+ # generic object (usually a Hash), return directly
169
+ value
170
+ when /\AArray<(?<inner_type>.+)>\z/
171
+ inner_type = Regexp.last_match[:inner_type]
172
+ value.map { |v| _deserialize(inner_type, v) }
173
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
174
+ k_type = Regexp.last_match[:k_type]
175
+ v_type = Regexp.last_match[:v_type]
176
+ {}.tap do |hash|
177
+ value.each do |k, v|
178
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
179
+ end
180
+ end
181
+ else # model
182
+ temp_model = CyberSource.const_get(type).new
183
+ temp_model.build_from_hash(value)
184
+ end
185
+ end
186
+
187
+ # Returns the string representation of the object
188
+ # @return [String] String presentation of the object
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_hash (backward compatibility)
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_body
196
+ to_hash
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ next if value.nil?
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map { |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+ end
229
+ end
@@ -14,29 +14,36 @@ require 'date'
14
14
 
15
15
  module CyberSource
16
16
  class RequestBody
17
+ # Valid CyberSource Organization Id
17
18
  attr_accessor :organization_id
18
19
 
19
20
  attr_accessor :report_definition_name
20
21
 
22
+ # List of fields which needs to get included in a report
21
23
  attr_accessor :report_fields
22
24
 
25
+ # Format of the report
23
26
  attr_accessor :report_mime_type
24
27
 
25
- attr_accessor :report_frequency
26
-
28
+ # Name of the report
27
29
  attr_accessor :report_name
28
30
 
31
+ # Timezone of the report
29
32
  attr_accessor :timezone
30
33
 
31
- attr_accessor :start_time
34
+ # Start time of the report
35
+ attr_accessor :report_start_time
32
36
 
33
- attr_accessor :start_day
37
+ # End time of the report
38
+ attr_accessor :report_end_time
34
39
 
40
+ # List of filters to apply
35
41
  attr_accessor :report_filters
36
42
 
37
43
  attr_accessor :report_preferences
38
44
 
39
- attr_accessor :selected_merchant_group_name
45
+ # Specifies the group name
46
+ attr_accessor :group_name
40
47
 
41
48
  class EnumAttributeValidator
42
49
  attr_reader :datatype
@@ -67,14 +74,13 @@ module CyberSource
67
74
  :'report_definition_name' => :'reportDefinitionName',
68
75
  :'report_fields' => :'reportFields',
69
76
  :'report_mime_type' => :'reportMimeType',
70
- :'report_frequency' => :'reportFrequency',
71
77
  :'report_name' => :'reportName',
72
78
  :'timezone' => :'timezone',
73
- :'start_time' => :'startTime',
74
- :'start_day' => :'startDay',
79
+ :'report_start_time' => :'reportStartTime',
80
+ :'report_end_time' => :'reportEndTime',
75
81
  :'report_filters' => :'reportFilters',
76
82
  :'report_preferences' => :'reportPreferences',
77
- :'selected_merchant_group_name' => :'selectedMerchantGroupName'
83
+ :'group_name' => :'groupName'
78
84
  }
79
85
  end
80
86
 
@@ -85,14 +91,13 @@ module CyberSource
85
91
  :'report_definition_name' => :'String',
86
92
  :'report_fields' => :'Array<String>',
87
93
  :'report_mime_type' => :'String',
88
- :'report_frequency' => :'String',
89
94
  :'report_name' => :'String',
90
95
  :'timezone' => :'String',
91
- :'start_time' => :'DateTime',
92
- :'start_day' => :'Integer',
96
+ :'report_start_time' => :'DateTime',
97
+ :'report_end_time' => :'DateTime',
93
98
  :'report_filters' => :'Hash<String, Array<String>>',
94
- :'report_preferences' => :'ReportingV3ReportSubscriptionsGet200ResponseReportPreferences',
95
- :'selected_merchant_group_name' => :'String'
99
+ :'report_preferences' => :'Reportingv3reportsReportPreferences',
100
+ :'group_name' => :'String'
96
101
  }
97
102
  end
98
103
 
@@ -122,10 +127,6 @@ module CyberSource
122
127
  self.report_mime_type = attributes[:'reportMimeType']
123
128
  end
124
129
 
125
- if attributes.has_key?(:'reportFrequency')
126
- self.report_frequency = attributes[:'reportFrequency']
127
- end
128
-
129
130
  if attributes.has_key?(:'reportName')
130
131
  self.report_name = attributes[:'reportName']
131
132
  end
@@ -134,12 +135,12 @@ module CyberSource
134
135
  self.timezone = attributes[:'timezone']
135
136
  end
136
137
 
137
- if attributes.has_key?(:'startTime')
138
- self.start_time = attributes[:'startTime']
138
+ if attributes.has_key?(:'reportStartTime')
139
+ self.report_start_time = attributes[:'reportStartTime']
139
140
  end
140
141
 
141
- if attributes.has_key?(:'startDay')
142
- self.start_day = attributes[:'startDay']
142
+ if attributes.has_key?(:'reportEndTime')
143
+ self.report_end_time = attributes[:'reportEndTime']
143
144
  end
144
145
 
145
146
  if attributes.has_key?(:'reportFilters')
@@ -152,8 +153,8 @@ module CyberSource
152
153
  self.report_preferences = attributes[:'reportPreferences']
153
154
  end
154
155
 
155
- if attributes.has_key?(:'selectedMerchantGroupName')
156
- self.selected_merchant_group_name = attributes[:'selectedMerchantGroupName']
156
+ if attributes.has_key?(:'groupName')
157
+ self.group_name = attributes[:'groupName']
157
158
  end
158
159
  end
159
160
 
@@ -161,49 +162,37 @@ module CyberSource
161
162
  # @return Array for valid properties with the reasons
162
163
  def list_invalid_properties
163
164
  invalid_properties = Array.new
164
- if @report_definition_name.nil?
165
- invalid_properties.push('invalid value for "report_definition_name", report_definition_name cannot be nil.')
166
- end
165
+ #if !@organization_id.nil? && @organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/)
166
+ #invalid_properties.push('invalid value for "organization_id", must conform to the pattern /[a-zA-Z0-9-_]+/.')
167
+ #end
167
168
 
168
- if @report_definition_name.to_s.length > 80
169
+ if !@report_definition_name.nil? && @report_definition_name.to_s.length > 80
169
170
  invalid_properties.push('invalid value for "report_definition_name", the character length must be smaller than or equal to 80.')
170
171
  end
171
172
 
172
- if @report_definition_name.to_s.length < 1
173
+ if !@report_definition_name.nil? && @report_definition_name.to_s.length < 1
173
174
  invalid_properties.push('invalid value for "report_definition_name", the character length must be great than or equal to 1.')
174
175
  end
175
176
 
176
- if @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/)
177
- invalid_properties.push('invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.')
178
- end
179
-
180
- if @report_fields.nil?
181
- invalid_properties.push('invalid value for "report_fields", report_fields cannot be nil.')
182
- end
183
-
184
- if @report_name.nil?
185
- invalid_properties.push('invalid value for "report_name", report_name cannot be nil.')
186
- end
177
+ #if !@report_definition_name.nil? && @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/)
178
+ #invalid_properties.push('invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.')
179
+ #end
187
180
 
188
- if @report_name.to_s.length > 128
181
+ if !@report_name.nil? && @report_name.to_s.length > 128
189
182
  invalid_properties.push('invalid value for "report_name", the character length must be smaller than or equal to 128.')
190
183
  end
191
184
 
192
- if @report_name.to_s.length < 1
185
+ if !@report_name.nil? && @report_name.to_s.length < 1
193
186
  invalid_properties.push('invalid value for "report_name", the character length must be great than or equal to 1.')
194
187
  end
195
188
 
196
- if !@start_day.nil? && @start_day > 7
197
- invalid_properties.push('invalid value for "start_day", must be smaller than or equal to 7.')
198
- end
189
+ #if !@report_name.nil? && @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
190
+ #invalid_properties.push('invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.')
191
+ #end
199
192
 
200
- if !@start_day.nil? && @start_day < 1
201
- invalid_properties.push('invalid value for "start_day", must be greater than or equal to 1.')
202
- end
203
-
204
- if !@selected_merchant_group_name.nil? && @selected_merchant_group_name !~ Regexp.new(/[0-9]*/)
205
- invalid_properties.push('invalid value for "selected_merchant_group_name", must conform to the pattern /[0-9]*/.')
206
- end
193
+ #if !@group_name.nil? && @group_name !~ Regexp.new(/[0-9]*/)
194
+ #invalid_properties.push('invalid value for "group_name", must conform to the pattern /[0-9]*/.')
195
+ #end
207
196
 
208
197
  invalid_properties
209
198
  end
@@ -211,47 +200,43 @@ module CyberSource
211
200
  # Check to see if the all the properties in the model are valid
212
201
  # @return true if the model is valid
213
202
  def valid?
214
- # return false if !@organization_id.nil? && @organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/)
215
- return false if @report_definition_name.nil?
216
- return false if @report_definition_name.to_s.length > 80
217
- return false if @report_definition_name.to_s.length < 1
218
- return false if @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/)
219
- return false if @report_fields.nil?
203
+ #return false if !@organization_id.nil? && @organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/)
204
+ return false if !@report_definition_name.nil? && @report_definition_name.to_s.length > 80
205
+ return false if !@report_definition_name.nil? && @report_definition_name.to_s.length < 1
206
+ #return false if !@report_definition_name.nil? && @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/)
220
207
  report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv'])
221
208
  return false unless report_mime_type_validator.valid?(@report_mime_type)
222
- return false if @report_name.nil?
223
- return false if @report_name.to_s.length > 128
224
- return false if @report_name.to_s.length < 1
225
- return false if !@start_day.nil? && @start_day > 7
226
- return false if !@start_day.nil? && @start_day < 1
227
- return false if !@selected_merchant_group_name.nil? && @selected_merchant_group_name !~ Regexp.new(/[0-9]*/)
209
+ return false if !@report_name.nil? && @report_name.to_s.length > 128
210
+ return false if !@report_name.nil? && @report_name.to_s.length < 1
211
+ #return false if !@report_name.nil? && @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
212
+ #return false if !@group_name.nil? && @group_name !~ Regexp.new(/[0-9]*/)
228
213
  true
229
214
  end
230
215
 
231
216
  # Custom attribute writer method with validation
232
217
  # @param [Object] organization_id Value to be assigned
233
218
  def organization_id=(organization_id)
219
+ #if !organization_id.nil? && organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/)
220
+ #fail ArgumentError, 'invalid value for "organization_id", must conform to the pattern /[a-zA-Z0-9-_]+/.'
221
+ #end
222
+
234
223
  @organization_id = organization_id
235
224
  end
236
225
 
237
226
  # Custom attribute writer method with validation
238
227
  # @param [Object] report_definition_name Value to be assigned
239
228
  def report_definition_name=(report_definition_name)
240
- if report_definition_name.nil?
241
- fail ArgumentError, 'report_definition_name cannot be nil'
242
- end
243
-
244
- if report_definition_name.to_s.length > 80
229
+ if !report_definition_name.nil? && report_definition_name.to_s.length > 80
245
230
  fail ArgumentError, 'invalid value for "report_definition_name", the character length must be smaller than or equal to 80.'
246
231
  end
247
232
 
248
- if report_definition_name.to_s.length < 1
233
+ if !report_definition_name.nil? && report_definition_name.to_s.length < 1
249
234
  fail ArgumentError, 'invalid value for "report_definition_name", the character length must be great than or equal to 1.'
250
235
  end
251
236
 
252
- if report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/)
253
- fail ArgumentError, 'invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.'
254
- end
237
+ #if !report_definition_name.nil? && report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/)
238
+ #fail ArgumentError, 'invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.'
239
+ #end
255
240
 
256
241
  @report_definition_name = report_definition_name
257
242
  end
@@ -269,43 +254,29 @@ module CyberSource
269
254
  # Custom attribute writer method with validation
270
255
  # @param [Object] report_name Value to be assigned
271
256
  def report_name=(report_name)
272
- if report_name.nil?
273
- fail ArgumentError, 'report_name cannot be nil'
274
- end
275
-
276
- if report_name.to_s.length > 128
257
+ if !report_name.nil? && report_name.to_s.length > 128
277
258
  fail ArgumentError, 'invalid value for "report_name", the character length must be smaller than or equal to 128.'
278
259
  end
279
260
 
280
- if report_name.to_s.length < 1
261
+ if !report_name.nil? && report_name.to_s.length < 1
281
262
  fail ArgumentError, 'invalid value for "report_name", the character length must be great than or equal to 1.'
282
263
  end
283
264
 
284
- @report_name = report_name
285
- end
286
-
287
- # Custom attribute writer method with validation
288
- # @param [Object] start_day Value to be assigned
289
- def start_day=(start_day)
290
- if !start_day.nil? && start_day > 7
291
- fail ArgumentError, 'invalid value for "start_day", must be smaller than or equal to 7.'
292
- end
293
-
294
- if !start_day.nil? && start_day < 1
295
- fail ArgumentError, 'invalid value for "start_day", must be greater than or equal to 1.'
296
- end
265
+ #if !report_name.nil? && report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
266
+ #fail ArgumentError, 'invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.'
267
+ #end
297
268
 
298
- @start_day = start_day
269
+ @report_name = report_name
299
270
  end
300
271
 
301
272
  # Custom attribute writer method with validation
302
- # @param [Object] selected_merchant_group_name Value to be assigned
303
- def selected_merchant_group_name=(selected_merchant_group_name)
304
- if !selected_merchant_group_name.nil? && selected_merchant_group_name !~ Regexp.new(/[0-9]*/)
305
- fail ArgumentError, 'invalid value for "selected_merchant_group_name", must conform to the pattern /[0-9]*/.'
306
- end
273
+ # @param [Object] group_name Value to be assigned
274
+ def group_name=(group_name)
275
+ #if !group_name.nil? && group_name !~ Regexp.new(/[0-9]*/)
276
+ #fail ArgumentError, 'invalid value for "group_name", must conform to the pattern /[0-9]*/.'
277
+ #end
307
278
 
308
- @selected_merchant_group_name = selected_merchant_group_name
279
+ @group_name = group_name
309
280
  end
310
281
 
311
282
  # Checks equality by comparing each attribute.
@@ -317,14 +288,13 @@ module CyberSource
317
288
  report_definition_name == o.report_definition_name &&
318
289
  report_fields == o.report_fields &&
319
290
  report_mime_type == o.report_mime_type &&
320
- report_frequency == o.report_frequency &&
321
291
  report_name == o.report_name &&
322
292
  timezone == o.timezone &&
323
- start_time == o.start_time &&
324
- start_day == o.start_day &&
293
+ report_start_time == o.report_start_time &&
294
+ report_end_time == o.report_end_time &&
325
295
  report_filters == o.report_filters &&
326
296
  report_preferences == o.report_preferences &&
327
- selected_merchant_group_name == o.selected_merchant_group_name
297
+ group_name == o.group_name
328
298
  end
329
299
 
330
300
  # @see the `==` method
@@ -336,7 +306,7 @@ module CyberSource
336
306
  # Calculates hash code according to all attributes.
337
307
  # @return [Fixnum] Hash code
338
308
  def hash
339
- [organization_id, report_definition_name, report_fields, report_mime_type, report_frequency, report_name, timezone, start_time, start_day, report_filters, report_preferences, selected_merchant_group_name].hash
309
+ [organization_id, report_definition_name, report_fields, report_mime_type, report_name, timezone, report_start_time, report_end_time, report_filters, report_preferences, group_name].hash
340
310
  end
341
311
 
342
312
  # Builds the object from hash