cybersource_rest_client 0.0.82 → 0.0.83
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 +79 -42
- data/lib/AuthenticationSDK/core/MerchantConfig.rb +9 -2
- data/lib/AuthenticationSDK/logging/log_configuration.rb +2 -1
- data/lib/AuthenticationSDK/util/AuthJWEUtility.rb +1 -0
- data/lib/AuthenticationSDK/util/Constants.rb +2 -0
- data/lib/cybersource_rest_client/api/offers_api.rb +117 -0
- data/lib/cybersource_rest_client/api/pull_funds_api.rb +404 -0
- 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/models/add_negative_list_request.rb +1 -1
- 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/check_payer_auth_enrollment_request.rb +1 -1
- 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 +196 -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 +1 -1
- 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 +281 -0
- 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_500_4.rb → inline_response_502_2.rb} +1 -1
- data/lib/cybersource_rest_client/models/offer_request.rb +219 -0
- data/lib/cybersource_rest_client/models/payer_auth_setup_request.rb +1 -1
- 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/pts_v2_credits_post201_response.rb +15 -5
- 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_payments_captures_post201_response_processor_information.rb +1 -1
- 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_refund_post201_response.rb +15 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_error_information.rb +213 -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_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 +295 -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 +22 -5
- 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/ptsv2credits_processing_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ptsv2credits_sender_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb +22 -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 +301 -0
- data/lib/cybersource_rest_client/models/pull_funds201_response_processor_information_avs.rb +196 -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 +249 -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 +15 -5
- data/lib/cybersource_rest_client/models/{riskv1liststypeentries_client_reference_information.rb → push_funds201_response_processor_information_merchant_advice.rb} +14 -33
- 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/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/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/tmsv2_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/tmsv2tokenize_processing_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 +281 -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 +230 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_device_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 +189 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information_merchant_descriptor.rb +315 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information.rb +231 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_amount_details.rb +279 -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_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 +257 -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_recipient_information.rb +329 -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/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/{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 +152 -11
- metadata +211 -64
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7b2145187caddc5e65d832429b125682e89bd7cb5524cce56ac174480dd8fb8
|
|
4
|
+
data.tar.gz: '05439a8ea021577faf619bc4ceff17236524baf1cfaa3738f8712ae278c1f671'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82bf63f6b1166f9822849d41bbad0999a78318d158bd891af281e7cee28b6f421b45cc56c6bb309feaf660ecdd1551801976f5091f7bc5419c82f7fdd8e70e27
|
|
7
|
+
data.tar.gz: a2b31e89fea58024cf133481dc8ee379a7ab7f94d810150b77738456f62763125da4a0d0c7342cb7adc4cb05aa365c39ff8afe254ba65e089c7ce6f7146a96ad
|
|
@@ -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,99 @@ 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
|
-
if err.message.include? 'PKCS12_parse: mac verify failure'
|
|
46
|
-
@log_obj.logger.error(ExceptionHandler.new.new_custom_error Constants::ERROR_PREFIX + Constants::INCORRECT_KEY_PASS)
|
|
47
|
-
# exit!
|
|
48
|
-
else
|
|
49
|
-
@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
|
|
50
|
-
# exit!
|
|
24
|
+
begin
|
|
25
|
+
# Get payload claim set for JWTv2
|
|
26
|
+
payload_claim_set = getPayloadClaimSet(merchantconfig_obj, isResponseMLEForApi)
|
|
27
|
+
|
|
28
|
+
# Get cached certificate and private key
|
|
29
|
+
cache_value = Cache.new.fetchCachedP12Certificate(merchantconfig_obj)
|
|
30
|
+
private_key = cache_value.private_key
|
|
31
|
+
jwt_cert_obj = cache_value.cert
|
|
32
|
+
|
|
33
|
+
# Get header claim set for JWTv2
|
|
34
|
+
header_claim_set = getHeaderClaimSet(jwt_cert_obj)
|
|
35
|
+
|
|
36
|
+
# Generate JWT token using RS256 algorithm
|
|
37
|
+
token = JWT.encode(payload_claim_set, private_key, 'RS256', header_claim_set)
|
|
38
|
+
return token
|
|
39
|
+
rescue StandardError => err
|
|
40
|
+
if err.message.include? 'PKCS12_parse: mac verify failure'
|
|
41
|
+
@log_obj.logger.error(ExceptionHandler.new.new_custom_error Constants::ERROR_PREFIX + Constants::INCORRECT_KEY_PASS)
|
|
42
|
+
else
|
|
43
|
+
@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
|
|
44
|
+
end
|
|
45
|
+
raise err
|
|
51
46
|
end
|
|
52
|
-
raise err
|
|
53
47
|
end
|
|
54
48
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
private
|
|
50
|
+
|
|
51
|
+
def getPayloadClaimSet(merchantconfig_obj, isResponseMLEForApi)
|
|
52
|
+
jwt_payload = {}
|
|
53
|
+
request_type = merchantconfig_obj.requestType.upcase
|
|
54
|
+
|
|
55
|
+
# Setting the JWT digest and digest Algorithm when a POST, PUT, or PATCH request is made
|
|
58
56
|
if request_type == Constants::POST_REQUEST_TYPE || request_type == Constants::PUT_REQUEST_TYPE || request_type == Constants::PATCH_REQUEST_TYPE
|
|
59
57
|
payload = merchantconfig_obj.requestJsonData
|
|
60
|
-
|
|
61
|
-
# Note: Digest is not passed for GET calls
|
|
62
58
|
digest = DigestGeneration.new.generateDigest(payload)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
jwt_payload['digest'] = digest
|
|
60
|
+
jwt_payload['digestAlgorithm'] = 'SHA-256'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Set the iat and exp claims using Unix timestamps
|
|
64
|
+
current_time = Time.now.to_i
|
|
65
|
+
jwt_payload['iat'] = current_time
|
|
66
|
+
jwt_payload['exp'] = current_time + 120 # The exp claim is set to 2 mins more than the iat claim
|
|
67
|
+
|
|
68
|
+
# Set the request method, host and resource path in the JWT body as per the specification for all request types
|
|
69
|
+
jwt_payload['request-method'] = request_type
|
|
70
|
+
jwt_payload['request-host'] = merchantconfig_obj.requestHost
|
|
71
|
+
jwt_payload['request-resource-path'] = extractResourcePath(merchantconfig_obj.requestTarget)
|
|
72
|
+
|
|
73
|
+
# Choose issuer claim in the JWT body as per the use_metakey flag in the config file
|
|
74
|
+
if merchantconfig_obj.useMetaKey
|
|
75
|
+
issuer = merchantconfig_obj.portfolioID
|
|
66
76
|
else
|
|
67
|
-
|
|
77
|
+
issuer = merchantconfig_obj.merchantId
|
|
68
78
|
end
|
|
69
79
|
|
|
80
|
+
jwt_payload['iss'] = issuer
|
|
81
|
+
jwt_payload['jti'] = SecureRandom.uuid # Unique JWT ID
|
|
82
|
+
jwt_payload['v-c-jwt-version'] = '2'
|
|
83
|
+
jwt_payload['v-c-merchant-id'] = merchantconfig_obj.merchantId
|
|
84
|
+
|
|
70
85
|
if isResponseMLEForApi
|
|
71
|
-
|
|
72
|
-
|
|
86
|
+
mle_kid = MLEUtility.validate_and_auto_extract_response_mle_kid(merchantconfig_obj)
|
|
87
|
+
jwt_payload['v-c-response-mle-kid'] = mle_kid
|
|
73
88
|
end
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
return jwt_payload
|
|
76
91
|
end
|
|
92
|
+
|
|
93
|
+
def getHeaderClaimSet(jwt_cert_obj)
|
|
94
|
+
# Extract serial number from certificate for kid header
|
|
95
|
+
serial_number = MLEUtility.extract_serial_number_from_certificate(jwt_cert_obj)
|
|
96
|
+
|
|
97
|
+
jwt_headers = {
|
|
98
|
+
'kid' => serial_number,
|
|
99
|
+
'typ' => 'JWT'
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
# Add any other future parameters to the header claim set here
|
|
103
|
+
return jwt_headers
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def extractResourcePath(request_target)
|
|
107
|
+
return '' if request_target.nil? || request_target.empty?
|
|
108
|
+
|
|
109
|
+
# Split the string to remove the query params
|
|
110
|
+
parts = request_target.split('?', 2)
|
|
111
|
+
return parts[0]
|
|
112
|
+
end
|
|
113
|
+
|
|
77
114
|
implements TokenInterface
|
|
78
115
|
end
|
|
@@ -142,7 +142,9 @@ public
|
|
|
142
142
|
|
|
143
143
|
validateMerchantDetails()
|
|
144
144
|
validateMLEConfiguration(cybsPropertyObj)
|
|
145
|
-
|
|
145
|
+
if !@keysDirectory.nil? && !@keysDirectory.to_s.empty? && !@keyFilename.nil? && !@keyFilename.to_s.empty?
|
|
146
|
+
@p12KeyFilePath = File.join(@keysDirectory, @keyFilename + ".p12")
|
|
147
|
+
end
|
|
146
148
|
logAllProperties(cybsPropertyObj)
|
|
147
149
|
end
|
|
148
150
|
|
|
@@ -232,10 +234,15 @@ public
|
|
|
232
234
|
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_ALIAS_NULL_EMPTY)
|
|
233
235
|
elsif !@keyAlias.instance_of? String
|
|
234
236
|
@keyAlias=@keyAlias.to_s
|
|
235
|
-
|
|
237
|
+
end
|
|
238
|
+
if !@useMetaKey && @keyAlias != @merchantId
|
|
236
239
|
@keyAlias = @merchantId
|
|
237
240
|
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::INCORRECT_KEY_ALIAS)
|
|
238
241
|
end
|
|
242
|
+
if @useMetaKey && @keyAlias != @portfolioID
|
|
243
|
+
@keyAlias = @portfolioID
|
|
244
|
+
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::INCORRECT_KEY_ALIAS_USE_METAKEY)
|
|
245
|
+
end
|
|
239
246
|
if @keyPass.to_s.empty?
|
|
240
247
|
@keyPass = @merchantId
|
|
241
248
|
@log_obj.logger.warn(ExceptionHandler.new.new_api_warning Constants::WARNING_PREFIX + Constants::KEY_PASS_NULL)
|
|
@@ -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"
|
|
@@ -146,6 +146,8 @@
|
|
|
146
146
|
|
|
147
147
|
INCORRECT_KEY_ALIAS = 'The Entered KeyAlias is Incorrect. Assigining merchantID value' unless const_defined?(:INCORRECT_KEY_ALIAS)
|
|
148
148
|
|
|
149
|
+
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)
|
|
150
|
+
|
|
149
151
|
ENABLE_CLIENT_CERT_EMPTY = 'Enable Clientcert is Empty/Null.' unless const_defined?(:ENABLE_CLIENT_CERT_EMPTY)
|
|
150
152
|
|
|
151
153
|
CLIENT_CERT_DIR_EMPTY = 'Client Cert Directory is Empty/Null' unless const_defined?(:CLIENT_CERT_DIR_EMPTY)
|
|
@@ -19,6 +19,123 @@ module CyberSource
|
|
|
19
19
|
@api_client = api_client
|
|
20
20
|
@api_client.set_configuration(config)
|
|
21
21
|
end
|
|
22
|
+
# Create an Offer
|
|
23
|
+
# Empower global transactions with transparency and choice. Our Dynamic Currency Conversion API lets merchants offer customers the option to pay in their home currency at checkout, delivering real-time exchange rates. <div style=\"display: flex; gap: 2rem;\"> <div style=\"flex: 1;\"> **Key Benefits:** - **Enhanced Customer Experience:** Provide clarity and convenience for international shoppers. - **Real-Time Rates:** Accurate currency conversion with all the data required for acquirers and their merchants to maintain compliance with card network rules. - **Seamless Integration:** Flexible API endpoints for rate lookup, authorization, and capture. - **Regulatory Compliance:** Provides the data required for acquirers and merchants to meet and maintain card scheme requirements for disclosure and consent. <br> Ideal for merchants and payment partners seeking to boost trust and conversion in cross-border commerce. <br> **Key Features:** - **Rate Lookup:** Retrieves the most up-to-date exchange rate for eligible cards before authorization. - **Currency Choice:** Enables the merchant to offer customers the option to select between the merchant's local currency and their card's billing currency. - **Compliance:** Ensures merchants have the data required to adhere to card network regulations; exchange rates, markups, etc. <div style=\"margin-top: 1.5rem;\"> **Supported Scenarios:** - Dynamic Currency Conversion when cardholder's billing currency differs from merchant's pricing currency. - Merchant and acquirer must support the cardholder's billing currency. </div> <div style=\"margin-top: 1.5rem;\"> **Supported Processors:** - VPC - FDI Global </div> <div style=\"margin-top: 1.5rem;\"> **Compliance & Disclosure:** Merchants must: - Adhere to card network rules for Dynamic Currency Conversion (DCC) transactions. - Display the converted amount, exchange rate, and markup percentage and other required disclosures. - Obtain explicit cardholder consent before applying DCC. - Work with your acquirer to obtain full set of compliance requirements. </div> </div> <div style=\"flex: 1;\"> **Core API Endpoints:** **Currency Conversion API** Returns eligibility and exchange rate details, including: - exchangeRate - marginRate - reconciliationId and Id (for subsequent payment requests) <div style=\"margin-top: 1.5rem;\"> **Payment Authorization with DCC*** POST /pts/v2/payments Required fields include: - orderInformation.amountDetails.currency - orderInformation.amountDetails.originalCurrency - orderInformation.amountDetails.originalAmount - orderInformation.amountDetails.exchangeRate - currencyConversion.indicator (e.g., 1 = Converted, 2 = Nonconvertible, 3 = Declined) </div> <div style=\"margin-top: 1.5rem;\"> **Capture with DCC*** POST /pts/v2/payments/{id}/captures Maps from original authorization and includes original and converted amounts. </div> <div style=\"margin-top: 1.5rem;\"> **Refund with DCC*** POST /pts/v2/captures/{id}/refunds Maps from original authorization and includes original and converted amounts. *Note: DCC is only supported on select processors. Contact your acquirer or account manager for more information.* </div> </div> </div> <br> For more information, see the [Currency Conversion Developer Guide](https://developer.cybersource.com/docs/cybs/en-us/currency-conversion/developer/all/rest/currency-conversion/cc-intro.html).
|
|
24
|
+
#
|
|
25
|
+
# @param content_type
|
|
26
|
+
# @param x_requestid
|
|
27
|
+
# @param v_c_merchant_id
|
|
28
|
+
# @param v_c_correlation_id
|
|
29
|
+
# @param v_c_organization_id
|
|
30
|
+
# @param offer_request
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [InlineResponse2019]
|
|
33
|
+
#
|
|
34
|
+
# DISCLAIMER : Cybersource may allow Customer to access, use, and/or test a Cybersource product or service that may still be in development or has not been market-tested ("Beta Product") solely for the purpose of evaluating the functionality or marketability of the Beta Product (a "Beta Evaluation"). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer's participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period ("Beta Product Form"). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer's use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. Cybersource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided "AS IS" and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR (C) FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS.
|
|
35
|
+
def create_offer(content_type, x_requestid, v_c_merchant_id, v_c_correlation_id, v_c_organization_id, offer_request, opts = {})
|
|
36
|
+
data, status_code, headers = create_offer_with_http_info(content_type, x_requestid, v_c_merchant_id, v_c_correlation_id, v_c_organization_id, offer_request, opts)
|
|
37
|
+
return data, status_code, headers
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Create an Offer
|
|
41
|
+
# Empower global transactions with transparency and choice. Our Dynamic Currency Conversion API lets merchants offer customers the option to pay in their home currency at checkout, delivering real-time exchange rates. <div style=\"display: flex; gap: 2rem;\"> <div style=\"flex: 1;\"> **Key Benefits:** - **Enhanced Customer Experience:** Provide clarity and convenience for international shoppers. - **Real-Time Rates:** Accurate currency conversion with all the data required for acquirers and their merchants to maintain compliance with card network rules. - **Seamless Integration:** Flexible API endpoints for rate lookup, authorization, and capture. - **Regulatory Compliance:** Provides the data required for acquirers and merchants to meet and maintain card scheme requirements for disclosure and consent. <br> Ideal for merchants and payment partners seeking to boost trust and conversion in cross-border commerce. <br> **Key Features:** - **Rate Lookup:** Retrieves the most up-to-date exchange rate for eligible cards before authorization. - **Currency Choice:** Enables the merchant to offer customers the option to select between the merchant's local currency and their card's billing currency. - **Compliance:** Ensures merchants have the data required to adhere to card network regulations; exchange rates, markups, etc. <div style=\"margin-top: 1.5rem;\"> **Supported Scenarios:** - Dynamic Currency Conversion when cardholder's billing currency differs from merchant's pricing currency. - Merchant and acquirer must support the cardholder's billing currency. </div> <div style=\"margin-top: 1.5rem;\"> **Supported Processors:** - VPC - FDI Global </div> <div style=\"margin-top: 1.5rem;\"> **Compliance & Disclosure:** Merchants must: - Adhere to card network rules for Dynamic Currency Conversion (DCC) transactions. - Display the converted amount, exchange rate, and markup percentage and other required disclosures. - Obtain explicit cardholder consent before applying DCC. - Work with your acquirer to obtain full set of compliance requirements. </div> </div> <div style=\"flex: 1;\"> **Core API Endpoints:** **Currency Conversion API** Returns eligibility and exchange rate details, including: - exchangeRate - marginRate - reconciliationId and Id (for subsequent payment requests) <div style=\"margin-top: 1.5rem;\"> **Payment Authorization with DCC*** POST /pts/v2/payments Required fields include: - orderInformation.amountDetails.currency - orderInformation.amountDetails.originalCurrency - orderInformation.amountDetails.originalAmount - orderInformation.amountDetails.exchangeRate - currencyConversion.indicator (e.g., 1 = Converted, 2 = Nonconvertible, 3 = Declined) </div> <div style=\"margin-top: 1.5rem;\"> **Capture with DCC*** POST /pts/v2/payments/{id}/captures Maps from original authorization and includes original and converted amounts. </div> <div style=\"margin-top: 1.5rem;\"> **Refund with DCC*** POST /pts/v2/captures/{id}/refunds Maps from original authorization and includes original and converted amounts. *Note: DCC is only supported on select processors. Contact your acquirer or account manager for more information.* </div> </div> </div> <br> For more information, see the [Currency Conversion Developer Guide](https://developer.cybersource.com/docs/cybs/en-us/currency-conversion/developer/all/rest/currency-conversion/cc-intro.html).
|
|
42
|
+
# @param content_type
|
|
43
|
+
# @param x_requestid
|
|
44
|
+
# @param v_c_merchant_id
|
|
45
|
+
# @param v_c_correlation_id
|
|
46
|
+
# @param v_c_organization_id
|
|
47
|
+
# @param offer_request
|
|
48
|
+
# @param [Hash] opts the optional parameters
|
|
49
|
+
# @return [Array<(InlineResponse2019, Fixnum, Hash)>] InlineResponse2019 data, response status code and response headers
|
|
50
|
+
def create_offer_with_http_info(content_type, x_requestid, v_c_merchant_id, v_c_correlation_id, v_c_organization_id, offer_request, opts = {})
|
|
51
|
+
|
|
52
|
+
if @api_client.config.debugging
|
|
53
|
+
begin
|
|
54
|
+
raise
|
|
55
|
+
@api_client.config.logger.debug 'Calling API: OffersApi.create_offer ...'
|
|
56
|
+
rescue
|
|
57
|
+
puts 'Cannot write to log'
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
# verify the required parameter 'content_type' is set
|
|
61
|
+
if @api_client.config.client_side_validation && content_type.nil?
|
|
62
|
+
fail ArgumentError, "Missing the required parameter 'content_type' when calling OffersApi.create_offer"
|
|
63
|
+
end
|
|
64
|
+
# verify the required parameter 'x_requestid' is set
|
|
65
|
+
if @api_client.config.client_side_validation && x_requestid.nil?
|
|
66
|
+
fail ArgumentError, "Missing the required parameter 'x_requestid' when calling OffersApi.create_offer"
|
|
67
|
+
end
|
|
68
|
+
# verify the required parameter 'v_c_merchant_id' is set
|
|
69
|
+
if @api_client.config.client_side_validation && v_c_merchant_id.nil?
|
|
70
|
+
fail ArgumentError, "Missing the required parameter 'v_c_merchant_id' when calling OffersApi.create_offer"
|
|
71
|
+
end
|
|
72
|
+
# verify the required parameter 'v_c_correlation_id' is set
|
|
73
|
+
if @api_client.config.client_side_validation && v_c_correlation_id.nil?
|
|
74
|
+
fail ArgumentError, "Missing the required parameter 'v_c_correlation_id' when calling OffersApi.create_offer"
|
|
75
|
+
end
|
|
76
|
+
# verify the required parameter 'v_c_organization_id' is set
|
|
77
|
+
if @api_client.config.client_side_validation && v_c_organization_id.nil?
|
|
78
|
+
fail ArgumentError, "Missing the required parameter 'v_c_organization_id' when calling OffersApi.create_offer"
|
|
79
|
+
end
|
|
80
|
+
# verify the required parameter 'offer_request' is set
|
|
81
|
+
if @api_client.config.client_side_validation && offer_request.nil?
|
|
82
|
+
fail ArgumentError, "Missing the required parameter 'offer_request' when calling OffersApi.create_offer"
|
|
83
|
+
end
|
|
84
|
+
# resource path
|
|
85
|
+
local_var_path = 'vas/v1/currencyconversion'
|
|
86
|
+
|
|
87
|
+
# query parameters
|
|
88
|
+
query_params = {}
|
|
89
|
+
|
|
90
|
+
# header parameters
|
|
91
|
+
header_params = {}
|
|
92
|
+
# HTTP header 'Accept' (if needed)
|
|
93
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
94
|
+
# HTTP header 'Content-Type'
|
|
95
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
96
|
+
header_params[:'Content-Type'] = content_type
|
|
97
|
+
header_params[:'x-requestid'] = x_requestid
|
|
98
|
+
header_params[:'v-c-merchant-id'] = v_c_merchant_id
|
|
99
|
+
header_params[:'v-c-correlation-id'] = v_c_correlation_id
|
|
100
|
+
header_params[:'v-c-organization-id'] = v_c_organization_id
|
|
101
|
+
|
|
102
|
+
# form parameters
|
|
103
|
+
form_params = {}
|
|
104
|
+
|
|
105
|
+
# http body (model)
|
|
106
|
+
post_body = @api_client.object_to_http_body(offer_request)
|
|
107
|
+
sdk_tracker = SdkTracker.new
|
|
108
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'OfferRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
109
|
+
inbound_mle_status = "false"
|
|
110
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_offer","create_offer_with_http_info"])
|
|
111
|
+
begin
|
|
112
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
113
|
+
rescue
|
|
114
|
+
raise
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_offer","create_offer_with_http_info"])
|
|
119
|
+
|
|
120
|
+
auth_names = []
|
|
121
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
122
|
+
:header_params => header_params,
|
|
123
|
+
:query_params => query_params,
|
|
124
|
+
:form_params => form_params,
|
|
125
|
+
:body => post_body,
|
|
126
|
+
:auth_names => auth_names,
|
|
127
|
+
:return_type => 'InlineResponse2019',
|
|
128
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
129
|
+
if @api_client.config.debugging
|
|
130
|
+
begin
|
|
131
|
+
raise
|
|
132
|
+
@api_client.config.logger.debug "API called: OffersApi#create_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
133
|
+
rescue
|
|
134
|
+
puts 'Cannot write to log'
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
return data, status_code, headers
|
|
138
|
+
end
|
|
22
139
|
# Retrieve an Offer
|
|
23
140
|
# Retrieves an offer record from the system.
|
|
24
141
|
#
|