class XeroRuby::PayrollUkApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.new) click to toggle source
# File lib/xero-ruby/api/payroll_uk_api.rb, line 16
def initialize(api_client = ApiClient.new)
  @api_client = api_client
end

Public Instance Methods

approve_timesheet(xero_tenant_id, timesheet_id, opts = {}) click to toggle source

Approves a specific timesheet @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param [Hash] opts the optional parameters @return [TimesheetObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 24
def approve_timesheet(xero_tenant_id, timesheet_id, opts = {})
  data, _status_code, _headers = approve_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
  data
end
approve_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {}) click to toggle source

Approves a specific timesheet @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param [Hash] opts the optional parameters @return [Array<(TimesheetObject, Integer, Hash)>] TimesheetObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 34
def approve_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.approve_timesheet ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.approve_timesheet"
  end
  # verify the required parameter 'timesheet_id' is set
  if @api_client.config.client_side_validation && timesheet_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollUkApi.approve_timesheet"
  end
  # resource path
  local_var_path = '/Timesheets/{TimesheetID}/Approve'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'TimesheetObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#approve_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_benefit(xero_tenant_id, benefit, opts = {}) click to toggle source

Creates a new employee benefit @param xero_tenant_id [String] Xero identifier for Tenant @param benefit [Benefit] @param [Hash] opts the optional parameters @return [BenefitObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 99
def create_benefit(xero_tenant_id, benefit, opts = {})
  data, _status_code, _headers = create_benefit_with_http_info(xero_tenant_id, benefit, opts)
  data
end
create_benefit_with_http_info(xero_tenant_id, benefit, options = {}) click to toggle source

Creates a new employee benefit @param xero_tenant_id [String] Xero identifier for Tenant @param benefit [Benefit] @param [Hash] opts the optional parameters @return [Array<(BenefitObject, Integer, Hash)>] BenefitObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 109
def create_benefit_with_http_info(xero_tenant_id, benefit, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_benefit ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_benefit"
  end
  # verify the required parameter 'benefit' is set
  if @api_client.config.client_side_validation && benefit.nil?
    fail ArgumentError, "Missing the required parameter 'benefit' when calling PayrollUkApi.create_benefit"
  end
  # resource path
  local_var_path = '/Benefits'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(benefit) 

  # return_type
  return_type = opts[:return_type] || 'BenefitObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_benefit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_deduction(xero_tenant_id, deduction, opts = {}) click to toggle source

Creates a new deduction @param xero_tenant_id [String] Xero identifier for Tenant @param deduction [Deduction] @param [Hash] opts the optional parameters @return [DeductionObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 176
def create_deduction(xero_tenant_id, deduction, opts = {})
  data, _status_code, _headers = create_deduction_with_http_info(xero_tenant_id, deduction, opts)
  data
end
create_deduction_with_http_info(xero_tenant_id, deduction, options = {}) click to toggle source

Creates a new deduction @param xero_tenant_id [String] Xero identifier for Tenant @param deduction [Deduction] @param [Hash] opts the optional parameters @return [Array<(DeductionObject, Integer, Hash)>] DeductionObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 186
def create_deduction_with_http_info(xero_tenant_id, deduction, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_deduction ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_deduction"
  end
  # verify the required parameter 'deduction' is set
  if @api_client.config.client_side_validation && deduction.nil?
    fail ArgumentError, "Missing the required parameter 'deduction' when calling PayrollUkApi.create_deduction"
  end
  # resource path
  local_var_path = '/Deductions'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(deduction) 

  # return_type
  return_type = opts[:return_type] || 'DeductionObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_deduction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_earnings_rate(xero_tenant_id, earnings_rate, opts = {}) click to toggle source

Creates a new earnings rate @param xero_tenant_id [String] Xero identifier for Tenant @param earnings_rate [EarningsRate] @param [Hash] opts the optional parameters @return [EarningsRateObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 253
def create_earnings_rate(xero_tenant_id, earnings_rate, opts = {})
  data, _status_code, _headers = create_earnings_rate_with_http_info(xero_tenant_id, earnings_rate, opts)
  data
end
create_earnings_rate_with_http_info(xero_tenant_id, earnings_rate, options = {}) click to toggle source

Creates a new earnings rate @param xero_tenant_id [String] Xero identifier for Tenant @param earnings_rate [EarningsRate] @param [Hash] opts the optional parameters @return [Array<(EarningsRateObject, Integer, Hash)>] EarningsRateObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 263
def create_earnings_rate_with_http_info(xero_tenant_id, earnings_rate, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_earnings_rate ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_earnings_rate"
  end
  # verify the required parameter 'earnings_rate' is set
  if @api_client.config.client_side_validation && earnings_rate.nil?
    fail ArgumentError, "Missing the required parameter 'earnings_rate' when calling PayrollUkApi.create_earnings_rate"
  end
  # resource path
  local_var_path = '/EarningsRates'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(earnings_rate) 

  # return_type
  return_type = opts[:return_type] || 'EarningsRateObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_earnings_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_employee(xero_tenant_id, employee, opts = {}) click to toggle source

Creates employees @param xero_tenant_id [String] Xero identifier for Tenant @param employee [Employee] @param [Hash] opts the optional parameters @return [EmployeeObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 330
def create_employee(xero_tenant_id, employee, opts = {})
  data, _status_code, _headers = create_employee_with_http_info(xero_tenant_id, employee, opts)
  data
end
create_employee_earnings_template(xero_tenant_id, employee_id, earnings_template, opts = {}) click to toggle source

Creates an earnings template records for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param earnings_template [EarningsTemplate] @param [Hash] opts the optional parameters @return [EarningsTemplateObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 408
def create_employee_earnings_template(xero_tenant_id, employee_id, earnings_template, opts = {})
  data, _status_code, _headers = create_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, opts)
  data
end
create_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, options = {}) click to toggle source

Creates an earnings template records for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param earnings_template [EarningsTemplate] @param [Hash] opts the optional parameters @return [Array<(EarningsTemplateObject, Integer, Hash)>] EarningsTemplateObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 419
def create_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_employee_earnings_template ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_employee_earnings_template"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.create_employee_earnings_template"
  end
  # verify the required parameter 'earnings_template' is set
  if @api_client.config.client_side_validation && earnings_template.nil?
    fail ArgumentError, "Missing the required parameter 'earnings_template' when calling PayrollUkApi.create_employee_earnings_template"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/PayTemplates/earnings'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(earnings_template) 

  # return_type
  return_type = opts[:return_type] || 'EarningsTemplateObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_employee_earnings_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_employee_leave(xero_tenant_id, employee_id, employee_leave, opts = {}) click to toggle source

Creates leave records for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_leave [EmployeeLeave] @param [Hash] opts the optional parameters @return [EmployeeLeaveObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 491
def create_employee_leave(xero_tenant_id, employee_id, employee_leave, opts = {})
  data, _status_code, _headers = create_employee_leave_with_http_info(xero_tenant_id, employee_id, employee_leave, opts)
  data
end
create_employee_leave_type(xero_tenant_id, employee_id, employee_leave_type, opts = {}) click to toggle source

Creates employee leave type records @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_leave_type [EmployeeLeaveType] @param [Hash] opts the optional parameters @return [EmployeeLeaveTypeObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 574
def create_employee_leave_type(xero_tenant_id, employee_id, employee_leave_type, opts = {})
  data, _status_code, _headers = create_employee_leave_type_with_http_info(xero_tenant_id, employee_id, employee_leave_type, opts)
  data
end
create_employee_leave_type_with_http_info(xero_tenant_id, employee_id, employee_leave_type, options = {}) click to toggle source

Creates employee leave type records @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_leave_type [EmployeeLeaveType] @param [Hash] opts the optional parameters @return [Array<(EmployeeLeaveTypeObject, Integer, Hash)>] EmployeeLeaveTypeObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 585
def create_employee_leave_type_with_http_info(xero_tenant_id, employee_id, employee_leave_type, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_employee_leave_type ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_employee_leave_type"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.create_employee_leave_type"
  end
  # verify the required parameter 'employee_leave_type' is set
  if @api_client.config.client_side_validation && employee_leave_type.nil?
    fail ArgumentError, "Missing the required parameter 'employee_leave_type' when calling PayrollUkApi.create_employee_leave_type"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/LeaveTypes'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employee_leave_type) 

  # return_type
  return_type = opts[:return_type] || 'EmployeeLeaveTypeObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_employee_leave_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_employee_leave_with_http_info(xero_tenant_id, employee_id, employee_leave, options = {}) click to toggle source

Creates leave records for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_leave [EmployeeLeave] @param [Hash] opts the optional parameters @return [Array<(EmployeeLeaveObject, Integer, Hash)>] EmployeeLeaveObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 502
def create_employee_leave_with_http_info(xero_tenant_id, employee_id, employee_leave, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_employee_leave ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_employee_leave"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.create_employee_leave"
  end
  # verify the required parameter 'employee_leave' is set
  if @api_client.config.client_side_validation && employee_leave.nil?
    fail ArgumentError, "Missing the required parameter 'employee_leave' when calling PayrollUkApi.create_employee_leave"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/Leave'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employee_leave) 

  # return_type
  return_type = opts[:return_type] || 'EmployeeLeaveObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_employee_leave\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_employee_opening_balances(xero_tenant_id, employee_id, employee_opening_balances, opts = {}) click to toggle source

Creates an opening balance for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_opening_balances [EmployeeOpeningBalances] @param [Hash] opts the optional parameters @return [EmployeeOpeningBalancesObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 657
def create_employee_opening_balances(xero_tenant_id, employee_id, employee_opening_balances, opts = {})
  data, _status_code, _headers = create_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, employee_opening_balances, opts)
  data
end
create_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, employee_opening_balances, options = {}) click to toggle source

Creates an opening balance for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_opening_balances [EmployeeOpeningBalances] @param [Hash] opts the optional parameters @return [Array<(EmployeeOpeningBalancesObject, Integer, Hash)>] EmployeeOpeningBalancesObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 668
def create_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, employee_opening_balances, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_employee_opening_balances ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_employee_opening_balances"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.create_employee_opening_balances"
  end
  # verify the required parameter 'employee_opening_balances' is set
  if @api_client.config.client_side_validation && employee_opening_balances.nil?
    fail ArgumentError, "Missing the required parameter 'employee_opening_balances' when calling PayrollUkApi.create_employee_opening_balances"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/ukopeningbalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employee_opening_balances) 

  # return_type
  return_type = opts[:return_type] || 'EmployeeOpeningBalancesObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_employee_opening_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_employee_payment_method(xero_tenant_id, employee_id, payment_method, opts = {}) click to toggle source

Creates an employee payment method @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param payment_method [PaymentMethod] @param [Hash] opts the optional parameters @return [PaymentMethodObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 740
def create_employee_payment_method(xero_tenant_id, employee_id, payment_method, opts = {})
  data, _status_code, _headers = create_employee_payment_method_with_http_info(xero_tenant_id, employee_id, payment_method, opts)
  data
end
create_employee_payment_method_with_http_info(xero_tenant_id, employee_id, payment_method, options = {}) click to toggle source

Creates an employee payment method @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param payment_method [PaymentMethod] @param [Hash] opts the optional parameters @return [Array<(PaymentMethodObject, Integer, Hash)>] PaymentMethodObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 751
def create_employee_payment_method_with_http_info(xero_tenant_id, employee_id, payment_method, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_employee_payment_method ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_employee_payment_method"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.create_employee_payment_method"
  end
  # verify the required parameter 'payment_method' is set
  if @api_client.config.client_side_validation && payment_method.nil?
    fail ArgumentError, "Missing the required parameter 'payment_method' when calling PayrollUkApi.create_employee_payment_method"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/PaymentMethods'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(payment_method) 

  # return_type
  return_type = opts[:return_type] || 'PaymentMethodObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_employee_payment_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wage, opts = {}) click to toggle source

Creates a salary and wage record for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param salary_and_wage [SalaryAndWage] @param [Hash] opts the optional parameters @return [SalaryAndWageObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 823
def create_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wage, opts = {})
  data, _status_code, _headers = create_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wage, opts)
  data
end
create_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wage, options = {}) click to toggle source

Creates a salary and wage record for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param salary_and_wage [SalaryAndWage] @param [Hash] opts the optional parameters @return [Array<(SalaryAndWageObject, Integer, Hash)>] SalaryAndWageObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 834
def create_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wage, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_employee_salary_and_wage ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_employee_salary_and_wage"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.create_employee_salary_and_wage"
  end
  # verify the required parameter 'salary_and_wage' is set
  if @api_client.config.client_side_validation && salary_and_wage.nil?
    fail ArgumentError, "Missing the required parameter 'salary_and_wage' when calling PayrollUkApi.create_employee_salary_and_wage"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/SalaryAndWages'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(salary_and_wage) 

  # return_type
  return_type = opts[:return_type] || 'SalaryAndWageObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_employee_salary_and_wage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_employee_statutory_sick_leave(xero_tenant_id, employee_statutory_sick_leave, opts = {}) click to toggle source

Creates statutory sick leave records @param xero_tenant_id [String] Xero identifier for Tenant @param employee_statutory_sick_leave [EmployeeStatutorySickLeave] @param [Hash] opts the optional parameters @return [EmployeeStatutorySickLeaveObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 905
def create_employee_statutory_sick_leave(xero_tenant_id, employee_statutory_sick_leave, opts = {})
  data, _status_code, _headers = create_employee_statutory_sick_leave_with_http_info(xero_tenant_id, employee_statutory_sick_leave, opts)
  data
end
create_employee_statutory_sick_leave_with_http_info(xero_tenant_id, employee_statutory_sick_leave, options = {}) click to toggle source

Creates statutory sick leave records @param xero_tenant_id [String] Xero identifier for Tenant @param employee_statutory_sick_leave [EmployeeStatutorySickLeave] @param [Hash] opts the optional parameters @return [Array<(EmployeeStatutorySickLeaveObject, Integer, Hash)>] EmployeeStatutorySickLeaveObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 915
def create_employee_statutory_sick_leave_with_http_info(xero_tenant_id, employee_statutory_sick_leave, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_employee_statutory_sick_leave ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_employee_statutory_sick_leave"
  end
  # verify the required parameter 'employee_statutory_sick_leave' is set
  if @api_client.config.client_side_validation && employee_statutory_sick_leave.nil?
    fail ArgumentError, "Missing the required parameter 'employee_statutory_sick_leave' when calling PayrollUkApi.create_employee_statutory_sick_leave"
  end
  # resource path
  local_var_path = '/StatutoryLeaves/Sick'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employee_statutory_sick_leave) 

  # return_type
  return_type = opts[:return_type] || 'EmployeeStatutorySickLeaveObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_employee_statutory_sick_leave\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_employee_with_http_info(xero_tenant_id, employee, options = {}) click to toggle source

Creates employees @param xero_tenant_id [String] Xero identifier for Tenant @param employee [Employee] @param [Hash] opts the optional parameters @return [Array<(EmployeeObject, Integer, Hash)>] EmployeeObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 340
def create_employee_with_http_info(xero_tenant_id, employee, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_employee ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_employee"
  end
  # verify the required parameter 'employee' is set
  if @api_client.config.client_side_validation && employee.nil?
    fail ArgumentError, "Missing the required parameter 'employee' when calling PayrollUkApi.create_employee"
  end
  # resource path
  local_var_path = '/Employees'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employee) 

  # return_type
  return_type = opts[:return_type] || 'EmployeeObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_employment(xero_tenant_id, employee_id, employment, opts = {}) click to toggle source

Creates employment detail for a specific employee using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employment [Employment] @param [Hash] opts the optional parameters @return [EmploymentObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 983
def create_employment(xero_tenant_id, employee_id, employment, opts = {})
  data, _status_code, _headers = create_employment_with_http_info(xero_tenant_id, employee_id, employment, opts)
  data
end
create_employment_with_http_info(xero_tenant_id, employee_id, employment, options = {}) click to toggle source

Creates employment detail for a specific employee using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employment [Employment] @param [Hash] opts the optional parameters @return [Array<(EmploymentObject, Integer, Hash)>] EmploymentObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 994
def create_employment_with_http_info(xero_tenant_id, employee_id, employment, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_employment ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_employment"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.create_employment"
  end
  # verify the required parameter 'employment' is set
  if @api_client.config.client_side_validation && employment.nil?
    fail ArgumentError, "Missing the required parameter 'employment' when calling PayrollUkApi.create_employment"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/Employment'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employment) 

  # return_type
  return_type = opts[:return_type] || 'EmploymentObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_employment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_leave_type(xero_tenant_id, leave_type, opts = {}) click to toggle source

Creates a new leave type @param xero_tenant_id [String] Xero identifier for Tenant @param leave_type [LeaveType] @param [Hash] opts the optional parameters @return [LeaveTypeObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1065
def create_leave_type(xero_tenant_id, leave_type, opts = {})
  data, _status_code, _headers = create_leave_type_with_http_info(xero_tenant_id, leave_type, opts)
  data
end
create_leave_type_with_http_info(xero_tenant_id, leave_type, options = {}) click to toggle source

Creates a new leave type @param xero_tenant_id [String] Xero identifier for Tenant @param leave_type [LeaveType] @param [Hash] opts the optional parameters @return [Array<(LeaveTypeObject, Integer, Hash)>] LeaveTypeObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1075
def create_leave_type_with_http_info(xero_tenant_id, leave_type, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_leave_type ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_leave_type"
  end
  # verify the required parameter 'leave_type' is set
  if @api_client.config.client_side_validation && leave_type.nil?
    fail ArgumentError, "Missing the required parameter 'leave_type' when calling PayrollUkApi.create_leave_type"
  end
  # resource path
  local_var_path = '/LeaveTypes'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(leave_type) 

  # return_type
  return_type = opts[:return_type] || 'LeaveTypeObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_leave_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_multiple_employee_earnings_template(xero_tenant_id, employee_id, earnings_template, opts = {}) click to toggle source

Creates multiple earnings template records for a specific employee using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param earnings_template [Array<EarningsTemplate>] @param [Hash] opts the optional parameters @return [EmployeePayTemplates]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1143
def create_multiple_employee_earnings_template(xero_tenant_id, employee_id, earnings_template, opts = {})
  data, _status_code, _headers = create_multiple_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, opts)
  data
end
create_multiple_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, options = {}) click to toggle source

Creates multiple earnings template records for a specific employee using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param earnings_template [Array<EarningsTemplate>] @param [Hash] opts the optional parameters @return [Array<(EmployeePayTemplates, Integer, Hash)>] EmployeePayTemplates data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1154
def create_multiple_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_multiple_employee_earnings_template ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_multiple_employee_earnings_template"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.create_multiple_employee_earnings_template"
  end
  # verify the required parameter 'earnings_template' is set
  if @api_client.config.client_side_validation && earnings_template.nil?
    fail ArgumentError, "Missing the required parameter 'earnings_template' when calling PayrollUkApi.create_multiple_employee_earnings_template"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/paytemplateearnings'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(earnings_template) 

  # return_type
  return_type = opts[:return_type] || 'EmployeePayTemplates' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_multiple_employee_earnings_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_pay_run_calendar(xero_tenant_id, pay_run_calendar, opts = {}) click to toggle source

Creates a new payrun calendar @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_calendar [PayRunCalendar] @param [Hash] opts the optional parameters @return [PayRunCalendarObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1225
def create_pay_run_calendar(xero_tenant_id, pay_run_calendar, opts = {})
  data, _status_code, _headers = create_pay_run_calendar_with_http_info(xero_tenant_id, pay_run_calendar, opts)
  data
end
create_pay_run_calendar_with_http_info(xero_tenant_id, pay_run_calendar, options = {}) click to toggle source

Creates a new payrun calendar @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_calendar [PayRunCalendar] @param [Hash] opts the optional parameters @return [Array<(PayRunCalendarObject, Integer, Hash)>] PayRunCalendarObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1235
def create_pay_run_calendar_with_http_info(xero_tenant_id, pay_run_calendar, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_pay_run_calendar ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_pay_run_calendar"
  end
  # verify the required parameter 'pay_run_calendar' is set
  if @api_client.config.client_side_validation && pay_run_calendar.nil?
    fail ArgumentError, "Missing the required parameter 'pay_run_calendar' when calling PayrollUkApi.create_pay_run_calendar"
  end
  # resource path
  local_var_path = '/PayRunCalendars'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(pay_run_calendar) 

  # return_type
  return_type = opts[:return_type] || 'PayRunCalendarObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_pay_run_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_reimbursement(xero_tenant_id, reimbursement, opts = {}) click to toggle source

Creates a new reimbursement @param xero_tenant_id [String] Xero identifier for Tenant @param reimbursement [Reimbursement] @param [Hash] opts the optional parameters @return [ReimbursementObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1302
def create_reimbursement(xero_tenant_id, reimbursement, opts = {})
  data, _status_code, _headers = create_reimbursement_with_http_info(xero_tenant_id, reimbursement, opts)
  data
end
create_reimbursement_with_http_info(xero_tenant_id, reimbursement, options = {}) click to toggle source

Creates a new reimbursement @param xero_tenant_id [String] Xero identifier for Tenant @param reimbursement [Reimbursement] @param [Hash] opts the optional parameters @return [Array<(ReimbursementObject, Integer, Hash)>] ReimbursementObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1312
def create_reimbursement_with_http_info(xero_tenant_id, reimbursement, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_reimbursement ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_reimbursement"
  end
  # verify the required parameter 'reimbursement' is set
  if @api_client.config.client_side_validation && reimbursement.nil?
    fail ArgumentError, "Missing the required parameter 'reimbursement' when calling PayrollUkApi.create_reimbursement"
  end
  # resource path
  local_var_path = '/Reimbursements'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(reimbursement) 

  # return_type
  return_type = opts[:return_type] || 'ReimbursementObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_reimbursement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_timesheet(xero_tenant_id, timesheet, opts = {}) click to toggle source

Creates a new timesheet @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet [Timesheet] @param [Hash] opts the optional parameters @return [TimesheetObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1379
def create_timesheet(xero_tenant_id, timesheet, opts = {})
  data, _status_code, _headers = create_timesheet_with_http_info(xero_tenant_id, timesheet, opts)
  data
end
create_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line, opts = {}) click to toggle source

Creates a new timesheet line for a specific timesheet using a unique timesheet ID @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param timesheet_line [TimesheetLine] @param [Hash] opts the optional parameters @return [TimesheetLineObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1457
def create_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line, opts = {})
  data, _status_code, _headers = create_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line, opts)
  data
end
create_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line, options = {}) click to toggle source

Creates a new timesheet line for a specific timesheet using a unique timesheet ID @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param timesheet_line [TimesheetLine] @param [Hash] opts the optional parameters @return [Array<(TimesheetLineObject, Integer, Hash)>] TimesheetLineObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1468
def create_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_timesheet_line ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_timesheet_line"
  end
  # verify the required parameter 'timesheet_id' is set
  if @api_client.config.client_side_validation && timesheet_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollUkApi.create_timesheet_line"
  end
  # verify the required parameter 'timesheet_line' is set
  if @api_client.config.client_side_validation && timesheet_line.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_line' when calling PayrollUkApi.create_timesheet_line"
  end
  # resource path
  local_var_path = '/Timesheets/{TimesheetID}/Lines'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(timesheet_line) 

  # return_type
  return_type = opts[:return_type] || 'TimesheetLineObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_timesheet_line\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_timesheet_with_http_info(xero_tenant_id, timesheet, options = {}) click to toggle source

Creates a new timesheet @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet [Timesheet] @param [Hash] opts the optional parameters @return [Array<(TimesheetObject, Integer, Hash)>] TimesheetObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1389
def create_timesheet_with_http_info(xero_tenant_id, timesheet, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.create_timesheet ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.create_timesheet"
  end
  # verify the required parameter 'timesheet' is set
  if @api_client.config.client_side_validation && timesheet.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet' when calling PayrollUkApi.create_timesheet"
  end
  # resource path
  local_var_path = '/Timesheets'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(timesheet) 

  # return_type
  return_type = opts[:return_type] || 'TimesheetObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#create_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, opts = {}) click to toggle source

Deletes a specific employee's earnings template record @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param pay_template_earning_id [String] Id for single pay template earnings object @param [Hash] opts the optional parameters @return [nil]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1540
def delete_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, opts = {})
  delete_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, opts)
  nil
end
delete_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, options = {}) click to toggle source

Deletes a specific employee&#39;s earnings template record @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param pay_template_earning_id [String] Id for single pay template earnings object @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1551
def delete_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.delete_employee_earnings_template ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.delete_employee_earnings_template"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.delete_employee_earnings_template"
  end
  # verify the required parameter 'pay_template_earning_id' is set
  if @api_client.config.client_side_validation && pay_template_earning_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_template_earning_id' when calling PayrollUkApi.delete_employee_earnings_template"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'PayTemplateEarningID' + '}', pay_template_earning_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:DELETE, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#delete_employee_earnings_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_employee_leave(xero_tenant_id, employee_id, leave_id, opts = {}) click to toggle source

Deletes a specific employee's leave record @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param leave_id [String] Leave id for single object @param [Hash] opts the optional parameters @return [EmployeeLeaveObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1619
def delete_employee_leave(xero_tenant_id, employee_id, leave_id, opts = {})
  data, _status_code, _headers = delete_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, opts)
  data
end
delete_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, options = {}) click to toggle source

Deletes a specific employee&#39;s leave record @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param leave_id [String] Leave id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeeLeaveObject, Integer, Hash)>] EmployeeLeaveObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1630
def delete_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.delete_employee_leave ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.delete_employee_leave"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.delete_employee_leave"
  end
  # verify the required parameter 'leave_id' is set
  if @api_client.config.client_side_validation && leave_id.nil?
    fail ArgumentError, "Missing the required parameter 'leave_id' when calling PayrollUkApi.delete_employee_leave"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/Leave/{LeaveID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'LeaveID' + '}', leave_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeLeaveObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:DELETE, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#delete_employee_leave\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, opts = {}) click to toggle source

Deletes a salary and wages record for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param salary_and_wages_id [String] Id for single salary and wages object @param [Hash] opts the optional parameters @return [nil]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1700
def delete_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, opts = {})
  delete_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, opts)
  nil
end
delete_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, options = {}) click to toggle source

Deletes a salary and wages record for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param salary_and_wages_id [String] Id for single salary and wages object @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1711
def delete_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.delete_employee_salary_and_wage ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.delete_employee_salary_and_wage"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.delete_employee_salary_and_wage"
  end
  # verify the required parameter 'salary_and_wages_id' is set
  if @api_client.config.client_side_validation && salary_and_wages_id.nil?
    fail ArgumentError, "Missing the required parameter 'salary_and_wages_id' when calling PayrollUkApi.delete_employee_salary_and_wage"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'SalaryAndWagesID' + '}', salary_and_wages_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:DELETE, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#delete_employee_salary_and_wage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_timesheet(xero_tenant_id, timesheet_id, opts = {}) click to toggle source

Deletes a specific timesheet @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param [Hash] opts the optional parameters @return [TimesheetLine]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1778
def delete_timesheet(xero_tenant_id, timesheet_id, opts = {})
  data, _status_code, _headers = delete_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
  data
end
delete_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, opts = {}) click to toggle source

Deletes a specific timesheet line @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param timesheet_line_id [String] Identifier for the timesheet line @param [Hash] opts the optional parameters @return [TimesheetLine]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1854
def delete_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, opts = {})
  data, _status_code, _headers = delete_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line_id, opts)
  data
end
delete_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line_id, options = {}) click to toggle source

Deletes a specific timesheet line @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param timesheet_line_id [String] Identifier for the timesheet line @param [Hash] opts the optional parameters @return [Array<(TimesheetLine, Integer, Hash)>] TimesheetLine data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1865
def delete_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.delete_timesheet_line ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.delete_timesheet_line"
  end
  # verify the required parameter 'timesheet_id' is set
  if @api_client.config.client_side_validation && timesheet_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollUkApi.delete_timesheet_line"
  end
  # verify the required parameter 'timesheet_line_id' is set
  if @api_client.config.client_side_validation && timesheet_line_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_line_id' when calling PayrollUkApi.delete_timesheet_line"
  end
  # resource path
  local_var_path = '/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s).sub('{' + 'TimesheetLineID' + '}', timesheet_line_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'TimesheetLine' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:DELETE, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#delete_timesheet_line\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {}) click to toggle source

Deletes a specific timesheet @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param [Hash] opts the optional parameters @return [Array<(TimesheetLine, Integer, Hash)>] TimesheetLine data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1788
def delete_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.delete_timesheet ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.delete_timesheet"
  end
  # verify the required parameter 'timesheet_id' is set
  if @api_client.config.client_side_validation && timesheet_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollUkApi.delete_timesheet"
  end
  # resource path
  local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'TimesheetLine' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:DELETE, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#delete_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_benefit(xero_tenant_id, id, opts = {}) click to toggle source

Retrieves a specific benefit by using a unique benefit ID @param xero_tenant_id [String] Xero identifier for Tenant @param id [String] Identifier for the benefit @param [Hash] opts the optional parameters @return [BenefitObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1934
def get_benefit(xero_tenant_id, id, opts = {})
  data, _status_code, _headers = get_benefit_with_http_info(xero_tenant_id, id, opts)
  data
end
get_benefit_with_http_info(xero_tenant_id, id, options = {}) click to toggle source

Retrieves a specific benefit by using a unique benefit ID @param xero_tenant_id [String] Xero identifier for Tenant @param id [String] Identifier for the benefit @param [Hash] opts the optional parameters @return [Array<(BenefitObject, Integer, Hash)>] BenefitObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 1944
def get_benefit_with_http_info(xero_tenant_id, id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_benefit ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_benefit"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PayrollUkApi.get_benefit"
  end
  # resource path
  local_var_path = '/Benefits/{id}'.sub('{' + 'id' + '}', id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'BenefitObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_benefit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_benefits(xero_tenant_id, opts = {}) click to toggle source

Retrieves employee benefits @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Benefits]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2009
def get_benefits(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_benefits_with_http_info(xero_tenant_id, opts)
  data
end
get_benefits_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves employee benefits @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Array<(Benefits, Integer, Hash)>] Benefits data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2019
def get_benefits_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_benefits ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_benefits"
  end
  # resource path
  local_var_path = '/Benefits'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'Benefits' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_benefits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_deduction(xero_tenant_id, deduction_id, opts = {}) click to toggle source

Retrieves a specific deduction by using a unique deduction ID @param xero_tenant_id [String] Xero identifier for Tenant @param deduction_id [String] Identifier for the deduction @param [Hash] opts the optional parameters @return [DeductionObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2081
def get_deduction(xero_tenant_id, deduction_id, opts = {})
  data, _status_code, _headers = get_deduction_with_http_info(xero_tenant_id, deduction_id, opts)
  data
end
get_deduction_with_http_info(xero_tenant_id, deduction_id, options = {}) click to toggle source

Retrieves a specific deduction by using a unique deduction ID @param xero_tenant_id [String] Xero identifier for Tenant @param deduction_id [String] Identifier for the deduction @param [Hash] opts the optional parameters @return [Array<(DeductionObject, Integer, Hash)>] DeductionObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2091
def get_deduction_with_http_info(xero_tenant_id, deduction_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_deduction ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_deduction"
  end
  # verify the required parameter 'deduction_id' is set
  if @api_client.config.client_side_validation && deduction_id.nil?
    fail ArgumentError, "Missing the required parameter 'deduction_id' when calling PayrollUkApi.get_deduction"
  end
  # resource path
  local_var_path = '/Deductions/{deductionId}'.sub('{' + 'deductionId' + '}', deduction_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'DeductionObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_deduction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_deductions(xero_tenant_id, opts = {}) click to toggle source

Retrieves deductions @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Deductions]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2156
def get_deductions(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_deductions_with_http_info(xero_tenant_id, opts)
  data
end
get_deductions_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves deductions @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Array<(Deductions, Integer, Hash)>] Deductions data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2166
def get_deductions_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_deductions ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_deductions"
  end
  # resource path
  local_var_path = '/Deductions'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'Deductions' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_deductions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_earnings_order(xero_tenant_id, id, opts = {}) click to toggle source

Retrieves a specific earnings orders by using a unique earnings orders id @param xero_tenant_id [String] Xero identifier for Tenant @param id [String] Identifier for the deduction @param [Hash] opts the optional parameters @return [EarningsOrderObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2228
def get_earnings_order(xero_tenant_id, id, opts = {})
  data, _status_code, _headers = get_earnings_order_with_http_info(xero_tenant_id, id, opts)
  data
end
get_earnings_order_with_http_info(xero_tenant_id, id, options = {}) click to toggle source

Retrieves a specific earnings orders by using a unique earnings orders id @param xero_tenant_id [String] Xero identifier for Tenant @param id [String] Identifier for the deduction @param [Hash] opts the optional parameters @return [Array<(EarningsOrderObject, Integer, Hash)>] EarningsOrderObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2238
def get_earnings_order_with_http_info(xero_tenant_id, id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_earnings_order ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_earnings_order"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PayrollUkApi.get_earnings_order"
  end
  # resource path
  local_var_path = '/EarningsOrders/{id}'.sub('{' + 'id' + '}', id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EarningsOrderObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_earnings_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_earnings_orders(xero_tenant_id, opts = {}) click to toggle source

Retrieves earnings orders @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [EarningsOrders]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2303
def get_earnings_orders(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_earnings_orders_with_http_info(xero_tenant_id, opts)
  data
end
get_earnings_orders_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves earnings orders @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Array<(EarningsOrders, Integer, Hash)>] EarningsOrders data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2313
def get_earnings_orders_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_earnings_orders ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_earnings_orders"
  end
  # resource path
  local_var_path = '/EarningsOrders'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EarningsOrders' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_earnings_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_earnings_rate(xero_tenant_id, earnings_rate_id, opts = {}) click to toggle source

Retrieves a specific earnings rates by using a unique earnings rate id @param xero_tenant_id [String] Xero identifier for Tenant @param earnings_rate_id [String] Identifier for the earnings rate @param [Hash] opts the optional parameters @return [EarningsRateObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2375
def get_earnings_rate(xero_tenant_id, earnings_rate_id, opts = {})
  data, _status_code, _headers = get_earnings_rate_with_http_info(xero_tenant_id, earnings_rate_id, opts)
  data
end
get_earnings_rate_with_http_info(xero_tenant_id, earnings_rate_id, options = {}) click to toggle source

Retrieves a specific earnings rates by using a unique earnings rate id @param xero_tenant_id [String] Xero identifier for Tenant @param earnings_rate_id [String] Identifier for the earnings rate @param [Hash] opts the optional parameters @return [Array<(EarningsRateObject, Integer, Hash)>] EarningsRateObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2385
def get_earnings_rate_with_http_info(xero_tenant_id, earnings_rate_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_earnings_rate ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_earnings_rate"
  end
  # verify the required parameter 'earnings_rate_id' is set
  if @api_client.config.client_side_validation && earnings_rate_id.nil?
    fail ArgumentError, "Missing the required parameter 'earnings_rate_id' when calling PayrollUkApi.get_earnings_rate"
  end
  # resource path
  local_var_path = '/EarningsRates/{EarningsRateID}'.sub('{' + 'EarningsRateID' + '}', earnings_rate_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EarningsRateObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_earnings_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_earnings_rates(xero_tenant_id, opts = {}) click to toggle source

Retrieves earnings rates @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [EarningsRates]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2450
def get_earnings_rates(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_earnings_rates_with_http_info(xero_tenant_id, opts)
  data
end
get_earnings_rates_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves earnings rates @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Array<(EarningsRates, Integer, Hash)>] EarningsRates data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2460
def get_earnings_rates_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_earnings_rates ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_earnings_rates"
  end
  # resource path
  local_var_path = '/EarningsRates'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EarningsRates' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_earnings_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves specific employees by using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [EmployeeObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2522
def get_employee(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_leave(xero_tenant_id, employee_id, leave_id, opts = {}) click to toggle source

Retrieves a specific employee's leave record using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param leave_id [String] Leave id for single object @param [Hash] opts the optional parameters @return [EmployeeLeaveObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2598
def get_employee_leave(xero_tenant_id, employee_id, leave_id, opts = {})
  data, _status_code, _headers = get_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, opts)
  data
end
get_employee_leave_balances(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee's leave balances using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [EmployeeLeaveBalances]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2678
def get_employee_leave_balances(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_leave_balances_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_leave_balances_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s leave balances using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeeLeaveBalances, Integer, Hash)>] EmployeeLeaveBalances data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2688
def get_employee_leave_balances_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_leave_balances ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_leave_balances"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_leave_balances"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/LeaveBalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeLeaveBalances' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_leave_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_leave_periods(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee's leave periods using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @option opts [Date] :start_date Filter by start date @option opts [Date] :end_date Filter by end date @return [LeavePeriods]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2755
def get_employee_leave_periods(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_leave_periods_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_leave_periods_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s leave periods using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @option opts [Date] :start_date Filter by start date @option opts [Date] :end_date Filter by end date @return [Array<(LeavePeriods, Integer, Hash)>] LeavePeriods data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2767
def get_employee_leave_periods_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_leave_periods ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_leave_periods"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_leave_periods"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/LeavePeriods'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'LeavePeriods' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_leave_periods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_leave_types(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee's leave types using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [EmployeeLeaveTypes]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2834
def get_employee_leave_types(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_leave_types_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_leave_types_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s leave types using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeeLeaveTypes, Integer, Hash)>] EmployeeLeaveTypes data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2844
def get_employee_leave_types_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_leave_types ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_leave_types"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_leave_types"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/LeaveTypes'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeLeaveTypes' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_leave_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s leave record using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param leave_id [String] Leave id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeeLeaveObject, Integer, Hash)>] EmployeeLeaveObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2609
def get_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_leave ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_leave"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_leave"
  end
  # verify the required parameter 'leave_id' is set
  if @api_client.config.client_side_validation && leave_id.nil?
    fail ArgumentError, "Missing the required parameter 'leave_id' when calling PayrollUkApi.get_employee_leave"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/Leave/{LeaveID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'LeaveID' + '}', leave_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeLeaveObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_leave\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_leaves(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee's leave records using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [EmployeeLeaves]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2909
def get_employee_leaves(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_leaves_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_leaves_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s leave records using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeeLeaves, Integer, Hash)>] EmployeeLeaves data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2919
def get_employee_leaves_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_leaves ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_leaves"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_leaves"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/Leave'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeLeaves' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_leaves\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_opening_balances(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee's openingbalances using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [EmployeeOpeningBalancesObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2984
def get_employee_opening_balances(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s openingbalances using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeeOpeningBalancesObject, Integer, Hash)>] EmployeeOpeningBalancesObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2994
def get_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_opening_balances ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_opening_balances"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_opening_balances"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/ukopeningbalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeOpeningBalancesObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_opening_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_pay_template(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee pay templates using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [EmployeePayTemplateObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3059
def get_employee_pay_template(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_pay_template_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_pay_template_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee pay templates using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeePayTemplateObject, Integer, Hash)>] EmployeePayTemplateObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3069
def get_employee_pay_template_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_pay_template ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_pay_template"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_pay_template"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/PayTemplates'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeePayTemplateObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_pay_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_payment_method(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee's payment method using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [PaymentMethodObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3134
def get_employee_payment_method(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_payment_method_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_payment_method_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s payment method using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [Array<(PaymentMethodObject, Integer, Hash)>] PaymentMethodObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3144
def get_employee_payment_method_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_payment_method ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_payment_method"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_payment_method"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/PaymentMethods'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'PaymentMethodObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_payment_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, opts = {}) click to toggle source

Retrieves a specific salary and wages record for a specific employee using a unique salary and wage id @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param salary_and_wages_id [String] Id for single pay template earnings object @param [Hash] opts the optional parameters @return [SalaryAndWages]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3210
def get_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, opts = {})
  data, _status_code, _headers = get_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, opts)
  data
end
get_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, options = {}) click to toggle source

Retrieves a specific salary and wages record for a specific employee using a unique salary and wage id @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param salary_and_wages_id [String] Id for single pay template earnings object @param [Hash] opts the optional parameters @return [Array<(SalaryAndWages, Integer, Hash)>] SalaryAndWages data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3221
def get_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_salary_and_wage ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_salary_and_wage"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_salary_and_wage"
  end
  # verify the required parameter 'salary_and_wages_id' is set
  if @api_client.config.client_side_validation && salary_and_wages_id.nil?
    fail ArgumentError, "Missing the required parameter 'salary_and_wages_id' when calling PayrollUkApi.get_employee_salary_and_wage"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'SalaryAndWagesID' + '}', salary_and_wages_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'SalaryAndWages' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_salary_and_wage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_salary_and_wages(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee's salary and wages by using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [SalaryAndWages]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3291
def get_employee_salary_and_wages(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_salary_and_wages_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_salary_and_wages_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s salary and wages by using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Array<(SalaryAndWages, Integer, Hash)>] SalaryAndWages data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3302
def get_employee_salary_and_wages_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_salary_and_wages ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_salary_and_wages"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_salary_and_wages"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/SalaryAndWages'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'SalaryAndWages' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_salary_and_wages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_statutory_leave_balances(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee's leave balances using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @option opts [String] :leave_type Filter by the type of statutory leave @option opts [Date] :as_of_date The date from which to calculate balance remaining. If not specified, current date UTC is used. @return [EmployeeStatutoryLeaveBalanceObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3370
def get_employee_statutory_leave_balances(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_statutory_leave_balances_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_statutory_leave_balances_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s leave balances using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @option opts [String] :leave_type Filter by the type of statutory leave @option opts [Date] :as_of_date The date from which to calculate balance remaining. If not specified, current date UTC is used. @return [Array<(EmployeeStatutoryLeaveBalanceObject, Integer, Hash)>] EmployeeStatutoryLeaveBalanceObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3382
def get_employee_statutory_leave_balances_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_statutory_leave_balances ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_statutory_leave_balances"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_statutory_leave_balances"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/StatutoryLeaveBalance'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'LeaveType'] = opts[:'leave_type'] if !opts[:'leave_type'].nil?
  query_params[:'AsOfDate'] = opts[:'as_of_date'] if !opts[:'as_of_date'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeStatutoryLeaveBalanceObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_statutory_leave_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_statutory_sick_leave(xero_tenant_id, statutory_sick_leave_id, opts = {}) click to toggle source

Retrieves a statutory sick leave for an employee @param xero_tenant_id [String] Xero identifier for Tenant @param statutory_sick_leave_id [String] Statutory sick leave id for single object @param [Hash] opts the optional parameters @return [EmployeeStatutorySickLeaveObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3449
def get_employee_statutory_sick_leave(xero_tenant_id, statutory_sick_leave_id, opts = {})
  data, _status_code, _headers = get_employee_statutory_sick_leave_with_http_info(xero_tenant_id, statutory_sick_leave_id, opts)
  data
end
get_employee_statutory_sick_leave_with_http_info(xero_tenant_id, statutory_sick_leave_id, options = {}) click to toggle source

Retrieves a statutory sick leave for an employee @param xero_tenant_id [String] Xero identifier for Tenant @param statutory_sick_leave_id [String] Statutory sick leave id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeeStatutorySickLeaveObject, Integer, Hash)>] EmployeeStatutorySickLeaveObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3459
def get_employee_statutory_sick_leave_with_http_info(xero_tenant_id, statutory_sick_leave_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_statutory_sick_leave ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_statutory_sick_leave"
  end
  # verify the required parameter 'statutory_sick_leave_id' is set
  if @api_client.config.client_side_validation && statutory_sick_leave_id.nil?
    fail ArgumentError, "Missing the required parameter 'statutory_sick_leave_id' when calling PayrollUkApi.get_employee_statutory_sick_leave"
  end
  # resource path
  local_var_path = '/StatutoryLeaves/Sick/{StatutorySickLeaveID}'.sub('{' + 'StatutorySickLeaveID' + '}', statutory_sick_leave_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeStatutorySickLeaveObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_statutory_sick_leave\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_tax(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves tax records for a specific employee using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [EmployeeTaxObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3524
def get_employee_tax(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_tax_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_tax_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves tax records for a specific employee using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeeTaxObject, Integer, Hash)>] EmployeeTaxObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3534
def get_employee_tax_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee_tax ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee_tax"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee_tax"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/Tax'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeTaxObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee_tax\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves specific employees by using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @return [Array<(EmployeeObject, Integer, Hash)>] EmployeeObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 2532
def get_employee_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employee ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employee"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_employee"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employees(xero_tenant_id, opts = {}) click to toggle source

Retrieves employees @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :filter Filter by first name and/or lastname @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Employees]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3600
def get_employees(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_employees_with_http_info(xero_tenant_id, opts)
  data
end
get_employees_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves employees @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :filter Filter by first name and/or lastname @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3611
def get_employees_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_employees ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_employees"
  end
  # resource path
  local_var_path = '/Employees'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'Employees' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_leave_type(xero_tenant_id, leave_type_id, opts = {}) click to toggle source

Retrieves a specific leave type by using a unique leave type ID @param xero_tenant_id [String] Xero identifier for Tenant @param leave_type_id [String] Identifier for the leave type @param [Hash] opts the optional parameters @return [LeaveTypeObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3674
def get_leave_type(xero_tenant_id, leave_type_id, opts = {})
  data, _status_code, _headers = get_leave_type_with_http_info(xero_tenant_id, leave_type_id, opts)
  data
end
get_leave_type_with_http_info(xero_tenant_id, leave_type_id, options = {}) click to toggle source

Retrieves a specific leave type by using a unique leave type ID @param xero_tenant_id [String] Xero identifier for Tenant @param leave_type_id [String] Identifier for the leave type @param [Hash] opts the optional parameters @return [Array<(LeaveTypeObject, Integer, Hash)>] LeaveTypeObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3684
def get_leave_type_with_http_info(xero_tenant_id, leave_type_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_leave_type ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_leave_type"
  end
  # verify the required parameter 'leave_type_id' is set
  if @api_client.config.client_side_validation && leave_type_id.nil?
    fail ArgumentError, "Missing the required parameter 'leave_type_id' when calling PayrollUkApi.get_leave_type"
  end
  # resource path
  local_var_path = '/LeaveTypes/{LeaveTypeID}'.sub('{' + 'LeaveTypeID' + '}', leave_type_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'LeaveTypeObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_leave_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_leave_types(xero_tenant_id, opts = {}) click to toggle source

Retrieves leave types @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @option opts [Boolean] :active_only Filters leave types by active status. By default the API returns all leave types. @return [LeaveTypes]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3750
def get_leave_types(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_leave_types_with_http_info(xero_tenant_id, opts)
  data
end
get_leave_types_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves leave types @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @option opts [Boolean] :active_only Filters leave types by active status. By default the API returns all leave types. @return [Array<(LeaveTypes, Integer, Hash)>] LeaveTypes data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3761
def get_leave_types_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_leave_types ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_leave_types"
  end
  # resource path
  local_var_path = '/LeaveTypes'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'ActiveOnly'] = opts[:'active_only'] if !opts[:'active_only'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'LeaveTypes' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_leave_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pay_run(xero_tenant_id, pay_run_id, opts = {}) click to toggle source

Retrieves a specific pay run by using a unique pay run ID @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_id [String] Identifier for the pay run @param [Hash] opts the optional parameters @return [PayRunObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3824
def get_pay_run(xero_tenant_id, pay_run_id, opts = {})
  data, _status_code, _headers = get_pay_run_with_http_info(xero_tenant_id, pay_run_id, opts)
  data
end
get_pay_run_calendar(xero_tenant_id, pay_run_calendar_id, opts = {}) click to toggle source

Retrieves a specific payrun calendar by using a unique payrun calendar ID @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_calendar_id [String] Identifier for the payrun calendars @param [Hash] opts the optional parameters @return [PayRunCalendarObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3899
def get_pay_run_calendar(xero_tenant_id, pay_run_calendar_id, opts = {})
  data, _status_code, _headers = get_pay_run_calendar_with_http_info(xero_tenant_id, pay_run_calendar_id, opts)
  data
end
get_pay_run_calendar_with_http_info(xero_tenant_id, pay_run_calendar_id, options = {}) click to toggle source

Retrieves a specific payrun calendar by using a unique payrun calendar ID @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_calendar_id [String] Identifier for the payrun calendars @param [Hash] opts the optional parameters @return [Array<(PayRunCalendarObject, Integer, Hash)>] PayRunCalendarObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3909
def get_pay_run_calendar_with_http_info(xero_tenant_id, pay_run_calendar_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_pay_run_calendar ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_pay_run_calendar"
  end
  # verify the required parameter 'pay_run_calendar_id' is set
  if @api_client.config.client_side_validation && pay_run_calendar_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_run_calendar_id' when calling PayrollUkApi.get_pay_run_calendar"
  end
  # resource path
  local_var_path = '/PayRunCalendars/{PayRunCalendarID}'.sub('{' + 'PayRunCalendarID' + '}', pay_run_calendar_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'PayRunCalendarObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_pay_run_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pay_run_calendars(xero_tenant_id, opts = {}) click to toggle source

Retrieves payrun calendars @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [PayRunCalendars]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3974
def get_pay_run_calendars(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_pay_run_calendars_with_http_info(xero_tenant_id, opts)
  data
end
get_pay_run_calendars_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves payrun calendars @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Array<(PayRunCalendars, Integer, Hash)>] PayRunCalendars data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3984
def get_pay_run_calendars_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_pay_run_calendars ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_pay_run_calendars"
  end
  # resource path
  local_var_path = '/PayRunCalendars'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'PayRunCalendars' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_pay_run_calendars\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {}) click to toggle source

Retrieves a specific pay run by using a unique pay run ID @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_id [String] Identifier for the pay run @param [Hash] opts the optional parameters @return [Array<(PayRunObject, Integer, Hash)>] PayRunObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 3834
def get_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_pay_run ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_pay_run"
  end
  # verify the required parameter 'pay_run_id' is set
  if @api_client.config.client_side_validation && pay_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollUkApi.get_pay_run"
  end
  # resource path
  local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'PayRunObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pay_runs(xero_tenant_id, opts = {}) click to toggle source

Retrieves pay runs @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @option opts [String] :status By default get payruns will return all the payruns for an organization. You can add GET api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. @return [PayRuns]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4047
def get_pay_runs(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_pay_runs_with_http_info(xero_tenant_id, opts)
  data
end
get_pay_runs_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves pay runs @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @option opts [String] :status By default get payruns will return all the payruns for an organization. You can add GET api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4058
def get_pay_runs_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_pay_runs ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_pay_runs"
  end
  allowable_values = ["Draft", "Posted"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/PayRuns'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'PayRuns' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_pay_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pay_slip(xero_tenant_id, payslip_id, opts = {}) click to toggle source

Retrieves a specific payslip by using a unique payslip ID @param xero_tenant_id [String] Xero identifier for Tenant @param payslip_id [String] Identifier for the payslip @param [Hash] opts the optional parameters @return [PayslipObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4125
def get_pay_slip(xero_tenant_id, payslip_id, opts = {})
  data, _status_code, _headers = get_pay_slip_with_http_info(xero_tenant_id, payslip_id, opts)
  data
end
get_pay_slip_with_http_info(xero_tenant_id, payslip_id, options = {}) click to toggle source

Retrieves a specific payslip by using a unique payslip ID @param xero_tenant_id [String] Xero identifier for Tenant @param payslip_id [String] Identifier for the payslip @param [Hash] opts the optional parameters @return [Array<(PayslipObject, Integer, Hash)>] PayslipObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4135
def get_pay_slip_with_http_info(xero_tenant_id, payslip_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_pay_slip ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_pay_slip"
  end
  # verify the required parameter 'payslip_id' is set
  if @api_client.config.client_side_validation && payslip_id.nil?
    fail ArgumentError, "Missing the required parameter 'payslip_id' when calling PayrollUkApi.get_pay_slip"
  end
  # resource path
  local_var_path = '/Payslips/{PayslipID}'.sub('{' + 'PayslipID' + '}', payslip_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'PayslipObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_pay_slip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pay_slips(xero_tenant_id, pay_run_id, opts = {}) click to toggle source

Retrieves payslips @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_id [String] PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Payslips]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4201
def get_pay_slips(xero_tenant_id, pay_run_id, opts = {})
  data, _status_code, _headers = get_pay_slips_with_http_info(xero_tenant_id, pay_run_id, opts)
  data
end
get_pay_slips_with_http_info(xero_tenant_id, pay_run_id, options = {}) click to toggle source

Retrieves payslips @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_id [String] PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Array<(Payslips, Integer, Hash)>] Payslips data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4212
def get_pay_slips_with_http_info(xero_tenant_id, pay_run_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_pay_slips ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_pay_slips"
  end
  # verify the required parameter 'pay_run_id' is set
  if @api_client.config.client_side_validation && pay_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollUkApi.get_pay_slips"
  end
  # resource path
  local_var_path = '/Payslips'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'PayRunID'] = pay_run_id
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'Payslips' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_pay_slips\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_reimbursement(xero_tenant_id, reimbursement_id, opts = {}) click to toggle source

Retrieves a specific reimbursement by using a unique reimbursement id @param xero_tenant_id [String] Xero identifier for Tenant @param reimbursement_id [String] Identifier for the reimbursement @param [Hash] opts the optional parameters @return [ReimbursementObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4279
def get_reimbursement(xero_tenant_id, reimbursement_id, opts = {})
  data, _status_code, _headers = get_reimbursement_with_http_info(xero_tenant_id, reimbursement_id, opts)
  data
end
get_reimbursement_with_http_info(xero_tenant_id, reimbursement_id, options = {}) click to toggle source

Retrieves a specific reimbursement by using a unique reimbursement id @param xero_tenant_id [String] Xero identifier for Tenant @param reimbursement_id [String] Identifier for the reimbursement @param [Hash] opts the optional parameters @return [Array<(ReimbursementObject, Integer, Hash)>] ReimbursementObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4289
def get_reimbursement_with_http_info(xero_tenant_id, reimbursement_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_reimbursement ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_reimbursement"
  end
  # verify the required parameter 'reimbursement_id' is set
  if @api_client.config.client_side_validation && reimbursement_id.nil?
    fail ArgumentError, "Missing the required parameter 'reimbursement_id' when calling PayrollUkApi.get_reimbursement"
  end
  # resource path
  local_var_path = '/Reimbursements/{ReimbursementID}'.sub('{' + 'ReimbursementID' + '}', reimbursement_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'ReimbursementObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_reimbursement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_reimbursements(xero_tenant_id, opts = {}) click to toggle source

Retrieves reimbursements @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Reimbursements]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4354
def get_reimbursements(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_reimbursements_with_http_info(xero_tenant_id, opts)
  data
end
get_reimbursements_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves reimbursements @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @return [Array<(Reimbursements, Integer, Hash)>] Reimbursements data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4364
def get_reimbursements_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_reimbursements ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_reimbursements"
  end
  # resource path
  local_var_path = '/Reimbursements'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'Reimbursements' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_reimbursements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_settings(xero_tenant_id, opts = {}) click to toggle source

Retrieves payroll settings @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Settings]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4425
def get_settings(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_settings_with_http_info(xero_tenant_id, opts)
  data
end
get_settings_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves payroll settings @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Array<(Settings, Integer, Hash)>] Settings data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4434
def get_settings_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_settings ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_settings"
  end
  # resource path
  local_var_path = '/Settings'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'Settings' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_statutory_leave_summary(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves a specific employee's summary of statutory leaves using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @option opts [Boolean] :active_only Filter response with leaves that are currently active or yet to be taken. If not specified, all leaves (past, current, and future scheduled) are returned @return [EmployeeStatutoryLeavesSummaries]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4496
def get_statutory_leave_summary(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_statutory_leave_summary_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_statutory_leave_summary_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves a specific employee&#39;s summary of statutory leaves using a unique employee ID @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param [Hash] opts the optional parameters @option opts [Boolean] :active_only Filter response with leaves that are currently active or yet to be taken. If not specified, all leaves (past, current, and future scheduled) are returned @return [Array<(EmployeeStatutoryLeavesSummaries, Integer, Hash)>] EmployeeStatutoryLeavesSummaries data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4507
def get_statutory_leave_summary_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_statutory_leave_summary ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_statutory_leave_summary"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.get_statutory_leave_summary"
  end
  # resource path
  local_var_path = '/StatutoryLeaves/Summary/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'activeOnly'] = opts[:'active_only'] if !opts[:'active_only'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'EmployeeStatutoryLeavesSummaries' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_statutory_leave_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_timesheet(xero_tenant_id, timesheet_id, opts = {}) click to toggle source

Retrieve a specific timesheet by using a unique timesheet ID @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param [Hash] opts the optional parameters @return [TimesheetObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4573
def get_timesheet(xero_tenant_id, timesheet_id, opts = {})
  data, _status_code, _headers = get_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
  data
end
get_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {}) click to toggle source

Retrieve a specific timesheet by using a unique timesheet ID @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param [Hash] opts the optional parameters @return [Array<(TimesheetObject, Integer, Hash)>] TimesheetObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4583
def get_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_timesheet ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_timesheet"
  end
  # verify the required parameter 'timesheet_id' is set
  if @api_client.config.client_side_validation && timesheet_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollUkApi.get_timesheet"
  end
  # resource path
  local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'TimesheetObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_timesheets(xero_tenant_id, opts = {}) click to toggle source

Retrieves timesheets @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @option opts [String] :filter Filter by first name and/or lastname @return [Timesheets]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4649
def get_timesheets(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_timesheets_with_http_info(xero_tenant_id, opts)
  data
end
get_timesheets_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves timesheets @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. @option opts [String] :filter Filter by first name and/or lastname @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4660
def get_timesheets_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_timesheets ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_timesheets"
  end
  # resource path
  local_var_path = '/Timesheets'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'Timesheets' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_timesheets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_tracking_categories(xero_tenant_id, opts = {}) click to toggle source

Retrieves tracking categories @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [TrackingCategories]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4722
def get_tracking_categories(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_tracking_categories_with_http_info(xero_tenant_id, opts)
  data
end
get_tracking_categories_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves tracking categories @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Array<(TrackingCategories, Integer, Hash)>] TrackingCategories data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4731
def get_tracking_categories_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.get_tracking_categories ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.get_tracking_categories"
  end
  # resource path
  local_var_path = '/Settings/trackingCategories'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'TrackingCategories' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#get_tracking_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
revert_timesheet(xero_tenant_id, timesheet_id, opts = {}) click to toggle source

Reverts a specific timesheet to draft @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param [Hash] opts the optional parameters @return [TimesheetObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4792
def revert_timesheet(xero_tenant_id, timesheet_id, opts = {})
  data, _status_code, _headers = revert_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
  data
end
revert_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {}) click to toggle source

Reverts a specific timesheet to draft @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param [Hash] opts the optional parameters @return [Array<(TimesheetObject, Integer, Hash)>] TimesheetObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4802
def revert_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.revert_timesheet ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.revert_timesheet"
  end
  # verify the required parameter 'timesheet_id' is set
  if @api_client.config.client_side_validation && timesheet_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollUkApi.revert_timesheet"
  end
  # resource path
  local_var_path = '/Timesheets/{TimesheetID}/RevertToDraft'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

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

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

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

  # return_type
  return_type = opts[:return_type] || 'TimesheetObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#revert_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_employee(xero_tenant_id, employee_id, employee, opts = {}) click to toggle source

Updates a specific employee's detail @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee [Employee] @param [Hash] opts the optional parameters @return [EmployeeObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4868
def update_employee(xero_tenant_id, employee_id, employee, opts = {})
  data, _status_code, _headers = update_employee_with_http_info(xero_tenant_id, employee_id, employee, opts)
  data
end
update_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template, opts = {}) click to toggle source

Updates a specific employee's earnings template records @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param pay_template_earning_id [String] Id for single pay template earnings object @param earnings_template [EarningsTemplate] @param [Hash] opts the optional parameters @return [EarningsTemplateObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4952
def update_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template, opts = {})
  data, _status_code, _headers = update_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template, opts)
  data
end
update_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template, options = {}) click to toggle source

Updates a specific employee&#39;s earnings template records @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param pay_template_earning_id [String] Id for single pay template earnings object @param earnings_template [EarningsTemplate] @param [Hash] opts the optional parameters @return [Array<(EarningsTemplateObject, Integer, Hash)>] EarningsTemplateObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4964
def update_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.update_employee_earnings_template ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.update_employee_earnings_template"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.update_employee_earnings_template"
  end
  # verify the required parameter 'pay_template_earning_id' is set
  if @api_client.config.client_side_validation && pay_template_earning_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_template_earning_id' when calling PayrollUkApi.update_employee_earnings_template"
  end
  # verify the required parameter 'earnings_template' is set
  if @api_client.config.client_side_validation && earnings_template.nil?
    fail ArgumentError, "Missing the required parameter 'earnings_template' when calling PayrollUkApi.update_employee_earnings_template"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'PayTemplateEarningID' + '}', pay_template_earning_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(earnings_template) 

  # return_type
  return_type = opts[:return_type] || 'EarningsTemplateObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:PUT, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#update_employee_earnings_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_employee_leave(xero_tenant_id, employee_id, leave_id, employee_leave, opts = {}) click to toggle source

Updates a specific employee's leave records @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param leave_id [String] Leave id for single object @param employee_leave [EmployeeLeave] @param [Hash] opts the optional parameters @return [EmployeeLeaveObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5041
def update_employee_leave(xero_tenant_id, employee_id, leave_id, employee_leave, opts = {})
  data, _status_code, _headers = update_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, employee_leave, opts)
  data
end
update_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, employee_leave, options = {}) click to toggle source

Updates a specific employee&#39;s leave records @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param leave_id [String] Leave id for single object @param employee_leave [EmployeeLeave] @param [Hash] opts the optional parameters @return [Array<(EmployeeLeaveObject, Integer, Hash)>] EmployeeLeaveObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5053
def update_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, employee_leave, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.update_employee_leave ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.update_employee_leave"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.update_employee_leave"
  end
  # verify the required parameter 'leave_id' is set
  if @api_client.config.client_side_validation && leave_id.nil?
    fail ArgumentError, "Missing the required parameter 'leave_id' when calling PayrollUkApi.update_employee_leave"
  end
  # verify the required parameter 'employee_leave' is set
  if @api_client.config.client_side_validation && employee_leave.nil?
    fail ArgumentError, "Missing the required parameter 'employee_leave' when calling PayrollUkApi.update_employee_leave"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/Leave/{LeaveID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'LeaveID' + '}', leave_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employee_leave) 

  # return_type
  return_type = opts[:return_type] || 'EmployeeLeaveObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:PUT, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#update_employee_leave\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_employee_opening_balances(xero_tenant_id, employee_id, employee_opening_balances, opts = {}) click to toggle source

Updates a specific employee's opening balances @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_opening_balances [EmployeeOpeningBalances] @param [Hash] opts the optional parameters @return [EmployeeOpeningBalancesObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5129
def update_employee_opening_balances(xero_tenant_id, employee_id, employee_opening_balances, opts = {})
  data, _status_code, _headers = update_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, employee_opening_balances, opts)
  data
end
update_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, employee_opening_balances, options = {}) click to toggle source

Updates a specific employee&#39;s opening balances @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_opening_balances [EmployeeOpeningBalances] @param [Hash] opts the optional parameters @return [Array<(EmployeeOpeningBalancesObject, Integer, Hash)>] EmployeeOpeningBalancesObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5140
def update_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, employee_opening_balances, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.update_employee_opening_balances ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.update_employee_opening_balances"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.update_employee_opening_balances"
  end
  # verify the required parameter 'employee_opening_balances' is set
  if @api_client.config.client_side_validation && employee_opening_balances.nil?
    fail ArgumentError, "Missing the required parameter 'employee_opening_balances' when calling PayrollUkApi.update_employee_opening_balances"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/ukopeningbalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employee_opening_balances) 

  # return_type
  return_type = opts[:return_type] || 'EmployeeOpeningBalancesObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:PUT, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#update_employee_opening_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage, opts = {}) click to toggle source

Updates salary and wages record for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param salary_and_wages_id [String] Id for single pay template earnings object @param salary_and_wage [SalaryAndWage] @param [Hash] opts the optional parameters @return [SalaryAndWageObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5213
def update_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage, opts = {})
  data, _status_code, _headers = update_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage, opts)
  data
end
update_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage, options = {}) click to toggle source

Updates salary and wages record for a specific employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param salary_and_wages_id [String] Id for single pay template earnings object @param salary_and_wage [SalaryAndWage] @param [Hash] opts the optional parameters @return [Array<(SalaryAndWageObject, Integer, Hash)>] SalaryAndWageObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5225
def update_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.update_employee_salary_and_wage ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.update_employee_salary_and_wage"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.update_employee_salary_and_wage"
  end
  # verify the required parameter 'salary_and_wages_id' is set
  if @api_client.config.client_side_validation && salary_and_wages_id.nil?
    fail ArgumentError, "Missing the required parameter 'salary_and_wages_id' when calling PayrollUkApi.update_employee_salary_and_wage"
  end
  # verify the required parameter 'salary_and_wage' is set
  if @api_client.config.client_side_validation && salary_and_wage.nil?
    fail ArgumentError, "Missing the required parameter 'salary_and_wage' when calling PayrollUkApi.update_employee_salary_and_wage"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'SalaryAndWagesID' + '}', salary_and_wages_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(salary_and_wage) 

  # return_type
  return_type = opts[:return_type] || 'SalaryAndWageObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:PUT, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#update_employee_salary_and_wage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_employee_with_http_info(xero_tenant_id, employee_id, employee, options = {}) click to toggle source

Updates a specific employee&#39;s detail @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee [Employee] @param [Hash] opts the optional parameters @return [Array<(EmployeeObject, Integer, Hash)>] EmployeeObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 4879
def update_employee_with_http_info(xero_tenant_id, employee_id, employee, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.update_employee ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.update_employee"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollUkApi.update_employee"
  end
  # verify the required parameter 'employee' is set
  if @api_client.config.client_side_validation && employee.nil?
    fail ArgumentError, "Missing the required parameter 'employee' when calling PayrollUkApi.update_employee"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employee) 

  # return_type
  return_type = opts[:return_type] || 'EmployeeObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:PUT, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#update_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_pay_run(xero_tenant_id, pay_run_id, pay_run, opts = {}) click to toggle source

Updates a specific pay run @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_id [String] Identifier for the pay run @param pay_run [PayRun] @param [Hash] opts the optional parameters @return [PayRunObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5301
def update_pay_run(xero_tenant_id, pay_run_id, pay_run, opts = {})
  data, _status_code, _headers = update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, opts)
  data
end
update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, options = {}) click to toggle source

Updates a specific pay run @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run_id [String] Identifier for the pay run @param pay_run [PayRun] @param [Hash] opts the optional parameters @return [Array<(PayRunObject, Integer, Hash)>] PayRunObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5312
def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.update_pay_run ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.update_pay_run"
  end
  # verify the required parameter 'pay_run_id' is set
  if @api_client.config.client_side_validation && pay_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollUkApi.update_pay_run"
  end
  # verify the required parameter 'pay_run' is set
  if @api_client.config.client_side_validation && pay_run.nil?
    fail ArgumentError, "Missing the required parameter 'pay_run' when calling PayrollUkApi.update_pay_run"
  end
  # resource path
  local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(pay_run) 

  # return_type
  return_type = opts[:return_type] || 'PayRunObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:PUT, local_var_path, "PayrollUkApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollUkApi#update_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line, opts = {}) click to toggle source

Updates a specific timesheet line for a specific timesheet @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param timesheet_line_id [String] Identifier for the timesheet line @param timesheet_line [TimesheetLine] @param [Hash] opts the optional parameters @return [TimesheetLineObject]

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5385
def update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line, opts = {})
  data, _status_code, _headers = update_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line, opts)
  data
end
update_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line, options = {}) click to toggle source

Updates a specific timesheet line for a specific timesheet @param xero_tenant_id [String] Xero identifier for Tenant @param timesheet_id [String] Identifier for the timesheet @param timesheet_line_id [String] Identifier for the timesheet line @param timesheet_line [TimesheetLine] @param [Hash] opts the optional parameters @return [Array<(TimesheetLineObject, Integer, Hash)>] TimesheetLineObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_uk_api.rb, line 5397
def update_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollUkApi.update_timesheet_line ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.update_timesheet_line"
  end
  # verify the required parameter 'timesheet_id' is set
  if @api_client.config.client_side_validation && timesheet_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollUkApi.update_timesheet_line"
  end
  # verify the required parameter 'timesheet_line_id' is set
  if @api_client.config.client_side_validation && timesheet_line_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_line_id' when calling PayrollUkApi.update_timesheet_line"
  end
  # verify the required parameter 'timesheet_line' is set
  if @api_client.config.client_side_validation && timesheet_line.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_line' when calling PayrollUkApi.update_timesheet_line"
  end
  # resource path
  local_var_path = '/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s).sub('{' + 'TimesheetLineID' + '}', timesheet_line_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(timesheet_line) 

  # return_type
  return_type = opts[:return_type] || 'TimesheetLineObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

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