Class: CyberSourceMergedSpec::TransactionDetailsController
- Inherits:
-
BaseController
- Object
- BaseController
- CyberSourceMergedSpec::TransactionDetailsController
- Defined in:
- lib/cyber_source_merged_spec/controllers/transaction_details_controller.rb
Overview
TransactionDetailsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#get_transaction(id) ⇒ ApiResponse
Include the Request ID in the GET request to retrieve the transaction details.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from CyberSourceMergedSpec::BaseController
Instance Method Details
#get_transaction(id) ⇒ ApiResponse
Include the Request ID in the GET request to retrieve the transaction details.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cyber_source_merged_spec/controllers/transaction_details_controller.rb', line 13 def get_transaction(id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/tss/v2/transactions/{id}', Server::DEFAULT) .template_param(new_parameter(id, key: 'id') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(TssV2TransactionsGet200Response.method(:from_hash)) .is_api_response(true) .local_error('404', 'The specified resource not found in the system.', APIException) .local_error('500', 'Unexpected server error', APIException)) .execute end |