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
@@ -14,35 +14,36 @@ require 'date'
|
|
14
14
|
|
15
15
|
module CyberSource
|
16
16
|
class RequestBody1
|
17
|
-
# Valid CyberSource
|
17
|
+
# Valid CyberSource organizationId
|
18
18
|
attr_accessor :organization_id
|
19
19
|
|
20
|
+
# Valid Report Definition Name
|
20
21
|
attr_accessor :report_definition_name
|
21
22
|
|
22
|
-
# List of fields which needs to get included in a report
|
23
23
|
attr_accessor :report_fields
|
24
24
|
|
25
|
-
# Format of the report
|
26
25
|
attr_accessor :report_mime_type
|
27
26
|
|
28
|
-
#
|
27
|
+
# The frequency for which subscription is created.
|
28
|
+
attr_accessor :report_frequency
|
29
|
+
|
29
30
|
attr_accessor :report_name
|
30
31
|
|
31
|
-
# Timezone of the report
|
32
32
|
attr_accessor :timezone
|
33
33
|
|
34
|
-
#
|
35
|
-
attr_accessor :
|
34
|
+
# The hour at which the report generation should start. It should be in hhmm format.
|
35
|
+
attr_accessor :start_time
|
36
36
|
|
37
|
-
#
|
38
|
-
attr_accessor :
|
37
|
+
# This is the start day if the frequency is WEEKLY or MONTHLY. The value varies from 1-7 for WEEKLY and 1-31 for MONTHLY. For WEEKLY 1 means Sunday and 7 means Saturday. By default the value is 1.
|
38
|
+
attr_accessor :start_day
|
39
39
|
|
40
|
+
# List of filters to apply
|
40
41
|
attr_accessor :report_filters
|
41
42
|
|
42
43
|
attr_accessor :report_preferences
|
43
44
|
|
44
|
-
#
|
45
|
-
attr_accessor :
|
45
|
+
# Valid GroupName
|
46
|
+
attr_accessor :group_name
|
46
47
|
|
47
48
|
class EnumAttributeValidator
|
48
49
|
attr_reader :datatype
|
@@ -73,13 +74,14 @@ module CyberSource
|
|
73
74
|
:'report_definition_name' => :'reportDefinitionName',
|
74
75
|
:'report_fields' => :'reportFields',
|
75
76
|
:'report_mime_type' => :'reportMimeType',
|
77
|
+
:'report_frequency' => :'reportFrequency',
|
76
78
|
:'report_name' => :'reportName',
|
77
79
|
:'timezone' => :'timezone',
|
78
|
-
:'
|
79
|
-
:'
|
80
|
+
:'start_time' => :'startTime',
|
81
|
+
:'start_day' => :'startDay',
|
80
82
|
:'report_filters' => :'reportFilters',
|
81
83
|
:'report_preferences' => :'reportPreferences',
|
82
|
-
:'
|
84
|
+
:'group_name' => :'groupName'
|
83
85
|
}
|
84
86
|
end
|
85
87
|
|
@@ -90,13 +92,14 @@ module CyberSource
|
|
90
92
|
:'report_definition_name' => :'String',
|
91
93
|
:'report_fields' => :'Array<String>',
|
92
94
|
:'report_mime_type' => :'String',
|
95
|
+
:'report_frequency' => :'String',
|
93
96
|
:'report_name' => :'String',
|
94
97
|
:'timezone' => :'String',
|
95
|
-
:'
|
96
|
-
:'
|
98
|
+
:'start_time' => :'String',
|
99
|
+
:'start_day' => :'Integer',
|
97
100
|
:'report_filters' => :'Hash<String, Array<String>>',
|
98
|
-
:'report_preferences' => :'
|
99
|
-
:'
|
101
|
+
:'report_preferences' => :'ReportingV3ReportsIdGet200ResponseReportPreferences',
|
102
|
+
:'group_name' => :'String'
|
100
103
|
}
|
101
104
|
end
|
102
105
|
|
@@ -126,6 +129,10 @@ module CyberSource
|
|
126
129
|
self.report_mime_type = attributes[:'reportMimeType']
|
127
130
|
end
|
128
131
|
|
132
|
+
if attributes.has_key?(:'reportFrequency')
|
133
|
+
self.report_frequency = attributes[:'reportFrequency']
|
134
|
+
end
|
135
|
+
|
129
136
|
if attributes.has_key?(:'reportName')
|
130
137
|
self.report_name = attributes[:'reportName']
|
131
138
|
end
|
@@ -134,12 +141,12 @@ module CyberSource
|
|
134
141
|
self.timezone = attributes[:'timezone']
|
135
142
|
end
|
136
143
|
|
137
|
-
if attributes.has_key?(:'
|
138
|
-
self.
|
144
|
+
if attributes.has_key?(:'startTime')
|
145
|
+
self.start_time = attributes[:'startTime']
|
139
146
|
end
|
140
147
|
|
141
|
-
if attributes.has_key?(:'
|
142
|
-
self.
|
148
|
+
if attributes.has_key?(:'startDay')
|
149
|
+
self.start_day = attributes[:'startDay']
|
143
150
|
end
|
144
151
|
|
145
152
|
if attributes.has_key?(:'reportFilters')
|
@@ -152,8 +159,8 @@ module CyberSource
|
|
152
159
|
self.report_preferences = attributes[:'reportPreferences']
|
153
160
|
end
|
154
161
|
|
155
|
-
if attributes.has_key?(:'
|
156
|
-
self.
|
162
|
+
if attributes.has_key?(:'groupName')
|
163
|
+
self.group_name = attributes[:'groupName']
|
157
164
|
end
|
158
165
|
end
|
159
166
|
|
@@ -161,68 +168,132 @@ module CyberSource
|
|
161
168
|
# @return Array for valid properties with the reasons
|
162
169
|
def list_invalid_properties
|
163
170
|
invalid_properties = Array.new
|
164
|
-
if !@
|
171
|
+
#if !@organization_id.nil? && @organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/)
|
172
|
+
#invalid_properties.push('invalid value for "organization_id", must conform to the pattern /[a-zA-Z0-9-_]+/.')
|
173
|
+
#end
|
174
|
+
|
175
|
+
if @report_definition_name.nil?
|
176
|
+
invalid_properties.push('invalid value for "report_definition_name", report_definition_name cannot be nil.')
|
177
|
+
end
|
178
|
+
|
179
|
+
if @report_definition_name.to_s.length > 80
|
165
180
|
invalid_properties.push('invalid value for "report_definition_name", the character length must be smaller than or equal to 80.')
|
166
181
|
end
|
167
182
|
|
168
|
-
if
|
183
|
+
if @report_definition_name.to_s.length < 1
|
169
184
|
invalid_properties.push('invalid value for "report_definition_name", the character length must be great than or equal to 1.')
|
170
185
|
end
|
171
186
|
|
172
|
-
if
|
173
|
-
invalid_properties.push('invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.')
|
187
|
+
#if @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/)
|
188
|
+
#invalid_properties.push('invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.')
|
189
|
+
#end
|
190
|
+
|
191
|
+
if @report_fields.nil?
|
192
|
+
invalid_properties.push('invalid value for "report_fields", report_fields cannot be nil.')
|
174
193
|
end
|
175
194
|
|
176
|
-
if
|
195
|
+
if @report_mime_type.nil?
|
196
|
+
invalid_properties.push('invalid value for "report_mime_type", report_mime_type cannot be nil.')
|
197
|
+
end
|
198
|
+
|
199
|
+
if @report_frequency.nil?
|
200
|
+
invalid_properties.push('invalid value for "report_frequency", report_frequency cannot be nil.')
|
201
|
+
end
|
202
|
+
|
203
|
+
if @report_name.nil?
|
204
|
+
invalid_properties.push('invalid value for "report_name", report_name cannot be nil.')
|
205
|
+
end
|
206
|
+
|
207
|
+
if @report_name.to_s.length > 128
|
177
208
|
invalid_properties.push('invalid value for "report_name", the character length must be smaller than or equal to 128.')
|
178
209
|
end
|
179
210
|
|
180
|
-
if
|
211
|
+
if @report_name.to_s.length < 1
|
181
212
|
invalid_properties.push('invalid value for "report_name", the character length must be great than or equal to 1.')
|
182
213
|
end
|
183
214
|
|
184
|
-
if
|
185
|
-
invalid_properties.push('invalid value for "
|
215
|
+
#if @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
|
216
|
+
#invalid_properties.push('invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.')
|
217
|
+
#end
|
218
|
+
|
219
|
+
if @timezone.nil?
|
220
|
+
invalid_properties.push('invalid value for "timezone", timezone cannot be nil.')
|
221
|
+
end
|
222
|
+
|
223
|
+
if @start_time.nil?
|
224
|
+
invalid_properties.push('invalid value for "start_time", start_time cannot be nil.')
|
225
|
+
end
|
226
|
+
|
227
|
+
if !@start_day.nil? && @start_day > 31
|
228
|
+
invalid_properties.push('invalid value for "start_day", must be smaller than or equal to 31.')
|
229
|
+
end
|
230
|
+
|
231
|
+
if !@start_day.nil? && @start_day < 1
|
232
|
+
invalid_properties.push('invalid value for "start_day", must be greater than or equal to 1.')
|
186
233
|
end
|
187
234
|
|
235
|
+
#if !@group_name.nil? && @group_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
|
236
|
+
#invalid_properties.push('invalid value for "group_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.')
|
237
|
+
#end
|
238
|
+
|
188
239
|
invalid_properties
|
189
240
|
end
|
190
241
|
|
191
242
|
# Check to see if the all the properties in the model are valid
|
192
243
|
# @return true if the model is valid
|
193
244
|
def valid?
|
194
|
-
#
|
195
|
-
return false if
|
196
|
-
return false if
|
197
|
-
return false if
|
245
|
+
#return false if !@organization_id.nil? && @organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/)
|
246
|
+
return false if @report_definition_name.nil?
|
247
|
+
return false if @report_definition_name.to_s.length > 80
|
248
|
+
return false if @report_definition_name.to_s.length < 1
|
249
|
+
#return false if @report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/)
|
250
|
+
return false if @report_fields.nil?
|
251
|
+
return false if @report_mime_type.nil?
|
198
252
|
report_mime_type_validator = EnumAttributeValidator.new('String', ['application/xml', 'text/csv'])
|
199
253
|
return false unless report_mime_type_validator.valid?(@report_mime_type)
|
200
|
-
return false if
|
201
|
-
|
202
|
-
return false
|
254
|
+
return false if @report_frequency.nil?
|
255
|
+
report_frequency_validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY'])
|
256
|
+
return false unless report_frequency_validator.valid?(@report_frequency)
|
257
|
+
return false if @report_name.nil?
|
258
|
+
return false if @report_name.to_s.length > 128
|
259
|
+
return false if @report_name.to_s.length < 1
|
260
|
+
#return false if @report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
|
261
|
+
return false if @timezone.nil?
|
262
|
+
return false if @start_time.nil?
|
263
|
+
return false if !@start_day.nil? && @start_day > 31
|
264
|
+
return false if !@start_day.nil? && @start_day < 1
|
265
|
+
#return false if !@group_name.nil? && @group_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
|
203
266
|
true
|
204
267
|
end
|
205
268
|
|
206
269
|
# Custom attribute writer method with validation
|
207
270
|
# @param [Object] organization_id Value to be assigned
|
208
271
|
def organization_id=(organization_id)
|
272
|
+
#if !organization_id.nil? && organization_id !~ Regexp.new(/[a-zA-Z0-9-_]+/)
|
273
|
+
#fail ArgumentError, 'invalid value for "organization_id", must conform to the pattern /[a-zA-Z0-9-_]+/.'
|
274
|
+
#end
|
275
|
+
|
209
276
|
@organization_id = organization_id
|
210
277
|
end
|
211
278
|
|
212
279
|
# Custom attribute writer method with validation
|
213
280
|
# @param [Object] report_definition_name Value to be assigned
|
214
281
|
def report_definition_name=(report_definition_name)
|
215
|
-
if
|
282
|
+
if report_definition_name.nil?
|
283
|
+
fail ArgumentError, 'report_definition_name cannot be nil'
|
284
|
+
end
|
285
|
+
|
286
|
+
if report_definition_name.to_s.length > 80
|
216
287
|
fail ArgumentError, 'invalid value for "report_definition_name", the character length must be smaller than or equal to 80.'
|
217
288
|
end
|
218
289
|
|
219
|
-
if
|
290
|
+
if report_definition_name.to_s.length < 1
|
220
291
|
fail ArgumentError, 'invalid value for "report_definition_name", the character length must be great than or equal to 1.'
|
221
292
|
end
|
222
293
|
|
223
|
-
if
|
224
|
-
fail ArgumentError, 'invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.'
|
225
|
-
end
|
294
|
+
#if report_definition_name !~ Regexp.new(/[a-zA-Z0-9-]+/)
|
295
|
+
#fail ArgumentError, 'invalid value for "report_definition_name", must conform to the pattern /[a-zA-Z0-9-]+/.'
|
296
|
+
#end
|
226
297
|
|
227
298
|
@report_definition_name = report_definition_name
|
228
299
|
end
|
@@ -237,28 +308,60 @@ module CyberSource
|
|
237
308
|
@report_mime_type = report_mime_type
|
238
309
|
end
|
239
310
|
|
311
|
+
# Custom attribute writer method checking allowed values (enum).
|
312
|
+
# @param [Object] report_frequency Object to be assigned
|
313
|
+
def report_frequency=(report_frequency)
|
314
|
+
validator = EnumAttributeValidator.new('String', ['DAILY', 'WEEKLY', 'MONTHLY'])
|
315
|
+
unless validator.valid?(report_frequency)
|
316
|
+
fail ArgumentError, 'invalid value for "report_frequency", must be one of #{validator.allowable_values}.'
|
317
|
+
end
|
318
|
+
@report_frequency = report_frequency
|
319
|
+
end
|
320
|
+
|
240
321
|
# Custom attribute writer method with validation
|
241
322
|
# @param [Object] report_name Value to be assigned
|
242
323
|
def report_name=(report_name)
|
243
|
-
if
|
324
|
+
if report_name.nil?
|
325
|
+
fail ArgumentError, 'report_name cannot be nil'
|
326
|
+
end
|
327
|
+
|
328
|
+
if report_name.to_s.length > 128
|
244
329
|
fail ArgumentError, 'invalid value for "report_name", the character length must be smaller than or equal to 128.'
|
245
330
|
end
|
246
331
|
|
247
|
-
if
|
332
|
+
if report_name.to_s.length < 1
|
248
333
|
fail ArgumentError, 'invalid value for "report_name", the character length must be great than or equal to 1.'
|
249
334
|
end
|
250
335
|
|
336
|
+
#if report_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
|
337
|
+
#fail ArgumentError, 'invalid value for "report_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.'
|
338
|
+
#end
|
339
|
+
|
251
340
|
@report_name = report_name
|
252
341
|
end
|
253
342
|
|
254
343
|
# Custom attribute writer method with validation
|
255
|
-
# @param [Object]
|
256
|
-
def
|
257
|
-
if !
|
258
|
-
fail ArgumentError, 'invalid value for "
|
344
|
+
# @param [Object] start_day Value to be assigned
|
345
|
+
def start_day=(start_day)
|
346
|
+
if !start_day.nil? && start_day > 31
|
347
|
+
fail ArgumentError, 'invalid value for "start_day", must be smaller than or equal to 31.'
|
348
|
+
end
|
349
|
+
|
350
|
+
if !start_day.nil? && start_day < 1
|
351
|
+
fail ArgumentError, 'invalid value for "start_day", must be greater than or equal to 1.'
|
259
352
|
end
|
260
353
|
|
261
|
-
@
|
354
|
+
@start_day = start_day
|
355
|
+
end
|
356
|
+
|
357
|
+
# Custom attribute writer method with validation
|
358
|
+
# @param [Object] group_name Value to be assigned
|
359
|
+
def group_name=(group_name)
|
360
|
+
#if !group_name.nil? && group_name !~ Regexp.new(/[a-zA-Z0-9-_ ]+/)
|
361
|
+
#fail ArgumentError, 'invalid value for "group_name", must conform to the pattern /[a-zA-Z0-9-_ ]+/.'
|
362
|
+
#end
|
363
|
+
|
364
|
+
@group_name = group_name
|
262
365
|
end
|
263
366
|
|
264
367
|
# Checks equality by comparing each attribute.
|
@@ -270,13 +373,14 @@ module CyberSource
|
|
270
373
|
report_definition_name == o.report_definition_name &&
|
271
374
|
report_fields == o.report_fields &&
|
272
375
|
report_mime_type == o.report_mime_type &&
|
376
|
+
report_frequency == o.report_frequency &&
|
273
377
|
report_name == o.report_name &&
|
274
378
|
timezone == o.timezone &&
|
275
|
-
|
276
|
-
|
379
|
+
start_time == o.start_time &&
|
380
|
+
start_day == o.start_day &&
|
277
381
|
report_filters == o.report_filters &&
|
278
382
|
report_preferences == o.report_preferences &&
|
279
|
-
|
383
|
+
group_name == o.group_name
|
280
384
|
end
|
281
385
|
|
282
386
|
# @see the `==` method
|
@@ -288,7 +392,7 @@ module CyberSource
|
|
288
392
|
# Calculates hash code according to all attributes.
|
289
393
|
# @return [Fixnum] Hash code
|
290
394
|
def hash
|
291
|
-
[organization_id, report_definition_name, report_fields, report_mime_type, report_name, timezone,
|
395
|
+
[organization_id, report_definition_name, report_fields, report_mime_type, report_frequency, report_name, timezone, start_time, start_day, report_filters, report_preferences, group_name].hash
|
292
396
|
end
|
293
397
|
|
294
398
|
# Builds the object from hash
|
@@ -0,0 +1,331 @@
|
|
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 TmsV1PaymentinstrumentsGet200Response
|
17
|
+
attr_accessor :_links
|
18
|
+
|
19
|
+
# Unique identification number assigned by CyberSource to the submitted request.
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
# Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier.
|
23
|
+
attr_accessor :object
|
24
|
+
|
25
|
+
# Current state of the token.
|
26
|
+
attr_accessor :state
|
27
|
+
|
28
|
+
attr_accessor :bank_account
|
29
|
+
|
30
|
+
attr_accessor :card
|
31
|
+
|
32
|
+
attr_accessor :buyer_information
|
33
|
+
|
34
|
+
attr_accessor :bill_to
|
35
|
+
|
36
|
+
attr_accessor :processing_information
|
37
|
+
|
38
|
+
attr_accessor :merchant_information
|
39
|
+
|
40
|
+
attr_accessor :meta_data
|
41
|
+
|
42
|
+
attr_accessor :instrument_identifier
|
43
|
+
|
44
|
+
class EnumAttributeValidator
|
45
|
+
attr_reader :datatype
|
46
|
+
attr_reader :allowable_values
|
47
|
+
|
48
|
+
def initialize(datatype, allowable_values)
|
49
|
+
@allowable_values = allowable_values.map do |value|
|
50
|
+
case datatype.to_s
|
51
|
+
when /Integer/i
|
52
|
+
value.to_i
|
53
|
+
when /Float/i
|
54
|
+
value.to_f
|
55
|
+
else
|
56
|
+
value
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def valid?(value)
|
62
|
+
!value || allowable_values.include?(value)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
67
|
+
def self.attribute_map
|
68
|
+
{
|
69
|
+
:'_links' => :'_links',
|
70
|
+
:'id' => :'id',
|
71
|
+
:'object' => :'object',
|
72
|
+
:'state' => :'state',
|
73
|
+
:'bank_account' => :'bankAccount',
|
74
|
+
:'card' => :'card',
|
75
|
+
:'buyer_information' => :'buyerInformation',
|
76
|
+
:'bill_to' => :'billTo',
|
77
|
+
:'processing_information' => :'processingInformation',
|
78
|
+
:'merchant_information' => :'merchantInformation',
|
79
|
+
:'meta_data' => :'metaData',
|
80
|
+
:'instrument_identifier' => :'instrumentIdentifier'
|
81
|
+
}
|
82
|
+
end
|
83
|
+
|
84
|
+
# Attribute type mapping.
|
85
|
+
def self.swagger_types
|
86
|
+
{
|
87
|
+
:'_links' => :'Tmsv1instrumentidentifiersLinks',
|
88
|
+
:'id' => :'String',
|
89
|
+
:'object' => :'String',
|
90
|
+
:'state' => :'String',
|
91
|
+
:'bank_account' => :'Tmsv1paymentinstrumentsBankAccount',
|
92
|
+
:'card' => :'Tmsv1paymentinstrumentsCard',
|
93
|
+
:'buyer_information' => :'Tmsv1paymentinstrumentsBuyerInformation',
|
94
|
+
:'bill_to' => :'Tmsv1paymentinstrumentsBillTo',
|
95
|
+
:'processing_information' => :'Tmsv1paymentinstrumentsProcessingInformation',
|
96
|
+
:'merchant_information' => :'Tmsv1paymentinstrumentsMerchantInformation',
|
97
|
+
:'meta_data' => :'Tmsv1instrumentidentifiersMetadata',
|
98
|
+
:'instrument_identifier' => :'Tmsv1paymentinstrumentsInstrumentIdentifier'
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# Initializes the object
|
103
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
104
|
+
def initialize(attributes = {})
|
105
|
+
return unless attributes.is_a?(Hash)
|
106
|
+
|
107
|
+
# convert string to symbol for hash key
|
108
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
109
|
+
|
110
|
+
if attributes.has_key?(:'_links')
|
111
|
+
self._links = attributes[:'_links']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.has_key?(:'id')
|
115
|
+
self.id = attributes[:'id']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'object')
|
119
|
+
self.object = attributes[:'object']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.has_key?(:'state')
|
123
|
+
self.state = attributes[:'state']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.has_key?(:'bankAccount')
|
127
|
+
self.bank_account = attributes[:'bankAccount']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.has_key?(:'card')
|
131
|
+
self.card = attributes[:'card']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.has_key?(:'buyerInformation')
|
135
|
+
self.buyer_information = attributes[:'buyerInformation']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.has_key?(:'billTo')
|
139
|
+
self.bill_to = attributes[:'billTo']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.has_key?(:'processingInformation')
|
143
|
+
self.processing_information = attributes[:'processingInformation']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.has_key?(:'merchantInformation')
|
147
|
+
self.merchant_information = attributes[:'merchantInformation']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.has_key?(:'metaData')
|
151
|
+
self.meta_data = attributes[:'metaData']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.has_key?(:'instrumentIdentifier')
|
155
|
+
self.instrument_identifier = attributes[:'instrumentIdentifier']
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
160
|
+
# @return Array for valid properties with the reasons
|
161
|
+
def list_invalid_properties
|
162
|
+
invalid_properties = Array.new
|
163
|
+
invalid_properties
|
164
|
+
end
|
165
|
+
|
166
|
+
# Check to see if the all the properties in the model are valid
|
167
|
+
# @return true if the model is valid
|
168
|
+
def valid?
|
169
|
+
object_validator = EnumAttributeValidator.new('String', ['paymentInstrument'])
|
170
|
+
return false unless object_validator.valid?(@object)
|
171
|
+
state_validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED'])
|
172
|
+
return false unless state_validator.valid?(@state)
|
173
|
+
true
|
174
|
+
end
|
175
|
+
|
176
|
+
# Custom attribute writer method checking allowed values (enum).
|
177
|
+
# @param [Object] object Object to be assigned
|
178
|
+
def object=(object)
|
179
|
+
validator = EnumAttributeValidator.new('String', ['paymentInstrument'])
|
180
|
+
unless validator.valid?(object)
|
181
|
+
fail ArgumentError, 'invalid value for "object", must be one of #{validator.allowable_values}.'
|
182
|
+
end
|
183
|
+
@object = object
|
184
|
+
end
|
185
|
+
|
186
|
+
# Custom attribute writer method checking allowed values (enum).
|
187
|
+
# @param [Object] state Object to be assigned
|
188
|
+
def state=(state)
|
189
|
+
validator = EnumAttributeValidator.new('String', ['ACTIVE', 'CLOSED'])
|
190
|
+
unless validator.valid?(state)
|
191
|
+
fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.'
|
192
|
+
end
|
193
|
+
@state = state
|
194
|
+
end
|
195
|
+
|
196
|
+
# Checks equality by comparing each attribute.
|
197
|
+
# @param [Object] Object to be compared
|
198
|
+
def ==(o)
|
199
|
+
return true if self.equal?(o)
|
200
|
+
self.class == o.class &&
|
201
|
+
_links == o._links &&
|
202
|
+
id == o.id &&
|
203
|
+
object == o.object &&
|
204
|
+
state == o.state &&
|
205
|
+
bank_account == o.bank_account &&
|
206
|
+
card == o.card &&
|
207
|
+
buyer_information == o.buyer_information &&
|
208
|
+
bill_to == o.bill_to &&
|
209
|
+
processing_information == o.processing_information &&
|
210
|
+
merchant_information == o.merchant_information &&
|
211
|
+
meta_data == o.meta_data &&
|
212
|
+
instrument_identifier == o.instrument_identifier
|
213
|
+
end
|
214
|
+
|
215
|
+
# @see the `==` method
|
216
|
+
# @param [Object] Object to be compared
|
217
|
+
def eql?(o)
|
218
|
+
self == o
|
219
|
+
end
|
220
|
+
|
221
|
+
# Calculates hash code according to all attributes.
|
222
|
+
# @return [Fixnum] Hash code
|
223
|
+
def hash
|
224
|
+
[_links, id, object, state, bank_account, card, buyer_information, bill_to, processing_information, merchant_information, meta_data, instrument_identifier].hash
|
225
|
+
end
|
226
|
+
|
227
|
+
# Builds the object from hash
|
228
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
229
|
+
# @return [Object] Returns the model itself
|
230
|
+
def build_from_hash(attributes)
|
231
|
+
return nil unless attributes.is_a?(Hash)
|
232
|
+
self.class.swagger_types.each_pair do |key, type|
|
233
|
+
if type =~ /\AArray<(.*)>/i
|
234
|
+
# check to ensure the input is an array given that the the attribute
|
235
|
+
# is documented as an array but the input is not
|
236
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
237
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
238
|
+
end
|
239
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
240
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
241
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
242
|
+
end
|
243
|
+
|
244
|
+
self
|
245
|
+
end
|
246
|
+
|
247
|
+
# Deserializes the data based on type
|
248
|
+
# @param string type Data type
|
249
|
+
# @param string value Value to be deserialized
|
250
|
+
# @return [Object] Deserialized data
|
251
|
+
def _deserialize(type, value)
|
252
|
+
case type.to_sym
|
253
|
+
when :DateTime
|
254
|
+
DateTime.parse(value)
|
255
|
+
when :Date
|
256
|
+
Date.parse(value)
|
257
|
+
when :String
|
258
|
+
value.to_s
|
259
|
+
when :Integer
|
260
|
+
value.to_i
|
261
|
+
when :Float
|
262
|
+
value.to_f
|
263
|
+
when :BOOLEAN
|
264
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
265
|
+
true
|
266
|
+
else
|
267
|
+
false
|
268
|
+
end
|
269
|
+
when :Object
|
270
|
+
# generic object (usually a Hash), return directly
|
271
|
+
value
|
272
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
273
|
+
inner_type = Regexp.last_match[:inner_type]
|
274
|
+
value.map { |v| _deserialize(inner_type, v) }
|
275
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
276
|
+
k_type = Regexp.last_match[:k_type]
|
277
|
+
v_type = Regexp.last_match[:v_type]
|
278
|
+
{}.tap do |hash|
|
279
|
+
value.each do |k, v|
|
280
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
281
|
+
end
|
282
|
+
end
|
283
|
+
else # model
|
284
|
+
temp_model = CyberSource.const_get(type).new
|
285
|
+
temp_model.build_from_hash(value)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
# Returns the string representation of the object
|
290
|
+
# @return [String] String presentation of the object
|
291
|
+
def to_s
|
292
|
+
to_hash.to_s
|
293
|
+
end
|
294
|
+
|
295
|
+
# to_body is an alias to to_hash (backward compatibility)
|
296
|
+
# @return [Hash] Returns the object in the form of hash
|
297
|
+
def to_body
|
298
|
+
to_hash
|
299
|
+
end
|
300
|
+
|
301
|
+
# Returns the object in the form of hash
|
302
|
+
# @return [Hash] Returns the object in the form of hash
|
303
|
+
def to_hash
|
304
|
+
hash = {}
|
305
|
+
self.class.attribute_map.each_pair do |attr, param|
|
306
|
+
value = self.send(attr)
|
307
|
+
next if value.nil?
|
308
|
+
hash[param] = _to_hash(value)
|
309
|
+
end
|
310
|
+
hash
|
311
|
+
end
|
312
|
+
|
313
|
+
# Outputs non-array value in the form of hash
|
314
|
+
# For object, use to_hash. Otherwise, just return the value
|
315
|
+
# @param [Object] value Any valid value
|
316
|
+
# @return [Hash] Returns the value in the form of hash
|
317
|
+
def _to_hash(value)
|
318
|
+
if value.is_a?(Array)
|
319
|
+
value.compact.map { |v| _to_hash(v) }
|
320
|
+
elsif value.is_a?(Hash)
|
321
|
+
{}.tap do |hash|
|
322
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
323
|
+
end
|
324
|
+
elsif value.respond_to? :to_hash
|
325
|
+
value.to_hash
|
326
|
+
else
|
327
|
+
value
|
328
|
+
end
|
329
|
+
end
|
330
|
+
end
|
331
|
+
end
|