Class: VisaAcceptanceMergedSpec::TransientTokenDataApi
- Defined in:
- lib/visa_acceptance_merged_spec/apis/transient_token_data_api.rb
Overview
TransientTokenDataApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#get_payment_credentials_for_transient_token(payment_credentials_reference) ⇒ ApiResponse
Retrieve the Payment data captured by Unified Checkout.
-
#get_transaction_for_transient_token(transient_token) ⇒ ApiResponse
Retrieve the data captured by Unified Checkout.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from VisaAcceptanceMergedSpec::BaseApi
Instance Method Details
#get_payment_credentials_for_transient_token(payment_credentials_reference) ⇒ ApiResponse
Retrieve the Payment data captured by Unified Checkout. This API is used to retrieve the detailed data represented by the Transient Token. This API will return PCI payment data captured by the Unified Checkout platform. paymentCredentialsReference field contained within the Transient token returned from a successful Unified Checkout transaction
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/visa_acceptance_merged_spec/apis/transient_token_data_api.rb', line 45 def get_payment_credentials_for_transient_token(payment_credentials_reference) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/flex/v2/payment-credentials/{paymentCredentialsReference}', Server::DEFAULT) .template_param(new_parameter(payment_credentials_reference, key: 'paymentCredentialsReference') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(And.new('BearerAuth', 'Accept'))) .response(new_response_handler .deserializer(APIHelper.method(:dynamic_deserializer)) .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 |
#get_transaction_for_transient_token(transient_token) ⇒ ApiResponse
Retrieve the data captured by Unified Checkout. This API is used to retrieve the detailed data represented by the Transient Token. This API will not return PCI payment data (PAN). Include the Request ID in the GET request to retrieve the transaction details. returned by the Unified Checkout application.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/visa_acceptance_merged_spec/apis/transient_token_data_api.rb', line 16 def get_transaction_for_transient_token(transient_token) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/up/v1/payment-details/{transientToken}', Server::DEFAULT) .template_param(new_parameter(transient_token, key: 'transientToken') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(And.new('BearerAuth', 'Accept'))) .response(new_response_handler .is_response_void(true) .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 |