cybersource_rest_client 0.0.82 → 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 +98 -42
- data/lib/AuthenticationSDK/core/MerchantConfig.rb +85 -44
- data/lib/AuthenticationSDK/logging/log_configuration.rb +2 -1
- data/lib/AuthenticationSDK/util/AuthJWEUtility.rb +1 -0
- data/lib/AuthenticationSDK/util/Cache.rb +7 -4
- data/lib/AuthenticationSDK/util/Constants.rb +8 -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/offers_api.rb +117 -0
- data/lib/cybersource_rest_client/api/plans_api.rb +1 -1
- data/lib/cybersource_rest_client/api/pull_funds_api.rb +404 -0
- 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/{transient_token_data_api.rb → transient_token_data_v2_api.rb} +91 -9
- data/lib/cybersource_rest_client/api/unified_checkout_v1_capture_context_api.rb +104 -0
- 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/add_negative_list_request.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/boardingv1registrations_integration_information.rb +15 -5
- data/lib/cybersource_rest_client/models/boardingv1registrations_integration_information_msd.rb +196 -0
- data/lib/cybersource_rest_client/models/card_processing_config_common_processors.rb +105 -1
- data/lib/cybersource_rest_client/models/check_payer_auth_enrollment_request.rb +1 -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/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/fraud_marking_action_request.rb +1 -1
- data/lib/cybersource_rest_client/models/generate_unified_checkout_v1_capture_context_request.rb +334 -0
- data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information.rb +1 -1
- data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information_amount_details.rb +240 -0
- data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information_amount_details_surcharge.rb +213 -0
- 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_200_16.rb +2 -2
- data/lib/cybersource_rest_client/models/inline_response_200_5_integration_information.rb +15 -5
- data/lib/cybersource_rest_client/models/inline_response_201_1_tokenized_card.rb +27 -6
- 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_201_9.rb +297 -0
- data/lib/cybersource_rest_client/models/{kmsegressv2keysasym_client_reference_information.rb → inline_response_201_9_client_reference_information.rb} +2 -3
- data/lib/cybersource_rest_client/models/{inline_response_200_16_error_information.rb → inline_response_201_9_error_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_200_16_order_information.rb → inline_response_201_9_order_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_16_order_information_currency_conversion.rb → inline_response_201_9_order_information_currency_conversion.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_200_16_order_information_currency_conversion_offer.rb → inline_response_201_9_order_information_currency_conversion_offer.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_201_9_processor_information.rb +196 -0
- data/lib/cybersource_rest_client/models/inline_response_400_10.rb +236 -0
- 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.rb +10 -20
- data/lib/cybersource_rest_client/models/inline_response_404_1.rb +7 -42
- data/lib/cybersource_rest_client/models/inline_response_404_2.rb +8 -7
- data/lib/cybersource_rest_client/models/{inline_response_404_1_details.rb → inline_response_404_2_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_404_3.rb +26 -2
- data/lib/cybersource_rest_client/models/inline_response_404_4.rb +17 -29
- data/lib/cybersource_rest_client/models/{inline_response_404_3_details.rb → inline_response_404_4_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_404_5.rb +28 -28
- data/lib/cybersource_rest_client/models/inline_response_404_6.rb +223 -0
- data/lib/cybersource_rest_client/models/inline_response_404_errors.rb +201 -0
- data/lib/cybersource_rest_client/models/inline_response_422_1.rb +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_500_4.rb → inline_response_502_2.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/offer_request.rb +219 -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/payer_auth_setup_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/payments_products_unified_checkout_subscription_info_features_portfolio_accessof_sensi_data.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features.rb +205 -5
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_after_pay.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_apple_pay.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_bancontact.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_click_to_pay.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_decision_manager.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_dragon_pay.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_e_check.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_google_pay.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_ideal.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_konbini.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_multibanco.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_my_bank.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_p24.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_pay_pal.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_payer_authentication.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_tink_pay_by_bank.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_token_management.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_unified_click_to_pay_sdk.rb +190 -0
- data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_venmo.rb +190 -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 +55 -5
- 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_incremental_authorization_patch201_response_error_information.rb +1 -1
- 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 +2 -2
- 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_error_information.rb +1 -1
- 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 +16 -6
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_error_information.rb +213 -0
- 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/pts_v2_payouts_post201_response_processor_information_avs.rb +196 -0
- 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_aggregator_information.rb +317 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_aggregator_information_sub_merchant.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_buyer_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_client_reference_information.rb +247 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_merchant_information.rb +189 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_merchant_information_merchant_descriptor.rb +349 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_order_information.rb +206 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_order_information_amount_details.rb +275 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_info_funding_options_initiator_origin_ini_transaction.rb +222 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information.rb +308 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information_funding_options.rb +189 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information_funding_options_initiator.rb +228 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information_payouts_options.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information_recurring_options.rb +190 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information.rb +607 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_recipient_information_personal_identification.rb +265 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information.rb +595 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_account.rb +213 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_consumer_authentication.rb +206 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_consumer_authentication_strong_authentication.rb +264 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information.rb +255 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_card.rb +291 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_customer.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_instrument_identifier.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_payment_instrument.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_payment_information_tokenized_card.rb +281 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_sender_information_personal_identification.rb +274 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransferidrefund_order_information.rb +194 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransferidrefund_order_information_amount_details.rb +205 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransferidreversal_reversal_information.rb +194 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransferidreversal_reversal_information_amount_details.rb +205 -0
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_information.rb +15 -14
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_information_merchant_descriptor.rb +298 -0
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information.rb +219 -0
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information_card.rb +264 -0
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information_customer.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information_instrument_identifier.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_payment_information_payment_instrument.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information.rb +36 -6
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information_payouts_options.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card.rb +1 -19
- 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 +52 -5
- data/lib/cybersource_rest_client/models/ptsv2credits_sender_information.rb +18 -1
- 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 +89 -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/ptsv2paymentsidrefunds_processing_information.rb +22 -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/ptsv2payouts_processing_information_payouts_options.rb +1 -1
- data/lib/cybersource_rest_client/models/pull_funds201_response.rb +270 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response__links.rb +239 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response__links_customer.rb +202 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response__links_instrument_identifier.rb +202 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response__links_payment_instrument.rb +202 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response__links_refund.rb +202 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response__links_reversal.rb +202 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response__links_self.rb +202 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response_error_information.rb +225 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response_error_information_details.rb +213 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response_order_information.rb +189 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response_order_information_amount_details.rb +222 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response_processor_information.rb +331 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response_processor_information_consumer_authentication_response.rb +196 -0
- data/lib/cybersource_rest_client/models/pull_funds_refund201_response.rb +260 -0
- data/lib/cybersource_rest_client/models/pull_funds_refund201_response__links.rb +189 -0
- data/lib/cybersource_rest_client/models/pull_funds_refund201_response__links_self.rb +202 -0
- data/lib/cybersource_rest_client/models/pull_funds_refund201_response_processor_information.rb +213 -0
- data/lib/cybersource_rest_client/models/pull_funds_refund_request.rb +204 -0
- data/lib/cybersource_rest_client/models/pull_funds_request.rb +259 -0
- data/lib/cybersource_rest_client/models/pull_funds_reversal201_response.rb +260 -0
- data/lib/cybersource_rest_client/models/pull_funds_reversal201_response__links.rb +189 -0
- data/lib/cybersource_rest_client/models/pull_funds_reversal201_response__links_self.rb +202 -0
- data/lib/cybersource_rest_client/models/pull_funds_reversal201_response_error_information.rb +219 -0
- data/lib/cybersource_rest_client/models/pull_funds_reversal201_response_error_information_details.rb +207 -0
- data/lib/cybersource_rest_client/models/pull_funds_reversal201_response_processor_information.rb +247 -0
- data/lib/cybersource_rest_client/models/pull_funds_reversal400_response.rb +258 -0
- data/lib/cybersource_rest_client/models/pull_funds_reversal_request.rb +204 -0
- data/lib/cybersource_rest_client/models/push_funds201_response_error_information.rb +1 -1
- data/lib/cybersource_rest_client/models/push_funds201_response_processor_information.rb +55 -5
- data/lib/cybersource_rest_client/models/push_funds201_response_processor_information_merchant_advice.rb +213 -0
- data/lib/cybersource_rest_client/models/push_funds_request.rb +11 -1
- data/lib/cybersource_rest_client/models/rbsv1subscriptions_order_information.rb +189 -0
- data/lib/cybersource_rest_client/models/rbsv1subscriptionsid_order_information_amount_details.rb +15 -5
- data/lib/cybersource_rest_client/models/risk_products.rb +15 -5
- data/lib/cybersource_rest_client/models/riskv1addressverifications_order_information_line_items.rb +1 -10
- data/lib/cybersource_rest_client/models/riskv1decisions_client_reference_information.rb +0 -9
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information_line_items.rb +1 -1
- 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/riskv1liststypeentries_order_information_line_items.rb +1 -1
- data/lib/cybersource_rest_client/models/save_asym_egress_key.rb +1 -1
- data/lib/cybersource_rest_client/models/tms_bin_lookup_payment_account_information_features.rb +39 -6
- 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 +23 -2
- 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/tmsv2tokenize_processing_information.rb +1 -1
- 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_appearance.rb +207 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_appearance_variables.rb +1645 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_capture_mandate.rb +296 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_capture_mandate_cpf.rb +190 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_complete_mandate.rb +229 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_complete_mandate_tms.rb +204 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data.rb +311 -0
- 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_buyer_information.rb +259 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_buyer_information_personal_identification.rb +224 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_consumer_authentication_information.rb +247 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_device_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_installment_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_defined_information.rb +214 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information.rb +206 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information_merchant_descriptor.rb +332 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information.rb +241 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_amount_details.rb +353 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_amount_details_tax_details.rb +213 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_bill_to.rb +483 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_bill_to_company.rb +298 -0
- 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/{riskv1liststypeentries_client_reference_information.rb → ucv1sessions_data_order_information_shipping_details.rb} +24 -43
- data/lib/cybersource_rest_client/models/ucv1sessions_data_payment_information.rb +189 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_payment_information_card.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information.rb +294 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_authorization_options.rb +233 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_authorization_options_initiator.rb +200 -0
- 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 +383 -0
- 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/ucv1sessions_payment_configurations.rb +210 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_clicktopay.rb +190 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_googlepay.rb +192 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_tms_token.rb +216 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_tms_token_customer.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_tms_token_instrument_identifiers.rb +195 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_payment_configurations_tms_token_payment_instruments.rb +195 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_transient_token_response_options.rb +190 -0
- data/lib/cybersource_rest_client/models/update_payments.rb +192 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_data_order_information_bill_to_company.rb +20 -20
- data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information.rb +1 -1
- data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information_bill_to.rb +483 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information_bill_to_company.rb +366 -0
- data/lib/cybersource_rest_client/models/validate_export_compliance_request.rb +1 -1
- data/lib/cybersource_rest_client/models/validate_request.rb +1 -1
- data/lib/cybersource_rest_client/models/value_added_services_products.rb +25 -5
- data/lib/cybersource_rest_client/models/{riskv1authenticationsetups_client_reference_information.rb → vasv1currencyconversion_client_reference_information.rb} +43 -26
- data/lib/cybersource_rest_client/models/vasv1currencyconversion_client_reference_information_partner.rb +213 -0
- data/lib/cybersource_rest_client/models/vasv1currencyconversion_order_information.rb +199 -0
- data/lib/cybersource_rest_client/models/vasv1currencyconversion_order_information_amount_details.rb +213 -0
- data/lib/cybersource_rest_client/models/vasv1currencyconversion_order_information_currency_conversion.rb +198 -0
- data/lib/cybersource_rest_client/models/vasv1currencyconversion_payment_information.rb +189 -0
- data/lib/cybersource_rest_client/models/vasv1currencyconversion_payment_information_card.rb +196 -0
- data/lib/cybersource_rest_client/models/vasv1currencyconversion_point_of_sale_information.rb +213 -0
- data/lib/cybersource_rest_client/models/verify_customer_address_request.rb +1 -1
- data/lib/cybersource_rest_client.rb +222 -22
- metadata +281 -75
- data/lib/cybersource_rest_client/api/token_api.rb +0 -306
- data/lib/cybersource_rest_client/api/tokenized_card_api.rb +0 -371
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb5d050b359e9fefb56a6f04e11510cc45f1c1b6f033a621495b4f82ff2d8a64
|
|
4
|
+
data.tar.gz: b8e37d57a3d3ec9a63ce79cb5115df8c41bedaeef333d774673f4ae07aafecc4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f712d7cca99ab978f9115b6dea2849c27c65ed3d899d5614d5687426f8d6b90d5b123f12647e7e3356f09028264f6a2a25f5a0dbeb3992af776533448f754836
|
|
7
|
+
data.tar.gz: bf26f45d42ad16decfe75998c29b338e0a111d36290064a2ac625f14627c47927e8828ca32e991bd067b07fdf5f21740f03278948f202f5192a569068321ea4e
|
|
@@ -4,6 +4,7 @@ require 'jwt'
|
|
|
4
4
|
require 'json'
|
|
5
5
|
require 'active_support'
|
|
6
6
|
require 'time'
|
|
7
|
+
require 'securerandom'
|
|
7
8
|
require_relative '../../core/ITokenGeneration.rb'
|
|
8
9
|
require_relative '../../util/Constants.rb'
|
|
9
10
|
require_relative '../../util/ExceptionHandler.rb'
|
|
@@ -16,63 +17,118 @@ public
|
|
|
16
17
|
class GenerateJwtToken
|
|
17
18
|
@log_obj
|
|
18
19
|
|
|
19
|
-
#JWT Token
|
|
20
|
+
# JWT Token generation for JWTv2 specification
|
|
20
21
|
def getToken(merchantconfig_obj, gmtDatetime, isResponseMLEForApi)
|
|
21
22
|
@log_obj = Log.new merchantconfig_obj.log_config, "JwtToken"
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
24
|
+
begin
|
|
25
|
+
# Get payload claim set for JWTv2 (identical for both key types)
|
|
26
|
+
payload_claim_set = getPayloadClaimSet(merchantconfig_obj, isResponseMLEForApi)
|
|
27
|
+
token = ''
|
|
28
|
+
if merchantconfig_obj.is_shared_secret_key_type?
|
|
29
|
+
# Shared Secret (HMAC-SHA256) signing
|
|
30
|
+
@log_obj.logger.debug('Generating JWT token using shared secret (HS256)')
|
|
31
|
+
|
|
32
|
+
secret_key = merchantconfig_obj.merchantSecretKey
|
|
33
|
+
begin
|
|
34
|
+
secret_key_decoded = Base64.strict_decode64(secret_key)
|
|
35
|
+
rescue ArgumentError => e
|
|
36
|
+
raise StandardError.new("Invalid base64-encoded secret key: #{e.message}")
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Get header claim set with merchantKeyId as kid
|
|
40
|
+
header_claim_set = getHeaderClaimSet(merchant_key_id: merchantconfig_obj.merchantKeyId)
|
|
41
|
+
|
|
42
|
+
# Generate JWT token using HS256 algorithm
|
|
43
|
+
token = JWT.encode(payload_claim_set, secret_key_decoded, 'HS256', header_claim_set)
|
|
44
|
+
else
|
|
45
|
+
# P12 Certificate (RSA-SHA256) signing — existing behavior
|
|
46
|
+
@log_obj.logger.debug('Generating JWT token using P12 certificate (RS256)')
|
|
47
|
+
|
|
48
|
+
# Get cached certificate and private key
|
|
49
|
+
cache_value = Cache.new.fetchCachedP12Certificate(merchantconfig_obj)
|
|
50
|
+
private_key = cache_value.private_key
|
|
51
|
+
jwt_cert_obj = cache_value.cert
|
|
52
|
+
|
|
53
|
+
# Get header claim set with certificate serial number as kid
|
|
54
|
+
header_claim_set = getHeaderClaimSet(certificate: jwt_cert_obj)
|
|
55
|
+
|
|
56
|
+
# Generate JWT token using RS256 algorithm
|
|
57
|
+
token = JWT.encode(payload_claim_set, private_key, 'RS256', header_claim_set)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
return token
|
|
61
|
+
rescue StandardError => err
|
|
62
|
+
if err.message.include? 'PKCS12_parse: mac verify failure'
|
|
63
|
+
@log_obj.logger.error(ExceptionHandler.new.new_custom_error Constants::ERROR_PREFIX + Constants::INCORRECT_KEY_PASS)
|
|
64
|
+
else
|
|
65
|
+
@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
|
|
66
|
+
end
|
|
67
|
+
raise err
|
|
51
68
|
end
|
|
52
|
-
raise err
|
|
53
69
|
end
|
|
54
70
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
71
|
+
private
|
|
72
|
+
|
|
73
|
+
def getPayloadClaimSet(merchantconfig_obj, isResponseMLEForApi)
|
|
74
|
+
jwt_payload = {}
|
|
75
|
+
request_type = merchantconfig_obj.requestType.upcase
|
|
76
|
+
|
|
77
|
+
# Setting the JWT digest and digest Algorithm when a POST, PUT, or PATCH request is made
|
|
58
78
|
if request_type == Constants::POST_REQUEST_TYPE || request_type == Constants::PUT_REQUEST_TYPE || request_type == Constants::PATCH_REQUEST_TYPE
|
|
59
79
|
payload = merchantconfig_obj.requestJsonData
|
|
60
|
-
|
|
61
|
-
# Note: Digest is not passed for GET calls
|
|
62
80
|
digest = DigestGeneration.new.generateDigest(payload)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
81
|
+
jwt_payload['digest'] = digest
|
|
82
|
+
jwt_payload['digestAlgorithm'] = 'SHA-256'
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Set the iat and exp claims using Unix timestamps
|
|
86
|
+
current_time = Time.now.to_i
|
|
87
|
+
jwt_payload['iat'] = current_time
|
|
88
|
+
jwt_payload['exp'] = current_time + 120 # The exp claim is set to 2 mins more than the iat claim
|
|
89
|
+
|
|
90
|
+
# Set the request method, host and resource path in the JWT body as per the specification for all request types
|
|
91
|
+
jwt_payload['request-method'] = request_type
|
|
92
|
+
jwt_payload['request-host'] = merchantconfig_obj.requestHost
|
|
93
|
+
jwt_payload['request-resource-path'] = merchantconfig_obj.requestTarget
|
|
94
|
+
|
|
95
|
+
# Choose issuer claim in the JWT body as per the use_metakey flag in the config file
|
|
96
|
+
if merchantconfig_obj.useMetaKey
|
|
97
|
+
issuer = merchantconfig_obj.portfolioID
|
|
66
98
|
else
|
|
67
|
-
|
|
99
|
+
issuer = merchantconfig_obj.merchantId
|
|
68
100
|
end
|
|
69
101
|
|
|
102
|
+
jwt_payload['iss'] = issuer
|
|
103
|
+
jwt_payload['jti'] = SecureRandom.uuid # Unique JWT ID
|
|
104
|
+
jwt_payload['v-c-jwt-version'] = '2'
|
|
105
|
+
jwt_payload['v-c-merchant-id'] = merchantconfig_obj.merchantId
|
|
106
|
+
|
|
70
107
|
if isResponseMLEForApi
|
|
71
|
-
|
|
72
|
-
|
|
108
|
+
mle_kid = MLEUtility.validate_and_auto_extract_response_mle_kid(merchantconfig_obj)
|
|
109
|
+
jwt_payload['v-c-response-mle-kid'] = mle_kid
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
return jwt_payload
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def getHeaderClaimSet(merchant_key_id: nil, certificate: nil)
|
|
116
|
+
kid_value = ''
|
|
117
|
+
if !certificate.nil?
|
|
118
|
+
kid_value = MLEUtility.extract_serial_number_from_certificate(certificate)
|
|
119
|
+
elsif !merchant_key_id.nil? && !merchant_key_id.to_s.empty?
|
|
120
|
+
kid_value = merchant_key_id
|
|
121
|
+
else
|
|
122
|
+
raise StandardError.new("Either certificate or merchant_key_id must be provided for JWT header")
|
|
73
123
|
end
|
|
74
124
|
|
|
75
|
-
|
|
125
|
+
jwt_headers = {
|
|
126
|
+
'kid' => kid_value,
|
|
127
|
+
'typ' => 'JWT'
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return jwt_headers
|
|
76
131
|
end
|
|
132
|
+
|
|
77
133
|
implements TokenInterface
|
|
78
134
|
end
|
|
@@ -28,9 +28,11 @@ public
|
|
|
28
28
|
@keyAlias = cybsPropertyObj['keyAlias']
|
|
29
29
|
@keyPass = cybsPropertyObj['keyPass']
|
|
30
30
|
@keyFilename = cybsPropertyObj['keyFilename']
|
|
31
|
+
@jwtKeyType = cybsPropertyObj['jwtKeyType'] ? cybsPropertyObj['jwtKeyType'].to_s.upcase : Constants::JWT_KEY_TYPE_P12
|
|
31
32
|
@useMetaKey = cybsPropertyObj['useMetaKey']
|
|
32
33
|
@portfolioID = cybsPropertyObj['portfolioID']
|
|
33
34
|
@solutionId = cybsPropertyObj['solutionId']
|
|
35
|
+
@isSDK = cybsPropertyObj['isSDK'] == true || cybsPropertyObj['isSDK'].to_s.strip.casecmp?('true')
|
|
34
36
|
@p12KeyFilePath = nil
|
|
35
37
|
# MutualAuth & OAuth Parameters
|
|
36
38
|
@enableClientCert = cybsPropertyObj['enableClientCert']
|
|
@@ -142,7 +144,9 @@ public
|
|
|
142
144
|
|
|
143
145
|
validateMerchantDetails()
|
|
144
146
|
validateMLEConfiguration(cybsPropertyObj)
|
|
145
|
-
|
|
147
|
+
if !@keysDirectory.nil? && !@keysDirectory.to_s.empty? && !@keyFilename.nil? && !@keyFilename.to_s.empty?
|
|
148
|
+
@p12KeyFilePath = File.join(@keysDirectory, @keyFilename + ".p12")
|
|
149
|
+
end
|
|
146
150
|
logAllProperties(cybsPropertyObj)
|
|
147
151
|
end
|
|
148
152
|
|
|
@@ -227,35 +231,52 @@ public
|
|
|
227
231
|
elsif !@merchantId.instance_of? String
|
|
228
232
|
@merchantId=@merchantId.to_s
|
|
229
233
|
end
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
@
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
@
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
234
|
+
|
|
235
|
+
# Validate jwtKeyType
|
|
236
|
+
check_jwt_key_type
|
|
237
|
+
|
|
238
|
+
if is_shared_secret_key_type?
|
|
239
|
+
# Shared Secret validation — same credentials as HTTP_SIGNATURE
|
|
240
|
+
validateSharedSecretKeyCredentials()
|
|
241
|
+
else
|
|
242
|
+
# P12 validation (existing behavior)
|
|
243
|
+
if @keyAlias.to_s.empty?
|
|
244
|
+
@keyAlias = @merchantId
|
|
245
|
+
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_ALIAS_NULL_EMPTY)
|
|
246
|
+
elsif !@keyAlias.instance_of? String
|
|
247
|
+
@keyAlias=@keyAlias.to_s
|
|
248
|
+
end
|
|
249
|
+
if !@useMetaKey && @keyAlias != @merchantId
|
|
250
|
+
@keyAlias = @merchantId
|
|
251
|
+
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::INCORRECT_KEY_ALIAS)
|
|
252
|
+
end
|
|
253
|
+
if @useMetaKey && @keyAlias != @portfolioID
|
|
254
|
+
@keyAlias = @portfolioID
|
|
255
|
+
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::INCORRECT_KEY_ALIAS_USE_METAKEY)
|
|
256
|
+
end
|
|
257
|
+
if @keyPass.to_s.empty?
|
|
258
|
+
@keyPass = @merchantId
|
|
259
|
+
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_PASS_NULL)
|
|
260
|
+
elsif !@keyPass.instance_of? String
|
|
261
|
+
@keyPass=@keyPass.to_s
|
|
262
|
+
end
|
|
263
|
+
if @keysDirectory.to_s.empty?
|
|
264
|
+
@keysDirectory = Constants::DEFAULT_KEY_DIRECTORY
|
|
265
|
+
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_DIRECTORY_EMPTY + @keysDirectory)
|
|
266
|
+
elsif !@keysDirectory.instance_of? String
|
|
267
|
+
@keysDirectory=@keysDirectory.to_s
|
|
268
|
+
end
|
|
269
|
+
if @keyFilename.to_s.empty?
|
|
270
|
+
@keyFilename = @merchantId
|
|
271
|
+
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_FILE_NAME_NULL_EMPTY)
|
|
272
|
+
elsif !@keyFilename.instance_of? String
|
|
273
|
+
@keyFilename=@keyFilename.to_s
|
|
274
|
+
end
|
|
275
|
+
if !check_key_file
|
|
276
|
+
err = StandardError.new(Constants::ERROR_PREFIX + "Cannot find or access the Key Directory or Key File. Please review the values in the merchant configuration.")
|
|
277
|
+
@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
|
|
278
|
+
raise err
|
|
279
|
+
end
|
|
259
280
|
end
|
|
260
281
|
end
|
|
261
282
|
if @authenticationType.upcase == Constants::AUTH_TYPE_MUTUAL_AUTH
|
|
@@ -298,20 +319,7 @@ public
|
|
|
298
319
|
elsif !@merchantId.instance_of? String
|
|
299
320
|
@merchantId=@merchantId.to_s
|
|
300
321
|
end
|
|
301
|
-
|
|
302
|
-
err = StandardError.new(Constants::ERROR_PREFIX+ Constants::MERCHANT_KEY_ID_MANDATORY)
|
|
303
|
-
@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
|
|
304
|
-
raise err
|
|
305
|
-
elsif !@merchantKeyId.instance_of? String
|
|
306
|
-
@merchantKeyId=@merchantKeyId.to_s
|
|
307
|
-
end
|
|
308
|
-
if @merchantSecretKey.to_s.empty?
|
|
309
|
-
err = StandardError.new(Constants::ERROR_PREFIX+ Constants::MERCHANT_SECRET_KEY_MANDATORY)
|
|
310
|
-
@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
|
|
311
|
-
raise err
|
|
312
|
-
elsif !@merchantSecretKey.instance_of? String
|
|
313
|
-
@merchantSecretKey=@merchantSecretKey.to_s
|
|
314
|
-
end
|
|
322
|
+
validateSharedSecretKeyCredentials()
|
|
315
323
|
end
|
|
316
324
|
if @useMetaKey && @portfolioID.to_s.empty?
|
|
317
325
|
err = StandardError.new(Constants::ERROR_PREFIX+ Constants::PORTFOLIO_ID_MANDATORY)
|
|
@@ -330,6 +338,23 @@ public
|
|
|
330
338
|
end
|
|
331
339
|
end
|
|
332
340
|
|
|
341
|
+
def validateSharedSecretKeyCredentials()
|
|
342
|
+
if @merchantKeyId.to_s.empty?
|
|
343
|
+
err = StandardError.new(Constants::ERROR_PREFIX+ Constants::MERCHANT_KEY_ID_MANDATORY)
|
|
344
|
+
@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
|
|
345
|
+
raise err
|
|
346
|
+
elsif !@merchantKeyId.instance_of? String
|
|
347
|
+
@merchantKeyId=@merchantKeyId.to_s
|
|
348
|
+
end
|
|
349
|
+
if @merchantSecretKey.to_s.empty?
|
|
350
|
+
err = StandardError.new(Constants::ERROR_PREFIX+ Constants::MERCHANT_SECRET_KEY_MANDATORY)
|
|
351
|
+
@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
|
|
352
|
+
raise err
|
|
353
|
+
elsif !@merchantSecretKey.instance_of? String
|
|
354
|
+
@merchantSecretKey=@merchantSecretKey.to_s
|
|
355
|
+
end
|
|
356
|
+
end
|
|
357
|
+
|
|
333
358
|
def validateMLEConfiguration(cybsPropertyObj)
|
|
334
359
|
if !@useMLEGlobally.nil? && !cybsPropertyObj['enableRequestMLEForOptionalApisGlobally'].nil?
|
|
335
360
|
if @useMLEGlobally != cybsPropertyObj['enableRequestMLEForOptionalApisGlobally']
|
|
@@ -581,6 +606,20 @@ public
|
|
|
581
606
|
@log_obj.logger.info('Merchant Configuration :\n' + propertyObj.to_s)
|
|
582
607
|
end
|
|
583
608
|
|
|
609
|
+
# Returns true when jwtKeyType is SHARED_SECRET
|
|
610
|
+
def is_shared_secret_key_type?
|
|
611
|
+
!@jwtKeyType.nil? && @jwtKeyType.upcase == Constants::JWT_KEY_TYPE_SHARED_SECRET
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
# Validates that jwtKeyType is either P12 or SHARED_SECRET
|
|
615
|
+
def check_jwt_key_type
|
|
616
|
+
unless @jwtKeyType.upcase == Constants::JWT_KEY_TYPE_P12 || @jwtKeyType.upcase == Constants::JWT_KEY_TYPE_SHARED_SECRET
|
|
617
|
+
err = StandardError.new(Constants::ERROR_PREFIX + Constants::INVALID_JWT_KEY_TYPE)
|
|
618
|
+
@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
|
|
619
|
+
raise err
|
|
620
|
+
end
|
|
621
|
+
end
|
|
622
|
+
|
|
584
623
|
def check_key_file
|
|
585
624
|
# Directory exists?
|
|
586
625
|
unless Dir.exist?(@keysDirectory)
|
|
@@ -622,6 +661,7 @@ public
|
|
|
622
661
|
attr_accessor :keyAlias
|
|
623
662
|
attr_accessor :keyPass
|
|
624
663
|
attr_accessor :keyFilename
|
|
664
|
+
attr_accessor :jwtKeyType
|
|
625
665
|
attr_accessor :useMetaKey
|
|
626
666
|
attr_accessor :portfolioID
|
|
627
667
|
attr_accessor :keepAliveTime
|
|
@@ -645,6 +685,7 @@ public
|
|
|
645
685
|
attr_accessor :requestTarget
|
|
646
686
|
attr_accessor :log_obj
|
|
647
687
|
attr_accessor :solutionId
|
|
688
|
+
attr_accessor :isSDK
|
|
648
689
|
attr_accessor :defaultCustomHeaders
|
|
649
690
|
attr_accessor :pemFileDirectory
|
|
650
691
|
attr_accessor :useMLEGlobally
|
|
@@ -54,7 +54,8 @@ public
|
|
|
54
54
|
if @maxLogFiles.nil? || @maxLogFiles.to_s.empty?
|
|
55
55
|
@maxLogFiles = Constants::DEFAULT_MAX_LOG_FILES
|
|
56
56
|
log_message += Constants::WARNING_PREFIX + Constants::INVALID_MAX_LOG_FILES + @maxLogFiles
|
|
57
|
-
|
|
57
|
+
end
|
|
58
|
+
if !@maxLogFiles.instance_of? Integer
|
|
58
59
|
@maxLogFiles = @maxLogFiles.to_i
|
|
59
60
|
end
|
|
60
61
|
if @enableMasking == "true"
|
|
@@ -126,8 +126,8 @@ public
|
|
|
126
126
|
if merchantConfig.mleForRequestPublicCertPath && !merchantConfig.mleForRequestPublicCertPath.strip.empty?
|
|
127
127
|
certificate_identifier = Constants::MLE_CACHE_IDENTIFIER_FOR_CONFIG_CERT
|
|
128
128
|
certificate_file_path = merchantConfig.mleForRequestPublicCertPath
|
|
129
|
-
# Priority #2: If mleForRequestPublicCertPath not provided, get mlecert from p12 if provided and jwt auth type
|
|
130
|
-
elsif Constants::AUTH_TYPE_JWT.downcase == merchantConfig.authenticationType.downcase && merchantConfig.p12KeyFilePath
|
|
129
|
+
# Priority #2: If mleForRequestPublicCertPath not provided, get mlecert from p12 if provided and jwt auth type (only for P12 key type, not SHARED_SECRET)
|
|
130
|
+
elsif Constants::AUTH_TYPE_JWT.downcase == merchantConfig.authenticationType.downcase && !merchantConfig.is_shared_secret_key_type? && merchantConfig.p12KeyFilePath
|
|
131
131
|
certificate_identifier = Constants::MLE_CACHE_IDENTIFIER_FOR_P12_CERT
|
|
132
132
|
certificate_file_path = merchantConfig.p12KeyFilePath
|
|
133
133
|
# Priority #3: Get mlecert from default cert in SDK as per CAS or PROD env.
|
|
@@ -224,10 +224,13 @@ public
|
|
|
224
224
|
merchant_config.responseMlePrivateKeyFilePassword
|
|
225
225
|
)
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
# Use correct alias for MetaKey mode: portfolioID when useMetaKey is true, merchantId otherwise
|
|
228
|
+
response_mle_key_alias = merchant_config.useMetaKey ? merchant_config.portfolioID : merchant_config.merchantId
|
|
229
|
+
|
|
230
|
+
merchant_cert = Utility.getCertificateBasedOnKeyAlias(certificate_list, response_mle_key_alias)
|
|
228
231
|
|
|
229
232
|
if merchant_cert.nil?
|
|
230
|
-
raise StandardError.new("No certificate found for Response MLE Private Key file with
|
|
233
|
+
raise StandardError.new("No certificate found for Response MLE Private Key file with alias '#{response_mle_key_alias}'")
|
|
231
234
|
end
|
|
232
235
|
|
|
233
236
|
# Check if this is a CyberSource-generated P12 file
|
|
@@ -66,6 +66,12 @@
|
|
|
66
66
|
|
|
67
67
|
AUTH_TYPE_JWT = 'JWT' unless const_defined?(:AUTH_TYPE_JWT)
|
|
68
68
|
|
|
69
|
+
JWT_KEY_TYPE_P12 = 'P12' unless const_defined?(:JWT_KEY_TYPE_P12)
|
|
70
|
+
|
|
71
|
+
JWT_KEY_TYPE_SHARED_SECRET = 'SHARED_SECRET' unless const_defined?(:JWT_KEY_TYPE_SHARED_SECRET)
|
|
72
|
+
|
|
73
|
+
INVALID_JWT_KEY_TYPE = "Invalid jwtKeyType. Must be 'P12' or 'SHARED_SECRET'." unless const_defined?(:INVALID_JWT_KEY_TYPE)
|
|
74
|
+
|
|
69
75
|
OLD_RUN_ENVIRONMENT_CONSTANTS = ['CYBERSOURCE.ENVIRONMENT.SANDBOX', 'CYBERSOURCE.ENVIRONMENT.PRODUCTION', 'CYBERSOURCE.IN.ENVIRONMENT.SANDBOX', 'CYBERSOURCE.IN.ENVIRONMENT.PRODUCTION', 'BANKOFAMERICA.ENVIRONMENT.SANDBOX', 'BANKOFAMERICA.ENVIRONMENT.PRODUCTION']
|
|
70
76
|
|
|
71
77
|
# constants for fall back logic
|
|
@@ -146,6 +152,8 @@
|
|
|
146
152
|
|
|
147
153
|
INCORRECT_KEY_ALIAS = 'The Entered KeyAlias is Incorrect. Assigining merchantID value' unless const_defined?(:INCORRECT_KEY_ALIAS)
|
|
148
154
|
|
|
155
|
+
INCORRECT_KEY_ALIAS_USE_METAKEY = 'The Entered KeyAlias is Incorrect with useMetaKey set to true. Assigining portfolioID value' unless const_defined?(:INCORRECT_KEY_ALIAS_USE_METAKEY)
|
|
156
|
+
|
|
149
157
|
ENABLE_CLIENT_CERT_EMPTY = 'Enable Clientcert is Empty/Null.' unless const_defined?(:ENABLE_CLIENT_CERT_EMPTY)
|
|
150
158
|
|
|
151
159
|
CLIENT_CERT_DIR_EMPTY = 'Client Cert Directory is Empty/Null' unless const_defined?(:CLIENT_CERT_DIR_EMPTY)
|
|
@@ -48,6 +48,15 @@ public
|
|
|
48
48
|
return requestBody
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
+
# Check if using shared secret JWT without explicit MLE certificate path
|
|
52
|
+
if mleCertificate.nil? &&
|
|
53
|
+
Constants::AUTH_TYPE_JWT.downcase == merchantConfig.authenticationType.downcase &&
|
|
54
|
+
merchantConfig.is_shared_secret_key_type?
|
|
55
|
+
@log_obj.logger.debug("MLE for requests with JWT shared secret authentication requires mleForRequestPublicCertPath to be explicitly provided in merchant configuration.")
|
|
56
|
+
@log_obj.logger.debug("Please set mleForRequestPublicCertPath to the path of your MLE public certificate file.")
|
|
57
|
+
raise StandardError.new(Constants::ERROR_PREFIX + "Missing MLE certificate for JWT shared secret authentication. Please provide the MLE public certificate path in the configuration.")
|
|
58
|
+
end
|
|
59
|
+
|
|
51
60
|
begin
|
|
52
61
|
serial_number = self.extract_serial_number_from_certificate(mleCertificate)
|
|
53
62
|
|
|
@@ -239,7 +239,7 @@ module CyberSource
|
|
|
239
239
|
# header parameters
|
|
240
240
|
header_params = {}
|
|
241
241
|
# HTTP header 'Accept' (if needed)
|
|
242
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
|
|
242
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;charset=utf-8'])
|
|
243
243
|
# HTTP header 'Content-Type'
|
|
244
244
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
245
245
|
|
|
@@ -138,7 +138,7 @@ module CyberSource
|
|
|
138
138
|
# header parameters
|
|
139
139
|
header_params = {}
|
|
140
140
|
# HTTP header 'Accept' (if needed)
|
|
141
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
|
141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
|
|
142
142
|
# HTTP header 'Content-Type'
|
|
143
143
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
144
144
|
|
|
@@ -182,27 +182,27 @@ module CyberSource
|
|
|
182
182
|
# Create Webhook Security Keys
|
|
183
183
|
# Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later.
|
|
184
184
|
#
|
|
185
|
-
# @param v_c_sender_organization_id Sender organization id
|
|
186
|
-
# @param v_c_permissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding
|
|
187
185
|
# @param [Hash] opts the optional parameters
|
|
188
186
|
# @option opts [String] :v_c_correlation_id A globally unique id associated with your request
|
|
187
|
+
# @option opts [String] :v_c_sender_organization_id Sender organization id
|
|
188
|
+
# @option opts [String] :v_c_permissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding
|
|
189
189
|
# @option opts [SaveSymEgressKey] :save_sym_egress_key Provide egress Symmetric key information to save (create or store or refresh)
|
|
190
190
|
# @return [InlineResponse2015]
|
|
191
191
|
#
|
|
192
|
-
def save_sym_egress_key(
|
|
193
|
-
data, status_code, headers = save_sym_egress_key_with_http_info(
|
|
192
|
+
def save_sym_egress_key(opts = {})
|
|
193
|
+
data, status_code, headers = save_sym_egress_key_with_http_info(opts)
|
|
194
194
|
return data, status_code, headers
|
|
195
195
|
end
|
|
196
196
|
|
|
197
197
|
# Create Webhook Security Keys
|
|
198
198
|
# Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later.
|
|
199
|
-
# @param v_c_sender_organization_id Sender organization id
|
|
200
|
-
# @param v_c_permissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding
|
|
201
199
|
# @param [Hash] opts the optional parameters
|
|
202
200
|
# @option opts [String] :v_c_correlation_id A globally unique id associated with your request
|
|
201
|
+
# @option opts [String] :v_c_sender_organization_id Sender organization id
|
|
202
|
+
# @option opts [String] :v_c_permissions Encoded user permissions returned by the CGK, for the entity user who initiated the boarding
|
|
203
203
|
# @option opts [SaveSymEgressKey] :save_sym_egress_key Provide egress Symmetric key information to save (create or store or refresh)
|
|
204
204
|
# @return [Array<(InlineResponse2015, Fixnum, Hash)>] InlineResponse2015 data, response status code and response headers
|
|
205
|
-
def save_sym_egress_key_with_http_info(
|
|
205
|
+
def save_sym_egress_key_with_http_info(opts = {})
|
|
206
206
|
|
|
207
207
|
if @api_client.config.debugging
|
|
208
208
|
begin
|
|
@@ -212,22 +212,14 @@ module CyberSource
|
|
|
212
212
|
puts 'Cannot write to log'
|
|
213
213
|
end
|
|
214
214
|
end
|
|
215
|
-
# verify the required parameter 'v_c_sender_organization_id' is set
|
|
216
|
-
if @api_client.config.client_side_validation && v_c_sender_organization_id.nil?
|
|
217
|
-
fail ArgumentError, "Missing the required parameter 'v_c_sender_organization_id' when calling CreateNewWebhooksApi.save_sym_egress_key"
|
|
218
|
-
end
|
|
219
|
-
#if @api_client.config.client_side_validation && v_c_sender_organization_id !~ Regexp.new(/^[A-Za-z0-9\\-_]+$/)
|
|
220
|
-
#fail ArgumentError, "invalid value for 'v_c_sender_organization_id' when calling CreateNewWebhooksApi.save_sym_egress_key, must conform to the pattern /^[A-Za-z0-9\\-_]+$/."
|
|
221
|
-
#end
|
|
222
|
-
|
|
223
|
-
# verify the required parameter 'v_c_permissions' is set
|
|
224
|
-
if @api_client.config.client_side_validation && v_c_permissions.nil?
|
|
225
|
-
fail ArgumentError, "Missing the required parameter 'v_c_permissions' when calling CreateNewWebhooksApi.save_sym_egress_key"
|
|
226
|
-
end
|
|
227
215
|
#if @api_client.config.client_side_validation && !opts[:'v_c_correlation_id'].nil? && opts[:'v_c_correlation_id'] !~ Regexp.new(/^[A-Za-z0-9\\.\\-_:]+$/)
|
|
228
216
|
#fail ArgumentError, "invalid value for 'opts[:\"v_c_correlation_id\"]' when calling CreateNewWebhooksApi.save_sym_egress_key, must conform to the pattern /^[A-Za-z0-9\\.\\-_:]+$/."
|
|
229
217
|
#end
|
|
230
218
|
|
|
219
|
+
#if @api_client.config.client_side_validation && !opts[:'v_c_sender_organization_id'].nil? && opts[:'v_c_sender_organization_id'] !~ Regexp.new(/^[A-Za-z0-9\\-_]+$/)
|
|
220
|
+
#fail ArgumentError, "invalid value for 'opts[:\"v_c_sender_organization_id\"]' when calling CreateNewWebhooksApi.save_sym_egress_key, must conform to the pattern /^[A-Za-z0-9\\-_]+$/."
|
|
221
|
+
#end
|
|
222
|
+
|
|
231
223
|
# resource path
|
|
232
224
|
local_var_path = 'kms/egress/v2/keys-sym'
|
|
233
225
|
|
|
@@ -240,9 +232,9 @@ module CyberSource
|
|
|
240
232
|
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
241
233
|
# HTTP header 'Content-Type'
|
|
242
234
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
243
|
-
header_params[:'v-c-sender-organization-id'] = v_c_sender_organization_id
|
|
244
|
-
header_params[:'v-c-permissions'] = v_c_permissions
|
|
245
235
|
header_params[:'v-c-correlation-id'] = opts[:'v_c_correlation_id'] if !opts[:'v_c_correlation_id'].nil?
|
|
236
|
+
header_params[:'v-c-sender-organization-id'] = opts[:'v_c_sender_organization_id'] if !opts[:'v_c_sender_organization_id'].nil?
|
|
237
|
+
header_params[:'v-c-permissions'] = opts[:'v_c_permissions'] if !opts[:'v_c_permissions'].nil?
|
|
246
238
|
|
|
247
239
|
# form parameters
|
|
248
240
|
form_params = {}
|