Class: CityPayApiClient::BatchProcessingApi
- Inherits:
-
Object
- Object
- CityPayApiClient::BatchProcessingApi
- Defined in:
- lib/citypay_api_client/api/batch_processing_api__.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#batch_process_request(process_batch_request, opts = {}) ⇒ ProcessBatchResponse
Batch Process Request A batch process request is used to start the batch process workflow by uploading batch data and initialising a new batch for processing.
-
#batch_process_request_with_http_info(process_batch_request, opts = {}) ⇒ Array<(ProcessBatchResponse, Integer, Hash)>
Batch Process Request A batch process request is used to start the batch process workflow by uploading batch data and initialising a new batch for processing.
-
#batch_retrieve_request(batch_report_request, opts = {}) ⇒ BatchReportResponseModel
Batch Retrieve Request Obtains a batch and installment (BIS) report for a given batch id.
-
#batch_retrieve_request_with_http_info(batch_report_request, opts = {}) ⇒ Array<(BatchReportResponseModel, Integer, Hash)>
Batch Retrieve Request Obtains a batch and installment (BIS) report for a given batch id.
-
#check_batch_status_request(check_batch_status, opts = {}) ⇒ CheckBatchStatusResponse
Check Batch Status The operation is used to retrieve the status of a batch process.
-
#check_batch_status_request_with_http_info(check_batch_status, opts = {}) ⇒ Array<(CheckBatchStatusResponse, Integer, Hash)>
Check Batch Status The operation is used to retrieve the status of a batch process.
-
#initialize(api_client = ApiClient.default) ⇒ BatchProcessingApi
constructor
A new instance of BatchProcessingApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ BatchProcessingApi
Returns a new instance of BatchProcessingApi.
18 19 20 |
# File 'lib/citypay_api_client/api/batch_processing_api__.rb', line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/citypay_api_client/api/batch_processing_api__.rb', line 16 def api_client @api_client end |
Instance Method Details
#batch_process_request(process_batch_request, opts = {}) ⇒ ProcessBatchResponse
Batch Process Request A batch process request is used to start the batch process workflow by uploading batch data and initialising a new batch for processing. Once validated the batch will be queued for processing and further updates can be received by a subsequent call to retrieve the batch status.
26 27 28 29 |
# File 'lib/citypay_api_client/api/batch_processing_api__.rb', line 26 def batch_process_request(process_batch_request, opts = {}) data, _status_code, _headers = batch_process_request_with_http_info(process_batch_request, opts) data end |
#batch_process_request_with_http_info(process_batch_request, opts = {}) ⇒ Array<(ProcessBatchResponse, Integer, Hash)>
Batch Process Request A batch process request is used to start the batch process workflow by uploading batch data and initialising a new batch for processing. Once validated the batch will be queued for processing and further updates can be received by a subsequent call to retrieve the batch status.
36 37 38 39 40 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 |
# File 'lib/citypay_api_client/api/batch_processing_api__.rb', line 36 def batch_process_request_with_http_info(process_batch_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BatchProcessingApi.batch_process_request ...' end # verify the required parameter 'process_batch_request' is set if @api_client.config.client_side_validation && process_batch_request.nil? fail ArgumentError, "Missing the required parameter 'process_batch_request' when calling BatchProcessingApi.batch_process_request" end # resource path local_var_path = '/v6/batch/process' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(process_batch_request) # return_type return_type = opts[:debug_return_type] || 'ProcessBatchResponse' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"BatchProcessingApi.batch_process_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BatchProcessingApi#batch_process_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#batch_retrieve_request(batch_report_request, opts = {}) ⇒ BatchReportResponseModel
Batch Retrieve Request Obtains a batch and installment (BIS) report for a given batch id.
94 95 96 97 |
# File 'lib/citypay_api_client/api/batch_processing_api__.rb', line 94 def batch_retrieve_request(batch_report_request, opts = {}) data, _status_code, _headers = batch_retrieve_request_with_http_info(batch_report_request, opts) data end |
#batch_retrieve_request_with_http_info(batch_report_request, opts = {}) ⇒ Array<(BatchReportResponseModel, Integer, Hash)>
Batch Retrieve Request Obtains a batch and installment (BIS) report for a given batch id.
104 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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/citypay_api_client/api/batch_processing_api__.rb', line 104 def batch_retrieve_request_with_http_info(batch_report_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BatchProcessingApi.batch_retrieve_request ...' end # verify the required parameter 'batch_report_request' is set if @api_client.config.client_side_validation && batch_report_request.nil? fail ArgumentError, "Missing the required parameter 'batch_report_request' when calling BatchProcessingApi.batch_retrieve_request" end # resource path local_var_path = '/v6/batch/retrieve' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_report_request) # return_type return_type = opts[:debug_return_type] || 'BatchReportResponseModel' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"BatchProcessingApi.batch_retrieve_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BatchProcessingApi#batch_retrieve_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#check_batch_status_request(check_batch_status, opts = {}) ⇒ CheckBatchStatusResponse
Check Batch Status The operation is used to retrieve the status of a batch process.
162 163 164 165 |
# File 'lib/citypay_api_client/api/batch_processing_api__.rb', line 162 def check_batch_status_request(check_batch_status, opts = {}) data, _status_code, _headers = check_batch_status_request_with_http_info(check_batch_status, opts) data end |
#check_batch_status_request_with_http_info(check_batch_status, opts = {}) ⇒ Array<(CheckBatchStatusResponse, Integer, Hash)>
Check Batch Status The operation is used to retrieve the status of a batch process.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/citypay_api_client/api/batch_processing_api__.rb', line 172 def check_batch_status_request_with_http_info(check_batch_status, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BatchProcessingApi.check_batch_status_request ...' end # verify the required parameter 'check_batch_status' is set if @api_client.config.client_side_validation && check_batch_status.nil? fail ArgumentError, "Missing the required parameter 'check_batch_status' when calling BatchProcessingApi.check_batch_status_request" end # resource path local_var_path = '/v6/batch/status' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(check_batch_status) # return_type return_type = opts[:debug_return_type] || 'CheckBatchStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"BatchProcessingApi.check_batch_status_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BatchProcessingApi#check_batch_status_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |