xero-ruby 12.0.0 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/xero-ruby/api/accounting_api.rb +6 -319
- data/lib/xero-ruby/api/files_api.rb +2 -2
- data/lib/xero-ruby/api/finance_api.rb +0 -299
- data/lib/xero-ruby/api/payroll_au_v2_api.rb +751 -0
- data/lib/xero-ruby/api/payroll_nz_api.rb +0 -86
- data/lib/xero-ruby/api/payroll_uk_api.rb +0 -86
- data/lib/xero-ruby/models/accounting/contact.rb +27 -1
- data/lib/xero-ruby/models/accounting/organisation.rb +23 -6
- data/lib/xero-ruby/models/accounting/overpayment.rb +11 -1
- data/lib/xero-ruby/models/accounting/prepayment.rb +21 -1
- data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +54 -4
- data/lib/xero-ruby/models/files/association.rb +21 -1
- data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +11 -1
- data/lib/xero-ruby/models/payroll_au/employee.rb +1 -13
- data/lib/xero-ruby/models/payroll_au/leave_line.rb +11 -1
- data/lib/xero-ruby/models/payroll_au/leave_type.rb +14 -4
- data/lib/xero-ruby/models/payroll_au/opening_balance_leave_line.rb +232 -0
- data/lib/xero-ruby/models/payroll_au/opening_balances.rb +1 -1
- data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +14 -4
- data/lib/xero-ruby/models/payroll_au_v2/invalid_field.rb +232 -0
- data/lib/xero-ruby/models/payroll_au_v2/pagination.rb +252 -0
- data/lib/xero-ruby/models/payroll_au_v2/problem.rb +275 -0
- data/lib/xero-ruby/models/payroll_au_v2/timesheet.rb +361 -0
- data/lib/xero-ruby/models/payroll_au_v2/timesheet_line.rb +277 -0
- data/lib/xero-ruby/models/payroll_au_v2/timesheet_line_object.rb +242 -0
- data/lib/xero-ruby/models/payroll_au_v2/timesheet_object.rb +242 -0
- data/lib/xero-ruby/models/payroll_au_v2/timesheets.rb +244 -0
- data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +1 -21
- data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +3 -13
- data/lib/xero-ruby/models/payroll_nz/employee_pay_template.rb +5 -0
- data/lib/xero-ruby/models/payroll_uk/contract_type.rb +38 -0
- data/lib/xero-ruby/models/payroll_uk/contracts.rb +297 -0
- data/lib/xero-ruby/models/payroll_uk/developmental_role_details.rb +267 -0
- data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +3 -2
- data/lib/xero-ruby/models/payroll_uk/employee.rb +16 -4
- data/lib/xero-ruby/models/payroll_uk/employee_pay_template.rb +5 -0
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_summary.rb +3 -2
- data/lib/xero-ruby/models/payroll_uk/employment.rb +16 -4
- data/lib/xero-ruby/models/payroll_uk/employment_status.rb +37 -0
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +14 -10
- data/spec/finance/api/finance_api_spec.rb +0 -53
- metadata +374 -380
- data/spec/finance/models/account_usage_response_spec.rb +0 -58
- data/spec/finance/models/account_usage_spec.rb +0 -112
- data/spec/finance/models/history_record_response_spec.rb +0 -64
- data/spec/finance/models/lock_history_model_spec.rb +0 -52
- data/spec/finance/models/lock_history_response_spec.rb +0 -52
- data/spec/finance/models/practice_response_spec.rb +0 -64
- data/spec/finance/models/report_history_model_spec.rb +0 -52
- data/spec/finance/models/report_history_response_spec.rb +0 -52
- data/spec/finance/models/user_activities_response_spec.rb +0 -52
- data/spec/finance/models/user_response_spec.rb +0 -106
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad627a1c68c922e097e1ab5b001e31412890db9fdfdc1296f1ad6accd970e05d
|
|
4
|
+
data.tar.gz: 821a646f990fb5226fd79f52f740fc1175e88b1b5f20abcd59b705d5a73f6a96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 514ddb8b2e2d50b0fb5c5b8cd7ec90594cc178fff2bffb837794c6646690ea819f201b7498107f154c60e0f92bce02baedd5f70fcbc1b584cfd6bc1b9e264c46
|
|
7
|
+
data.tar.gz: fd4fad0c9c4168ff6b5abad5461112835146627cafef3d3f4cad99d9db00c0c24276847becd3371fda835de1aa8f77319e4014baaaea120d5d477e0c8e0163a8
|
|
@@ -1824,89 +1824,6 @@ module XeroRuby
|
|
|
1824
1824
|
return data, status_code, headers
|
|
1825
1825
|
end
|
|
1826
1826
|
|
|
1827
|
-
# Creates new employees used in Xero payrun
|
|
1828
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1829
|
-
# @param employees [Employees] Employees with array of Employee object in body of request
|
|
1830
|
-
# @param [Hash] opts the optional parameters
|
|
1831
|
-
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
|
1832
|
-
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1833
|
-
# @return [Employees]
|
|
1834
|
-
def create_employees(xero_tenant_id, employees, opts = {})
|
|
1835
|
-
data, _status_code, _headers = create_employees_with_http_info(xero_tenant_id, employees, opts)
|
|
1836
|
-
data
|
|
1837
|
-
end
|
|
1838
|
-
|
|
1839
|
-
# Creates new employees used in Xero payrun
|
|
1840
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1841
|
-
# @param employees [Employees] Employees with array of Employee object in body of request
|
|
1842
|
-
# @param [Hash] opts the optional parameters
|
|
1843
|
-
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
1844
|
-
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1845
|
-
# @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
|
1846
|
-
def create_employees_with_http_info(xero_tenant_id, employees, options = {})
|
|
1847
|
-
opts = options.dup
|
|
1848
|
-
if @api_client.config.debugging
|
|
1849
|
-
@api_client.config.logger.debug 'Calling API: AccountingApi.create_employees ...'
|
|
1850
|
-
end
|
|
1851
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
1852
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
1853
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_employees"
|
|
1854
|
-
end
|
|
1855
|
-
# verify the required parameter 'employees' is set
|
|
1856
|
-
if @api_client.config.client_side_validation && employees.nil?
|
|
1857
|
-
fail ArgumentError, "Missing the required parameter 'employees' when calling AccountingApi.create_employees"
|
|
1858
|
-
end
|
|
1859
|
-
# resource path
|
|
1860
|
-
local_var_path = '/Employees'
|
|
1861
|
-
|
|
1862
|
-
# camelize keys of incoming `where` opts
|
|
1863
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1864
|
-
|
|
1865
|
-
# query parameters
|
|
1866
|
-
query_params = opts[:query_params] || {}
|
|
1867
|
-
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
|
1868
|
-
|
|
1869
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1870
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1871
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1872
|
-
|
|
1873
|
-
# header parameters
|
|
1874
|
-
header_params = opts[:header_params] || {}
|
|
1875
|
-
# HTTP header 'Accept' (if needed)
|
|
1876
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1877
|
-
# HTTP header 'Content-Type'
|
|
1878
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1879
|
-
header_params[:'xero-tenant-id'] = xero_tenant_id
|
|
1880
|
-
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1881
|
-
|
|
1882
|
-
# form parameters
|
|
1883
|
-
form_params = opts[:form_params] || {}
|
|
1884
|
-
|
|
1885
|
-
# http body (model)
|
|
1886
|
-
post_body = opts[:body] || @api_client.object_to_http_body(employees)
|
|
1887
|
-
|
|
1888
|
-
# return_type
|
|
1889
|
-
return_type = opts[:return_type] || 'Employees'
|
|
1890
|
-
|
|
1891
|
-
# auth_names
|
|
1892
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1893
|
-
|
|
1894
|
-
new_options = opts.merge(
|
|
1895
|
-
:header_params => header_params,
|
|
1896
|
-
:query_params => query_params,
|
|
1897
|
-
:form_params => form_params,
|
|
1898
|
-
:body => post_body,
|
|
1899
|
-
:auth_names => auth_names,
|
|
1900
|
-
:return_type => return_type
|
|
1901
|
-
)
|
|
1902
|
-
|
|
1903
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options)
|
|
1904
|
-
if @api_client.config.debugging
|
|
1905
|
-
@api_client.config.logger.debug "API called: AccountingApi#create_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1906
|
-
end
|
|
1907
|
-
return data, status_code, headers
|
|
1908
|
-
end
|
|
1909
|
-
|
|
1910
1827
|
# Creates a history record for a specific expense claim
|
|
1911
1828
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1912
1829
|
# @param expense_claim_id [String] Unique identifier for a ExpenseClaim
|
|
@@ -9356,159 +9273,6 @@ module XeroRuby
|
|
|
9356
9273
|
return data, status_code, headers
|
|
9357
9274
|
end
|
|
9358
9275
|
|
|
9359
|
-
# Retrieves a specific employee used in Xero payrun using a unique employee Id
|
|
9360
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
9361
|
-
# @param employee_id [String] Unique identifier for a Employee
|
|
9362
|
-
# @param [Hash] opts the optional parameters
|
|
9363
|
-
# @return [Employees]
|
|
9364
|
-
def get_employee(xero_tenant_id, employee_id, opts = {})
|
|
9365
|
-
data, _status_code, _headers = get_employee_with_http_info(xero_tenant_id, employee_id, opts)
|
|
9366
|
-
data
|
|
9367
|
-
end
|
|
9368
|
-
|
|
9369
|
-
# Retrieves a specific employee used in Xero payrun using a unique employee Id
|
|
9370
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
9371
|
-
# @param employee_id [String] Unique identifier for a Employee
|
|
9372
|
-
# @param [Hash] opts the optional parameters
|
|
9373
|
-
# @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
|
9374
|
-
def get_employee_with_http_info(xero_tenant_id, employee_id, options = {})
|
|
9375
|
-
opts = options.dup
|
|
9376
|
-
if @api_client.config.debugging
|
|
9377
|
-
@api_client.config.logger.debug 'Calling API: AccountingApi.get_employee ...'
|
|
9378
|
-
end
|
|
9379
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
9380
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
9381
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_employee"
|
|
9382
|
-
end
|
|
9383
|
-
# verify the required parameter 'employee_id' is set
|
|
9384
|
-
if @api_client.config.client_side_validation && employee_id.nil?
|
|
9385
|
-
fail ArgumentError, "Missing the required parameter 'employee_id' when calling AccountingApi.get_employee"
|
|
9386
|
-
end
|
|
9387
|
-
# resource path
|
|
9388
|
-
local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
|
9389
|
-
|
|
9390
|
-
# camelize keys of incoming `where` opts
|
|
9391
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
9392
|
-
|
|
9393
|
-
# query parameters
|
|
9394
|
-
query_params = opts[:query_params] || {}
|
|
9395
|
-
|
|
9396
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
9397
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
9398
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
9399
|
-
|
|
9400
|
-
# header parameters
|
|
9401
|
-
header_params = opts[:header_params] || {}
|
|
9402
|
-
# HTTP header 'Accept' (if needed)
|
|
9403
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
9404
|
-
header_params[:'xero-tenant-id'] = xero_tenant_id
|
|
9405
|
-
|
|
9406
|
-
# form parameters
|
|
9407
|
-
form_params = opts[:form_params] || {}
|
|
9408
|
-
|
|
9409
|
-
# http body (model)
|
|
9410
|
-
post_body = opts[:body]
|
|
9411
|
-
|
|
9412
|
-
# return_type
|
|
9413
|
-
return_type = opts[:return_type] || 'Employees'
|
|
9414
|
-
|
|
9415
|
-
# auth_names
|
|
9416
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
9417
|
-
|
|
9418
|
-
new_options = opts.merge(
|
|
9419
|
-
:header_params => header_params,
|
|
9420
|
-
:query_params => query_params,
|
|
9421
|
-
:form_params => form_params,
|
|
9422
|
-
:body => post_body,
|
|
9423
|
-
:auth_names => auth_names,
|
|
9424
|
-
:return_type => return_type
|
|
9425
|
-
)
|
|
9426
|
-
|
|
9427
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
|
9428
|
-
if @api_client.config.debugging
|
|
9429
|
-
@api_client.config.logger.debug "API called: AccountingApi#get_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
9430
|
-
end
|
|
9431
|
-
return data, status_code, headers
|
|
9432
|
-
end
|
|
9433
|
-
|
|
9434
|
-
# Retrieves employees used in Xero payrun
|
|
9435
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
9436
|
-
# @param [Hash] opts the optional parameters
|
|
9437
|
-
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
|
9438
|
-
# @option opts [String] :where Filter by an any element
|
|
9439
|
-
# @option opts [String] :order Order by an any element
|
|
9440
|
-
# @return [Employees]
|
|
9441
|
-
def get_employees(xero_tenant_id, opts = {})
|
|
9442
|
-
data, _status_code, _headers = get_employees_with_http_info(xero_tenant_id, opts)
|
|
9443
|
-
data
|
|
9444
|
-
end
|
|
9445
|
-
|
|
9446
|
-
# Retrieves employees used in Xero payrun
|
|
9447
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
9448
|
-
# @param [Hash] opts the optional parameters
|
|
9449
|
-
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
|
9450
|
-
# @option opts [String] :where Filter by an any element
|
|
9451
|
-
# @option opts [String] :order Order by an any element
|
|
9452
|
-
# @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
|
9453
|
-
def get_employees_with_http_info(xero_tenant_id, options = {})
|
|
9454
|
-
opts = options.dup
|
|
9455
|
-
if @api_client.config.debugging
|
|
9456
|
-
@api_client.config.logger.debug 'Calling API: AccountingApi.get_employees ...'
|
|
9457
|
-
end
|
|
9458
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
9459
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
9460
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_employees"
|
|
9461
|
-
end
|
|
9462
|
-
# resource path
|
|
9463
|
-
local_var_path = '/Employees'
|
|
9464
|
-
|
|
9465
|
-
# camelize keys of incoming `where` opts
|
|
9466
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
9467
|
-
|
|
9468
|
-
# query parameters
|
|
9469
|
-
query_params = opts[:query_params] || {}
|
|
9470
|
-
query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
|
|
9471
|
-
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
9472
|
-
|
|
9473
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
9474
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
9475
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
9476
|
-
|
|
9477
|
-
# header parameters
|
|
9478
|
-
header_params = opts[:header_params] || {}
|
|
9479
|
-
# HTTP header 'Accept' (if needed)
|
|
9480
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
9481
|
-
header_params[:'xero-tenant-id'] = xero_tenant_id
|
|
9482
|
-
header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
|
|
9483
|
-
|
|
9484
|
-
# form parameters
|
|
9485
|
-
form_params = opts[:form_params] || {}
|
|
9486
|
-
|
|
9487
|
-
# http body (model)
|
|
9488
|
-
post_body = opts[:body]
|
|
9489
|
-
|
|
9490
|
-
# return_type
|
|
9491
|
-
return_type = opts[:return_type] || 'Employees'
|
|
9492
|
-
|
|
9493
|
-
# auth_names
|
|
9494
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
9495
|
-
|
|
9496
|
-
new_options = opts.merge(
|
|
9497
|
-
:header_params => header_params,
|
|
9498
|
-
:query_params => query_params,
|
|
9499
|
-
:form_params => form_params,
|
|
9500
|
-
:body => post_body,
|
|
9501
|
-
:auth_names => auth_names,
|
|
9502
|
-
:return_type => return_type
|
|
9503
|
-
)
|
|
9504
|
-
|
|
9505
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
|
9506
|
-
if @api_client.config.debugging
|
|
9507
|
-
@api_client.config.logger.debug "API called: AccountingApi#get_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
9508
|
-
end
|
|
9509
|
-
return data, status_code, headers
|
|
9510
|
-
end
|
|
9511
|
-
|
|
9512
9276
|
# Retrieves a specific expense claim using a unique expense claim Id
|
|
9513
9277
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
9514
9278
|
# @param expense_claim_id [String] Unique identifier for a ExpenseClaim
|
|
@@ -11952,6 +11716,7 @@ module XeroRuby
|
|
|
11952
11716
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
|
|
11953
11717
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
|
11954
11718
|
# @option opts [Integer] :page_size Number of records to retrieve per page
|
|
11719
|
+
# @option opts [Array<String>] :references Filter by a comma-separated list of References
|
|
11955
11720
|
# @return [Overpayments]
|
|
11956
11721
|
def get_overpayments(xero_tenant_id, opts = {})
|
|
11957
11722
|
data, _status_code, _headers = get_overpayments_with_http_info(xero_tenant_id, opts)
|
|
@@ -11967,6 +11732,7 @@ module XeroRuby
|
|
|
11967
11732
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
|
|
11968
11733
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
|
11969
11734
|
# @option opts [Integer] :page_size Number of records to retrieve per page
|
|
11735
|
+
# @option opts [Array<String>] :references Filter by a comma-separated list of References
|
|
11970
11736
|
# @return [Array<(Overpayments, Integer, Hash)>] Overpayments data, response status code and response headers
|
|
11971
11737
|
def get_overpayments_with_http_info(xero_tenant_id, options = {})
|
|
11972
11738
|
opts = options.dup
|
|
@@ -11990,6 +11756,7 @@ module XeroRuby
|
|
|
11990
11756
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
11991
11757
|
query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
|
|
11992
11758
|
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
11759
|
+
query_params[:'References'] = @api_client.build_collection_param(opts[:'references'], :csv) if !opts[:'references'].nil?
|
|
11993
11760
|
|
|
11994
11761
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
11995
11762
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
@@ -12492,6 +12259,7 @@ module XeroRuby
|
|
|
12492
12259
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
|
|
12493
12260
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
|
12494
12261
|
# @option opts [Integer] :page_size Number of records to retrieve per page
|
|
12262
|
+
# @option opts [Array<String>] :invoice_numbers Filter by a comma-separated list of InvoiceNumbers
|
|
12495
12263
|
# @return [Prepayments]
|
|
12496
12264
|
def get_prepayments(xero_tenant_id, opts = {})
|
|
12497
12265
|
data, _status_code, _headers = get_prepayments_with_http_info(xero_tenant_id, opts)
|
|
@@ -12507,6 +12275,7 @@ module XeroRuby
|
|
|
12507
12275
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
|
|
12508
12276
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
|
12509
12277
|
# @option opts [Integer] :page_size Number of records to retrieve per page
|
|
12278
|
+
# @option opts [Array<String>] :invoice_numbers Filter by a comma-separated list of InvoiceNumbers
|
|
12510
12279
|
# @return [Array<(Prepayments, Integer, Hash)>] Prepayments data, response status code and response headers
|
|
12511
12280
|
def get_prepayments_with_http_info(xero_tenant_id, options = {})
|
|
12512
12281
|
opts = options.dup
|
|
@@ -12530,6 +12299,7 @@ module XeroRuby
|
|
|
12530
12299
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
12531
12300
|
query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
|
|
12532
12301
|
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
12302
|
+
query_params[:'InvoiceNumbers'] = @api_client.build_collection_param(opts[:'invoice_numbers'], :csv) if !opts[:'invoice_numbers'].nil?
|
|
12533
12303
|
|
|
12534
12304
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
12535
12305
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
@@ -17937,89 +17707,6 @@ module XeroRuby
|
|
|
17937
17707
|
return data, status_code, headers
|
|
17938
17708
|
end
|
|
17939
17709
|
|
|
17940
|
-
# Creates a single new employees used in Xero payrun
|
|
17941
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
17942
|
-
# @param employees [Employees] Employees with array of Employee object in body of request
|
|
17943
|
-
# @param [Hash] opts the optional parameters
|
|
17944
|
-
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
|
17945
|
-
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
17946
|
-
# @return [Employees]
|
|
17947
|
-
def update_or_create_employees(xero_tenant_id, employees, opts = {})
|
|
17948
|
-
data, _status_code, _headers = update_or_create_employees_with_http_info(xero_tenant_id, employees, opts)
|
|
17949
|
-
data
|
|
17950
|
-
end
|
|
17951
|
-
|
|
17952
|
-
# Creates a single new employees used in Xero payrun
|
|
17953
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
17954
|
-
# @param employees [Employees] Employees with array of Employee object in body of request
|
|
17955
|
-
# @param [Hash] opts the optional parameters
|
|
17956
|
-
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
|
17957
|
-
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
17958
|
-
# @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
|
17959
|
-
def update_or_create_employees_with_http_info(xero_tenant_id, employees, options = {})
|
|
17960
|
-
opts = options.dup
|
|
17961
|
-
if @api_client.config.debugging
|
|
17962
|
-
@api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_employees ...'
|
|
17963
|
-
end
|
|
17964
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
17965
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
17966
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_employees"
|
|
17967
|
-
end
|
|
17968
|
-
# verify the required parameter 'employees' is set
|
|
17969
|
-
if @api_client.config.client_side_validation && employees.nil?
|
|
17970
|
-
fail ArgumentError, "Missing the required parameter 'employees' when calling AccountingApi.update_or_create_employees"
|
|
17971
|
-
end
|
|
17972
|
-
# resource path
|
|
17973
|
-
local_var_path = '/Employees'
|
|
17974
|
-
|
|
17975
|
-
# camelize keys of incoming `where` opts
|
|
17976
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
17977
|
-
|
|
17978
|
-
# query parameters
|
|
17979
|
-
query_params = opts[:query_params] || {}
|
|
17980
|
-
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
|
17981
|
-
|
|
17982
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
17983
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
17984
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
17985
|
-
|
|
17986
|
-
# header parameters
|
|
17987
|
-
header_params = opts[:header_params] || {}
|
|
17988
|
-
# HTTP header 'Accept' (if needed)
|
|
17989
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
17990
|
-
# HTTP header 'Content-Type'
|
|
17991
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
17992
|
-
header_params[:'xero-tenant-id'] = xero_tenant_id
|
|
17993
|
-
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
17994
|
-
|
|
17995
|
-
# form parameters
|
|
17996
|
-
form_params = opts[:form_params] || {}
|
|
17997
|
-
|
|
17998
|
-
# http body (model)
|
|
17999
|
-
post_body = opts[:body] || @api_client.object_to_http_body(employees)
|
|
18000
|
-
|
|
18001
|
-
# return_type
|
|
18002
|
-
return_type = opts[:return_type] || 'Employees'
|
|
18003
|
-
|
|
18004
|
-
# auth_names
|
|
18005
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
18006
|
-
|
|
18007
|
-
new_options = opts.merge(
|
|
18008
|
-
:header_params => header_params,
|
|
18009
|
-
:query_params => query_params,
|
|
18010
|
-
:form_params => form_params,
|
|
18011
|
-
:body => post_body,
|
|
18012
|
-
:auth_names => auth_names,
|
|
18013
|
-
:return_type => return_type
|
|
18014
|
-
)
|
|
18015
|
-
|
|
18016
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options)
|
|
18017
|
-
if @api_client.config.debugging
|
|
18018
|
-
@api_client.config.logger.debug "API called: AccountingApi#update_or_create_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
18019
|
-
end
|
|
18020
|
-
return data, status_code, headers
|
|
18021
|
-
end
|
|
18022
|
-
|
|
18023
17710
|
# Updates or creates one or more sales invoices or purchase bills
|
|
18024
17711
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
18025
17712
|
# @param invoices [Invoices]
|
|
@@ -424,7 +424,7 @@ module XeroRuby
|
|
|
424
424
|
# @param [Hash] opts the optional parameters
|
|
425
425
|
# @option opts [Integer] :pagesize pass an optional page size value
|
|
426
426
|
# @option opts [Integer] :page number of records to skip for pagination
|
|
427
|
-
# @option opts [String] :sort values to sort by
|
|
427
|
+
# @option opts [String] :sort values to sort by (default to 'CreatedDateUtc')
|
|
428
428
|
# @option opts [String] :direction direction to sort by
|
|
429
429
|
# @return [Array<Association>]
|
|
430
430
|
def get_associations_by_object(xero_tenant_id, object_id, opts = {})
|
|
@@ -463,7 +463,7 @@ module XeroRuby
|
|
|
463
463
|
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FilesApi.get_associations_by_object, must be greater than or equal to 1.'
|
|
464
464
|
end
|
|
465
465
|
|
|
466
|
-
allowable_values = ["Name", "
|
|
466
|
+
allowable_values = ["Name", "Size", "CreatedDateUtc", "AssociationDateUtc"]
|
|
467
467
|
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
468
468
|
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
469
469
|
end
|