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.
- checksums.yaml +4 -4
- data/lib/cybersource_rest_client.rb +68 -8
- data/lib/cybersource_rest_client/api/capture_api.rb +19 -8
- data/lib/cybersource_rest_client/api/conversion_details_api.rb +112 -0
- data/lib/cybersource_rest_client/api/credit_api.rb +19 -8
- data/lib/cybersource_rest_client/api/flex_token_api.rb +18 -7
- data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +88 -55
- data/lib/cybersource_rest_client/api/instrument_identifiers_api.rb +24 -13
- data/lib/cybersource_rest_client/api/key_generation_api.rb +18 -7
- data/lib/cybersource_rest_client/api/net_fundings_api.rb +115 -0
- data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +20 -9
- data/lib/cybersource_rest_client/api/payment_instruments_api.rb +144 -89
- data/lib/cybersource_rest_client/api/payments_api.rb +19 -8
- data/lib/cybersource_rest_client/api/process_a_payout_api.rb +21 -9
- data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +27 -10
- data/lib/cybersource_rest_client/api/refund_api.rb +37 -15
- data/lib/cybersource_rest_client/api/report_definitions_api.rb +50 -19
- data/lib/cybersource_rest_client/api/report_downloads_api.rb +25 -10
- data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +104 -43
- data/lib/cybersource_rest_client/api/reports_api.rb +83 -27
- data/lib/cybersource_rest_client/api/reversal_api.rb +19 -8
- data/lib/cybersource_rest_client/api/search_transactions_api.rb +39 -17
- data/lib/cybersource_rest_client/api/secure_file_share_api.rb +45 -15
- data/lib/cybersource_rest_client/api/transaction_batches_api.rb +89 -13
- data/lib/cybersource_rest_client/api/transaction_details_api.rb +19 -8
- data/lib/cybersource_rest_client/api/user_management_api.rb +19 -8
- data/lib/cybersource_rest_client/api/void_api.rb +73 -29
- data/lib/cybersource_rest_client/api_client.rb +24 -12
- data/lib/cybersource_rest_client/configuration.rb +1 -1
- data/lib/cybersource_rest_client/models/capture_payment_request.rb +14 -5
- data/lib/cybersource_rest_client/models/create_credit_request.rb +1 -1
- data/lib/cybersource_rest_client/models/create_payment_request.rb +23 -5
- data/lib/cybersource_rest_client/models/inline_response_400.rb +59 -14
- data/lib/cybersource_rest_client/models/inline_response_400_1.rb +202 -0
- data/lib/cybersource_rest_client/models/{reporting_v3_notificationof_changes_get400_response_fields.rb → inline_response_400_fields.rb} +1 -1
- data/lib/cybersource_rest_client/models/pts_v1_transaction_batches_get200_response_transaction_batches.rb +7 -7
- data/lib/cybersource_rest_client/models/pts_v1_transaction_batches_id_get200_response.rb +286 -0
- data/lib/cybersource_rest_client/models/{tmsv1instrumentidentifiers_authorization_options_merchant_initiated_transaction.rb → pts_v1_transaction_batches_id_get200_response__links.rb} +10 -9
- data/lib/cybersource_rest_client/models/pts_v1_transaction_batches_id_get200_response__links_transactions.rb +193 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb +20 -2
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_credit_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information.rb +183 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_processing_information.rb +183 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_processing_information_bank_transfer_options.rb +199 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post400_response.rb +2 -2
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +34 -7
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_client_reference_information.rb +40 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +519 -0
- 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
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_invoice_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +13 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_account_features.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_bank.rb +208 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_bank_account.rb +199 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +2 -17
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information.rb +183 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information_bank_transfer_options.rb +224 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +75 -16
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_ach_verification.rb +224 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_avs.rb +0 -15
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results.rb +2 -2
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_routing.rb +249 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post400_response.rb +2 -2
- data/lib/cybersource_rest_client/models/pts_v2_payments_post502_response.rb +2 -2
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +63 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_refund_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb +2 -2
- data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb +11 -2
- data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_authorization_information.rb +29 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_issuer_information.rb +199 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_reversal_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb +2 -2
- data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_void_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post400_response.rb +2 -2
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response.rb +350 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_error_information.rb +239 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_error_information_details.rb +228 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information.rb +183 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information_merchant_descriptor.rb +234 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_order_information.rb +183 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_order_information_amount_details.rb +274 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information.rb +299 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_recipient_information.rb +183 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_recipient_information_card.rb +224 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_status_information.rb +228 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post400_response.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post502_response.rb +260 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post_response.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information.rb +186 -4
- data/lib/cybersource_rest_client/models/ptsv2credits_point_of_sale_information_emv.rb +3 -3
- data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +18 -9
- data/lib/cybersource_rest_client/models/ptsv2credits_processing_information_bank_transfer_options.rb +349 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +9 -9
- data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information.rb +29 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb +3 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb +15 -6
- data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information_partner.rb +249 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +7 -7
- data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +364 -0
- data/lib/cybersource_rest_client/models/{ptsv2payments_processing_information_issuer.rb → ptsv2payments_issuer_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_defined_information.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +66 -7
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +0 -6
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_service_fee_descriptor.rb +249 -0
- data/lib/cybersource_rest_client/models/{ptsv2payments_processing_information_authorization_options_merchant_initiated_transaction.rb → ptsv2payments_merchant_initiated_transaction.rb} +3 -3
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +84 -9
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_surcharge.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details.rb +32 -7
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +12 -28
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to_company.rb +349 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +55 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +139 -14
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_ship_to.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +13 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +208 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank_account.rb +299 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +47 -37
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_customer.rb +1 -7
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_fluid_data.rb +4 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +3 -18
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +253 -16
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb +12 -12
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +20 -20
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +32 -12
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.rb +4 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_bank_transfer_options.rb +424 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_recurring_options.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +3 -3
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +8 -8
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_buyer_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +579 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_merchant_information.rb +39 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +59 -9
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to.rb +11 -27
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_invoice_details.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_ship_to.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +5 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information_authorization_options.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_merchant_information.rb +30 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb +9 -9
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +22 -4
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +5 -20
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb +4 -4
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_recurring_options.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_information.rb +14 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_information_partner.rb +224 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information.rb +10 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_amount_details.rb +199 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_processing_information.rb +5 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information.rb +0 -15
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information_amount_details.rb +2 -2
- data/lib/cybersource_rest_client/models/ptsv2payouts_client_reference_information.rb +199 -0
- data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.rb +0 -15
- data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +0 -15
- data/lib/cybersource_rest_client/models/refund_capture_request.rb +1 -1
- data/lib/cybersource_rest_client/models/refund_payment_request.rb +1 -1
- data/lib/cybersource_rest_client/models/reporting_v3_conversion_details_get200_response.rb +213 -0
- data/lib/cybersource_rest_client/models/reporting_v3_conversion_details_get200_response_conversion_details.rb +275 -0
- data/lib/cybersource_rest_client/models/reporting_v3_conversion_details_get200_response_notes.rb +204 -0
- data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response.rb +266 -0
- data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response_net_funding_summaries.rb +281 -0
- data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response_total_purchases.rb +203 -0
- data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response.rb +273 -0
- data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_authorizations.rb +255 -0
- data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_fee_and_funding_details.rb +290 -0
- data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_others.rb +260 -0
- data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_request_details.rb +235 -0
- data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_settlement_statuses.rb +240 -0
- data/lib/cybersource_rest_client/models/reporting_v3_purchase_refund_details_get200_response_settlements.rb +304 -0
- data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb +1 -0
- data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response_attributes.rb +2 -0
- data/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb +13 -13
- data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response_reports.rb +18 -8
- data/lib/cybersource_rest_client/models/reporting_v3_reports_id_get200_response.rb +15 -15
- 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
- data/lib/cybersource_rest_client/models/{reporting_v3_notificationof_changes_get400_response.rb → reportingv3_report_downloads_get400_response.rb} +42 -52
- data/lib/cybersource_rest_client/models/reportingv3_report_downloads_get400_response_details.rb +195 -0
- data/lib/cybersource_rest_client/models/reportingv3reports_report_preferences.rb +229 -0
- data/lib/cybersource_rest_client/models/request_body.rb +74 -104
- data/lib/cybersource_rest_client/models/request_body_1.rb +159 -55
- data/lib/cybersource_rest_client/models/tms_v1_paymentinstruments_get200_response.rb +331 -0
- data/lib/cybersource_rest_client/models/tms_v1_paymentinstruments_post201_response.rb +1 -1
- data/lib/cybersource_rest_client/models/tms_v1_paymentinstruments_post201_response_card.rb +302 -0
- data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_bank_account.rb +48 -0
- data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_card.rb +24 -0
- data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_merchant_initiated_transaction.rb +199 -0
- data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_processing_information_authorization_options_initiator.rb +1 -1
- data/lib/cybersource_rest_client/models/tmsv1paymentinstruments_bill_to.rb +183 -0
- data/lib/cybersource_rest_client/models/tmsv1paymentinstruments_buyer_information.rb +39 -0
- data/lib/cybersource_rest_client/models/tmsv1paymentinstruments_instrument_identifier.rb +24 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_error_information.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_merchant_information_merchant_descriptor.rb +0 -15
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +0 -30
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_customer.rb +184 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_amount_details.rb +224 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +0 -15
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post400_response.rb +1 -1
- data/lib/cybersource_rest_client/models/ums_v1_users_get400_response.rb +271 -0
- metadata +70 -10
- data/lib/cybersource_rest_client/api/transaction_batch_api.rb +0 -77
@@ -0,0 +1,239 @@
|
|
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
|
+
class PtsV2PayoutsPost201ResponseErrorInformation
|
17
|
+
# The reason of the status.
|
18
|
+
attr_accessor :reason
|
19
|
+
|
20
|
+
# The detail message related to the status and reason listed above.
|
21
|
+
attr_accessor :message
|
22
|
+
|
23
|
+
attr_accessor :details
|
24
|
+
|
25
|
+
class EnumAttributeValidator
|
26
|
+
attr_reader :datatype
|
27
|
+
attr_reader :allowable_values
|
28
|
+
|
29
|
+
def initialize(datatype, allowable_values)
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
31
|
+
case datatype.to_s
|
32
|
+
when /Integer/i
|
33
|
+
value.to_i
|
34
|
+
when /Float/i
|
35
|
+
value.to_f
|
36
|
+
else
|
37
|
+
value
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def valid?(value)
|
43
|
+
!value || allowable_values.include?(value)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'reason' => :'reason',
|
51
|
+
:'message' => :'message',
|
52
|
+
:'details' => :'details'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute type mapping.
|
57
|
+
def self.swagger_types
|
58
|
+
{
|
59
|
+
:'reason' => :'String',
|
60
|
+
:'message' => :'String',
|
61
|
+
:'details' => :'Array<PtsV2PayoutsPost201ResponseErrorInformationDetails>'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
return unless attributes.is_a?(Hash)
|
69
|
+
|
70
|
+
# convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
72
|
+
|
73
|
+
if attributes.has_key?(:'reason')
|
74
|
+
self.reason = attributes[:'reason']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'message')
|
78
|
+
self.message = attributes[:'message']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'details')
|
82
|
+
if (value = attributes[:'details']).is_a?(Array)
|
83
|
+
self.details = value
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
89
|
+
# @return Array for valid properties with the reasons
|
90
|
+
def list_invalid_properties
|
91
|
+
invalid_properties = Array.new
|
92
|
+
invalid_properties
|
93
|
+
end
|
94
|
+
|
95
|
+
# Check to see if the all the properties in the model are valid
|
96
|
+
# @return true if the model is valid
|
97
|
+
def valid?
|
98
|
+
reason_validator = EnumAttributeValidator.new('String', ['EXPIRED_CARD', 'PROCESSOR_DECLINED', 'STOLEN_LOST_CARD', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'INVALID_CVN', 'BLACKLISTED_CUSTOMER', 'INVALID_ACCOUNT', 'GENERAL_DECLINE', 'RISK_CONTROL_DECLINE', 'PROCESSOR_RISK_CONTROL_DECLINE'])
|
99
|
+
return false unless reason_validator.valid?(@reason)
|
100
|
+
true
|
101
|
+
end
|
102
|
+
|
103
|
+
# Custom attribute writer method checking allowed values (enum).
|
104
|
+
# @param [Object] reason Object to be assigned
|
105
|
+
def reason=(reason)
|
106
|
+
validator = EnumAttributeValidator.new('String', ['EXPIRED_CARD', 'PROCESSOR_DECLINED', 'STOLEN_LOST_CARD', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'INVALID_CVN', 'BLACKLISTED_CUSTOMER', 'INVALID_ACCOUNT', 'GENERAL_DECLINE', 'RISK_CONTROL_DECLINE', 'PROCESSOR_RISK_CONTROL_DECLINE'])
|
107
|
+
unless validator.valid?(reason)
|
108
|
+
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
|
109
|
+
end
|
110
|
+
@reason = reason
|
111
|
+
end
|
112
|
+
|
113
|
+
# Checks equality by comparing each attribute.
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def ==(o)
|
116
|
+
return true if self.equal?(o)
|
117
|
+
self.class == o.class &&
|
118
|
+
reason == o.reason &&
|
119
|
+
message == o.message &&
|
120
|
+
details == o.details
|
121
|
+
end
|
122
|
+
|
123
|
+
# @see the `==` method
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def eql?(o)
|
126
|
+
self == o
|
127
|
+
end
|
128
|
+
|
129
|
+
# Calculates hash code according to all attributes.
|
130
|
+
# @return [Fixnum] Hash code
|
131
|
+
def hash
|
132
|
+
[reason, message, details].hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def build_from_hash(attributes)
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
140
|
+
self.class.swagger_types.each_pair do |key, type|
|
141
|
+
if type =~ /\AArray<(.*)>/i
|
142
|
+
# check to ensure the input is an array given that the the attribute
|
143
|
+
# is documented as an array but the input is not
|
144
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
145
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
146
|
+
end
|
147
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
150
|
+
end
|
151
|
+
|
152
|
+
self
|
153
|
+
end
|
154
|
+
|
155
|
+
# Deserializes the data based on type
|
156
|
+
# @param string type Data type
|
157
|
+
# @param string value Value to be deserialized
|
158
|
+
# @return [Object] Deserialized data
|
159
|
+
def _deserialize(type, value)
|
160
|
+
case type.to_sym
|
161
|
+
when :DateTime
|
162
|
+
DateTime.parse(value)
|
163
|
+
when :Date
|
164
|
+
Date.parse(value)
|
165
|
+
when :String
|
166
|
+
value.to_s
|
167
|
+
when :Integer
|
168
|
+
value.to_i
|
169
|
+
when :Float
|
170
|
+
value.to_f
|
171
|
+
when :BOOLEAN
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
173
|
+
true
|
174
|
+
else
|
175
|
+
false
|
176
|
+
end
|
177
|
+
when :Object
|
178
|
+
# generic object (usually a Hash), return directly
|
179
|
+
value
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
186
|
+
{}.tap do |hash|
|
187
|
+
value.each do |k, v|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
else # model
|
192
|
+
temp_model = CyberSource.const_get(type).new
|
193
|
+
temp_model.build_from_hash(value)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the string representation of the object
|
198
|
+
# @return [String] String presentation of the object
|
199
|
+
def to_s
|
200
|
+
to_hash.to_s
|
201
|
+
end
|
202
|
+
|
203
|
+
# to_body is an alias to to_hash (backward compatibility)
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
205
|
+
def to_body
|
206
|
+
to_hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Returns the object in the form of hash
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
211
|
+
def to_hash
|
212
|
+
hash = {}
|
213
|
+
self.class.attribute_map.each_pair do |attr, param|
|
214
|
+
value = self.send(attr)
|
215
|
+
next if value.nil?
|
216
|
+
hash[param] = _to_hash(value)
|
217
|
+
end
|
218
|
+
hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Outputs non-array value in the form of hash
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
223
|
+
# @param [Object] value Any valid value
|
224
|
+
# @return [Hash] Returns the value in the form of hash
|
225
|
+
def _to_hash(value)
|
226
|
+
if value.is_a?(Array)
|
227
|
+
value.compact.map { |v| _to_hash(v) }
|
228
|
+
elsif value.is_a?(Hash)
|
229
|
+
{}.tap do |hash|
|
230
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
231
|
+
end
|
232
|
+
elsif value.respond_to? :to_hash
|
233
|
+
value.to_hash
|
234
|
+
else
|
235
|
+
value
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_error_information_details.rb
ADDED
@@ -0,0 +1,228 @@
|
|
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
|
+
class PtsV2PayoutsPost201ResponseErrorInformationDetails
|
17
|
+
# This is the flattened JSON object field name/path that is either missing or invalid.
|
18
|
+
attr_accessor :field
|
19
|
+
|
20
|
+
# Possible reasons for the error.
|
21
|
+
attr_accessor :reason
|
22
|
+
|
23
|
+
class EnumAttributeValidator
|
24
|
+
attr_reader :datatype
|
25
|
+
attr_reader :allowable_values
|
26
|
+
|
27
|
+
def initialize(datatype, allowable_values)
|
28
|
+
@allowable_values = allowable_values.map do |value|
|
29
|
+
case datatype.to_s
|
30
|
+
when /Integer/i
|
31
|
+
value.to_i
|
32
|
+
when /Float/i
|
33
|
+
value.to_f
|
34
|
+
else
|
35
|
+
value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def valid?(value)
|
41
|
+
!value || allowable_values.include?(value)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
:'field' => :'field',
|
49
|
+
:'reason' => :'reason'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
def self.swagger_types
|
55
|
+
{
|
56
|
+
:'field' => :'String',
|
57
|
+
:'reason' => :'String'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
return unless attributes.is_a?(Hash)
|
65
|
+
|
66
|
+
# convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
68
|
+
|
69
|
+
if attributes.has_key?(:'field')
|
70
|
+
self.field = attributes[:'field']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'reason')
|
74
|
+
self.reason = attributes[:'reason']
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
invalid_properties
|
83
|
+
end
|
84
|
+
|
85
|
+
# Check to see if the all the properties in the model are valid
|
86
|
+
# @return true if the model is valid
|
87
|
+
def valid?
|
88
|
+
reason_validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA'])
|
89
|
+
return false unless reason_validator.valid?(@reason)
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Custom attribute writer method checking allowed values (enum).
|
94
|
+
# @param [Object] reason Object to be assigned
|
95
|
+
def reason=(reason)
|
96
|
+
validator = EnumAttributeValidator.new('String', ['MISSING_FIELD', 'INVALID_DATA'])
|
97
|
+
unless validator.valid?(reason)
|
98
|
+
fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.'
|
99
|
+
end
|
100
|
+
@reason = reason
|
101
|
+
end
|
102
|
+
|
103
|
+
# Checks equality by comparing each attribute.
|
104
|
+
# @param [Object] Object to be compared
|
105
|
+
def ==(o)
|
106
|
+
return true if self.equal?(o)
|
107
|
+
self.class == o.class &&
|
108
|
+
field == o.field &&
|
109
|
+
reason == o.reason
|
110
|
+
end
|
111
|
+
|
112
|
+
# @see the `==` method
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def eql?(o)
|
115
|
+
self == o
|
116
|
+
end
|
117
|
+
|
118
|
+
# Calculates hash code according to all attributes.
|
119
|
+
# @return [Fixnum] Hash code
|
120
|
+
def hash
|
121
|
+
[field, reason].hash
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
self.class.swagger_types.each_pair do |key, type|
|
130
|
+
if type =~ /\AArray<(.*)>/i
|
131
|
+
# check to ensure the input is an array given that the the attribute
|
132
|
+
# is documented as an array but the input is not
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
135
|
+
end
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
138
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
139
|
+
end
|
140
|
+
|
141
|
+
self
|
142
|
+
end
|
143
|
+
|
144
|
+
# Deserializes the data based on type
|
145
|
+
# @param string type Data type
|
146
|
+
# @param string value Value to be deserialized
|
147
|
+
# @return [Object] Deserialized data
|
148
|
+
def _deserialize(type, value)
|
149
|
+
case type.to_sym
|
150
|
+
when :DateTime
|
151
|
+
DateTime.parse(value)
|
152
|
+
when :Date
|
153
|
+
Date.parse(value)
|
154
|
+
when :String
|
155
|
+
value.to_s
|
156
|
+
when :Integer
|
157
|
+
value.to_i
|
158
|
+
when :Float
|
159
|
+
value.to_f
|
160
|
+
when :BOOLEAN
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
162
|
+
true
|
163
|
+
else
|
164
|
+
false
|
165
|
+
end
|
166
|
+
when :Object
|
167
|
+
# generic object (usually a Hash), return directly
|
168
|
+
value
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each do |k, v|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
else # model
|
181
|
+
temp_model = CyberSource.const_get(type).new
|
182
|
+
temp_model.build_from_hash(value)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the string representation of the object
|
187
|
+
# @return [String] String presentation of the object
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_body
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the object in the form of hash
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
next if value.nil?
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|