xero-ruby 9.3.0 → 18.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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xero-ruby/api/accounting_api.rb +178 -319
  3. data/lib/xero-ruby/api/files_api.rb +9 -2
  4. data/lib/xero-ruby/api/finance_api.rb +0 -299
  5. data/lib/xero-ruby/api/payroll_au_v2_api.rb +751 -0
  6. data/lib/xero-ruby/api/payroll_nz_api.rb +0 -86
  7. data/lib/xero-ruby/api/payroll_uk_api.rb +0 -86
  8. data/lib/xero-ruby/models/accounting/bank_transfer.rb +71 -1
  9. data/lib/xero-ruby/models/accounting/bank_transfer_delete.rb +244 -0
  10. data/lib/xero-ruby/models/accounting/bank_transfer_delete_by_url_param.rb +229 -0
  11. data/lib/xero-ruby/models/accounting/bank_transfers_delete.rb +224 -0
  12. data/lib/xero-ruby/models/accounting/contact.rb +27 -1
  13. data/lib/xero-ruby/models/accounting/credit_note.rb +11 -1
  14. data/lib/xero-ruby/models/accounting/invoice.rb +12 -2
  15. data/lib/xero-ruby/models/accounting/organisation.rb +25 -6
  16. data/lib/xero-ruby/models/accounting/overpayment.rb +21 -1
  17. data/lib/xero-ruby/models/accounting/payment.rb +11 -1
  18. data/lib/xero-ruby/models/accounting/prepayment.rb +31 -1
  19. data/lib/xero-ruby/models/accounting/tracking_reference.rb +277 -0
  20. data/lib/xero-ruby/models/accounting/user.rb +3 -2
  21. data/lib/xero-ruby/models/app_store/product.rb +4 -3
  22. data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +54 -4
  23. data/lib/xero-ruby/models/files/association.rb +21 -1
  24. data/lib/xero-ruby/models/finance/current_statement_response.rb +1 -1
  25. data/lib/xero-ruby/models/finance/data_source_response.rb +1 -31
  26. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +16 -1
  27. data/lib/xero-ruby/models/payroll_au/employee.rb +1 -13
  28. data/lib/xero-ruby/models/payroll_au/leave_line.rb +16 -1
  29. data/lib/xero-ruby/models/payroll_au/leave_type.rb +19 -4
  30. data/lib/xero-ruby/models/payroll_au/opening_balance_leave_line.rb +232 -0
  31. data/lib/xero-ruby/models/payroll_au/opening_balances.rb +1 -1
  32. data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +14 -4
  33. data/lib/xero-ruby/models/payroll_au_v2/invalid_field.rb +232 -0
  34. data/lib/xero-ruby/models/payroll_au_v2/pagination.rb +252 -0
  35. data/lib/xero-ruby/models/payroll_au_v2/problem.rb +275 -0
  36. data/lib/xero-ruby/models/payroll_au_v2/timesheet.rb +361 -0
  37. data/lib/xero-ruby/models/payroll_au_v2/timesheet_line.rb +277 -0
  38. data/lib/xero-ruby/models/payroll_au_v2/timesheet_line_object.rb +242 -0
  39. data/lib/xero-ruby/models/payroll_au_v2/timesheet_object.rb +242 -0
  40. data/lib/xero-ruby/models/payroll_au_v2/timesheets.rb +244 -0
  41. data/lib/xero-ruby/models/payroll_nz/employee.rb +20 -0
  42. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +29 -19
  43. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +31 -11
  44. data/lib/xero-ruby/models/payroll_nz/employee_pay_template.rb +5 -0
  45. data/lib/xero-ruby/models/payroll_nz/employment.rb +15 -0
  46. data/lib/xero-ruby/models/payroll_nz/leave_period.rb +35 -4
  47. data/lib/xero-ruby/models/payroll_nz/leave_type.rb +24 -4
  48. data/lib/xero-ruby/models/payroll_uk/contract_type.rb +38 -0
  49. data/lib/xero-ruby/models/payroll_uk/contracts.rb +297 -0
  50. data/lib/xero-ruby/models/payroll_uk/developmental_role_details.rb +267 -0
  51. data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +5 -2
  52. data/lib/xero-ruby/models/payroll_uk/employee.rb +68 -4
  53. data/lib/xero-ruby/models/payroll_uk/employee_pay_template.rb +5 -0
  54. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance.rb +4 -2
  55. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_summary.rb +5 -2
  56. data/lib/xero-ruby/models/payroll_uk/employment.rb +49 -52
  57. data/lib/xero-ruby/models/payroll_uk/employment_status.rb +37 -0
  58. data/lib/xero-ruby/models/payroll_uk/ni_category.rb +318 -0
  59. data/lib/xero-ruby/models/payroll_uk/ni_category_letter.rb +51 -0
  60. data/lib/xero-ruby/models/payroll_uk/ni_category_one_of.rb +264 -0
  61. data/lib/xero-ruby/models/payroll_uk/ni_category_one_of1.rb +257 -0
  62. data/lib/xero-ruby/version.rb +2 -2
  63. data/lib/xero-ruby.rb +22 -10
  64. data/spec/finance/api/finance_api_spec.rb +0 -53
  65. metadata +393 -391
  66. data/spec/finance/models/account_usage_response_spec.rb +0 -58
  67. data/spec/finance/models/account_usage_spec.rb +0 -112
  68. data/spec/finance/models/history_record_response_spec.rb +0 -64
  69. data/spec/finance/models/lock_history_model_spec.rb +0 -52
  70. data/spec/finance/models/lock_history_response_spec.rb +0 -52
  71. data/spec/finance/models/practice_response_spec.rb +0 -64
  72. data/spec/finance/models/report_history_model_spec.rb +0 -52
  73. data/spec/finance/models/report_history_response_spec.rb +0 -52
  74. data/spec/finance/models/user_activities_response_spec.rb +0 -52
  75. 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: db7a3ca23829b906a81f8244839d067781716aece905ba45c75340b6dc3bd6f7
4
- data.tar.gz: 9acfc6c36a8d5788d8301ff5faf2a3080c01da5e4a9fb4e7e3095ce3ec03cc84
3
+ metadata.gz: 96f45f347a51f81dde31850a3d0d1fcc96bd01b1b0c7c9559e87cec16808d720
4
+ data.tar.gz: 2ab17bcfcd7df28c4df553b172c885b93372e763b380dcfae05672de11e67a53
5
5
  SHA512:
6
- metadata.gz: c2ddfc9fcf90de79e0cb88a021a245d58b2c5a358e1c1fb38bc3d4267a2bde8509510c1e0682b60702682156e397b68fdd7d176bdc89f06f631efac4db69f1fd
7
- data.tar.gz: e5ad2617fddb09d82fb0db50621d42d9f9c0e423f95b3e3d706439aa17ce6056012310e506d1b681e78aee2478f590fa8d2da0d03144bd99c8d4aee98786a0dd
6
+ metadata.gz: c244ccf0f61f4d4a03b4b2fe6ca7c9facaf53da212165ef9d0bde58f6443ba55c5d32a4ec1e61a00cf7f9b4f65a0b535cacb81440202e5251df0e32a8fb57122
7
+ data.tar.gz: b32b5677524d3122189c322864506cb8b248634a315d84c9d105a1816a38e9fb121ddc50bf1823245873a09ce9737a2d6fa21d18c582b711c564fa9072e7548c
@@ -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
@@ -4897,6 +4814,175 @@ module XeroRuby
4897
4814
  return data, status_code, headers
4898
4815
  end
4899
4816
 
4817
+ # Deletes a specific bank transfer
4818
+ # @param xero_tenant_id [String] Xero identifier for Tenant
4819
+ # @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer
4820
+ # @param bank_transfer_delete_by_url_param [BankTransferDeleteByUrlParam]
4821
+ # @param [Hash] opts the optional parameters
4822
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4823
+ # @return [BankTransfers]
4824
+ def delete_bank_transfer(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, opts = {})
4825
+ data, _status_code, _headers = delete_bank_transfer_with_http_info(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, opts)
4826
+ data
4827
+ end
4828
+
4829
+ # Deletes a specific bank transfer
4830
+ # @param xero_tenant_id [String] Xero identifier for Tenant
4831
+ # @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer
4832
+ # @param bank_transfer_delete_by_url_param [BankTransferDeleteByUrlParam]
4833
+ # @param [Hash] opts the optional parameters
4834
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4835
+ # @return [Array<(BankTransfers, Integer, Hash)>] BankTransfers data, response status code and response headers
4836
+ def delete_bank_transfer_with_http_info(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, options = {})
4837
+ opts = options.dup
4838
+ if @api_client.config.debugging
4839
+ @api_client.config.logger.debug 'Calling API: AccountingApi.delete_bank_transfer ...'
4840
+ end
4841
+ # verify the required parameter 'xero_tenant_id' is set
4842
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
4843
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_bank_transfer"
4844
+ end
4845
+ # verify the required parameter 'bank_transfer_id' is set
4846
+ if @api_client.config.client_side_validation && bank_transfer_id.nil?
4847
+ fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.delete_bank_transfer"
4848
+ end
4849
+ # verify the required parameter 'bank_transfer_delete_by_url_param' is set
4850
+ if @api_client.config.client_side_validation && bank_transfer_delete_by_url_param.nil?
4851
+ fail ArgumentError, "Missing the required parameter 'bank_transfer_delete_by_url_param' when calling AccountingApi.delete_bank_transfer"
4852
+ end
4853
+ # resource path
4854
+ local_var_path = '/BankTransfers/{BankTransferID}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s)
4855
+
4856
+ # camelize keys of incoming `where` opts
4857
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
4858
+
4859
+ # query parameters
4860
+ query_params = opts[:query_params] || {}
4861
+
4862
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
4863
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
4864
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
4865
+
4866
+ # header parameters
4867
+ header_params = opts[:header_params] || {}
4868
+ # HTTP header 'Accept' (if needed)
4869
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4870
+ # HTTP header 'Content-Type'
4871
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
4872
+ header_params[:'xero-tenant-id'] = xero_tenant_id
4873
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
4874
+
4875
+ # form parameters
4876
+ form_params = opts[:form_params] || {}
4877
+
4878
+ # http body (model)
4879
+ post_body = opts[:body] || @api_client.object_to_http_body(bank_transfer_delete_by_url_param)
4880
+
4881
+ # return_type
4882
+ return_type = opts[:return_type] || 'BankTransfers'
4883
+
4884
+ # auth_names
4885
+ auth_names = opts[:auth_names] || ['OAuth2']
4886
+
4887
+ new_options = opts.merge(
4888
+ :header_params => header_params,
4889
+ :query_params => query_params,
4890
+ :form_params => form_params,
4891
+ :body => post_body,
4892
+ :auth_names => auth_names,
4893
+ :return_type => return_type
4894
+ )
4895
+
4896
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options)
4897
+ if @api_client.config.debugging
4898
+ @api_client.config.logger.debug "API called: AccountingApi#delete_bank_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4899
+ end
4900
+ return data, status_code, headers
4901
+ end
4902
+
4903
+ # Deletes one or more bank transfers
4904
+ # @param xero_tenant_id [String] Xero identifier for Tenant
4905
+ # @param bank_transfers_delete [BankTransfersDelete] BankTransfers with array of BankTransfer objects in request body
4906
+ # @param [Hash] opts the optional parameters
4907
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
4908
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4909
+ # @return [BankTransfers]
4910
+ def delete_bank_transfers(xero_tenant_id, bank_transfers_delete, opts = {})
4911
+ data, _status_code, _headers = delete_bank_transfers_with_http_info(xero_tenant_id, bank_transfers_delete, opts)
4912
+ data
4913
+ end
4914
+
4915
+ # Deletes one or more bank transfers
4916
+ # @param xero_tenant_id [String] Xero identifier for Tenant
4917
+ # @param bank_transfers_delete [BankTransfersDelete] BankTransfers with array of BankTransfer objects in request body
4918
+ # @param [Hash] opts the optional parameters
4919
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
4920
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4921
+ # @return [Array<(BankTransfers, Integer, Hash)>] BankTransfers data, response status code and response headers
4922
+ def delete_bank_transfers_with_http_info(xero_tenant_id, bank_transfers_delete, options = {})
4923
+ opts = options.dup
4924
+ if @api_client.config.debugging
4925
+ @api_client.config.logger.debug 'Calling API: AccountingApi.delete_bank_transfers ...'
4926
+ end
4927
+ # verify the required parameter 'xero_tenant_id' is set
4928
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
4929
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_bank_transfers"
4930
+ end
4931
+ # verify the required parameter 'bank_transfers_delete' is set
4932
+ if @api_client.config.client_side_validation && bank_transfers_delete.nil?
4933
+ fail ArgumentError, "Missing the required parameter 'bank_transfers_delete' when calling AccountingApi.delete_bank_transfers"
4934
+ end
4935
+ # resource path
4936
+ local_var_path = '/BankTransfers'
4937
+
4938
+ # camelize keys of incoming `where` opts
4939
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
4940
+
4941
+ # query parameters
4942
+ query_params = opts[:query_params] || {}
4943
+ query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
4944
+
4945
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
4946
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
4947
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
4948
+
4949
+ # header parameters
4950
+ header_params = opts[:header_params] || {}
4951
+ # HTTP header 'Accept' (if needed)
4952
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4953
+ # HTTP header 'Content-Type'
4954
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
4955
+ header_params[:'xero-tenant-id'] = xero_tenant_id
4956
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
4957
+
4958
+ # form parameters
4959
+ form_params = opts[:form_params] || {}
4960
+
4961
+ # http body (model)
4962
+ post_body = opts[:body] || @api_client.object_to_http_body(bank_transfers_delete)
4963
+
4964
+ # return_type
4965
+ return_type = opts[:return_type] || 'BankTransfers'
4966
+
4967
+ # auth_names
4968
+ auth_names = opts[:auth_names] || ['OAuth2']
4969
+
4970
+ new_options = opts.merge(
4971
+ :header_params => header_params,
4972
+ :query_params => query_params,
4973
+ :form_params => form_params,
4974
+ :body => post_body,
4975
+ :auth_names => auth_names,
4976
+ :return_type => return_type
4977
+ )
4978
+
4979
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options)
4980
+ if @api_client.config.debugging
4981
+ @api_client.config.logger.debug "API called: AccountingApi#delete_bank_transfers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4982
+ end
4983
+ return data, status_code, headers
4984
+ end
4985
+
4900
4986
  # Updates a specific batch payment for invoices and credit notes
4901
4987
  # @param xero_tenant_id [String] Xero identifier for Tenant
4902
4988
  # @param batch_payment_delete [BatchPaymentDelete]
@@ -7240,6 +7326,7 @@ module XeroRuby
7240
7326
  # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
7241
7327
  # @option opts [String] :where Filter by an any element
7242
7328
  # @option opts [String] :order Order by an any element
7329
+ # @option opts [Boolean] :include_deleted e.g. includeDeleted&#x3D;true - Bank transfers with a status of DELETED will be included in the response
7243
7330
  # @return [BankTransfers]
7244
7331
  def get_bank_transfers(xero_tenant_id, opts = {})
7245
7332
  data, _status_code, _headers = get_bank_transfers_with_http_info(xero_tenant_id, opts)
@@ -7252,6 +7339,7 @@ module XeroRuby
7252
7339
  # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
7253
7340
  # @option opts [String] :where Filter by an any element
7254
7341
  # @option opts [String] :order Order by an any element
7342
+ # @option opts [Boolean] :include_deleted e.g. includeDeleted&#x3D;true - Bank transfers with a status of DELETED will be included in the response
7255
7343
  # @return [Array<(BankTransfers, Integer, Hash)>] BankTransfers data, response status code and response headers
7256
7344
  def get_bank_transfers_with_http_info(xero_tenant_id, options = {})
7257
7345
  opts = options.dup
@@ -7272,6 +7360,7 @@ module XeroRuby
7272
7360
  query_params = opts[:query_params] || {}
7273
7361
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
7274
7362
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
7363
+ query_params[:'includeDeleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?
7275
7364
 
7276
7365
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
7277
7366
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -9356,159 +9445,6 @@ module XeroRuby
9356
9445
  return data, status_code, headers
9357
9446
  end
9358
9447
 
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
9448
  # Retrieves a specific expense claim using a unique expense claim Id
9513
9449
  # @param xero_tenant_id [String] Xero identifier for Tenant
9514
9450
  # @param expense_claim_id [String] Unique identifier for a ExpenseClaim
@@ -11952,6 +11888,7 @@ module XeroRuby
11952
11888
  # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
11953
11889
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
11954
11890
  # @option opts [Integer] :page_size Number of records to retrieve per page
11891
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
11955
11892
  # @return [Overpayments]
11956
11893
  def get_overpayments(xero_tenant_id, opts = {})
11957
11894
  data, _status_code, _headers = get_overpayments_with_http_info(xero_tenant_id, opts)
@@ -11967,6 +11904,7 @@ module XeroRuby
11967
11904
  # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
11968
11905
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
11969
11906
  # @option opts [Integer] :page_size Number of records to retrieve per page
11907
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
11970
11908
  # @return [Array<(Overpayments, Integer, Hash)>] Overpayments data, response status code and response headers
11971
11909
  def get_overpayments_with_http_info(xero_tenant_id, options = {})
11972
11910
  opts = options.dup
@@ -11990,6 +11928,7 @@ module XeroRuby
11990
11928
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
11991
11929
  query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
11992
11930
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
11931
+ query_params[:'References'] = @api_client.build_collection_param(opts[:'references'], :csv) if !opts[:'references'].nil?
11993
11932
 
11994
11933
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
11995
11934
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -12492,6 +12431,7 @@ module XeroRuby
12492
12431
  # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
12493
12432
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
12494
12433
  # @option opts [Integer] :page_size Number of records to retrieve per page
12434
+ # @option opts [Array<String>] :invoice_numbers Filter by a comma-separated list of InvoiceNumbers
12495
12435
  # @return [Prepayments]
12496
12436
  def get_prepayments(xero_tenant_id, opts = {})
12497
12437
  data, _status_code, _headers = get_prepayments_with_http_info(xero_tenant_id, opts)
@@ -12507,6 +12447,7 @@ module XeroRuby
12507
12447
  # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
12508
12448
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
12509
12449
  # @option opts [Integer] :page_size Number of records to retrieve per page
12450
+ # @option opts [Array<String>] :invoice_numbers Filter by a comma-separated list of InvoiceNumbers
12510
12451
  # @return [Array<(Prepayments, Integer, Hash)>] Prepayments data, response status code and response headers
12511
12452
  def get_prepayments_with_http_info(xero_tenant_id, options = {})
12512
12453
  opts = options.dup
@@ -12530,6 +12471,7 @@ module XeroRuby
12530
12471
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
12531
12472
  query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
12532
12473
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
12474
+ query_params[:'InvoiceNumbers'] = @api_client.build_collection_param(opts[:'invoice_numbers'], :csv) if !opts[:'invoice_numbers'].nil?
12533
12475
 
12534
12476
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
12535
12477
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -17937,89 +17879,6 @@ module XeroRuby
17937
17879
  return data, status_code, headers
17938
17880
  end
17939
17881
 
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
17882
  # Updates or creates one or more sales invoices or purchase bills
18024
17883
  # @param xero_tenant_id [String] Xero identifier for Tenant
18025
17884
  # @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", "CreatedDateUTC"]
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
@@ -835,6 +835,7 @@ module XeroRuby
835
835
  # @option opts [Integer] :pagesize pass an optional page size value
836
836
  # @option opts [Integer] :page number of records to skip for pagination
837
837
  # @option opts [String] :sort values to sort by
838
+ # @option opts [String] :direction sort direction
838
839
  # @return [Files]
839
840
  def get_files(xero_tenant_id, opts = {})
840
841
  data, _status_code, _headers = get_files_with_http_info(xero_tenant_id, opts)
@@ -847,6 +848,7 @@ module XeroRuby
847
848
  # @option opts [Integer] :pagesize pass an optional page size value
848
849
  # @option opts [Integer] :page number of records to skip for pagination
849
850
  # @option opts [String] :sort values to sort by
851
+ # @option opts [String] :direction sort direction
850
852
  # @return [Array<(Files, Integer, Hash)>] Files data, response status code and response headers
851
853
  def get_files_with_http_info(xero_tenant_id, options = {})
852
854
  opts = options.dup
@@ -869,6 +871,10 @@ module XeroRuby
869
871
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
870
872
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
871
873
  end
874
+ allowable_values = ["ASC", "DESC"]
875
+ if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
876
+ fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
877
+ end
872
878
  # resource path
873
879
  local_var_path = '/Files'
874
880
 
@@ -880,6 +886,7 @@ module XeroRuby
880
886
  query_params[:'pagesize'] = opts[:'pagesize'] if !opts[:'pagesize'].nil?
881
887
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
882
888
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
889
+ query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
883
890
 
884
891
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
885
892
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?