cybersource_rest_client 0.0.83 → 0.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +46 -27
- data/lib/AuthenticationSDK/core/MerchantConfig.rb +82 -48
- data/lib/AuthenticationSDK/util/Cache.rb +7 -4
- data/lib/AuthenticationSDK/util/Constants.rb +6 -0
- data/lib/AuthenticationSDK/util/MLEUtility.rb +9 -0
- data/lib/cybersource_rest_client/api/batches_api.rb +1 -1
- data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +14 -22
- data/lib/cybersource_rest_client/api/credentials_api.rb +104 -0
- data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +3 -3
- data/lib/cybersource_rest_client/api/enrollment_api.rb +2 -2
- data/lib/cybersource_rest_client/api/instructions_api.rb +10 -10
- data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +3 -3
- data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +20 -28
- data/lib/cybersource_rest_client/api/network_tokens_api.rb +654 -0
- data/lib/cybersource_rest_client/api/plans_api.rb +1 -1
- data/lib/cybersource_rest_client/api/subscriptions_api.rb +183 -1
- data/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +1 -1
- data/lib/cybersource_rest_client/api_client.rb +4 -0
- data/lib/cybersource_rest_client/models/account_validations_request.rb +15 -5
- data/lib/cybersource_rest_client/models/acpv1instructions_decline_threshold.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructions_mandates.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructions_recurring_payment_information.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information_payment_instrument.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_amount_detail.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1mppcredentials_challenge.rb +369 -0
- data/lib/cybersource_rest_client/models/acpv1mppcredentials_challenge_encryption_jwk.rb +336 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_assurance_data.rb +7 -7
- data/lib/cybersource_rest_client/models/acpv1tokens_authenticated_identities.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_authentication_context.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_bill_to.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_consumer_identity.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_device_information.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_enrollment_reference_data.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information.rb +1 -1
- data/lib/cybersource_rest_client/models/auth_reversal_request.rb +11 -1
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information.rb +32 -6
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_bank.rb +1 -1
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_bank_account.rb +1 -1
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_customer.rb +196 -0
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_instrument_identifier.rb +196 -0
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_payment_instrument.rb +196 -0
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_token_information.rb +208 -0
- data/lib/cybersource_rest_client/models/card_processing_config_common_processors.rb +105 -1
- data/lib/cybersource_rest_client/models/commerce_solutions_products.rb +15 -5
- data/lib/cybersource_rest_client/models/create_credit_request.rb +15 -5
- data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information_amount_details_surcharge.rb +22 -5
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response.rb +247 -0
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_1.rb +224 -0
- data/lib/cybersource_rest_client/models/{pbl_payment_links_post201_response__links.rb → get_subscriptions_payments_response_1__links.rb} +1 -1
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response__links.rb +209 -0
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_cycles_completed_count.rb +191 -0
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_subscription_payment.rb +356 -0
- data/lib/cybersource_rest_client/models/inline_response_201_1_tokenized_card.rb +26 -5
- data/lib/cybersource_rest_client/models/inline_response_201_4_setups_commerce_solutions.rb +15 -5
- data/lib/cybersource_rest_client/models/inline_response_201_4_setups_payments.rb +25 -5
- data/lib/cybersource_rest_client/models/inline_response_201_4_setups_risk.rb +15 -5
- data/lib/cybersource_rest_client/models/inline_response_201_4_setups_value_added_services.rb +25 -5
- data/lib/cybersource_rest_client/models/inline_response_400_10.rb +30 -75
- data/lib/cybersource_rest_client/models/{inline_response_400_8_details.rb → inline_response_400_10_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_11.rb +235 -0
- data/lib/cybersource_rest_client/models/{inline_response_400_7_details.rb → inline_response_400_11_details.rb} +3 -3
- data/lib/cybersource_rest_client/models/inline_response_400_12.rb +281 -0
- data/lib/cybersource_rest_client/models/inline_response_400_6.rb +37 -60
- data/lib/cybersource_rest_client/models/inline_response_400_7.rb +6 -6
- data/lib/cybersource_rest_client/models/inline_response_400_8.rb +58 -36
- data/lib/cybersource_rest_client/models/{inline_response_400_6_fields.rb → inline_response_400_8_fields.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_9.rb +16 -16
- data/lib/cybersource_rest_client/models/inline_response_400_9_details.rb +2 -2
- data/lib/cybersource_rest_client/models/inline_response_404_3.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_422_1.rb +1 -1
- data/lib/cybersource_rest_client/models/iplv2paymentlinks_order_information_line_items.rb +73 -5
- data/lib/cybersource_rest_client/models/mit_reversal_request.rb +11 -1
- data/lib/cybersource_rest_client/models/mpp_credentials_request.rb +221 -0
- data/lib/cybersource_rest_client/models/mpp_credentials_response200.rb +338 -0
- data/lib/cybersource_rest_client/models/patch_customer_payment_instrument_request.rb +1 -1
- data/lib/cybersource_rest_client/models/patch_customer_request.rb +1 -1
- data/lib/cybersource_rest_client/models/patch_payment_instrument_request.rb +1 -1
- data/lib/cybersource_rest_client/models/payment_instrument_list_1__embedded.rb +1 -1
- data/lib/cybersource_rest_client/models/payment_instrument_list__embedded.rb +1 -1
- data/lib/cybersource_rest_client/models/{payment_instrument_list_1__embedded__embedded.rb → payment_instrument_list__embedded__embedded.rb} +1 -1
- data/lib/cybersource_rest_client/models/{payment_instrument_list_1__embedded_payment_instruments.rb → payment_instrument_list__embedded_payment_instruments.rb} +2 -2
- data/lib/cybersource_rest_client/models/payments_products.rb +25 -5
- data/lib/cybersource_rest_client/models/payments_products_currency_conversion_configuration_information_configurations_processors.rb +14 -2
- data/lib/cybersource_rest_client/models/payments_products_microform.rb +199 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information.rb +199 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations.rb +189 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations_features.rb +189 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations_features_gateway_agnostic.rb +189 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_subscription_information.rb +227 -0
- data/lib/cybersource_rest_client/models/pbl_payment_links_get200_response.rb +1 -1
- data/lib/cybersource_rest_client/models/pbl_payment_links_post201_response.rb +1 -1
- data/lib/cybersource_rest_client/models/post_customer_payment_instrument_request.rb +1 -1
- data/lib/cybersource_rest_client/models/post_customer_request.rb +1 -1
- data/lib/cybersource_rest_client/models/post_payment_instrument_request.rb +1 -1
- data/lib/cybersource_rest_client/models/post_tokenized_card_request.rb +15 -5
- data/lib/cybersource_rest_client/models/pts_v2_create_billing_agreement_post201_response_agreement_information.rb +80 -1
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb +41 -1
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_merchant_information.rb +196 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_account_information.rb +189 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information.rb +15 -5
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information_account_features.rb +196 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_token_information.rb +189 -0
- data/lib/cybersource_rest_client/models/pts_v2_modify_billing_agreement_post201_response_agreement_information.rb +35 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_point_of_sale_information.rb +22 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_processor_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_order_post201_response_order_information_shipping_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +106 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_strong_authentication.rb +22 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information.rb +15 -5
- data/lib/cybersource_rest_client/models/{pts_v2_payments_post201_response_payment_information_tokenized_card.rb → pts_v2_payments_post201_response_payment_account_information_tokenized_card.rb} +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information.rb +18 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +23 -6
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_token_information.rb +15 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_token_information_third_party_token.rb +213 -0
- 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_error_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_order_information_amount_details.rb +18 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +19 -2
- data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_processor_information.rb +7 -1
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information.rb +45 -5
- data/lib/cybersource_rest_client/models/{pull_funds201_response_processor_information_avs.rb → pts_v2_payouts_post201_response_processor_information_avs.rb} +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information_customer.rb +196 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information_electronic_verification_results.rb +281 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_buyer_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information.rb +18 -5
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information.rb +19 -6
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_agreement_information.rb +84 -5
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_order_information.rb +12 -2
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_order_information_amount_details.rb +230 -0
- data/lib/cybersource_rest_client/models/{ptsv2intents_order_information_invoice_details.rb → ptsv2billingagreements_order_information_invoice_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_bank.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_bank_account_alias.rb +207 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_processing_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2billingagreementsid_agreement_information.rb +56 -5
- data/lib/cybersource_rest_client/models/ptsv2billingagreementsid_processing_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +35 -5
- data/lib/cybersource_rest_client/models/ptsv2credits_token_information.rb +228 -0
- data/lib/cybersource_rest_client/models/ptsv2intents_order_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2intentsid_order_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +16 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb +28 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_digital_currency.rb +231 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.rb +23 -6
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +32 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank_account_alias.rb +207 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_third_party_token.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +72 -6
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_program_indicators.rb +202 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +56 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +16 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_sender_information.rb +16 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_token_information.rb +32 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_token_information_token_authentication_information.rb +193 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_token_information_token_authentication_information_authenticated_identities.rb +252 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_shipping_details.rb +100 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processor_information.rb +39 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_shipping_details.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +32 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_device_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_payment_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +18 -5
- data/lib/cybersource_rest_client/models/pull_funds201_response_processor_information.rb +36 -6
- data/lib/cybersource_rest_client/models/pull_funds_request.rb +11 -1
- data/lib/cybersource_rest_client/models/push_funds201_response_processor_information.rb +45 -5
- data/lib/cybersource_rest_client/models/risk_products.rb +15 -5
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information_ship_to.rb +39 -5
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information_shipping_details.rb +1 -1
- data/lib/cybersource_rest_client/models/tms_card_art.rb +23 -1
- data/lib/cybersource_rest_client/models/tms_embedded_instrument_identifier_bill_to.rb +22 -5
- data/lib/cybersource_rest_client/models/tms_tokenized_card_delete_request.rb +189 -0
- data/lib/cybersource_rest_client/models/tmsv1paymentinstruments__embedded.rb +190 -0
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card.rb +22 -1
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_card.rb +1 -1
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata.rb +16 -5
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer.rb +41 -8
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer_bank_applications.rb +201 -0
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer_capabilities.rb +257 -0
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_verification_results.rb +202 -0
- data/lib/cybersource_rest_client/models/tmsv2customers__embedded.rb +200 -0
- data/lib/cybersource_rest_client/models/{tmsv3tokenstoken_idpaymentcredentials_order_information_bill_to.rb → tmsv2tokenizedcards_bill_to.rb} +1 -1
- data/lib/cybersource_rest_client/models/tmsv2tokenizedcardstokenized_card_iddelete_reason.rb +208 -0
- data/lib/cybersource_rest_client/models/tmsv3tokenstoken_idpaymentcredentials_order_information.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_shipping_details.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_sender_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ucv1sessions_data.rb +44 -14
- data/lib/cybersource_rest_client/models/ucv1sessions_data_aggregator_information.rb +325 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_aggregator_information_sub_merchant.rb +366 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_consumer_authentication_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ucv1sessions_data_installment_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information_merchant_descriptor.rb +18 -1
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information.rb +16 -6
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_amount_details.rb +86 -12
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_invoice_details.rb +242 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_invoice_details_transaction_advice_addendum.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_line_items.rb +702 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_shipping_details.rb +213 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information.rb +38 -1
- data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_bank_transfer_options.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_recurring_options.rb +192 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_recipient_information.rb +107 -53
- data/lib/cybersource_rest_client/models/ucv1sessions_data_sender_information.rb +376 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_sender_information_account.rb +213 -0
- data/lib/cybersource_rest_client/models/update_payments.rb +192 -0
- data/lib/cybersource_rest_client/models/value_added_services_products.rb +25 -5
- data/lib/cybersource_rest_client.rb +71 -12
- metadata +78 -19
- data/lib/cybersource_rest_client/api/token_api.rb +0 -306
- data/lib/cybersource_rest_client/api/tokenized_card_api.rb +0 -371
|
@@ -23,9 +23,18 @@ module CyberSource
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :network
|
|
25
25
|
|
|
26
|
+
# Interoperability Token received by merchant for Authorization API. Field for merchant to send Klarna Advantage Plus authorization approval token for Auth API call.
|
|
27
|
+
attr_accessor :auth_approval_token
|
|
28
|
+
|
|
29
|
+
# Supplementary transaction data for Klarna Advantage Plus. Fields to capture Interoperability Data from Merchant and transfer to Klarna for Authorization/Sale/Re-Auth/Capture APIs.
|
|
30
|
+
attr_accessor :supplementary_transaction_data
|
|
31
|
+
|
|
26
32
|
# Field contains the response source code that identifies the source.
|
|
27
33
|
attr_accessor :response_source_code
|
|
28
34
|
|
|
35
|
+
# Merchant Commercial Enhanced Data Program (CEDP) verified indicator for capture/bill requests. This field is used when the client is doing authorization with a different gateway and capture/settlement with CyberSource. This field flows in ISO field 34, DSID 02 tag DA, in AN, EBCDIC format. Possible values: - `Y`: Merchant CEDP verified #### Used by **Capture Request** Request field for force capture/bill support when auth is done with a different gateway.
|
|
36
|
+
attr_accessor :cedp_verified_indicator
|
|
37
|
+
|
|
29
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
39
|
def self.attribute_map
|
|
31
40
|
{
|
|
@@ -33,7 +42,10 @@ module CyberSource
|
|
|
33
42
|
:'authorization_options' => :'authorizationOptions',
|
|
34
43
|
:'reversal' => :'reversal',
|
|
35
44
|
:'network' => :'network',
|
|
36
|
-
:'
|
|
45
|
+
:'auth_approval_token' => :'authApprovalToken',
|
|
46
|
+
:'supplementary_transaction_data' => :'supplementaryTransactionData',
|
|
47
|
+
:'response_source_code' => :'responseSourceCode',
|
|
48
|
+
:'cedp_verified_indicator' => :'cedpVerifiedIndicator'
|
|
37
49
|
}
|
|
38
50
|
end
|
|
39
51
|
|
|
@@ -44,7 +56,10 @@ module CyberSource
|
|
|
44
56
|
:'authorization_options' => :'authorization_options',
|
|
45
57
|
:'reversal' => :'reversal',
|
|
46
58
|
:'network' => :'network',
|
|
47
|
-
:'
|
|
59
|
+
:'auth_approval_token' => :'auth_approval_token',
|
|
60
|
+
:'supplementary_transaction_data' => :'supplementary_transaction_data',
|
|
61
|
+
:'response_source_code' => :'response_source_code',
|
|
62
|
+
:'cedp_verified_indicator' => :'cedp_verified_indicator'
|
|
48
63
|
}
|
|
49
64
|
end
|
|
50
65
|
|
|
@@ -55,7 +70,10 @@ module CyberSource
|
|
|
55
70
|
:'authorization_options' => :'Ptsv2paymentsProcessorInformationAuthorizationOptions',
|
|
56
71
|
:'reversal' => :'Ptsv2paymentsProcessorInformationReversal',
|
|
57
72
|
:'network' => :'Ptsv2paymentsProcessorInformationReversalNetwork',
|
|
58
|
-
:'
|
|
73
|
+
:'auth_approval_token' => :'String',
|
|
74
|
+
:'supplementary_transaction_data' => :'String',
|
|
75
|
+
:'response_source_code' => :'String',
|
|
76
|
+
:'cedp_verified_indicator' => :'String'
|
|
59
77
|
}
|
|
60
78
|
end
|
|
61
79
|
|
|
@@ -83,9 +101,21 @@ module CyberSource
|
|
|
83
101
|
self.network = attributes[:'network']
|
|
84
102
|
end
|
|
85
103
|
|
|
104
|
+
if attributes.has_key?(:'authApprovalToken')
|
|
105
|
+
self.auth_approval_token = attributes[:'authApprovalToken']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.has_key?(:'supplementaryTransactionData')
|
|
109
|
+
self.supplementary_transaction_data = attributes[:'supplementaryTransactionData']
|
|
110
|
+
end
|
|
111
|
+
|
|
86
112
|
if attributes.has_key?(:'responseSourceCode')
|
|
87
113
|
self.response_source_code = attributes[:'responseSourceCode']
|
|
88
114
|
end
|
|
115
|
+
|
|
116
|
+
if attributes.has_key?(:'cedpVerifiedIndicator')
|
|
117
|
+
self.cedp_verified_indicator = attributes[:'cedpVerifiedIndicator']
|
|
118
|
+
end
|
|
89
119
|
end
|
|
90
120
|
|
|
91
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -107,12 +137,30 @@ module CyberSource
|
|
|
107
137
|
@pre_approval_token = pre_approval_token
|
|
108
138
|
end
|
|
109
139
|
|
|
140
|
+
# Custom attribute writer method with validation
|
|
141
|
+
# @param [Object] auth_approval_token Value to be assigned
|
|
142
|
+
def auth_approval_token=(auth_approval_token)
|
|
143
|
+
@auth_approval_token = auth_approval_token
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] supplementary_transaction_data Value to be assigned
|
|
148
|
+
def supplementary_transaction_data=(supplementary_transaction_data)
|
|
149
|
+
@supplementary_transaction_data = supplementary_transaction_data
|
|
150
|
+
end
|
|
151
|
+
|
|
110
152
|
# Custom attribute writer method with validation
|
|
111
153
|
# @param [Object] response_source_code Value to be assigned
|
|
112
154
|
def response_source_code=(response_source_code)
|
|
113
155
|
@response_source_code = response_source_code
|
|
114
156
|
end
|
|
115
157
|
|
|
158
|
+
# Custom attribute writer method with validation
|
|
159
|
+
# @param [Object] cedp_verified_indicator Value to be assigned
|
|
160
|
+
def cedp_verified_indicator=(cedp_verified_indicator)
|
|
161
|
+
@cedp_verified_indicator = cedp_verified_indicator
|
|
162
|
+
end
|
|
163
|
+
|
|
116
164
|
# Checks equality by comparing each attribute.
|
|
117
165
|
# @param [Object] Object to be compared
|
|
118
166
|
def ==(o)
|
|
@@ -122,7 +170,10 @@ module CyberSource
|
|
|
122
170
|
authorization_options == o.authorization_options &&
|
|
123
171
|
reversal == o.reversal &&
|
|
124
172
|
network == o.network &&
|
|
125
|
-
|
|
173
|
+
auth_approval_token == o.auth_approval_token &&
|
|
174
|
+
supplementary_transaction_data == o.supplementary_transaction_data &&
|
|
175
|
+
response_source_code == o.response_source_code &&
|
|
176
|
+
cedp_verified_indicator == o.cedp_verified_indicator
|
|
126
177
|
end
|
|
127
178
|
|
|
128
179
|
# @see the `==` method
|
|
@@ -134,7 +185,7 @@ module CyberSource
|
|
|
134
185
|
# Calculates hash code according to all attributes.
|
|
135
186
|
# @return [Fixnum] Hash code
|
|
136
187
|
def hash
|
|
137
|
-
[pre_approval_token, authorization_options, reversal, network, response_source_code].hash
|
|
188
|
+
[pre_approval_token, authorization_options, reversal, network, auth_approval_token, supplementary_transaction_data, response_source_code, cedp_verified_indicator].hash
|
|
138
189
|
end
|
|
139
190
|
|
|
140
191
|
# Builds the object from hash
|
|
@@ -70,6 +70,9 @@ module CyberSource
|
|
|
70
70
|
# The city of the recipient. This field is applicable for AFT transactions. Only alpha numeric values are supported. Special characters not in the standard ASCII character set are not supported and will be stripped before being sent to sent to the processor.
|
|
71
71
|
attr_accessor :locality
|
|
72
72
|
|
|
73
|
+
# CPF or CNPJ of the cash-in recipient. \"Cadastro de Pessoas Físicas\", which translates to the \"Natural Persons Register.\" It is the individual taxpayer registry identification number in Brazil, similar to a Social Security Number (SSN) in the United States or a National Insurance Number in the UK.
|
|
74
|
+
attr_accessor :tax_id_number
|
|
75
|
+
|
|
73
76
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
74
77
|
def self.attribute_map
|
|
75
78
|
{
|
|
@@ -91,7 +94,8 @@ module CyberSource
|
|
|
91
94
|
:'country_of_birth' => :'countryOfBirth',
|
|
92
95
|
:'occupation' => :'occupation',
|
|
93
96
|
:'email' => :'email',
|
|
94
|
-
:'locality' => :'locality'
|
|
97
|
+
:'locality' => :'locality',
|
|
98
|
+
:'tax_id_number' => :'taxIdNumber'
|
|
95
99
|
}
|
|
96
100
|
end
|
|
97
101
|
|
|
@@ -116,7 +120,8 @@ module CyberSource
|
|
|
116
120
|
:'country_of_birth' => :'country_of_birth',
|
|
117
121
|
:'occupation' => :'occupation',
|
|
118
122
|
:'email' => :'email',
|
|
119
|
-
:'locality' => :'locality'
|
|
123
|
+
:'locality' => :'locality',
|
|
124
|
+
:'tax_id_number' => :'tax_id_number'
|
|
120
125
|
}
|
|
121
126
|
end
|
|
122
127
|
|
|
@@ -141,7 +146,8 @@ module CyberSource
|
|
|
141
146
|
:'country_of_birth' => :'String',
|
|
142
147
|
:'occupation' => :'String',
|
|
143
148
|
:'email' => :'String',
|
|
144
|
-
:'locality' => :'String'
|
|
149
|
+
:'locality' => :'String',
|
|
150
|
+
:'tax_id_number' => :'Float'
|
|
145
151
|
}
|
|
146
152
|
end
|
|
147
153
|
|
|
@@ -228,6 +234,10 @@ module CyberSource
|
|
|
228
234
|
if attributes.has_key?(:'locality')
|
|
229
235
|
self.locality = attributes[:'locality']
|
|
230
236
|
end
|
|
237
|
+
|
|
238
|
+
if attributes.has_key?(:'taxIdNumber')
|
|
239
|
+
self.tax_id_number = attributes[:'taxIdNumber']
|
|
240
|
+
end
|
|
231
241
|
end
|
|
232
242
|
|
|
233
243
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -380,7 +390,8 @@ module CyberSource
|
|
|
380
390
|
country_of_birth == o.country_of_birth &&
|
|
381
391
|
occupation == o.occupation &&
|
|
382
392
|
email == o.email &&
|
|
383
|
-
locality == o.locality
|
|
393
|
+
locality == o.locality &&
|
|
394
|
+
tax_id_number == o.tax_id_number
|
|
384
395
|
end
|
|
385
396
|
|
|
386
397
|
# @see the `==` method
|
|
@@ -392,7 +403,7 @@ module CyberSource
|
|
|
392
403
|
# Calculates hash code according to all attributes.
|
|
393
404
|
# @return [Fixnum] Hash code
|
|
394
405
|
def hash
|
|
395
|
-
[account_id, account_type, first_name, middle_name, last_name, address1, administrative_area, postal_code, country, date_of_birth, beneficiary_id, beneficiary_name, beneficiary_address, alias_name, nationality, country_of_birth, occupation, email, locality].hash
|
|
406
|
+
[account_id, account_type, first_name, middle_name, last_name, address1, administrative_area, postal_code, country, date_of_birth, beneficiary_id, beneficiary_name, beneficiary_address, alias_name, nationality, country_of_birth, occupation, email, locality, tax_id_number].hash
|
|
396
407
|
end
|
|
397
408
|
|
|
398
409
|
# Builds the object from hash
|
|
@@ -45,6 +45,9 @@ module CyberSource
|
|
|
45
45
|
# Postal code of sender.
|
|
46
46
|
attr_accessor :postal_code
|
|
47
47
|
|
|
48
|
+
# CPF or CNPJ of the cash-in recipient. \"Cadastro de Pessoas Físicas\", which translates to the \"Natural Persons Register.\" It is the individual taxpayer registry identification number in Brazil, similar to a Social Security Number (SSN) in the United States or a National Insurance Number in the UK.
|
|
49
|
+
attr_accessor :tax_id_number
|
|
50
|
+
|
|
48
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
52
|
def self.attribute_map
|
|
50
53
|
{
|
|
@@ -58,7 +61,8 @@ module CyberSource
|
|
|
58
61
|
:'alias_name' => :'aliasName',
|
|
59
62
|
:'reference_number' => :'referenceNumber',
|
|
60
63
|
:'account' => :'account',
|
|
61
|
-
:'postal_code' => :'postalCode'
|
|
64
|
+
:'postal_code' => :'postalCode',
|
|
65
|
+
:'tax_id_number' => :'taxIdNumber'
|
|
62
66
|
}
|
|
63
67
|
end
|
|
64
68
|
|
|
@@ -75,7 +79,8 @@ module CyberSource
|
|
|
75
79
|
:'alias_name' => :'alias_name',
|
|
76
80
|
:'reference_number' => :'reference_number',
|
|
77
81
|
:'account' => :'account',
|
|
78
|
-
:'postal_code' => :'postal_code'
|
|
82
|
+
:'postal_code' => :'postal_code',
|
|
83
|
+
:'tax_id_number' => :'tax_id_number'
|
|
79
84
|
}
|
|
80
85
|
end
|
|
81
86
|
|
|
@@ -92,7 +97,8 @@ module CyberSource
|
|
|
92
97
|
:'alias_name' => :'String',
|
|
93
98
|
:'reference_number' => :'String',
|
|
94
99
|
:'account' => :'Ptsv2paymentsSenderInformationAccount',
|
|
95
|
-
:'postal_code' => :'String'
|
|
100
|
+
:'postal_code' => :'String',
|
|
101
|
+
:'tax_id_number' => :'Float'
|
|
96
102
|
}
|
|
97
103
|
end
|
|
98
104
|
|
|
@@ -147,6 +153,10 @@ module CyberSource
|
|
|
147
153
|
if attributes.has_key?(:'postalCode')
|
|
148
154
|
self.postal_code = attributes[:'postalCode']
|
|
149
155
|
end
|
|
156
|
+
|
|
157
|
+
if attributes.has_key?(:'taxIdNumber')
|
|
158
|
+
self.tax_id_number = attributes[:'taxIdNumber']
|
|
159
|
+
end
|
|
150
160
|
end
|
|
151
161
|
|
|
152
162
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -237,7 +247,8 @@ module CyberSource
|
|
|
237
247
|
alias_name == o.alias_name &&
|
|
238
248
|
reference_number == o.reference_number &&
|
|
239
249
|
account == o.account &&
|
|
240
|
-
postal_code == o.postal_code
|
|
250
|
+
postal_code == o.postal_code &&
|
|
251
|
+
tax_id_number == o.tax_id_number
|
|
241
252
|
end
|
|
242
253
|
|
|
243
254
|
# @see the `==` method
|
|
@@ -249,7 +260,7 @@ module CyberSource
|
|
|
249
260
|
# Calculates hash code according to all attributes.
|
|
250
261
|
# @return [Fixnum] Hash code
|
|
251
262
|
def hash
|
|
252
|
-
[first_name, middle_name, last_name, address1, locality, administrative_area, country_code, alias_name, reference_number, account, postal_code].hash
|
|
263
|
+
[first_name, middle_name, last_name, address1, locality, administrative_area, country_code, alias_name, reference_number, account, postal_code, tax_id_number].hash
|
|
253
264
|
end
|
|
254
265
|
|
|
255
266
|
# Builds the object from hash
|
|
@@ -28,6 +28,11 @@ module CyberSource
|
|
|
28
28
|
|
|
29
29
|
attr_accessor :token_provisioning_information
|
|
30
30
|
|
|
31
|
+
# Client-generated unique identifier for correlating token operations across API calls. This value helps track and associate token-related transactions.
|
|
32
|
+
attr_accessor :client_correlation_id
|
|
33
|
+
|
|
34
|
+
attr_accessor :token_authentication_information
|
|
35
|
+
|
|
31
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
37
|
def self.attribute_map
|
|
33
38
|
{
|
|
@@ -36,7 +41,9 @@ module CyberSource
|
|
|
36
41
|
:'payment_instrument' => :'paymentInstrument',
|
|
37
42
|
:'shipping_address' => :'shippingAddress',
|
|
38
43
|
:'network_token_option' => :'networkTokenOption',
|
|
39
|
-
:'token_provisioning_information' => :'tokenProvisioningInformation'
|
|
44
|
+
:'token_provisioning_information' => :'tokenProvisioningInformation',
|
|
45
|
+
:'client_correlation_id' => :'clientCorrelationId',
|
|
46
|
+
:'token_authentication_information' => :'tokenAuthenticationInformation'
|
|
40
47
|
}
|
|
41
48
|
end
|
|
42
49
|
|
|
@@ -48,7 +55,9 @@ module CyberSource
|
|
|
48
55
|
:'payment_instrument' => :'payment_instrument',
|
|
49
56
|
:'shipping_address' => :'shipping_address',
|
|
50
57
|
:'network_token_option' => :'network_token_option',
|
|
51
|
-
:'token_provisioning_information' => :'token_provisioning_information'
|
|
58
|
+
:'token_provisioning_information' => :'token_provisioning_information',
|
|
59
|
+
:'client_correlation_id' => :'client_correlation_id',
|
|
60
|
+
:'token_authentication_information' => :'token_authentication_information'
|
|
52
61
|
}
|
|
53
62
|
end
|
|
54
63
|
|
|
@@ -60,7 +69,9 @@ module CyberSource
|
|
|
60
69
|
:'payment_instrument' => :'Ptsv2paymentsTokenInformationPaymentInstrument',
|
|
61
70
|
:'shipping_address' => :'Ptsv2paymentsTokenInformationShippingAddress',
|
|
62
71
|
:'network_token_option' => :'String',
|
|
63
|
-
:'token_provisioning_information' => :'Ptsv2paymentsTokenInformationTokenProvisioningInformation'
|
|
72
|
+
:'token_provisioning_information' => :'Ptsv2paymentsTokenInformationTokenProvisioningInformation',
|
|
73
|
+
:'client_correlation_id' => :'String',
|
|
74
|
+
:'token_authentication_information' => :'Ptsv2paymentsTokenInformationTokenAuthenticationInformation'
|
|
64
75
|
}
|
|
65
76
|
end
|
|
66
77
|
|
|
@@ -95,6 +106,14 @@ module CyberSource
|
|
|
95
106
|
if attributes.has_key?(:'tokenProvisioningInformation')
|
|
96
107
|
self.token_provisioning_information = attributes[:'tokenProvisioningInformation']
|
|
97
108
|
end
|
|
109
|
+
|
|
110
|
+
if attributes.has_key?(:'clientCorrelationId')
|
|
111
|
+
self.client_correlation_id = attributes[:'clientCorrelationId']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.has_key?(:'tokenAuthenticationInformation')
|
|
115
|
+
self.token_authentication_information = attributes[:'tokenAuthenticationInformation']
|
|
116
|
+
end
|
|
98
117
|
end
|
|
99
118
|
|
|
100
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -116,6 +135,12 @@ module CyberSource
|
|
|
116
135
|
@jti = jti
|
|
117
136
|
end
|
|
118
137
|
|
|
138
|
+
# Custom attribute writer method with validation
|
|
139
|
+
# @param [Object] client_correlation_id Value to be assigned
|
|
140
|
+
def client_correlation_id=(client_correlation_id)
|
|
141
|
+
@client_correlation_id = client_correlation_id
|
|
142
|
+
end
|
|
143
|
+
|
|
119
144
|
# Checks equality by comparing each attribute.
|
|
120
145
|
# @param [Object] Object to be compared
|
|
121
146
|
def ==(o)
|
|
@@ -126,7 +151,9 @@ module CyberSource
|
|
|
126
151
|
payment_instrument == o.payment_instrument &&
|
|
127
152
|
shipping_address == o.shipping_address &&
|
|
128
153
|
network_token_option == o.network_token_option &&
|
|
129
|
-
token_provisioning_information == o.token_provisioning_information
|
|
154
|
+
token_provisioning_information == o.token_provisioning_information &&
|
|
155
|
+
client_correlation_id == o.client_correlation_id &&
|
|
156
|
+
token_authentication_information == o.token_authentication_information
|
|
130
157
|
end
|
|
131
158
|
|
|
132
159
|
# @see the `==` method
|
|
@@ -138,7 +165,7 @@ module CyberSource
|
|
|
138
165
|
# Calculates hash code according to all attributes.
|
|
139
166
|
# @return [Fixnum] Hash code
|
|
140
167
|
def hash
|
|
141
|
-
[jti, transient_token_jwt, payment_instrument, shipping_address, network_token_option, token_provisioning_information].hash
|
|
168
|
+
[jti, transient_token_jwt, payment_instrument, shipping_address, network_token_option, token_provisioning_information, client_correlation_id, token_authentication_information].hash
|
|
142
169
|
end
|
|
143
170
|
|
|
144
171
|
# Builds the object from hash
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#CyberSource Merged Spec
|
|
3
|
+
|
|
4
|
+
#All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 0.0.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.38
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
module CyberSource
|
|
15
|
+
# Contains authentication information associated with the token, including details about authenticated identities.
|
|
16
|
+
class Ptsv2paymentsTokenInformationTokenAuthenticationInformation
|
|
17
|
+
# An array of authenticated identity objects containing verification data from identity providers.
|
|
18
|
+
attr_accessor :authenticated_identities
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'authenticated_identities' => :'authenticatedIdentities'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from JSON key to ruby-style variable name.
|
|
28
|
+
def self.json_map
|
|
29
|
+
{
|
|
30
|
+
:'authenticated_identities' => :'authenticated_identities'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Attribute type mapping.
|
|
35
|
+
def self.swagger_types
|
|
36
|
+
{
|
|
37
|
+
:'authenticated_identities' => :'Array<Ptsv2paymentsTokenInformationTokenAuthenticationInformationAuthenticatedIdentities>'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Initializes the object
|
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
43
|
+
def initialize(attributes = {})
|
|
44
|
+
return unless attributes.is_a?(Hash)
|
|
45
|
+
|
|
46
|
+
# convert string to symbol for hash key
|
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
48
|
+
|
|
49
|
+
if attributes.has_key?(:'authenticatedIdentities')
|
|
50
|
+
if (value = attributes[:'authenticatedIdentities']).is_a?(Array)
|
|
51
|
+
self.authenticated_identities = value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
57
|
+
# @return Array for valid properties with the reasons
|
|
58
|
+
def list_invalid_properties
|
|
59
|
+
invalid_properties = Array.new
|
|
60
|
+
invalid_properties
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Check to see if the all the properties in the model are valid
|
|
64
|
+
# @return true if the model is valid
|
|
65
|
+
def valid?
|
|
66
|
+
true
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Checks equality by comparing each attribute.
|
|
70
|
+
# @param [Object] Object to be compared
|
|
71
|
+
def ==(o)
|
|
72
|
+
return true if self.equal?(o)
|
|
73
|
+
self.class == o.class &&
|
|
74
|
+
authenticated_identities == o.authenticated_identities
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# @see the `==` method
|
|
78
|
+
# @param [Object] Object to be compared
|
|
79
|
+
def eql?(o)
|
|
80
|
+
self == o
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Calculates hash code according to all attributes.
|
|
84
|
+
# @return [Fixnum] Hash code
|
|
85
|
+
def hash
|
|
86
|
+
[authenticated_identities].hash
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Builds the object from hash
|
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
91
|
+
# @return [Object] Returns the model itself
|
|
92
|
+
def build_from_hash(attributes)
|
|
93
|
+
return nil unless attributes.is_a?(Hash)
|
|
94
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
95
|
+
if type =~ /\AArray<(.*)>/i
|
|
96
|
+
# check to ensure the input is an array given that the the attribute
|
|
97
|
+
# is documented as an array but the input is not
|
|
98
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
99
|
+
self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
100
|
+
end
|
|
101
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
102
|
+
self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
103
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
self
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Deserializes the data based on type
|
|
110
|
+
# @param string type Data type
|
|
111
|
+
# @param string value Value to be deserialized
|
|
112
|
+
# @return [Object] Deserialized data
|
|
113
|
+
def _deserialize(type, value)
|
|
114
|
+
case type.to_sym
|
|
115
|
+
when :DateTime
|
|
116
|
+
DateTime.parse(value)
|
|
117
|
+
when :Date
|
|
118
|
+
Date.parse(value)
|
|
119
|
+
when :String
|
|
120
|
+
value.to_s
|
|
121
|
+
when :Integer
|
|
122
|
+
value.to_i
|
|
123
|
+
when :Float
|
|
124
|
+
value.to_f
|
|
125
|
+
when :BOOLEAN
|
|
126
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
127
|
+
true
|
|
128
|
+
else
|
|
129
|
+
false
|
|
130
|
+
end
|
|
131
|
+
when :Object
|
|
132
|
+
# generic object (usually a Hash), return directly
|
|
133
|
+
value
|
|
134
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
135
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
136
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
137
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
138
|
+
k_type = Regexp.last_match[:k_type]
|
|
139
|
+
v_type = Regexp.last_match[:v_type]
|
|
140
|
+
{}.tap do |hash|
|
|
141
|
+
value.each do |k, v|
|
|
142
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
else # model
|
|
146
|
+
temp_model = CyberSource.const_get(type).new
|
|
147
|
+
temp_model.build_from_hash(value)
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Returns the string representation of the object
|
|
152
|
+
# @return [String] String presentation of the object
|
|
153
|
+
def to_s
|
|
154
|
+
to_hash.to_s
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
|
159
|
+
def to_body
|
|
160
|
+
to_hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Returns the object in the form of hash
|
|
164
|
+
# @return [Hash] Returns the object in the form of hash
|
|
165
|
+
def to_hash
|
|
166
|
+
hash = {}
|
|
167
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
168
|
+
value = self.send(attr)
|
|
169
|
+
next if value.nil?
|
|
170
|
+
hash[param] = _to_hash(value)
|
|
171
|
+
end
|
|
172
|
+
hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Outputs non-array value in the form of hash
|
|
176
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
177
|
+
# @param [Object] value Any valid value
|
|
178
|
+
# @return [Hash] Returns the value in the form of hash
|
|
179
|
+
def _to_hash(value)
|
|
180
|
+
if value.is_a?(Array)
|
|
181
|
+
value.compact.map { |v| _to_hash(v) }
|
|
182
|
+
elsif value.is_a?(Hash)
|
|
183
|
+
{}.tap do |hash|
|
|
184
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
185
|
+
end
|
|
186
|
+
elsif value.respond_to? :to_hash
|
|
187
|
+
value.to_hash
|
|
188
|
+
else
|
|
189
|
+
value
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|