class XeroRuby::PayrollNzApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.new) click to toggle source
# File lib/xero-ruby/api/payroll_nz_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 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_nz_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 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_nz_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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#approve_timesheet\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 for a specific employee @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_nz_api.rb, line 99
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 for a specific employee @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_nz_api.rb, line 109
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 176
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_nz_api.rb, line 186
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an 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_nz_api.rb, line 253
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 earnings template records for an 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_nz_api.rb, line 331
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 earnings template records for an 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_nz_api.rb, line 342
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 414
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_setup(xero_tenant_id, employee_id, employee_leave_setup, opts = {}) click to toggle source

Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_leave_setup [EmployeeLeaveSetup] @param [Hash] opts the optional parameters @return [EmployeeLeaveSetupObject]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 497
def create_employee_leave_setup(xero_tenant_id, employee_id, employee_leave_setup, opts = {})
  data, _status_code, _headers = create_employee_leave_setup_with_http_info(xero_tenant_id, employee_id, employee_leave_setup, opts)
  data
end
create_employee_leave_setup_with_http_info(xero_tenant_id, employee_id, employee_leave_setup, options = {}) click to toggle source

Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Employee id for single object @param employee_leave_setup [EmployeeLeaveSetup] @param [Hash] opts the optional parameters @return [Array<(EmployeeLeaveSetupObject, Integer, Hash)>] EmployeeLeaveSetupObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 508
def create_employee_leave_setup_with_http_info(xero_tenant_id, employee_id, employee_leave_setup, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.create_employee_leave_setup ...'
  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 PayrollNzApi.create_employee_leave_setup"
  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 PayrollNzApi.create_employee_leave_setup"
  end
  # verify the required parameter 'employee_leave_setup' is set
  if @api_client.config.client_side_validation && employee_leave_setup.nil?
    fail ArgumentError, "Missing the required parameter 'employee_leave_setup' when calling PayrollNzApi.create_employee_leave_setup"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/leaveSetup'.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_setup) 

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

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

Creates leave type 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_type [EmployeeLeaveType] @param [Hash] opts the optional parameters @return [EmployeeLeaveTypeObject]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 580
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 leave type 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_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_nz_api.rb, line 591
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 425
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_balance, opts = {}) click to toggle source

Creates opening balances 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_balance [Array<EmployeeOpeningBalance>] @param [Hash] opts the optional parameters @return [EmployeeOpeningBalancesObject]

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

Creates opening balances 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_balance [Array<EmployeeOpeningBalance>] @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_nz_api.rb, line 674
def create_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, employee_opening_balance, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.create_employee_opening_balances"
  end
  # verify the required parameter 'employee_opening_balance' is set
  if @api_client.config.client_side_validation && employee_opening_balance.nil?
    fail ArgumentError, "Missing the required parameter 'employee_opening_balance' when calling PayrollNzApi.create_employee_opening_balances"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/openingBalances'.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_balance) 

  # 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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 a payment method for an employee @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_nz_api.rb, line 746
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 a payment method for an employee @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_nz_api.rb, line 757
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an employee salary and wage record @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_nz_api.rb, line 829
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 an employee salary and wage record @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_nz_api.rb, line 840
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#create_employee_salary_and_wage\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 an 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_nz_api.rb, line 263
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an employment detail for a specific employee @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_nz_api.rb, line 912
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 an employment detail for a specific employee @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_nz_api.rb, line 923
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 994
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_nz_api.rb, line 1004
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 employee 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 [Array<EarningsTemplate>] @param [Hash] opts the optional parameters @return [EmployeeEarningsTemplates]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1072
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 employee 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 [Array<EarningsTemplate>] @param [Hash] opts the optional parameters @return [Array<(EmployeeEarningsTemplates, Integer, Hash)>] EmployeeEarningsTemplates data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1083
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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] || 'EmployeeEarningsTemplates' 

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

Creates a pay run @param xero_tenant_id [String] Xero identifier for Tenant @param pay_run [PayRun] @param [Hash] opts the optional parameters @return [PayRunObject]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1154
def create_pay_run(xero_tenant_id, pay_run, opts = {})
  data, _status_code, _headers = create_pay_run_with_http_info(xero_tenant_id, pay_run, opts)
  data
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_nz_api.rb, line 1231
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_nz_api.rb, line 1241
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#create_pay_run_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_pay_run_with_http_info(xero_tenant_id, pay_run, options = {}) click to toggle source

Creates a pay run @param xero_tenant_id [String] Xero identifier for Tenant @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_nz_api.rb, line 1164
def create_pay_run_with_http_info(xero_tenant_id, pay_run, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.create_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 PayrollNzApi.create_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 PayrollNzApi.create_pay_run"
  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] || {}
  
  # 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(:POST, local_var_path, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#create_pay_run\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_nz_api.rb, line 1308
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_nz_api.rb, line 1318
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#create_reimbursement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_superannuation(xero_tenant_id, benefit, opts = {}) click to toggle source

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

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1385
def create_superannuation(xero_tenant_id, benefit, opts = {})
  data, _status_code, _headers = create_superannuation_with_http_info(xero_tenant_id, benefit, opts)
  data
end
create_superannuation_with_http_info(xero_tenant_id, benefit, options = {}) click to toggle source

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

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1395
def create_superannuation_with_http_info(xero_tenant_id, benefit, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.create_superannuation ...'
  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 PayrollNzApi.create_superannuation"
  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 PayrollNzApi.create_superannuation"
  end
  # resource path
  local_var_path = '/Superannuations'

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

  # 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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#create_superannuation\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_nz_api.rb, line 1462
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

Create a new timesheet line for a specific time sheet @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_nz_api.rb, line 1540
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

Create a new timesheet line for a specific time sheet @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_nz_api.rb, line 1551
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 1472
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an 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 [EarningsTemplateObject]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1623
def delete_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, opts = {})
  data, _status_code, _headers = delete_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, opts)
  data
end
delete_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, options = {}) click to toggle source

Deletes an 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<(EarningsTemplateObject, Integer, Hash)>] EarningsTemplateObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1634
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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] || {}
  # 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] || '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(:DELETE, local_var_path, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 leave record for a specific employee @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_nz_api.rb, line 1704
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 leave record for a specific employee @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_nz_api.rb, line 1715
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an employee's salary and wages record @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 [SalaryAndWageObject]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1785
def delete_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, opts = {})
  data, _status_code, _headers = delete_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, opts)
  data
end
delete_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, options = {}) click to toggle source

Deletes an employee&#39;s salary and wages record @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<(SalaryAndWageObject, Integer, Hash)>] SalaryAndWageObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1796
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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] || {}
  # 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] || '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(:DELETE, local_var_path, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 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_nz_api.rb, line 1865
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 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 [Hash] opts the optional parameters @return [TimesheetLine]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1941
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 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 [Hash] opts the optional parameters @return [Array<(TimesheetLine, Integer, Hash)>] TimesheetLine data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 1952
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 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_nz_api.rb, line 1875
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#delete_timesheet\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 single 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_nz_api.rb, line 2021
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 single 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_nz_api.rb, line 2031
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 for a specific employee @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_nz_api.rb, line 2096
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 for a specific employee @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_nz_api.rb, line 2106
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: PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#get_deductions\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_nz_api.rb, line 2168
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_nz_api.rb, line 2178
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 2243
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_nz_api.rb, line 2253
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: PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an employees 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_nz_api.rb, line 2315
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_balances(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves leave balances for a specific employee @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_nz_api.rb, line 2390
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 leave balances for a specific employee @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_nz_api.rb, line 2400
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 leave periods for a specific employee @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_nz_api.rb, line 2467
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 leave periods for a specific employee @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_nz_api.rb, line 2479
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 leave types for a specific employee @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_nz_api.rb, line 2546
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 leave types for a specific employee @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_nz_api.rb, line 2556
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#get_employee_leave_types\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 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 [Hash] opts the optional parameters @return [EmployeeLeaves]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 2621
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 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 [Hash] opts the optional parameters @return [Array<(EmployeeLeaves, Integer, Hash)>] EmployeeLeaves data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 2631
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 the 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 [Hash] opts the optional parameters @return [EmployeeOpeningBalancesObject]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 2696
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 the 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 [Hash] opts the optional parameters @return [Array<(EmployeeOpeningBalancesObject, Integer, Hash)>] EmployeeOpeningBalancesObject data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 2706
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.get_employee_opening_balances"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}/openingBalances'.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#get_employee_opening_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_employee_pay_templates(xero_tenant_id, employee_id, opts = {}) click to toggle source

Retrieves pay templates for a specific employee @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 [EmployeePayTemplates]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 2771
def get_employee_pay_templates(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_pay_templates_with_http_info(xero_tenant_id, employee_id, opts)
  data
end
get_employee_pay_templates_with_http_info(xero_tenant_id, employee_id, options = {}) click to toggle source

Retrieves pay templates for a specific employee @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<(EmployeePayTemplates, Integer, Hash)>] EmployeePayTemplates data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 2781
def get_employee_pay_templates_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.get_employee_pay_templates ...'
  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 PayrollNzApi.get_employee_pay_templates"
  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 PayrollNzApi.get_employee_pay_templates"
  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] || '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(:GET, local_var_path, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#get_employee_pay_templates\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 available payment methods for a specific employee @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_nz_api.rb, line 2846
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 available payment methods for a specific employee @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_nz_api.rb, line 2856
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an employee's salary and wages record by 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_nz_api.rb, line 2922
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 an employee&#39;s salary and wages record by 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_nz_api.rb, line 2933
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an employee's salary and wages @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_nz_api.rb, line 3003
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 an employee&#39;s salary and wages @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_nz_api.rb, line 3014
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#get_employee_salary_and_wages\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 @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_nz_api.rb, line 3080
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 @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_nz_api.rb, line 3090
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an employees 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_nz_api.rb, line 2325
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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] :first_name Filter by first name @option opts [String] :last_name Filter by last name @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_nz_api.rb, line 3157
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] :first_name Filter by first name @option opts [String] :last_name Filter by last name @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_nz_api.rb, line 3169
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: PayrollNzApi.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 PayrollNzApi.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[:'firstName'] = opts[:'first_name'] if !opts[:'first_name'].nil?
  query_params[:'lastName'] = opts[:'last_name'] if !opts[:'last_name'].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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 3233
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_nz_api.rb, line 3243
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 3309
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_nz_api.rb, line 3320
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: PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 3383
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, payroll_calendar_id, opts = {}) click to toggle source

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

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

Retrieves a specific payrun calendar by using a unique payroll calendar ID @param xero_tenant_id [String] Xero identifier for Tenant @param payroll_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_nz_api.rb, line 3468
def get_pay_run_calendar_with_http_info(xero_tenant_id, payroll_calendar_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.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 PayrollNzApi.get_pay_run_calendar"
  end
  # verify the required parameter 'payroll_calendar_id' is set
  if @api_client.config.client_side_validation && payroll_calendar_id.nil?
    fail ArgumentError, "Missing the required parameter 'payroll_calendar_id' when calling PayrollNzApi.get_pay_run_calendar"
  end
  # resource path
  local_var_path = '/PayRunCalendars/{PayrollCalendarID}'.sub('{' + 'PayrollCalendarID' + '}', payroll_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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 3533
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_nz_api.rb, line 3543
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: PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 3393
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 3606
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_nz_api.rb, line 3617
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: PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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, pay_slip_id, opts = {}) click to toggle source

Retrieves a specific payslip by a unique pay slip ID @param xero_tenant_id [String] Xero identifier for Tenant @param pay_slip_id [String] Identifier for the payslip @param [Hash] opts the optional parameters @return [PaySlipObject]

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

Retrieves a specific payslip by a unique pay slip ID @param xero_tenant_id [String] Xero identifier for Tenant @param pay_slip_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_nz_api.rb, line 3694
def get_pay_slip_with_http_info(xero_tenant_id, pay_slip_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.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 PayrollNzApi.get_pay_slip"
  end
  # verify the required parameter 'pay_slip_id' is set
  if @api_client.config.client_side_validation && pay_slip_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_slip_id' when calling PayrollNzApi.get_pay_slip"
  end
  # resource path
  local_var_path = '/PaySlips/{PaySlipID}'.sub('{' + 'PaySlipID' + '}', pay_slip_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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 3760
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_nz_api.rb, line 3771
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 3838
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_nz_api.rb, line 3848
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 3913
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_nz_api.rb, line 3923
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: PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 settings @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Settings]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 3984
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 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_nz_api.rb, line 3993
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: PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#get_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_statutory_deduction(xero_tenant_id, id, opts = {}) click to toggle source

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

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4054
def get_statutory_deduction(xero_tenant_id, id, opts = {})
  data, _status_code, _headers = get_statutory_deduction_with_http_info(xero_tenant_id, id, opts)
  data
end
get_statutory_deduction_with_http_info(xero_tenant_id, id, options = {}) click to toggle source

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

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4064
def get_statutory_deduction_with_http_info(xero_tenant_id, id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.get_statutory_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 PayrollNzApi.get_statutory_deduction"
  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 PayrollNzApi.get_statutory_deduction"
  end
  # resource path
  local_var_path = '/StatutoryDeductions/{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] || 'StatutoryDeductionObject' 

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

Retrieves statutory 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 [StatutoryDeductions]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4129
def get_statutory_deductions(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_statutory_deductions_with_http_info(xero_tenant_id, opts)
  data
end
get_statutory_deductions_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves statutory 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<(StatutoryDeductions, Integer, Hash)>] StatutoryDeductions data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4139
def get_statutory_deductions_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.get_statutory_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 PayrollNzApi.get_statutory_deductions"
  end
  # resource path
  local_var_path = '/StatutoryDeductions'

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

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

Retrieves a specific superannuation using a unique superannuation ID @param xero_tenant_id [String] Xero identifier for Tenant @param superannuation_id [String] Identifier for the superannuation @param [Hash] opts the optional parameters @return [SuperannuationObject]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4201
def get_superannuation(xero_tenant_id, superannuation_id, opts = {})
  data, _status_code, _headers = get_superannuation_with_http_info(xero_tenant_id, superannuation_id, opts)
  data
end
get_superannuation_with_http_info(xero_tenant_id, superannuation_id, options = {}) click to toggle source

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

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4211
def get_superannuation_with_http_info(xero_tenant_id, superannuation_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.get_superannuation ...'
  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 PayrollNzApi.get_superannuation"
  end
  # verify the required parameter 'superannuation_id' is set
  if @api_client.config.client_side_validation && superannuation_id.nil?
    fail ArgumentError, "Missing the required parameter 'superannuation_id' when calling PayrollNzApi.get_superannuation"
  end
  # resource path
  local_var_path = '/Superannuations/{SuperannuationID}'.sub('{' + 'SuperannuationID' + '}', superannuation_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] || 'SuperannuationObject' 

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

Retrieves superannuations @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 [Superannuations]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4276
def get_superannuations(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_superannuations_with_http_info(xero_tenant_id, opts)
  data
end
get_superannuations_with_http_info(xero_tenant_id, options = {}) click to toggle source

Retrieves superannuations @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<(Superannuations, Integer, Hash)>] Superannuations data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4286
def get_superannuations_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.get_superannuations ...'
  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 PayrollNzApi.get_superannuations"
  end
  # resource path
  local_var_path = '/Superannuations'

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

  # 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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#get_superannuations\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

Retrieves 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_nz_api.rb, line 4348
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

Retrieves 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_nz_api.rb, line 4358
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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] :employee_id By default get Timesheets will return the timesheets for all employees in an organization. You can add GET …/timesheets?filter=employeeId=={EmployeeID} to get only the timesheets of a particular employee. @option opts [String] :payroll_calendar_id By default get Timesheets will return all the timesheets for an organization. You can add GET …/timesheets?filter=payrollCalendarId=={PayrollCalendarID} to filter the timesheets by payroll calendar id @return [Timesheets]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4425
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] :employee_id By default get Timesheets will return the timesheets for all employees in an organization. You can add GET …/timesheets?filter=employeeId=={EmployeeID} to get only the timesheets of a particular employee. @option opts [String] :payroll_calendar_id By default get Timesheets will return all the timesheets for an organization. You can add GET …/timesheets?filter=payrollCalendarId=={PayrollCalendarID} to filter the timesheets by payroll calendar id @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4437
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: PayrollNzApi.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 PayrollNzApi.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[:'employeeId'] = opts[:'employee_id'] if !opts[:'employee_id'].nil?
  query_params[:'payrollCalendarId'] = opts[:'payroll_calendar_id'] if !opts[:'payroll_calendar_id'].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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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_nz_api.rb, line 4500
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_nz_api.rb, line 4509
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: PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 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_nz_api.rb, line 4570
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 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_nz_api.rb, line 4580
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 an existing employee @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_nz_api.rb, line 4646
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 an earnings template records for an employee @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_nz_api.rb, line 4730
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 an earnings template records for an employee @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_nz_api.rb, line 4742
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 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 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_nz_api.rb, line 4819
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 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 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_nz_api.rb, line 4831
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#update_employee_leave\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 an employee's salary and wages record @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_nz_api.rb, line 4908
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 an employee&#39;s salary and wages record @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_nz_api.rb, line 4920
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#update_employee_salary_and_wage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_employee_tax(xero_tenant_id, employee_id, employee_tax, opts = {}) click to toggle source

Updates the tax 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_tax [EmployeeTax] @param [Hash] opts the optional parameters @return [EmployeeTaxObject]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 4996
def update_employee_tax(xero_tenant_id, employee_id, employee_tax, opts = {})
  data, _status_code, _headers = update_employee_tax_with_http_info(xero_tenant_id, employee_id, employee_tax, opts)
  data
end
update_employee_tax_with_http_info(xero_tenant_id, employee_id, employee_tax, options = {}) click to toggle source

Updates the tax 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_tax [EmployeeTax] @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_nz_api.rb, line 5007
def update_employee_tax_with_http_info(xero_tenant_id, employee_id, employee_tax, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.update_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 PayrollNzApi.update_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 PayrollNzApi.update_employee_tax"
  end
  # verify the required parameter 'employee_tax' is set
  if @api_client.config.client_side_validation && employee_tax.nil?
    fail ArgumentError, "Missing the required parameter 'employee_tax' when calling PayrollNzApi.update_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'])
  # 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_tax) 

  # 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(:POST, local_var_path, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#update_employee_tax\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 an existing employee @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_nz_api.rb, line 4657
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#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 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_nz_api.rb, line 5079
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 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_nz_api.rb, line 5090
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#update_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_pay_slip_line_items(xero_tenant_id, pay_slip_id, pay_slip, opts = {}) click to toggle source

Creates an employee pay slip @param xero_tenant_id [String] Xero identifier for Tenant @param pay_slip_id [String] Identifier for the payslip @param pay_slip [PaySlip] @param [Hash] opts the optional parameters @return [PaySlipObject]

# File lib/xero-ruby/api/payroll_nz_api.rb, line 5162
def update_pay_slip_line_items(xero_tenant_id, pay_slip_id, pay_slip, opts = {})
  data, _status_code, _headers = update_pay_slip_line_items_with_http_info(xero_tenant_id, pay_slip_id, pay_slip, opts)
  data
end
update_pay_slip_line_items_with_http_info(xero_tenant_id, pay_slip_id, pay_slip, options = {}) click to toggle source

Creates an employee pay slip @param xero_tenant_id [String] Xero identifier for Tenant @param pay_slip_id [String] Identifier for the payslip @param pay_slip [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_nz_api.rb, line 5173
def update_pay_slip_line_items_with_http_info(xero_tenant_id, pay_slip_id, pay_slip, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollNzApi.update_pay_slip_line_items ...'
  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 PayrollNzApi.update_pay_slip_line_items"
  end
  # verify the required parameter 'pay_slip_id' is set
  if @api_client.config.client_side_validation && pay_slip_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_slip_id' when calling PayrollNzApi.update_pay_slip_line_items"
  end
  # verify the required parameter 'pay_slip' is set
  if @api_client.config.client_side_validation && pay_slip.nil?
    fail ArgumentError, "Missing the required parameter 'pay_slip' when calling PayrollNzApi.update_pay_slip_line_items"
  end
  # resource path
  local_var_path = '/PaySlips/{PaySlipID}'.sub('{' + 'PaySlipID' + '}', pay_slip_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_slip) 

  # 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(:PUT, local_var_path, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#update_pay_slip_line_items\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 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_nz_api.rb, line 5246
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 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_nz_api.rb, line 5258
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: PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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 PayrollNzApi.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, "PayrollNzApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollNzApi#update_timesheet_line\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end