cybersource_rest_client 0.0.79 → 0.0.81
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 +17 -7
- data/lib/AuthenticationSDK/core/Authorization.rb +2 -2
- data/lib/AuthenticationSDK/core/MerchantConfig.rb +278 -23
- data/lib/AuthenticationSDK/util/Cache.rb +158 -8
- data/lib/AuthenticationSDK/util/CachedMLEKId.rb +17 -0
- data/lib/AuthenticationSDK/util/CertificateUtility.rb +109 -29
- data/lib/AuthenticationSDK/util/Constants.rb +6 -0
- data/lib/AuthenticationSDK/util/JWT/JWTExceptions.rb +81 -0
- data/lib/AuthenticationSDK/util/JWT/JWTUtility.rb +154 -0
- data/lib/AuthenticationSDK/util/MLEUtility.rb +167 -11
- data/lib/AuthenticationSDK/util/Utility.rb +37 -1
- data/lib/cybersource_rest_client/api/bank_account_validation_api.rb +13 -5
- data/lib/cybersource_rest_client/api/batches_api.rb +50 -18
- data/lib/cybersource_rest_client/api/billing_agreements_api.rb +33 -9
- data/lib/cybersource_rest_client/api/bin_lookup_api.rb +11 -3
- data/lib/cybersource_rest_client/api/capture_api.rb +11 -3
- data/lib/cybersource_rest_client/api/chargeback_details_api.rb +11 -3
- data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +11 -3
- data/lib/cybersource_rest_client/api/conversion_details_api.rb +11 -3
- data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +35 -11
- data/lib/cybersource_rest_client/api/credit_api.rb +11 -3
- data/lib/cybersource_rest_client/api/customer_api.rb +44 -12
- data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +55 -15
- data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +55 -15
- data/lib/cybersource_rest_client/api/decision_manager_api.rb +57 -17
- data/lib/cybersource_rest_client/api/device_de_association_api.rb +24 -8
- data/lib/cybersource_rest_client/api/device_search_api.rb +26 -10
- data/lib/cybersource_rest_client/api/download_dtd_api.rb +11 -3
- data/lib/cybersource_rest_client/api/download_xsd_api.rb +11 -3
- data/lib/cybersource_rest_client/api/emv_tag_details_api.rb +22 -6
- data/lib/cybersource_rest_client/api/enrollment_api.rb +104 -0
- data/lib/cybersource_rest_client/api/flex_api_api.rb +11 -3
- data/lib/cybersource_rest_client/api/instructions_api.rb +452 -0
- data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +66 -18
- data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +11 -3
- data/lib/cybersource_rest_client/api/invoice_settings_api.rb +22 -6
- data/lib/cybersource_rest_client/api/invoices_api.rb +77 -21
- data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +81 -25
- data/lib/cybersource_rest_client/api/merchant_boarding_api.rb +24 -8
- data/lib/cybersource_rest_client/api/merchant_defined_fields_api.rb +50 -18
- data/lib/cybersource_rest_client/api/microform_integration_api.rb +11 -3
- data/lib/cybersource_rest_client/api/net_fundings_api.rb +11 -3
- data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +11 -3
- data/lib/cybersource_rest_client/api/offers_api.rb +24 -8
- data/lib/cybersource_rest_client/api/orders_api.rb +22 -6
- data/lib/cybersource_rest_client/api/payer_authentication_api.rb +33 -9
- data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +11 -3
- data/lib/cybersource_rest_client/api/payment_instrument_api.rb +44 -12
- data/lib/cybersource_rest_client/api/payment_links_api.rb +44 -12
- data/lib/cybersource_rest_client/api/payment_tokens_api.rb +11 -3
- data/lib/cybersource_rest_client/api/payments_api.rb +66 -18
- data/lib/cybersource_rest_client/api/payouts_api.rb +11 -3
- data/lib/cybersource_rest_client/api/plans_api.rb +88 -24
- data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +11 -3
- data/lib/cybersource_rest_client/api/push_funds_api.rb +11 -3
- data/lib/cybersource_rest_client/api/refund_api.rb +22 -6
- data/lib/cybersource_rest_client/api/report_definitions_api.rb +22 -6
- data/lib/cybersource_rest_client/api/report_downloads_api.rb +11 -3
- data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +55 -15
- data/lib/cybersource_rest_client/api/reports_api.rb +33 -9
- data/lib/cybersource_rest_client/api/retrieval_details_api.rb +11 -3
- data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +11 -3
- data/lib/cybersource_rest_client/api/reversal_api.rb +22 -6
- data/lib/cybersource_rest_client/api/search_transactions_api.rb +22 -6
- data/lib/cybersource_rest_client/api/secure_file_share_api.rb +22 -6
- data/lib/cybersource_rest_client/api/subscriptions_api.rb +97 -33
- data/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +22 -6
- data/lib/cybersource_rest_client/api/taxes_api.rb +22 -6
- data/lib/cybersource_rest_client/api/token_api.rb +24 -8
- data/lib/cybersource_rest_client/api/tokenize_api.rb +107 -0
- data/lib/cybersource_rest_client/api/tokenized_card_api.rb +126 -9
- data/lib/cybersource_rest_client/api/transaction_batches_api.rb +44 -12
- data/lib/cybersource_rest_client/api/transaction_details_api.rb +11 -3
- data/lib/cybersource_rest_client/api/transient_token_data_api.rb +22 -6
- data/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb +11 -3
- data/lib/cybersource_rest_client/api/user_management_api.rb +11 -3
- data/lib/cybersource_rest_client/api/user_management_search_api.rb +11 -3
- data/lib/cybersource_rest_client/api/verification_api.rb +22 -6
- data/lib/cybersource_rest_client/api/void_api.rb +55 -15
- data/lib/cybersource_rest_client/api_client.rb +20 -3
- data/lib/cybersource_rest_client/models/acpv1instructions_decline_threshold.rb +232 -0
- data/lib/cybersource_rest_client/models/acpv1instructions_mandates.rb +405 -0
- data/lib/cybersource_rest_client/models/acpv1instructions_recurring_payment_information.rb +191 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconf_processor_info_payment_instrument_verifi_results.rb +213 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_confirmation_data.rb +229 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_merchant_information.rb +258 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_order_information.rb +377 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_order_information_shipping_details.rb +206 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb +425 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information_payment_instrument.rb +190 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_attachments.rb +258 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_client_reference_information.rb +215 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_mandate_reference_data.rb +205 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_merchant_information.rb +334 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_merchant_information_merchant_descriptor.rb +250 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information.rb +228 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_amount_detail.rb +354 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_items.rb +367 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_items_additional_info.rb +231 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_items_policies.rb +346 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_line_items.rb +190 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb +686 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_payment_options.rb +217 -0
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb +348 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_assurance_data.rb +313 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_authenticated_identities.rb +237 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_authentication_context.rb +191 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_bill_to.rb +400 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information.rb +229 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information_personal_identification.rb +212 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_consent_data.rb +297 -0
- data/lib/cybersource_rest_client/models/{rbsv1subscriptions_client_reference_information.rb → acpv1tokens_consumer_identity.rb} +73 -61
- data/lib/cybersource_rest_client/models/acpv1tokens_device_information.rb +378 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_device_information_device_data.rb +302 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_enrollment_reference_data.rb +207 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information.rb +215 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information_customer.rb +197 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information_instrument_identifier.rb +206 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information_payment_instrument.rb +197 -0
- data/lib/cybersource_rest_client/models/agentic_cancel_purchase_intent_request.rb +257 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_bad_request_response400.rb +189 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_bad_request_response400_error.rb +238 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_bad_request_response400_error_detail.rb +224 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_request.rb +325 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_response200.rb +206 -0
- data/lib/cybersource_rest_client/models/agentic_card_enrollment_response202.rb +219 -0
- data/lib/cybersource_rest_client/models/agentic_confirm_transaction_events_request.rb +247 -0
- data/lib/cybersource_rest_client/models/agentic_confirm_transaction_events_response202.rb +195 -0
- data/lib/cybersource_rest_client/models/agentic_create_purchase_intent_request.rb +327 -0
- data/lib/cybersource_rest_client/models/agentic_create_purchase_intent_response200.rb +222 -0
- data/lib/cybersource_rest_client/models/agentic_pending_purchase_intent_response202.rb +241 -0
- data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_request.rb +247 -0
- data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_response200.rb +200 -0
- data/lib/cybersource_rest_client/models/{rbsv1plans_client_reference_information.rb → agentic_retrieve_payment_credentials_response200_transaction_response_complete.rb} +52 -47
- data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_response200_transaction_response_with_pending_events.rb +235 -0
- data/lib/cybersource_rest_client/models/agentic_update_purchase_intent_request.rb +315 -0
- data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb +36 -1
- data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information_localized_names.rb +254 -0
- data/lib/cybersource_rest_client/models/create_plan_request.rb +1 -11
- data/lib/cybersource_rest_client/models/create_subscription_request.rb +1 -1
- data/lib/cybersource_rest_client/models/create_subscription_request_1.rb +1 -1
- data/lib/cybersource_rest_client/models/create_subscription_response.rb +15 -5
- data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +13 -2
- data/lib/cybersource_rest_client/models/get_all_subscriptions_response_client_reference_information.rb +196 -0
- data/lib/cybersource_rest_client/models/get_all_subscriptions_response_subscriptions.rb +11 -1
- data/lib/cybersource_rest_client/models/get_subscription_response.rb +11 -1
- data/lib/cybersource_rest_client/models/get_subscription_response_1_payment_instrument.rb +1 -1
- data/lib/cybersource_rest_client/models/get_subscription_response_1_payment_instrument_buyer_information.rb +1 -1
- data/lib/cybersource_rest_client/models/get_subscription_response_1_shipping_address.rb +1 -1
- data/lib/cybersource_rest_client/models/get_subscription_response_reactivation_information.rb +22 -22
- data/lib/cybersource_rest_client/models/inline_response_200.rb +9 -44
- data/lib/cybersource_rest_client/models/inline_response_200_1.rb +29 -31
- data/lib/cybersource_rest_client/models/inline_response_200_10.rb +33 -37
- data/lib/cybersource_rest_client/models/{inline_response_200_9_devices.rb → inline_response_200_10_devices.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_9_payment_processor_to_terminal_map.rb → inline_response_200_10_payment_processor_to_terminal_map.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_11.rb +47 -86
- data/lib/cybersource_rest_client/models/{inline_response_200_10__embedded.rb → inline_response_200_11__embedded.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_10__embedded__links.rb → inline_response_200_11__embedded__links.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_10__embedded__links_reports.rb → inline_response_200_11__embedded__links_reports.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_10__embedded_batches.rb → inline_response_200_11__embedded_batches.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_10__embedded_totals.rb → inline_response_200_11__embedded_totals.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_11__links.rb +16 -17
- data/lib/cybersource_rest_client/models/inline_response_200_12.rb +47 -49
- data/lib/cybersource_rest_client/models/inline_response_200_12__links.rb +201 -0
- data/lib/cybersource_rest_client/models/{inline_response_200_11__links_report.rb → inline_response_200_12__links_report.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_11_billing.rb → inline_response_200_12_billing.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_13.rb +102 -31
- data/lib/cybersource_rest_client/models/{inline_response_200_12_records.rb → inline_response_200_13_records.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_12_response_record.rb → inline_response_200_13_response_record.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_12_response_record_additional_updates.rb → inline_response_200_13_response_record_additional_updates.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_12_source_record.rb → inline_response_200_13_source_record.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_14.rb +18 -84
- data/lib/cybersource_rest_client/models/inline_response_200_15.rb +287 -0
- data/lib/cybersource_rest_client/models/{inline_response_200_14_client_reference_information.rb → inline_response_200_15_client_reference_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_content.rb → inline_response_200_1_content.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_2.rb +32 -103
- data/lib/cybersource_rest_client/models/{inline_response_200_1__embedded.rb → inline_response_200_2__embedded.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_1__embedded_capture.rb → inline_response_200_2__embedded_capture.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_1__embedded_capture__links.rb → inline_response_200_2__embedded_capture__links.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_1__embedded_capture__links_self.rb → inline_response_200_2__embedded_capture__links_self.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_1__embedded_reversal.rb → inline_response_200_2__embedded_reversal.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_1__embedded_reversal__links.rb → inline_response_200_2__embedded_reversal__links.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_1__embedded_reversal__links_self.rb → inline_response_200_2__embedded_reversal__links_self.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_3.rb +100 -54
- data/lib/cybersource_rest_client/models/inline_response_200_4.rb +65 -25
- data/lib/cybersource_rest_client/models/{inline_response_200_3_integration_information.rb → inline_response_200_4_integration_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_3_integration_information_tenant_configurations.rb → inline_response_200_4_integration_information_tenant_configurations.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_5.rb +25 -126
- data/lib/cybersource_rest_client/models/inline_response_200_6.rb +1 -12
- data/lib/cybersource_rest_client/models/inline_response_200_7.rb +129 -51
- data/lib/cybersource_rest_client/models/inline_response_200_8.rb +55 -10
- data/lib/cybersource_rest_client/models/{inline_response_200_7_devices.rb → inline_response_200_8_devices.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_9.rb +10 -55
- data/lib/cybersource_rest_client/models/{inline_response_200_10__links.rb → inline_response_200_details.rb} +18 -17
- data/lib/cybersource_rest_client/models/inline_response_200_errors.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_200_responses.rb +224 -0
- data/lib/cybersource_rest_client/models/inline_response_201_3_setups_payments.rb +15 -5
- data/lib/cybersource_rest_client/models/patch_customer_payment_instrument_request.rb +9 -9
- data/lib/cybersource_rest_client/models/patch_customer_request.rb +9 -9
- data/lib/cybersource_rest_client/models/patch_customer_shipping_address_request.rb +3 -3
- data/lib/cybersource_rest_client/models/patch_payment_instrument_request.rb +9 -9
- data/lib/cybersource_rest_client/models/payment_instrument_list_1__embedded_payment_instruments.rb +8 -8
- data/lib/cybersource_rest_client/models/payment_instrument_list__embedded.rb +1 -1
- data/lib/cybersource_rest_client/models/payments_products.rb +15 -5
- data/lib/cybersource_rest_client/models/post_customer_payment_instrument_request.rb +9 -9
- data/lib/cybersource_rest_client/models/post_customer_request.rb +9 -9
- data/lib/cybersource_rest_client/models/post_customer_shipping_address_request.rb +3 -3
- data/lib/cybersource_rest_client/models/post_issuer_life_cycle_simulation_request.rb +211 -0
- data/lib/cybersource_rest_client/models/post_payment_instrument_request.rb +9 -9
- data/lib/cybersource_rest_client/models/post_tokenize_request.rb +199 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_ancillary_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_ancillary_information_service.rb +39 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information.rb +246 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit.rb +189 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit_airline.rb +889 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit_airline_ancillary_information.rb +259 -0
- data/lib/cybersource_rest_client/models/{rbsv1subscriptions_client_reference_information_partner.rb → ptsv2paymentsidrefunds_travel_information_transit_airline_ancillary_information_service.rb} +24 -24
- 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/shipping_address_list_for_customer__embedded.rb +1 -1
- data/lib/cybersource_rest_client/models/tms_issuerlifecycleeventsimulations_metadata_card_art_combined_asset.rb +190 -0
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_merchant_information.rb → tms_merchant_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_merchant_information_merchant_descriptor.rb → tms_merchant_information_merchant_descriptor.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_buyer_information_issued_by.rb → tmsv2tokenize_default_payment_instrument_buyer_info_issued_by.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_buyer_information_personal_identification.rb → tmsv2tokenize_default_payment_instrument_buyer_info_personal_identification.rb} +2 -2
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_card_tokenized_information.rb → tmsv2tokenize_default_payment_instrument_card_tokenized_info.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_instrument_identifier.rb → tmsv2tokenize_default_payment_instrument_instrument_identifier.rb} +1 -1
- data/lib/cybersource_rest_client/models/tmsv2tokenize_processing_information.rb +205 -0
- data/lib/cybersource_rest_client/models/tmsv2tokenize_token_information.rb +247 -0
- data/lib/cybersource_rest_client/models/tmsv2tokenize_token_information_customer.rb +289 -0
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded.rb → tmsv2tokenize_token_information_customer__embedded.rb} +3 -3
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument.rb → tmsv2tokenize_token_information_customer__embedded_default_payment_instrument.rb} +10 -10
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument__embedded.rb → tmsv2tokenize_token_information_customer__embedded_default_payment_instrument__embedded.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument__links.rb → tmsv2tokenize_token_information_customer__embedded_default_payment_instrument__links.rb} +3 -3
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument__links_self.rb → tmsv2tokenize_token_information_customer__embedded_default_payment_instrument__links_self.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_bank_account.rb → tmsv2tokenize_token_information_customer__embedded_default_payment_instrument_bank_account.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_bill_to.rb → tmsv2tokenize_token_information_customer__embedded_default_payment_instrument_bill_to.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_buyer_information.rb → tmsv2tokenize_token_information_customer__embedded_default_payment_instrument_buyer_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_card.rb → tmsv2tokenize_token_information_customer__embedded_default_payment_instrument_card.rb} +2 -2
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_payment_instrument_metadata.rb → tmsv2tokenize_token_information_customer__embedded_default_payment_instrument_metadata.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_shipping_address.rb → tmsv2tokenize_token_information_customer__embedded_default_shipping_address.rb} +4 -4
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_shipping_address__links.rb → tmsv2tokenize_token_information_customer__embedded_default_shipping_address__links.rb} +3 -3
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_shipping_address__links_customer.rb → tmsv2tokenize_token_information_customer__embedded_default_shipping_address__links_customer.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_shipping_address__links_self.rb → tmsv2tokenize_token_information_customer__embedded_default_shipping_address__links_self.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_shipping_address_metadata.rb → tmsv2tokenize_token_information_customer__embedded_default_shipping_address_metadata.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__embedded_default_shipping_address_ship_to.rb → tmsv2tokenize_token_information_customer__embedded_default_shipping_address_ship_to.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__links.rb → tmsv2tokenize_token_information_customer__links.rb} +4 -4
- data/lib/cybersource_rest_client/models/{tmsv2customers__links_payment_instruments.rb → tmsv2tokenize_token_information_customer__links_payment_instruments.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__links_self.rb → tmsv2tokenize_token_information_customer__links_self.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers__links_shipping_address.rb → tmsv2tokenize_token_information_customer__links_shipping_address.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers_buyer_information.rb → tmsv2tokenize_token_information_customer_buyer_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers_client_reference_information.rb → tmsv2tokenize_token_information_customer_client_reference_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers_default_payment_instrument.rb → tmsv2tokenize_token_information_customer_default_payment_instrument.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers_default_shipping_address.rb → tmsv2tokenize_token_information_customer_default_shipping_address.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers_merchant_defined_information.rb → tmsv2tokenize_token_information_customer_merchant_defined_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers_metadata.rb → tmsv2tokenize_token_information_customer_metadata.rb} +1 -1
- data/lib/cybersource_rest_client/models/{tmsv2customers_object_information.rb → tmsv2tokenize_token_information_customer_object_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/tmsv2tokenizedcardstokenized_card_idissuerlifecycleeventsimulations_card.rb +230 -0
- data/lib/cybersource_rest_client/models/tmsv2tokenizedcardstokenized_card_idissuerlifecycleeventsimulations_metadata.rb +189 -0
- data/lib/cybersource_rest_client/models/tmsv2tokenizedcardstokenized_card_idissuerlifecycleeventsimulations_metadata_card_art.rb +189 -0
- data/lib/cybersource_rest_client/models/update_subscription.rb +1 -1
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data.rb +28 -6
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_buyer_information.rb +41 -5
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_buyer_information_personal_identification.rb +1 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_client_reference_information_partner.rb +3 -3
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_consumer_authentication_information.rb +24 -5
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_device_information.rb +196 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_merchant_defined_information.rb +3 -2
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_merchant_information_merchant_descriptor.rb +124 -5
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_order_information.rb +15 -5
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_order_information_amount_details.rb +15 -5
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_order_information_amount_details_tax_details.rb +213 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_order_information_invoice_details.rb +213 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_order_information_line_items.rb +30 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_order_information_line_items_passenger.rb +8 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_order_information_line_items_tax_details.rb +7 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_payment_information.rb +189 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_payment_information_card.rb +196 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_processing_information.rb +1 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_processing_information_authorization_options.rb +74 -5
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_processing_information_authorization_options_initiator.rb +1 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_recipient_information.rb +39 -5
- data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information.rb +1 -0
- data/lib/cybersource_rest_client/utilities/capture_context/capture_context_parsing_utility.rb +113 -0
- data/lib/cybersource_rest_client/utilities/capture_context/public_key_fetcher.rb +131 -0
- data/lib/cybersource_rest_client/utilities/jwe_utility.rb +1 -1
- data/lib/cybersource_rest_client.rb +144 -62
- metadata +151 -65
- /data/lib/AuthenticationSDK/util/{JWEUtility.rb → AuthJWEUtility.rb} +0 -0
|
@@ -70,10 +70,17 @@ module CyberSource
|
|
|
70
70
|
post_body = @api_client.object_to_http_body(mit_void_request)
|
|
71
71
|
sdk_tracker = SdkTracker.new
|
|
72
72
|
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'MitVoidRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
73
|
-
inbound_mle_status = "optional"
|
|
73
|
+
inbound_mle_status = "optional"
|
|
74
74
|
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["mit_void","mit_void_with_http_info"])
|
|
75
|
-
|
|
75
|
+
begin
|
|
76
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
77
|
+
rescue
|
|
78
|
+
raise
|
|
79
|
+
end
|
|
76
80
|
end
|
|
81
|
+
|
|
82
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["mit_void","mit_void_with_http_info"])
|
|
83
|
+
|
|
77
84
|
auth_names = []
|
|
78
85
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
79
86
|
:header_params => header_params,
|
|
@@ -81,7 +88,8 @@ module CyberSource
|
|
|
81
88
|
:form_params => form_params,
|
|
82
89
|
:body => post_body,
|
|
83
90
|
:auth_names => auth_names,
|
|
84
|
-
:return_type => 'PtsV2PaymentsVoidsPost201Response'
|
|
91
|
+
:return_type => 'PtsV2PaymentsVoidsPost201Response',
|
|
92
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
85
93
|
if @api_client.config.debugging
|
|
86
94
|
begin
|
|
87
95
|
raise
|
|
@@ -149,10 +157,17 @@ module CyberSource
|
|
|
149
157
|
post_body = @api_client.object_to_http_body(void_capture_request)
|
|
150
158
|
sdk_tracker = SdkTracker.new
|
|
151
159
|
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VoidCaptureRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
152
|
-
inbound_mle_status = "optional"
|
|
160
|
+
inbound_mle_status = "optional"
|
|
153
161
|
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["void_capture","void_capture_with_http_info"])
|
|
154
|
-
|
|
162
|
+
begin
|
|
163
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
164
|
+
rescue
|
|
165
|
+
raise
|
|
166
|
+
end
|
|
155
167
|
end
|
|
168
|
+
|
|
169
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["void_capture","void_capture_with_http_info"])
|
|
170
|
+
|
|
156
171
|
auth_names = []
|
|
157
172
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
158
173
|
:header_params => header_params,
|
|
@@ -160,7 +175,8 @@ module CyberSource
|
|
|
160
175
|
:form_params => form_params,
|
|
161
176
|
:body => post_body,
|
|
162
177
|
:auth_names => auth_names,
|
|
163
|
-
:return_type => 'PtsV2PaymentsVoidsPost201Response'
|
|
178
|
+
:return_type => 'PtsV2PaymentsVoidsPost201Response',
|
|
179
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
164
180
|
if @api_client.config.debugging
|
|
165
181
|
begin
|
|
166
182
|
raise
|
|
@@ -228,10 +244,17 @@ module CyberSource
|
|
|
228
244
|
post_body = @api_client.object_to_http_body(void_credit_request)
|
|
229
245
|
sdk_tracker = SdkTracker.new
|
|
230
246
|
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VoidCreditRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
231
|
-
inbound_mle_status = "optional"
|
|
247
|
+
inbound_mle_status = "optional"
|
|
232
248
|
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["void_credit","void_credit_with_http_info"])
|
|
233
|
-
|
|
249
|
+
begin
|
|
250
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
251
|
+
rescue
|
|
252
|
+
raise
|
|
253
|
+
end
|
|
234
254
|
end
|
|
255
|
+
|
|
256
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["void_credit","void_credit_with_http_info"])
|
|
257
|
+
|
|
235
258
|
auth_names = []
|
|
236
259
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
237
260
|
:header_params => header_params,
|
|
@@ -239,7 +262,8 @@ module CyberSource
|
|
|
239
262
|
:form_params => form_params,
|
|
240
263
|
:body => post_body,
|
|
241
264
|
:auth_names => auth_names,
|
|
242
|
-
:return_type => 'PtsV2PaymentsVoidsPost201Response'
|
|
265
|
+
:return_type => 'PtsV2PaymentsVoidsPost201Response',
|
|
266
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
243
267
|
if @api_client.config.debugging
|
|
244
268
|
begin
|
|
245
269
|
raise
|
|
@@ -307,10 +331,17 @@ module CyberSource
|
|
|
307
331
|
post_body = @api_client.object_to_http_body(void_payment_request)
|
|
308
332
|
sdk_tracker = SdkTracker.new
|
|
309
333
|
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VoidPaymentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
310
|
-
inbound_mle_status = "optional"
|
|
334
|
+
inbound_mle_status = "optional"
|
|
311
335
|
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["void_payment","void_payment_with_http_info"])
|
|
312
|
-
|
|
336
|
+
begin
|
|
337
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
338
|
+
rescue
|
|
339
|
+
raise
|
|
340
|
+
end
|
|
313
341
|
end
|
|
342
|
+
|
|
343
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["void_payment","void_payment_with_http_info"])
|
|
344
|
+
|
|
314
345
|
auth_names = []
|
|
315
346
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
316
347
|
:header_params => header_params,
|
|
@@ -318,7 +349,8 @@ module CyberSource
|
|
|
318
349
|
:form_params => form_params,
|
|
319
350
|
:body => post_body,
|
|
320
351
|
:auth_names => auth_names,
|
|
321
|
-
:return_type => 'PtsV2PaymentsVoidsPost201Response'
|
|
352
|
+
:return_type => 'PtsV2PaymentsVoidsPost201Response',
|
|
353
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
322
354
|
if @api_client.config.debugging
|
|
323
355
|
begin
|
|
324
356
|
raise
|
|
@@ -386,10 +418,17 @@ module CyberSource
|
|
|
386
418
|
post_body = @api_client.object_to_http_body(void_refund_request)
|
|
387
419
|
sdk_tracker = SdkTracker.new
|
|
388
420
|
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VoidRefundRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
389
|
-
inbound_mle_status = "optional"
|
|
421
|
+
inbound_mle_status = "optional"
|
|
390
422
|
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["void_refund","void_refund_with_http_info"])
|
|
391
|
-
|
|
423
|
+
begin
|
|
424
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
425
|
+
rescue
|
|
426
|
+
raise
|
|
427
|
+
end
|
|
392
428
|
end
|
|
429
|
+
|
|
430
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["void_refund","void_refund_with_http_info"])
|
|
431
|
+
|
|
393
432
|
auth_names = []
|
|
394
433
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
395
434
|
:header_params => header_params,
|
|
@@ -397,7 +436,8 @@ module CyberSource
|
|
|
397
436
|
:form_params => form_params,
|
|
398
437
|
:body => post_body,
|
|
399
438
|
:auth_names => auth_names,
|
|
400
|
-
:return_type => 'PtsV2PaymentsVoidsPost201Response'
|
|
439
|
+
:return_type => 'PtsV2PaymentsVoidsPost201Response',
|
|
440
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
401
441
|
if @api_client.config.debugging
|
|
402
442
|
begin
|
|
403
443
|
raise
|
|
@@ -78,6 +78,19 @@ module CyberSource
|
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
+
# Check the response body first if it is mle encrypted then do deserialize
|
|
82
|
+
if MLEUtility.check_is_mle_encrypted_response(response.body)
|
|
83
|
+
begin
|
|
84
|
+
body = MLEUtility.decrypt_mle_response_payload(@merchantconfig, response.body)
|
|
85
|
+
response = Typhoeus::Response.new(:code => response.code, :headers => response.headers.to_hash, :body => body)
|
|
86
|
+
rescue => e
|
|
87
|
+
raise ApiError.new(:message => "MLE Encrypted Response Decryption Error Occurred. Error: #{e.message}",
|
|
88
|
+
:code => response.code,
|
|
89
|
+
:response_headers => response.headers,
|
|
90
|
+
:body => response.body)
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
81
94
|
unless response.success?
|
|
82
95
|
if response.timed_out?
|
|
83
96
|
fail ApiError.new('Connection timed out')
|
|
@@ -117,9 +130,11 @@ module CyberSource
|
|
|
117
130
|
query_params = Addressable::URI.form_encode(query_params)
|
|
118
131
|
end
|
|
119
132
|
|
|
133
|
+
isResponseMLEForApi = opts[:isResponseMLEForApi] || false
|
|
134
|
+
|
|
120
135
|
headers = opts[:header_params]
|
|
121
136
|
if @merchantconfig.authenticationType.upcase != Constants::AUTH_TYPE_MUTUAL_AUTH
|
|
122
|
-
headers = CallAuthenticationHeader(http_method, path, body_params, headers, query_params)
|
|
137
|
+
headers = CallAuthenticationHeader(http_method, path, body_params, headers, query_params, isResponseMLEForApi)
|
|
123
138
|
end
|
|
124
139
|
http_method = http_method.to_sym.downcase
|
|
125
140
|
header_params = headers.merge(@default_headers)
|
|
@@ -188,7 +203,7 @@ module CyberSource
|
|
|
188
203
|
end
|
|
189
204
|
end
|
|
190
205
|
# Calling Authentication
|
|
191
|
-
def CallAuthenticationHeader(http_method, path, body_params, header_params, query_params)
|
|
206
|
+
def CallAuthenticationHeader(http_method, path, body_params, header_params, query_params, isResponseMLEForApi)
|
|
192
207
|
require_relative '../AuthenticationSDK/core/Authorization.rb'
|
|
193
208
|
require_relative '../AuthenticationSDK/authentication/payloadDigest/digest.rb'
|
|
194
209
|
request_target = get_query_param(path, query_params)
|
|
@@ -207,7 +222,7 @@ module CyberSource
|
|
|
207
222
|
@merchantconfig.requestUrl = url
|
|
208
223
|
# Calling APISDK, Apisdk.controller.
|
|
209
224
|
gmtDateTime = DateTime.now.httpdate
|
|
210
|
-
token = Authorization.new.getToken(@merchantconfig, gmtDateTime)
|
|
225
|
+
token = Authorization.new.getToken(@merchantconfig, gmtDateTime, isResponseMLEForApi)
|
|
211
226
|
|
|
212
227
|
# Adding client ID header
|
|
213
228
|
header_params['v-c-client-id'] = @client_id
|
|
@@ -267,6 +282,8 @@ module CyberSource
|
|
|
267
282
|
# @param [Response] response HTTP response
|
|
268
283
|
# @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]"
|
|
269
284
|
def deserialize(response, return_type)
|
|
285
|
+
require_relative '../AuthenticationSDK/util/MLEUtility.rb'
|
|
286
|
+
|
|
270
287
|
body = response.body
|
|
271
288
|
|
|
272
289
|
# handle file downloading - return the File instance processed in request callbacks
|
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
# Decline Threshold data.
|
|
16
|
+
class Acpv1instructionsDeclineThreshold
|
|
17
|
+
# Transaction Decline Threshold amount.
|
|
18
|
+
attr_accessor :amount
|
|
19
|
+
|
|
20
|
+
# ISO 4217 currency code. Currency in which the Transaction Decline Threshold amount is expressed.
|
|
21
|
+
attr_accessor :currency_code
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'amount' => :'amount',
|
|
27
|
+
:'currency_code' => :'currencyCode'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from JSON key to ruby-style variable name.
|
|
32
|
+
def self.json_map
|
|
33
|
+
{
|
|
34
|
+
:'amount' => :'amount',
|
|
35
|
+
:'currency_code' => :'currency_code'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.swagger_types
|
|
41
|
+
{
|
|
42
|
+
:'amount' => :'String',
|
|
43
|
+
:'currency_code' => :'String'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Initializes the object
|
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
49
|
+
def initialize(attributes = {})
|
|
50
|
+
return unless attributes.is_a?(Hash)
|
|
51
|
+
|
|
52
|
+
# convert string to symbol for hash key
|
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
54
|
+
|
|
55
|
+
if attributes.has_key?(:'amount')
|
|
56
|
+
self.amount = attributes[:'amount']
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if attributes.has_key?(:'currencyCode')
|
|
60
|
+
self.currency_code = attributes[:'currencyCode']
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
65
|
+
# @return Array for valid properties with the reasons
|
|
66
|
+
def list_invalid_properties
|
|
67
|
+
invalid_properties = Array.new
|
|
68
|
+
#if !@amount.nil? && @amount !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/)
|
|
69
|
+
#invalid_properties.push('invalid value for "amount", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/.')
|
|
70
|
+
#end
|
|
71
|
+
|
|
72
|
+
#if !@currency_code.nil? && @currency_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/)
|
|
73
|
+
#invalid_properties.push('invalid value for "currency_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/.')
|
|
74
|
+
#end
|
|
75
|
+
|
|
76
|
+
invalid_properties
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
def valid?
|
|
82
|
+
#return false if !@amount.nil? && @amount !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/)
|
|
83
|
+
#return false if !@currency_code.nil? && @currency_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/)
|
|
84
|
+
true
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Custom attribute writer method with validation
|
|
88
|
+
# @param [Object] amount Value to be assigned
|
|
89
|
+
def amount=(amount)
|
|
90
|
+
#if !amount.nil? && amount !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/)
|
|
91
|
+
#fail ArgumentError, 'invalid value for "amount", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/.'
|
|
92
|
+
#end
|
|
93
|
+
|
|
94
|
+
@amount = amount
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Custom attribute writer method with validation
|
|
98
|
+
# @param [Object] currency_code Value to be assigned
|
|
99
|
+
def currency_code=(currency_code)
|
|
100
|
+
#if !currency_code.nil? && currency_code !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/)
|
|
101
|
+
#fail ArgumentError, 'invalid value for "currency_code", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.+$/.'
|
|
102
|
+
#end
|
|
103
|
+
|
|
104
|
+
@currency_code = currency_code
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Checks equality by comparing each attribute.
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def ==(o)
|
|
110
|
+
return true if self.equal?(o)
|
|
111
|
+
self.class == o.class &&
|
|
112
|
+
amount == o.amount &&
|
|
113
|
+
currency_code == o.currency_code
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# @see the `==` method
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def eql?(o)
|
|
119
|
+
self == o
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Calculates hash code according to all attributes.
|
|
123
|
+
# @return [Fixnum] Hash code
|
|
124
|
+
def hash
|
|
125
|
+
[amount, currency_code].hash
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Builds the object from hash
|
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
130
|
+
# @return [Object] Returns the model itself
|
|
131
|
+
def build_from_hash(attributes)
|
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
|
133
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
134
|
+
if type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
138
|
+
self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
141
|
+
self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
142
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
self
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Deserializes the data based on type
|
|
149
|
+
# @param string type Data type
|
|
150
|
+
# @param string value Value to be deserialized
|
|
151
|
+
# @return [Object] Deserialized data
|
|
152
|
+
def _deserialize(type, value)
|
|
153
|
+
case type.to_sym
|
|
154
|
+
when :DateTime
|
|
155
|
+
DateTime.parse(value)
|
|
156
|
+
when :Date
|
|
157
|
+
Date.parse(value)
|
|
158
|
+
when :String
|
|
159
|
+
value.to_s
|
|
160
|
+
when :Integer
|
|
161
|
+
value.to_i
|
|
162
|
+
when :Float
|
|
163
|
+
value.to_f
|
|
164
|
+
when :BOOLEAN
|
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
166
|
+
true
|
|
167
|
+
else
|
|
168
|
+
false
|
|
169
|
+
end
|
|
170
|
+
when :Object
|
|
171
|
+
# generic object (usually a Hash), return directly
|
|
172
|
+
value
|
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
|
179
|
+
{}.tap do |hash|
|
|
180
|
+
value.each do |k, v|
|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
else # model
|
|
185
|
+
temp_model = CyberSource.const_get(type).new
|
|
186
|
+
temp_model.build_from_hash(value)
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Returns the string representation of the object
|
|
191
|
+
# @return [String] String presentation of the object
|
|
192
|
+
def to_s
|
|
193
|
+
to_hash.to_s
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
|
198
|
+
def to_body
|
|
199
|
+
to_hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the object in the form of hash
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_hash
|
|
205
|
+
hash = {}
|
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
207
|
+
value = self.send(attr)
|
|
208
|
+
next if value.nil?
|
|
209
|
+
hash[param] = _to_hash(value)
|
|
210
|
+
end
|
|
211
|
+
hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Outputs non-array value in the form of hash
|
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
216
|
+
# @param [Object] value Any valid value
|
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
|
218
|
+
def _to_hash(value)
|
|
219
|
+
if value.is_a?(Array)
|
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
|
221
|
+
elsif value.is_a?(Hash)
|
|
222
|
+
{}.tap do |hash|
|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
224
|
+
end
|
|
225
|
+
elsif value.respond_to? :to_hash
|
|
226
|
+
value.to_hash
|
|
227
|
+
else
|
|
228
|
+
value
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|