cybersource_rest_client 0.0.87 → 0.0.88

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.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client/api/acp_checkout_api.rb +553 -0
  3. data/lib/cybersource_rest_client/api/agent_registration_api.rb +721 -0
  4. data/lib/cybersource_rest_client/api/bank_account_validation_api.rb +0 -1
  5. data/lib/cybersource_rest_client/api/enrollment_api.rb +104 -0
  6. data/lib/cybersource_rest_client/api/{merchant_capabilities_api.rb → merchant_registration_api.rb} +47 -391
  7. data/lib/cybersource_rest_client/api/payment_events_api.rb +197 -0
  8. data/lib/cybersource_rest_client/api/product_feed_api.rb +365 -0
  9. data/lib/cybersource_rest_client/api/purchase_intent_api.rb +278 -0
  10. data/lib/cybersource_rest_client/api/ucp_checkout_api.rb +453 -0
  11. data/lib/cybersource_rest_client/models/activate_merchant_key_response200.rb +1 -1
  12. data/lib/cybersource_rest_client/models/add_agent_key_response201.rb +11 -11
  13. data/lib/cybersource_rest_client/models/agent_registration_response201.rb +13 -15
  14. data/lib/cybersource_rest_client/models/agent_registration_response201_keys.rb +8 -8
  15. data/lib/cybersource_rest_client/models/agent_request.rb +9 -11
  16. data/lib/cybersource_rest_client/models/agent_update.rb +7 -9
  17. data/lib/cybersource_rest_client/models/auth_reversal_request.rb +1 -1
  18. data/lib/cybersource_rest_client/models/boarding_payouts_configurations.rb +1 -1
  19. data/lib/cybersource_rest_client/models/{inline_response_200_19_google_merchant_products.rb → boarding_payouts_configurations_acquirer.rb} +33 -76
  20. data/lib/cybersource_rest_client/models/{inline_response_200_19_errors.rb → boarding_payouts_configurations_merchant_descriptor.rb} +25 -33
  21. data/lib/cybersource_rest_client/models/boarding_payouts_configurations_processors.rb +581 -0
  22. data/lib/cybersource_rest_client/models/capture_payment_request.rb +1 -1
  23. data/lib/cybersource_rest_client/models/create_order_request.rb +11 -1
  24. data/lib/cybersource_rest_client/models/create_payment_request.rb +14 -1
  25. data/lib/cybersource_rest_client/models/create_session_req.rb +14 -1
  26. data/lib/cybersource_rest_client/models/create_session_request.rb +14 -1
  27. data/lib/cybersource_rest_client/models/iccv1agents_keys.rb +4 -4
  28. data/lib/cybersource_rest_client/models/iccv1merchants_api_integrations.rb +2 -2
  29. data/lib/cybersource_rest_client/models/iccv1merchants_encryption_key.rb +6 -6
  30. data/lib/cybersource_rest_client/models/iccv1merchants_protocol_interactions.rb +1 -1
  31. data/lib/cybersource_rest_client/models/iccv1merchants_web_integrations.rb +2 -2
  32. data/lib/cybersource_rest_client/models/inline_response_200_17.rb +55 -0
  33. data/lib/cybersource_rest_client/models/inline_response_200_18.rb +40 -0
  34. data/lib/cybersource_rest_client/models/inline_response_200_19.rb +30 -107
  35. data/lib/cybersource_rest_client/models/inline_response_200_19_processing.rb +213 -0
  36. data/lib/cybersource_rest_client/models/inline_response_200_19_syndication.rb +224 -0
  37. data/lib/cybersource_rest_client/models/inline_response_200_20_products.rb +80 -682
  38. data/lib/cybersource_rest_client/models/inline_response_201_12.rb +40 -0
  39. data/lib/cybersource_rest_client/models/inline_response_201_12_fulfillment_options.rb +30 -0
  40. data/lib/cybersource_rest_client/models/inline_response_201_12_totals.rb +15 -0
  41. data/lib/cybersource_rest_client/models/inline_response_201_6_setups_risk.rb +15 -5
  42. data/lib/cybersource_rest_client/models/inline_response_201_6_setups_value_added_services.rb +15 -5
  43. data/lib/cybersource_rest_client/models/{deactivate_merchant_key_response200.rb → inline_response_202_1.rb} +11 -16
  44. data/lib/cybersource_rest_client/models/key_request.rb +4 -4
  45. data/lib/cybersource_rest_client/models/key_request_1.rb +5 -5
  46. data/lib/cybersource_rest_client/models/key_update.rb +5 -5
  47. data/lib/cybersource_rest_client/models/key_update_1.rb +5 -5
  48. data/lib/cybersource_rest_client/models/list_agent_keys_response200.rb +2 -2
  49. data/lib/cybersource_rest_client/models/merchant_registration_response201.rb +10 -10
  50. data/lib/cybersource_rest_client/models/merchant_registration_response201_api_integrations.rb +225 -0
  51. data/lib/cybersource_rest_client/models/merchant_registration_response201_keys.rb +1 -1
  52. data/lib/cybersource_rest_client/models/merchant_registration_response201_web_integrations.rb +225 -0
  53. data/lib/cybersource_rest_client/models/merchant_request.rb +7 -7
  54. data/lib/cybersource_rest_client/models/merchant_update.rb +7 -7
  55. data/lib/cybersource_rest_client/models/mit_reversal_request.rb +1 -1
  56. data/lib/cybersource_rest_client/models/mit_void_request.rb +15 -5
  57. data/lib/cybersource_rest_client/models/payments_configuration_setup.rb +11 -1
  58. data/lib/cybersource_rest_client/models/payments_products.rb +11 -1
  59. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +12 -1
  60. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1.rb +12 -1
  61. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information.rb +44 -1
  62. data/lib/cybersource_rest_client/models/{pts_v2_payouts_post201_response_merchant_information_merchant_descriptor.rb → pts_v2_payments_post201_response_1_order_information_merchant_descriptor.rb} +1 -1
  63. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_processor_information.rb +18 -1
  64. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +101 -5
  65. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_ship_to.rb +12 -1
  66. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information.rb +22 -5
  67. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +22 -5
  68. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +22 -5
  69. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb +1 -1
  70. data/lib/cybersource_rest_client/models/{ptsv2paymentsidreversals_point_of_sale_information.rb → pts_v2_payments_reversals_post201_response_point_of_sale_information.rb} +2 -2
  71. data/lib/cybersource_rest_client/models/{ptsv2paymentsidreversals_point_of_sale_information_emv.rb → pts_v2_payments_reversals_post201_response_point_of_sale_information_emv.rb} +1 -1
  72. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +22 -5
  73. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information.rb +1 -1
  74. data/lib/cybersource_rest_client/models/ptsv2intents_buyer_information.rb +196 -0
  75. data/lib/cybersource_rest_client/models/ptsv2intents_merchant_information_merchant_descriptor.rb +18 -1
  76. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_bill_to.rb +154 -1
  77. data/lib/cybersource_rest_client/models/ptsv2intents_order_information_line_items.rb +16 -5
  78. data/lib/cybersource_rest_client/models/ptsv2intentsid_merchant_information.rb +1 -1
  79. data/lib/cybersource_rest_client/models/ptsv2intentsid_merchant_information_merchant_descriptor.rb +207 -0
  80. data/lib/cybersource_rest_client/models/{ptsv2paymentsidcaptures_point_of_sale_information.rb → ptsv2payments_buyer.rb} +55 -31
  81. data/lib/cybersource_rest_client/models/{inline_response_200_19_google_merchant.rb → ptsv2payments_order_history.rb} +42 -41
  82. data/lib/cybersource_rest_client/models/ptsv2payments_ship_to.rb +281 -0
  83. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_point_of_sale_information.rb +1 -1
  84. data/lib/cybersource_rest_client/models/{ptsv2paymentsidcaptures_point_of_sale_information_emv.rb → ptsv2paymentsidrefunds_point_of_sale_information_emv.rb} +1 -1
  85. data/lib/cybersource_rest_client/models/risk_products.rb +15 -5
  86. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_point_of_sale_information.rb +1 -1
  87. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb +1 -1
  88. data/lib/cybersource_rest_client/models/unifiedrisk_acquirer_merchant_account_security_amount.rb +3 -3
  89. data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_expected_annual_sales.rb +3 -3
  90. data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_expected_average_ticket_size.rb +3 -3
  91. data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_expected_monthly_sales.rb +3 -3
  92. data/lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor_limit_value.rb +3 -3
  93. data/lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account_balance_before.rb +2 -2
  94. data/lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account_credit_limit.rb +3 -3
  95. data/lib/cybersource_rest_client/models/unifiedrisk_transaction_additional_fees.rb +2 -2
  96. data/lib/cybersource_rest_client/models/unifiedrisk_transaction_amount.rb +3 -3
  97. data/lib/cybersource_rest_client/models/value_added_services_products.rb +15 -5
  98. data/lib/cybersource_rest_client/models/void_capture_request.rb +15 -5
  99. data/lib/cybersource_rest_client/models/void_credit_request.rb +15 -5
  100. data/lib/cybersource_rest_client/models/void_payment_request.rb +15 -5
  101. data/lib/cybersource_rest_client/models/void_refund_request.rb +15 -5
  102. data/lib/cybersource_rest_client.rb +25 -11
  103. metadata +27 -13
  104. data/lib/cybersource_rest_client/api/agent_capabilities_api.rb +0 -2279
@@ -0,0 +1,278 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.38
10
+ =end
11
+
12
+ require 'uri'
13
+ require 'AuthenticationSDK/util/MLEUtility'
14
+ module CyberSource
15
+ class PurchaseIntentApi
16
+ attr_accessor :api_client
17
+
18
+ def initialize(api_client = ApiClient.default, config)
19
+ @api_client = api_client
20
+ @api_client.set_configuration(config)
21
+ end
22
+ # Cancel a purchase intent
23
+ # 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.
24
+ #
25
+ # @param instruction_id
26
+ # @param agentic_cancel_purchase_intent_request Unique identifier for the purchase intent instruction.
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [AgenticCreatePurchaseIntentResponse200]
29
+ #
30
+ def cancel_purchase_intent(instruction_id, agentic_cancel_purchase_intent_request, opts = {})
31
+ data, status_code, headers = cancel_purchase_intent_with_http_info(instruction_id, agentic_cancel_purchase_intent_request, opts)
32
+ return data, status_code, headers
33
+ end
34
+
35
+ # Cancel a purchase intent
36
+ # 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.
37
+ # @param instruction_id
38
+ # @param agentic_cancel_purchase_intent_request Unique identifier for the purchase intent instruction.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>] AgenticCreatePurchaseIntentResponse200 data, response status code and response headers
41
+ def cancel_purchase_intent_with_http_info(instruction_id, agentic_cancel_purchase_intent_request, opts = {})
42
+
43
+ if @api_client.config.debugging
44
+ begin
45
+ raise
46
+ @api_client.config.logger.debug 'Calling API: PurchaseIntentApi.cancel_purchase_intent ...'
47
+ rescue
48
+ puts 'Cannot write to log'
49
+ end
50
+ end
51
+ # verify the required parameter 'instruction_id' is set
52
+ if @api_client.config.client_side_validation && instruction_id.nil?
53
+ fail ArgumentError, "Missing the required parameter 'instruction_id' when calling PurchaseIntentApi.cancel_purchase_intent"
54
+ end
55
+ # verify the required parameter 'agentic_cancel_purchase_intent_request' is set
56
+ if @api_client.config.client_side_validation && agentic_cancel_purchase_intent_request.nil?
57
+ fail ArgumentError, "Missing the required parameter 'agentic_cancel_purchase_intent_request' when calling PurchaseIntentApi.cancel_purchase_intent"
58
+ end
59
+ # resource path
60
+ local_var_path = 'icc/v1/instructions/{instructionId}/cancel'.sub('{' + 'instructionId' + '}', instruction_id.to_s)
61
+
62
+ # query parameters
63
+ query_params = {}
64
+
65
+ # header parameters
66
+ header_params = {}
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
69
+ # HTTP header 'Content-Type'
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = @api_client.object_to_http_body(agentic_cancel_purchase_intent_request)
77
+ sdk_tracker = SdkTracker.new
78
+ post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticCancelPurchaseIntentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
79
+ inbound_mle_status = "mandatory"
80
+ if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["cancel_purchase_intent","cancel_purchase_intent_with_http_info"])
81
+ begin
82
+ post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
83
+ rescue
84
+ raise
85
+ end
86
+ end
87
+
88
+ is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["cancel_purchase_intent","cancel_purchase_intent_with_http_info"])
89
+
90
+ auth_names = []
91
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
92
+ :header_params => header_params,
93
+ :query_params => query_params,
94
+ :form_params => form_params,
95
+ :body => post_body,
96
+ :auth_names => auth_names,
97
+ :return_type => 'AgenticCreatePurchaseIntentResponse200',
98
+ :isResponseMLEForApi => is_response_mle_for_api)
99
+ if @api_client.config.debugging
100
+ begin
101
+ raise
102
+ @api_client.config.logger.debug "API called: PurchaseIntentApi#cancel_purchase_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
103
+ rescue
104
+ puts 'Cannot write to log'
105
+ end
106
+ end
107
+ return data, status_code, headers
108
+ end
109
+ # Initiate a purchase intent
110
+ # 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.
111
+ #
112
+ # @param agentic_create_purchase_intent_request
113
+ # @param [Hash] opts the optional parameters
114
+ # @return [AgenticCreatePurchaseIntentResponse200]
115
+ #
116
+ def initiate_purchase_intent(agentic_create_purchase_intent_request, opts = {})
117
+ data, status_code, headers = initiate_purchase_intent_with_http_info(agentic_create_purchase_intent_request, opts)
118
+ return data, status_code, headers
119
+ end
120
+
121
+ # Initiate a purchase intent
122
+ # 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.
123
+ # @param agentic_create_purchase_intent_request
124
+ # @param [Hash] opts the optional parameters
125
+ # @return [Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>] AgenticCreatePurchaseIntentResponse200 data, response status code and response headers
126
+ def initiate_purchase_intent_with_http_info(agentic_create_purchase_intent_request, opts = {})
127
+
128
+ if @api_client.config.debugging
129
+ begin
130
+ raise
131
+ @api_client.config.logger.debug 'Calling API: PurchaseIntentApi.initiate_purchase_intent ...'
132
+ rescue
133
+ puts 'Cannot write to log'
134
+ end
135
+ end
136
+ # verify the required parameter 'agentic_create_purchase_intent_request' is set
137
+ if @api_client.config.client_side_validation && agentic_create_purchase_intent_request.nil?
138
+ fail ArgumentError, "Missing the required parameter 'agentic_create_purchase_intent_request' when calling PurchaseIntentApi.initiate_purchase_intent"
139
+ end
140
+ # resource path
141
+ local_var_path = 'icc/v1/instructions'
142
+
143
+ # query parameters
144
+ query_params = {}
145
+
146
+ # header parameters
147
+ header_params = {}
148
+ # HTTP header 'Accept' (if needed)
149
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
150
+ # HTTP header 'Content-Type'
151
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
152
+
153
+ # form parameters
154
+ form_params = {}
155
+
156
+ # http body (model)
157
+ post_body = @api_client.object_to_http_body(agentic_create_purchase_intent_request)
158
+ sdk_tracker = SdkTracker.new
159
+ post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticCreatePurchaseIntentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
160
+ inbound_mle_status = "mandatory"
161
+ if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["initiate_purchase_intent","initiate_purchase_intent_with_http_info"])
162
+ begin
163
+ post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
164
+ rescue
165
+ raise
166
+ end
167
+ end
168
+
169
+ is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["initiate_purchase_intent","initiate_purchase_intent_with_http_info"])
170
+
171
+ auth_names = []
172
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => 'AgenticCreatePurchaseIntentResponse200',
179
+ :isResponseMLEForApi => is_response_mle_for_api)
180
+ if @api_client.config.debugging
181
+ begin
182
+ raise
183
+ @api_client.config.logger.debug "API called: PurchaseIntentApi#initiate_purchase_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ rescue
185
+ puts 'Cannot write to log'
186
+ end
187
+ end
188
+ return data, status_code, headers
189
+ end
190
+ # Update a purchase intent
191
+ # 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.
192
+ #
193
+ # @param instruction_id Unique identifier for the purchase intent instruction.
194
+ # @param agentic_update_purchase_intent_request
195
+ # @param [Hash] opts the optional parameters
196
+ # @return [AgenticCreatePurchaseIntentResponse200]
197
+ #
198
+ def update_purchase_intent(instruction_id, agentic_update_purchase_intent_request, opts = {})
199
+ data, status_code, headers = update_purchase_intent_with_http_info(instruction_id, agentic_update_purchase_intent_request, opts)
200
+ return data, status_code, headers
201
+ end
202
+
203
+ # Update a purchase intent
204
+ # 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.
205
+ # @param instruction_id Unique identifier for the purchase intent instruction.
206
+ # @param agentic_update_purchase_intent_request
207
+ # @param [Hash] opts the optional parameters
208
+ # @return [Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>] AgenticCreatePurchaseIntentResponse200 data, response status code and response headers
209
+ def update_purchase_intent_with_http_info(instruction_id, agentic_update_purchase_intent_request, opts = {})
210
+
211
+ if @api_client.config.debugging
212
+ begin
213
+ raise
214
+ @api_client.config.logger.debug 'Calling API: PurchaseIntentApi.update_purchase_intent ...'
215
+ rescue
216
+ puts 'Cannot write to log'
217
+ end
218
+ end
219
+ # verify the required parameter 'instruction_id' is set
220
+ if @api_client.config.client_side_validation && instruction_id.nil?
221
+ fail ArgumentError, "Missing the required parameter 'instruction_id' when calling PurchaseIntentApi.update_purchase_intent"
222
+ end
223
+ # verify the required parameter 'agentic_update_purchase_intent_request' is set
224
+ if @api_client.config.client_side_validation && agentic_update_purchase_intent_request.nil?
225
+ fail ArgumentError, "Missing the required parameter 'agentic_update_purchase_intent_request' when calling PurchaseIntentApi.update_purchase_intent"
226
+ end
227
+ # resource path
228
+ local_var_path = 'icc/v1/instructions/{instructionId}'.sub('{' + 'instructionId' + '}', instruction_id.to_s)
229
+
230
+ # query parameters
231
+ query_params = {}
232
+
233
+ # header parameters
234
+ header_params = {}
235
+ # HTTP header 'Accept' (if needed)
236
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
237
+ # HTTP header 'Content-Type'
238
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
239
+
240
+ # form parameters
241
+ form_params = {}
242
+
243
+ # http body (model)
244
+ post_body = @api_client.object_to_http_body(agentic_update_purchase_intent_request)
245
+ sdk_tracker = SdkTracker.new
246
+ post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AgenticUpdatePurchaseIntentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
247
+ inbound_mle_status = "mandatory"
248
+ if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_purchase_intent","update_purchase_intent_with_http_info"])
249
+ begin
250
+ post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body)
251
+ rescue
252
+ raise
253
+ end
254
+ end
255
+
256
+ is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_purchase_intent","update_purchase_intent_with_http_info"])
257
+
258
+ auth_names = []
259
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
260
+ :header_params => header_params,
261
+ :query_params => query_params,
262
+ :form_params => form_params,
263
+ :body => post_body,
264
+ :auth_names => auth_names,
265
+ :return_type => 'AgenticCreatePurchaseIntentResponse200',
266
+ :isResponseMLEForApi => is_response_mle_for_api)
267
+ if @api_client.config.debugging
268
+ begin
269
+ raise
270
+ @api_client.config.logger.debug "API called: PurchaseIntentApi#update_purchase_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
271
+ rescue
272
+ puts 'Cannot write to log'
273
+ end
274
+ end
275
+ return data, status_code, headers
276
+ end
277
+ end
278
+ end