xero-ruby 2.1.0 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -9
  3. data/build_notes.md +25 -6
  4. data/docs/accounting/Account.md +1 -1
  5. data/docs/accounting/AccountingApi.md +4 -1
  6. data/docs/accounting/AccountsPayable.md +2 -2
  7. data/docs/accounting/AccountsReceivable.md +2 -2
  8. data/docs/accounting/Allocation.md +1 -1
  9. data/docs/accounting/BankTransaction.md +6 -6
  10. data/docs/accounting/BankTransfer.md +3 -3
  11. data/docs/accounting/BatchPayment.md +2 -2
  12. data/docs/accounting/BrandingTheme.md +1 -1
  13. data/docs/accounting/Contact.md +2 -2
  14. data/docs/accounting/CreditNote.md +6 -6
  15. data/docs/accounting/Employee.md +1 -1
  16. data/docs/accounting/ExpenseClaim.md +4 -4
  17. data/docs/accounting/HistoryRecord.md +1 -1
  18. data/docs/accounting/Invoice.md +12 -10
  19. data/docs/accounting/Item.md +3 -3
  20. data/docs/accounting/Journal.md +1 -1
  21. data/docs/accounting/JournalLine.md +3 -3
  22. data/docs/accounting/LineItem.md +6 -6
  23. data/docs/accounting/LinkedTransaction.md +1 -1
  24. data/docs/accounting/ManualJournal.md +1 -1
  25. data/docs/accounting/ManualJournalLine.md +2 -2
  26. data/docs/accounting/Organisation.md +1 -1
  27. data/docs/accounting/Overpayment.md +6 -6
  28. data/docs/accounting/Payment.md +3 -3
  29. data/docs/accounting/Prepayment.md +6 -6
  30. data/docs/accounting/Purchase.md +1 -1
  31. data/docs/accounting/PurchaseOrder.md +6 -6
  32. data/docs/accounting/Quote.md +5 -5
  33. data/docs/accounting/Receipt.md +4 -4
  34. data/docs/accounting/RepeatingInvoice.md +3 -3
  35. data/docs/accounting/Report.md +1 -1
  36. data/docs/accounting/ReportWithRow.md +1 -1
  37. data/docs/accounting/TaxComponent.md +1 -1
  38. data/docs/accounting/TaxRate.md +2 -2
  39. data/docs/accounting/TenNinetyNineContact.md +13 -13
  40. data/docs/accounting/TrackingOption.md +3 -3
  41. data/docs/accounting/User.md +1 -1
  42. data/docs/assets/Asset.md +3 -3
  43. data/docs/assets/AssetApi.md +6 -6
  44. data/docs/assets/BookDepreciationDetail.md +6 -6
  45. data/docs/assets/BookDepreciationSetting.md +1 -1
  46. data/docs/projects/Amount.md +1 -1
  47. data/docs/projects/ProjectCreateOrUpdate.md +1 -1
  48. data/lib/xero-ruby.rb +1 -1
  49. data/lib/xero-ruby/api/accounting_api.rb +434 -216
  50. data/lib/xero-ruby/api/asset_api.rb +19 -13
  51. data/lib/xero-ruby/api/project_api.rb +27 -14
  52. data/lib/xero-ruby/api_client.rb +34 -1
  53. data/lib/xero-ruby/api_error.rb +1 -1
  54. data/lib/xero-ruby/configuration.rb +2 -2
  55. data/lib/xero-ruby/models/accounting/account.rb +2 -18
  56. data/lib/xero-ruby/models/accounting/account_type.rb +1 -1
  57. data/lib/xero-ruby/models/accounting/accounts.rb +2 -2
  58. data/lib/xero-ruby/models/accounting/accounts_payable.rb +2 -2
  59. data/lib/xero-ruby/models/accounting/accounts_receivable.rb +2 -2
  60. data/lib/xero-ruby/models/accounting/address.rb +2 -2
  61. data/lib/xero-ruby/models/accounting/allocation.rb +2 -2
  62. data/lib/xero-ruby/models/accounting/allocations.rb +2 -2
  63. data/lib/xero-ruby/models/accounting/attachment.rb +2 -2
  64. data/lib/xero-ruby/models/accounting/attachments.rb +2 -2
  65. data/lib/xero-ruby/models/accounting/balances.rb +2 -2
  66. data/lib/xero-ruby/models/accounting/bank_transaction.rb +2 -7
  67. data/lib/xero-ruby/models/accounting/bank_transactions.rb +2 -2
  68. data/lib/xero-ruby/models/accounting/bank_transfer.rb +2 -2
  69. data/lib/xero-ruby/models/accounting/bank_transfers.rb +2 -2
  70. data/lib/xero-ruby/models/accounting/batch_payment.rb +2 -17
  71. data/lib/xero-ruby/models/accounting/batch_payment_details.rb +2 -2
  72. data/lib/xero-ruby/models/accounting/batch_payments.rb +2 -2
  73. data/lib/xero-ruby/models/accounting/bill.rb +2 -2
  74. data/lib/xero-ruby/models/accounting/branding_theme.rb +2 -2
  75. data/lib/xero-ruby/models/accounting/branding_themes.rb +2 -2
  76. data/lib/xero-ruby/models/accounting/cis_org_setting.rb +2 -2
  77. data/lib/xero-ruby/models/accounting/cis_setting.rb +2 -2
  78. data/lib/xero-ruby/models/accounting/cis_settings.rb +2 -2
  79. data/lib/xero-ruby/models/accounting/contact.rb +2 -2
  80. data/lib/xero-ruby/models/accounting/contact_group.rb +2 -2
  81. data/lib/xero-ruby/models/accounting/contact_groups.rb +2 -2
  82. data/lib/xero-ruby/models/accounting/contact_person.rb +2 -2
  83. data/lib/xero-ruby/models/accounting/contacts.rb +2 -2
  84. data/lib/xero-ruby/models/accounting/country_code.rb +1 -1
  85. data/lib/xero-ruby/models/accounting/credit_note.rb +2 -2
  86. data/lib/xero-ruby/models/accounting/credit_notes.rb +2 -2
  87. data/lib/xero-ruby/models/accounting/currencies.rb +2 -2
  88. data/lib/xero-ruby/models/accounting/currency.rb +2 -2
  89. data/lib/xero-ruby/models/accounting/currency_code.rb +5 -3
  90. data/lib/xero-ruby/models/accounting/element.rb +2 -2
  91. data/lib/xero-ruby/models/accounting/employee.rb +5 -4
  92. data/lib/xero-ruby/models/accounting/employees.rb +2 -2
  93. data/lib/xero-ruby/models/accounting/error.rb +2 -2
  94. data/lib/xero-ruby/models/accounting/expense_claim.rb +2 -2
  95. data/lib/xero-ruby/models/accounting/expense_claims.rb +2 -2
  96. data/lib/xero-ruby/models/accounting/external_link.rb +2 -2
  97. data/lib/xero-ruby/models/accounting/history_record.rb +2 -2
  98. data/lib/xero-ruby/models/accounting/history_records.rb +2 -2
  99. data/lib/xero-ruby/models/accounting/invoice.rb +13 -3
  100. data/lib/xero-ruby/models/accounting/invoice_reminder.rb +2 -2
  101. data/lib/xero-ruby/models/accounting/invoice_reminders.rb +2 -2
  102. data/lib/xero-ruby/models/accounting/invoices.rb +2 -2
  103. data/lib/xero-ruby/models/accounting/item.rb +2 -2
  104. data/lib/xero-ruby/models/accounting/items.rb +2 -2
  105. data/lib/xero-ruby/models/accounting/journal.rb +2 -2
  106. data/lib/xero-ruby/models/accounting/journal_line.rb +2 -2
  107. data/lib/xero-ruby/models/accounting/journals.rb +2 -2
  108. data/lib/xero-ruby/models/accounting/line_amount_types.rb +1 -1
  109. data/lib/xero-ruby/models/accounting/line_item.rb +2 -2
  110. data/lib/xero-ruby/models/accounting/line_item_tracking.rb +2 -2
  111. data/lib/xero-ruby/models/accounting/linked_transaction.rb +2 -2
  112. data/lib/xero-ruby/models/accounting/linked_transactions.rb +2 -2
  113. data/lib/xero-ruby/models/accounting/manual_journal.rb +2 -2
  114. data/lib/xero-ruby/models/accounting/manual_journal_line.rb +2 -2
  115. data/lib/xero-ruby/models/accounting/manual_journals.rb +2 -2
  116. data/lib/xero-ruby/models/accounting/online_invoice.rb +2 -2
  117. data/lib/xero-ruby/models/accounting/online_invoices.rb +2 -2
  118. data/lib/xero-ruby/models/accounting/organisation.rb +2 -4
  119. data/lib/xero-ruby/models/accounting/organisations.rb +2 -2
  120. data/lib/xero-ruby/models/accounting/overpayment.rb +2 -2
  121. data/lib/xero-ruby/models/accounting/overpayments.rb +2 -2
  122. data/lib/xero-ruby/models/accounting/payment.rb +2 -2
  123. data/lib/xero-ruby/models/accounting/payment_delete.rb +2 -2
  124. data/lib/xero-ruby/models/accounting/payment_service.rb +2 -2
  125. data/lib/xero-ruby/models/accounting/payment_services.rb +2 -2
  126. data/lib/xero-ruby/models/accounting/payment_term.rb +2 -2
  127. data/lib/xero-ruby/models/accounting/payment_term_type.rb +1 -1
  128. data/lib/xero-ruby/models/accounting/payments.rb +2 -2
  129. data/lib/xero-ruby/models/accounting/phone.rb +2 -2
  130. data/lib/xero-ruby/models/accounting/prepayment.rb +2 -2
  131. data/lib/xero-ruby/models/accounting/prepayments.rb +2 -2
  132. data/lib/xero-ruby/models/accounting/purchase.rb +2 -2
  133. data/lib/xero-ruby/models/accounting/purchase_order.rb +2 -2
  134. data/lib/xero-ruby/models/accounting/purchase_orders.rb +2 -2
  135. data/lib/xero-ruby/models/accounting/quote.rb +2 -2
  136. data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +1 -1
  137. data/lib/xero-ruby/models/accounting/quote_status_codes.rb +1 -1
  138. data/lib/xero-ruby/models/accounting/quotes.rb +2 -2
  139. data/lib/xero-ruby/models/accounting/receipt.rb +2 -2
  140. data/lib/xero-ruby/models/accounting/receipts.rb +2 -2
  141. data/lib/xero-ruby/models/accounting/repeating_invoice.rb +2 -2
  142. data/lib/xero-ruby/models/accounting/repeating_invoices.rb +2 -2
  143. data/lib/xero-ruby/models/accounting/report.rb +2 -2
  144. data/lib/xero-ruby/models/accounting/report_attribute.rb +2 -2
  145. data/lib/xero-ruby/models/accounting/report_cell.rb +2 -2
  146. data/lib/xero-ruby/models/accounting/report_fields.rb +2 -2
  147. data/lib/xero-ruby/models/accounting/report_row.rb +2 -2
  148. data/lib/xero-ruby/models/accounting/report_rows.rb +2 -2
  149. data/lib/xero-ruby/models/accounting/report_with_row.rb +2 -2
  150. data/lib/xero-ruby/models/accounting/report_with_rows.rb +2 -2
  151. data/lib/xero-ruby/models/accounting/reports.rb +2 -2
  152. data/lib/xero-ruby/models/accounting/request_empty.rb +2 -2
  153. data/lib/xero-ruby/models/accounting/row_type.rb +1 -1
  154. data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +2 -2
  155. data/lib/xero-ruby/models/accounting/schedule.rb +2 -2
  156. data/lib/xero-ruby/models/accounting/tax_component.rb +2 -2
  157. data/lib/xero-ruby/models/accounting/tax_rate.rb +2 -2
  158. data/lib/xero-ruby/models/accounting/tax_rates.rb +2 -2
  159. data/lib/xero-ruby/models/accounting/tax_type.rb +1 -1
  160. data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +2 -2
  161. data/lib/xero-ruby/models/accounting/time_zone.rb +2 -1
  162. data/lib/xero-ruby/models/accounting/tracking_categories.rb +2 -2
  163. data/lib/xero-ruby/models/accounting/tracking_category.rb +2 -2
  164. data/lib/xero-ruby/models/accounting/tracking_option.rb +10 -10
  165. data/lib/xero-ruby/models/accounting/tracking_options.rb +2 -2
  166. data/lib/xero-ruby/models/accounting/user.rb +2 -2
  167. data/lib/xero-ruby/models/accounting/users.rb +2 -2
  168. data/lib/xero-ruby/models/accounting/validation_error.rb +2 -2
  169. data/lib/xero-ruby/models/assets/asset.rb +2 -2
  170. data/lib/xero-ruby/models/assets/asset_status.rb +1 -1
  171. data/lib/xero-ruby/models/assets/asset_status_query_param.rb +1 -1
  172. data/lib/xero-ruby/models/assets/asset_type.rb +2 -2
  173. data/lib/xero-ruby/models/assets/assets.rb +2 -2
  174. data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +2 -2
  175. data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +2 -2
  176. data/lib/xero-ruby/models/assets/error.rb +2 -2
  177. data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +2 -2
  178. data/lib/xero-ruby/models/assets/pagination.rb +2 -2
  179. data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +2 -2
  180. data/lib/xero-ruby/models/assets/setting.rb +2 -2
  181. data/lib/xero-ruby/models/projects/amount.rb +2 -2
  182. data/lib/xero-ruby/models/projects/charge_type.rb +1 -1
  183. data/lib/xero-ruby/models/projects/currency_code.rb +1 -1
  184. data/lib/xero-ruby/models/projects/error.rb +2 -2
  185. data/lib/xero-ruby/models/projects/pagination.rb +2 -2
  186. data/lib/xero-ruby/models/projects/project.rb +2 -2
  187. data/lib/xero-ruby/models/projects/project_create_or_update.rb +2 -2
  188. data/lib/xero-ruby/models/projects/project_patch.rb +2 -2
  189. data/lib/xero-ruby/models/projects/project_status.rb +1 -1
  190. data/lib/xero-ruby/models/projects/project_user.rb +2 -2
  191. data/lib/xero-ruby/models/projects/project_users.rb +2 -2
  192. data/lib/xero-ruby/models/projects/projects.rb +2 -2
  193. data/lib/xero-ruby/models/projects/task.rb +2 -2
  194. data/lib/xero-ruby/models/projects/task_create_or_update.rb +2 -2
  195. data/lib/xero-ruby/models/projects/tasks.rb +2 -2
  196. data/lib/xero-ruby/models/projects/time_entries.rb +2 -2
  197. data/lib/xero-ruby/models/projects/time_entry.rb +2 -2
  198. data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +2 -2
  199. data/lib/xero-ruby/version.rb +2 -2
  200. data/xero-ruby-2.2.3.gem +0 -0
  201. data/xero-ruby.gem +0 -0
  202. data/xero-ruby.gemspec +2 -2
  203. metadata +5 -3
@@ -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.12
6
+ The version of the OpenAPI document: 2.3.2
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -52,7 +52,8 @@ module XeroRuby
52
52
  local_var_path = '/Assets'
53
53
 
54
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?
55
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
56
+
56
57
  # query parameters
57
58
  query_params = opts[:query_params] || {}
58
59
 
@@ -66,7 +67,7 @@ module XeroRuby
66
67
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
68
  # HTTP header 'Content-Type'
68
69
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
69
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
70
+ header_params[:'xero-tenant-id'] = xero_tenant_id
70
71
 
71
72
  # form parameters
72
73
  form_params = opts[:form_params] || {}
@@ -125,7 +126,8 @@ module XeroRuby
125
126
  local_var_path = '/AssetTypes'
126
127
 
127
128
  # 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?
129
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
130
+
129
131
  # query parameters
130
132
  query_params = opts[:query_params] || {}
131
133
 
@@ -139,7 +141,7 @@ module XeroRuby
139
141
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
140
142
  # HTTP header 'Content-Type'
141
143
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
142
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
144
+ header_params[:'xero-tenant-id'] = xero_tenant_id
143
145
 
144
146
  # form parameters
145
147
  form_params = opts[:form_params] || {}
@@ -202,7 +204,8 @@ module XeroRuby
202
204
  local_var_path = '/Assets/{id}'.sub('{' + 'id' + '}', id.to_s)
203
205
 
204
206
  # 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?
207
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
208
+
206
209
  # query parameters
207
210
  query_params = opts[:query_params] || {}
208
211
 
@@ -214,7 +217,7 @@ module XeroRuby
214
217
  header_params = opts[:header_params] || {}
215
218
  # HTTP header 'Accept' (if needed)
216
219
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
217
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
220
+ header_params[:'xero-tenant-id'] = xero_tenant_id
218
221
 
219
222
  # form parameters
220
223
  form_params = opts[:form_params] || {}
@@ -271,7 +274,8 @@ module XeroRuby
271
274
  local_var_path = '/Settings'
272
275
 
273
276
  # 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?
277
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
278
+
275
279
  # query parameters
276
280
  query_params = opts[:query_params] || {}
277
281
 
@@ -283,7 +287,7 @@ module XeroRuby
283
287
  header_params = opts[:header_params] || {}
284
288
  # HTTP header 'Accept' (if needed)
285
289
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
286
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
290
+ header_params[:'xero-tenant-id'] = xero_tenant_id
287
291
 
288
292
  # form parameters
289
293
  form_params = opts[:form_params] || {}
@@ -340,7 +344,8 @@ module XeroRuby
340
344
  local_var_path = '/AssetTypes'
341
345
 
342
346
  # 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?
347
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
348
+
344
349
  # query parameters
345
350
  query_params = opts[:query_params] || {}
346
351
 
@@ -352,7 +357,7 @@ module XeroRuby
352
357
  header_params = opts[:header_params] || {}
353
358
  # HTTP header 'Accept' (if needed)
354
359
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
355
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
360
+ header_params[:'xero-tenant-id'] = xero_tenant_id
356
361
 
357
362
  # form parameters
358
363
  form_params = opts[:form_params] || {}
@@ -437,7 +442,8 @@ module XeroRuby
437
442
  local_var_path = '/Assets'
438
443
 
439
444
  # 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?
445
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
446
+
441
447
  # query parameters
442
448
  query_params = opts[:query_params] || {}
443
449
  query_params[:'status'] = status
@@ -455,7 +461,7 @@ module XeroRuby
455
461
  header_params = opts[:header_params] || {}
456
462
  # HTTP header 'Accept' (if needed)
457
463
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
458
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
464
+ header_params[:'xero-tenant-id'] = xero_tenant_id
459
465
 
460
466
  # form parameters
461
467
  form_params = opts[:form_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.12
6
+ The version of the OpenAPI document: 2.3.2
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -50,7 +50,8 @@ module XeroRuby
50
50
  local_var_path = '/projects'
51
51
 
52
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?
53
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
54
+
54
55
  # query parameters
55
56
  query_params = opts[:query_params] || {}
56
57
 
@@ -133,7 +134,8 @@ module XeroRuby
133
134
  local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s)
134
135
 
135
136
  # 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?
137
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
138
+
137
139
  # query parameters
138
140
  query_params = opts[:query_params] || {}
139
141
 
@@ -216,7 +218,8 @@ module XeroRuby
216
218
  local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
217
219
 
218
220
  # 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?
221
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
222
+
220
223
  # query parameters
221
224
  query_params = opts[:query_params] || {}
222
225
 
@@ -289,7 +292,8 @@ module XeroRuby
289
292
  local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
290
293
 
291
294
  # 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?
295
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
296
+
293
297
  # query parameters
294
298
  query_params = opts[:query_params] || {}
295
299
 
@@ -370,7 +374,8 @@ module XeroRuby
370
374
  local_var_path = '/projectsusers'
371
375
 
372
376
  # 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?
377
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
378
+
374
379
  # query parameters
375
380
  query_params = opts[:query_params] || {}
376
381
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
@@ -459,7 +464,8 @@ module XeroRuby
459
464
  local_var_path = '/projects'
460
465
 
461
466
  # 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?
467
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
468
+
463
469
  # query parameters
464
470
  query_params = opts[:query_params] || {}
465
471
  query_params[:'projectIds'] = @api_client.build_collection_param(opts[:'project_ids'], :multi) if !opts[:'project_ids'].nil?
@@ -545,7 +551,8 @@ module XeroRuby
545
551
  local_var_path = '/projects/{projectId}/tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)
546
552
 
547
553
  # 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?
554
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
555
+
549
556
  # query parameters
550
557
  query_params = opts[:query_params] || {}
551
558
 
@@ -626,7 +633,8 @@ module XeroRuby
626
633
  local_var_path = '/projects/{projectId}/tasks'.sub('{' + 'projectId' + '}', project_id.to_s)
627
634
 
628
635
  # 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?
636
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
637
+
630
638
  # query parameters
631
639
  query_params = opts[:query_params] || {}
632
640
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
@@ -724,7 +732,8 @@ module XeroRuby
724
732
  local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s)
725
733
 
726
734
  # 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?
735
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
736
+
728
737
  # query parameters
729
738
  query_params = opts[:query_params] || {}
730
739
  query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
@@ -815,7 +824,8 @@ module XeroRuby
815
824
  local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
816
825
 
817
826
  # 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?
827
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
828
+
819
829
  # query parameters
820
830
  query_params = opts[:query_params] || {}
821
831
 
@@ -896,7 +906,8 @@ module XeroRuby
896
906
  local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
897
907
 
898
908
  # 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?
909
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
910
+
900
911
  # query parameters
901
912
  query_params = opts[:query_params] || {}
902
913
 
@@ -979,7 +990,8 @@ module XeroRuby
979
990
  local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
980
991
 
981
992
  # 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?
993
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
994
+
983
995
  # query parameters
984
996
  query_params = opts[:query_params] || {}
985
997
 
@@ -1068,7 +1080,8 @@ module XeroRuby
1068
1080
  local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
1069
1081
 
1070
1082
  # 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?
1083
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1084
+
1072
1085
  # query parameters
1073
1086
  query_params = opts[:query_params] || {}
1074
1087
 
@@ -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.12
6
+ The version of the OpenAPI document: 2.3.2
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -550,5 +550,38 @@ module XeroRuby
550
550
  fail "unknown collection format: #{collection_format.inspect}"
551
551
  end
552
552
  end
553
+
554
+ def parameterize_where(where_opts)
555
+ where_opts.map do |k,v|
556
+ case v
557
+ when Array
558
+ operator = v.first
559
+ query = v.last
560
+ if query.is_a?(Date)
561
+ "#{camelize_key(k)} #{operator} DateTime(#{query.strftime("%Y,%m,%d")})"
562
+ elsif [Float, Integer].member?(query.class)
563
+ %{#{camelize_key(k)} #{operator} #{query}}
564
+ elsif [true, false].member?(query)
565
+ %{#{camelize_key(k)} #{operator} #{query}}
566
+ else
567
+ if k == :contact_id
568
+ %{Contact.ContactID #{operator} guid("#{query}")}
569
+ elsif k == :contact_number
570
+ %{Contact.ContactNumber #{operator} "#{query}"}
571
+ else
572
+ %{#{camelize_key(k)} #{operator} "#{query}"}
573
+ end
574
+ end
575
+ when Range
576
+ if v.first.is_a?(DateTime) || v.first.is_a?(Date) || v.first.is_a?(Time)
577
+ "#{camelize_key(k)} >= DateTime(#{v.first.strftime("%Y,%m,%d")}) AND #{camelize_key(k)} <= DateTime(#{v.last.strftime("%Y,%m,%d")})"
578
+ else
579
+ "#{camelize_key(k)} >= #{v.first} AND #{camelize_key(k)} <= #{v.last}"
580
+ end
581
+ else
582
+ %{#{camelize_key(k)} #{v}}
583
+ end
584
+ end.join(' AND ')
585
+ end
553
586
  end
554
587
  end
@@ -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.12
6
+ The version of the OpenAPI document: 2.3.2
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.12
6
+ The version of the OpenAPI document: 2.3.2
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -218,7 +218,7 @@ module XeroRuby
218
218
  [
219
219
  {
220
220
  url: "https://api.xero.com/api.xro/2.0",
221
- description: "Xero Accounting API servers",
221
+ description: "Xero Accounting API server",
222
222
  }
223
223
  ]
224
224
  end
@@ -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.12
6
+ The version of the OpenAPI document: 2.3.2
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -91,7 +91,6 @@ module XeroRuby::Accounting
91
91
  CISLABOURINCOME = "CISLABOURINCOME".freeze
92
92
  CISLIABILITY = "CISLIABILITY".freeze
93
93
  CISMATERIALS = "CISMATERIALS".freeze
94
- # duplicate definitions generated: https://github.com/XeroAPI/xero-ruby/issues/53#issuecomment-668893305
95
94
  # EMPTY = "".freeze
96
95
 
97
96
  # Shown if set
@@ -290,10 +289,6 @@ module XeroRuby::Accounting
290
289
  # @return Array for valid properties with the reasons
291
290
  def list_invalid_properties
292
291
  invalid_properties = Array.new
293
- if !@code.nil? && @code.to_s.length > 10
294
- invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 10.')
295
- end
296
-
297
292
  if !@name.nil? && @name.to_s.length > 150
298
293
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 150.')
299
294
  end
@@ -304,7 +299,6 @@ module XeroRuby::Accounting
304
299
  # Check to see if the all the properties in the model are valid
305
300
  # @return true if the model is valid
306
301
  def valid?
307
- return false if !@code.nil? && @code.to_s.length > 10
308
302
  return false if !@name.nil? && @name.to_s.length > 150
309
303
  status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "ARCHIVED", "DELETED"])
310
304
  return false unless status_validator.valid?(@status)
@@ -317,16 +311,6 @@ module XeroRuby::Accounting
317
311
  true
318
312
  end
319
313
 
320
- # Custom attribute writer method with validation
321
- # @param [Object] code Value to be assigned
322
- def code=(code)
323
- if !code.nil? && code.to_s.length > 10
324
- fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 10.'
325
- end
326
-
327
- @code = code
328
- end
329
-
330
314
  # Custom attribute writer method with validation
331
315
  # @param [Object] name Value to be assigned
332
316
  def name=(name)
@@ -531,7 +515,7 @@ module XeroRuby::Accounting
531
515
  # customized data_parser
532
516
  def parse_date(datestring)
533
517
  seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
534
- return Time.at(seconds_since_epoch).to_s
518
+ return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
535
519
  end
536
520
  end
537
521
  end
@@ -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.12
6
+ The version of the OpenAPI document: 2.3.2
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.12
6
+ The version of the OpenAPI document: 2.3.2
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -204,7 +204,7 @@ module XeroRuby::Accounting
204
204
  # customized data_parser
205
205
  def parse_date(datestring)
206
206
  seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
207
- return Time.at(seconds_since_epoch).to_s
207
+ return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
208
208
  end
209
209
  end
210
210
  end
@@ -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.12
6
+ The version of the OpenAPI document: 2.3.2
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -212,7 +212,7 @@ module XeroRuby::Accounting
212
212
  # customized data_parser
213
213
  def parse_date(datestring)
214
214
  seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
215
- return Time.at(seconds_since_epoch).to_s
215
+ return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
216
216
  end
217
217
  end
218
218
  end
@@ -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.12
6
+ The version of the OpenAPI document: 2.3.2
7
7
  Contact: api@xero.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -212,7 +212,7 @@ module XeroRuby::Accounting
212
212
  # customized data_parser
213
213
  def parse_date(datestring)
214
214
  seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
215
- return Time.at(seconds_since_epoch).to_s
215
+ return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
216
216
  end
217
217
  end
218
218
  end