Class: CyberSourceMergedSpec::TransactionBatchesController
- Inherits:
-
BaseController
- Object
- BaseController
- CyberSourceMergedSpec::TransactionBatchesController
- Defined in:
- lib/cyber_source_merged_spec/controllers/transaction_batches_controller.rb
Overview
TransactionBatchesController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#get_transaction_batch_details(id, upload_date: nil, status: nil) ⇒ ApiResponse
Provides real-time detailed status information about the transactions that you previously uploaded in the Business Center or processed with the Offline Transaction File Submission service.
-
#get_transaction_batch_id(id) ⇒ ApiResponse
This API provides details like upload date, completion date, transaction count and accepted and rejected transaction count of the individual batch file using the batch id template.
-
#get_transaction_batches(start_time, end_time) ⇒ ApiResponse
Provide the date and time search range to get a list of Batch Files ready for settlement in ISO 8601 format Please refer the following link to know more about ISO 8601 format.[Rfc Date Format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor 14) Example date format: - yyyy-MM-dd'T'HH:mm:ss.SSSZZ ISO 8601 format Please refer the following link to know more about ISO 8601 format.[Rfc Date Format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor 14) Example date format: - yyyy-MM-dd'T'HH:mm:ss.SSSZZ.
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_batch_details(id, upload_date: nil, status: nil) ⇒ ApiResponse
Provides real-time detailed status information about the transactions that you previously uploaded in the Business Center or processed with the Offline Transaction File Submission service. template. batch file was uploaded. Date must be in ISO-8601 format. Please refer the following link to know more about ISO 8601 format.[Rfc Date Format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor 14) Example date format: - yyyy-MM-dd rejected response. Valid values: - Rejected
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/cyber_source_merged_spec/controllers/transaction_batches_controller.rb', line 105 def get_transaction_batch_details(id, upload_date: nil, status: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/pts/v1/transaction-batch-details/{id}', Server::DEFAULT) .template_param(new_parameter(id, key: 'id') .is_required(true) .should_encode(true)) .query_param(new_parameter(upload_date, key: 'uploadDate')) .query_param(new_parameter(status, key: 'status')) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .is_response_void(true) .is_api_response(true) .local_error('400', 'Bad Request', PtsV1TransactionBatchDetailsGet400ResponseException) .local_error('401', 'Not Authorized', PtsV1TransactionBatchDetailsGet401ResponseException) .local_error('403', 'No Authenticated', PtsV1TransactionBatchDetailsGet403ResponseException) .local_error('404', 'No Reports Found', PtsV1TransactionBatchDetailsGet404ResponseException) .local_error('502', 'Bad Gateway', PtsV1TransactionBatchDetailsGet502ResponseException)) .execute end |
#get_transaction_batch_id(id) ⇒ ApiResponse
This API provides details like upload date, completion date, transaction count and accepted and rejected transaction count of the individual batch file using the batch id template.
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 |
# File 'lib/cyber_source_merged_spec/controllers/transaction_batches_controller.rb', line 61 def get_transaction_batch_id(id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/pts/v1/transaction-batches/{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(PtsV1TransactionBatchesIdGet200Response.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Request', PtsV1TransactionBatchesGet400ResponseException) .local_error('401', 'Not Authorized', PtsV1TransactionBatchesGet401ResponseException) .local_error('403', 'No Authenticated', PtsV1TransactionBatchesGet403ResponseException) .local_error('404', 'No Reports Found', PtsV1TransactionBatchesGet404ResponseException) .local_error('502', 'Bad Gateway', PtsV1TransactionBatchesGet502ResponseException)) .execute end |
#get_transaction_batches(start_time, end_time) ⇒ ApiResponse
Provide the date and time search range to get a list of Batch Files ready for settlement in ISO 8601 format Please refer the following link to know more about ISO 8601 format.[Rfc Date Format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor 14) Example date format: - yyyy-MM-dd'T'HH:mm:ss.SSSZZ ISO 8601 format Please refer the following link to know more about ISO 8601 format.[Rfc Date Format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor 14) Example date format: - yyyy-MM-dd'T'HH:mm:ss.SSSZZ
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/cyber_source_merged_spec/controllers/transaction_batches_controller.rb', line 22 def get_transaction_batches(start_time, end_time) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/pts/v1/transaction-batches', Server::DEFAULT) .query_param(new_parameter(start_time, key: 'startTime') .is_required(true)) .query_param(new_parameter(end_time, key: 'endTime') .is_required(true)) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(PtsV1TransactionBatchesGet200Response.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Request', PtsV1TransactionBatchesGet400ResponseException) .local_error('401', 'Not Authorized', PtsV1TransactionBatchesGet401ResponseException) .local_error('403', 'No Authenticated', PtsV1TransactionBatchesGet403ResponseException) .local_error('404', 'No Reports Found', PtsV1TransactionBatchesGet404ResponseException) .local_error('500', 'Bad Gateway', PtsV1TransactionBatchesGet500ResponseException)) .execute end |