xero-ruby 12.3.0 → 13.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xero-ruby/api/accounting_api.rb +3 -0
  3. data/lib/xero-ruby/api/finance_api.rb +0 -299
  4. data/lib/xero-ruby/api/payroll_au_v2_api.rb +751 -0
  5. data/lib/xero-ruby/models/accounting/overpayment.rb +11 -1
  6. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +11 -1
  7. data/lib/xero-ruby/models/payroll_au/employee.rb +1 -13
  8. data/lib/xero-ruby/models/payroll_au/leave_line.rb +11 -1
  9. data/lib/xero-ruby/models/payroll_au/leave_type.rb +14 -4
  10. data/lib/xero-ruby/models/payroll_au/opening_balance_leave_line.rb +232 -0
  11. data/lib/xero-ruby/models/payroll_au/opening_balances.rb +1 -1
  12. data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +14 -4
  13. data/lib/xero-ruby/models/payroll_au_v2/invalid_field.rb +232 -0
  14. data/lib/xero-ruby/models/payroll_au_v2/pagination.rb +252 -0
  15. data/lib/xero-ruby/models/payroll_au_v2/problem.rb +275 -0
  16. data/lib/xero-ruby/models/payroll_au_v2/timesheet.rb +361 -0
  17. data/lib/xero-ruby/models/payroll_au_v2/timesheet_line.rb +277 -0
  18. data/lib/xero-ruby/models/payroll_au_v2/timesheet_line_object.rb +242 -0
  19. data/lib/xero-ruby/models/payroll_au_v2/timesheet_object.rb +242 -0
  20. data/lib/xero-ruby/models/payroll_au_v2/timesheets.rb +244 -0
  21. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +1 -21
  22. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +3 -13
  23. data/lib/xero-ruby/version.rb +2 -2
  24. data/lib/xero-ruby.rb +10 -10
  25. data/spec/finance/api/finance_api_spec.rb +0 -53
  26. metadata +378 -388
  27. data/spec/finance/models/account_usage_response_spec.rb +0 -58
  28. data/spec/finance/models/account_usage_spec.rb +0 -112
  29. data/spec/finance/models/history_record_response_spec.rb +0 -64
  30. data/spec/finance/models/lock_history_model_spec.rb +0 -52
  31. data/spec/finance/models/lock_history_response_spec.rb +0 -52
  32. data/spec/finance/models/practice_response_spec.rb +0 -64
  33. data/spec/finance/models/report_history_model_spec.rb +0 -52
  34. data/spec/finance/models/report_history_response_spec.rb +0 -52
  35. data/spec/finance/models/user_activities_response_spec.rb +0 -52
  36. 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: ed19b96582ad3c96a1154ae2e19aa8f0d385cca2d2f577b027e485100aba9034
4
- data.tar.gz: 5b2bdc6302be1144075cbbd27f8d587b4a18151013676ea85065ab2e6f3e3cc1
3
+ metadata.gz: 6dda81594e89032bf34006263f7fbd8c76dcf11df1450d7e3b4529b1df51911c
4
+ data.tar.gz: 39e28ee3024a995490eca726cc916ad695ebfda803ab1b427ece493ad55c165d
5
5
  SHA512:
6
- metadata.gz: 3749eac943f2fc868d09e9842d2c436a9699df00ceac496f2de05f79892c9fd128e7cf76ebf2e26deded7579a23969dccbf4a05bb1f8240e2f98c4b735322a7e
7
- data.tar.gz: de3e5c5b9fc310ba1987753ada7988500680c7079a1f5f6bce4ab31e41f1871872dca7970e036efa0a9e070345b0a224ef4b555b04d4c66beadb22b39f8c8dc9
6
+ metadata.gz: 6819305dd617c7deb75f086a031c8d418caab5f1099f6c6837597e6a038fbee49bb5a5c3a8d48544e2df4718ca59dce4ab79c2e0cf976ad38175de9d23e34318
7
+ data.tar.gz: be178680ee893e90a5a30b8c21fa223c24cb6c215eb3e97cb2c66721bb8118a6505445522b861537140316cb72d158363d67db84dca1b0a21624e7824f7ac7ce
@@ -11958,6 +11958,7 @@ module XeroRuby
11958
11958
  # @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
11959
11959
  # @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
11960
11960
  # @option opts [Integer] :page_size Number of records to retrieve per page
11961
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
11961
11962
  # @return [Overpayments]
11962
11963
  def get_overpayments(xero_tenant_id, opts = {})
11963
11964
  data, _status_code, _headers = get_overpayments_with_http_info(xero_tenant_id, opts)
@@ -11973,6 +11974,7 @@ module XeroRuby
11973
11974
  # @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
11974
11975
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
11975
11976
  # @option opts [Integer] :page_size Number of records to retrieve per page
11977
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
11976
11978
  # @return [Array<(Overpayments, Integer, Hash)>] Overpayments data, response status code and response headers
11977
11979
  def get_overpayments_with_http_info(xero_tenant_id, options = {})
11978
11980
  opts = options.dup
@@ -11996,6 +11998,7 @@ module XeroRuby
11996
11998
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
11997
11999
  query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
11998
12000
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
12001
+ query_params[:'References'] = @api_client.build_collection_param(opts[:'references'], :csv) if !opts[:'references'].nil?
11999
12002
 
12000
12003
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
12001
12004
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -16,305 +16,6 @@ module XeroRuby
16
16
  def initialize(api_client = ApiClient.new)
17
17
  @api_client = api_client
18
18
  end
19
- # Get account usage
20
- # A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments.
21
- # @param xero_tenant_id [String] Xero identifier for Tenant
22
- # @param [Hash] opts the optional parameters
23
- # @option opts [String] :start_month date, yyyy-MM If no parameter is provided, the month 12 months prior to the end month will be used. Account usage for up to 12 months from this date will be returned.
24
- # @option opts [String] :end_month date, yyyy-MM If no parameter is provided, the current month will be used. Account usage for up to 12 months prior to this date will be returned.
25
- # @return [AccountUsageResponse]
26
- def get_accounting_activity_account_usage(xero_tenant_id, opts = {})
27
- data, _status_code, _headers = get_accounting_activity_account_usage_with_http_info(xero_tenant_id, opts)
28
- data
29
- end
30
-
31
- # Get account usage
32
- # A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments.
33
- # @param xero_tenant_id [String] Xero identifier for Tenant
34
- # @param [Hash] opts the optional parameters
35
- # @option opts [String] :start_month date, yyyy-MM If no parameter is provided, the month 12 months prior to the end month will be used. Account usage for up to 12 months from this date will be returned.
36
- # @option opts [String] :end_month date, yyyy-MM If no parameter is provided, the current month will be used. Account usage for up to 12 months prior to this date will be returned.
37
- # @return [Array<(AccountUsageResponse, Integer, Hash)>] AccountUsageResponse data, response status code and response headers
38
- def get_accounting_activity_account_usage_with_http_info(xero_tenant_id, options = {})
39
- opts = options.dup
40
- if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: FinanceApi.get_accounting_activity_account_usage ...'
42
- end
43
- # verify the required parameter 'xero_tenant_id' is set
44
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
45
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling FinanceApi.get_accounting_activity_account_usage"
46
- end
47
- # resource path
48
- local_var_path = '/AccountingActivities/AccountUsage'
49
-
50
- # camelize keys of incoming `where` opts
51
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
52
-
53
- # query parameters
54
- query_params = opts[:query_params] || {}
55
- query_params[:'startMonth'] = opts[:'start_month'] if !opts[:'start_month'].nil?
56
- query_params[:'endMonth'] = opts[:'end_month'] if !opts[:'end_month'].nil?
57
-
58
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
59
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
60
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
61
-
62
- # header parameters
63
- header_params = opts[:header_params] || {}
64
- # HTTP header 'Accept' (if needed)
65
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
66
- header_params[:'xero-tenant-id'] = xero_tenant_id
67
-
68
- # form parameters
69
- form_params = opts[:form_params] || {}
70
-
71
- # http body (model)
72
- post_body = opts[:body]
73
-
74
- # return_type
75
- return_type = opts[:return_type] || 'AccountUsageResponse'
76
-
77
- # auth_names
78
- auth_names = opts[:auth_names] || ['OAuth2']
79
-
80
- new_options = opts.merge(
81
- :header_params => header_params,
82
- :query_params => query_params,
83
- :form_params => form_params,
84
- :body => post_body,
85
- :auth_names => auth_names,
86
- :return_type => return_type
87
- )
88
-
89
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "FinanceApi", new_options)
90
- if @api_client.config.debugging
91
- @api_client.config.logger.debug "API called: FinanceApi#get_accounting_activity_account_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
- end
93
- return data, status_code, headers
94
- end
95
-
96
- # Get lock history
97
- # Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods.
98
- # @param xero_tenant_id [String] Xero identifier for Tenant
99
- # @param [Hash] opts the optional parameters
100
- # @option opts [String] :end_date date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a change is visible from this API.
101
- # @return [LockHistoryResponse]
102
- def get_accounting_activity_lock_history(xero_tenant_id, opts = {})
103
- data, _status_code, _headers = get_accounting_activity_lock_history_with_http_info(xero_tenant_id, opts)
104
- data
105
- end
106
-
107
- # Get lock history
108
- # Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods.
109
- # @param xero_tenant_id [String] Xero identifier for Tenant
110
- # @param [Hash] opts the optional parameters
111
- # @option opts [String] :end_date date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a change is visible from this API.
112
- # @return [Array<(LockHistoryResponse, Integer, Hash)>] LockHistoryResponse data, response status code and response headers
113
- def get_accounting_activity_lock_history_with_http_info(xero_tenant_id, options = {})
114
- opts = options.dup
115
- if @api_client.config.debugging
116
- @api_client.config.logger.debug 'Calling API: FinanceApi.get_accounting_activity_lock_history ...'
117
- end
118
- # verify the required parameter 'xero_tenant_id' is set
119
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
120
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling FinanceApi.get_accounting_activity_lock_history"
121
- end
122
- # resource path
123
- local_var_path = '/AccountingActivities/LockHistory'
124
-
125
- # camelize keys of incoming `where` opts
126
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
127
-
128
- # query parameters
129
- query_params = opts[:query_params] || {}
130
- query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
131
-
132
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
133
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
134
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
135
-
136
- # header parameters
137
- header_params = opts[:header_params] || {}
138
- # HTTP header 'Accept' (if needed)
139
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
140
- header_params[:'xero-tenant-id'] = xero_tenant_id
141
-
142
- # form parameters
143
- form_params = opts[:form_params] || {}
144
-
145
- # http body (model)
146
- post_body = opts[:body]
147
-
148
- # return_type
149
- return_type = opts[:return_type] || 'LockHistoryResponse'
150
-
151
- # auth_names
152
- auth_names = opts[:auth_names] || ['OAuth2']
153
-
154
- new_options = opts.merge(
155
- :header_params => header_params,
156
- :query_params => query_params,
157
- :form_params => form_params,
158
- :body => post_body,
159
- :auth_names => auth_names,
160
- :return_type => return_type
161
- )
162
-
163
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "FinanceApi", new_options)
164
- if @api_client.config.debugging
165
- @api_client.config.logger.debug "API called: FinanceApi#get_accounting_activity_lock_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
- end
167
- return data, status_code, headers
168
- end
169
-
170
- # Get report history
171
- # For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight.
172
- # @param xero_tenant_id [String] Xero identifier for Tenant
173
- # @param [Hash] opts the optional parameters
174
- # @option opts [String] :end_date date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any reports that were published within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a published report is visible from this API.
175
- # @return [ReportHistoryResponse]
176
- def get_accounting_activity_report_history(xero_tenant_id, opts = {})
177
- data, _status_code, _headers = get_accounting_activity_report_history_with_http_info(xero_tenant_id, opts)
178
- data
179
- end
180
-
181
- # Get report history
182
- # For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight.
183
- # @param xero_tenant_id [String] Xero identifier for Tenant
184
- # @param [Hash] opts the optional parameters
185
- # @option opts [String] :end_date date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any reports that were published within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a published report is visible from this API.
186
- # @return [Array<(ReportHistoryResponse, Integer, Hash)>] ReportHistoryResponse data, response status code and response headers
187
- def get_accounting_activity_report_history_with_http_info(xero_tenant_id, options = {})
188
- opts = options.dup
189
- if @api_client.config.debugging
190
- @api_client.config.logger.debug 'Calling API: FinanceApi.get_accounting_activity_report_history ...'
191
- end
192
- # verify the required parameter 'xero_tenant_id' is set
193
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
194
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling FinanceApi.get_accounting_activity_report_history"
195
- end
196
- # resource path
197
- local_var_path = '/AccountingActivities/ReportHistory'
198
-
199
- # camelize keys of incoming `where` opts
200
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
201
-
202
- # query parameters
203
- query_params = opts[:query_params] || {}
204
- query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
205
-
206
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
207
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
208
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
209
-
210
- # header parameters
211
- header_params = opts[:header_params] || {}
212
- # HTTP header 'Accept' (if needed)
213
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
214
- header_params[:'xero-tenant-id'] = xero_tenant_id
215
-
216
- # form parameters
217
- form_params = opts[:form_params] || {}
218
-
219
- # http body (model)
220
- post_body = opts[:body]
221
-
222
- # return_type
223
- return_type = opts[:return_type] || 'ReportHistoryResponse'
224
-
225
- # auth_names
226
- auth_names = opts[:auth_names] || ['OAuth2']
227
-
228
- new_options = opts.merge(
229
- :header_params => header_params,
230
- :query_params => query_params,
231
- :form_params => form_params,
232
- :body => post_body,
233
- :auth_names => auth_names,
234
- :return_type => return_type
235
- )
236
-
237
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "FinanceApi", new_options)
238
- if @api_client.config.debugging
239
- @api_client.config.logger.debug "API called: FinanceApi#get_accounting_activity_report_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
240
- end
241
- return data, status_code, headers
242
- end
243
-
244
- # Get user activities
245
- # For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction.
246
- # @param xero_tenant_id [String] Xero identifier for Tenant
247
- # @param [Hash] opts the optional parameters
248
- # @option opts [String] :data_month date, yyyy-MM The specified month must be complete (in the past); The current month cannot be specified since it is not complete. If no parameter is provided, the month immediately previous to the current month will be used. Any user activities occurring within the specified month will be returned. Please be aware that there may be a delay of up to 3 days before a user activity is visible from this API.
249
- # @return [UserActivitiesResponse]
250
- def get_accounting_activity_user_activities(xero_tenant_id, opts = {})
251
- data, _status_code, _headers = get_accounting_activity_user_activities_with_http_info(xero_tenant_id, opts)
252
- data
253
- end
254
-
255
- # Get user activities
256
- # For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction.
257
- # @param xero_tenant_id [String] Xero identifier for Tenant
258
- # @param [Hash] opts the optional parameters
259
- # @option opts [String] :data_month date, yyyy-MM The specified month must be complete (in the past); The current month cannot be specified since it is not complete. If no parameter is provided, the month immediately previous to the current month will be used. Any user activities occurring within the specified month will be returned. Please be aware that there may be a delay of up to 3 days before a user activity is visible from this API.
260
- # @return [Array<(UserActivitiesResponse, Integer, Hash)>] UserActivitiesResponse data, response status code and response headers
261
- def get_accounting_activity_user_activities_with_http_info(xero_tenant_id, options = {})
262
- opts = options.dup
263
- if @api_client.config.debugging
264
- @api_client.config.logger.debug 'Calling API: FinanceApi.get_accounting_activity_user_activities ...'
265
- end
266
- # verify the required parameter 'xero_tenant_id' is set
267
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
268
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling FinanceApi.get_accounting_activity_user_activities"
269
- end
270
- # resource path
271
- local_var_path = '/AccountingActivities/UserActivities'
272
-
273
- # camelize keys of incoming `where` opts
274
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
275
-
276
- # query parameters
277
- query_params = opts[:query_params] || {}
278
- query_params[:'dataMonth'] = opts[:'data_month'] if !opts[:'data_month'].nil?
279
-
280
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
281
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
282
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
283
-
284
- # header parameters
285
- header_params = opts[:header_params] || {}
286
- # HTTP header 'Accept' (if needed)
287
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
288
- header_params[:'xero-tenant-id'] = xero_tenant_id
289
-
290
- # form parameters
291
- form_params = opts[:form_params] || {}
292
-
293
- # http body (model)
294
- post_body = opts[:body]
295
-
296
- # return_type
297
- return_type = opts[:return_type] || 'UserActivitiesResponse'
298
-
299
- # auth_names
300
- auth_names = opts[:auth_names] || ['OAuth2']
301
-
302
- new_options = opts.merge(
303
- :header_params => header_params,
304
- :query_params => query_params,
305
- :form_params => form_params,
306
- :body => post_body,
307
- :auth_names => auth_names,
308
- :return_type => return_type
309
- )
310
-
311
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "FinanceApi", new_options)
312
- if @api_client.config.debugging
313
- @api_client.config.logger.debug "API called: FinanceApi#get_accounting_activity_user_activities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
314
- end
315
- return data, status_code, headers
316
- end
317
-
318
19
  # Get Bank Statement Accounting
319
20
  # For lenders that prefer using bank statement data as the source of truth. We provide a data point that will allow access to customer bank statements, plus for reconciled bank transactions the matching accounting, invoice and billing data as well. As customers reconcile bank statements to invoices and bills, this transaction detail will provide valuable insight for lender's assessment measures.
320
21
  # @param xero_tenant_id [String] Xero identifier for Tenant