xero-ruby 9.0.0 → 9.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xero-ruby/api/payroll_nz_api.rb +330 -7
  3. data/lib/xero-ruby/models/accounting/bank_transactions.rb +13 -1
  4. data/lib/xero-ruby/models/accounting/contacts.rb +13 -1
  5. data/lib/xero-ruby/models/accounting/credit_notes.rb +13 -1
  6. data/lib/xero-ruby/models/accounting/invoices.rb +13 -1
  7. data/lib/xero-ruby/models/accounting/journals.rb +13 -1
  8. data/lib/xero-ruby/models/accounting/manual_journals.rb +13 -1
  9. data/lib/xero-ruby/models/accounting/overpayments.rb +13 -1
  10. data/lib/xero-ruby/models/accounting/payments.rb +13 -1
  11. data/lib/xero-ruby/models/accounting/prepayments.rb +13 -1
  12. data/lib/xero-ruby/models/accounting/purchase_orders.rb +13 -1
  13. data/lib/xero-ruby/models/payroll_nz/employee.rb +24 -4
  14. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +24 -4
  15. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +14 -4
  16. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern.rb +242 -0
  17. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks.rb +254 -0
  18. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_object.rb +242 -0
  19. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_request.rb +244 -0
  20. data/lib/xero-ruby/models/payroll_nz/employee_working_patterns_object.rb +244 -0
  21. data/lib/xero-ruby/models/payroll_nz/employment.rb +24 -4
  22. data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +28 -4
  23. data/lib/xero-ruby/models/payroll_nz/working_week.rb +317 -0
  24. data/lib/xero-ruby/version.rb +2 -2
  25. data/lib/xero-ruby.rb +6 -0
  26. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c06e7f06863e1752368fac13b1819641f1e23aef142f325a996f29a5c42f8344
4
- data.tar.gz: b9e0c0c50bb722dba71e110f7b3cd6edc9b61ca91ff455969212ddbee05ba9d1
3
+ metadata.gz: b5cea31dc5f734a38373693bed82c5598029105edde9f559abe4c0de476b6366
4
+ data.tar.gz: 53ac2c9bebabc20d027d92bc0c0413cb9e8084e8fa97e7c436800171abd7d219
5
5
  SHA512:
6
- metadata.gz: 51779b2df43078b8f388f64e10bd999c086de90320c7966a21b8b342ffa18a9498f8a7887c627907591157378555f27dd9de2c5777caadedfd623ab7b9797ca9
7
- data.tar.gz: e34c11a0874de9ef9f0969ef437449b9f3aef6fc63eb1b202d3bbcb74c02bd048e71a1694c71390451ab2290fd53de1c6ac82ce676287e5e03edb8dda0e52a0a
6
+ metadata.gz: 7d0c022507703485caf76b9e937fcf3f90f71f88e8273770519b3bfdf87d962d15b1aa2ff8eca4cdf346c4f9333e65b9be86f934742c48679fbc838c85f71ef5
7
+ data.tar.gz: c34ecc936d2efa3c3f80d155549bcaf6225bdaa5bdd5851d156ebcca705234bc520f4891f680a5d162646248c23dbd5ac00d37d3db51232e315cba3dc95564f5
@@ -371,7 +371,7 @@ module XeroRuby
371
371
  fail ArgumentError, "Missing the required parameter 'earnings_template' when calling PayrollNzApi.create_employee_earnings_template"
372
372
  end
373
373
  # resource path
374
- local_var_path = '/Employees/{EmployeeID}/PayTemplates/earnings'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
374
+ local_var_path = '/Employees/{EmployeeID}/PayTemplates/Earnings'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
375
375
 
376
376
  # camelize keys of incoming `where` opts
377
377
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
@@ -543,7 +543,7 @@ module XeroRuby
543
543
  fail ArgumentError, "Missing the required parameter 'employee_leave_setup' when calling PayrollNzApi.create_employee_leave_setup"
544
544
  end
545
545
  # resource path
546
- local_var_path = '/Employees/{EmployeeID}/leaveSetup'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
546
+ local_var_path = '/Employees/{EmployeeID}/LeaveSetup'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
547
547
 
548
548
  # camelize keys of incoming `where` opts
549
549
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
@@ -715,7 +715,7 @@ module XeroRuby
715
715
  fail ArgumentError, "Missing the required parameter 'employee_opening_balance' when calling PayrollNzApi.create_employee_opening_balances"
716
716
  end
717
717
  # resource path
718
- local_var_path = '/Employees/{EmployeeID}/openingBalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
718
+ local_var_path = '/Employees/{EmployeeID}/OpeningBalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
719
719
 
720
720
  # camelize keys of incoming `where` opts
721
721
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
@@ -936,6 +936,92 @@ module XeroRuby
936
936
  return data, status_code, headers
937
937
  end
938
938
 
939
+ # Creates an employee working pattern
940
+ # @param xero_tenant_id [String] Xero identifier for Tenant
941
+ # @param employee_id [String] Employee id for single object
942
+ # @param employee_working_pattern_with_working_weeks_request [EmployeeWorkingPatternWithWorkingWeeksRequest]
943
+ # @param [Hash] opts the optional parameters
944
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
945
+ # @return [EmployeeWorkingPatternWithWorkingWeeksObject]
946
+ def create_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, opts = {})
947
+ data, _status_code, _headers = create_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, opts)
948
+ data
949
+ end
950
+
951
+ # Creates an employee working pattern
952
+ # @param xero_tenant_id [String] Xero identifier for Tenant
953
+ # @param employee_id [String] Employee id for single object
954
+ # @param employee_working_pattern_with_working_weeks_request [EmployeeWorkingPatternWithWorkingWeeksRequest]
955
+ # @param [Hash] opts the optional parameters
956
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
957
+ # @return [Array<(EmployeeWorkingPatternWithWorkingWeeksObject, Integer, Hash)>] EmployeeWorkingPatternWithWorkingWeeksObject data, response status code and response headers
958
+ def create_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, options = {})
959
+ opts = options.dup
960
+ if @api_client.config.debugging
961
+ @api_client.config.logger.debug 'Calling API: PayrollNzApi.create_employee_working_pattern ...'
962
+ end
963
+ # verify the required parameter 'xero_tenant_id' is set
964
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
965
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollNzApi.create_employee_working_pattern"
966
+ end
967
+ # verify the required parameter 'employee_id' is set
968
+ if @api_client.config.client_side_validation && employee_id.nil?
969
+ fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.create_employee_working_pattern"
970
+ end
971
+ # verify the required parameter 'employee_working_pattern_with_working_weeks_request' is set
972
+ if @api_client.config.client_side_validation && employee_working_pattern_with_working_weeks_request.nil?
973
+ fail ArgumentError, "Missing the required parameter 'employee_working_pattern_with_working_weeks_request' when calling PayrollNzApi.create_employee_working_pattern"
974
+ end
975
+ # resource path
976
+ local_var_path = '/Employees/{EmployeeID}/Working-Patterns'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
977
+
978
+ # camelize keys of incoming `where` opts
979
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
980
+
981
+ # query parameters
982
+ query_params = opts[:query_params] || {}
983
+
984
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
985
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
986
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
987
+
988
+ # header parameters
989
+ header_params = opts[:header_params] || {}
990
+ # HTTP header 'Accept' (if needed)
991
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
992
+ # HTTP header 'Content-Type'
993
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
994
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
995
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
996
+
997
+ # form parameters
998
+ form_params = opts[:form_params] || {}
999
+
1000
+ # http body (model)
1001
+ post_body = opts[:body] || @api_client.object_to_http_body(employee_working_pattern_with_working_weeks_request)
1002
+
1003
+ # return_type
1004
+ return_type = opts[:return_type] || 'EmployeeWorkingPatternWithWorkingWeeksObject'
1005
+
1006
+ # auth_names
1007
+ auth_names = opts[:auth_names] || ['OAuth2']
1008
+
1009
+ new_options = opts.merge(
1010
+ :header_params => header_params,
1011
+ :query_params => query_params,
1012
+ :form_params => form_params,
1013
+ :body => post_body,
1014
+ :auth_names => auth_names,
1015
+ :return_type => return_type
1016
+ )
1017
+
1018
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollNzApi", new_options)
1019
+ if @api_client.config.debugging
1020
+ @api_client.config.logger.debug "API called: PayrollNzApi#create_employee_working_pattern\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1021
+ end
1022
+ return data, status_code, headers
1023
+ end
1024
+
939
1025
  # Creates an employment detail for a specific employee
940
1026
  # @param xero_tenant_id [String] Xero identifier for Tenant
941
1027
  # @param employee_id [String] Employee id for single object
@@ -1139,7 +1225,7 @@ module XeroRuby
1139
1225
  fail ArgumentError, "Missing the required parameter 'earnings_template' when calling PayrollNzApi.create_multiple_employee_earnings_template"
1140
1226
  end
1141
1227
  # resource path
1142
- local_var_path = '/Employees/{EmployeeID}/paytemplateearnings'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
1228
+ local_var_path = '/Employees/{EmployeeID}/PayTemplateEarnings'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
1143
1229
 
1144
1230
  # camelize keys of incoming `where` opts
1145
1231
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
@@ -1709,7 +1795,7 @@ module XeroRuby
1709
1795
  fail ArgumentError, "Missing the required parameter 'pay_template_earning_id' when calling PayrollNzApi.delete_employee_earnings_template"
1710
1796
  end
1711
1797
  # resource path
1712
- local_var_path = '/Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'PayTemplateEarningID' + '}', pay_template_earning_id.to_s)
1798
+ local_var_path = '/Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'PayTemplateEarningID' + '}', pay_template_earning_id.to_s)
1713
1799
 
1714
1800
  # camelize keys of incoming `where` opts
1715
1801
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
@@ -1917,6 +2003,87 @@ module XeroRuby
1917
2003
  return data, status_code, headers
1918
2004
  end
1919
2005
 
2006
+ # deletes employee's working patterns
2007
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2008
+ # @param employee_id [String] Employee id for single object
2009
+ # @param employee_working_pattern_id [String] Employee working pattern id for single object
2010
+ # @param [Hash] opts the optional parameters
2011
+ # @return [EmployeeLeaveObject]
2012
+ def delete_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id, opts = {})
2013
+ data, _status_code, _headers = delete_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_id, opts)
2014
+ data
2015
+ end
2016
+
2017
+ # deletes employee&#39;s working patterns
2018
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2019
+ # @param employee_id [String] Employee id for single object
2020
+ # @param employee_working_pattern_id [String] Employee working pattern id for single object
2021
+ # @param [Hash] opts the optional parameters
2022
+ # @return [Array<(EmployeeLeaveObject, Integer, Hash)>] EmployeeLeaveObject data, response status code and response headers
2023
+ def delete_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_id, options = {})
2024
+ opts = options.dup
2025
+ if @api_client.config.debugging
2026
+ @api_client.config.logger.debug 'Calling API: PayrollNzApi.delete_employee_working_pattern ...'
2027
+ end
2028
+ # verify the required parameter 'xero_tenant_id' is set
2029
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
2030
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollNzApi.delete_employee_working_pattern"
2031
+ end
2032
+ # verify the required parameter 'employee_id' is set
2033
+ if @api_client.config.client_side_validation && employee_id.nil?
2034
+ fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.delete_employee_working_pattern"
2035
+ end
2036
+ # verify the required parameter 'employee_working_pattern_id' is set
2037
+ if @api_client.config.client_side_validation && employee_working_pattern_id.nil?
2038
+ fail ArgumentError, "Missing the required parameter 'employee_working_pattern_id' when calling PayrollNzApi.delete_employee_working_pattern"
2039
+ end
2040
+ # resource path
2041
+ local_var_path = '/Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'EmployeeWorkingPatternID' + '}', employee_working_pattern_id.to_s)
2042
+
2043
+ # camelize keys of incoming `where` opts
2044
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2045
+
2046
+ # query parameters
2047
+ query_params = opts[:query_params] || {}
2048
+
2049
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2050
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2051
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2052
+
2053
+ # header parameters
2054
+ header_params = opts[:header_params] || {}
2055
+ # HTTP header 'Accept' (if needed)
2056
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2057
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2058
+
2059
+ # form parameters
2060
+ form_params = opts[:form_params] || {}
2061
+
2062
+ # http body (model)
2063
+ post_body = opts[:body]
2064
+
2065
+ # return_type
2066
+ return_type = opts[:return_type] || 'EmployeeLeaveObject'
2067
+
2068
+ # auth_names
2069
+ auth_names = opts[:auth_names] || ['OAuth2']
2070
+
2071
+ new_options = opts.merge(
2072
+ :header_params => header_params,
2073
+ :query_params => query_params,
2074
+ :form_params => form_params,
2075
+ :body => post_body,
2076
+ :auth_names => auth_names,
2077
+ :return_type => return_type
2078
+ )
2079
+
2080
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "PayrollNzApi", new_options)
2081
+ if @api_client.config.debugging
2082
+ @api_client.config.logger.debug "API called: PayrollNzApi#delete_employee_working_pattern\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2083
+ end
2084
+ return data, status_code, headers
2085
+ end
2086
+
1920
2087
  # Deletes a timesheet
1921
2088
  # @param xero_tenant_id [String] Xero identifier for Tenant
1922
2089
  # @param timesheet_id [String] Identifier for the timesheet
@@ -2777,7 +2944,7 @@ module XeroRuby
2777
2944
  fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.get_employee_opening_balances"
2778
2945
  end
2779
2946
  # resource path
2780
- local_var_path = '/Employees/{EmployeeID}/openingBalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
2947
+ local_var_path = '/Employees/{EmployeeID}/OpeningBalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
2781
2948
 
2782
2949
  # camelize keys of incoming `where` opts
2783
2950
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
@@ -3207,6 +3374,162 @@ module XeroRuby
3207
3374
  return data, status_code, headers
3208
3375
  end
3209
3376
 
3377
+ # Retrieves employee's working patterns
3378
+ # @param xero_tenant_id [String] Xero identifier for Tenant
3379
+ # @param employee_id [String] Employee id for single object
3380
+ # @param employee_working_pattern_id [String] Employee working pattern id for single object
3381
+ # @param [Hash] opts the optional parameters
3382
+ # @return [EmployeeWorkingPatternWithWorkingWeeksObject]
3383
+ def get_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id, opts = {})
3384
+ data, _status_code, _headers = get_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_id, opts)
3385
+ data
3386
+ end
3387
+
3388
+ # Retrieves employee&#39;s working patterns
3389
+ # @param xero_tenant_id [String] Xero identifier for Tenant
3390
+ # @param employee_id [String] Employee id for single object
3391
+ # @param employee_working_pattern_id [String] Employee working pattern id for single object
3392
+ # @param [Hash] opts the optional parameters
3393
+ # @return [Array<(EmployeeWorkingPatternWithWorkingWeeksObject, Integer, Hash)>] EmployeeWorkingPatternWithWorkingWeeksObject data, response status code and response headers
3394
+ def get_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_id, options = {})
3395
+ opts = options.dup
3396
+ if @api_client.config.debugging
3397
+ @api_client.config.logger.debug 'Calling API: PayrollNzApi.get_employee_working_pattern ...'
3398
+ end
3399
+ # verify the required parameter 'xero_tenant_id' is set
3400
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
3401
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollNzApi.get_employee_working_pattern"
3402
+ end
3403
+ # verify the required parameter 'employee_id' is set
3404
+ if @api_client.config.client_side_validation && employee_id.nil?
3405
+ fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.get_employee_working_pattern"
3406
+ end
3407
+ # verify the required parameter 'employee_working_pattern_id' is set
3408
+ if @api_client.config.client_side_validation && employee_working_pattern_id.nil?
3409
+ fail ArgumentError, "Missing the required parameter 'employee_working_pattern_id' when calling PayrollNzApi.get_employee_working_pattern"
3410
+ end
3411
+ # resource path
3412
+ local_var_path = '/Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'EmployeeWorkingPatternID' + '}', employee_working_pattern_id.to_s)
3413
+
3414
+ # camelize keys of incoming `where` opts
3415
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
3416
+
3417
+ # query parameters
3418
+ query_params = opts[:query_params] || {}
3419
+
3420
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
3421
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
3422
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
3423
+
3424
+ # header parameters
3425
+ header_params = opts[:header_params] || {}
3426
+ # HTTP header 'Accept' (if needed)
3427
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3428
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
3429
+
3430
+ # form parameters
3431
+ form_params = opts[:form_params] || {}
3432
+
3433
+ # http body (model)
3434
+ post_body = opts[:body]
3435
+
3436
+ # return_type
3437
+ return_type = opts[:return_type] || 'EmployeeWorkingPatternWithWorkingWeeksObject'
3438
+
3439
+ # auth_names
3440
+ auth_names = opts[:auth_names] || ['OAuth2']
3441
+
3442
+ new_options = opts.merge(
3443
+ :header_params => header_params,
3444
+ :query_params => query_params,
3445
+ :form_params => form_params,
3446
+ :body => post_body,
3447
+ :auth_names => auth_names,
3448
+ :return_type => return_type
3449
+ )
3450
+
3451
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollNzApi", new_options)
3452
+ if @api_client.config.debugging
3453
+ @api_client.config.logger.debug "API called: PayrollNzApi#get_employee_working_pattern\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3454
+ end
3455
+ return data, status_code, headers
3456
+ end
3457
+
3458
+ # Retrieves employee's working patterns
3459
+ # @param xero_tenant_id [String] Xero identifier for Tenant
3460
+ # @param employee_id [String] Employee id for single object
3461
+ # @param [Hash] opts the optional parameters
3462
+ # @return [EmployeeWorkingPatternsObject]
3463
+ def get_employee_working_patterns(xero_tenant_id, employee_id, opts = {})
3464
+ data, _status_code, _headers = get_employee_working_patterns_with_http_info(xero_tenant_id, employee_id, opts)
3465
+ data
3466
+ end
3467
+
3468
+ # Retrieves employee&#39;s working patterns
3469
+ # @param xero_tenant_id [String] Xero identifier for Tenant
3470
+ # @param employee_id [String] Employee id for single object
3471
+ # @param [Hash] opts the optional parameters
3472
+ # @return [Array<(EmployeeWorkingPatternsObject, Integer, Hash)>] EmployeeWorkingPatternsObject data, response status code and response headers
3473
+ def get_employee_working_patterns_with_http_info(xero_tenant_id, employee_id, options = {})
3474
+ opts = options.dup
3475
+ if @api_client.config.debugging
3476
+ @api_client.config.logger.debug 'Calling API: PayrollNzApi.get_employee_working_patterns ...'
3477
+ end
3478
+ # verify the required parameter 'xero_tenant_id' is set
3479
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
3480
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollNzApi.get_employee_working_patterns"
3481
+ end
3482
+ # verify the required parameter 'employee_id' is set
3483
+ if @api_client.config.client_side_validation && employee_id.nil?
3484
+ fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.get_employee_working_patterns"
3485
+ end
3486
+ # resource path
3487
+ local_var_path = '/Employees/{EmployeeID}/Working-Patterns'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
3488
+
3489
+ # camelize keys of incoming `where` opts
3490
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
3491
+
3492
+ # query parameters
3493
+ query_params = opts[:query_params] || {}
3494
+
3495
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
3496
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
3497
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
3498
+
3499
+ # header parameters
3500
+ header_params = opts[:header_params] || {}
3501
+ # HTTP header 'Accept' (if needed)
3502
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3503
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
3504
+
3505
+ # form parameters
3506
+ form_params = opts[:form_params] || {}
3507
+
3508
+ # http body (model)
3509
+ post_body = opts[:body]
3510
+
3511
+ # return_type
3512
+ return_type = opts[:return_type] || 'EmployeeWorkingPatternsObject'
3513
+
3514
+ # auth_names
3515
+ auth_names = opts[:auth_names] || ['OAuth2']
3516
+
3517
+ new_options = opts.merge(
3518
+ :header_params => header_params,
3519
+ :query_params => query_params,
3520
+ :form_params => form_params,
3521
+ :body => post_body,
3522
+ :auth_names => auth_names,
3523
+ :return_type => return_type
3524
+ )
3525
+
3526
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollNzApi", new_options)
3527
+ if @api_client.config.debugging
3528
+ @api_client.config.logger.debug "API called: PayrollNzApi#get_employee_working_patterns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3529
+ end
3530
+ return data, status_code, headers
3531
+ end
3532
+
3210
3533
  # Retrieves employees
3211
3534
  # @param xero_tenant_id [String] Xero identifier for Tenant
3212
3535
  # @param [Hash] opts the optional parameters
@@ -4835,7 +5158,7 @@ module XeroRuby
4835
5158
  fail ArgumentError, "Missing the required parameter 'earnings_template' when calling PayrollNzApi.update_employee_earnings_template"
4836
5159
  end
4837
5160
  # resource path
4838
- local_var_path = '/Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'PayTemplateEarningID' + '}', pay_template_earning_id.to_s)
5161
+ local_var_path = '/Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'PayTemplateEarningID' + '}', pay_template_earning_id.to_s)
4839
5162
 
4840
5163
  # camelize keys of incoming `where` opts
4841
5164
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
@@ -19,6 +19,9 @@ module XeroRuby::Accounting
19
19
 
20
20
  attr_accessor :pagination
21
21
 
22
+ # Displays array of warning messages from the API
23
+ attr_accessor :warnings
24
+
22
25
 
23
26
  attr_accessor :bank_transactions
24
27
 
@@ -26,6 +29,7 @@ module XeroRuby::Accounting
26
29
  def self.attribute_map
27
30
  {
28
31
  :'pagination' => :'pagination',
32
+ :'warnings' => :'Warnings',
29
33
  :'bank_transactions' => :'BankTransactions'
30
34
  }
31
35
  end
@@ -34,6 +38,7 @@ module XeroRuby::Accounting
34
38
  def self.openapi_types
35
39
  {
36
40
  :'pagination' => :'Pagination',
41
+ :'warnings' => :'Array<ValidationError>',
37
42
  :'bank_transactions' => :'Array<BankTransaction>'
38
43
  }
39
44
  end
@@ -57,6 +62,12 @@ module XeroRuby::Accounting
57
62
  self.pagination = attributes[:'pagination']
58
63
  end
59
64
 
65
+ if attributes.key?(:'warnings')
66
+ if (value = attributes[:'warnings']).is_a?(Array)
67
+ self.warnings = value
68
+ end
69
+ end
70
+
60
71
  if attributes.key?(:'bank_transactions')
61
72
  if (value = attributes[:'bank_transactions']).is_a?(Array)
62
73
  self.bank_transactions = value
@@ -83,6 +94,7 @@ module XeroRuby::Accounting
83
94
  return true if self.equal?(o)
84
95
  self.class == o.class &&
85
96
  pagination == o.pagination &&
97
+ warnings == o.warnings &&
86
98
  bank_transactions == o.bank_transactions
87
99
  end
88
100
 
@@ -95,7 +107,7 @@ module XeroRuby::Accounting
95
107
  # Calculates hash code according to all attributes.
96
108
  # @return [Integer] Hash code
97
109
  def hash
98
- [pagination, bank_transactions].hash
110
+ [pagination, warnings, bank_transactions].hash
99
111
  end
100
112
 
101
113
  # Builds the object from hash
@@ -19,6 +19,9 @@ module XeroRuby::Accounting
19
19
 
20
20
  attr_accessor :pagination
21
21
 
22
+ # Displays array of warning messages from the API
23
+ attr_accessor :warnings
24
+
22
25
 
23
26
  attr_accessor :contacts
24
27
 
@@ -26,6 +29,7 @@ module XeroRuby::Accounting
26
29
  def self.attribute_map
27
30
  {
28
31
  :'pagination' => :'pagination',
32
+ :'warnings' => :'Warnings',
29
33
  :'contacts' => :'Contacts'
30
34
  }
31
35
  end
@@ -34,6 +38,7 @@ module XeroRuby::Accounting
34
38
  def self.openapi_types
35
39
  {
36
40
  :'pagination' => :'Pagination',
41
+ :'warnings' => :'Array<ValidationError>',
37
42
  :'contacts' => :'Array<Contact>'
38
43
  }
39
44
  end
@@ -57,6 +62,12 @@ module XeroRuby::Accounting
57
62
  self.pagination = attributes[:'pagination']
58
63
  end
59
64
 
65
+ if attributes.key?(:'warnings')
66
+ if (value = attributes[:'warnings']).is_a?(Array)
67
+ self.warnings = value
68
+ end
69
+ end
70
+
60
71
  if attributes.key?(:'contacts')
61
72
  if (value = attributes[:'contacts']).is_a?(Array)
62
73
  self.contacts = value
@@ -83,6 +94,7 @@ module XeroRuby::Accounting
83
94
  return true if self.equal?(o)
84
95
  self.class == o.class &&
85
96
  pagination == o.pagination &&
97
+ warnings == o.warnings &&
86
98
  contacts == o.contacts
87
99
  end
88
100
 
@@ -95,7 +107,7 @@ module XeroRuby::Accounting
95
107
  # Calculates hash code according to all attributes.
96
108
  # @return [Integer] Hash code
97
109
  def hash
98
- [pagination, contacts].hash
110
+ [pagination, warnings, contacts].hash
99
111
  end
100
112
 
101
113
  # Builds the object from hash
@@ -19,6 +19,9 @@ module XeroRuby::Accounting
19
19
 
20
20
  attr_accessor :pagination
21
21
 
22
+ # Displays array of warning messages from the API
23
+ attr_accessor :warnings
24
+
22
25
 
23
26
  attr_accessor :credit_notes
24
27
 
@@ -26,6 +29,7 @@ module XeroRuby::Accounting
26
29
  def self.attribute_map
27
30
  {
28
31
  :'pagination' => :'pagination',
32
+ :'warnings' => :'Warnings',
29
33
  :'credit_notes' => :'CreditNotes'
30
34
  }
31
35
  end
@@ -34,6 +38,7 @@ module XeroRuby::Accounting
34
38
  def self.openapi_types
35
39
  {
36
40
  :'pagination' => :'Pagination',
41
+ :'warnings' => :'Array<ValidationError>',
37
42
  :'credit_notes' => :'Array<CreditNote>'
38
43
  }
39
44
  end
@@ -57,6 +62,12 @@ module XeroRuby::Accounting
57
62
  self.pagination = attributes[:'pagination']
58
63
  end
59
64
 
65
+ if attributes.key?(:'warnings')
66
+ if (value = attributes[:'warnings']).is_a?(Array)
67
+ self.warnings = value
68
+ end
69
+ end
70
+
60
71
  if attributes.key?(:'credit_notes')
61
72
  if (value = attributes[:'credit_notes']).is_a?(Array)
62
73
  self.credit_notes = value
@@ -83,6 +94,7 @@ module XeroRuby::Accounting
83
94
  return true if self.equal?(o)
84
95
  self.class == o.class &&
85
96
  pagination == o.pagination &&
97
+ warnings == o.warnings &&
86
98
  credit_notes == o.credit_notes
87
99
  end
88
100
 
@@ -95,7 +107,7 @@ module XeroRuby::Accounting
95
107
  # Calculates hash code according to all attributes.
96
108
  # @return [Integer] Hash code
97
109
  def hash
98
- [pagination, credit_notes].hash
110
+ [pagination, warnings, credit_notes].hash
99
111
  end
100
112
 
101
113
  # Builds the object from hash
@@ -19,6 +19,9 @@ module XeroRuby::Accounting
19
19
 
20
20
  attr_accessor :pagination
21
21
 
22
+ # Displays array of warning messages from the API
23
+ attr_accessor :warnings
24
+
22
25
 
23
26
  attr_accessor :invoices
24
27
 
@@ -26,6 +29,7 @@ module XeroRuby::Accounting
26
29
  def self.attribute_map
27
30
  {
28
31
  :'pagination' => :'pagination',
32
+ :'warnings' => :'Warnings',
29
33
  :'invoices' => :'Invoices'
30
34
  }
31
35
  end
@@ -34,6 +38,7 @@ module XeroRuby::Accounting
34
38
  def self.openapi_types
35
39
  {
36
40
  :'pagination' => :'Pagination',
41
+ :'warnings' => :'Array<ValidationError>',
37
42
  :'invoices' => :'Array<Invoice>'
38
43
  }
39
44
  end
@@ -57,6 +62,12 @@ module XeroRuby::Accounting
57
62
  self.pagination = attributes[:'pagination']
58
63
  end
59
64
 
65
+ if attributes.key?(:'warnings')
66
+ if (value = attributes[:'warnings']).is_a?(Array)
67
+ self.warnings = value
68
+ end
69
+ end
70
+
60
71
  if attributes.key?(:'invoices')
61
72
  if (value = attributes[:'invoices']).is_a?(Array)
62
73
  self.invoices = value
@@ -83,6 +94,7 @@ module XeroRuby::Accounting
83
94
  return true if self.equal?(o)
84
95
  self.class == o.class &&
85
96
  pagination == o.pagination &&
97
+ warnings == o.warnings &&
86
98
  invoices == o.invoices
87
99
  end
88
100
 
@@ -95,7 +107,7 @@ module XeroRuby::Accounting
95
107
  # Calculates hash code according to all attributes.
96
108
  # @return [Integer] Hash code
97
109
  def hash
98
- [pagination, invoices].hash
110
+ [pagination, warnings, invoices].hash
99
111
  end
100
112
 
101
113
  # Builds the object from hash