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 Cancels an existing purchase intent identified by the transaction ID.
-
#cancel_purchase_intent_with_http_info(instruction_id, agentic_cancel_purchase_intent_request, opts = {}) ⇒ Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>
Cancel a purchase intent Cancels an existing purchase intent identified by the transaction ID.
-
#confirm_transaction_events(instruction_id, agentic_confirm_transaction_events_request, opts = {}) ⇒ AgenticConfirmTransactionEventsResponse202
Confirm transaction events Agents send the confirm transaction events to notify the payment processing is done.
-
#confirm_transaction_events_with_http_info(instruction_id, agentic_confirm_transaction_events_request, opts = {}) ⇒ Array<(AgenticConfirmTransactionEventsResponse202, Fixnum, Hash)>
Confirm transaction events Agents send the confirm transaction events to notify the payment processing is done.
-
#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 Creates a new purchase intent with the provided details.
-
#initiate_purchase_intent_with_http_info(agentic_create_purchase_intent_request, opts = {}) ⇒ Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>
Initiate a purchase intent Creates a new purchase intent with the provided details.
-
#retrieve_payment_credentials(instruction_id, agentic_retrieve_payment_credentials_request, opts = {}) ⇒ AgenticRetrievePaymentCredentialsResponse200
Retrieve payment credentials Retrieve a customer’s tokenized payment credentials to complete the transaction.
-
#retrieve_payment_credentials_with_http_info(instruction_id, agentic_retrieve_payment_credentials_request, opts = {}) ⇒ Array<(AgenticRetrievePaymentCredentialsResponse200, Fixnum, Hash)>
Retrieve payment credentials Retrieve a customer's tokenized payment credentials to complete the transaction.
-
#update_purchase_intent(instruction_id, agentic_update_purchase_intent_request, opts = {}) ⇒ AgenticCreatePurchaseIntentResponse200
Update a purchase intent Updates an existing purchase intent identified by the transaction ID.
-
#update_purchase_intent_with_http_info(instruction_id, agentic_update_purchase_intent_request, opts = {}) ⇒ Array<(AgenticCreatePurchaseIntentResponse200, Fixnum, Hash)>
Update a purchase intent Updates an existing purchase intent identified by the transaction ID.
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 Cancels an existing purchase intent identified by the transaction ID.
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 Cancels an existing purchase intent identified by the transaction ID.
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 Agents send the confirm transaction events to notify the payment processing is done
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 Agents send the confirm transaction events to notify the payment processing is done
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 Creates a new purchase intent with the provided details.
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 Creates a new purchase intent with the provided details.
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 a customer’s tokenized payment credentials 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 a customer's tokenized payment credentials 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 Updates an existing purchase intent identified by the transaction ID.
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 Updates an existing purchase intent identified by the transaction ID.
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 |