Class: CyberSource::InstructionsApi
- Inherits:
-
Object
- Object
- CyberSource::InstructionsApi
- Defined in:
- lib/cybersource_rest_client/api/instructions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_purchase_intent(instruction_id, agentic_cancel_purchase_intent_request, opts = {}) ⇒ AgenticCreatePurchaseIntentResponse200
Cancel a purchase intent Cancel an existing purchase intent (instruction) identified by its instructionId.
-
#cancel_purchase_intent_with_http_info(instruction_id, agentic_cancel_purchase_intent_request, opts = {}) ⇒ Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>
Cancel a purchase intent Cancel an existing purchase intent (instruction) identified by its instructionId.
-
#confirm_transaction_events(instruction_id, agentic_confirm_transaction_events_request, opts = {}) ⇒ AgenticConfirmTransactionEventsResponse202
Confirm transaction events Confirm transaction events for a completed purchase.
-
#confirm_transaction_events_with_http_info(instruction_id, agentic_confirm_transaction_events_request, opts = {}) ⇒ Array<(AgenticConfirmTransactionEventsResponse202, Fixnum, Hash)>
Confirm transaction events Confirm transaction events for a completed purchase.
-
#initialize(api_client = ApiClient.default, config) ⇒ InstructionsApi
constructor
A new instance of InstructionsApi.
-
#initiate_purchase_intent(agentic_create_purchase_intent_request, opts = {}) ⇒ AgenticCreatePurchaseIntentResponse200
Initiate a purchase intent Create a new purchase intent (instruction) for an agentic transaction.
-
#initiate_purchase_intent_with_http_info(agentic_create_purchase_intent_request, opts = {}) ⇒ Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>
Initiate a purchase intent Create a new purchase intent (instruction) for an agentic transaction.
-
#retrieve_payment_credentials(instruction_id, agentic_retrieve_payment_credentials_request, opts = {}) ⇒ AgenticRetrievePaymentCredentialsResponse200
Retrieve payment credentials Retrieve tokenized payment credentials for a purchase intent to complete the transaction at a merchant.
-
#retrieve_payment_credentials_with_http_info(instruction_id, agentic_retrieve_payment_credentials_request, opts = {}) ⇒ Array<(AgenticRetrievePaymentCredentialsResponse200, Fixnum, Hash)>
Retrieve payment credentials Retrieve tokenized payment credentials for a purchase intent to complete the transaction at a merchant.
-
#update_purchase_intent(instruction_id, agentic_update_purchase_intent_request, opts = {}) ⇒ AgenticCreatePurchaseIntentResponse200
Update a purchase intent Update an existing purchase intent (instruction) identified by its instructionId.
-
#update_purchase_intent_with_http_info(instruction_id, agentic_update_purchase_intent_request, opts = {}) ⇒ Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>
Update a purchase intent Update an existing purchase intent (instruction) identified by its instructionId.
Constructor Details
#initialize(api_client = ApiClient.default, config) ⇒ InstructionsApi
Returns a new instance of InstructionsApi.
18 19 20 21 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 18 def initialize(api_client = ApiClient.default, config) @api_client = api_client @api_client.set_configuration(config) end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#cancel_purchase_intent(instruction_id, agentic_cancel_purchase_intent_request, opts = {}) ⇒ AgenticCreatePurchaseIntentResponse200
Cancel a purchase intent 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.
30 31 32 33 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 30 def cancel_purchase_intent(instruction_id, agentic_cancel_purchase_intent_request, opts = {}) data, status_code, headers = cancel_purchase_intent_with_http_info(instruction_id, agentic_cancel_purchase_intent_request, opts) return data, status_code, headers end |
#cancel_purchase_intent_with_http_info(instruction_id, agentic_cancel_purchase_intent_request, opts = {}) ⇒ Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>
Cancel a purchase intent 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.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 41 def cancel_purchase_intent_with_http_info(instruction_id, agentic_cancel_purchase_intent_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: InstructionsApi.cancel_purchase_intent ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'instruction_id' is set if @api_client.config.client_side_validation && instruction_id.nil? fail ArgumentError, "Missing the required parameter 'instruction_id' when calling InstructionsApi.cancel_purchase_intent" end # verify the required parameter 'agentic_cancel_purchase_intent_request' is set if @api_client.config.client_side_validation && agentic_cancel_purchase_intent_request.nil? fail ArgumentError, "Missing the required parameter 'agentic_cancel_purchase_intent_request' when calling InstructionsApi.cancel_purchase_intent" end # resource path local_var_path = 'acp/v1/instructions/{instructionId}/cancel'.sub('{' + 'instructionId' + '}', instruction_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(agentic_cancel_purchase_intent_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticCancelPurchaseIntentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "mandatory" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["cancel_purchase_intent","cancel_purchase_intent_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["cancel_purchase_intent","cancel_purchase_intent_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AgenticCreatePurchaseIntentResponse200', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: InstructionsApi#cancel_purchase_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#confirm_transaction_events(instruction_id, agentic_confirm_transaction_events_request, opts = {}) ⇒ AgenticConfirmTransactionEventsResponse202
Confirm transaction events 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.
117 118 119 120 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 117 def confirm_transaction_events(instruction_id, agentic_confirm_transaction_events_request, opts = {}) data, status_code, headers = confirm_transaction_events_with_http_info(instruction_id, agentic_confirm_transaction_events_request, opts) return data, status_code, headers end |
#confirm_transaction_events_with_http_info(instruction_id, agentic_confirm_transaction_events_request, opts = {}) ⇒ Array<(AgenticConfirmTransactionEventsResponse202, Fixnum, Hash)>
Confirm transaction events 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.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 128 def confirm_transaction_events_with_http_info(instruction_id, agentic_confirm_transaction_events_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: InstructionsApi.confirm_transaction_events ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'instruction_id' is set if @api_client.config.client_side_validation && instruction_id.nil? fail ArgumentError, "Missing the required parameter 'instruction_id' when calling InstructionsApi.confirm_transaction_events" end # verify the required parameter 'agentic_confirm_transaction_events_request' is set if @api_client.config.client_side_validation && agentic_confirm_transaction_events_request.nil? fail ArgumentError, "Missing the required parameter 'agentic_confirm_transaction_events_request' when calling InstructionsApi.confirm_transaction_events" end # resource path local_var_path = 'acp/v1/instructions/{instructionId}/confirmations'.sub('{' + 'instructionId' + '}', instruction_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(agentic_confirm_transaction_events_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticConfirmTransactionEventsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "mandatory" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["confirm_transaction_events","confirm_transaction_events_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["confirm_transaction_events","confirm_transaction_events_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AgenticConfirmTransactionEventsResponse202', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: InstructionsApi#confirm_transaction_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#initiate_purchase_intent(agentic_create_purchase_intent_request, opts = {}) ⇒ AgenticCreatePurchaseIntentResponse200
Initiate a purchase intent 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.
203 204 205 206 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 203 def initiate_purchase_intent(agentic_create_purchase_intent_request, opts = {}) data, status_code, headers = initiate_purchase_intent_with_http_info(agentic_create_purchase_intent_request, opts) return data, status_code, headers end |
#initiate_purchase_intent_with_http_info(agentic_create_purchase_intent_request, opts = {}) ⇒ Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>
Initiate a purchase intent 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.
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 213 def initiate_purchase_intent_with_http_info(agentic_create_purchase_intent_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: InstructionsApi.initiate_purchase_intent ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'agentic_create_purchase_intent_request' is set if @api_client.config.client_side_validation && agentic_create_purchase_intent_request.nil? fail ArgumentError, "Missing the required parameter 'agentic_create_purchase_intent_request' when calling InstructionsApi.initiate_purchase_intent" end # resource path local_var_path = 'acp/v1/instructions' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(agentic_create_purchase_intent_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticCreatePurchaseIntentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "mandatory" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["initiate_purchase_intent","initiate_purchase_intent_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["initiate_purchase_intent","initiate_purchase_intent_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AgenticCreatePurchaseIntentResponse200', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: InstructionsApi#initiate_purchase_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#retrieve_payment_credentials(instruction_id, agentic_retrieve_payment_credentials_request, opts = {}) ⇒ AgenticRetrievePaymentCredentialsResponse200
Retrieve payment credentials 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.
285 286 287 288 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 285 def retrieve_payment_credentials(instruction_id, agentic_retrieve_payment_credentials_request, opts = {}) data, status_code, headers = retrieve_payment_credentials_with_http_info(instruction_id, agentic_retrieve_payment_credentials_request, opts) return data, status_code, headers end |
#retrieve_payment_credentials_with_http_info(instruction_id, agentic_retrieve_payment_credentials_request, opts = {}) ⇒ Array<(AgenticRetrievePaymentCredentialsResponse200, Fixnum, Hash)>
Retrieve payment credentials 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.
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 296 def retrieve_payment_credentials_with_http_info(instruction_id, agentic_retrieve_payment_credentials_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: InstructionsApi.retrieve_payment_credentials ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'instruction_id' is set if @api_client.config.client_side_validation && instruction_id.nil? fail ArgumentError, "Missing the required parameter 'instruction_id' when calling InstructionsApi.retrieve_payment_credentials" end # verify the required parameter 'agentic_retrieve_payment_credentials_request' is set if @api_client.config.client_side_validation && agentic_retrieve_payment_credentials_request.nil? fail ArgumentError, "Missing the required parameter 'agentic_retrieve_payment_credentials_request' when calling InstructionsApi.retrieve_payment_credentials" end # resource path local_var_path = 'acp/v1/instructions/{instructionId}/credentials'.sub('{' + 'instructionId' + '}', instruction_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(agentic_retrieve_payment_credentials_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticRetrievePaymentCredentialsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "mandatory" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["retrieve_payment_credentials","retrieve_payment_credentials_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["retrieve_payment_credentials","retrieve_payment_credentials_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AgenticRetrievePaymentCredentialsResponse200', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: InstructionsApi#retrieve_payment_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#update_purchase_intent(instruction_id, agentic_update_purchase_intent_request, opts = {}) ⇒ AgenticCreatePurchaseIntentResponse200
Update a purchase intent Update an existing purchase intent (instruction) identified by its instructionId. The agent calls this endpoint when the consumer modifies their order — for example, changing the quantity, updating mandates, switching payment instruments, or changing shipping details. The request body has the same structure as the initiate request. Returns the same instructionId (HTTP 200) on success, or PENDING (HTTP 202) with pendingEvents if additional cardholder authentication is required for the updated intent.
372 373 374 375 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 372 def update_purchase_intent(instruction_id, agentic_update_purchase_intent_request, opts = {}) data, status_code, headers = update_purchase_intent_with_http_info(instruction_id, agentic_update_purchase_intent_request, opts) return data, status_code, headers end |
#update_purchase_intent_with_http_info(instruction_id, agentic_update_purchase_intent_request, opts = {}) ⇒ Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>
Update a purchase intent Update an existing purchase intent (instruction) identified by its instructionId. The agent calls this endpoint when the consumer modifies their order — for example, changing the quantity, updating mandates, switching payment instruments, or changing shipping details. The request body has the same structure as the initiate request. Returns the same instructionId (HTTP 200) on success, or PENDING (HTTP 202) with pendingEvents if additional cardholder authentication is required for the updated intent.
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/cybersource_rest_client/api/instructions_api.rb', line 383 def update_purchase_intent_with_http_info(instruction_id, agentic_update_purchase_intent_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: InstructionsApi.update_purchase_intent ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'instruction_id' is set if @api_client.config.client_side_validation && instruction_id.nil? fail ArgumentError, "Missing the required parameter 'instruction_id' when calling InstructionsApi.update_purchase_intent" end # verify the required parameter 'agentic_update_purchase_intent_request' is set if @api_client.config.client_side_validation && agentic_update_purchase_intent_request.nil? fail ArgumentError, "Missing the required parameter 'agentic_update_purchase_intent_request' when calling InstructionsApi.update_purchase_intent" end # resource path local_var_path = 'acp/v1/instructions/{instructionId}'.sub('{' + 'instructionId' + '}', instruction_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(agentic_update_purchase_intent_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticUpdatePurchaseIntentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "mandatory" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_purchase_intent","update_purchase_intent_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_purchase_intent","update_purchase_intent_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AgenticCreatePurchaseIntentResponse200', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: InstructionsApi#update_purchase_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |