xero-ruby 2.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +170 -101
- data/build_notes.md +22 -0
- data/docs/accounting/Attachment.md +1 -1
- data/lib/xero-ruby.rb +1 -1
- data/lib/xero-ruby/api/accounting_api.rb +1291 -1
- data/lib/xero-ruby/api/asset_api.rb +37 -1
- data/lib/xero-ruby/api/project_api.rb +79 -1
- data/lib/xero-ruby/api_client.rb +3 -3
- data/lib/xero-ruby/api_error.rb +1 -1
- data/lib/xero-ruby/configuration.rb +1 -1
- data/lib/xero-ruby/models/accounting/account.rb +1 -1
- data/lib/xero-ruby/models/accounting/account_type.rb +1 -1
- data/lib/xero-ruby/models/accounting/accounts.rb +1 -1
- data/lib/xero-ruby/models/accounting/accounts_payable.rb +1 -1
- data/lib/xero-ruby/models/accounting/accounts_receivable.rb +1 -1
- data/lib/xero-ruby/models/accounting/address.rb +1 -1
- data/lib/xero-ruby/models/accounting/allocation.rb +1 -1
- data/lib/xero-ruby/models/accounting/allocations.rb +1 -1
- data/lib/xero-ruby/models/accounting/attachment.rb +2 -2
- data/lib/xero-ruby/models/accounting/attachments.rb +1 -1
- data/lib/xero-ruby/models/accounting/balances.rb +1 -1
- data/lib/xero-ruby/models/accounting/bank_transaction.rb +1 -1
- data/lib/xero-ruby/models/accounting/bank_transactions.rb +1 -1
- data/lib/xero-ruby/models/accounting/bank_transfer.rb +1 -1
- data/lib/xero-ruby/models/accounting/bank_transfers.rb +1 -1
- data/lib/xero-ruby/models/accounting/batch_payment.rb +1 -1
- data/lib/xero-ruby/models/accounting/batch_payment_details.rb +1 -1
- data/lib/xero-ruby/models/accounting/batch_payments.rb +1 -1
- data/lib/xero-ruby/models/accounting/bill.rb +1 -1
- data/lib/xero-ruby/models/accounting/branding_theme.rb +1 -1
- data/lib/xero-ruby/models/accounting/branding_themes.rb +1 -1
- data/lib/xero-ruby/models/accounting/cis_org_setting.rb +1 -1
- data/lib/xero-ruby/models/accounting/cis_setting.rb +1 -1
- data/lib/xero-ruby/models/accounting/cis_settings.rb +1 -1
- data/lib/xero-ruby/models/accounting/contact.rb +1 -1
- data/lib/xero-ruby/models/accounting/contact_group.rb +1 -1
- data/lib/xero-ruby/models/accounting/contact_groups.rb +1 -1
- data/lib/xero-ruby/models/accounting/contact_person.rb +1 -1
- data/lib/xero-ruby/models/accounting/contacts.rb +1 -1
- data/lib/xero-ruby/models/accounting/country_code.rb +1 -1
- data/lib/xero-ruby/models/accounting/credit_note.rb +1 -1
- data/lib/xero-ruby/models/accounting/credit_notes.rb +1 -1
- data/lib/xero-ruby/models/accounting/currencies.rb +1 -1
- data/lib/xero-ruby/models/accounting/currency.rb +1 -1
- data/lib/xero-ruby/models/accounting/currency_code.rb +1 -1
- data/lib/xero-ruby/models/accounting/element.rb +1 -1
- data/lib/xero-ruby/models/accounting/employee.rb +1 -1
- data/lib/xero-ruby/models/accounting/employees.rb +1 -1
- data/lib/xero-ruby/models/accounting/error.rb +1 -1
- data/lib/xero-ruby/models/accounting/expense_claim.rb +1 -1
- data/lib/xero-ruby/models/accounting/expense_claims.rb +1 -1
- data/lib/xero-ruby/models/accounting/external_link.rb +1 -1
- data/lib/xero-ruby/models/accounting/history_record.rb +1 -1
- data/lib/xero-ruby/models/accounting/history_records.rb +1 -1
- data/lib/xero-ruby/models/accounting/invoice.rb +1 -1
- data/lib/xero-ruby/models/accounting/invoice_reminder.rb +1 -1
- data/lib/xero-ruby/models/accounting/invoice_reminders.rb +1 -1
- data/lib/xero-ruby/models/accounting/invoices.rb +1 -1
- data/lib/xero-ruby/models/accounting/item.rb +1 -1
- data/lib/xero-ruby/models/accounting/items.rb +1 -1
- data/lib/xero-ruby/models/accounting/journal.rb +1 -1
- data/lib/xero-ruby/models/accounting/journal_line.rb +1 -1
- data/lib/xero-ruby/models/accounting/journals.rb +1 -1
- data/lib/xero-ruby/models/accounting/line_amount_types.rb +1 -1
- data/lib/xero-ruby/models/accounting/line_item.rb +1 -1
- data/lib/xero-ruby/models/accounting/line_item_tracking.rb +1 -1
- data/lib/xero-ruby/models/accounting/linked_transaction.rb +1 -1
- data/lib/xero-ruby/models/accounting/linked_transactions.rb +1 -1
- data/lib/xero-ruby/models/accounting/manual_journal.rb +1 -1
- data/lib/xero-ruby/models/accounting/manual_journal_line.rb +1 -1
- data/lib/xero-ruby/models/accounting/manual_journals.rb +1 -1
- data/lib/xero-ruby/models/accounting/online_invoice.rb +1 -1
- data/lib/xero-ruby/models/accounting/online_invoices.rb +1 -1
- data/lib/xero-ruby/models/accounting/organisation.rb +1 -1
- data/lib/xero-ruby/models/accounting/organisations.rb +1 -1
- data/lib/xero-ruby/models/accounting/overpayment.rb +1 -1
- data/lib/xero-ruby/models/accounting/overpayments.rb +1 -1
- data/lib/xero-ruby/models/accounting/payment.rb +1 -1
- data/lib/xero-ruby/models/accounting/payment_delete.rb +1 -1
- data/lib/xero-ruby/models/accounting/payment_service.rb +1 -1
- data/lib/xero-ruby/models/accounting/payment_services.rb +1 -1
- data/lib/xero-ruby/models/accounting/payment_term.rb +1 -1
- data/lib/xero-ruby/models/accounting/payment_term_type.rb +1 -1
- data/lib/xero-ruby/models/accounting/payments.rb +1 -1
- data/lib/xero-ruby/models/accounting/phone.rb +1 -1
- data/lib/xero-ruby/models/accounting/prepayment.rb +1 -1
- data/lib/xero-ruby/models/accounting/prepayments.rb +1 -1
- data/lib/xero-ruby/models/accounting/purchase.rb +1 -1
- data/lib/xero-ruby/models/accounting/purchase_order.rb +1 -1
- data/lib/xero-ruby/models/accounting/purchase_orders.rb +1 -1
- data/lib/xero-ruby/models/accounting/quote.rb +1 -1
- data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +1 -1
- data/lib/xero-ruby/models/accounting/quote_status_codes.rb +1 -1
- data/lib/xero-ruby/models/accounting/quotes.rb +1 -1
- data/lib/xero-ruby/models/accounting/receipt.rb +1 -1
- data/lib/xero-ruby/models/accounting/receipts.rb +1 -1
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +1 -1
- data/lib/xero-ruby/models/accounting/repeating_invoices.rb +1 -1
- data/lib/xero-ruby/models/accounting/report.rb +1 -1
- data/lib/xero-ruby/models/accounting/report_attribute.rb +1 -1
- data/lib/xero-ruby/models/accounting/report_cell.rb +1 -1
- data/lib/xero-ruby/models/accounting/report_fields.rb +1 -1
- data/lib/xero-ruby/models/accounting/report_row.rb +1 -1
- data/lib/xero-ruby/models/accounting/report_rows.rb +1 -1
- data/lib/xero-ruby/models/accounting/report_with_row.rb +1 -1
- data/lib/xero-ruby/models/accounting/report_with_rows.rb +1 -1
- data/lib/xero-ruby/models/accounting/reports.rb +1 -1
- data/lib/xero-ruby/models/accounting/request_empty.rb +1 -1
- data/lib/xero-ruby/models/accounting/row_type.rb +1 -1
- data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +1 -1
- data/lib/xero-ruby/models/accounting/schedule.rb +1 -1
- data/lib/xero-ruby/models/accounting/tax_component.rb +1 -1
- data/lib/xero-ruby/models/accounting/tax_rate.rb +1 -1
- data/lib/xero-ruby/models/accounting/tax_rates.rb +1 -1
- data/lib/xero-ruby/models/accounting/tax_type.rb +1 -1
- data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +1 -1
- data/lib/xero-ruby/models/accounting/time_zone.rb +1 -1
- data/lib/xero-ruby/models/accounting/tracking_categories.rb +1 -1
- data/lib/xero-ruby/models/accounting/tracking_category.rb +1 -1
- data/lib/xero-ruby/models/accounting/tracking_option.rb +1 -1
- data/lib/xero-ruby/models/accounting/tracking_options.rb +1 -1
- data/lib/xero-ruby/models/accounting/user.rb +1 -1
- data/lib/xero-ruby/models/accounting/users.rb +1 -1
- data/lib/xero-ruby/models/accounting/validation_error.rb +1 -1
- data/lib/xero-ruby/models/assets/asset.rb +1 -1
- data/lib/xero-ruby/models/assets/asset_status.rb +1 -1
- data/lib/xero-ruby/models/assets/asset_status_query_param.rb +1 -1
- data/lib/xero-ruby/models/assets/asset_type.rb +1 -1
- data/lib/xero-ruby/models/assets/assets.rb +1 -1
- data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +1 -1
- data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +1 -1
- data/lib/xero-ruby/models/assets/error.rb +1 -1
- data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +1 -1
- data/lib/xero-ruby/models/assets/pagination.rb +1 -1
- data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +1 -1
- data/lib/xero-ruby/models/assets/setting.rb +1 -1
- data/lib/xero-ruby/models/projects/amount.rb +1 -1
- data/lib/xero-ruby/models/projects/charge_type.rb +1 -1
- data/lib/xero-ruby/models/projects/currency_code.rb +1 -1
- data/lib/xero-ruby/models/projects/error.rb +1 -1
- data/lib/xero-ruby/models/projects/pagination.rb +1 -1
- data/lib/xero-ruby/models/projects/project.rb +1 -1
- data/lib/xero-ruby/models/projects/project_create_or_update.rb +1 -1
- data/lib/xero-ruby/models/projects/project_patch.rb +1 -1
- data/lib/xero-ruby/models/projects/project_status.rb +1 -1
- data/lib/xero-ruby/models/projects/project_user.rb +1 -1
- data/lib/xero-ruby/models/projects/project_users.rb +1 -1
- data/lib/xero-ruby/models/projects/projects.rb +1 -1
- data/lib/xero-ruby/models/projects/task.rb +1 -1
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +1 -1
- data/lib/xero-ruby/models/projects/tasks.rb +1 -1
- data/lib/xero-ruby/models/projects/time_entries.rb +1 -1
- data/lib/xero-ruby/models/projects/time_entry.rb +1 -1
- data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +1 -1
- data/lib/xero-ruby/version.rb +2 -2
- data/spec/api_client_spec.rb +6 -6
- data/xero-ruby.gemspec +1 -1
- metadata +2 -2
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#This is the Xero Assets API
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -51,8 +51,14 @@ module XeroRuby
|
|
51
51
|
# resource path
|
52
52
|
local_var_path = '/Assets'
|
53
53
|
|
54
|
+
# camelize keys of incoming `where` opts
|
55
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
54
56
|
# query parameters
|
55
57
|
query_params = opts[:query_params] || {}
|
58
|
+
|
59
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
60
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
61
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
56
62
|
|
57
63
|
# header parameters
|
58
64
|
header_params = opts[:header_params] || {}
|
@@ -118,8 +124,14 @@ module XeroRuby
|
|
118
124
|
# resource path
|
119
125
|
local_var_path = '/AssetTypes'
|
120
126
|
|
127
|
+
# camelize keys of incoming `where` opts
|
128
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
121
129
|
# query parameters
|
122
130
|
query_params = opts[:query_params] || {}
|
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?
|
123
135
|
|
124
136
|
# header parameters
|
125
137
|
header_params = opts[:header_params] || {}
|
@@ -189,8 +201,14 @@ module XeroRuby
|
|
189
201
|
# resource path
|
190
202
|
local_var_path = '/Assets/{id}'.sub('{' + 'id' + '}', id.to_s)
|
191
203
|
|
204
|
+
# camelize keys of incoming `where` opts
|
205
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
192
206
|
# query parameters
|
193
207
|
query_params = opts[:query_params] || {}
|
208
|
+
|
209
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
210
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
211
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
194
212
|
|
195
213
|
# header parameters
|
196
214
|
header_params = opts[:header_params] || {}
|
@@ -252,8 +270,14 @@ module XeroRuby
|
|
252
270
|
# resource path
|
253
271
|
local_var_path = '/Settings'
|
254
272
|
|
273
|
+
# camelize keys of incoming `where` opts
|
274
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
255
275
|
# query parameters
|
256
276
|
query_params = opts[:query_params] || {}
|
277
|
+
|
278
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
279
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
280
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
257
281
|
|
258
282
|
# header parameters
|
259
283
|
header_params = opts[:header_params] || {}
|
@@ -315,8 +339,14 @@ module XeroRuby
|
|
315
339
|
# resource path
|
316
340
|
local_var_path = '/AssetTypes'
|
317
341
|
|
342
|
+
# camelize keys of incoming `where` opts
|
343
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
318
344
|
# query parameters
|
319
345
|
query_params = opts[:query_params] || {}
|
346
|
+
|
347
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
348
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
349
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
320
350
|
|
321
351
|
# header parameters
|
322
352
|
header_params = opts[:header_params] || {}
|
@@ -406,6 +436,8 @@ module XeroRuby
|
|
406
436
|
# resource path
|
407
437
|
local_var_path = '/Assets'
|
408
438
|
|
439
|
+
# camelize keys of incoming `where` opts
|
440
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
409
441
|
# query parameters
|
410
442
|
query_params = opts[:query_params] || {}
|
411
443
|
query_params[:'status'] = status
|
@@ -414,6 +446,10 @@ module XeroRuby
|
|
414
446
|
query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].nil?
|
415
447
|
query_params[:'sortDirection'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
|
416
448
|
query_params[:'filterBy'] = opts[:'filter_by'] if !opts[:'filter_by'].nil?
|
449
|
+
|
450
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
451
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
452
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
417
453
|
|
418
454
|
# header parameters
|
419
455
|
header_params = opts[:header_params] || {}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#This is the Xero Projects API
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -49,8 +49,14 @@ module XeroRuby
|
|
49
49
|
# resource path
|
50
50
|
local_var_path = '/projects'
|
51
51
|
|
52
|
+
# camelize keys of incoming `where` opts
|
53
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
52
54
|
# query parameters
|
53
55
|
query_params = opts[:query_params] || {}
|
56
|
+
|
57
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
58
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
59
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
54
60
|
|
55
61
|
# header parameters
|
56
62
|
header_params = opts[:header_params] || {}
|
@@ -126,8 +132,14 @@ module XeroRuby
|
|
126
132
|
# resource path
|
127
133
|
local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s)
|
128
134
|
|
135
|
+
# camelize keys of incoming `where` opts
|
136
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
129
137
|
# query parameters
|
130
138
|
query_params = opts[:query_params] || {}
|
139
|
+
|
140
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
141
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
142
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
131
143
|
|
132
144
|
# header parameters
|
133
145
|
header_params = opts[:header_params] || {}
|
@@ -203,8 +215,14 @@ module XeroRuby
|
|
203
215
|
# resource path
|
204
216
|
local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
205
217
|
|
218
|
+
# camelize keys of incoming `where` opts
|
219
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
206
220
|
# query parameters
|
207
221
|
query_params = opts[:query_params] || {}
|
222
|
+
|
223
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
224
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
225
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
208
226
|
|
209
227
|
# header parameters
|
210
228
|
header_params = opts[:header_params] || {}
|
@@ -270,8 +288,14 @@ module XeroRuby
|
|
270
288
|
# resource path
|
271
289
|
local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
272
290
|
|
291
|
+
# camelize keys of incoming `where` opts
|
292
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
273
293
|
# query parameters
|
274
294
|
query_params = opts[:query_params] || {}
|
295
|
+
|
296
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
297
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
298
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
275
299
|
|
276
300
|
# header parameters
|
277
301
|
header_params = opts[:header_params] || {}
|
@@ -345,10 +369,16 @@ module XeroRuby
|
|
345
369
|
# resource path
|
346
370
|
local_var_path = '/projectsusers'
|
347
371
|
|
372
|
+
# camelize keys of incoming `where` opts
|
373
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
348
374
|
# query parameters
|
349
375
|
query_params = opts[:query_params] || {}
|
350
376
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
351
377
|
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
378
|
+
|
379
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
380
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
381
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
352
382
|
|
353
383
|
# header parameters
|
354
384
|
header_params = opts[:header_params] || {}
|
@@ -428,6 +458,8 @@ module XeroRuby
|
|
428
458
|
# resource path
|
429
459
|
local_var_path = '/projects'
|
430
460
|
|
461
|
+
# camelize keys of incoming `where` opts
|
462
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
431
463
|
# query parameters
|
432
464
|
query_params = opts[:query_params] || {}
|
433
465
|
query_params[:'projectIds'] = @api_client.build_collection_param(opts[:'project_ids'], :multi) if !opts[:'project_ids'].nil?
|
@@ -435,6 +467,10 @@ module XeroRuby
|
|
435
467
|
query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
|
436
468
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
437
469
|
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
470
|
+
|
471
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
472
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
473
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
438
474
|
|
439
475
|
# header parameters
|
440
476
|
header_params = opts[:header_params] || {}
|
@@ -508,8 +544,14 @@ module XeroRuby
|
|
508
544
|
# resource path
|
509
545
|
local_var_path = '/projects/{projectId}/tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)
|
510
546
|
|
547
|
+
# camelize keys of incoming `where` opts
|
548
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
511
549
|
# query parameters
|
512
550
|
query_params = opts[:query_params] || {}
|
551
|
+
|
552
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
553
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
554
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
513
555
|
|
514
556
|
# header parameters
|
515
557
|
header_params = opts[:header_params] || {}
|
@@ -583,11 +625,17 @@ module XeroRuby
|
|
583
625
|
# resource path
|
584
626
|
local_var_path = '/projects/{projectId}/tasks'.sub('{' + 'projectId' + '}', project_id.to_s)
|
585
627
|
|
628
|
+
# camelize keys of incoming `where` opts
|
629
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
586
630
|
# query parameters
|
587
631
|
query_params = opts[:query_params] || {}
|
588
632
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
589
633
|
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
590
634
|
query_params[:'taskIds'] = opts[:'task_ids'] if !opts[:'task_ids'].nil?
|
635
|
+
|
636
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
637
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
638
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
591
639
|
|
592
640
|
# header parameters
|
593
641
|
header_params = opts[:header_params] || {}
|
@@ -675,6 +723,8 @@ module XeroRuby
|
|
675
723
|
# resource path
|
676
724
|
local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s)
|
677
725
|
|
726
|
+
# camelize keys of incoming `where` opts
|
727
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
678
728
|
# query parameters
|
679
729
|
query_params = opts[:query_params] || {}
|
680
730
|
query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
@@ -687,6 +737,10 @@ module XeroRuby
|
|
687
737
|
query_params[:'isChargeable'] = opts[:'is_chargeable'] if !opts[:'is_chargeable'].nil?
|
688
738
|
query_params[:'dateAfterUtc'] = opts[:'date_after_utc'] if !opts[:'date_after_utc'].nil?
|
689
739
|
query_params[:'dateBeforeUtc'] = opts[:'date_before_utc'] if !opts[:'date_before_utc'].nil?
|
740
|
+
|
741
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
742
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
743
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
690
744
|
|
691
745
|
# header parameters
|
692
746
|
header_params = opts[:header_params] || {}
|
@@ -760,8 +814,14 @@ module XeroRuby
|
|
760
814
|
# resource path
|
761
815
|
local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
762
816
|
|
817
|
+
# camelize keys of incoming `where` opts
|
818
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
763
819
|
# query parameters
|
764
820
|
query_params = opts[:query_params] || {}
|
821
|
+
|
822
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
823
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
824
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
765
825
|
|
766
826
|
# header parameters
|
767
827
|
header_params = opts[:header_params] || {}
|
@@ -835,8 +895,14 @@ module XeroRuby
|
|
835
895
|
# resource path
|
836
896
|
local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
837
897
|
|
898
|
+
# camelize keys of incoming `where` opts
|
899
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
838
900
|
# query parameters
|
839
901
|
query_params = opts[:query_params] || {}
|
902
|
+
|
903
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
904
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
905
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
840
906
|
|
841
907
|
# header parameters
|
842
908
|
header_params = opts[:header_params] || {}
|
@@ -912,8 +978,14 @@ module XeroRuby
|
|
912
978
|
# resource path
|
913
979
|
local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
914
980
|
|
981
|
+
# camelize keys of incoming `where` opts
|
982
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
915
983
|
# query parameters
|
916
984
|
query_params = opts[:query_params] || {}
|
985
|
+
|
986
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
987
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
988
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
917
989
|
|
918
990
|
# header parameters
|
919
991
|
header_params = opts[:header_params] || {}
|
@@ -995,8 +1067,14 @@ module XeroRuby
|
|
995
1067
|
# resource path
|
996
1068
|
local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
997
1069
|
|
1070
|
+
# camelize keys of incoming `where` opts
|
1071
|
+
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
|
998
1072
|
# query parameters
|
999
1073
|
query_params = opts[:query_params] || {}
|
1074
|
+
|
1075
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
1076
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
1077
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
1000
1078
|
|
1001
1079
|
# header parameters
|
1002
1080
|
header_params = opts[:header_params] || {}
|
data/lib/xero-ruby/api_client.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -192,7 +192,7 @@ module XeroRuby
|
|
192
192
|
# @option opts [Hash] :query_params Query parameters
|
193
193
|
# @option opts [Hash] :form_params Query parameters
|
194
194
|
# @option opts [Object] :body HTTP body (JSON/XML)
|
195
|
-
# @return
|
195
|
+
# @return A Faraday Request
|
196
196
|
def build_request(http_method, path, request, opts = {})
|
197
197
|
url = build_request_url(path)
|
198
198
|
http_method = http_method.to_sym.downcase
|
@@ -518,7 +518,7 @@ module XeroRuby
|
|
518
518
|
end
|
519
519
|
|
520
520
|
def gsubbed(str, pattern, extra = "")
|
521
|
-
key_map_scronyms = {
|
521
|
+
key_map_scronyms = {}
|
522
522
|
str = str.gsub(pattern) do
|
523
523
|
extra + (key_map_scronyms[Regexp.last_match(1)] || capitalize_first(Regexp.last_match(1)))
|
524
524
|
end
|
data/lib/xero-ruby/api_error.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.2.
|
6
|
+
The version of the OpenAPI document: 2.2.12
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -54,7 +54,7 @@ module XeroRuby::Accounting
|
|
54
54
|
:'file_name' => :'String',
|
55
55
|
:'url' => :'String',
|
56
56
|
:'mime_type' => :'String',
|
57
|
-
:'content_length' => :'
|
57
|
+
:'content_length' => :'Integer',
|
58
58
|
:'include_online' => :'Boolean'
|
59
59
|
}
|
60
60
|
end
|