cybersource_rest_client 0.0.85 → 0.0.87
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/util/Cache.rb +9 -6
- data/lib/AuthenticationSDK/util/CertificateUtility.rb +14 -6
- data/lib/AuthenticationSDK/util/Utility.rb +16 -5
- data/lib/cybersource_rest_client/api/agent_capabilities_api.rb +1868 -122
- data/lib/cybersource_rest_client/api/bin_lookup_api.rb +3 -3
- data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +6 -6
- data/lib/cybersource_rest_client/api/emv_tag_details_api.rb +1 -1
- data/lib/cybersource_rest_client/api/foreign_exchange_rates_api.rb +146 -0
- data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +9 -9
- data/lib/cybersource_rest_client/api/merchant_boarding_api.rb +94 -4
- data/lib/cybersource_rest_client/api/merchant_capabilities_api.rb +1065 -0
- data/lib/cybersource_rest_client/api/merchant_defined_fields_api.rb +361 -0
- data/lib/cybersource_rest_client/api/network_tokens_api.rb +4 -4
- data/lib/cybersource_rest_client/api/offers_api.rb +3 -3
- data/lib/cybersource_rest_client/api/orders_api.rb +2 -2
- data/lib/cybersource_rest_client/api/payment_tokens_api.rb +1 -1
- data/lib/cybersource_rest_client/api/plans_api.rb +1 -1
- data/lib/cybersource_rest_client/api/pull_funds_api.rb +3 -3
- data/lib/cybersource_rest_client/api/search_transactions_api.rb +2 -2
- data/lib/cybersource_rest_client/api/subscriptions_api.rb +2 -2
- data/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +2 -2
- data/lib/cybersource_rest_client/api/transaction_details_api.rb +1 -1
- data/lib/cybersource_rest_client/api/transaction_query_api.rb +158 -0
- data/lib/cybersource_rest_client/api/visa_protect_risk_insights_api.rb +104 -0
- data/lib/cybersource_rest_client/models/acp_checkout_session_response_buyer.rb +254 -0
- data/lib/cybersource_rest_client/models/acp_complete_checkout_request.rb +205 -0
- data/lib/cybersource_rest_client/models/acp_complete_checkout_response_buyer.rb +254 -0
- data/lib/cybersource_rest_client/models/acp_complete_checkout_session_buyer.rb +254 -0
- data/lib/cybersource_rest_client/models/acp_create_checkout_session_buyer.rb +254 -0
- data/lib/cybersource_rest_client/models/acp_create_checkout_session_request.rb +217 -0
- data/lib/cybersource_rest_client/models/acp_update_checkout_session_buyer.rb +254 -0
- data/lib/cybersource_rest_client/models/acp_update_checkout_session_request.rb +224 -0
- data/lib/cybersource_rest_client/models/activate_merchant_key_response200.rb +356 -0
- data/lib/cybersource_rest_client/models/add_agent_key_response201.rb +356 -0
- data/lib/cybersource_rest_client/models/agent_registration_conflict_response409.rb +196 -0
- data/lib/cybersource_rest_client/models/agent_registration_response201.rb +356 -0
- data/lib/cybersource_rest_client/models/agent_registration_response201_keys.rb +308 -0
- data/lib/cybersource_rest_client/models/agent_registration_validation_error_response422.rb +214 -0
- data/lib/cybersource_rest_client/models/agent_registration_validation_error_response422_errors.rb +212 -0
- data/lib/cybersource_rest_client/models/agent_request.rb +286 -0
- data/lib/cybersource_rest_client/models/agent_update.rb +237 -0
- data/lib/cybersource_rest_client/models/boardingv1registrations_integration_information_tenant_configurations.rb +1 -1
- data/lib/cybersource_rest_client/models/body_1.rb +189 -0
- data/lib/cybersource_rest_client/models/body_2.rb +224 -0
- data/lib/cybersource_rest_client/models/consumer_authentication_response.rb +196 -0
- data/lib/cybersource_rest_client/models/create_payment_link_request.rb +17 -5
- data/lib/cybersource_rest_client/models/deactivate_merchant_key_response200.rb +196 -0
- data/lib/cybersource_rest_client/models/iccv1agents_keys.rb +239 -0
- data/lib/cybersource_rest_client/models/iccv1checkout_sessions_fulfillment_address.rb +344 -0
- data/lib/cybersource_rest_client/models/iccv1checkout_sessions_items.rb +222 -0
- data/lib/cybersource_rest_client/models/iccv1checkout_sessionssession_id_fulfillment_address.rb +344 -0
- data/lib/cybersource_rest_client/models/iccv1checkout_sessionssession_idcomplete_payment_data.rb +222 -0
- data/lib/cybersource_rest_client/models/iccv1checkout_sessionssession_idcomplete_payment_data_billing_address.rb +344 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_discounts.rb +206 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_discounts_allocations.rb +202 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_discounts_applied.rb +237 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_fulfillment.rb +193 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_fulfillment_destinations.rb +246 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_fulfillment_groups.rb +228 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_fulfillment_methods.rb +252 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_fulfillment_options.rb +215 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_fulfillment_totals.rb +202 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_item.rb +207 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_line_items.rb +211 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_payment.rb +217 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_payment_billing_address.rb +235 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_payment_credential.rb +202 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_payment_handlers.rb +259 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessions_payment_instruments.rb +288 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessionssession_id_discounts.rb +206 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessionssession_id_fulfillment.rb +193 -0
- data/lib/cybersource_rest_client/models/iccv1checkoutsessionssession_id_payment.rb +217 -0
- data/lib/cybersource_rest_client/models/iccv1merchants_api_integrations.rb +225 -0
- data/lib/cybersource_rest_client/models/iccv1merchants_encryption_key.rb +245 -0
- data/lib/cybersource_rest_client/models/iccv1merchants_protocol_interactions.rb +236 -0
- data/lib/cybersource_rest_client/models/iccv1merchants_web_integrations.rb +225 -0
- data/lib/cybersource_rest_client/models/iccv1productsfeed_products.rb +1368 -0
- data/lib/cybersource_rest_client/models/inline_response_200_16.rb +2 -2
- data/lib/cybersource_rest_client/models/inline_response_200_17.rb +317 -0
- data/lib/cybersource_rest_client/models/inline_response_200_17_fulfillment_address.rb +344 -0
- data/lib/cybersource_rest_client/models/inline_response_200_17_order.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_200_18.rb +308 -0
- data/lib/cybersource_rest_client/models/inline_response_200_19.rb +302 -0
- data/lib/cybersource_rest_client/models/inline_response_200_19_errors.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_200_19_google_merchant.rb +237 -0
- data/lib/cybersource_rest_client/models/inline_response_200_19_google_merchant_products.rb +259 -0
- data/lib/cybersource_rest_client/models/inline_response_200_20.rb +259 -0
- data/lib/cybersource_rest_client/models/inline_response_200_20_products.rb +1081 -0
- data/lib/cybersource_rest_client/models/inline_response_200_21.rb +201 -0
- data/lib/cybersource_rest_client/models/inline_response_200_4.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_5.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_200_5_integration_information_tenant_configurations.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_201_10.rb +202 -0
- data/lib/cybersource_rest_client/models/inline_response_201_11.rb +297 -0
- data/lib/cybersource_rest_client/models/{inline_response_201_9_client_reference_information.rb → inline_response_201_11_client_reference_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_9_error_information.rb → inline_response_201_11_error_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_9_order_information.rb → inline_response_201_11_order_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_201_9_order_information_currency_conversion.rb → inline_response_201_11_order_information_currency_conversion.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_201_9_order_information_currency_conversion_offer.rb → inline_response_201_11_order_information_currency_conversion_offer.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_9_processor_information.rb → inline_response_201_11_processor_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_201_12.rb +318 -0
- data/lib/cybersource_rest_client/models/inline_response_201_12_fulfillment_address.rb +344 -0
- data/lib/cybersource_rest_client/models/inline_response_201_12_fulfillment_options.rb +290 -0
- data/lib/cybersource_rest_client/models/inline_response_201_12_item.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_201_12_line_items.rb +256 -0
- data/lib/cybersource_rest_client/models/inline_response_201_12_links.rb +212 -0
- data/lib/cybersource_rest_client/models/inline_response_201_12_messages.rb +250 -0
- data/lib/cybersource_rest_client/models/inline_response_201_12_payment_provider.rb +204 -0
- data/lib/cybersource_rest_client/models/inline_response_201_12_totals.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_201_13.rb +312 -0
- data/lib/cybersource_rest_client/models/inline_response_201_13_discounts.rb +206 -0
- data/lib/cybersource_rest_client/models/inline_response_201_13_fulfillment.rb +193 -0
- data/lib/cybersource_rest_client/models/inline_response_201_13_item.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_201_13_line_items.rb +225 -0
- data/lib/cybersource_rest_client/models/inline_response_201_13_order.rb +202 -0
- data/lib/cybersource_rest_client/models/inline_response_201_13_payment.rb +217 -0
- data/lib/cybersource_rest_client/models/inline_response_201_13_ucp.rb +204 -0
- data/lib/cybersource_rest_client/models/inline_response_201_13_ucp_capabilities.rb +202 -0
- data/lib/cybersource_rest_client/models/inline_response_201_3.rb +57 -35
- data/lib/cybersource_rest_client/models/inline_response_201_3_error_information.rb +225 -0
- data/lib/cybersource_rest_client/models/inline_response_201_3_error_information_details.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_201_3_order_information.rb +189 -0
- data/lib/cybersource_rest_client/models/inline_response_201_3_order_information_amount_details.rb +315 -0
- data/lib/cybersource_rest_client/models/inline_response_201_3_processing_information.rb +189 -0
- data/lib/cybersource_rest_client/models/inline_response_201_3_processing_information_routing.rb +196 -0
- data/lib/cybersource_rest_client/models/inline_response_201_3_processor_information.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4.rb +61 -61
- data/lib/cybersource_rest_client/models/{inline_response_401_1__links.rb → inline_response_201_4__links.rb} +2 -2
- data/lib/cybersource_rest_client/models/inline_response_201_4__links_self.rb +201 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_acquirer_information.rb +196 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_client_reference_information.rb +196 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_error_information.rb +225 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_error_information_details.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_merchant_information.rb +196 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_order_information.rb +189 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_order_information_amount_details.rb +264 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_payment_information.rb +223 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_payment_information_card.rb +213 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_processing_information.rb +240 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_processing_information_payouts_options.rb +196 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_processor_information.rb +548 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_processor_information_card_verification.rb +196 -0
- data/lib/cybersource_rest_client/models/inline_response_201_4_transactions.rb +239 -0
- data/lib/cybersource_rest_client/models/inline_response_201_5.rb +44 -18
- data/lib/cybersource_rest_client/models/{inline_response_201_3_payout_information.rb → inline_response_201_5_payout_information.rb} +3 -3
- data/lib/cybersource_rest_client/models/{inline_response_201_3_payout_information_pull_funds.rb → inline_response_201_5_payout_information_pull_funds.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_3_payout_information_push_funds.rb → inline_response_201_5_payout_information_push_funds.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_201_6.rb +69 -102
- data/lib/cybersource_rest_client/models/{inline_response_201_4_integration_information.rb → inline_response_201_6_integration_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_201_4_integration_information_tenant_configurations.rb → inline_response_201_6_integration_information_tenant_configurations.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_4_organization_information.rb → inline_response_201_6_organization_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_4_product_information_setups.rb → inline_response_201_6_product_information_setups.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_201_4_registration_information.rb → inline_response_201_6_registration_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_4_setups.rb → inline_response_201_6_setups.rb} +4 -4
- data/lib/cybersource_rest_client/models/{inline_response_201_4_setups_commerce_solutions.rb → inline_response_201_6_setups_commerce_solutions.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_4_setups_risk.rb → inline_response_201_6_setups_risk.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_201_4_setups_value_added_services.rb → inline_response_201_6_setups_value_added_services.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_201_7.rb +32 -87
- data/lib/cybersource_rest_client/models/{inline_response_201_5_key_information.rb → inline_response_201_7_key_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_201_5_key_information_error_information.rb → inline_response_201_7_key_information_error_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_201_5_key_information_error_information_details.rb → inline_response_201_7_key_information_error_information_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_201_8.rb +127 -15
- data/lib/cybersource_rest_client/models/inline_response_201_9.rb +78 -98
- data/lib/cybersource_rest_client/models/{inline_response_201_7_payloads.rb → inline_response_201_9_payloads.rb} +2 -2
- data/lib/cybersource_rest_client/models/{inline_response_201_7_payloads_test_payload.rb → inline_response_201_9_payloads_test_payload.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_202__links.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_10.rb +58 -36
- data/lib/cybersource_rest_client/models/{inline_response_400_8_fields.rb → inline_response_400_10_fields.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_11.rb +35 -42
- data/lib/cybersource_rest_client/models/{inline_response_400_9_details.rb → inline_response_400_11_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_12.rb +27 -26
- data/lib/cybersource_rest_client/models/inline_response_400_12_details.rb +18 -7
- data/lib/cybersource_rest_client/models/inline_response_400_13.rb +38 -77
- data/lib/cybersource_rest_client/models/inline_response_400_14.rb +235 -0
- data/lib/cybersource_rest_client/models/{inline_response_400_10_details.rb → inline_response_400_14_details.rb} +8 -19
- data/lib/cybersource_rest_client/models/inline_response_400_15.rb +281 -0
- data/lib/cybersource_rest_client/models/inline_response_400_16.rb +235 -0
- data/lib/cybersource_rest_client/models/inline_response_400_3.rb +42 -13
- data/lib/cybersource_rest_client/models/inline_response_400_4.rb +47 -13
- data/lib/cybersource_rest_client/models/inline_response_400_5.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_6.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_7.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_8.rb +37 -60
- data/lib/cybersource_rest_client/models/inline_response_400_9.rb +6 -6
- data/lib/cybersource_rest_client/models/inline_response_401.rb +51 -33
- data/lib/cybersource_rest_client/models/inline_response_401_1.rb +44 -56
- data/lib/cybersource_rest_client/models/inline_response_401_2.rb +223 -0
- data/lib/cybersource_rest_client/models/inline_response_401_3.rb +253 -0
- data/lib/cybersource_rest_client/models/inline_response_401_3__links.rb +189 -0
- data/lib/cybersource_rest_client/models/{inline_response_401_1__links_self.rb → inline_response_401_3__links_self.rb} +1 -1
- data/lib/cybersource_rest_client/models/{inline_response_401_1_fields.rb → inline_response_401_3_fields.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_404_3.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_422_1.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_502_2.rb +55 -26
- data/lib/cybersource_rest_client/models/inline_response_502_3.rb +21 -15
- data/lib/cybersource_rest_client/models/inline_response_502_4.rb +223 -0
- data/lib/cybersource_rest_client/models/inline_response_502_5.rb +251 -0
- data/lib/cybersource_rest_client/models/invoicing_v2_invoice_settings_get200_response_invoice_settings_information.rb +18 -1
- data/lib/cybersource_rest_client/models/invoicing_v2_invoices_all_get200_response_invoice_information.rb +2 -2
- data/lib/cybersource_rest_client/models/invoicing_v2_invoices_cancel200_response.rb +17 -5
- data/lib/cybersource_rest_client/models/invoicing_v2_invoices_post201_response_invoice_information.rb +20 -3
- data/lib/cybersource_rest_client/models/invoicing_v2_invoices_post201_response_merchant_defined_field_values_with_definition.rb +11 -1
- data/lib/cybersource_rest_client/models/invoicing_v2_invoices_publish200_response.rb +17 -5
- data/lib/cybersource_rest_client/models/invoicing_v2_invoices_send200_response.rb +17 -5
- data/lib/cybersource_rest_client/models/invoicingv2invoice_settings_invoice_settings_information.rb +18 -1
- data/lib/cybersource_rest_client/models/invoicingv2invoices_invoice_information.rb +20 -3
- data/lib/cybersource_rest_client/models/invoicingv2invoicesid_invoice_information.rb +20 -3
- data/lib/cybersource_rest_client/models/iplv2paymentlinks_order_information_line_items.rb +26 -9
- data/lib/cybersource_rest_client/models/iplv2paymentlinks_purchase_information.rb +85 -5
- data/lib/cybersource_rest_client/models/iplv2paymentlinksid_purchase_information.rb +85 -5
- data/lib/cybersource_rest_client/models/key_request.rb +239 -0
- data/lib/cybersource_rest_client/models/key_request_1.rb +245 -0
- data/lib/cybersource_rest_client/models/key_update.rb +224 -0
- data/lib/cybersource_rest_client/models/key_update_1.rb +235 -0
- data/lib/cybersource_rest_client/models/list_agent_keys_response200.rb +245 -0
- data/lib/cybersource_rest_client/models/list_agent_keys_response200_pagination.rb +276 -0
- data/lib/cybersource_rest_client/models/list_merchant_keys_response200.rb +262 -0
- data/lib/cybersource_rest_client/models/merchant_defined_field_core_1.rb +315 -0
- data/lib/cybersource_rest_client/models/merchant_defined_field_definition_request_1.rb +315 -0
- data/lib/cybersource_rest_client/models/merchant_registration_response201.rb +395 -0
- data/lib/cybersource_rest_client/models/merchant_registration_response201_keys.rb +324 -0
- data/lib/cybersource_rest_client/models/merchant_registration_validation_error_response422.rb +193 -0
- data/lib/cybersource_rest_client/models/merchant_registration_validation_error_response422_detail.rb +215 -0
- data/lib/cybersource_rest_client/models/merchant_request.rb +317 -0
- data/lib/cybersource_rest_client/models/merchant_update.rb +270 -0
- data/lib/cybersource_rest_client/models/patch_registration_body.rb +234 -0
- data/lib/cybersource_rest_client/models/pbl_payment_links_get200_response.rb +17 -5
- data/lib/cybersource_rest_client/models/pbl_payment_links_post201_response.rb +17 -5
- data/lib/cybersource_rest_client/models/pbl_payment_links_post201_response_purchase_information.rb +81 -1
- data/lib/cybersource_rest_client/models/{tms_tokenized_card_delete_request.rb → post_tokenized_card_delete_request.rb} +1 -1
- data/lib/cybersource_rest_client/models/processing_info_authorization_options.rb +14 -1
- data/lib/cybersource_rest_client/models/product_feed_request.rb +230 -0
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information.rb +37 -3
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +11 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_card_verification.rb +214 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_recurring_payment_information.rb +0 -14
- data/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payoutsfxrates_acquirer_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv2payoutsfxrates_client_reference_information.rb +257 -0
- data/lib/cybersource_rest_client/models/ptsv2payoutsfxrates_client_reference_information_partner.rb +213 -0
- data/lib/cybersource_rest_client/models/ptsv2payoutsfxrates_order_information.rb +189 -0
- data/lib/cybersource_rest_client/models/ptsv2payoutsfxrates_order_information_amount_details.rb +299 -0
- data/lib/cybersource_rest_client/models/ptsv2payoutsfxrates_processing_information.rb +240 -0
- data/lib/cybersource_rest_client/models/ptsv2payoutsfxrates_processing_information_routing.rb +205 -0
- data/lib/cybersource_rest_client/models/ptsv2payoutstransactionqueryid_client_reference_information.rb +247 -0
- data/lib/cybersource_rest_client/models/{boardingv1registrations_integration_information_tenant_information.rb → tenant_information.rb} +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options.rb +12 -1
- data/lib/cybersource_rest_client/models/ucp_checkout_session_response_buyer.rb +202 -0
- data/lib/cybersource_rest_client/models/ucp_complete_checkout_request.rb +201 -0
- data/lib/cybersource_rest_client/models/ucp_create_checkout_session_buyer.rb +202 -0
- data/lib/cybersource_rest_client/models/ucp_create_checkout_session_request.rb +249 -0
- data/lib/cybersource_rest_client/models/ucp_update_checkout_session_buyer.rb +202 -0
- data/lib/cybersource_rest_client/models/ucp_update_checkout_session_request.rb +255 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_complete_mandate.rb +16 -5
- data/lib/cybersource_rest_client/models/ucv1sessions_data.rb +11 -1
- data/lib/cybersource_rest_client/models/ucv1sessions_data_acquirer_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_aggregator_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ucv1sessions_data_consumer_authentication_information.rb +16 -5
- data/lib/cybersource_rest_client/models/unified_risk_post201_response.rb +211 -0
- data/lib/cybersource_rest_client/models/unified_risk_post201_response_results.rb +190 -0
- data/lib/cybersource_rest_client/models/unified_risk_post201_response_results_risk_insights.rb +291 -0
- data/lib/cybersource_rest_client/models/unified_risk_post201_response_results_risk_insights_client.rb +208 -0
- data/lib/cybersource_rest_client/models/unified_risk_post201_response_results_risk_insights_error.rb +202 -0
- data/lib/cybersource_rest_client/models/unified_risk_post201_response_results_risk_insights_packages.rb +190 -0
- data/lib/cybersource_rest_client/models/unified_risk_post201_response_results_risk_insights_packages_transaction_insights.rb +250 -0
- data/lib/cybersource_rest_client/models/unified_risk_post201_response_results_risk_insights_packages_transaction_insights_insights.rb +219 -0
- data/lib/cybersource_rest_client/models/unified_risk_post201_response_transaction_insights_insights_warnings.rb +214 -0
- data/lib/cybersource_rest_client/models/unified_risk_post400_response.rb +230 -0
- data/lib/cybersource_rest_client/models/unified_risk_post400_response_errors.rb +223 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_account.rb +190 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_acquirer.rb +302 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_acquirer_merchant_account.rb +234 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_acquirer_merchant_account_security_amount.rb +246 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_authentication.rb +402 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_authentication_challenge.rb +202 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_authorization.rb +212 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_browser.rb +420 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_customer.rb +403 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_customer_address.rb +279 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_customer_personal_identification.rb +297 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_device.rb +681 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb +344 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_initiating_party.rb +223 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_labels.rb +230 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_labels_authentication_outcome.rb +201 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_labels_payment_authorization_decision.rb +201 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_labels_return.rb +202 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_labels_transaction_decision.rb +201 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_labels_transaction_outcome.rb +201 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_merchant.rb +326 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_merchant_address.rb +328 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb +389 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_expected_annual_sales.rb +268 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_expected_average_ticket_size.rb +246 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_expected_monthly_sales.rb +268 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_hierarchy.rb +224 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_limit_value.rb +257 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_merchant_trading_address.rb +301 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_order.rb +256 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_order_billing.rb +360 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_order_line_items.rb +262 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_order_shipping.rb +464 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_order_shipping_store.rb +251 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_order_shipping_store_address.rb +191 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_order_shipping_store_store_address.rb +235 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_partner.rb +214 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment.rb +423 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_approvals.rb +193 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb +451 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account_balance_before.rb +257 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account_branch_address.rb +328 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account_credit_limit.rb +257 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account_financial_institution.rb +212 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_batch.rb +323 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb +461 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_card_par_details.rb +196 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb +380 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_check.rb +289 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_check_deposit_location.rb +279 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_counterparty.rb +287 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_counterparty_address.rb +279 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_counterparty_branch_address.rb +279 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_sdk.rb +268 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_token.rb +213 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_verification.rb +230 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_verification_additional.rb +256 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_verification_authentication.rb +232 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_verification_authentication_pin.rb +201 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_verification_authentication_three_ds.rb +190 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_verification_card_security.rb +199 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_verification_card_security_avs.rb +218 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_verification_card_security_cvv.rb +196 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_verification_digital.rb +212 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_wallet.rb +201 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_payment_wire.rb +364 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_risk_assessment.rb +308 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_risk_assessment_buyer_history.rb +276 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_risk_assessment_buyer_history_account_history.rb +207 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_risk_assessment_buyer_history_customer_account.rb +273 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_risk_assessment_buyer_history_customer_account_alertnate_authentication.rb +257 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_risk_assessment_vital4.rb +191 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_session.rb +202 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_terminal.rb +238 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_terminal_address.rb +301 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_terminal_capabilities.rb +234 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_third_party_risk.rb +708 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_third_party_risk_raw_data.rb +189 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction.rb +489 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_additional_fees.rb +257 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_amount.rb +257 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_batch_details.rb +220 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_batch_details_batch_credits_amount.rb +246 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_batch_details_batch_debits_amount.rb +246 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_batch_details_file_credits.rb +246 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_batch_details_file_debits.rb +246 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_check_details.rb +190 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_check_details_deposited_cash_amount.rb +246 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_transaction_recurring_details.rb +341 -0
- data/lib/cybersource_rest_client/models/unifiedrisk_travel.rb +279 -0
- data/lib/cybersource_rest_client/models/update_payment_link_request.rb +17 -5
- data/lib/cybersource_rest_client/models/vpri_request.rb +505 -0
- data/lib/cybersource_rest_client/models/vpri_transaction_insights_additional_data.rb +190 -0
- data/lib/cybersource_rest_client/models/vpri_transaction_insights_additional_data_card_bin_data.rb +357 -0
- data/lib/cybersource_rest_client.rb +2264 -2011
- metadata +286 -33
|
@@ -19,45 +19,45 @@ module CyberSource
|
|
|
19
19
|
@api_client = api_client
|
|
20
20
|
@api_client.set_configuration(config)
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
#
|
|
22
|
+
# Activate a key
|
|
23
|
+
# Activate a deactivated key. Raises 404 if agent or key not found, 403 if agent is deactivated.
|
|
24
24
|
#
|
|
25
|
-
# @param
|
|
26
|
-
# @param
|
|
25
|
+
# @param agent_id Unique agent identifier
|
|
26
|
+
# @param key_id Unique key identifier
|
|
27
27
|
# @param [Hash] opts the optional parameters
|
|
28
|
-
# @return [
|
|
28
|
+
# @return [AddAgentKeyResponse201]
|
|
29
29
|
#
|
|
30
|
-
def
|
|
31
|
-
data, status_code, headers =
|
|
30
|
+
def activate_agent_key(agent_id, key_id, opts = {})
|
|
31
|
+
data, status_code, headers = activate_agent_key_with_http_info(agent_id, key_id, opts)
|
|
32
32
|
return data, status_code, headers
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
# @param
|
|
38
|
-
# @param
|
|
35
|
+
# Activate a key
|
|
36
|
+
# Activate a deactivated key. Raises 404 if agent or key not found, 403 if agent is deactivated.
|
|
37
|
+
# @param agent_id Unique agent identifier
|
|
38
|
+
# @param key_id Unique key identifier
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
|
-
# @return [Array<(
|
|
41
|
-
def
|
|
40
|
+
# @return [Array<(AddAgentKeyResponse201, Fixnum, Hash)>] AddAgentKeyResponse201 data, response status code and response headers
|
|
41
|
+
def activate_agent_key_with_http_info(agent_id, key_id, opts = {})
|
|
42
42
|
|
|
43
43
|
if @api_client.config.debugging
|
|
44
44
|
begin
|
|
45
45
|
raise
|
|
46
|
-
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.
|
|
46
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.activate_agent_key ...'
|
|
47
47
|
rescue
|
|
48
48
|
puts 'Cannot write to log'
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
|
-
# verify the required parameter '
|
|
52
|
-
if @api_client.config.client_side_validation &&
|
|
53
|
-
fail ArgumentError, "Missing the required parameter '
|
|
51
|
+
# verify the required parameter 'agent_id' is set
|
|
52
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'agent_id' when calling AgentCapabilitiesApi.activate_agent_key"
|
|
54
54
|
end
|
|
55
|
-
# verify the required parameter '
|
|
56
|
-
if @api_client.config.client_side_validation &&
|
|
57
|
-
fail ArgumentError, "Missing the required parameter '
|
|
55
|
+
# verify the required parameter 'key_id' is set
|
|
56
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentCapabilitiesApi.activate_agent_key"
|
|
58
58
|
end
|
|
59
59
|
# resource path
|
|
60
|
-
local_var_path = 'icc/v1/
|
|
60
|
+
local_var_path = 'icc/v1/agents/{agentId}/keys/{keyId}/activate'.sub('{' + 'agentId' + '}', agent_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
|
|
61
61
|
|
|
62
62
|
# query parameters
|
|
63
63
|
query_params = {}
|
|
@@ -73,11 +73,13 @@ module CyberSource
|
|
|
73
73
|
form_params = {}
|
|
74
74
|
|
|
75
75
|
# http body (model)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
if 'POST' == 'POST'
|
|
77
|
+
post_body = '{}'
|
|
78
|
+
else
|
|
79
|
+
post_body = nil
|
|
80
|
+
end
|
|
79
81
|
inbound_mle_status = "mandatory"
|
|
80
|
-
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["
|
|
82
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["activate_agent_key","activate_agent_key_with_http_info"])
|
|
81
83
|
begin
|
|
82
84
|
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
83
85
|
rescue
|
|
@@ -85,66 +87,66 @@ module CyberSource
|
|
|
85
87
|
end
|
|
86
88
|
end
|
|
87
89
|
|
|
88
|
-
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["
|
|
90
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["activate_agent_key","activate_agent_key_with_http_info"])
|
|
89
91
|
|
|
90
92
|
auth_names = []
|
|
91
|
-
data, status_code, headers = @api_client.call_api(:
|
|
93
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
92
94
|
:header_params => header_params,
|
|
93
95
|
:query_params => query_params,
|
|
94
96
|
:form_params => form_params,
|
|
95
97
|
:body => post_body,
|
|
96
98
|
:auth_names => auth_names,
|
|
97
|
-
:return_type => '
|
|
99
|
+
:return_type => 'AddAgentKeyResponse201',
|
|
98
100
|
:isResponseMLEForApi => is_response_mle_for_api)
|
|
99
101
|
if @api_client.config.debugging
|
|
100
102
|
begin
|
|
101
103
|
raise
|
|
102
|
-
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#
|
|
104
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#activate_agent_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
103
105
|
rescue
|
|
104
106
|
puts 'Cannot write to log'
|
|
105
107
|
end
|
|
106
108
|
end
|
|
107
109
|
return data, status_code, headers
|
|
108
110
|
end
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
+
# Add a key to an agent
|
|
112
|
+
# [category 1 — Agent_Capabilities] Upload a Base64-encoded public key for an agent.
|
|
111
113
|
#
|
|
112
|
-
# @param
|
|
113
|
-
# @param
|
|
114
|
+
# @param agent_id Unique agent identifier
|
|
115
|
+
# @param key_request Key creation request
|
|
114
116
|
# @param [Hash] opts the optional parameters
|
|
115
|
-
# @return [
|
|
117
|
+
# @return [AddAgentKeyResponse201]
|
|
116
118
|
#
|
|
117
|
-
def
|
|
118
|
-
data, status_code, headers =
|
|
119
|
+
def add_agent_key(agent_id, key_request, opts = {})
|
|
120
|
+
data, status_code, headers = add_agent_key_with_http_info(agent_id, key_request, opts)
|
|
119
121
|
return data, status_code, headers
|
|
120
122
|
end
|
|
121
123
|
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
# @param
|
|
125
|
-
# @param
|
|
124
|
+
# Add a key to an agent
|
|
125
|
+
# [category 1 — Agent_Capabilities] Upload a Base64-encoded public key for an agent.
|
|
126
|
+
# @param agent_id Unique agent identifier
|
|
127
|
+
# @param key_request Key creation request
|
|
126
128
|
# @param [Hash] opts the optional parameters
|
|
127
|
-
# @return [Array<(
|
|
128
|
-
def
|
|
129
|
+
# @return [Array<(AddAgentKeyResponse201, Fixnum, Hash)>] AddAgentKeyResponse201 data, response status code and response headers
|
|
130
|
+
def add_agent_key_with_http_info(agent_id, key_request, opts = {})
|
|
129
131
|
|
|
130
132
|
if @api_client.config.debugging
|
|
131
133
|
begin
|
|
132
134
|
raise
|
|
133
|
-
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.
|
|
135
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.add_agent_key ...'
|
|
134
136
|
rescue
|
|
135
137
|
puts 'Cannot write to log'
|
|
136
138
|
end
|
|
137
139
|
end
|
|
138
|
-
# verify the required parameter '
|
|
139
|
-
if @api_client.config.client_side_validation &&
|
|
140
|
-
fail ArgumentError, "Missing the required parameter '
|
|
140
|
+
# verify the required parameter 'agent_id' is set
|
|
141
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
142
|
+
fail ArgumentError, "Missing the required parameter 'agent_id' when calling AgentCapabilitiesApi.add_agent_key"
|
|
141
143
|
end
|
|
142
|
-
# verify the required parameter '
|
|
143
|
-
if @api_client.config.client_side_validation &&
|
|
144
|
-
fail ArgumentError, "Missing the required parameter '
|
|
144
|
+
# verify the required parameter 'key_request' is set
|
|
145
|
+
if @api_client.config.client_side_validation && key_request.nil?
|
|
146
|
+
fail ArgumentError, "Missing the required parameter 'key_request' when calling AgentCapabilitiesApi.add_agent_key"
|
|
145
147
|
end
|
|
146
148
|
# resource path
|
|
147
|
-
local_var_path = 'icc/v1/
|
|
149
|
+
local_var_path = 'icc/v1/agents/{agentId}/keys'.sub('{' + 'agentId' + '}', agent_id.to_s)
|
|
148
150
|
|
|
149
151
|
# query parameters
|
|
150
152
|
query_params = {}
|
|
@@ -160,11 +162,11 @@ module CyberSource
|
|
|
160
162
|
form_params = {}
|
|
161
163
|
|
|
162
164
|
# http body (model)
|
|
163
|
-
post_body = @api_client.object_to_http_body(
|
|
165
|
+
post_body = @api_client.object_to_http_body(key_request)
|
|
164
166
|
sdk_tracker = SdkTracker.new
|
|
165
|
-
post_body = sdk_tracker.insert_developer_id_tracker(post_body, '
|
|
167
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'KeyRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
166
168
|
inbound_mle_status = "mandatory"
|
|
167
|
-
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["
|
|
169
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["add_agent_key","add_agent_key_with_http_info"])
|
|
168
170
|
begin
|
|
169
171
|
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
170
172
|
rescue
|
|
@@ -172,7 +174,7 @@ module CyberSource
|
|
|
172
174
|
end
|
|
173
175
|
end
|
|
174
176
|
|
|
175
|
-
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["
|
|
177
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["add_agent_key","add_agent_key_with_http_info"])
|
|
176
178
|
|
|
177
179
|
auth_names = []
|
|
178
180
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
@@ -181,51 +183,65 @@ module CyberSource
|
|
|
181
183
|
:form_params => form_params,
|
|
182
184
|
:body => post_body,
|
|
183
185
|
:auth_names => auth_names,
|
|
184
|
-
:return_type => '
|
|
186
|
+
:return_type => 'AddAgentKeyResponse201',
|
|
185
187
|
:isResponseMLEForApi => is_response_mle_for_api)
|
|
186
188
|
if @api_client.config.debugging
|
|
187
189
|
begin
|
|
188
190
|
raise
|
|
189
|
-
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#
|
|
191
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#add_agent_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
190
192
|
rescue
|
|
191
193
|
puts 'Cannot write to log'
|
|
192
194
|
end
|
|
193
195
|
end
|
|
194
196
|
return data, status_code, headers
|
|
195
197
|
end
|
|
196
|
-
#
|
|
197
|
-
#
|
|
198
|
+
# Cancel Checkout ACP
|
|
199
|
+
# Cancels an active ACP checkout session. No charge is made to the buyer. This call is safe to make multiple times — cancelling an already-cancelled session returns a successful response without error. Sessions also expire automatically after 30 minutes of inactivity, so explicit cancellation is optional but recommended to release any reserved inventory immediately.
|
|
198
200
|
#
|
|
199
|
-
# @param
|
|
201
|
+
# @param session_id The unique identifier of the ACP checkout session to cancel. Obtained from the `id` field in the Create Session response.
|
|
200
202
|
# @param [Hash] opts the optional parameters
|
|
201
|
-
# @
|
|
203
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
204
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
205
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
206
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
207
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
208
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
209
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
210
|
+
# @return [InlineResponse20018]
|
|
202
211
|
#
|
|
203
|
-
def
|
|
204
|
-
data, status_code, headers =
|
|
212
|
+
def cancel_checkout(session_id, opts = {})
|
|
213
|
+
data, status_code, headers = cancel_checkout_with_http_info(session_id, opts)
|
|
205
214
|
return data, status_code, headers
|
|
206
215
|
end
|
|
207
216
|
|
|
208
|
-
#
|
|
209
|
-
#
|
|
210
|
-
# @param
|
|
217
|
+
# Cancel Checkout ACP
|
|
218
|
+
# Cancels an active ACP checkout session. No charge is made to the buyer. This call is safe to make multiple times — cancelling an already-cancelled session returns a successful response without error. Sessions also expire automatically after 30 minutes of inactivity, so explicit cancellation is optional but recommended to release any reserved inventory immediately.
|
|
219
|
+
# @param session_id The unique identifier of the ACP checkout session to cancel. Obtained from the `id` field in the Create Session response.
|
|
211
220
|
# @param [Hash] opts the optional parameters
|
|
212
|
-
# @
|
|
213
|
-
|
|
221
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
222
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
223
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
224
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
225
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
226
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
227
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
228
|
+
# @return [Array<(InlineResponse20018, Fixnum, Hash)>] InlineResponse20018 data, response status code and response headers
|
|
229
|
+
def cancel_checkout_with_http_info(session_id, opts = {})
|
|
214
230
|
|
|
215
231
|
if @api_client.config.debugging
|
|
216
232
|
begin
|
|
217
233
|
raise
|
|
218
|
-
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.
|
|
234
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.cancel_checkout ...'
|
|
219
235
|
rescue
|
|
220
236
|
puts 'Cannot write to log'
|
|
221
237
|
end
|
|
222
238
|
end
|
|
223
|
-
# verify the required parameter '
|
|
224
|
-
if @api_client.config.client_side_validation &&
|
|
225
|
-
fail ArgumentError, "Missing the required parameter '
|
|
239
|
+
# verify the required parameter 'session_id' is set
|
|
240
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
241
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling AgentCapabilitiesApi.cancel_checkout"
|
|
226
242
|
end
|
|
227
243
|
# resource path
|
|
228
|
-
local_var_path = 'icc/v1/
|
|
244
|
+
local_var_path = 'icc/v1/checkout_sessions/{session_id}/cancel'.sub('{' + 'session_id' + '}', session_id.to_s)
|
|
229
245
|
|
|
230
246
|
# query parameters
|
|
231
247
|
query_params = {}
|
|
@@ -236,16 +252,25 @@ module CyberSource
|
|
|
236
252
|
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
237
253
|
# HTTP header 'Content-Type'
|
|
238
254
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
255
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
256
|
+
header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
|
|
257
|
+
header_params[:'User-Agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil?
|
|
258
|
+
header_params[:'Request-Id'] = opts[:'request_id'] if !opts[:'request_id'].nil?
|
|
259
|
+
header_params[:'Signature'] = opts[:'signature'] if !opts[:'signature'].nil?
|
|
260
|
+
header_params[:'Timestamp'] = opts[:'timestamp'] if !opts[:'timestamp'].nil?
|
|
261
|
+
header_params[:'API-Version'] = opts[:'api_version'] if !opts[:'api_version'].nil?
|
|
239
262
|
|
|
240
263
|
# form parameters
|
|
241
264
|
form_params = {}
|
|
242
265
|
|
|
243
266
|
# http body (model)
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
267
|
+
if 'POST' == 'POST'
|
|
268
|
+
post_body = '{}'
|
|
269
|
+
else
|
|
270
|
+
post_body = nil
|
|
271
|
+
end
|
|
247
272
|
inbound_mle_status = "mandatory"
|
|
248
|
-
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["
|
|
273
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["cancel_checkout","cancel_checkout_with_http_info"])
|
|
249
274
|
begin
|
|
250
275
|
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
251
276
|
rescue
|
|
@@ -253,7 +278,7 @@ module CyberSource
|
|
|
253
278
|
end
|
|
254
279
|
end
|
|
255
280
|
|
|
256
|
-
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["
|
|
281
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["cancel_checkout","cancel_checkout_with_http_info"])
|
|
257
282
|
|
|
258
283
|
auth_names = []
|
|
259
284
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
@@ -262,51 +287,57 @@ module CyberSource
|
|
|
262
287
|
:form_params => form_params,
|
|
263
288
|
:body => post_body,
|
|
264
289
|
:auth_names => auth_names,
|
|
265
|
-
:return_type => '
|
|
290
|
+
:return_type => 'InlineResponse20018',
|
|
266
291
|
:isResponseMLEForApi => is_response_mle_for_api)
|
|
267
292
|
if @api_client.config.debugging
|
|
268
293
|
begin
|
|
269
294
|
raise
|
|
270
|
-
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#
|
|
295
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#cancel_checkout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
271
296
|
rescue
|
|
272
297
|
puts 'Cannot write to log'
|
|
273
298
|
end
|
|
274
299
|
end
|
|
275
300
|
return data, status_code, headers
|
|
276
301
|
end
|
|
277
|
-
#
|
|
278
|
-
#
|
|
302
|
+
# Cancel a purchase intent
|
|
303
|
+
# Cancel an existing purchase intent (instruction) identified by its instructionId. The agent calls this endpoint when the consumer decides to abandon the purchase before payment credentials have been used. Requires device information and assurance data for identity verification. Returns status CANCELLED (HTTP 200) on success, or PENDING (HTTP 202) with pendingEvents if cardholder authentication is required before cancellation can proceed.
|
|
279
304
|
#
|
|
280
|
-
# @param
|
|
305
|
+
# @param instruction_id
|
|
306
|
+
# @param agentic_cancel_purchase_intent_request Unique identifier for the purchase intent instruction.
|
|
281
307
|
# @param [Hash] opts the optional parameters
|
|
282
308
|
# @return [AgenticCreatePurchaseIntentResponse200]
|
|
283
309
|
#
|
|
284
|
-
def
|
|
285
|
-
data, status_code, headers =
|
|
310
|
+
def cancel_purchase_intent(instruction_id, agentic_cancel_purchase_intent_request, opts = {})
|
|
311
|
+
data, status_code, headers = cancel_purchase_intent_with_http_info(instruction_id, agentic_cancel_purchase_intent_request, opts)
|
|
286
312
|
return data, status_code, headers
|
|
287
313
|
end
|
|
288
314
|
|
|
289
|
-
#
|
|
290
|
-
#
|
|
291
|
-
# @param
|
|
315
|
+
# Cancel a purchase intent
|
|
316
|
+
# Cancel an existing purchase intent (instruction) identified by its instructionId. The agent calls this endpoint when the consumer decides to abandon the purchase before payment credentials have been used. Requires device information and assurance data for identity verification. Returns status CANCELLED (HTTP 200) on success, or PENDING (HTTP 202) with pendingEvents if cardholder authentication is required before cancellation can proceed.
|
|
317
|
+
# @param instruction_id
|
|
318
|
+
# @param agentic_cancel_purchase_intent_request Unique identifier for the purchase intent instruction.
|
|
292
319
|
# @param [Hash] opts the optional parameters
|
|
293
320
|
# @return [Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>] AgenticCreatePurchaseIntentResponse200 data, response status code and response headers
|
|
294
|
-
def
|
|
321
|
+
def cancel_purchase_intent_with_http_info(instruction_id, agentic_cancel_purchase_intent_request, opts = {})
|
|
295
322
|
|
|
296
323
|
if @api_client.config.debugging
|
|
297
324
|
begin
|
|
298
325
|
raise
|
|
299
|
-
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.
|
|
326
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.cancel_purchase_intent ...'
|
|
300
327
|
rescue
|
|
301
328
|
puts 'Cannot write to log'
|
|
302
329
|
end
|
|
303
330
|
end
|
|
304
|
-
# verify the required parameter '
|
|
305
|
-
if @api_client.config.client_side_validation &&
|
|
306
|
-
fail ArgumentError, "Missing the required parameter '
|
|
331
|
+
# verify the required parameter 'instruction_id' is set
|
|
332
|
+
if @api_client.config.client_side_validation && instruction_id.nil?
|
|
333
|
+
fail ArgumentError, "Missing the required parameter 'instruction_id' when calling AgentCapabilitiesApi.cancel_purchase_intent"
|
|
334
|
+
end
|
|
335
|
+
# verify the required parameter 'agentic_cancel_purchase_intent_request' is set
|
|
336
|
+
if @api_client.config.client_side_validation && agentic_cancel_purchase_intent_request.nil?
|
|
337
|
+
fail ArgumentError, "Missing the required parameter 'agentic_cancel_purchase_intent_request' when calling AgentCapabilitiesApi.cancel_purchase_intent"
|
|
307
338
|
end
|
|
308
339
|
# resource path
|
|
309
|
-
local_var_path = 'icc/v1/instructions'
|
|
340
|
+
local_var_path = 'icc/v1/instructions/{instructionId}/cancel'.sub('{' + 'instructionId' + '}', instruction_id.to_s)
|
|
310
341
|
|
|
311
342
|
# query parameters
|
|
312
343
|
query_params = {}
|
|
@@ -322,11 +353,11 @@ module CyberSource
|
|
|
322
353
|
form_params = {}
|
|
323
354
|
|
|
324
355
|
# http body (model)
|
|
325
|
-
post_body = @api_client.object_to_http_body(
|
|
356
|
+
post_body = @api_client.object_to_http_body(agentic_cancel_purchase_intent_request)
|
|
326
357
|
sdk_tracker = SdkTracker.new
|
|
327
|
-
post_body = sdk_tracker.insert_developer_id_tracker(post_body, '
|
|
358
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticCancelPurchaseIntentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
328
359
|
inbound_mle_status = "mandatory"
|
|
329
|
-
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["
|
|
360
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["cancel_purchase_intent","cancel_purchase_intent_with_http_info"])
|
|
330
361
|
begin
|
|
331
362
|
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
332
363
|
rescue
|
|
@@ -334,10 +365,10 @@ module CyberSource
|
|
|
334
365
|
end
|
|
335
366
|
end
|
|
336
367
|
|
|
337
|
-
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["
|
|
368
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["cancel_purchase_intent","cancel_purchase_intent_with_http_info"])
|
|
338
369
|
|
|
339
370
|
auth_names = []
|
|
340
|
-
data, status_code, headers = @api_client.call_api(:
|
|
371
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
341
372
|
:header_params => header_params,
|
|
342
373
|
:query_params => query_params,
|
|
343
374
|
:form_params => form_params,
|
|
@@ -348,52 +379,160 @@ module CyberSource
|
|
|
348
379
|
if @api_client.config.debugging
|
|
349
380
|
begin
|
|
350
381
|
raise
|
|
351
|
-
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#
|
|
382
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#cancel_purchase_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
352
383
|
rescue
|
|
353
384
|
puts 'Cannot write to log'
|
|
354
385
|
end
|
|
355
386
|
end
|
|
356
387
|
return data, status_code, headers
|
|
357
388
|
end
|
|
358
|
-
#
|
|
359
|
-
#
|
|
389
|
+
# Complete Checkout ACP
|
|
390
|
+
# **Final step of the ACP checkout flow.** Submits payment and buyer information to place the order with the merchant. On success, the session transitions to `completed` and an `order_id` is returned confirming the merchant accepted the order. Once completed, the session is immutable — it cannot be updated or cancelled. **Payment token:** The `payment.token` must be a valid token from the payment provider configured for the merchant (e.g. a tokenized card from Stripe or Braintree). ACG forwards the token to the merchant's payment processor — it is never stored.
|
|
391
|
+
#
|
|
392
|
+
# @param session_id The unique identifier of the ACP checkout session to complete.
|
|
393
|
+
# @param acp_complete_checkout_request Final buyer and payment details needed to place the order. Both `buyer` and `payment` may have been provided in earlier Create/Update calls; if so, they can be omitted here. At least a valid payment token is required to process the transaction.
|
|
394
|
+
# @param [Hash] opts the optional parameters
|
|
395
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
396
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
397
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
398
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
399
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
400
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
401
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
402
|
+
# @return [InlineResponse20017]
|
|
403
|
+
#
|
|
404
|
+
def complete_checkout(session_id, acp_complete_checkout_request, opts = {})
|
|
405
|
+
data, status_code, headers = complete_checkout_with_http_info(session_id, acp_complete_checkout_request, opts)
|
|
406
|
+
return data, status_code, headers
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Complete Checkout ACP
|
|
410
|
+
# **Final step of the ACP checkout flow.** Submits payment and buyer information to place the order with the merchant. On success, the session transitions to `completed` and an `order_id` is returned confirming the merchant accepted the order. Once completed, the session is immutable — it cannot be updated or cancelled. **Payment token:** The `payment.token` must be a valid token from the payment provider configured for the merchant (e.g. a tokenized card from Stripe or Braintree). ACG forwards the token to the merchant's payment processor — it is never stored.
|
|
411
|
+
# @param session_id The unique identifier of the ACP checkout session to complete.
|
|
412
|
+
# @param acp_complete_checkout_request Final buyer and payment details needed to place the order. Both `buyer` and `payment` may have been provided in earlier Create/Update calls; if so, they can be omitted here. At least a valid payment token is required to process the transaction.
|
|
413
|
+
# @param [Hash] opts the optional parameters
|
|
414
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
415
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
416
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
417
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
418
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
419
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
420
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
421
|
+
# @return [Array<(InlineResponse20017, Fixnum, Hash)>] InlineResponse20017 data, response status code and response headers
|
|
422
|
+
def complete_checkout_with_http_info(session_id, acp_complete_checkout_request, opts = {})
|
|
423
|
+
|
|
424
|
+
if @api_client.config.debugging
|
|
425
|
+
begin
|
|
426
|
+
raise
|
|
427
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.complete_checkout ...'
|
|
428
|
+
rescue
|
|
429
|
+
puts 'Cannot write to log'
|
|
430
|
+
end
|
|
431
|
+
end
|
|
432
|
+
# verify the required parameter 'session_id' is set
|
|
433
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
434
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling AgentCapabilitiesApi.complete_checkout"
|
|
435
|
+
end
|
|
436
|
+
# verify the required parameter 'acp_complete_checkout_request' is set
|
|
437
|
+
if @api_client.config.client_side_validation && acp_complete_checkout_request.nil?
|
|
438
|
+
fail ArgumentError, "Missing the required parameter 'acp_complete_checkout_request' when calling AgentCapabilitiesApi.complete_checkout"
|
|
439
|
+
end
|
|
440
|
+
# resource path
|
|
441
|
+
local_var_path = 'icc/v1/checkout_sessions/{session_id}/complete'.sub('{' + 'session_id' + '}', session_id.to_s)
|
|
442
|
+
|
|
443
|
+
# query parameters
|
|
444
|
+
query_params = {}
|
|
445
|
+
|
|
446
|
+
# header parameters
|
|
447
|
+
header_params = {}
|
|
448
|
+
# HTTP header 'Accept' (if needed)
|
|
449
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
450
|
+
# HTTP header 'Content-Type'
|
|
451
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
452
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
453
|
+
header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
|
|
454
|
+
header_params[:'User-Agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil?
|
|
455
|
+
header_params[:'Request-Id'] = opts[:'request_id'] if !opts[:'request_id'].nil?
|
|
456
|
+
header_params[:'Signature'] = opts[:'signature'] if !opts[:'signature'].nil?
|
|
457
|
+
header_params[:'Timestamp'] = opts[:'timestamp'] if !opts[:'timestamp'].nil?
|
|
458
|
+
header_params[:'API-Version'] = opts[:'api_version'] if !opts[:'api_version'].nil?
|
|
459
|
+
|
|
460
|
+
# form parameters
|
|
461
|
+
form_params = {}
|
|
462
|
+
|
|
463
|
+
# http body (model)
|
|
464
|
+
post_body = @api_client.object_to_http_body(acp_complete_checkout_request)
|
|
465
|
+
sdk_tracker = SdkTracker.new
|
|
466
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AcpCompleteCheckoutRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
467
|
+
inbound_mle_status = "mandatory"
|
|
468
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["complete_checkout","complete_checkout_with_http_info"])
|
|
469
|
+
begin
|
|
470
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
471
|
+
rescue
|
|
472
|
+
raise
|
|
473
|
+
end
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["complete_checkout","complete_checkout_with_http_info"])
|
|
477
|
+
|
|
478
|
+
auth_names = []
|
|
479
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
480
|
+
:header_params => header_params,
|
|
481
|
+
:query_params => query_params,
|
|
482
|
+
:form_params => form_params,
|
|
483
|
+
:body => post_body,
|
|
484
|
+
:auth_names => auth_names,
|
|
485
|
+
:return_type => 'InlineResponse20017',
|
|
486
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
487
|
+
if @api_client.config.debugging
|
|
488
|
+
begin
|
|
489
|
+
raise
|
|
490
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#complete_checkout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
491
|
+
rescue
|
|
492
|
+
puts 'Cannot write to log'
|
|
493
|
+
end
|
|
494
|
+
end
|
|
495
|
+
return data, status_code, headers
|
|
496
|
+
end
|
|
497
|
+
# Confirm transaction events
|
|
498
|
+
# Confirm transaction events for a completed purchase. The agent calls this endpoint after the payment has been submitted to notify the Intelligent Commerce Connect of the transaction outcome. The request includes processor information (transaction type, status, approval codes), order details (shipping, tracking, product information), and merchant information. Returns HTTP 202 acknowledging receipt of the confirmation.
|
|
360
499
|
#
|
|
361
500
|
# @param instruction_id Unique identifier for the purchase intent instruction.
|
|
362
|
-
# @param
|
|
501
|
+
# @param agentic_confirm_transaction_events_request
|
|
363
502
|
# @param [Hash] opts the optional parameters
|
|
364
|
-
# @return [
|
|
503
|
+
# @return [AgenticConfirmTransactionEventsResponse202]
|
|
365
504
|
#
|
|
366
|
-
def
|
|
367
|
-
data, status_code, headers =
|
|
505
|
+
def confirm_transaction_events(instruction_id, agentic_confirm_transaction_events_request, opts = {})
|
|
506
|
+
data, status_code, headers = confirm_transaction_events_with_http_info(instruction_id, agentic_confirm_transaction_events_request, opts)
|
|
368
507
|
return data, status_code, headers
|
|
369
508
|
end
|
|
370
509
|
|
|
371
|
-
#
|
|
372
|
-
#
|
|
510
|
+
# Confirm transaction events
|
|
511
|
+
# Confirm transaction events for a completed purchase. The agent calls this endpoint after the payment has been submitted to notify the Intelligent Commerce Connect of the transaction outcome. The request includes processor information (transaction type, status, approval codes), order details (shipping, tracking, product information), and merchant information. Returns HTTP 202 acknowledging receipt of the confirmation.
|
|
373
512
|
# @param instruction_id Unique identifier for the purchase intent instruction.
|
|
374
|
-
# @param
|
|
513
|
+
# @param agentic_confirm_transaction_events_request
|
|
375
514
|
# @param [Hash] opts the optional parameters
|
|
376
|
-
# @return [Array<(
|
|
377
|
-
def
|
|
515
|
+
# @return [Array<(AgenticConfirmTransactionEventsResponse202, Fixnum, Hash)>] AgenticConfirmTransactionEventsResponse202 data, response status code and response headers
|
|
516
|
+
def confirm_transaction_events_with_http_info(instruction_id, agentic_confirm_transaction_events_request, opts = {})
|
|
378
517
|
|
|
379
518
|
if @api_client.config.debugging
|
|
380
519
|
begin
|
|
381
520
|
raise
|
|
382
|
-
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.
|
|
521
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.confirm_transaction_events ...'
|
|
383
522
|
rescue
|
|
384
523
|
puts 'Cannot write to log'
|
|
385
524
|
end
|
|
386
525
|
end
|
|
387
526
|
# verify the required parameter 'instruction_id' is set
|
|
388
527
|
if @api_client.config.client_side_validation && instruction_id.nil?
|
|
389
|
-
fail ArgumentError, "Missing the required parameter 'instruction_id' when calling AgentCapabilitiesApi.
|
|
528
|
+
fail ArgumentError, "Missing the required parameter 'instruction_id' when calling AgentCapabilitiesApi.confirm_transaction_events"
|
|
390
529
|
end
|
|
391
|
-
# verify the required parameter '
|
|
392
|
-
if @api_client.config.client_side_validation &&
|
|
393
|
-
fail ArgumentError, "Missing the required parameter '
|
|
530
|
+
# verify the required parameter 'agentic_confirm_transaction_events_request' is set
|
|
531
|
+
if @api_client.config.client_side_validation && agentic_confirm_transaction_events_request.nil?
|
|
532
|
+
fail ArgumentError, "Missing the required parameter 'agentic_confirm_transaction_events_request' when calling AgentCapabilitiesApi.confirm_transaction_events"
|
|
394
533
|
end
|
|
395
534
|
# resource path
|
|
396
|
-
local_var_path = 'icc/v1/instructions/{instructionId}/
|
|
535
|
+
local_var_path = 'icc/v1/instructions/{instructionId}/confirmations'.sub('{' + 'instructionId' + '}', instruction_id.to_s)
|
|
397
536
|
|
|
398
537
|
# query parameters
|
|
399
538
|
query_params = {}
|
|
@@ -409,11 +548,11 @@ module CyberSource
|
|
|
409
548
|
form_params = {}
|
|
410
549
|
|
|
411
550
|
# http body (model)
|
|
412
|
-
post_body = @api_client.object_to_http_body(
|
|
551
|
+
post_body = @api_client.object_to_http_body(agentic_confirm_transaction_events_request)
|
|
413
552
|
sdk_tracker = SdkTracker.new
|
|
414
|
-
post_body = sdk_tracker.insert_developer_id_tracker(post_body, '
|
|
553
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticConfirmTransactionEventsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
415
554
|
inbound_mle_status = "mandatory"
|
|
416
|
-
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["
|
|
555
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["confirm_transaction_events","confirm_transaction_events_with_http_info"])
|
|
417
556
|
begin
|
|
418
557
|
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
419
558
|
rescue
|
|
@@ -421,7 +560,7 @@ module CyberSource
|
|
|
421
560
|
end
|
|
422
561
|
end
|
|
423
562
|
|
|
424
|
-
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["
|
|
563
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["confirm_transaction_events","confirm_transaction_events_with_http_info"])
|
|
425
564
|
|
|
426
565
|
auth_names = []
|
|
427
566
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
@@ -430,12 +569,1619 @@ module CyberSource
|
|
|
430
569
|
:form_params => form_params,
|
|
431
570
|
:body => post_body,
|
|
432
571
|
:auth_names => auth_names,
|
|
433
|
-
:return_type => '
|
|
572
|
+
:return_type => 'AgenticConfirmTransactionEventsResponse202',
|
|
434
573
|
:isResponseMLEForApi => is_response_mle_for_api)
|
|
435
574
|
if @api_client.config.debugging
|
|
436
575
|
begin
|
|
437
576
|
raise
|
|
438
|
-
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#
|
|
577
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#confirm_transaction_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
578
|
+
rescue
|
|
579
|
+
puts 'Cannot write to log'
|
|
580
|
+
end
|
|
581
|
+
end
|
|
582
|
+
return data, status_code, headers
|
|
583
|
+
end
|
|
584
|
+
# Create Checkout Session ACP
|
|
585
|
+
# **Step 1 of the ACP checkout flow.** Initiates a new ACP checkout session with the buyer's cart. ACG validates item availability against the merchant's catalog, calculates initial pricing and tax, and returns a session object with a unique `id`. **Store the `id`** — every subsequent call in this checkout flow (update, complete, cancel) requires it. The session remains active for 30 minutes. A new session must be created after expiry. **Idempotency:** Supply an `Idempotency-Key` header to safely retry this call without creating duplicate sessions.
|
|
586
|
+
#
|
|
587
|
+
# @param acp_create_checkout_session_request The cart contents and buyer context for this checkout session. `items` is required. `buyer` and `fulfillment_address` are optional on creation and can be provided via Update Session before completing checkout.
|
|
588
|
+
# @param [Hash] opts the optional parameters
|
|
589
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
590
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
591
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
592
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
593
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
594
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
595
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
596
|
+
# @return [InlineResponse20112]
|
|
597
|
+
#
|
|
598
|
+
def create_checkout_session(acp_create_checkout_session_request, opts = {})
|
|
599
|
+
data, status_code, headers = create_checkout_session_with_http_info(acp_create_checkout_session_request, opts)
|
|
600
|
+
return data, status_code, headers
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
# Create Checkout Session ACP
|
|
604
|
+
# **Step 1 of the ACP checkout flow.** Initiates a new ACP checkout session with the buyer's cart. ACG validates item availability against the merchant's catalog, calculates initial pricing and tax, and returns a session object with a unique `id`. **Store the `id`** — every subsequent call in this checkout flow (update, complete, cancel) requires it. The session remains active for 30 minutes. A new session must be created after expiry. **Idempotency:** Supply an `Idempotency-Key` header to safely retry this call without creating duplicate sessions.
|
|
605
|
+
# @param acp_create_checkout_session_request The cart contents and buyer context for this checkout session. `items` is required. `buyer` and `fulfillment_address` are optional on creation and can be provided via Update Session before completing checkout.
|
|
606
|
+
# @param [Hash] opts the optional parameters
|
|
607
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
608
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
609
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
610
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
611
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
612
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
613
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
614
|
+
# @return [Array<(InlineResponse20112, Fixnum, Hash)>] InlineResponse20112 data, response status code and response headers
|
|
615
|
+
def create_checkout_session_with_http_info(acp_create_checkout_session_request, opts = {})
|
|
616
|
+
|
|
617
|
+
if @api_client.config.debugging
|
|
618
|
+
begin
|
|
619
|
+
raise
|
|
620
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.create_checkout_session ...'
|
|
621
|
+
rescue
|
|
622
|
+
puts 'Cannot write to log'
|
|
623
|
+
end
|
|
624
|
+
end
|
|
625
|
+
# verify the required parameter 'acp_create_checkout_session_request' is set
|
|
626
|
+
if @api_client.config.client_side_validation && acp_create_checkout_session_request.nil?
|
|
627
|
+
fail ArgumentError, "Missing the required parameter 'acp_create_checkout_session_request' when calling AgentCapabilitiesApi.create_checkout_session"
|
|
628
|
+
end
|
|
629
|
+
# resource path
|
|
630
|
+
local_var_path = 'icc/v1/checkout_sessions'
|
|
631
|
+
|
|
632
|
+
# query parameters
|
|
633
|
+
query_params = {}
|
|
634
|
+
|
|
635
|
+
# header parameters
|
|
636
|
+
header_params = {}
|
|
637
|
+
# HTTP header 'Accept' (if needed)
|
|
638
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
639
|
+
# HTTP header 'Content-Type'
|
|
640
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
641
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
642
|
+
header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
|
|
643
|
+
header_params[:'User-Agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil?
|
|
644
|
+
header_params[:'Request-Id'] = opts[:'request_id'] if !opts[:'request_id'].nil?
|
|
645
|
+
header_params[:'Signature'] = opts[:'signature'] if !opts[:'signature'].nil?
|
|
646
|
+
header_params[:'Timestamp'] = opts[:'timestamp'] if !opts[:'timestamp'].nil?
|
|
647
|
+
header_params[:'API-Version'] = opts[:'api_version'] if !opts[:'api_version'].nil?
|
|
648
|
+
|
|
649
|
+
# form parameters
|
|
650
|
+
form_params = {}
|
|
651
|
+
|
|
652
|
+
# http body (model)
|
|
653
|
+
post_body = @api_client.object_to_http_body(acp_create_checkout_session_request)
|
|
654
|
+
sdk_tracker = SdkTracker.new
|
|
655
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AcpCreateCheckoutSessionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
656
|
+
inbound_mle_status = "mandatory"
|
|
657
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_checkout_session","create_checkout_session_with_http_info"])
|
|
658
|
+
begin
|
|
659
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
660
|
+
rescue
|
|
661
|
+
raise
|
|
662
|
+
end
|
|
663
|
+
end
|
|
664
|
+
|
|
665
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_checkout_session","create_checkout_session_with_http_info"])
|
|
666
|
+
|
|
667
|
+
auth_names = []
|
|
668
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
669
|
+
:header_params => header_params,
|
|
670
|
+
:query_params => query_params,
|
|
671
|
+
:form_params => form_params,
|
|
672
|
+
:body => post_body,
|
|
673
|
+
:auth_names => auth_names,
|
|
674
|
+
:return_type => 'InlineResponse20112',
|
|
675
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
676
|
+
if @api_client.config.debugging
|
|
677
|
+
begin
|
|
678
|
+
raise
|
|
679
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#create_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
680
|
+
rescue
|
|
681
|
+
puts 'Cannot write to log'
|
|
682
|
+
end
|
|
683
|
+
end
|
|
684
|
+
return data, status_code, headers
|
|
685
|
+
end
|
|
686
|
+
# Deactivate a key
|
|
687
|
+
# Deactivate a key (soft delete). Raises 404 if key not found.
|
|
688
|
+
#
|
|
689
|
+
# @param agent_id Unique agent identifier
|
|
690
|
+
# @param key_id Unique key identifier
|
|
691
|
+
# @param [Hash] opts the optional parameters
|
|
692
|
+
# @return [nil]
|
|
693
|
+
#
|
|
694
|
+
def deactivate_agent_key(agent_id, key_id, opts = {})
|
|
695
|
+
data, status_code, headers = deactivate_agent_key_with_http_info(agent_id, key_id, opts)
|
|
696
|
+
return data, status_code, headers
|
|
697
|
+
end
|
|
698
|
+
|
|
699
|
+
# Deactivate a key
|
|
700
|
+
# Deactivate a key (soft delete). Raises 404 if key not found.
|
|
701
|
+
# @param agent_id Unique agent identifier
|
|
702
|
+
# @param key_id Unique key identifier
|
|
703
|
+
# @param [Hash] opts the optional parameters
|
|
704
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
705
|
+
def deactivate_agent_key_with_http_info(agent_id, key_id, opts = {})
|
|
706
|
+
|
|
707
|
+
if @api_client.config.debugging
|
|
708
|
+
begin
|
|
709
|
+
raise
|
|
710
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.deactivate_agent_key ...'
|
|
711
|
+
rescue
|
|
712
|
+
puts 'Cannot write to log'
|
|
713
|
+
end
|
|
714
|
+
end
|
|
715
|
+
# verify the required parameter 'agent_id' is set
|
|
716
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
717
|
+
fail ArgumentError, "Missing the required parameter 'agent_id' when calling AgentCapabilitiesApi.deactivate_agent_key"
|
|
718
|
+
end
|
|
719
|
+
# verify the required parameter 'key_id' is set
|
|
720
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
721
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentCapabilitiesApi.deactivate_agent_key"
|
|
722
|
+
end
|
|
723
|
+
# resource path
|
|
724
|
+
local_var_path = 'icc/v1/agents/{agentId}/keys/{keyId}'.sub('{' + 'agentId' + '}', agent_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
|
|
725
|
+
|
|
726
|
+
# query parameters
|
|
727
|
+
query_params = {}
|
|
728
|
+
|
|
729
|
+
# header parameters
|
|
730
|
+
header_params = {}
|
|
731
|
+
# HTTP header 'Accept' (if needed)
|
|
732
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
733
|
+
# HTTP header 'Content-Type'
|
|
734
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
735
|
+
|
|
736
|
+
# form parameters
|
|
737
|
+
form_params = {}
|
|
738
|
+
|
|
739
|
+
# http body (model)
|
|
740
|
+
if 'DELETE' == 'POST'
|
|
741
|
+
post_body = '{}'
|
|
742
|
+
else
|
|
743
|
+
post_body = nil
|
|
744
|
+
end
|
|
745
|
+
inbound_mle_status = "mandatory"
|
|
746
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["deactivate_agent_key","deactivate_agent_key_with_http_info"])
|
|
747
|
+
begin
|
|
748
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
749
|
+
rescue
|
|
750
|
+
raise
|
|
751
|
+
end
|
|
752
|
+
end
|
|
753
|
+
|
|
754
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["deactivate_agent_key","deactivate_agent_key_with_http_info"])
|
|
755
|
+
|
|
756
|
+
auth_names = []
|
|
757
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
758
|
+
:header_params => header_params,
|
|
759
|
+
:query_params => query_params,
|
|
760
|
+
:form_params => form_params,
|
|
761
|
+
:body => post_body,
|
|
762
|
+
:auth_names => auth_names,
|
|
763
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
764
|
+
if @api_client.config.debugging
|
|
765
|
+
begin
|
|
766
|
+
raise
|
|
767
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#deactivate_agent_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
768
|
+
rescue
|
|
769
|
+
puts 'Cannot write to log'
|
|
770
|
+
end
|
|
771
|
+
end
|
|
772
|
+
return data, status_code, headers
|
|
773
|
+
end
|
|
774
|
+
# Enroll a card
|
|
775
|
+
# Enroll a payment card for agentic or e-commerce transactions. This is typically the first step in the Intelligent Commerce payment lifecycle — the agent calls this endpoint to register a consumer's card, creating a tokenized reference that can be used in subsequent purchase instructions and payment credential retrieval. Requires device information, consumer identity, billing details, and payment instrument references. Returns a status of ACTIVE (HTTP 200) if enrollment completes immediately, or PENDING (HTTP 202) with pendingEvents if cardholder authentication is required. Call this endpoint when a consumer wants to add a new payment card or when setting up a card for agentic payment flows.
|
|
776
|
+
#
|
|
777
|
+
# @param agentic_card_enrollment_request
|
|
778
|
+
# @param [Hash] opts the optional parameters
|
|
779
|
+
# @return [AgenticCardEnrollmentResponse200]
|
|
780
|
+
#
|
|
781
|
+
def enroll_card(agentic_card_enrollment_request, opts = {})
|
|
782
|
+
data, status_code, headers = enroll_card_with_http_info(agentic_card_enrollment_request, opts)
|
|
783
|
+
return data, status_code, headers
|
|
784
|
+
end
|
|
785
|
+
|
|
786
|
+
# Enroll a card
|
|
787
|
+
# Enroll a payment card for agentic or e-commerce transactions. This is typically the first step in the Intelligent Commerce payment lifecycle — the agent calls this endpoint to register a consumer's card, creating a tokenized reference that can be used in subsequent purchase instructions and payment credential retrieval. Requires device information, consumer identity, billing details, and payment instrument references. Returns a status of ACTIVE (HTTP 200) if enrollment completes immediately, or PENDING (HTTP 202) with pendingEvents if cardholder authentication is required. Call this endpoint when a consumer wants to add a new payment card or when setting up a card for agentic payment flows.
|
|
788
|
+
# @param agentic_card_enrollment_request
|
|
789
|
+
# @param [Hash] opts the optional parameters
|
|
790
|
+
# @return [Array<(AgenticCardEnrollmentResponse200, Fixnum, Hash)>] AgenticCardEnrollmentResponse200 data, response status code and response headers
|
|
791
|
+
def enroll_card_with_http_info(agentic_card_enrollment_request, opts = {})
|
|
792
|
+
|
|
793
|
+
if @api_client.config.debugging
|
|
794
|
+
begin
|
|
795
|
+
raise
|
|
796
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.enroll_card ...'
|
|
797
|
+
rescue
|
|
798
|
+
puts 'Cannot write to log'
|
|
799
|
+
end
|
|
800
|
+
end
|
|
801
|
+
# verify the required parameter 'agentic_card_enrollment_request' is set
|
|
802
|
+
if @api_client.config.client_side_validation && agentic_card_enrollment_request.nil?
|
|
803
|
+
fail ArgumentError, "Missing the required parameter 'agentic_card_enrollment_request' when calling AgentCapabilitiesApi.enroll_card"
|
|
804
|
+
end
|
|
805
|
+
# resource path
|
|
806
|
+
local_var_path = 'icc/v1/tokens'
|
|
807
|
+
|
|
808
|
+
# query parameters
|
|
809
|
+
query_params = {}
|
|
810
|
+
|
|
811
|
+
# header parameters
|
|
812
|
+
header_params = {}
|
|
813
|
+
# HTTP header 'Accept' (if needed)
|
|
814
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
815
|
+
# HTTP header 'Content-Type'
|
|
816
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
817
|
+
|
|
818
|
+
# form parameters
|
|
819
|
+
form_params = {}
|
|
820
|
+
|
|
821
|
+
# http body (model)
|
|
822
|
+
post_body = @api_client.object_to_http_body(agentic_card_enrollment_request)
|
|
823
|
+
sdk_tracker = SdkTracker.new
|
|
824
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticCardEnrollmentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
825
|
+
inbound_mle_status = "mandatory"
|
|
826
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["enroll_card","enroll_card_with_http_info"])
|
|
827
|
+
begin
|
|
828
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
829
|
+
rescue
|
|
830
|
+
raise
|
|
831
|
+
end
|
|
832
|
+
end
|
|
833
|
+
|
|
834
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["enroll_card","enroll_card_with_http_info"])
|
|
835
|
+
|
|
836
|
+
auth_names = []
|
|
837
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
838
|
+
:header_params => header_params,
|
|
839
|
+
:query_params => query_params,
|
|
840
|
+
:form_params => form_params,
|
|
841
|
+
:body => post_body,
|
|
842
|
+
:auth_names => auth_names,
|
|
843
|
+
:return_type => 'AgenticCardEnrollmentResponse200',
|
|
844
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
845
|
+
if @api_client.config.debugging
|
|
846
|
+
begin
|
|
847
|
+
raise
|
|
848
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#enroll_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
849
|
+
rescue
|
|
850
|
+
puts 'Cannot write to log'
|
|
851
|
+
end
|
|
852
|
+
end
|
|
853
|
+
return data, status_code, headers
|
|
854
|
+
end
|
|
855
|
+
# Get an agent
|
|
856
|
+
# [category 1 — Agent_Capabilities] Get agent by ID with all keys. Raises 404 if agent not found.
|
|
857
|
+
#
|
|
858
|
+
# @param agent_id Unique agent identifier
|
|
859
|
+
# @param [Hash] opts the optional parameters
|
|
860
|
+
# @return [AgentRegistrationResponse201]
|
|
861
|
+
#
|
|
862
|
+
def get_agent(agent_id, opts = {})
|
|
863
|
+
data, status_code, headers = get_agent_with_http_info(agent_id, opts)
|
|
864
|
+
return data, status_code, headers
|
|
865
|
+
end
|
|
866
|
+
|
|
867
|
+
# Get an agent
|
|
868
|
+
# [category 1 — Agent_Capabilities] Get agent by ID with all keys. Raises 404 if agent not found.
|
|
869
|
+
# @param agent_id Unique agent identifier
|
|
870
|
+
# @param [Hash] opts the optional parameters
|
|
871
|
+
# @return [Array<(AgentRegistrationResponse201, Fixnum, Hash)>] AgentRegistrationResponse201 data, response status code and response headers
|
|
872
|
+
def get_agent_with_http_info(agent_id, opts = {})
|
|
873
|
+
|
|
874
|
+
if @api_client.config.debugging
|
|
875
|
+
begin
|
|
876
|
+
raise
|
|
877
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.get_agent ...'
|
|
878
|
+
rescue
|
|
879
|
+
puts 'Cannot write to log'
|
|
880
|
+
end
|
|
881
|
+
end
|
|
882
|
+
# verify the required parameter 'agent_id' is set
|
|
883
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
884
|
+
fail ArgumentError, "Missing the required parameter 'agent_id' when calling AgentCapabilitiesApi.get_agent"
|
|
885
|
+
end
|
|
886
|
+
# resource path
|
|
887
|
+
local_var_path = 'icc/v1/agents/{agentId}'.sub('{' + 'agentId' + '}', agent_id.to_s)
|
|
888
|
+
|
|
889
|
+
# query parameters
|
|
890
|
+
query_params = {}
|
|
891
|
+
|
|
892
|
+
# header parameters
|
|
893
|
+
header_params = {}
|
|
894
|
+
# HTTP header 'Accept' (if needed)
|
|
895
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
896
|
+
# HTTP header 'Content-Type'
|
|
897
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
898
|
+
|
|
899
|
+
# form parameters
|
|
900
|
+
form_params = {}
|
|
901
|
+
|
|
902
|
+
# http body (model)
|
|
903
|
+
if 'GET' == 'POST'
|
|
904
|
+
post_body = '{}'
|
|
905
|
+
else
|
|
906
|
+
post_body = nil
|
|
907
|
+
end
|
|
908
|
+
inbound_mle_status = "false"
|
|
909
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_agent","get_agent_with_http_info"])
|
|
910
|
+
begin
|
|
911
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
912
|
+
rescue
|
|
913
|
+
raise
|
|
914
|
+
end
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_agent","get_agent_with_http_info"])
|
|
918
|
+
|
|
919
|
+
auth_names = []
|
|
920
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
921
|
+
:header_params => header_params,
|
|
922
|
+
:query_params => query_params,
|
|
923
|
+
:form_params => form_params,
|
|
924
|
+
:body => post_body,
|
|
925
|
+
:auth_names => auth_names,
|
|
926
|
+
:return_type => 'AgentRegistrationResponse201',
|
|
927
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
928
|
+
if @api_client.config.debugging
|
|
929
|
+
begin
|
|
930
|
+
raise
|
|
931
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#get_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
932
|
+
rescue
|
|
933
|
+
puts 'Cannot write to log'
|
|
934
|
+
end
|
|
935
|
+
end
|
|
936
|
+
return data, status_code, headers
|
|
937
|
+
end
|
|
938
|
+
# Get a key by agent and key ID
|
|
939
|
+
# Get a specific key by agent ID and key ID. Raises 404 if key not found.
|
|
940
|
+
#
|
|
941
|
+
# @param agent_id Unique agent identifier
|
|
942
|
+
# @param key_id Unique key identifier
|
|
943
|
+
# @param [Hash] opts the optional parameters
|
|
944
|
+
# @return [AddAgentKeyResponse201]
|
|
945
|
+
#
|
|
946
|
+
def get_agent_key(agent_id, key_id, opts = {})
|
|
947
|
+
data, status_code, headers = get_agent_key_with_http_info(agent_id, key_id, opts)
|
|
948
|
+
return data, status_code, headers
|
|
949
|
+
end
|
|
950
|
+
|
|
951
|
+
# Get a key by agent and key ID
|
|
952
|
+
# Get a specific key by agent ID and key ID. Raises 404 if key not found.
|
|
953
|
+
# @param agent_id Unique agent identifier
|
|
954
|
+
# @param key_id Unique key identifier
|
|
955
|
+
# @param [Hash] opts the optional parameters
|
|
956
|
+
# @return [Array<(AddAgentKeyResponse201, Fixnum, Hash)>] AddAgentKeyResponse201 data, response status code and response headers
|
|
957
|
+
def get_agent_key_with_http_info(agent_id, key_id, opts = {})
|
|
958
|
+
|
|
959
|
+
if @api_client.config.debugging
|
|
960
|
+
begin
|
|
961
|
+
raise
|
|
962
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.get_agent_key ...'
|
|
963
|
+
rescue
|
|
964
|
+
puts 'Cannot write to log'
|
|
965
|
+
end
|
|
966
|
+
end
|
|
967
|
+
# verify the required parameter 'agent_id' is set
|
|
968
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
969
|
+
fail ArgumentError, "Missing the required parameter 'agent_id' when calling AgentCapabilitiesApi.get_agent_key"
|
|
970
|
+
end
|
|
971
|
+
# verify the required parameter 'key_id' is set
|
|
972
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
973
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentCapabilitiesApi.get_agent_key"
|
|
974
|
+
end
|
|
975
|
+
# resource path
|
|
976
|
+
local_var_path = 'icc/v1/agents/{agentId}/keys/{keyId}'.sub('{' + 'agentId' + '}', agent_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
|
|
977
|
+
|
|
978
|
+
# query parameters
|
|
979
|
+
query_params = {}
|
|
980
|
+
|
|
981
|
+
# header parameters
|
|
982
|
+
header_params = {}
|
|
983
|
+
# HTTP header 'Accept' (if needed)
|
|
984
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
985
|
+
# HTTP header 'Content-Type'
|
|
986
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
987
|
+
|
|
988
|
+
# form parameters
|
|
989
|
+
form_params = {}
|
|
990
|
+
|
|
991
|
+
# http body (model)
|
|
992
|
+
if 'GET' == 'POST'
|
|
993
|
+
post_body = '{}'
|
|
994
|
+
else
|
|
995
|
+
post_body = nil
|
|
996
|
+
end
|
|
997
|
+
inbound_mle_status = "false"
|
|
998
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_agent_key","get_agent_key_with_http_info"])
|
|
999
|
+
begin
|
|
1000
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1001
|
+
rescue
|
|
1002
|
+
raise
|
|
1003
|
+
end
|
|
1004
|
+
end
|
|
1005
|
+
|
|
1006
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_agent_key","get_agent_key_with_http_info"])
|
|
1007
|
+
|
|
1008
|
+
auth_names = []
|
|
1009
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
1010
|
+
:header_params => header_params,
|
|
1011
|
+
:query_params => query_params,
|
|
1012
|
+
:form_params => form_params,
|
|
1013
|
+
:body => post_body,
|
|
1014
|
+
:auth_names => auth_names,
|
|
1015
|
+
:return_type => 'AddAgentKeyResponse201',
|
|
1016
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1017
|
+
if @api_client.config.debugging
|
|
1018
|
+
begin
|
|
1019
|
+
raise
|
|
1020
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#get_agent_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1021
|
+
rescue
|
|
1022
|
+
puts 'Cannot write to log'
|
|
1023
|
+
end
|
|
1024
|
+
end
|
|
1025
|
+
return data, status_code, headers
|
|
1026
|
+
end
|
|
1027
|
+
# Get Checkout Session ACP
|
|
1028
|
+
# Retrieves the current state of an ACP checkout session, including line items, buyer information, and current totals. Use this to: - Verify session status before presenting a checkout summary to the buyer - Resume an interrupted checkout flow - Poll for status after an async operation - Confirm a session has not expired before submitting payment
|
|
1029
|
+
#
|
|
1030
|
+
# @param session_id The unique identifier of the ACP checkout session to retrieve. Obtained from the `id` field in the Create Session response.
|
|
1031
|
+
# @param acp_get_checkout_session_request Empty request body.
|
|
1032
|
+
# @param [Hash] opts the optional parameters
|
|
1033
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
1034
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
1035
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
1036
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
1037
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
1038
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
1039
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
1040
|
+
# @return [InlineResponse20112]
|
|
1041
|
+
#
|
|
1042
|
+
def get_checkout_session(session_id, acp_get_checkout_session_request, opts = {})
|
|
1043
|
+
data, status_code, headers = get_checkout_session_with_http_info(session_id, acp_get_checkout_session_request, opts)
|
|
1044
|
+
return data, status_code, headers
|
|
1045
|
+
end
|
|
1046
|
+
|
|
1047
|
+
# Get Checkout Session ACP
|
|
1048
|
+
# Retrieves the current state of an ACP checkout session, including line items, buyer information, and current totals. Use this to: - Verify session status before presenting a checkout summary to the buyer - Resume an interrupted checkout flow - Poll for status after an async operation - Confirm a session has not expired before submitting payment
|
|
1049
|
+
# @param session_id The unique identifier of the ACP checkout session to retrieve. Obtained from the `id` field in the Create Session response.
|
|
1050
|
+
# @param acp_get_checkout_session_request Empty request body.
|
|
1051
|
+
# @param [Hash] opts the optional parameters
|
|
1052
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
1053
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
1054
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
1055
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
1056
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
1057
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
1058
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
1059
|
+
# @return [Array<(InlineResponse20112, Fixnum, Hash)>] InlineResponse20112 data, response status code and response headers
|
|
1060
|
+
def get_checkout_session_with_http_info(session_id, acp_get_checkout_session_request, opts = {})
|
|
1061
|
+
|
|
1062
|
+
if @api_client.config.debugging
|
|
1063
|
+
begin
|
|
1064
|
+
raise
|
|
1065
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.get_checkout_session ...'
|
|
1066
|
+
rescue
|
|
1067
|
+
puts 'Cannot write to log'
|
|
1068
|
+
end
|
|
1069
|
+
end
|
|
1070
|
+
# verify the required parameter 'session_id' is set
|
|
1071
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
1072
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling AgentCapabilitiesApi.get_checkout_session"
|
|
1073
|
+
end
|
|
1074
|
+
# verify the required parameter 'acp_get_checkout_session_request' is set
|
|
1075
|
+
if @api_client.config.client_side_validation && acp_get_checkout_session_request.nil?
|
|
1076
|
+
fail ArgumentError, "Missing the required parameter 'acp_get_checkout_session_request' when calling AgentCapabilitiesApi.get_checkout_session"
|
|
1077
|
+
end
|
|
1078
|
+
# resource path
|
|
1079
|
+
local_var_path = 'icc/v1/checkout_sessions/{session_id}'.sub('{' + 'session_id' + '}', session_id.to_s)
|
|
1080
|
+
|
|
1081
|
+
# query parameters
|
|
1082
|
+
query_params = {}
|
|
1083
|
+
|
|
1084
|
+
# header parameters
|
|
1085
|
+
header_params = {}
|
|
1086
|
+
# HTTP header 'Accept' (if needed)
|
|
1087
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1088
|
+
# HTTP header 'Content-Type'
|
|
1089
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1090
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1091
|
+
header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
|
|
1092
|
+
header_params[:'User-Agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil?
|
|
1093
|
+
header_params[:'Request-Id'] = opts[:'request_id'] if !opts[:'request_id'].nil?
|
|
1094
|
+
header_params[:'Signature'] = opts[:'signature'] if !opts[:'signature'].nil?
|
|
1095
|
+
header_params[:'Timestamp'] = opts[:'timestamp'] if !opts[:'timestamp'].nil?
|
|
1096
|
+
header_params[:'API-Version'] = opts[:'api_version'] if !opts[:'api_version'].nil?
|
|
1097
|
+
|
|
1098
|
+
# form parameters
|
|
1099
|
+
form_params = {}
|
|
1100
|
+
|
|
1101
|
+
# http body (model)
|
|
1102
|
+
post_body = @api_client.object_to_http_body(acp_get_checkout_session_request)
|
|
1103
|
+
sdk_tracker = SdkTracker.new
|
|
1104
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'Object', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
1105
|
+
inbound_mle_status = "false"
|
|
1106
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_checkout_session","get_checkout_session_with_http_info"])
|
|
1107
|
+
begin
|
|
1108
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1109
|
+
rescue
|
|
1110
|
+
raise
|
|
1111
|
+
end
|
|
1112
|
+
end
|
|
1113
|
+
|
|
1114
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_checkout_session","get_checkout_session_with_http_info"])
|
|
1115
|
+
|
|
1116
|
+
auth_names = []
|
|
1117
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
1118
|
+
:header_params => header_params,
|
|
1119
|
+
:query_params => query_params,
|
|
1120
|
+
:form_params => form_params,
|
|
1121
|
+
:body => post_body,
|
|
1122
|
+
:auth_names => auth_names,
|
|
1123
|
+
:return_type => 'InlineResponse20112',
|
|
1124
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1125
|
+
if @api_client.config.debugging
|
|
1126
|
+
begin
|
|
1127
|
+
raise
|
|
1128
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#get_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1129
|
+
rescue
|
|
1130
|
+
puts 'Cannot write to log'
|
|
1131
|
+
end
|
|
1132
|
+
end
|
|
1133
|
+
return data, status_code, headers
|
|
1134
|
+
end
|
|
1135
|
+
# Initiate a purchase intent
|
|
1136
|
+
# Create a new purchase intent (instruction) for an agentic transaction. The agent calls this endpoint after a card has been enrolled to define what the consumer wants to buy. The request includes payment instrument references, device and assurance data, mandates (spending limits, merchant preferences, and product descriptions), and optional buyer information. Return an instructionId (HTTP 200) if the intent is created immediately, or PENDING (HTTP 202) with pendingEvents if cardholder authentication is required. The instructionId returned is used in all subsequent operations - update, cancel, retrieve credentials, and confirm transaction.
|
|
1137
|
+
#
|
|
1138
|
+
# @param agentic_create_purchase_intent_request
|
|
1139
|
+
# @param [Hash] opts the optional parameters
|
|
1140
|
+
# @return [AgenticCreatePurchaseIntentResponse200]
|
|
1141
|
+
#
|
|
1142
|
+
def initiate_purchase_intent(agentic_create_purchase_intent_request, opts = {})
|
|
1143
|
+
data, status_code, headers = initiate_purchase_intent_with_http_info(agentic_create_purchase_intent_request, opts)
|
|
1144
|
+
return data, status_code, headers
|
|
1145
|
+
end
|
|
1146
|
+
|
|
1147
|
+
# Initiate a purchase intent
|
|
1148
|
+
# Create a new purchase intent (instruction) for an agentic transaction. The agent calls this endpoint after a card has been enrolled to define what the consumer wants to buy. The request includes payment instrument references, device and assurance data, mandates (spending limits, merchant preferences, and product descriptions), and optional buyer information. Return an instructionId (HTTP 200) if the intent is created immediately, or PENDING (HTTP 202) with pendingEvents if cardholder authentication is required. The instructionId returned is used in all subsequent operations - update, cancel, retrieve credentials, and confirm transaction.
|
|
1149
|
+
# @param agentic_create_purchase_intent_request
|
|
1150
|
+
# @param [Hash] opts the optional parameters
|
|
1151
|
+
# @return [Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>] AgenticCreatePurchaseIntentResponse200 data, response status code and response headers
|
|
1152
|
+
def initiate_purchase_intent_with_http_info(agentic_create_purchase_intent_request, opts = {})
|
|
1153
|
+
|
|
1154
|
+
if @api_client.config.debugging
|
|
1155
|
+
begin
|
|
1156
|
+
raise
|
|
1157
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.initiate_purchase_intent ...'
|
|
1158
|
+
rescue
|
|
1159
|
+
puts 'Cannot write to log'
|
|
1160
|
+
end
|
|
1161
|
+
end
|
|
1162
|
+
# verify the required parameter 'agentic_create_purchase_intent_request' is set
|
|
1163
|
+
if @api_client.config.client_side_validation && agentic_create_purchase_intent_request.nil?
|
|
1164
|
+
fail ArgumentError, "Missing the required parameter 'agentic_create_purchase_intent_request' when calling AgentCapabilitiesApi.initiate_purchase_intent"
|
|
1165
|
+
end
|
|
1166
|
+
# resource path
|
|
1167
|
+
local_var_path = 'icc/v1/instructions'
|
|
1168
|
+
|
|
1169
|
+
# query parameters
|
|
1170
|
+
query_params = {}
|
|
1171
|
+
|
|
1172
|
+
# header parameters
|
|
1173
|
+
header_params = {}
|
|
1174
|
+
# HTTP header 'Accept' (if needed)
|
|
1175
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1176
|
+
# HTTP header 'Content-Type'
|
|
1177
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1178
|
+
|
|
1179
|
+
# form parameters
|
|
1180
|
+
form_params = {}
|
|
1181
|
+
|
|
1182
|
+
# http body (model)
|
|
1183
|
+
post_body = @api_client.object_to_http_body(agentic_create_purchase_intent_request)
|
|
1184
|
+
sdk_tracker = SdkTracker.new
|
|
1185
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticCreatePurchaseIntentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
1186
|
+
inbound_mle_status = "mandatory"
|
|
1187
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["initiate_purchase_intent","initiate_purchase_intent_with_http_info"])
|
|
1188
|
+
begin
|
|
1189
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1190
|
+
rescue
|
|
1191
|
+
raise
|
|
1192
|
+
end
|
|
1193
|
+
end
|
|
1194
|
+
|
|
1195
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["initiate_purchase_intent","initiate_purchase_intent_with_http_info"])
|
|
1196
|
+
|
|
1197
|
+
auth_names = []
|
|
1198
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1199
|
+
:header_params => header_params,
|
|
1200
|
+
:query_params => query_params,
|
|
1201
|
+
:form_params => form_params,
|
|
1202
|
+
:body => post_body,
|
|
1203
|
+
:auth_names => auth_names,
|
|
1204
|
+
:return_type => 'AgenticCreatePurchaseIntentResponse200',
|
|
1205
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1206
|
+
if @api_client.config.debugging
|
|
1207
|
+
begin
|
|
1208
|
+
raise
|
|
1209
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#initiate_purchase_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1210
|
+
rescue
|
|
1211
|
+
puts 'Cannot write to log'
|
|
1212
|
+
end
|
|
1213
|
+
end
|
|
1214
|
+
return data, status_code, headers
|
|
1215
|
+
end
|
|
1216
|
+
# List keys for an agent
|
|
1217
|
+
# [category 1 — Agent_Capabilities] List all keys for a specific agent with pagination.
|
|
1218
|
+
#
|
|
1219
|
+
# @param agent_id Unique agent identifier
|
|
1220
|
+
# @param [Hash] opts the optional parameters
|
|
1221
|
+
# @option opts [Integer] :page Page number (1-indexed) (default to 1)
|
|
1222
|
+
# @option opts [Integer] :page_size Items per page (max 100) (default to 30)
|
|
1223
|
+
# @return [ListAgentKeysResponse200]
|
|
1224
|
+
#
|
|
1225
|
+
def list_agent_keys(agent_id, opts = {})
|
|
1226
|
+
data, status_code, headers = list_agent_keys_with_http_info(agent_id, opts)
|
|
1227
|
+
return data, status_code, headers
|
|
1228
|
+
end
|
|
1229
|
+
|
|
1230
|
+
# List keys for an agent
|
|
1231
|
+
# [category 1 — Agent_Capabilities] List all keys for a specific agent with pagination.
|
|
1232
|
+
# @param agent_id Unique agent identifier
|
|
1233
|
+
# @param [Hash] opts the optional parameters
|
|
1234
|
+
# @option opts [Integer] :page Page number (1-indexed)
|
|
1235
|
+
# @option opts [Integer] :page_size Items per page (max 100)
|
|
1236
|
+
# @return [Array<(ListAgentKeysResponse200, Fixnum, Hash)>] ListAgentKeysResponse200 data, response status code and response headers
|
|
1237
|
+
def list_agent_keys_with_http_info(agent_id, opts = {})
|
|
1238
|
+
|
|
1239
|
+
if @api_client.config.debugging
|
|
1240
|
+
begin
|
|
1241
|
+
raise
|
|
1242
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.list_agent_keys ...'
|
|
1243
|
+
rescue
|
|
1244
|
+
puts 'Cannot write to log'
|
|
1245
|
+
end
|
|
1246
|
+
end
|
|
1247
|
+
# verify the required parameter 'agent_id' is set
|
|
1248
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
1249
|
+
fail ArgumentError, "Missing the required parameter 'agent_id' when calling AgentCapabilitiesApi.list_agent_keys"
|
|
1250
|
+
end
|
|
1251
|
+
# resource path
|
|
1252
|
+
local_var_path = 'icc/v1/agents/{agentId}/keys'.sub('{' + 'agentId' + '}', agent_id.to_s)
|
|
1253
|
+
|
|
1254
|
+
# query parameters
|
|
1255
|
+
query_params = {}
|
|
1256
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1257
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
1258
|
+
|
|
1259
|
+
# header parameters
|
|
1260
|
+
header_params = {}
|
|
1261
|
+
# HTTP header 'Accept' (if needed)
|
|
1262
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1263
|
+
# HTTP header 'Content-Type'
|
|
1264
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1265
|
+
|
|
1266
|
+
# form parameters
|
|
1267
|
+
form_params = {}
|
|
1268
|
+
|
|
1269
|
+
# http body (model)
|
|
1270
|
+
if 'GET' == 'POST'
|
|
1271
|
+
post_body = '{}'
|
|
1272
|
+
else
|
|
1273
|
+
post_body = nil
|
|
1274
|
+
end
|
|
1275
|
+
inbound_mle_status = "false"
|
|
1276
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["list_agent_keys","list_agent_keys_with_http_info"])
|
|
1277
|
+
begin
|
|
1278
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1279
|
+
rescue
|
|
1280
|
+
raise
|
|
1281
|
+
end
|
|
1282
|
+
end
|
|
1283
|
+
|
|
1284
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["list_agent_keys","list_agent_keys_with_http_info"])
|
|
1285
|
+
|
|
1286
|
+
auth_names = []
|
|
1287
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
1288
|
+
:header_params => header_params,
|
|
1289
|
+
:query_params => query_params,
|
|
1290
|
+
:form_params => form_params,
|
|
1291
|
+
:body => post_body,
|
|
1292
|
+
:auth_names => auth_names,
|
|
1293
|
+
:return_type => 'ListAgentKeysResponse200',
|
|
1294
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1295
|
+
if @api_client.config.debugging
|
|
1296
|
+
begin
|
|
1297
|
+
raise
|
|
1298
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#list_agent_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1299
|
+
rescue
|
|
1300
|
+
puts 'Cannot write to log'
|
|
1301
|
+
end
|
|
1302
|
+
end
|
|
1303
|
+
return data, status_code, headers
|
|
1304
|
+
end
|
|
1305
|
+
# Register an agent
|
|
1306
|
+
# Register a new AI agent in the VARS. Once registered, the agent can upload public keys that merchants and Visa services use to verify request signatures. Raises 409 if domain, contactEmail, or tokenRequestorId already exists.
|
|
1307
|
+
#
|
|
1308
|
+
# @param agent_request Agent registration request
|
|
1309
|
+
# @param [Hash] opts the optional parameters
|
|
1310
|
+
# @return [AgentRegistrationResponse201]
|
|
1311
|
+
#
|
|
1312
|
+
def register_agent(agent_request, opts = {})
|
|
1313
|
+
data, status_code, headers = register_agent_with_http_info(agent_request, opts)
|
|
1314
|
+
return data, status_code, headers
|
|
1315
|
+
end
|
|
1316
|
+
|
|
1317
|
+
# Register an agent
|
|
1318
|
+
# Register a new AI agent in the VARS. Once registered, the agent can upload public keys that merchants and Visa services use to verify request signatures. Raises 409 if domain, contactEmail, or tokenRequestorId already exists.
|
|
1319
|
+
# @param agent_request Agent registration request
|
|
1320
|
+
# @param [Hash] opts the optional parameters
|
|
1321
|
+
# @return [Array<(AgentRegistrationResponse201, Fixnum, Hash)>] AgentRegistrationResponse201 data, response status code and response headers
|
|
1322
|
+
def register_agent_with_http_info(agent_request, opts = {})
|
|
1323
|
+
|
|
1324
|
+
if @api_client.config.debugging
|
|
1325
|
+
begin
|
|
1326
|
+
raise
|
|
1327
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.register_agent ...'
|
|
1328
|
+
rescue
|
|
1329
|
+
puts 'Cannot write to log'
|
|
1330
|
+
end
|
|
1331
|
+
end
|
|
1332
|
+
# verify the required parameter 'agent_request' is set
|
|
1333
|
+
if @api_client.config.client_side_validation && agent_request.nil?
|
|
1334
|
+
fail ArgumentError, "Missing the required parameter 'agent_request' when calling AgentCapabilitiesApi.register_agent"
|
|
1335
|
+
end
|
|
1336
|
+
# resource path
|
|
1337
|
+
local_var_path = 'icc/v1/agents'
|
|
1338
|
+
|
|
1339
|
+
# query parameters
|
|
1340
|
+
query_params = {}
|
|
1341
|
+
|
|
1342
|
+
# header parameters
|
|
1343
|
+
header_params = {}
|
|
1344
|
+
# HTTP header 'Accept' (if needed)
|
|
1345
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1346
|
+
# HTTP header 'Content-Type'
|
|
1347
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1348
|
+
|
|
1349
|
+
# form parameters
|
|
1350
|
+
form_params = {}
|
|
1351
|
+
|
|
1352
|
+
# http body (model)
|
|
1353
|
+
post_body = @api_client.object_to_http_body(agent_request)
|
|
1354
|
+
sdk_tracker = SdkTracker.new
|
|
1355
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
1356
|
+
inbound_mle_status = "mandatory"
|
|
1357
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["register_agent","register_agent_with_http_info"])
|
|
1358
|
+
begin
|
|
1359
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1360
|
+
rescue
|
|
1361
|
+
raise
|
|
1362
|
+
end
|
|
1363
|
+
end
|
|
1364
|
+
|
|
1365
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["register_agent","register_agent_with_http_info"])
|
|
1366
|
+
|
|
1367
|
+
auth_names = []
|
|
1368
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1369
|
+
:header_params => header_params,
|
|
1370
|
+
:query_params => query_params,
|
|
1371
|
+
:form_params => form_params,
|
|
1372
|
+
:body => post_body,
|
|
1373
|
+
:auth_names => auth_names,
|
|
1374
|
+
:return_type => 'AgentRegistrationResponse201',
|
|
1375
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1376
|
+
if @api_client.config.debugging
|
|
1377
|
+
begin
|
|
1378
|
+
raise
|
|
1379
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#register_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1380
|
+
rescue
|
|
1381
|
+
puts 'Cannot write to log'
|
|
1382
|
+
end
|
|
1383
|
+
end
|
|
1384
|
+
return data, status_code, headers
|
|
1385
|
+
end
|
|
1386
|
+
# Retrieve payment credentials
|
|
1387
|
+
# Retrieve tokenized payment credentials for a purchase intent to complete the transaction at a merchant. The agent calls this endpoint after a purchase intent has been created and approved, providing transaction-level details including order information, merchant details, payment options, and production information. Returns COMPLETED (HTTP 200) with a signed payload containing encrypted payment credentials (authorization token and JWS-signed payload), or PENDING (HTTP 202) with pendingEvents if additional cardholder authentication is required. The signed payload is used by the merchant's payment processor to complete the transaction.
|
|
1388
|
+
#
|
|
1389
|
+
# @param instruction_id Unique identifier for the purchase intent instruction.
|
|
1390
|
+
# @param agentic_retrieve_payment_credentials_request
|
|
1391
|
+
# @param [Hash] opts the optional parameters
|
|
1392
|
+
# @return [AgenticRetrievePaymentCredentialsResponse200]
|
|
1393
|
+
#
|
|
1394
|
+
def retrieve_payment_credentials(instruction_id, agentic_retrieve_payment_credentials_request, opts = {})
|
|
1395
|
+
data, status_code, headers = retrieve_payment_credentials_with_http_info(instruction_id, agentic_retrieve_payment_credentials_request, opts)
|
|
1396
|
+
return data, status_code, headers
|
|
1397
|
+
end
|
|
1398
|
+
|
|
1399
|
+
# Retrieve payment credentials
|
|
1400
|
+
# Retrieve tokenized payment credentials for a purchase intent to complete the transaction at a merchant. The agent calls this endpoint after a purchase intent has been created and approved, providing transaction-level details including order information, merchant details, payment options, and production information. Returns COMPLETED (HTTP 200) with a signed payload containing encrypted payment credentials (authorization token and JWS-signed payload), or PENDING (HTTP 202) with pendingEvents if additional cardholder authentication is required. The signed payload is used by the merchant's payment processor to complete the transaction.
|
|
1401
|
+
# @param instruction_id Unique identifier for the purchase intent instruction.
|
|
1402
|
+
# @param agentic_retrieve_payment_credentials_request
|
|
1403
|
+
# @param [Hash] opts the optional parameters
|
|
1404
|
+
# @return [Array<(AgenticRetrievePaymentCredentialsResponse200, Fixnum, Hash)>] AgenticRetrievePaymentCredentialsResponse200 data, response status code and response headers
|
|
1405
|
+
def retrieve_payment_credentials_with_http_info(instruction_id, agentic_retrieve_payment_credentials_request, opts = {})
|
|
1406
|
+
|
|
1407
|
+
if @api_client.config.debugging
|
|
1408
|
+
begin
|
|
1409
|
+
raise
|
|
1410
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.retrieve_payment_credentials ...'
|
|
1411
|
+
rescue
|
|
1412
|
+
puts 'Cannot write to log'
|
|
1413
|
+
end
|
|
1414
|
+
end
|
|
1415
|
+
# verify the required parameter 'instruction_id' is set
|
|
1416
|
+
if @api_client.config.client_side_validation && instruction_id.nil?
|
|
1417
|
+
fail ArgumentError, "Missing the required parameter 'instruction_id' when calling AgentCapabilitiesApi.retrieve_payment_credentials"
|
|
1418
|
+
end
|
|
1419
|
+
# verify the required parameter 'agentic_retrieve_payment_credentials_request' is set
|
|
1420
|
+
if @api_client.config.client_side_validation && agentic_retrieve_payment_credentials_request.nil?
|
|
1421
|
+
fail ArgumentError, "Missing the required parameter 'agentic_retrieve_payment_credentials_request' when calling AgentCapabilitiesApi.retrieve_payment_credentials"
|
|
1422
|
+
end
|
|
1423
|
+
# resource path
|
|
1424
|
+
local_var_path = 'icc/v1/instructions/{instructionId}/credentials'.sub('{' + 'instructionId' + '}', instruction_id.to_s)
|
|
1425
|
+
|
|
1426
|
+
# query parameters
|
|
1427
|
+
query_params = {}
|
|
1428
|
+
|
|
1429
|
+
# header parameters
|
|
1430
|
+
header_params = {}
|
|
1431
|
+
# HTTP header 'Accept' (if needed)
|
|
1432
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1433
|
+
# HTTP header 'Content-Type'
|
|
1434
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1435
|
+
|
|
1436
|
+
# form parameters
|
|
1437
|
+
form_params = {}
|
|
1438
|
+
|
|
1439
|
+
# http body (model)
|
|
1440
|
+
post_body = @api_client.object_to_http_body(agentic_retrieve_payment_credentials_request)
|
|
1441
|
+
sdk_tracker = SdkTracker.new
|
|
1442
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticRetrievePaymentCredentialsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
1443
|
+
inbound_mle_status = "mandatory"
|
|
1444
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["retrieve_payment_credentials","retrieve_payment_credentials_with_http_info"])
|
|
1445
|
+
begin
|
|
1446
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1447
|
+
rescue
|
|
1448
|
+
raise
|
|
1449
|
+
end
|
|
1450
|
+
end
|
|
1451
|
+
|
|
1452
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["retrieve_payment_credentials","retrieve_payment_credentials_with_http_info"])
|
|
1453
|
+
|
|
1454
|
+
auth_names = []
|
|
1455
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1456
|
+
:header_params => header_params,
|
|
1457
|
+
:query_params => query_params,
|
|
1458
|
+
:form_params => form_params,
|
|
1459
|
+
:body => post_body,
|
|
1460
|
+
:auth_names => auth_names,
|
|
1461
|
+
:return_type => 'AgenticRetrievePaymentCredentialsResponse200',
|
|
1462
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1463
|
+
if @api_client.config.debugging
|
|
1464
|
+
begin
|
|
1465
|
+
raise
|
|
1466
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#retrieve_payment_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1467
|
+
rescue
|
|
1468
|
+
puts 'Cannot write to log'
|
|
1469
|
+
end
|
|
1470
|
+
end
|
|
1471
|
+
return data, status_code, headers
|
|
1472
|
+
end
|
|
1473
|
+
# Cancel Checkout UCP
|
|
1474
|
+
# Cancels an active UCP checkout session. No charge is made. This operation is idempotent — cancelling an already-cancelled session returns a successful response. Sessions also expire automatically after 30 minutes of inactivity.
|
|
1475
|
+
#
|
|
1476
|
+
# @param session_id The unique identifier of the UCP checkout session to cancel.
|
|
1477
|
+
# @param [Hash] opts the optional parameters
|
|
1478
|
+
# @return [InlineResponse20113]
|
|
1479
|
+
#
|
|
1480
|
+
def ucp_cancel_checkout(session_id, opts = {})
|
|
1481
|
+
data, status_code, headers = ucp_cancel_checkout_with_http_info(session_id, opts)
|
|
1482
|
+
return data, status_code, headers
|
|
1483
|
+
end
|
|
1484
|
+
|
|
1485
|
+
# Cancel Checkout UCP
|
|
1486
|
+
# Cancels an active UCP checkout session. No charge is made. This operation is idempotent — cancelling an already-cancelled session returns a successful response. Sessions also expire automatically after 30 minutes of inactivity.
|
|
1487
|
+
# @param session_id The unique identifier of the UCP checkout session to cancel.
|
|
1488
|
+
# @param [Hash] opts the optional parameters
|
|
1489
|
+
# @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
|
|
1490
|
+
def ucp_cancel_checkout_with_http_info(session_id, opts = {})
|
|
1491
|
+
|
|
1492
|
+
if @api_client.config.debugging
|
|
1493
|
+
begin
|
|
1494
|
+
raise
|
|
1495
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.ucp_cancel_checkout ...'
|
|
1496
|
+
rescue
|
|
1497
|
+
puts 'Cannot write to log'
|
|
1498
|
+
end
|
|
1499
|
+
end
|
|
1500
|
+
# verify the required parameter 'session_id' is set
|
|
1501
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
1502
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling AgentCapabilitiesApi.ucp_cancel_checkout"
|
|
1503
|
+
end
|
|
1504
|
+
# resource path
|
|
1505
|
+
local_var_path = 'icc/v1/checkout-sessions/{session_id}/cancel'.sub('{' + 'session_id' + '}', session_id.to_s)
|
|
1506
|
+
|
|
1507
|
+
# query parameters
|
|
1508
|
+
query_params = {}
|
|
1509
|
+
|
|
1510
|
+
# header parameters
|
|
1511
|
+
header_params = {}
|
|
1512
|
+
# HTTP header 'Accept' (if needed)
|
|
1513
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1514
|
+
# HTTP header 'Content-Type'
|
|
1515
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1516
|
+
|
|
1517
|
+
# form parameters
|
|
1518
|
+
form_params = {}
|
|
1519
|
+
|
|
1520
|
+
# http body (model)
|
|
1521
|
+
if 'POST' == 'POST'
|
|
1522
|
+
post_body = '{}'
|
|
1523
|
+
else
|
|
1524
|
+
post_body = nil
|
|
1525
|
+
end
|
|
1526
|
+
inbound_mle_status = "mandatory"
|
|
1527
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_cancel_checkout","ucp_cancel_checkout_with_http_info"])
|
|
1528
|
+
begin
|
|
1529
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1530
|
+
rescue
|
|
1531
|
+
raise
|
|
1532
|
+
end
|
|
1533
|
+
end
|
|
1534
|
+
|
|
1535
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_cancel_checkout","ucp_cancel_checkout_with_http_info"])
|
|
1536
|
+
|
|
1537
|
+
auth_names = []
|
|
1538
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1539
|
+
:header_params => header_params,
|
|
1540
|
+
:query_params => query_params,
|
|
1541
|
+
:form_params => form_params,
|
|
1542
|
+
:body => post_body,
|
|
1543
|
+
:auth_names => auth_names,
|
|
1544
|
+
:return_type => 'InlineResponse20113',
|
|
1545
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1546
|
+
if @api_client.config.debugging
|
|
1547
|
+
begin
|
|
1548
|
+
raise
|
|
1549
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#ucp_cancel_checkout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1550
|
+
rescue
|
|
1551
|
+
puts 'Cannot write to log'
|
|
1552
|
+
end
|
|
1553
|
+
end
|
|
1554
|
+
return data, status_code, headers
|
|
1555
|
+
end
|
|
1556
|
+
# Complete Checkout UCP
|
|
1557
|
+
# **Final step of the UCP checkout flow.** Finalizes the session and places the order with the merchant. ACG translates the UCP completion request to the merchant's checkout API. On success, the session transitions to `completed`. An `order_id` is not returned in the UCP response — use the ACP Complete endpoint if you need order confirmation details. **Always use an `idempotency-key`** to prevent duplicate orders on network retries.
|
|
1558
|
+
#
|
|
1559
|
+
# @param session_id The unique identifier of the UCP checkout session to complete.
|
|
1560
|
+
# @param [Hash] opts the optional parameters
|
|
1561
|
+
# @option opts [String] :idempotency_key **Strongly recommended.** A unique key that ensures this order is placed exactly once on retries. Lowercase per UCP spec.
|
|
1562
|
+
# @option opts [UcpCompleteCheckoutRequest] :ucp_complete_checkout_request UCP completion payload containing payment instrument and optional risk signals. If payment context was already provided in the Create or Update call, the body can be omitted. Risk signals are logged for fraud analysis and are not forwarded to the merchant.
|
|
1563
|
+
# @return [InlineResponse20113]
|
|
1564
|
+
#
|
|
1565
|
+
def ucp_complete_checkout(session_id, opts = {})
|
|
1566
|
+
data, status_code, headers = ucp_complete_checkout_with_http_info(session_id, opts)
|
|
1567
|
+
return data, status_code, headers
|
|
1568
|
+
end
|
|
1569
|
+
|
|
1570
|
+
# Complete Checkout UCP
|
|
1571
|
+
# **Final step of the UCP checkout flow.** Finalizes the session and places the order with the merchant. ACG translates the UCP completion request to the merchant's checkout API. On success, the session transitions to `completed`. An `order_id` is not returned in the UCP response — use the ACP Complete endpoint if you need order confirmation details. **Always use an `idempotency-key`** to prevent duplicate orders on network retries.
|
|
1572
|
+
# @param session_id The unique identifier of the UCP checkout session to complete.
|
|
1573
|
+
# @param [Hash] opts the optional parameters
|
|
1574
|
+
# @option opts [String] :idempotency_key **Strongly recommended.** A unique key that ensures this order is placed exactly once on retries. Lowercase per UCP spec.
|
|
1575
|
+
# @option opts [UcpCompleteCheckoutRequest] :ucp_complete_checkout_request UCP completion payload containing payment instrument and optional risk signals. If payment context was already provided in the Create or Update call, the body can be omitted. Risk signals are logged for fraud analysis and are not forwarded to the merchant.
|
|
1576
|
+
# @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
|
|
1577
|
+
def ucp_complete_checkout_with_http_info(session_id, opts = {})
|
|
1578
|
+
|
|
1579
|
+
if @api_client.config.debugging
|
|
1580
|
+
begin
|
|
1581
|
+
raise
|
|
1582
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.ucp_complete_checkout ...'
|
|
1583
|
+
rescue
|
|
1584
|
+
puts 'Cannot write to log'
|
|
1585
|
+
end
|
|
1586
|
+
end
|
|
1587
|
+
# verify the required parameter 'session_id' is set
|
|
1588
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
1589
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling AgentCapabilitiesApi.ucp_complete_checkout"
|
|
1590
|
+
end
|
|
1591
|
+
# resource path
|
|
1592
|
+
local_var_path = 'icc/v1/checkout-sessions/{session_id}/complete'.sub('{' + 'session_id' + '}', session_id.to_s)
|
|
1593
|
+
|
|
1594
|
+
# query parameters
|
|
1595
|
+
query_params = {}
|
|
1596
|
+
|
|
1597
|
+
# header parameters
|
|
1598
|
+
header_params = {}
|
|
1599
|
+
# HTTP header 'Accept' (if needed)
|
|
1600
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1601
|
+
# HTTP header 'Content-Type'
|
|
1602
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1603
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1604
|
+
|
|
1605
|
+
# form parameters
|
|
1606
|
+
form_params = {}
|
|
1607
|
+
|
|
1608
|
+
# http body (model)
|
|
1609
|
+
post_body = @api_client.object_to_http_body(opts[:'ucp_complete_checkout_request'])
|
|
1610
|
+
sdk_tracker = SdkTracker.new
|
|
1611
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UcpCompleteCheckoutRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
1612
|
+
inbound_mle_status = "mandatory"
|
|
1613
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_complete_checkout","ucp_complete_checkout_with_http_info"])
|
|
1614
|
+
begin
|
|
1615
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1616
|
+
rescue
|
|
1617
|
+
raise
|
|
1618
|
+
end
|
|
1619
|
+
end
|
|
1620
|
+
|
|
1621
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_complete_checkout","ucp_complete_checkout_with_http_info"])
|
|
1622
|
+
|
|
1623
|
+
auth_names = []
|
|
1624
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1625
|
+
:header_params => header_params,
|
|
1626
|
+
:query_params => query_params,
|
|
1627
|
+
:form_params => form_params,
|
|
1628
|
+
:body => post_body,
|
|
1629
|
+
:auth_names => auth_names,
|
|
1630
|
+
:return_type => 'InlineResponse20113',
|
|
1631
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1632
|
+
if @api_client.config.debugging
|
|
1633
|
+
begin
|
|
1634
|
+
raise
|
|
1635
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#ucp_complete_checkout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1636
|
+
rescue
|
|
1637
|
+
puts 'Cannot write to log'
|
|
1638
|
+
end
|
|
1639
|
+
end
|
|
1640
|
+
return data, status_code, headers
|
|
1641
|
+
end
|
|
1642
|
+
# Create Checkout Session UCP
|
|
1643
|
+
# **Step 1 of the UCP checkout flow.** Creates a new UCP checkout session using Google's Universal Commerce Protocol format. ACG translates the UCP request into the internal ACP format, applies merchant pricing, and returns a UCP-format session response with a session `id`. UCP uses `line_items` (instead of `items`) and lowercase header names (`idempotency-key`) per the UCP specification. **Store the `id`** from the response — it is required for all subsequent UCP calls.
|
|
1644
|
+
#
|
|
1645
|
+
# @param ucp_create_checkout_session_request UCP checkout session creation payload containing line items, buyer details, currency, and optional payment, fulfillment, and discount information.
|
|
1646
|
+
# @param [Hash] opts the optional parameters
|
|
1647
|
+
# @option opts [String] :idempotency_key Client-generated unique key (UUID recommended) to ensure this request is processed exactly once. Lowercase per UCP specification.
|
|
1648
|
+
# @return [InlineResponse20113]
|
|
1649
|
+
#
|
|
1650
|
+
def ucp_create_checkout_session(ucp_create_checkout_session_request, opts = {})
|
|
1651
|
+
data, status_code, headers = ucp_create_checkout_session_with_http_info(ucp_create_checkout_session_request, opts)
|
|
1652
|
+
return data, status_code, headers
|
|
1653
|
+
end
|
|
1654
|
+
|
|
1655
|
+
# Create Checkout Session UCP
|
|
1656
|
+
# **Step 1 of the UCP checkout flow.** Creates a new UCP checkout session using Google's Universal Commerce Protocol format. ACG translates the UCP request into the internal ACP format, applies merchant pricing, and returns a UCP-format session response with a session `id`. UCP uses `line_items` (instead of `items`) and lowercase header names (`idempotency-key`) per the UCP specification. **Store the `id`** from the response — it is required for all subsequent UCP calls.
|
|
1657
|
+
# @param ucp_create_checkout_session_request UCP checkout session creation payload containing line items, buyer details, currency, and optional payment, fulfillment, and discount information.
|
|
1658
|
+
# @param [Hash] opts the optional parameters
|
|
1659
|
+
# @option opts [String] :idempotency_key Client-generated unique key (UUID recommended) to ensure this request is processed exactly once. Lowercase per UCP specification.
|
|
1660
|
+
# @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
|
|
1661
|
+
def ucp_create_checkout_session_with_http_info(ucp_create_checkout_session_request, opts = {})
|
|
1662
|
+
|
|
1663
|
+
if @api_client.config.debugging
|
|
1664
|
+
begin
|
|
1665
|
+
raise
|
|
1666
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.ucp_create_checkout_session ...'
|
|
1667
|
+
rescue
|
|
1668
|
+
puts 'Cannot write to log'
|
|
1669
|
+
end
|
|
1670
|
+
end
|
|
1671
|
+
# verify the required parameter 'ucp_create_checkout_session_request' is set
|
|
1672
|
+
if @api_client.config.client_side_validation && ucp_create_checkout_session_request.nil?
|
|
1673
|
+
fail ArgumentError, "Missing the required parameter 'ucp_create_checkout_session_request' when calling AgentCapabilitiesApi.ucp_create_checkout_session"
|
|
1674
|
+
end
|
|
1675
|
+
# resource path
|
|
1676
|
+
local_var_path = 'icc/v1/checkout-sessions'
|
|
1677
|
+
|
|
1678
|
+
# query parameters
|
|
1679
|
+
query_params = {}
|
|
1680
|
+
|
|
1681
|
+
# header parameters
|
|
1682
|
+
header_params = {}
|
|
1683
|
+
# HTTP header 'Accept' (if needed)
|
|
1684
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1685
|
+
# HTTP header 'Content-Type'
|
|
1686
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1687
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1688
|
+
|
|
1689
|
+
# form parameters
|
|
1690
|
+
form_params = {}
|
|
1691
|
+
|
|
1692
|
+
# http body (model)
|
|
1693
|
+
post_body = @api_client.object_to_http_body(ucp_create_checkout_session_request)
|
|
1694
|
+
sdk_tracker = SdkTracker.new
|
|
1695
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UcpCreateCheckoutSessionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
1696
|
+
inbound_mle_status = "mandatory"
|
|
1697
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_create_checkout_session","ucp_create_checkout_session_with_http_info"])
|
|
1698
|
+
begin
|
|
1699
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1700
|
+
rescue
|
|
1701
|
+
raise
|
|
1702
|
+
end
|
|
1703
|
+
end
|
|
1704
|
+
|
|
1705
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_create_checkout_session","ucp_create_checkout_session_with_http_info"])
|
|
1706
|
+
|
|
1707
|
+
auth_names = []
|
|
1708
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1709
|
+
:header_params => header_params,
|
|
1710
|
+
:query_params => query_params,
|
|
1711
|
+
:form_params => form_params,
|
|
1712
|
+
:body => post_body,
|
|
1713
|
+
:auth_names => auth_names,
|
|
1714
|
+
:return_type => 'InlineResponse20113',
|
|
1715
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1716
|
+
if @api_client.config.debugging
|
|
1717
|
+
begin
|
|
1718
|
+
raise
|
|
1719
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#ucp_create_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1720
|
+
rescue
|
|
1721
|
+
puts 'Cannot write to log'
|
|
1722
|
+
end
|
|
1723
|
+
end
|
|
1724
|
+
return data, status_code, headers
|
|
1725
|
+
end
|
|
1726
|
+
# Get Checkout Session UCP
|
|
1727
|
+
# Retrieves the current state of a UCP checkout session. Use this to verify session status, retrieve updated totals after a fulfillment change, or resume a session after an interruption.
|
|
1728
|
+
#
|
|
1729
|
+
# @param session_id The unique identifier of the UCP checkout session to retrieve. Obtained from the `id` field in the Create Session response.
|
|
1730
|
+
# @param ucp_get_checkout_session_request Empty request body.
|
|
1731
|
+
# @param [Hash] opts the optional parameters
|
|
1732
|
+
# @return [InlineResponse20113]
|
|
1733
|
+
#
|
|
1734
|
+
def ucp_get_checkout_session(session_id, ucp_get_checkout_session_request, opts = {})
|
|
1735
|
+
data, status_code, headers = ucp_get_checkout_session_with_http_info(session_id, ucp_get_checkout_session_request, opts)
|
|
1736
|
+
return data, status_code, headers
|
|
1737
|
+
end
|
|
1738
|
+
|
|
1739
|
+
# Get Checkout Session UCP
|
|
1740
|
+
# Retrieves the current state of a UCP checkout session. Use this to verify session status, retrieve updated totals after a fulfillment change, or resume a session after an interruption.
|
|
1741
|
+
# @param session_id The unique identifier of the UCP checkout session to retrieve. Obtained from the `id` field in the Create Session response.
|
|
1742
|
+
# @param ucp_get_checkout_session_request Empty request body.
|
|
1743
|
+
# @param [Hash] opts the optional parameters
|
|
1744
|
+
# @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
|
|
1745
|
+
def ucp_get_checkout_session_with_http_info(session_id, ucp_get_checkout_session_request, opts = {})
|
|
1746
|
+
|
|
1747
|
+
if @api_client.config.debugging
|
|
1748
|
+
begin
|
|
1749
|
+
raise
|
|
1750
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.ucp_get_checkout_session ...'
|
|
1751
|
+
rescue
|
|
1752
|
+
puts 'Cannot write to log'
|
|
1753
|
+
end
|
|
1754
|
+
end
|
|
1755
|
+
# verify the required parameter 'session_id' is set
|
|
1756
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
1757
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling AgentCapabilitiesApi.ucp_get_checkout_session"
|
|
1758
|
+
end
|
|
1759
|
+
# verify the required parameter 'ucp_get_checkout_session_request' is set
|
|
1760
|
+
if @api_client.config.client_side_validation && ucp_get_checkout_session_request.nil?
|
|
1761
|
+
fail ArgumentError, "Missing the required parameter 'ucp_get_checkout_session_request' when calling AgentCapabilitiesApi.ucp_get_checkout_session"
|
|
1762
|
+
end
|
|
1763
|
+
# resource path
|
|
1764
|
+
local_var_path = 'icc/v1/checkout-sessions/{session_id}'.sub('{' + 'session_id' + '}', session_id.to_s)
|
|
1765
|
+
|
|
1766
|
+
# query parameters
|
|
1767
|
+
query_params = {}
|
|
1768
|
+
|
|
1769
|
+
# header parameters
|
|
1770
|
+
header_params = {}
|
|
1771
|
+
# HTTP header 'Accept' (if needed)
|
|
1772
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1773
|
+
# HTTP header 'Content-Type'
|
|
1774
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1775
|
+
|
|
1776
|
+
# form parameters
|
|
1777
|
+
form_params = {}
|
|
1778
|
+
|
|
1779
|
+
# http body (model)
|
|
1780
|
+
post_body = @api_client.object_to_http_body(ucp_get_checkout_session_request)
|
|
1781
|
+
sdk_tracker = SdkTracker.new
|
|
1782
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'Object', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
1783
|
+
inbound_mle_status = "false"
|
|
1784
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_get_checkout_session","ucp_get_checkout_session_with_http_info"])
|
|
1785
|
+
begin
|
|
1786
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1787
|
+
rescue
|
|
1788
|
+
raise
|
|
1789
|
+
end
|
|
1790
|
+
end
|
|
1791
|
+
|
|
1792
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_get_checkout_session","ucp_get_checkout_session_with_http_info"])
|
|
1793
|
+
|
|
1794
|
+
auth_names = []
|
|
1795
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
1796
|
+
:header_params => header_params,
|
|
1797
|
+
:query_params => query_params,
|
|
1798
|
+
:form_params => form_params,
|
|
1799
|
+
:body => post_body,
|
|
1800
|
+
:auth_names => auth_names,
|
|
1801
|
+
:return_type => 'InlineResponse20113',
|
|
1802
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1803
|
+
if @api_client.config.debugging
|
|
1804
|
+
begin
|
|
1805
|
+
raise
|
|
1806
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#ucp_get_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1807
|
+
rescue
|
|
1808
|
+
puts 'Cannot write to log'
|
|
1809
|
+
end
|
|
1810
|
+
end
|
|
1811
|
+
return data, status_code, headers
|
|
1812
|
+
end
|
|
1813
|
+
# Update Checkout Session UCP
|
|
1814
|
+
# Modifies an active UCP checkout session and returns the updated session state. Use this to change line item quantities, update fulfillment address or method, or apply discount codes. Totals are recalculated and returned in the response. Only the fields you include in the request body are updated.
|
|
1815
|
+
#
|
|
1816
|
+
# @param session_id The unique identifier of the UCP checkout session to update.
|
|
1817
|
+
# @param ucp_update_checkout_session_request UCP session update payload. All fields are optional — only fields you include will be applied.
|
|
1818
|
+
# @param [Hash] opts the optional parameters
|
|
1819
|
+
# @option opts [String] :idempotency_key Client-generated unique key for idempotency. Lowercase per UCP spec.
|
|
1820
|
+
# @return [InlineResponse20113]
|
|
1821
|
+
#
|
|
1822
|
+
def ucp_update_checkout_session(session_id, ucp_update_checkout_session_request, opts = {})
|
|
1823
|
+
data, status_code, headers = ucp_update_checkout_session_with_http_info(session_id, ucp_update_checkout_session_request, opts)
|
|
1824
|
+
return data, status_code, headers
|
|
1825
|
+
end
|
|
1826
|
+
|
|
1827
|
+
# Update Checkout Session UCP
|
|
1828
|
+
# Modifies an active UCP checkout session and returns the updated session state. Use this to change line item quantities, update fulfillment address or method, or apply discount codes. Totals are recalculated and returned in the response. Only the fields you include in the request body are updated.
|
|
1829
|
+
# @param session_id The unique identifier of the UCP checkout session to update.
|
|
1830
|
+
# @param ucp_update_checkout_session_request UCP session update payload. All fields are optional — only fields you include will be applied.
|
|
1831
|
+
# @param [Hash] opts the optional parameters
|
|
1832
|
+
# @option opts [String] :idempotency_key Client-generated unique key for idempotency. Lowercase per UCP spec.
|
|
1833
|
+
# @return [Array<(InlineResponse20113, Fixnum, Hash)>] InlineResponse20113 data, response status code and response headers
|
|
1834
|
+
def ucp_update_checkout_session_with_http_info(session_id, ucp_update_checkout_session_request, opts = {})
|
|
1835
|
+
|
|
1836
|
+
if @api_client.config.debugging
|
|
1837
|
+
begin
|
|
1838
|
+
raise
|
|
1839
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.ucp_update_checkout_session ...'
|
|
1840
|
+
rescue
|
|
1841
|
+
puts 'Cannot write to log'
|
|
1842
|
+
end
|
|
1843
|
+
end
|
|
1844
|
+
# verify the required parameter 'session_id' is set
|
|
1845
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
1846
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling AgentCapabilitiesApi.ucp_update_checkout_session"
|
|
1847
|
+
end
|
|
1848
|
+
# verify the required parameter 'ucp_update_checkout_session_request' is set
|
|
1849
|
+
if @api_client.config.client_side_validation && ucp_update_checkout_session_request.nil?
|
|
1850
|
+
fail ArgumentError, "Missing the required parameter 'ucp_update_checkout_session_request' when calling AgentCapabilitiesApi.ucp_update_checkout_session"
|
|
1851
|
+
end
|
|
1852
|
+
# resource path
|
|
1853
|
+
local_var_path = 'icc/v1/checkout-sessions/{session_id}'.sub('{' + 'session_id' + '}', session_id.to_s)
|
|
1854
|
+
|
|
1855
|
+
# query parameters
|
|
1856
|
+
query_params = {}
|
|
1857
|
+
|
|
1858
|
+
# header parameters
|
|
1859
|
+
header_params = {}
|
|
1860
|
+
# HTTP header 'Accept' (if needed)
|
|
1861
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1862
|
+
# HTTP header 'Content-Type'
|
|
1863
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1864
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1865
|
+
|
|
1866
|
+
# form parameters
|
|
1867
|
+
form_params = {}
|
|
1868
|
+
|
|
1869
|
+
# http body (model)
|
|
1870
|
+
post_body = @api_client.object_to_http_body(ucp_update_checkout_session_request)
|
|
1871
|
+
sdk_tracker = SdkTracker.new
|
|
1872
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UcpUpdateCheckoutSessionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
1873
|
+
inbound_mle_status = "mandatory"
|
|
1874
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["ucp_update_checkout_session","ucp_update_checkout_session_with_http_info"])
|
|
1875
|
+
begin
|
|
1876
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1877
|
+
rescue
|
|
1878
|
+
raise
|
|
1879
|
+
end
|
|
1880
|
+
end
|
|
1881
|
+
|
|
1882
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["ucp_update_checkout_session","ucp_update_checkout_session_with_http_info"])
|
|
1883
|
+
|
|
1884
|
+
auth_names = []
|
|
1885
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1886
|
+
:header_params => header_params,
|
|
1887
|
+
:query_params => query_params,
|
|
1888
|
+
:form_params => form_params,
|
|
1889
|
+
:body => post_body,
|
|
1890
|
+
:auth_names => auth_names,
|
|
1891
|
+
:return_type => 'InlineResponse20113',
|
|
1892
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1893
|
+
if @api_client.config.debugging
|
|
1894
|
+
begin
|
|
1895
|
+
raise
|
|
1896
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#ucp_update_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1897
|
+
rescue
|
|
1898
|
+
puts 'Cannot write to log'
|
|
1899
|
+
end
|
|
1900
|
+
end
|
|
1901
|
+
return data, status_code, headers
|
|
1902
|
+
end
|
|
1903
|
+
# Update an agent
|
|
1904
|
+
# [category 1 — Agent_Capabilities] Update agent information. Updatable fields are name, domain, description, contactEmail, and agentMetadata. Extra fields (e.g. tokenRequestorId, keys) will return 422 Validation Error. Raises 404 if agent not found, 403 if agent is deactivated, 409 if new domain or contactEmail already exists.
|
|
1905
|
+
#
|
|
1906
|
+
# @param agent_id Unique agent identifier
|
|
1907
|
+
# @param agent_update Agent update request
|
|
1908
|
+
# @param [Hash] opts the optional parameters
|
|
1909
|
+
# @return [AgentRegistrationResponse201]
|
|
1910
|
+
#
|
|
1911
|
+
def update_agent(agent_id, agent_update, opts = {})
|
|
1912
|
+
data, status_code, headers = update_agent_with_http_info(agent_id, agent_update, opts)
|
|
1913
|
+
return data, status_code, headers
|
|
1914
|
+
end
|
|
1915
|
+
|
|
1916
|
+
# Update an agent
|
|
1917
|
+
# [category 1 — Agent_Capabilities] Update agent information. Updatable fields are name, domain, description, contactEmail, and agentMetadata. Extra fields (e.g. tokenRequestorId, keys) will return 422 Validation Error. Raises 404 if agent not found, 403 if agent is deactivated, 409 if new domain or contactEmail already exists.
|
|
1918
|
+
# @param agent_id Unique agent identifier
|
|
1919
|
+
# @param agent_update Agent update request
|
|
1920
|
+
# @param [Hash] opts the optional parameters
|
|
1921
|
+
# @return [Array<(AgentRegistrationResponse201, Fixnum, Hash)>] AgentRegistrationResponse201 data, response status code and response headers
|
|
1922
|
+
def update_agent_with_http_info(agent_id, agent_update, opts = {})
|
|
1923
|
+
|
|
1924
|
+
if @api_client.config.debugging
|
|
1925
|
+
begin
|
|
1926
|
+
raise
|
|
1927
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.update_agent ...'
|
|
1928
|
+
rescue
|
|
1929
|
+
puts 'Cannot write to log'
|
|
1930
|
+
end
|
|
1931
|
+
end
|
|
1932
|
+
# verify the required parameter 'agent_id' is set
|
|
1933
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
1934
|
+
fail ArgumentError, "Missing the required parameter 'agent_id' when calling AgentCapabilitiesApi.update_agent"
|
|
1935
|
+
end
|
|
1936
|
+
# verify the required parameter 'agent_update' is set
|
|
1937
|
+
if @api_client.config.client_side_validation && agent_update.nil?
|
|
1938
|
+
fail ArgumentError, "Missing the required parameter 'agent_update' when calling AgentCapabilitiesApi.update_agent"
|
|
1939
|
+
end
|
|
1940
|
+
# resource path
|
|
1941
|
+
local_var_path = 'icc/v1/agents/{agentId}'.sub('{' + 'agentId' + '}', agent_id.to_s)
|
|
1942
|
+
|
|
1943
|
+
# query parameters
|
|
1944
|
+
query_params = {}
|
|
1945
|
+
|
|
1946
|
+
# header parameters
|
|
1947
|
+
header_params = {}
|
|
1948
|
+
# HTTP header 'Accept' (if needed)
|
|
1949
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
1950
|
+
# HTTP header 'Content-Type'
|
|
1951
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
1952
|
+
|
|
1953
|
+
# form parameters
|
|
1954
|
+
form_params = {}
|
|
1955
|
+
|
|
1956
|
+
# http body (model)
|
|
1957
|
+
post_body = @api_client.object_to_http_body(agent_update)
|
|
1958
|
+
sdk_tracker = SdkTracker.new
|
|
1959
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgentUpdate', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
1960
|
+
inbound_mle_status = "mandatory"
|
|
1961
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_agent","update_agent_with_http_info"])
|
|
1962
|
+
begin
|
|
1963
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
1964
|
+
rescue
|
|
1965
|
+
raise
|
|
1966
|
+
end
|
|
1967
|
+
end
|
|
1968
|
+
|
|
1969
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_agent","update_agent_with_http_info"])
|
|
1970
|
+
|
|
1971
|
+
auth_names = []
|
|
1972
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1973
|
+
:header_params => header_params,
|
|
1974
|
+
:query_params => query_params,
|
|
1975
|
+
:form_params => form_params,
|
|
1976
|
+
:body => post_body,
|
|
1977
|
+
:auth_names => auth_names,
|
|
1978
|
+
:return_type => 'AgentRegistrationResponse201',
|
|
1979
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
1980
|
+
if @api_client.config.debugging
|
|
1981
|
+
begin
|
|
1982
|
+
raise
|
|
1983
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#update_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1984
|
+
rescue
|
|
1985
|
+
puts 'Cannot write to log'
|
|
1986
|
+
end
|
|
1987
|
+
end
|
|
1988
|
+
return data, status_code, headers
|
|
1989
|
+
end
|
|
1990
|
+
# Update a key
|
|
1991
|
+
# Update key information. Updatable fields are keyName, publicKey, algorithm, and expirationDate. Raises 404 if agent or key not found, 403 if agent or key is deactivated, 409 if new keyName already exists.
|
|
1992
|
+
#
|
|
1993
|
+
# @param agent_id Unique agent identifier
|
|
1994
|
+
# @param key_id Unique key identifier
|
|
1995
|
+
# @param key_update Key update request
|
|
1996
|
+
# @param [Hash] opts the optional parameters
|
|
1997
|
+
# @return [AddAgentKeyResponse201]
|
|
1998
|
+
#
|
|
1999
|
+
def update_agent_key(agent_id, key_id, key_update, opts = {})
|
|
2000
|
+
data, status_code, headers = update_agent_key_with_http_info(agent_id, key_id, key_update, opts)
|
|
2001
|
+
return data, status_code, headers
|
|
2002
|
+
end
|
|
2003
|
+
|
|
2004
|
+
# Update a key
|
|
2005
|
+
# Update key information. Updatable fields are keyName, publicKey, algorithm, and expirationDate. Raises 404 if agent or key not found, 403 if agent or key is deactivated, 409 if new keyName already exists.
|
|
2006
|
+
# @param agent_id Unique agent identifier
|
|
2007
|
+
# @param key_id Unique key identifier
|
|
2008
|
+
# @param key_update Key update request
|
|
2009
|
+
# @param [Hash] opts the optional parameters
|
|
2010
|
+
# @return [Array<(AddAgentKeyResponse201, Fixnum, Hash)>] AddAgentKeyResponse201 data, response status code and response headers
|
|
2011
|
+
def update_agent_key_with_http_info(agent_id, key_id, key_update, opts = {})
|
|
2012
|
+
|
|
2013
|
+
if @api_client.config.debugging
|
|
2014
|
+
begin
|
|
2015
|
+
raise
|
|
2016
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.update_agent_key ...'
|
|
2017
|
+
rescue
|
|
2018
|
+
puts 'Cannot write to log'
|
|
2019
|
+
end
|
|
2020
|
+
end
|
|
2021
|
+
# verify the required parameter 'agent_id' is set
|
|
2022
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
2023
|
+
fail ArgumentError, "Missing the required parameter 'agent_id' when calling AgentCapabilitiesApi.update_agent_key"
|
|
2024
|
+
end
|
|
2025
|
+
# verify the required parameter 'key_id' is set
|
|
2026
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
2027
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentCapabilitiesApi.update_agent_key"
|
|
2028
|
+
end
|
|
2029
|
+
# verify the required parameter 'key_update' is set
|
|
2030
|
+
if @api_client.config.client_side_validation && key_update.nil?
|
|
2031
|
+
fail ArgumentError, "Missing the required parameter 'key_update' when calling AgentCapabilitiesApi.update_agent_key"
|
|
2032
|
+
end
|
|
2033
|
+
# resource path
|
|
2034
|
+
local_var_path = 'icc/v1/agents/{agentId}/keys/{keyId}'.sub('{' + 'agentId' + '}', agent_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
|
|
2035
|
+
|
|
2036
|
+
# query parameters
|
|
2037
|
+
query_params = {}
|
|
2038
|
+
|
|
2039
|
+
# header parameters
|
|
2040
|
+
header_params = {}
|
|
2041
|
+
# HTTP header 'Accept' (if needed)
|
|
2042
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
2043
|
+
# HTTP header 'Content-Type'
|
|
2044
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
2045
|
+
|
|
2046
|
+
# form parameters
|
|
2047
|
+
form_params = {}
|
|
2048
|
+
|
|
2049
|
+
# http body (model)
|
|
2050
|
+
post_body = @api_client.object_to_http_body(key_update)
|
|
2051
|
+
sdk_tracker = SdkTracker.new
|
|
2052
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'KeyUpdate', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
2053
|
+
inbound_mle_status = "mandatory"
|
|
2054
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_agent_key","update_agent_key_with_http_info"])
|
|
2055
|
+
begin
|
|
2056
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
2057
|
+
rescue
|
|
2058
|
+
raise
|
|
2059
|
+
end
|
|
2060
|
+
end
|
|
2061
|
+
|
|
2062
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_agent_key","update_agent_key_with_http_info"])
|
|
2063
|
+
|
|
2064
|
+
auth_names = []
|
|
2065
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
2066
|
+
:header_params => header_params,
|
|
2067
|
+
:query_params => query_params,
|
|
2068
|
+
:form_params => form_params,
|
|
2069
|
+
:body => post_body,
|
|
2070
|
+
:auth_names => auth_names,
|
|
2071
|
+
:return_type => 'AddAgentKeyResponse201',
|
|
2072
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
2073
|
+
if @api_client.config.debugging
|
|
2074
|
+
begin
|
|
2075
|
+
raise
|
|
2076
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#update_agent_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2077
|
+
rescue
|
|
2078
|
+
puts 'Cannot write to log'
|
|
2079
|
+
end
|
|
2080
|
+
end
|
|
2081
|
+
return data, status_code, headers
|
|
2082
|
+
end
|
|
2083
|
+
# Update Checkout Session ACP
|
|
2084
|
+
# Modifies an active ACP checkout session and returns the updated session state with recalculated totals. Use this to: - Add, remove, or change quantities of cart items - Apply or remove discount codes - Update the buyer's shipping address or contact details - Trigger re-calculation of shipping costs and tax Only fields included in the request body are updated — omitted fields retain their current values. **Idempotency:** Supply an `Idempotency-Key` to safely retry updates without applying them twice.
|
|
2085
|
+
#
|
|
2086
|
+
# @param session_id The unique identifier of the ACP checkout session to update. Obtained from the `id` field in the Create Session response.
|
|
2087
|
+
# @param acp_update_checkout_session_request Fields to update. All fields are optional — only included fields are changed. To replace the cart entirely, provide the full `items` array.
|
|
2088
|
+
# @param [Hash] opts the optional parameters
|
|
2089
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
2090
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
2091
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
2092
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
2093
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
2094
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
2095
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
2096
|
+
# @return [InlineResponse20112]
|
|
2097
|
+
#
|
|
2098
|
+
def update_checkout_session(session_id, acp_update_checkout_session_request, opts = {})
|
|
2099
|
+
data, status_code, headers = update_checkout_session_with_http_info(session_id, acp_update_checkout_session_request, opts)
|
|
2100
|
+
return data, status_code, headers
|
|
2101
|
+
end
|
|
2102
|
+
|
|
2103
|
+
# Update Checkout Session ACP
|
|
2104
|
+
# Modifies an active ACP checkout session and returns the updated session state with recalculated totals. Use this to: - Add, remove, or change quantities of cart items - Apply or remove discount codes - Update the buyer's shipping address or contact details - Trigger re-calculation of shipping costs and tax Only fields included in the request body are updated — omitted fields retain their current values. **Idempotency:** Supply an `Idempotency-Key` to safely retry updates without applying them twice.
|
|
2105
|
+
# @param session_id The unique identifier of the ACP checkout session to update. Obtained from the `id` field in the Create Session response.
|
|
2106
|
+
# @param acp_update_checkout_session_request Fields to update. All fields are optional — only included fields are changed. To replace the cart entirely, provide the full `items` array.
|
|
2107
|
+
# @param [Hash] opts the optional parameters
|
|
2108
|
+
# @option opts [String] :idempotency_key Client-generated unique key to ensure this request is processed exactly once. If a request with the same key was already processed, the original response is returned.
|
|
2109
|
+
# @option opts [String] :accept_language Preferred language for the response (e.g. `en-US`, `fr-FR`). Passed to the merchant backend for localized content.
|
|
2110
|
+
# @option opts [String] :user_agent Client user agent string identifying the AI agent platform and version.
|
|
2111
|
+
# @option opts [String] :request_id Unique request identifier for distributed tracing and debugging. Echoed back in the response headers.
|
|
2112
|
+
# @option opts [String] :signature Request signature for payload integrity verification.
|
|
2113
|
+
# @option opts [String] :timestamp ISO 8601 timestamp of when the request was generated. Used in conjunction with Signature for replay protection.
|
|
2114
|
+
# @option opts [String] :api_version ACP specification version the client is targeting (e.g. `2024-01-01`). When omitted, the latest supported version is assumed.
|
|
2115
|
+
# @return [Array<(InlineResponse20112, Fixnum, Hash)>] InlineResponse20112 data, response status code and response headers
|
|
2116
|
+
def update_checkout_session_with_http_info(session_id, acp_update_checkout_session_request, opts = {})
|
|
2117
|
+
|
|
2118
|
+
if @api_client.config.debugging
|
|
2119
|
+
begin
|
|
2120
|
+
raise
|
|
2121
|
+
@api_client.config.logger.debug 'Calling API: AgentCapabilitiesApi.update_checkout_session ...'
|
|
2122
|
+
rescue
|
|
2123
|
+
puts 'Cannot write to log'
|
|
2124
|
+
end
|
|
2125
|
+
end
|
|
2126
|
+
# verify the required parameter 'session_id' is set
|
|
2127
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
2128
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling AgentCapabilitiesApi.update_checkout_session"
|
|
2129
|
+
end
|
|
2130
|
+
# verify the required parameter 'acp_update_checkout_session_request' is set
|
|
2131
|
+
if @api_client.config.client_side_validation && acp_update_checkout_session_request.nil?
|
|
2132
|
+
fail ArgumentError, "Missing the required parameter 'acp_update_checkout_session_request' when calling AgentCapabilitiesApi.update_checkout_session"
|
|
2133
|
+
end
|
|
2134
|
+
# resource path
|
|
2135
|
+
local_var_path = 'icc/v1/checkout_sessions/{session_id}'.sub('{' + 'session_id' + '}', session_id.to_s)
|
|
2136
|
+
|
|
2137
|
+
# query parameters
|
|
2138
|
+
query_params = {}
|
|
2139
|
+
|
|
2140
|
+
# header parameters
|
|
2141
|
+
header_params = {}
|
|
2142
|
+
# HTTP header 'Accept' (if needed)
|
|
2143
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
|
|
2144
|
+
# HTTP header 'Content-Type'
|
|
2145
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
|
2146
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
2147
|
+
header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
|
|
2148
|
+
header_params[:'User-Agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil?
|
|
2149
|
+
header_params[:'Request-Id'] = opts[:'request_id'] if !opts[:'request_id'].nil?
|
|
2150
|
+
header_params[:'Signature'] = opts[:'signature'] if !opts[:'signature'].nil?
|
|
2151
|
+
header_params[:'Timestamp'] = opts[:'timestamp'] if !opts[:'timestamp'].nil?
|
|
2152
|
+
header_params[:'API-Version'] = opts[:'api_version'] if !opts[:'api_version'].nil?
|
|
2153
|
+
|
|
2154
|
+
# form parameters
|
|
2155
|
+
form_params = {}
|
|
2156
|
+
|
|
2157
|
+
# http body (model)
|
|
2158
|
+
post_body = @api_client.object_to_http_body(acp_update_checkout_session_request)
|
|
2159
|
+
sdk_tracker = SdkTracker.new
|
|
2160
|
+
post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AcpUpdateCheckoutSessionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
|
|
2161
|
+
inbound_mle_status = "mandatory"
|
|
2162
|
+
if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_checkout_session","update_checkout_session_with_http_info"])
|
|
2163
|
+
begin
|
|
2164
|
+
post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
|
|
2165
|
+
rescue
|
|
2166
|
+
raise
|
|
2167
|
+
end
|
|
2168
|
+
end
|
|
2169
|
+
|
|
2170
|
+
is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_checkout_session","update_checkout_session_with_http_info"])
|
|
2171
|
+
|
|
2172
|
+
auth_names = []
|
|
2173
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
2174
|
+
:header_params => header_params,
|
|
2175
|
+
:query_params => query_params,
|
|
2176
|
+
:form_params => form_params,
|
|
2177
|
+
:body => post_body,
|
|
2178
|
+
:auth_names => auth_names,
|
|
2179
|
+
:return_type => 'InlineResponse20112',
|
|
2180
|
+
:isResponseMLEForApi => is_response_mle_for_api)
|
|
2181
|
+
if @api_client.config.debugging
|
|
2182
|
+
begin
|
|
2183
|
+
raise
|
|
2184
|
+
@api_client.config.logger.debug "API called: AgentCapabilitiesApi#update_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
439
2185
|
rescue
|
|
440
2186
|
puts 'Cannot write to log'
|
|
441
2187
|
end
|