xero-ruby 2.4.1 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (460) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +240 -189
  3. data/lib/xero-ruby.rb +10 -4
  4. data/lib/xero-ruby/api/accounting_api.rb +1308 -920
  5. data/lib/xero-ruby/api/asset_api.rb +15 -14
  6. data/lib/xero-ruby/api/files_api.rb +204 -85
  7. data/lib/xero-ruby/api/payroll_au_api.rb +121 -93
  8. data/lib/xero-ruby/api/payroll_nz_api.rb +307 -240
  9. data/lib/xero-ruby/api/payroll_uk_api.rb +317 -254
  10. data/lib/xero-ruby/api/project_api.rb +71 -59
  11. data/lib/xero-ruby/api_client.rb +182 -128
  12. data/lib/xero-ruby/api_error.rb +4 -4
  13. data/lib/xero-ruby/configuration.rb +17 -5
  14. data/lib/xero-ruby/models/accounting/account.rb +25 -12
  15. data/lib/xero-ruby/models/accounting/account_type.rb +1 -2
  16. data/lib/xero-ruby/models/accounting/accounts.rb +25 -11
  17. data/lib/xero-ruby/models/accounting/accounts_payable.rb +25 -11
  18. data/lib/xero-ruby/models/accounting/accounts_receivable.rb +25 -11
  19. data/lib/xero-ruby/models/accounting/action.rb +25 -11
  20. data/lib/xero-ruby/models/accounting/actions.rb +25 -11
  21. data/lib/xero-ruby/models/accounting/address.rb +27 -14
  22. data/lib/xero-ruby/models/accounting/address_for_organisation.rb +484 -0
  23. data/lib/xero-ruby/models/accounting/allocation.rb +25 -11
  24. data/lib/xero-ruby/models/accounting/allocations.rb +25 -11
  25. data/lib/xero-ruby/models/accounting/attachment.rb +25 -11
  26. data/lib/xero-ruby/models/accounting/attachments.rb +25 -11
  27. data/lib/xero-ruby/models/accounting/balance_details.rb +25 -11
  28. data/lib/xero-ruby/models/accounting/balances.rb +25 -11
  29. data/lib/xero-ruby/models/accounting/bank_transaction.rb +25 -11
  30. data/lib/xero-ruby/models/accounting/bank_transactions.rb +25 -11
  31. data/lib/xero-ruby/models/accounting/bank_transfer.rb +25 -11
  32. data/lib/xero-ruby/models/accounting/bank_transfers.rb +25 -11
  33. data/lib/xero-ruby/models/accounting/batch_payment.rb +41 -15
  34. data/lib/xero-ruby/models/accounting/batch_payment_details.rb +25 -11
  35. data/lib/xero-ruby/models/accounting/batch_payments.rb +25 -11
  36. data/lib/xero-ruby/models/accounting/bill.rb +25 -11
  37. data/lib/xero-ruby/models/accounting/branding_theme.rb +25 -11
  38. data/lib/xero-ruby/models/accounting/branding_themes.rb +25 -11
  39. data/lib/xero-ruby/models/accounting/budget.rb +327 -0
  40. data/lib/xero-ruby/models/accounting/budget_balance.rb +267 -0
  41. data/lib/xero-ruby/models/accounting/budget_line.rb +244 -0
  42. data/lib/xero-ruby/models/{files/file_response204.rb → accounting/budgets.rb} +40 -24
  43. data/lib/xero-ruby/models/accounting/cis_org_setting.rb +26 -12
  44. data/lib/xero-ruby/models/accounting/cis_org_settings.rb +224 -0
  45. data/lib/xero-ruby/models/accounting/cis_setting.rb +26 -12
  46. data/lib/xero-ruby/models/accounting/cis_settings.rb +25 -11
  47. data/lib/xero-ruby/models/accounting/contact.rb +25 -11
  48. data/lib/xero-ruby/models/accounting/contact_group.rb +25 -11
  49. data/lib/xero-ruby/models/accounting/contact_groups.rb +25 -11
  50. data/lib/xero-ruby/models/accounting/contact_person.rb +25 -11
  51. data/lib/xero-ruby/models/accounting/contacts.rb +25 -11
  52. data/lib/xero-ruby/models/accounting/conversion_balances.rb +25 -11
  53. data/lib/xero-ruby/models/accounting/conversion_date.rb +25 -11
  54. data/lib/xero-ruby/models/accounting/country_code.rb +1 -2
  55. data/lib/xero-ruby/models/accounting/credit_note.rb +62 -16
  56. data/lib/xero-ruby/models/accounting/credit_notes.rb +25 -11
  57. data/lib/xero-ruby/models/accounting/currencies.rb +25 -11
  58. data/lib/xero-ruby/models/accounting/currency.rb +25 -11
  59. data/lib/xero-ruby/models/accounting/currency_code.rb +1 -2
  60. data/lib/xero-ruby/models/accounting/element.rb +25 -11
  61. data/lib/xero-ruby/models/accounting/employee.rb +25 -11
  62. data/lib/xero-ruby/models/accounting/employees.rb +25 -11
  63. data/lib/xero-ruby/models/accounting/error.rb +25 -11
  64. data/lib/xero-ruby/models/accounting/expense_claim.rb +25 -11
  65. data/lib/xero-ruby/models/accounting/expense_claims.rb +25 -11
  66. data/lib/xero-ruby/models/accounting/external_link.rb +25 -11
  67. data/lib/xero-ruby/models/accounting/history_record.rb +25 -11
  68. data/lib/xero-ruby/models/accounting/history_records.rb +25 -11
  69. data/lib/xero-ruby/models/accounting/import_summary.rb +25 -11
  70. data/lib/xero-ruby/models/accounting/import_summary_accounts.rb +33 -19
  71. data/lib/xero-ruby/models/accounting/import_summary_object.rb +25 -11
  72. data/lib/xero-ruby/models/accounting/import_summary_organisation.rb +25 -11
  73. data/lib/xero-ruby/models/accounting/invoice.rb +37 -28
  74. data/lib/xero-ruby/models/accounting/invoice_reminder.rb +25 -11
  75. data/lib/xero-ruby/models/accounting/invoice_reminders.rb +25 -11
  76. data/lib/xero-ruby/models/accounting/invoices.rb +25 -11
  77. data/lib/xero-ruby/models/accounting/item.rb +25 -11
  78. data/lib/xero-ruby/models/accounting/items.rb +25 -11
  79. data/lib/xero-ruby/models/accounting/journal.rb +25 -11
  80. data/lib/xero-ruby/models/accounting/journal_line.rb +25 -11
  81. data/lib/xero-ruby/models/accounting/journals.rb +25 -11
  82. data/lib/xero-ruby/models/accounting/line_amount_types.rb +1 -2
  83. data/lib/xero-ruby/models/accounting/line_item.rb +36 -12
  84. data/lib/xero-ruby/models/accounting/line_item_tracking.rb +25 -11
  85. data/lib/xero-ruby/models/accounting/linked_transaction.rb +25 -11
  86. data/lib/xero-ruby/models/accounting/linked_transactions.rb +25 -11
  87. data/lib/xero-ruby/models/accounting/manual_journal.rb +25 -11
  88. data/lib/xero-ruby/models/accounting/manual_journal_line.rb +25 -11
  89. data/lib/xero-ruby/models/accounting/manual_journals.rb +25 -11
  90. data/lib/xero-ruby/models/accounting/online_invoice.rb +25 -11
  91. data/lib/xero-ruby/models/accounting/online_invoices.rb +25 -11
  92. data/lib/xero-ruby/models/accounting/organisation.rb +26 -14
  93. data/lib/xero-ruby/models/accounting/organisations.rb +25 -11
  94. data/lib/xero-ruby/models/accounting/overpayment.rb +25 -11
  95. data/lib/xero-ruby/models/accounting/overpayments.rb +25 -11
  96. data/lib/xero-ruby/models/accounting/payment.rb +36 -12
  97. data/lib/xero-ruby/models/accounting/payment_delete.rb +25 -11
  98. data/lib/xero-ruby/models/accounting/payment_service.rb +25 -11
  99. data/lib/xero-ruby/models/accounting/payment_services.rb +25 -11
  100. data/lib/xero-ruby/models/accounting/payment_term.rb +25 -11
  101. data/lib/xero-ruby/models/accounting/payment_term_type.rb +1 -2
  102. data/lib/xero-ruby/models/accounting/payments.rb +25 -11
  103. data/lib/xero-ruby/models/accounting/phone.rb +25 -11
  104. data/lib/xero-ruby/models/accounting/prepayment.rb +38 -12
  105. data/lib/xero-ruby/models/accounting/prepayments.rb +25 -11
  106. data/lib/xero-ruby/models/accounting/purchase.rb +25 -11
  107. data/lib/xero-ruby/models/accounting/purchase_order.rb +25 -11
  108. data/lib/xero-ruby/models/accounting/purchase_orders.rb +25 -11
  109. data/lib/xero-ruby/models/accounting/quote.rb +25 -11
  110. data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +1 -2
  111. data/lib/xero-ruby/models/accounting/quote_status_codes.rb +1 -2
  112. data/lib/xero-ruby/models/accounting/quotes.rb +25 -11
  113. data/lib/xero-ruby/models/accounting/receipt.rb +25 -11
  114. data/lib/xero-ruby/models/accounting/receipts.rb +25 -11
  115. data/lib/xero-ruby/models/accounting/repeating_invoice.rb +25 -11
  116. data/lib/xero-ruby/models/accounting/repeating_invoices.rb +25 -11
  117. data/lib/xero-ruby/models/accounting/report.rb +26 -22
  118. data/lib/xero-ruby/models/accounting/report_attribute.rb +25 -11
  119. data/lib/xero-ruby/models/accounting/report_cell.rb +25 -11
  120. data/lib/xero-ruby/models/accounting/report_fields.rb +25 -11
  121. data/lib/xero-ruby/models/accounting/report_row.rb +25 -11
  122. data/lib/xero-ruby/models/accounting/report_rows.rb +25 -11
  123. data/lib/xero-ruby/models/accounting/report_with_row.rb +26 -12
  124. data/lib/xero-ruby/models/accounting/report_with_rows.rb +25 -11
  125. data/lib/xero-ruby/models/accounting/reports.rb +25 -11
  126. data/lib/xero-ruby/models/accounting/request_empty.rb +25 -11
  127. data/lib/xero-ruby/models/accounting/row_type.rb +1 -2
  128. data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +25 -11
  129. data/lib/xero-ruby/models/accounting/schedule.rb +25 -11
  130. data/lib/xero-ruby/models/accounting/setup.rb +25 -11
  131. data/lib/xero-ruby/models/accounting/tax_component.rb +25 -11
  132. data/lib/xero-ruby/models/accounting/tax_rate.rb +25 -11
  133. data/lib/xero-ruby/models/accounting/tax_rates.rb +25 -11
  134. data/lib/xero-ruby/models/accounting/tax_type.rb +1 -2
  135. data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +25 -11
  136. data/lib/xero-ruby/models/accounting/time_zone.rb +1 -2
  137. data/lib/xero-ruby/models/accounting/tracking_categories.rb +25 -11
  138. data/lib/xero-ruby/models/accounting/tracking_category.rb +25 -11
  139. data/lib/xero-ruby/models/accounting/tracking_option.rb +25 -11
  140. data/lib/xero-ruby/models/accounting/tracking_options.rb +25 -11
  141. data/lib/xero-ruby/models/accounting/user.rb +25 -11
  142. data/lib/xero-ruby/models/accounting/users.rb +25 -11
  143. data/lib/xero-ruby/models/accounting/validation_error.rb +25 -11
  144. data/lib/xero-ruby/models/assets/asset.rb +25 -11
  145. data/lib/xero-ruby/models/assets/asset_status.rb +1 -2
  146. data/lib/xero-ruby/models/assets/asset_status_query_param.rb +1 -2
  147. data/lib/xero-ruby/models/assets/asset_type.rb +25 -11
  148. data/lib/xero-ruby/models/assets/assets.rb +25 -11
  149. data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +25 -11
  150. data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +25 -11
  151. data/lib/xero-ruby/models/assets/error.rb +25 -11
  152. data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +26 -12
  153. data/lib/xero-ruby/models/assets/pagination.rb +25 -11
  154. data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +26 -12
  155. data/lib/xero-ruby/models/assets/setting.rb +25 -11
  156. data/lib/xero-ruby/models/files/association.rb +25 -11
  157. data/lib/xero-ruby/models/files/file_object.rb +25 -11
  158. data/lib/xero-ruby/models/files/files.rb +25 -11
  159. data/lib/xero-ruby/models/files/folder.rb +25 -11
  160. data/lib/xero-ruby/models/files/folders.rb +25 -11
  161. data/lib/xero-ruby/models/files/object_group.rb +1 -2
  162. data/lib/xero-ruby/models/files/object_type.rb +1 -2
  163. data/lib/xero-ruby/models/files/{inline_object.rb → upload_object.rb} +43 -14
  164. data/lib/xero-ruby/models/files/user.rb +25 -11
  165. data/lib/xero-ruby/models/payroll_au/account.rb +25 -11
  166. data/lib/xero-ruby/models/payroll_au/account_type.rb +1 -2
  167. data/lib/xero-ruby/models/payroll_au/allowance_type.rb +1 -2
  168. data/lib/xero-ruby/models/payroll_au/api_exception.rb +25 -11
  169. data/lib/xero-ruby/models/payroll_au/bank_account.rb +25 -11
  170. data/lib/xero-ruby/models/payroll_au/calendar_type.rb +1 -2
  171. data/lib/xero-ruby/models/payroll_au/deduction_line.rb +25 -16
  172. data/lib/xero-ruby/models/payroll_au/deduction_type.rb +25 -11
  173. data/lib/xero-ruby/models/payroll_au/deduction_type_calculation_type.rb +1 -2
  174. data/lib/xero-ruby/models/payroll_au/earnings_line.rb +25 -11
  175. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +25 -11
  176. data/lib/xero-ruby/models/payroll_au/earnings_rate_calculation_type.rb +1 -2
  177. data/lib/xero-ruby/models/payroll_au/earnings_type.rb +2 -2
  178. data/lib/xero-ruby/models/payroll_au/employee.rb +25 -11
  179. data/lib/xero-ruby/models/payroll_au/employee_status.rb +1 -2
  180. data/lib/xero-ruby/models/payroll_au/employees.rb +25 -11
  181. data/lib/xero-ruby/models/payroll_au/employment_basis.rb +1 -2
  182. data/lib/xero-ruby/models/payroll_au/employment_termination_payment_type.rb +1 -2
  183. data/lib/xero-ruby/models/payroll_au/entitlement_final_pay_payout_type.rb +1 -2
  184. data/lib/xero-ruby/models/payroll_au/home_address.rb +25 -11
  185. data/lib/xero-ruby/models/payroll_au/leave_accrual_line.rb +25 -11
  186. data/lib/xero-ruby/models/payroll_au/leave_application.rb +25 -11
  187. data/lib/xero-ruby/models/payroll_au/leave_applications.rb +25 -11
  188. data/lib/xero-ruby/models/payroll_au/leave_balance.rb +25 -11
  189. data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +25 -11
  190. data/lib/xero-ruby/models/payroll_au/leave_line.rb +25 -11
  191. data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +1 -2
  192. data/lib/xero-ruby/models/payroll_au/leave_lines.rb +25 -11
  193. data/lib/xero-ruby/models/payroll_au/leave_period.rb +25 -11
  194. data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +1 -2
  195. data/lib/xero-ruby/models/payroll_au/leave_type.rb +25 -11
  196. data/lib/xero-ruby/models/payroll_au/leave_type_contribution_type.rb +1 -2
  197. data/lib/xero-ruby/models/payroll_au/manual_tax_type.rb +1 -2
  198. data/lib/xero-ruby/models/payroll_au/opening_balances.rb +25 -11
  199. data/lib/xero-ruby/models/payroll_au/pay_item.rb +25 -11
  200. data/lib/xero-ruby/models/payroll_au/pay_items.rb +25 -11
  201. data/lib/xero-ruby/models/payroll_au/pay_run.rb +25 -11
  202. data/lib/xero-ruby/models/payroll_au/pay_run_status.rb +1 -2
  203. data/lib/xero-ruby/models/payroll_au/pay_runs.rb +25 -11
  204. data/lib/xero-ruby/models/payroll_au/pay_template.rb +25 -11
  205. data/lib/xero-ruby/models/payroll_au/payment_frequency_type.rb +1 -2
  206. data/lib/xero-ruby/models/payroll_au/payroll_calendar.rb +25 -11
  207. data/lib/xero-ruby/models/payroll_au/payroll_calendars.rb +25 -11
  208. data/lib/xero-ruby/models/payroll_au/payslip.rb +25 -11
  209. data/lib/xero-ruby/models/payroll_au/payslip_lines.rb +25 -11
  210. data/lib/xero-ruby/models/payroll_au/payslip_object.rb +25 -11
  211. data/lib/xero-ruby/models/payroll_au/payslip_summary.rb +25 -11
  212. data/lib/xero-ruby/models/payroll_au/payslips.rb +25 -11
  213. data/lib/xero-ruby/models/payroll_au/rate_type.rb +1 -2
  214. data/lib/xero-ruby/models/payroll_au/reimbursement_line.rb +25 -11
  215. data/lib/xero-ruby/models/payroll_au/reimbursement_lines.rb +25 -11
  216. data/lib/xero-ruby/models/payroll_au/reimbursement_type.rb +25 -11
  217. data/lib/xero-ruby/models/payroll_au/residency_status.rb +1 -2
  218. data/lib/xero-ruby/models/payroll_au/settings.rb +25 -11
  219. data/lib/xero-ruby/models/payroll_au/settings_object.rb +25 -11
  220. data/lib/xero-ruby/models/payroll_au/settings_tracking_categories.rb +25 -11
  221. data/lib/xero-ruby/models/payroll_au/settings_tracking_categories_employee_groups.rb +25 -11
  222. data/lib/xero-ruby/models/payroll_au/settings_tracking_categories_timesheet_categories.rb +25 -11
  223. data/lib/xero-ruby/models/payroll_au/state.rb +1 -2
  224. data/lib/xero-ruby/models/payroll_au/super_fund.rb +25 -11
  225. data/lib/xero-ruby/models/payroll_au/super_fund_product.rb +25 -11
  226. data/lib/xero-ruby/models/payroll_au/super_fund_products.rb +25 -11
  227. data/lib/xero-ruby/models/payroll_au/super_fund_type.rb +1 -2
  228. data/lib/xero-ruby/models/payroll_au/super_funds.rb +25 -11
  229. data/lib/xero-ruby/models/payroll_au/super_line.rb +26 -12
  230. data/lib/xero-ruby/models/payroll_au/super_membership.rb +26 -12
  231. data/lib/xero-ruby/models/payroll_au/superannuation_calculation_type.rb +1 -2
  232. data/lib/xero-ruby/models/payroll_au/superannuation_contribution_type.rb +1 -2
  233. data/lib/xero-ruby/models/payroll_au/superannuation_line.rb +25 -11
  234. data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +25 -11
  235. data/lib/xero-ruby/models/payroll_au/tax_line.rb +25 -11
  236. data/lib/xero-ruby/models/payroll_au/tfn_exemption_type.rb +1 -2
  237. data/lib/xero-ruby/models/payroll_au/timesheet.rb +25 -11
  238. data/lib/xero-ruby/models/payroll_au/timesheet_line.rb +25 -11
  239. data/lib/xero-ruby/models/payroll_au/timesheet_object.rb +25 -11
  240. data/lib/xero-ruby/models/payroll_au/timesheet_status.rb +1 -2
  241. data/lib/xero-ruby/models/payroll_au/timesheets.rb +25 -11
  242. data/lib/xero-ruby/models/payroll_au/validation_error.rb +25 -11
  243. data/lib/xero-ruby/models/payroll_nz/account.rb +24 -10
  244. data/lib/xero-ruby/models/payroll_nz/accounts.rb +24 -10
  245. data/lib/xero-ruby/models/payroll_nz/address.rb +24 -10
  246. data/lib/xero-ruby/models/payroll_nz/bank_account.rb +24 -10
  247. data/lib/xero-ruby/models/payroll_nz/benefit.rb +24 -10
  248. data/lib/xero-ruby/models/payroll_nz/calendar_type.rb +0 -1
  249. data/lib/xero-ruby/models/payroll_nz/deduction.rb +24 -10
  250. data/lib/xero-ruby/models/payroll_nz/deduction_line.rb +24 -10
  251. data/lib/xero-ruby/models/payroll_nz/deduction_object.rb +24 -10
  252. data/lib/xero-ruby/models/payroll_nz/deductions.rb +24 -10
  253. data/lib/xero-ruby/models/payroll_nz/earnings_line.rb +25 -11
  254. data/lib/xero-ruby/models/payroll_nz/earnings_order.rb +24 -10
  255. data/lib/xero-ruby/models/payroll_nz/earnings_order_object.rb +24 -10
  256. data/lib/xero-ruby/models/payroll_nz/earnings_orders.rb +24 -10
  257. data/lib/xero-ruby/models/payroll_nz/earnings_rate.rb +24 -10
  258. data/lib/xero-ruby/models/payroll_nz/earnings_rate_object.rb +24 -10
  259. data/lib/xero-ruby/models/payroll_nz/earnings_rates.rb +24 -10
  260. data/lib/xero-ruby/models/payroll_nz/earnings_template.rb +24 -10
  261. data/lib/xero-ruby/models/payroll_nz/earnings_template_object.rb +24 -10
  262. data/lib/xero-ruby/models/payroll_nz/employee.rb +24 -10
  263. data/lib/xero-ruby/models/payroll_nz/employee_earnings_templates.rb +24 -10
  264. data/lib/xero-ruby/models/payroll_nz/employee_leave.rb +24 -10
  265. data/lib/xero-ruby/models/payroll_nz/employee_leave_balance.rb +24 -10
  266. data/lib/xero-ruby/models/payroll_nz/employee_leave_balances.rb +24 -10
  267. data/lib/xero-ruby/models/payroll_nz/employee_leave_object.rb +24 -10
  268. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +24 -10
  269. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup_object.rb +24 -10
  270. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +24 -10
  271. data/lib/xero-ruby/models/payroll_nz/employee_leave_type_object.rb +24 -10
  272. data/lib/xero-ruby/models/payroll_nz/employee_leave_types.rb +24 -10
  273. data/lib/xero-ruby/models/payroll_nz/employee_leaves.rb +24 -10
  274. data/lib/xero-ruby/models/payroll_nz/employee_object.rb +24 -10
  275. data/lib/xero-ruby/models/payroll_nz/employee_opening_balance.rb +24 -10
  276. data/lib/xero-ruby/models/payroll_nz/employee_opening_balances_object.rb +24 -10
  277. data/lib/xero-ruby/models/payroll_nz/employee_pay_template.rb +24 -10
  278. data/lib/xero-ruby/models/payroll_nz/employee_pay_template_object.rb +24 -10
  279. data/lib/xero-ruby/models/payroll_nz/employee_pay_templates.rb +24 -10
  280. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance.rb +24 -10
  281. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance_object.rb +24 -10
  282. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_summary.rb +24 -10
  283. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leaves_summaries.rb +24 -10
  284. data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leave.rb +25 -11
  285. data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leave_object.rb +24 -10
  286. data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leaves.rb +24 -10
  287. data/lib/xero-ruby/models/payroll_nz/employee_tax.rb +24 -10
  288. data/lib/xero-ruby/models/payroll_nz/employee_tax_object.rb +24 -10
  289. data/lib/xero-ruby/models/payroll_nz/employees.rb +24 -10
  290. data/lib/xero-ruby/models/payroll_nz/employment.rb +24 -10
  291. data/lib/xero-ruby/models/payroll_nz/employment_object.rb +24 -10
  292. data/lib/xero-ruby/models/payroll_nz/gross_earnings_history.rb +24 -10
  293. data/lib/xero-ruby/models/payroll_nz/invalid_field.rb +24 -10
  294. data/lib/xero-ruby/models/payroll_nz/leave_accrual_line.rb +24 -10
  295. data/lib/xero-ruby/models/payroll_nz/leave_earnings_line.rb +25 -11
  296. data/lib/xero-ruby/models/payroll_nz/leave_period.rb +24 -10
  297. data/lib/xero-ruby/models/payroll_nz/leave_periods.rb +24 -10
  298. data/lib/xero-ruby/models/payroll_nz/leave_type.rb +24 -10
  299. data/lib/xero-ruby/models/payroll_nz/leave_type_object.rb +24 -10
  300. data/lib/xero-ruby/models/payroll_nz/leave_types.rb +24 -10
  301. data/lib/xero-ruby/models/payroll_nz/pagination.rb +24 -10
  302. data/lib/xero-ruby/models/payroll_nz/pay_run.rb +24 -10
  303. data/lib/xero-ruby/models/payroll_nz/pay_run_calendar.rb +24 -10
  304. data/lib/xero-ruby/models/payroll_nz/pay_run_calendar_object.rb +24 -10
  305. data/lib/xero-ruby/models/payroll_nz/pay_run_calendars.rb +24 -10
  306. data/lib/xero-ruby/models/payroll_nz/pay_run_object.rb +24 -10
  307. data/lib/xero-ruby/models/payroll_nz/pay_runs.rb +24 -10
  308. data/lib/xero-ruby/models/payroll_nz/pay_slip.rb +24 -10
  309. data/lib/xero-ruby/models/payroll_nz/pay_slip_object.rb +24 -10
  310. data/lib/xero-ruby/models/payroll_nz/pay_slips.rb +24 -10
  311. data/lib/xero-ruby/models/payroll_nz/payment_line.rb +24 -10
  312. data/lib/xero-ruby/models/payroll_nz/payment_method.rb +24 -10
  313. data/lib/xero-ruby/models/payroll_nz/payment_method_object.rb +24 -10
  314. data/lib/xero-ruby/models/payroll_nz/problem.rb +24 -10
  315. data/lib/xero-ruby/models/payroll_nz/reimbursement.rb +24 -10
  316. data/lib/xero-ruby/models/payroll_nz/reimbursement_line.rb +24 -10
  317. data/lib/xero-ruby/models/payroll_nz/reimbursement_object.rb +24 -10
  318. data/lib/xero-ruby/models/payroll_nz/reimbursements.rb +24 -10
  319. data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +28 -13
  320. data/lib/xero-ruby/models/payroll_nz/salary_and_wage_object.rb +24 -10
  321. data/lib/xero-ruby/models/payroll_nz/salary_and_wages.rb +24 -10
  322. data/lib/xero-ruby/models/payroll_nz/settings.rb +24 -10
  323. data/lib/xero-ruby/models/payroll_nz/statutory_deduction.rb +24 -10
  324. data/lib/xero-ruby/models/payroll_nz/statutory_deduction_category.rb +0 -1
  325. data/lib/xero-ruby/models/payroll_nz/statutory_deduction_line.rb +24 -10
  326. data/lib/xero-ruby/models/payroll_nz/statutory_deduction_object.rb +24 -10
  327. data/lib/xero-ruby/models/payroll_nz/statutory_deductions.rb +24 -10
  328. data/lib/xero-ruby/models/payroll_nz/superannuation_line.rb +25 -11
  329. data/lib/xero-ruby/models/payroll_nz/superannuation_object.rb +24 -10
  330. data/lib/xero-ruby/models/payroll_nz/superannuations.rb +24 -10
  331. data/lib/xero-ruby/models/payroll_nz/tax_code.rb +0 -1
  332. data/lib/xero-ruby/models/payroll_nz/tax_line.rb +24 -10
  333. data/lib/xero-ruby/models/payroll_nz/tax_settings.rb +24 -10
  334. data/lib/xero-ruby/models/payroll_nz/timesheet.rb +28 -13
  335. data/lib/xero-ruby/models/payroll_nz/timesheet_earnings_line.rb +25 -11
  336. data/lib/xero-ruby/models/payroll_nz/timesheet_line.rb +24 -10
  337. data/lib/xero-ruby/models/payroll_nz/timesheet_line_object.rb +24 -10
  338. data/lib/xero-ruby/models/payroll_nz/timesheet_object.rb +24 -10
  339. data/lib/xero-ruby/models/payroll_nz/timesheets.rb +24 -10
  340. data/lib/xero-ruby/models/payroll_nz/tracking_categories.rb +24 -10
  341. data/lib/xero-ruby/models/payroll_nz/tracking_category.rb +24 -10
  342. data/lib/xero-ruby/models/payroll_uk/account.rb +24 -10
  343. data/lib/xero-ruby/models/payroll_uk/accounts.rb +24 -10
  344. data/lib/xero-ruby/models/payroll_uk/address.rb +24 -10
  345. data/lib/xero-ruby/models/payroll_uk/bank_account.rb +24 -10
  346. data/lib/xero-ruby/models/payroll_uk/benefit.rb +24 -10
  347. data/lib/xero-ruby/models/payroll_uk/benefit_line.rb +24 -10
  348. data/lib/xero-ruby/models/payroll_uk/benefit_object.rb +24 -10
  349. data/lib/xero-ruby/models/payroll_uk/benefits.rb +24 -10
  350. data/lib/xero-ruby/models/payroll_uk/court_order_line.rb +24 -10
  351. data/lib/xero-ruby/models/payroll_uk/deduction.rb +24 -10
  352. data/lib/xero-ruby/models/payroll_uk/deduction_line.rb +24 -10
  353. data/lib/xero-ruby/models/payroll_uk/deduction_object.rb +24 -10
  354. data/lib/xero-ruby/models/payroll_uk/deductions.rb +24 -10
  355. data/lib/xero-ruby/models/payroll_uk/earnings_line.rb +24 -10
  356. data/lib/xero-ruby/models/payroll_uk/earnings_order.rb +24 -10
  357. data/lib/xero-ruby/models/payroll_uk/earnings_order_object.rb +24 -10
  358. data/lib/xero-ruby/models/payroll_uk/earnings_orders.rb +24 -10
  359. data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +34 -12
  360. data/lib/xero-ruby/models/payroll_uk/earnings_rate_object.rb +24 -10
  361. data/lib/xero-ruby/models/payroll_uk/earnings_rates.rb +24 -10
  362. data/lib/xero-ruby/models/payroll_uk/earnings_template.rb +24 -10
  363. data/lib/xero-ruby/models/payroll_uk/earnings_template_object.rb +24 -10
  364. data/lib/xero-ruby/models/payroll_uk/employee.rb +24 -10
  365. data/lib/xero-ruby/models/payroll_uk/employee_leave.rb +24 -10
  366. data/lib/xero-ruby/models/payroll_uk/employee_leave_balance.rb +24 -10
  367. data/lib/xero-ruby/models/payroll_uk/employee_leave_balances.rb +24 -10
  368. data/lib/xero-ruby/models/payroll_uk/employee_leave_object.rb +24 -10
  369. data/lib/xero-ruby/models/payroll_uk/employee_leave_type.rb +24 -10
  370. data/lib/xero-ruby/models/payroll_uk/employee_leave_type_object.rb +24 -10
  371. data/lib/xero-ruby/models/payroll_uk/employee_leave_types.rb +24 -10
  372. data/lib/xero-ruby/models/payroll_uk/employee_leaves.rb +24 -10
  373. data/lib/xero-ruby/models/payroll_uk/employee_object.rb +24 -10
  374. data/lib/xero-ruby/models/payroll_uk/employee_opening_balances.rb +24 -10
  375. data/lib/xero-ruby/models/payroll_uk/employee_opening_balances_object.rb +24 -10
  376. data/lib/xero-ruby/models/payroll_uk/employee_pay_template.rb +24 -10
  377. data/lib/xero-ruby/models/payroll_uk/employee_pay_template_object.rb +24 -10
  378. data/lib/xero-ruby/models/payroll_uk/employee_pay_templates.rb +24 -10
  379. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance.rb +24 -10
  380. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance_object.rb +24 -10
  381. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_summary.rb +24 -10
  382. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leaves_summaries.rb +24 -10
  383. data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leave.rb +25 -11
  384. data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leave_object.rb +24 -10
  385. data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leaves.rb +24 -10
  386. data/lib/xero-ruby/models/payroll_uk/employee_tax.rb +24 -10
  387. data/lib/xero-ruby/models/payroll_uk/employee_tax_object.rb +24 -10
  388. data/lib/xero-ruby/models/payroll_uk/employees.rb +24 -10
  389. data/lib/xero-ruby/models/payroll_uk/employment.rb +24 -10
  390. data/lib/xero-ruby/models/payroll_uk/employment_object.rb +24 -10
  391. data/lib/xero-ruby/models/payroll_uk/invalid_field.rb +24 -10
  392. data/lib/xero-ruby/models/payroll_uk/leave_accrual_line.rb +24 -10
  393. data/lib/xero-ruby/models/payroll_uk/leave_earnings_line.rb +24 -10
  394. data/lib/xero-ruby/models/payroll_uk/leave_period.rb +24 -10
  395. data/lib/xero-ruby/models/payroll_uk/leave_periods.rb +24 -10
  396. data/lib/xero-ruby/models/payroll_uk/leave_type.rb +24 -10
  397. data/lib/xero-ruby/models/payroll_uk/leave_type_object.rb +24 -10
  398. data/lib/xero-ruby/models/payroll_uk/leave_types.rb +24 -10
  399. data/lib/xero-ruby/models/payroll_uk/pagination.rb +24 -10
  400. data/lib/xero-ruby/models/payroll_uk/pay_run.rb +24 -10
  401. data/lib/xero-ruby/models/payroll_uk/pay_run_calendar.rb +24 -10
  402. data/lib/xero-ruby/models/payroll_uk/pay_run_calendar_object.rb +24 -10
  403. data/lib/xero-ruby/models/payroll_uk/pay_run_calendars.rb +24 -10
  404. data/lib/xero-ruby/models/payroll_uk/pay_run_object.rb +24 -10
  405. data/lib/xero-ruby/models/payroll_uk/pay_runs.rb +24 -10
  406. data/lib/xero-ruby/models/payroll_uk/payment_line.rb +24 -10
  407. data/lib/xero-ruby/models/payroll_uk/payment_method.rb +24 -10
  408. data/lib/xero-ruby/models/payroll_uk/payment_method_object.rb +24 -10
  409. data/lib/xero-ruby/models/payroll_uk/payslip.rb +24 -10
  410. data/lib/xero-ruby/models/payroll_uk/payslip_object.rb +24 -10
  411. data/lib/xero-ruby/models/payroll_uk/payslips.rb +24 -10
  412. data/lib/xero-ruby/models/payroll_uk/problem.rb +24 -10
  413. data/lib/xero-ruby/models/payroll_uk/reimbursement.rb +24 -10
  414. data/lib/xero-ruby/models/payroll_uk/reimbursement_line.rb +24 -10
  415. data/lib/xero-ruby/models/payroll_uk/reimbursement_object.rb +24 -10
  416. data/lib/xero-ruby/models/payroll_uk/reimbursements.rb +24 -10
  417. data/lib/xero-ruby/models/payroll_uk/salary_and_wage.rb +27 -12
  418. data/lib/xero-ruby/models/payroll_uk/salary_and_wage_object.rb +24 -10
  419. data/lib/xero-ruby/models/payroll_uk/salary_and_wages.rb +24 -10
  420. data/lib/xero-ruby/models/payroll_uk/settings.rb +24 -10
  421. data/lib/xero-ruby/models/payroll_uk/statutory_deduction.rb +24 -10
  422. data/lib/xero-ruby/models/payroll_uk/statutory_deduction_category.rb +0 -1
  423. data/lib/xero-ruby/models/payroll_uk/tax_line.rb +24 -10
  424. data/lib/xero-ruby/models/payroll_uk/timesheet.rb +25 -11
  425. data/lib/xero-ruby/models/payroll_uk/timesheet_earnings_line.rb +24 -10
  426. data/lib/xero-ruby/models/payroll_uk/timesheet_line.rb +24 -10
  427. data/lib/xero-ruby/models/payroll_uk/timesheet_line_object.rb +24 -10
  428. data/lib/xero-ruby/models/payroll_uk/timesheet_object.rb +24 -10
  429. data/lib/xero-ruby/models/payroll_uk/timesheets.rb +24 -10
  430. data/lib/xero-ruby/models/payroll_uk/tracking_categories.rb +24 -10
  431. data/lib/xero-ruby/models/payroll_uk/tracking_category.rb +24 -10
  432. data/lib/xero-ruby/models/projects/amount.rb +24 -10
  433. data/lib/xero-ruby/models/projects/charge_type.rb +0 -1
  434. data/lib/xero-ruby/models/projects/currency_code.rb +0 -1
  435. data/lib/xero-ruby/models/projects/error.rb +24 -10
  436. data/lib/xero-ruby/models/projects/pagination.rb +24 -10
  437. data/lib/xero-ruby/models/projects/project.rb +24 -10
  438. data/lib/xero-ruby/models/projects/project_create_or_update.rb +24 -10
  439. data/lib/xero-ruby/models/projects/project_patch.rb +24 -10
  440. data/lib/xero-ruby/models/projects/project_status.rb +0 -1
  441. data/lib/xero-ruby/models/projects/project_user.rb +24 -10
  442. data/lib/xero-ruby/models/projects/project_users.rb +24 -10
  443. data/lib/xero-ruby/models/projects/projects.rb +24 -10
  444. data/lib/xero-ruby/models/projects/task.rb +24 -10
  445. data/lib/xero-ruby/models/projects/task_create_or_update.rb +24 -10
  446. data/lib/xero-ruby/models/projects/tasks.rb +24 -10
  447. data/lib/xero-ruby/models/projects/time_entries.rb +24 -10
  448. data/lib/xero-ruby/models/projects/time_entry.rb +27 -12
  449. data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +24 -10
  450. data/lib/xero-ruby/string_serialization.rb +52 -0
  451. data/lib/xero-ruby/version.rb +3 -3
  452. data/lib/xero-ruby/where.rb +65 -0
  453. data/spec/api_client_spec.rb +292 -14
  454. data/spec/api_error_spec.rb +45 -0
  455. data/spec/configuration_spec.rb +26 -16
  456. data/spec/files/models/inline_object_spec.rb +3 -3
  457. data/spec/helper_methods_spec.rb +110 -0
  458. data/spec/where_spec.rb +82 -0
  459. metadata +43 -12
  460. data/spec/files/models/file_response204_spec.rb +0 -41
@@ -1,9 +1,8 @@
1
1
  =begin
2
2
  #Xero Assets API
3
3
 
4
- #This is the Xero Assets API
4
+ #The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
5
5
 
6
- The version of the OpenAPI document: 2.6.0
7
6
  Contact: api@xero.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 4.3.1
@@ -34,7 +33,8 @@ module XeroRuby
34
33
  # @param asset [Asset] Fixed asset you are creating
35
34
  # @param [Hash] opts the optional parameters
36
35
  # @return [Array<(Asset, Integer, Hash)>] Asset data, response status code and response headers
37
- def create_asset_with_http_info(xero_tenant_id, asset, opts = {})
36
+ def create_asset_with_http_info(xero_tenant_id, asset, options = {})
37
+ opts = options.dup
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: AssetApi.create_asset ...'
40
40
  end
@@ -112,7 +112,8 @@ module XeroRuby
112
112
  # @param [Hash] opts the optional parameters
113
113
  # @option opts [AssetType] :asset_type Asset type to add
114
114
  # @return [Array<(AssetType, Integer, Hash)>] AssetType data, response status code and response headers
115
- def create_asset_type_with_http_info(xero_tenant_id, opts = {})
115
+ def create_asset_type_with_http_info(xero_tenant_id, options = {})
116
+ opts = options.dup
116
117
  if @api_client.config.debugging
117
118
  @api_client.config.logger.debug 'Calling API: AssetApi.create_asset_type ...'
118
119
  end
@@ -169,7 +170,7 @@ module XeroRuby
169
170
  return data, status_code, headers
170
171
  end
171
172
 
172
- # retrieves fixed asset by id
173
+ # Retrieves fixed asset by id
173
174
  # By passing in the appropriate asset id, you can search for a specific fixed asset in the system
174
175
  # @param xero_tenant_id [String] Xero identifier for Tenant
175
176
  # @param id [String] fixed asset id for single object
@@ -180,13 +181,14 @@ module XeroRuby
180
181
  data
181
182
  end
182
183
 
183
- # retrieves fixed asset by id
184
+ # Retrieves fixed asset by id
184
185
  # By passing in the appropriate asset id, you can search for a specific fixed asset in the system
185
186
  # @param xero_tenant_id [String] Xero identifier for Tenant
186
187
  # @param id [String] fixed asset id for single object
187
188
  # @param [Hash] opts the optional parameters
188
189
  # @return [Array<(Asset, Integer, Hash)>] Asset data, response status code and response headers
189
- def get_asset_by_id_with_http_info(xero_tenant_id, id, opts = {})
190
+ def get_asset_by_id_with_http_info(xero_tenant_id, id, options = {})
191
+ opts = options.dup
190
192
  if @api_client.config.debugging
191
193
  @api_client.config.logger.debug 'Calling API: AssetApi.get_asset_by_id ...'
192
194
  end
@@ -260,7 +262,8 @@ module XeroRuby
260
262
  # @param xero_tenant_id [String] Xero identifier for Tenant
261
263
  # @param [Hash] opts the optional parameters
262
264
  # @return [Array<(Setting, Integer, Hash)>] Setting data, response status code and response headers
263
- def get_asset_settings_with_http_info(xero_tenant_id, opts = {})
265
+ def get_asset_settings_with_http_info(xero_tenant_id, options = {})
266
+ opts = options.dup
264
267
  if @api_client.config.debugging
265
268
  @api_client.config.logger.debug 'Calling API: AssetApi.get_asset_settings ...'
266
269
  end
@@ -330,7 +333,8 @@ module XeroRuby
330
333
  # @param xero_tenant_id [String] Xero identifier for Tenant
331
334
  # @param [Hash] opts the optional parameters
332
335
  # @return [Array<(Array<AssetType>, Integer, Hash)>] Array<AssetType> data, response status code and response headers
333
- def get_asset_types_with_http_info(xero_tenant_id, opts = {})
336
+ def get_asset_types_with_http_info(xero_tenant_id, options = {})
337
+ opts = options.dup
334
338
  if @api_client.config.debugging
335
339
  @api_client.config.logger.debug 'Calling API: AssetApi.get_asset_types ...'
336
340
  end
@@ -412,7 +416,8 @@ module XeroRuby
412
416
  # @option opts [String] :sort_direction ASC or DESC
413
417
  # @option opts [String] :filter_by A string that can be used to filter the list to only return assets containing the text. Checks it against the AssetName, AssetNumber, Description and AssetTypeName fields.
414
418
  # @return [Array<(Assets, Integer, Hash)>] Assets data, response status code and response headers
415
- def get_assets_with_http_info(xero_tenant_id, status, opts = {})
419
+ def get_assets_with_http_info(xero_tenant_id, status, options = {})
420
+ opts = options.dup
416
421
  if @api_client.config.debugging
417
422
  @api_client.config.logger.debug 'Calling API: AssetApi.get_assets ...'
418
423
  end
@@ -432,10 +437,6 @@ module XeroRuby
432
437
  if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
433
438
  fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
434
439
  end
435
- allowable_values = ["AssetName", "AssetNumber", "Description", "AssetTypeName"]
436
- if @api_client.config.client_side_validation && opts[:'filter_by'] && !allowable_values.include?(opts[:'filter_by'])
437
- fail ArgumentError, "invalid value for \"filter_by\", must be one of #{allowable_values}"
438
- end
439
440
  # resource path
440
441
  local_var_path = '/Assets'
441
442
 
@@ -1,9 +1,8 @@
1
1
  =begin
2
2
  #Xero Files API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #These endpoints are specific to Xero Files API
5
5
 
6
- The version of the OpenAPI document: 2.6.0
7
6
  Contact: api@xero.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 4.3.1
@@ -17,7 +16,7 @@ module XeroRuby
17
16
  def initialize(api_client = ApiClient.new)
18
17
  @api_client = api_client
19
18
  end
20
- # create a new association
19
+ # Creates a new file association
21
20
  # By passing in the appropriate options, you can create a new folder
22
21
  # @param xero_tenant_id [String] Xero identifier for Tenant
23
22
  # @param file_id [String] File id for single object
@@ -29,14 +28,15 @@ module XeroRuby
29
28
  data
30
29
  end
31
30
 
32
- # create a new association
31
+ # Creates a new file association
33
32
  # By passing in the appropriate options, you can create a new folder
34
33
  # @param xero_tenant_id [String] Xero identifier for Tenant
35
34
  # @param file_id [String] File id for single object
36
35
  # @param [Hash] opts the optional parameters
37
36
  # @option opts [Association] :association
38
37
  # @return [Array<(Association, Integer, Hash)>] Association data, response status code and response headers
39
- def create_file_association_with_http_info(xero_tenant_id, file_id, opts = {})
38
+ def create_file_association_with_http_info(xero_tenant_id, file_id, options = {})
39
+ opts = options.dup
40
40
  if @api_client.config.debugging
41
41
  @api_client.config.logger.debug 'Calling API: FilesApi.create_file_association ...'
42
42
  end
@@ -97,7 +97,7 @@ module XeroRuby
97
97
  return data, status_code, headers
98
98
  end
99
99
 
100
- # create a new folder
100
+ # Creates a new folder
101
101
  # By passing in the appropriate properties, you can create a new folder
102
102
  # @param xero_tenant_id [String] Xero identifier for Tenant
103
103
  # @param [Hash] opts the optional parameters
@@ -108,13 +108,14 @@ module XeroRuby
108
108
  data
109
109
  end
110
110
 
111
- # create a new folder
111
+ # Creates a new folder
112
112
  # By passing in the appropriate properties, you can create a new folder
113
113
  # @param xero_tenant_id [String] Xero identifier for Tenant
114
114
  # @param [Hash] opts the optional parameters
115
115
  # @option opts [Folder] :folder
116
116
  # @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
117
- def create_folder_with_http_info(xero_tenant_id, opts = {})
117
+ def create_folder_with_http_info(xero_tenant_id, options = {})
118
+ opts = options.dup
118
119
  if @api_client.config.debugging
119
120
  @api_client.config.logger.debug 'Calling API: FilesApi.create_folder ...'
120
121
  end
@@ -171,24 +172,25 @@ module XeroRuby
171
172
  return data, status_code, headers
172
173
  end
173
174
 
174
- # delete a file
175
+ # Deletes a specific file
175
176
  # Delete a specific file
176
177
  # @param xero_tenant_id [String] Xero identifier for Tenant
177
178
  # @param file_id [String] File id for single object
178
179
  # @param [Hash] opts the optional parameters
179
- # @return [FileResponse204]
180
+ # @return [nil]
180
181
  def delete_file(xero_tenant_id, file_id, opts = {})
181
- data, _status_code, _headers = delete_file_with_http_info(xero_tenant_id, file_id, opts)
182
- data
182
+ delete_file_with_http_info(xero_tenant_id, file_id, opts)
183
+ nil
183
184
  end
184
185
 
185
- # delete a file
186
+ # Deletes a specific file
186
187
  # Delete a specific file
187
188
  # @param xero_tenant_id [String] Xero identifier for Tenant
188
189
  # @param file_id [String] File id for single object
189
190
  # @param [Hash] opts the optional parameters
190
- # @return [Array<(FileResponse204, Integer, Hash)>] FileResponse204 data, response status code and response headers
191
- def delete_file_with_http_info(xero_tenant_id, file_id, opts = {})
191
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
192
+ def delete_file_with_http_info(xero_tenant_id, file_id, options = {})
193
+ opts = options.dup
192
194
  if @api_client.config.debugging
193
195
  @api_client.config.logger.debug 'Calling API: FilesApi.delete_file ...'
194
196
  end
@@ -215,8 +217,6 @@ module XeroRuby
215
217
 
216
218
  # header parameters
217
219
  header_params = opts[:header_params] || {}
218
- # HTTP header 'Accept' (if needed)
219
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
220
220
  header_params[:'xero-tenant-id'] = xero_tenant_id
221
221
 
222
222
  # form parameters
@@ -226,7 +226,7 @@ module XeroRuby
226
226
  post_body = opts[:body]
227
227
 
228
228
  # return_type
229
- return_type = opts[:return_type] || 'FileResponse204'
229
+ return_type = opts[:return_type]
230
230
 
231
231
  # auth_names
232
232
  auth_names = opts[:auth_names] || ['OAuth2']
@@ -247,26 +247,27 @@ module XeroRuby
247
247
  return data, status_code, headers
248
248
  end
249
249
 
250
- # create a new association
250
+ # Deletes an existing file association
251
251
  # By passing in the appropriate options, you can create a new folder
252
252
  # @param xero_tenant_id [String] Xero identifier for Tenant
253
253
  # @param file_id [String] File id for single object
254
254
  # @param object_id [String] Object id for single object
255
255
  # @param [Hash] opts the optional parameters
256
- # @return [FileResponse204]
256
+ # @return [nil]
257
257
  def delete_file_association(xero_tenant_id, file_id, object_id, opts = {})
258
- data, _status_code, _headers = delete_file_association_with_http_info(xero_tenant_id, file_id, object_id, opts)
259
- data
258
+ delete_file_association_with_http_info(xero_tenant_id, file_id, object_id, opts)
259
+ nil
260
260
  end
261
261
 
262
- # create a new association
262
+ # Deletes an existing file association
263
263
  # By passing in the appropriate options, you can create a new folder
264
264
  # @param xero_tenant_id [String] Xero identifier for Tenant
265
265
  # @param file_id [String] File id for single object
266
266
  # @param object_id [String] Object id for single object
267
267
  # @param [Hash] opts the optional parameters
268
- # @return [Array<(FileResponse204, Integer, Hash)>] FileResponse204 data, response status code and response headers
269
- def delete_file_association_with_http_info(xero_tenant_id, file_id, object_id, opts = {})
268
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
269
+ def delete_file_association_with_http_info(xero_tenant_id, file_id, object_id, options = {})
270
+ opts = options.dup
270
271
  if @api_client.config.debugging
271
272
  @api_client.config.logger.debug 'Calling API: FilesApi.delete_file_association ...'
272
273
  end
@@ -297,8 +298,6 @@ module XeroRuby
297
298
 
298
299
  # header parameters
299
300
  header_params = opts[:header_params] || {}
300
- # HTTP header 'Accept' (if needed)
301
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
302
301
  header_params[:'xero-tenant-id'] = xero_tenant_id
303
302
 
304
303
  # form parameters
@@ -308,7 +307,7 @@ module XeroRuby
308
307
  post_body = opts[:body]
309
308
 
310
309
  # return_type
311
- return_type = opts[:return_type] || 'FileResponse204'
310
+ return_type = opts[:return_type]
312
311
 
313
312
  # auth_names
314
313
  auth_names = opts[:auth_names] || ['OAuth2']
@@ -329,24 +328,25 @@ module XeroRuby
329
328
  return data, status_code, headers
330
329
  end
331
330
 
332
- # delete a folder
331
+ # Deletes a folder
333
332
  # By passing in the appropriate ID, you can delete a folder
334
333
  # @param xero_tenant_id [String] Xero identifier for Tenant
335
334
  # @param folder_id [String] Folder id for single object
336
335
  # @param [Hash] opts the optional parameters
337
- # @return [FileResponse204]
336
+ # @return [nil]
338
337
  def delete_folder(xero_tenant_id, folder_id, opts = {})
339
- data, _status_code, _headers = delete_folder_with_http_info(xero_tenant_id, folder_id, opts)
340
- data
338
+ delete_folder_with_http_info(xero_tenant_id, folder_id, opts)
339
+ nil
341
340
  end
342
341
 
343
- # delete a folder
342
+ # Deletes a folder
344
343
  # By passing in the appropriate ID, you can delete a folder
345
344
  # @param xero_tenant_id [String] Xero identifier for Tenant
346
345
  # @param folder_id [String] Folder id for single object
347
346
  # @param [Hash] opts the optional parameters
348
- # @return [Array<(FileResponse204, Integer, Hash)>] FileResponse204 data, response status code and response headers
349
- def delete_folder_with_http_info(xero_tenant_id, folder_id, opts = {})
347
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
348
+ def delete_folder_with_http_info(xero_tenant_id, folder_id, options = {})
349
+ opts = options.dup
350
350
  if @api_client.config.debugging
351
351
  @api_client.config.logger.debug 'Calling API: FilesApi.delete_folder ...'
352
352
  end
@@ -373,8 +373,6 @@ module XeroRuby
373
373
 
374
374
  # header parameters
375
375
  header_params = opts[:header_params] || {}
376
- # HTTP header 'Accept' (if needed)
377
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
378
376
  header_params[:'xero-tenant-id'] = xero_tenant_id
379
377
 
380
378
  # form parameters
@@ -384,7 +382,7 @@ module XeroRuby
384
382
  post_body = opts[:body]
385
383
 
386
384
  # return_type
387
- return_type = opts[:return_type] || 'FileResponse204'
385
+ return_type = opts[:return_type]
388
386
 
389
387
  # auth_names
390
388
  auth_names = opts[:auth_names] || ['OAuth2']
@@ -405,7 +403,7 @@ module XeroRuby
405
403
  return data, status_code, headers
406
404
  end
407
405
 
408
- # searches files
406
+ # Retrieves an association object using a unique object ID
409
407
  # By passing in the appropriate options,
410
408
  # @param xero_tenant_id [String] Xero identifier for Tenant
411
409
  # @param object_id [String] Object id for single object
@@ -416,13 +414,14 @@ module XeroRuby
416
414
  data
417
415
  end
418
416
 
419
- # searches files
417
+ # Retrieves an association object using a unique object ID
420
418
  # By passing in the appropriate options,
421
419
  # @param xero_tenant_id [String] Xero identifier for Tenant
422
420
  # @param object_id [String] Object id for single object
423
421
  # @param [Hash] opts the optional parameters
424
422
  # @return [Array<(Array<Association>, Integer, Hash)>] Array<Association> data, response status code and response headers
425
- def get_associations_by_object_with_http_info(xero_tenant_id, object_id, opts = {})
423
+ def get_associations_by_object_with_http_info(xero_tenant_id, object_id, options = {})
424
+ opts = options.dup
426
425
  if @api_client.config.debugging
427
426
  @api_client.config.logger.debug 'Calling API: FilesApi.get_associations_by_object ...'
428
427
  end
@@ -481,7 +480,7 @@ module XeroRuby
481
480
  return data, status_code, headers
482
481
  end
483
482
 
484
- # searches for file by unique id
483
+ # Retrieves a file by a unique file ID
485
484
  # @param xero_tenant_id [String] Xero identifier for Tenant
486
485
  # @param file_id [String] File id for single object
487
486
  # @param [Hash] opts the optional parameters
@@ -491,12 +490,13 @@ module XeroRuby
491
490
  data
492
491
  end
493
492
 
494
- # searches for file by unique id
493
+ # Retrieves a file by a unique file ID
495
494
  # @param xero_tenant_id [String] Xero identifier for Tenant
496
495
  # @param file_id [String] File id for single object
497
496
  # @param [Hash] opts the optional parameters
498
497
  # @return [Array<(FileObject, Integer, Hash)>] FileObject data, response status code and response headers
499
- def get_file_with_http_info(xero_tenant_id, file_id, opts = {})
498
+ def get_file_with_http_info(xero_tenant_id, file_id, options = {})
499
+ opts = options.dup
500
500
  if @api_client.config.debugging
501
501
  @api_client.config.logger.debug 'Calling API: FilesApi.get_file ...'
502
502
  end
@@ -555,7 +555,7 @@ module XeroRuby
555
555
  return data, status_code, headers
556
556
  end
557
557
 
558
- # searches files
558
+ # Retrieves a specific file associations
559
559
  # By passing in the appropriate options,
560
560
  # @param xero_tenant_id [String] Xero identifier for Tenant
561
561
  # @param file_id [String] File id for single object
@@ -566,13 +566,14 @@ module XeroRuby
566
566
  data
567
567
  end
568
568
 
569
- # searches files
569
+ # Retrieves a specific file associations
570
570
  # By passing in the appropriate options,
571
571
  # @param xero_tenant_id [String] Xero identifier for Tenant
572
572
  # @param file_id [String] File id for single object
573
573
  # @param [Hash] opts the optional parameters
574
574
  # @return [Array<(Array<Association>, Integer, Hash)>] Array<Association> data, response status code and response headers
575
- def get_file_associations_with_http_info(xero_tenant_id, file_id, opts = {})
575
+ def get_file_associations_with_http_info(xero_tenant_id, file_id, options = {})
576
+ opts = options.dup
576
577
  if @api_client.config.debugging
577
578
  @api_client.config.logger.debug 'Calling API: FilesApi.get_file_associations ...'
578
579
  end
@@ -631,7 +632,7 @@ module XeroRuby
631
632
  return data, status_code, headers
632
633
  end
633
634
 
634
- # searches files to retrieve the data
635
+ # Retrieves the content of a specific file
635
636
  # By passing in the appropriate options, retrieve data for specific file
636
637
  # @param xero_tenant_id [String] Xero identifier for Tenant
637
638
  # @param file_id [String] File id for single object
@@ -642,13 +643,14 @@ module XeroRuby
642
643
  data
643
644
  end
644
645
 
645
- # searches files to retrieve the data
646
+ # Retrieves the content of a specific file
646
647
  # By passing in the appropriate options, retrieve data for specific file
647
648
  # @param xero_tenant_id [String] Xero identifier for Tenant
648
649
  # @param file_id [String] File id for single object
649
650
  # @param [Hash] opts the optional parameters
650
651
  # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
651
- def get_file_content_with_http_info(xero_tenant_id, file_id, opts = {})
652
+ def get_file_content_with_http_info(xero_tenant_id, file_id, options = {})
653
+ opts = options.dup
652
654
  if @api_client.config.debugging
653
655
  @api_client.config.logger.debug 'Calling API: FilesApi.get_file_content ...'
654
656
  end
@@ -707,7 +709,7 @@ module XeroRuby
707
709
  return data, status_code, headers
708
710
  end
709
711
 
710
- # searches files
712
+ # Retrieves files
711
713
  # @param xero_tenant_id [String] Xero identifier for Tenant
712
714
  # @param [Hash] opts the optional parameters
713
715
  # @option opts [Integer] :pagesize pass an optional page size value
@@ -719,14 +721,15 @@ module XeroRuby
719
721
  data
720
722
  end
721
723
 
722
- # searches files
724
+ # Retrieves files
723
725
  # @param xero_tenant_id [String] Xero identifier for Tenant
724
726
  # @param [Hash] opts the optional parameters
725
727
  # @option opts [Integer] :pagesize pass an optional page size value
726
728
  # @option opts [Integer] :page number of records to skip for pagination
727
729
  # @option opts [String] :sort values to sort by
728
730
  # @return [Array<(Files, Integer, Hash)>] Files data, response status code and response headers
729
- def get_files_with_http_info(xero_tenant_id, opts = {})
731
+ def get_files_with_http_info(xero_tenant_id, options = {})
732
+ opts = options.dup
730
733
  if @api_client.config.debugging
731
734
  @api_client.config.logger.debug 'Calling API: FilesApi.get_files ...'
732
735
  end
@@ -796,7 +799,7 @@ module XeroRuby
796
799
  return data, status_code, headers
797
800
  end
798
801
 
799
- # searches specific folder by id
802
+ # Retrieves specific folder by using a unique folder ID
800
803
  # By passing in the appropriate ID, you can search for specific folder
801
804
  # @param xero_tenant_id [String] Xero identifier for Tenant
802
805
  # @param folder_id [String] Folder id for single object
@@ -807,13 +810,14 @@ module XeroRuby
807
810
  data
808
811
  end
809
812
 
810
- # searches specific folder by id
813
+ # Retrieves specific folder by using a unique folder ID
811
814
  # By passing in the appropriate ID, you can search for specific folder
812
815
  # @param xero_tenant_id [String] Xero identifier for Tenant
813
816
  # @param folder_id [String] Folder id for single object
814
817
  # @param [Hash] opts the optional parameters
815
818
  # @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
816
- def get_folder_with_http_info(xero_tenant_id, folder_id, opts = {})
819
+ def get_folder_with_http_info(xero_tenant_id, folder_id, options = {})
820
+ opts = options.dup
817
821
  if @api_client.config.debugging
818
822
  @api_client.config.logger.debug 'Calling API: FilesApi.get_folder ...'
819
823
  end
@@ -872,7 +876,7 @@ module XeroRuby
872
876
  return data, status_code, headers
873
877
  end
874
878
 
875
- # searches folder
879
+ # Retrieves folders
876
880
  # By passing in the appropriate options, you can search for available folders
877
881
  # @param xero_tenant_id [String] Xero identifier for Tenant
878
882
  # @param [Hash] opts the optional parameters
@@ -883,13 +887,14 @@ module XeroRuby
883
887
  data
884
888
  end
885
889
 
886
- # searches folder
890
+ # Retrieves folders
887
891
  # By passing in the appropriate options, you can search for available folders
888
892
  # @param xero_tenant_id [String] Xero identifier for Tenant
889
893
  # @param [Hash] opts the optional parameters
890
894
  # @option opts [String] :sort values to sort by
891
895
  # @return [Array<(Array<Folder>, Integer, Hash)>] Array<Folder> data, response status code and response headers
892
- def get_folders_with_http_info(xero_tenant_id, opts = {})
896
+ def get_folders_with_http_info(xero_tenant_id, options = {})
897
+ opts = options.dup
893
898
  if @api_client.config.debugging
894
899
  @api_client.config.logger.debug 'Calling API: FilesApi.get_folders ...'
895
900
  end
@@ -949,7 +954,7 @@ module XeroRuby
949
954
  return data, status_code, headers
950
955
  end
951
956
 
952
- # searches inbox folder
957
+ # Retrieves inbox folder
953
958
  # Search for the user inbox
954
959
  # @param xero_tenant_id [String] Xero identifier for Tenant
955
960
  # @param [Hash] opts the optional parameters
@@ -959,12 +964,13 @@ module XeroRuby
959
964
  data
960
965
  end
961
966
 
962
- # searches inbox folder
967
+ # Retrieves inbox folder
963
968
  # Search for the user inbox
964
969
  # @param xero_tenant_id [String] Xero identifier for Tenant
965
970
  # @param [Hash] opts the optional parameters
966
971
  # @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
967
- def get_inbox_with_http_info(xero_tenant_id, opts = {})
972
+ def get_inbox_with_http_info(xero_tenant_id, options = {})
973
+ opts = options.dup
968
974
  if @api_client.config.debugging
969
975
  @api_client.config.logger.debug 'Calling API: FilesApi.get_inbox ...'
970
976
  end
@@ -1020,7 +1026,7 @@ module XeroRuby
1020
1026
  end
1021
1027
 
1022
1028
  # Update a file
1023
- # Update properties on a single file
1029
+ # Updates file properties of a single file
1024
1030
  # @param xero_tenant_id [String] Xero identifier for Tenant
1025
1031
  # @param file_id [String] File id for single object
1026
1032
  # @param [Hash] opts the optional parameters
@@ -1032,13 +1038,14 @@ module XeroRuby
1032
1038
  end
1033
1039
 
1034
1040
  # Update a file
1035
- # Update properties on a single file
1041
+ # Updates file properties of a single file
1036
1042
  # @param xero_tenant_id [String] Xero identifier for Tenant
1037
1043
  # @param file_id [String] File id for single object
1038
1044
  # @param [Hash] opts the optional parameters
1039
1045
  # @option opts [FileObject] :file_object
1040
1046
  # @return [Array<(FileObject, Integer, Hash)>] FileObject data, response status code and response headers
1041
- def update_file_with_http_info(xero_tenant_id, file_id, opts = {})
1047
+ def update_file_with_http_info(xero_tenant_id, file_id, options = {})
1048
+ opts = options.dup
1042
1049
  if @api_client.config.debugging
1043
1050
  @api_client.config.logger.debug 'Calling API: FilesApi.update_file ...'
1044
1051
  end
@@ -1099,7 +1106,7 @@ module XeroRuby
1099
1106
  return data, status_code, headers
1100
1107
  end
1101
1108
 
1102
- # update folder
1109
+ # Updates an existing folder
1103
1110
  # By passing in the appropriate ID and properties, you can update a folder
1104
1111
  # @param xero_tenant_id [String] Xero identifier for Tenant
1105
1112
  # @param folder_id [String] Folder id for single object
@@ -1111,14 +1118,15 @@ module XeroRuby
1111
1118
  data
1112
1119
  end
1113
1120
 
1114
- # update folder
1121
+ # Updates an existing folder
1115
1122
  # By passing in the appropriate ID and properties, you can update a folder
1116
1123
  # @param xero_tenant_id [String] Xero identifier for Tenant
1117
1124
  # @param folder_id [String] Folder id for single object
1118
1125
  # @param folder [Folder]
1119
1126
  # @param [Hash] opts the optional parameters
1120
1127
  # @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
1121
- def update_folder_with_http_info(xero_tenant_id, folder_id, folder, opts = {})
1128
+ def update_folder_with_http_info(xero_tenant_id, folder_id, folder, options = {})
1129
+ opts = options.dup
1122
1130
  if @api_client.config.debugging
1123
1131
  @api_client.config.logger.debug 'Calling API: FilesApi.update_folder ...'
1124
1132
  end
@@ -1183,30 +1191,29 @@ module XeroRuby
1183
1191
  return data, status_code, headers
1184
1192
  end
1185
1193
 
1186
- # upload an File
1194
+ # Uploads a File to the inbox
1187
1195
  # @param xero_tenant_id [String] Xero identifier for Tenant
1196
+ # @param body [String]
1197
+ # @param name [String] exact name of the file you are uploading
1198
+ # @param filename [String]
1188
1199
  # @param [Hash] opts the optional parameters
1189
- # @option opts [String] :folder_id pass an optional folder id to save file to specific folder
1190
- # @option opts [String] :body
1191
- # @option opts [String] :name exact name of the file you are uploading
1192
- # @option opts [String] :filename
1193
1200
  # @option opts [String] :mime_type
1194
1201
  # @return [FileObject]
1195
- def upload_file(xero_tenant_id, opts = {})
1196
- data, _status_code, _headers = upload_file_with_http_info(xero_tenant_id, opts)
1202
+ def upload_file(xero_tenant_id, body, name, filename, opts = {})
1203
+ data, _status_code, _headers = upload_file_with_http_info(xero_tenant_id, body, name, filename, opts)
1197
1204
  data
1198
1205
  end
1199
1206
 
1200
- # upload an File
1207
+ # Uploads a File to the inbox
1201
1208
  # @param xero_tenant_id [String] Xero identifier for Tenant
1209
+ # @param body [String]
1210
+ # @param name [String] exact name of the file you are uploading
1211
+ # @param filename [String]
1202
1212
  # @param [Hash] opts the optional parameters
1203
- # @option opts [String] :folder_id pass an optional folder id to save file to specific folder
1204
- # @option opts [String] :body
1205
- # @option opts [String] :name exact name of the file you are uploading
1206
- # @option opts [String] :filename
1207
1213
  # @option opts [String] :mime_type
1208
1214
  # @return [Array<(FileObject, Integer, Hash)>] FileObject data, response status code and response headers
1209
- def upload_file_with_http_info(xero_tenant_id, opts = {})
1215
+ def upload_file_with_http_info(xero_tenant_id, body, name, filename, options = {})
1216
+ opts = options.dup
1210
1217
  if @api_client.config.debugging
1211
1218
  @api_client.config.logger.debug 'Calling API: FilesApi.upload_file ...'
1212
1219
  end
@@ -1214,6 +1221,18 @@ module XeroRuby
1214
1221
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
1215
1222
  fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling FilesApi.upload_file"
1216
1223
  end
1224
+ # verify the required parameter 'body' is set
1225
+ if @api_client.config.client_side_validation && body.nil?
1226
+ fail ArgumentError, "Missing the required parameter 'body' when calling FilesApi.upload_file"
1227
+ end
1228
+ # verify the required parameter 'name' is set
1229
+ if @api_client.config.client_side_validation && name.nil?
1230
+ fail ArgumentError, "Missing the required parameter 'name' when calling FilesApi.upload_file"
1231
+ end
1232
+ # verify the required parameter 'filename' is set
1233
+ if @api_client.config.client_side_validation && filename.nil?
1234
+ fail ArgumentError, "Missing the required parameter 'filename' when calling FilesApi.upload_file"
1235
+ end
1217
1236
  # resource path
1218
1237
  local_var_path = '/Files'
1219
1238
 
@@ -1222,7 +1241,6 @@ module XeroRuby
1222
1241
 
1223
1242
  # query parameters
1224
1243
  query_params = opts[:query_params] || {}
1225
- query_params[:'folderId'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
1226
1244
 
1227
1245
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1228
1246
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -1238,9 +1256,9 @@ module XeroRuby
1238
1256
 
1239
1257
  # form parameters
1240
1258
  form_params = opts[:form_params] || {}
1241
- form_params['body'] = opts[:'body'] if !opts[:'body'].nil?
1242
- form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
1243
- form_params['filename'] = opts[:'filename'] if !opts[:'filename'].nil?
1259
+ form_params['body'] = body
1260
+ form_params['name'] = name
1261
+ form_params['filename'] = filename
1244
1262
  form_params['mimeType'] = opts[:'mime_type'] if !opts[:'mime_type'].nil?
1245
1263
 
1246
1264
  # http body (model)
@@ -1267,5 +1285,106 @@ module XeroRuby
1267
1285
  end
1268
1286
  return data, status_code, headers
1269
1287
  end
1288
+
1289
+ # Uploads a File to a specific folder
1290
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1291
+ # @param folder_id [String] pass required folder id to save file to specific folder
1292
+ # @param body [String]
1293
+ # @param name [String] exact name of the file you are uploading
1294
+ # @param filename [String]
1295
+ # @param [Hash] opts the optional parameters
1296
+ # @option opts [String] :mime_type
1297
+ # @return [FileObject]
1298
+ def upload_file_to_folder(xero_tenant_id, folder_id, body, name, filename, opts = {})
1299
+ data, _status_code, _headers = upload_file_to_folder_with_http_info(xero_tenant_id, folder_id, body, name, filename, opts)
1300
+ data
1301
+ end
1302
+
1303
+ # Uploads a File to a specific folder
1304
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1305
+ # @param folder_id [String] pass required folder id to save file to specific folder
1306
+ # @param body [String]
1307
+ # @param name [String] exact name of the file you are uploading
1308
+ # @param filename [String]
1309
+ # @param [Hash] opts the optional parameters
1310
+ # @option opts [String] :mime_type
1311
+ # @return [Array<(FileObject, Integer, Hash)>] FileObject data, response status code and response headers
1312
+ def upload_file_to_folder_with_http_info(xero_tenant_id, folder_id, body, name, filename, options = {})
1313
+ opts = options.dup
1314
+ if @api_client.config.debugging
1315
+ @api_client.config.logger.debug 'Calling API: FilesApi.upload_file_to_folder ...'
1316
+ end
1317
+ # verify the required parameter 'xero_tenant_id' is set
1318
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1319
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling FilesApi.upload_file_to_folder"
1320
+ end
1321
+ # verify the required parameter 'folder_id' is set
1322
+ if @api_client.config.client_side_validation && folder_id.nil?
1323
+ fail ArgumentError, "Missing the required parameter 'folder_id' when calling FilesApi.upload_file_to_folder"
1324
+ end
1325
+ # verify the required parameter 'body' is set
1326
+ if @api_client.config.client_side_validation && body.nil?
1327
+ fail ArgumentError, "Missing the required parameter 'body' when calling FilesApi.upload_file_to_folder"
1328
+ end
1329
+ # verify the required parameter 'name' is set
1330
+ if @api_client.config.client_side_validation && name.nil?
1331
+ fail ArgumentError, "Missing the required parameter 'name' when calling FilesApi.upload_file_to_folder"
1332
+ end
1333
+ # verify the required parameter 'filename' is set
1334
+ if @api_client.config.client_side_validation && filename.nil?
1335
+ fail ArgumentError, "Missing the required parameter 'filename' when calling FilesApi.upload_file_to_folder"
1336
+ end
1337
+ # resource path
1338
+ local_var_path = '/Files/{FolderId}'.sub('{' + 'FolderId' + '}', folder_id.to_s)
1339
+
1340
+ # camelize keys of incoming `where` opts
1341
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1342
+
1343
+ # query parameters
1344
+ query_params = opts[:query_params] || {}
1345
+
1346
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1347
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1348
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1349
+
1350
+ # header parameters
1351
+ header_params = opts[:header_params] || {}
1352
+ # HTTP header 'Accept' (if needed)
1353
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1354
+ # HTTP header 'Content-Type'
1355
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1356
+ header_params[:'xero-tenant-id'] = xero_tenant_id
1357
+
1358
+ # form parameters
1359
+ form_params = opts[:form_params] || {}
1360
+ form_params['body'] = body
1361
+ form_params['name'] = name
1362
+ form_params['filename'] = filename
1363
+ form_params['mimeType'] = opts[:'mime_type'] if !opts[:'mime_type'].nil?
1364
+
1365
+ # http body (model)
1366
+ post_body = opts[:body]
1367
+
1368
+ # return_type
1369
+ return_type = opts[:return_type] || 'FileObject'
1370
+
1371
+ # auth_names
1372
+ auth_names = opts[:auth_names] || ['OAuth2']
1373
+
1374
+ new_options = opts.merge(
1375
+ :header_params => header_params,
1376
+ :query_params => query_params,
1377
+ :form_params => form_params,
1378
+ :body => post_body,
1379
+ :auth_names => auth_names,
1380
+ :return_type => return_type
1381
+ )
1382
+
1383
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "FilesApi", new_options)
1384
+ if @api_client.config.debugging
1385
+ @api_client.config.logger.debug "API called: FilesApi#upload_file_to_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1386
+ end
1387
+ return data, status_code, headers
1388
+ end
1270
1389
  end
1271
1390
  end