Class: CityPayApiClient::ReportingApi

Inherits:
Object
  • Object
show all
Defined in:
lib/citypay_api_client/api/reporting_api__.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ReportingApi

Returns a new instance of ReportingApi.



18
19
20
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 18

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



16
17
18
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 16

def api_client
  @api_client
end

Instance Method Details

#batched_transaction_report_request(merchantid, batch_no, batch_transaction_report_request, opts = {}) ⇒ BatchTransactionReportResponse

Batch Transaction Report Request Retrieves transactions available on a given batch.

Parameters:

  • merchantid (Integer)

    A merchant ID (MID) for which data is requested. This field allows for filtering of the request by a specific merchant account.

  • batch_no (String)

    The batch number that is being requested.

  • batch_transaction_report_request (BatchTransactionReportRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 28

def batched_transaction_report_request(merchantid, batch_no, batch_transaction_report_request, opts = {})
  data, _status_code, _headers = batched_transaction_report_request_with_http_info(merchantid, batch_no, batch_transaction_report_request, opts)
  data
end

#batched_transaction_report_request_with_http_info(merchantid, batch_no, batch_transaction_report_request, opts = {}) ⇒ Array<(BatchTransactionReportResponse, Integer, Hash)>

Batch Transaction Report Request Retrieves transactions available on a given batch.

Parameters:

  • merchantid (Integer)

    A merchant ID (MID) for which data is requested. This field allows for filtering of the request by a specific merchant account.

  • batch_no (String)

    The batch number that is being requested.

  • batch_transaction_report_request (BatchTransactionReportRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 40

def batched_transaction_report_request_with_http_info(merchantid, batch_no, batch_transaction_report_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ReportingApi.batched_transaction_report_request ...'
  end
  # verify the required parameter 'merchantid' is set
  if @api_client.config.client_side_validation && merchantid.nil?
    fail ArgumentError, "Missing the required parameter 'merchantid' when calling ReportingApi.batched_transaction_report_request"
  end
  # verify the required parameter 'batch_no' is set
  if @api_client.config.client_side_validation && batch_no.nil?
    fail ArgumentError, "Missing the required parameter 'batch_no' when calling ReportingApi.batched_transaction_report_request"
  end
  # verify the required parameter 'batch_transaction_report_request' is set
  if @api_client.config.client_side_validation && batch_transaction_report_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_transaction_report_request' when calling ReportingApi.batched_transaction_report_request"
  end
  # resource path
  local_var_path = '/v6/merchant-batch/{merchantid}/{batch_no}/transactions'.sub('{' + 'merchantid' + '}', CGI.escape(merchantid.to_s)).sub('{' + 'batch_no' + '}', CGI.escape(batch_no.to_s))

  # 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_transaction_report_request)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchTransactionReportResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cp-api-key']

  new_options = opts.merge(
    :operation => :"ReportingApi.batched_transaction_report_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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ReportingApi#batched_transaction_report_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#merchant_batch_report_request(merchant_batch_report_request, opts = {}) ⇒ MerchantBatchReportResponse

Merchant Batch Report Request Retrieves a report of merchant batches within a specified date range. Batches, which aggregate daily processing activities, are typically generated at ‘00:00` each day. These batches play a crucial role in the settlement of funds by summarising daily transactions.

Parameters:

Returns:



106
107
108
109
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 106

def merchant_batch_report_request(merchant_batch_report_request, opts = {})
  data, _status_code, _headers = merchant_batch_report_request_with_http_info(merchant_batch_report_request, opts)
  data
end

#merchant_batch_report_request_with_http_info(merchant_batch_report_request, opts = {}) ⇒ Array<(MerchantBatchReportResponse, Integer, Hash)>

Merchant Batch Report Request Retrieves a report of merchant batches within a specified date range. Batches, which aggregate daily processing activities, are typically generated at &#x60;00:00&#x60; each day. These batches play a crucial role in the settlement of funds by summarising daily transactions.

Parameters:

Returns:

  • (Array<(MerchantBatchReportResponse, Integer, Hash)>)

    MerchantBatchReportResponse data, response status code and response headers



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
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 116

def merchant_batch_report_request_with_http_info(merchant_batch_report_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ReportingApi.merchant_batch_report_request ...'
  end
  # verify the required parameter 'merchant_batch_report_request' is set
  if @api_client.config.client_side_validation && merchant_batch_report_request.nil?
    fail ArgumentError, "Missing the required parameter 'merchant_batch_report_request' when calling ReportingApi.merchant_batch_report_request"
  end
  # resource path
  local_var_path = '/v6/merchant-batch/report'

  # 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(merchant_batch_report_request)

  # return_type
  return_type = opts[:debug_return_type] || 'MerchantBatchReportResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cp-api-key']

  new_options = opts.merge(
    :operation => :"ReportingApi.merchant_batch_report_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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ReportingApi#merchant_batch_report_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#merchant_batch_request(merchantid, batch_no, opts = {}) ⇒ MerchantBatchResponse

Merchant Batch Request Retrieves a report of merchant a merchant batch for a specified batch number.

Parameters:

  • merchantid (Integer)

    A merchant ID (MID) for which data is requested. This field allows for filtering of the request by a specific merchant account.

  • batch_no (String)

    The batch number that is being requested.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



175
176
177
178
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 175

def merchant_batch_request(merchantid, batch_no, opts = {})
  data, _status_code, _headers = merchant_batch_request_with_http_info(merchantid, batch_no, opts)
  data
end

#merchant_batch_request_with_http_info(merchantid, batch_no, opts = {}) ⇒ Array<(MerchantBatchResponse, Integer, Hash)>

Merchant Batch Request Retrieves a report of merchant a merchant batch for a specified batch number.

Parameters:

  • merchantid (Integer)

    A merchant ID (MID) for which data is requested. This field allows for filtering of the request by a specific merchant account.

  • batch_no (String)

    The batch number that is being requested.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MerchantBatchResponse, Integer, Hash)>)

    MerchantBatchResponse data, response status code and response headers



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
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 186

def merchant_batch_request_with_http_info(merchantid, batch_no, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ReportingApi.merchant_batch_request ...'
  end
  # verify the required parameter 'merchantid' is set
  if @api_client.config.client_side_validation && merchantid.nil?
    fail ArgumentError, "Missing the required parameter 'merchantid' when calling ReportingApi.merchant_batch_request"
  end
  # verify the required parameter 'batch_no' is set
  if @api_client.config.client_side_validation && batch_no.nil?
    fail ArgumentError, "Missing the required parameter 'batch_no' when calling ReportingApi.merchant_batch_request"
  end
  # resource path
  local_var_path = '/v6/merchant-batch/{merchantid}/{batch_no}'.sub('{' + 'merchantid' + '}', CGI.escape(merchantid.to_s)).sub('{' + 'batch_no' + '}', CGI.escape(batch_no.to_s))

  # 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'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MerchantBatchResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cp-api-key']

  new_options = opts.merge(
    :operation => :"ReportingApi.merchant_batch_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ReportingApi#merchant_batch_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remittance_range_report(clientid, remittance_report_request, opts = {}) ⇒ RemittanceReportResponse

Remittance Report Request Fetches remittance reports for financial transactions within a specified date range, covering all client-related activities. This report consolidates all batches disbursed to a client, with each remittance summarising the aggregation of batches leading up to settlement. Additionally, the net remittance amount presented in the final settlement will reflect any deductions made by the acquirer.

Parameters:

  • clientid (String)

    A client Id for which data is requested.

  • remittance_report_request (RemittanceReportRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



244
245
246
247
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 244

def remittance_range_report(clientid, remittance_report_request, opts = {})
  data, _status_code, _headers = remittance_range_report_with_http_info(clientid, remittance_report_request, opts)
  data
end

#remittance_range_report_with_http_info(clientid, remittance_report_request, opts = {}) ⇒ Array<(RemittanceReportResponse, Integer, Hash)>

Remittance Report Request Fetches remittance reports for financial transactions within a specified date range, covering all client-related activities. This report consolidates all batches disbursed to a client, with each remittance summarising the aggregation of batches leading up to settlement. Additionally, the net remittance amount presented in the final settlement will reflect any deductions made by the acquirer.

Parameters:

  • clientid (String)

    A client Id for which data is requested.

  • remittance_report_request (RemittanceReportRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RemittanceReportResponse, Integer, Hash)>)

    RemittanceReportResponse data, response status code and response headers



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 255

def remittance_range_report_with_http_info(clientid, remittance_report_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ReportingApi.remittance_range_report ...'
  end
  # verify the required parameter 'clientid' is set
  if @api_client.config.client_side_validation && clientid.nil?
    fail ArgumentError, "Missing the required parameter 'clientid' when calling ReportingApi.remittance_range_report"
  end
  # verify the required parameter 'remittance_report_request' is set
  if @api_client.config.client_side_validation && remittance_report_request.nil?
    fail ArgumentError, "Missing the required parameter 'remittance_report_request' when calling ReportingApi.remittance_range_report"
  end
  # resource path
  local_var_path = '/v6/remittance/report/{clientid}'.sub('{' + 'clientid' + '}', CGI.escape(clientid.to_s))

  # 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(remittance_report_request)

  # return_type
  return_type = opts[:debug_return_type] || 'RemittanceReportResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cp-api-key']

  new_options = opts.merge(
    :operation => :"ReportingApi.remittance_range_report",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ReportingApi#remittance_range_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remittance_report_request(clientid, date, opts = {}) ⇒ RemittedClientData

Remittance Date Report Request Fetches remittance reports for financial transactions for a given date, covering all client-related activities. This report consolidates all batches disbursed to a client, with each remittance summarising the aggregation of batches leading up to settlement. Additionally, the net remittance amount presented in the final settlement will reflect any deductions made by the acquirer. The process also supports the notion of today deferring the date to today’s date or latest reflecting the latest remittance date available.

Parameters:

  • clientid (String)

    A client Id for which data is requested.

  • date (String)

    Date (YYYY-MM-DD) to filter the request for.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



318
319
320
321
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 318

def remittance_report_request(clientid, date, opts = {})
  data, _status_code, _headers = remittance_report_request_with_http_info(clientid, date, opts)
  data
end

#remittance_report_request_with_http_info(clientid, date, opts = {}) ⇒ Array<(RemittedClientData, Integer, Hash)>

Remittance Date Report Request Fetches remittance reports for financial transactions for a given date, covering all client-related activities. This report consolidates all batches disbursed to a client, with each remittance summarising the aggregation of batches leading up to settlement. Additionally, the net remittance amount presented in the final settlement will reflect any deductions made by the acquirer. The process also supports the notion of today deferring the date to today&#39;s date or latest reflecting the latest remittance date available.

Parameters:

  • clientid (String)

    A client Id for which data is requested.

  • date (String)

    Date (YYYY-MM-DD) to filter the request for.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RemittedClientData, Integer, Hash)>)

    RemittedClientData data, response status code and response headers



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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/citypay_api_client/api/reporting_api__.rb', line 329

def remittance_report_request_with_http_info(clientid, date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ReportingApi.remittance_report_request ...'
  end
  # verify the required parameter 'clientid' is set
  if @api_client.config.client_side_validation && clientid.nil?
    fail ArgumentError, "Missing the required parameter 'clientid' when calling ReportingApi.remittance_report_request"
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling ReportingApi.remittance_report_request"
  end
  # resource path
  local_var_path = '/v6/remittance/report/{clientid}/{date}'.sub('{' + 'clientid' + '}', CGI.escape(clientid.to_s)).sub('{' + 'date' + '}', CGI.escape(date.to_s))

  # 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'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'RemittedClientData'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cp-api-key']

  new_options = opts.merge(
    :operation => :"ReportingApi.remittance_report_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ReportingApi#remittance_report_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end