Method: OpenapiClient::XHRVerticallyIntegratedApi#xhr_payruns20230301_with_http_info

Defined in:
lib/openapi_client/api/xhr_vertically_integrated_api.rb

#xhr_payruns20230301_with_http_info(start_date, end_date, opts = {}) ⇒ Array<(Array<PayrunResponse>, Integer, Hash)>

Payruns List all the pay runs that occurred during the respective period. Supported integrations: - brain payroll - brightpay connect - deel - gusto - justworks - moorepay - onpay - oyster - parolla.ie - paycircle - payfit - pento.io - quickbooks online - remote.com - sageone - shape payroll - simplepay.ie - staffology - xero uk

Parameters:

  • start_date (Date)

    The start date of the search period

  • end_date (Date)

    The end date of the search period

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

    the optional parameters

Returns:

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

    Array<PayrunResponse> data, response status code and response headers



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
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/openapi_client/api/xhr_vertically_integrated_api.rb', line 270

def xhr_payruns20230301_with_http_info(start_date, end_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XHRVerticallyIntegratedApi.xhr_payruns20230301 ...'
  end
  # verify the required parameter 'start_date' is set
  if @api_client.config.client_side_validation && start_date.nil?
    fail ArgumentError, "Missing the required parameter 'start_date' when calling XHRVerticallyIntegratedApi.xhr_payruns20230301"
  end
  # verify the required parameter 'end_date' is set
  if @api_client.config.client_side_validation && end_date.nil?
    fail ArgumentError, "Missing the required parameter 'end_date' when calling XHRVerticallyIntegratedApi.xhr_payruns20230301"
  end
  # resource path
  local_var_path = '/2023-03-01/xhr/payruns'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'start_date'] = start_date
  query_params[:'end_date'] = end_date

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<PayrunResponse>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['access-token']

  new_options = opts.merge(
    :operation => :"XHRVerticallyIntegratedApi.xhr_payruns20230301",
    :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: XHRVerticallyIntegratedApi#xhr_payruns20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end