xero-ruby 4.2.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1008) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +450 -450
  3. data/lib/xero-ruby/api/accounting_api.rb +18858 -18858
  4. data/lib/xero-ruby/api/app_store_api.rb +325 -325
  5. data/lib/xero-ruby/api/asset_api.rb +493 -493
  6. data/lib/xero-ruby/api/files_api.rb +1468 -1468
  7. data/lib/xero-ruby/api/finance_api.rb +961 -961
  8. data/lib/xero-ruby/api/payroll_au_api.rb +2513 -2282
  9. data/lib/xero-ruby/api/payroll_nz_api.rb +5334 -5334
  10. data/lib/xero-ruby/api/payroll_uk_api.rb +5479 -5479
  11. data/lib/xero-ruby/api/project_api.rb +1402 -1402
  12. data/lib/xero-ruby/api_client.rb +675 -675
  13. data/lib/xero-ruby/api_error.rb +57 -57
  14. data/lib/xero-ruby/configuration.rb +282 -282
  15. data/lib/xero-ruby/models/accounting/account.rb +535 -535
  16. data/lib/xero-ruby/models/accounting/account_type.rb +56 -56
  17. data/lib/xero-ruby/models/accounting/accounts.rb +224 -224
  18. data/lib/xero-ruby/models/accounting/accounts_payable.rb +232 -232
  19. data/lib/xero-ruby/models/accounting/accounts_receivable.rb +232 -232
  20. data/lib/xero-ruby/models/accounting/action.rb +268 -268
  21. data/lib/xero-ruby/models/accounting/actions.rb +224 -224
  22. data/lib/xero-ruby/models/accounting/address.rb +483 -483
  23. data/lib/xero-ruby/models/accounting/address_for_organisation.rb +484 -484
  24. data/lib/xero-ruby/models/accounting/allocation.rb +309 -309
  25. data/lib/xero-ruby/models/accounting/allocations.rb +224 -224
  26. data/lib/xero-ruby/models/accounting/attachment.rb +272 -272
  27. data/lib/xero-ruby/models/accounting/attachments.rb +224 -224
  28. data/lib/xero-ruby/models/accounting/balance_details.rb +243 -243
  29. data/lib/xero-ruby/models/accounting/balances.rb +233 -233
  30. data/lib/xero-ruby/models/accounting/bank_transaction.rb +510 -510
  31. data/lib/xero-ruby/models/accounting/bank_transactions.rb +224 -224
  32. data/lib/xero-ruby/models/accounting/bank_transfer.rb +375 -375
  33. data/lib/xero-ruby/models/accounting/bank_transfers.rb +224 -224
  34. data/lib/xero-ruby/models/accounting/batch_payment.rb +496 -496
  35. data/lib/xero-ruby/models/accounting/batch_payment_delete.rb +244 -244
  36. data/lib/xero-ruby/models/accounting/batch_payment_delete_by_url_param.rb +229 -229
  37. data/lib/xero-ruby/models/accounting/batch_payment_details.rb +293 -293
  38. data/lib/xero-ruby/models/accounting/batch_payments.rb +224 -224
  39. data/lib/xero-ruby/models/accounting/bill.rb +232 -232
  40. data/lib/xero-ruby/models/accounting/branding_theme.rb +307 -307
  41. data/lib/xero-ruby/models/accounting/branding_themes.rb +224 -224
  42. data/lib/xero-ruby/models/accounting/budget.rb +327 -327
  43. data/lib/xero-ruby/models/accounting/budget_balance.rb +267 -267
  44. data/lib/xero-ruby/models/accounting/budget_line.rb +244 -244
  45. data/lib/xero-ruby/models/accounting/budgets.rb +224 -224
  46. data/lib/xero-ruby/models/accounting/cis_org_setting.rb +242 -242
  47. data/lib/xero-ruby/models/accounting/cis_org_settings.rb +224 -224
  48. data/lib/xero-ruby/models/accounting/cis_setting.rb +232 -232
  49. data/lib/xero-ruby/models/accounting/cis_settings.rb +224 -224
  50. data/lib/xero-ruby/models/accounting/contact.rb +849 -849
  51. data/lib/xero-ruby/models/accounting/contact_group.rb +290 -290
  52. data/lib/xero-ruby/models/accounting/contact_groups.rb +224 -224
  53. data/lib/xero-ruby/models/accounting/contact_person.rb +252 -252
  54. data/lib/xero-ruby/models/accounting/contacts.rb +224 -224
  55. data/lib/xero-ruby/models/accounting/conversion_balances.rb +245 -245
  56. data/lib/xero-ruby/models/accounting/conversion_date.rb +233 -233
  57. data/lib/xero-ruby/models/accounting/country_code.rb +274 -274
  58. data/lib/xero-ruby/models/accounting/credit_note.rb +580 -580
  59. data/lib/xero-ruby/models/accounting/credit_notes.rb +224 -224
  60. data/lib/xero-ruby/models/accounting/currencies.rb +224 -224
  61. data/lib/xero-ruby/models/accounting/currency.rb +232 -232
  62. data/lib/xero-ruby/models/accounting/currency_code.rb +203 -203
  63. data/lib/xero-ruby/models/accounting/element.rb +294 -294
  64. data/lib/xero-ruby/models/accounting/employee.rb +362 -362
  65. data/lib/xero-ruby/models/accounting/employees.rb +224 -224
  66. data/lib/xero-ruby/models/accounting/error.rb +254 -254
  67. data/lib/xero-ruby/models/accounting/expense_claim.rb +375 -375
  68. data/lib/xero-ruby/models/accounting/expense_claims.rb +224 -224
  69. data/lib/xero-ruby/models/accounting/external_link.rb +281 -281
  70. data/lib/xero-ruby/models/accounting/history_record.rb +252 -252
  71. data/lib/xero-ruby/models/accounting/history_records.rb +224 -224
  72. data/lib/xero-ruby/models/accounting/import_summary.rb +233 -233
  73. data/lib/xero-ruby/models/accounting/import_summary_accounts.rb +303 -303
  74. data/lib/xero-ruby/models/accounting/import_summary_object.rb +222 -222
  75. data/lib/xero-ruby/models/accounting/import_summary_organisation.rb +222 -222
  76. data/lib/xero-ruby/models/accounting/invoice.rb +707 -707
  77. data/lib/xero-ruby/models/accounting/invoice_reminder.rb +222 -222
  78. data/lib/xero-ruby/models/accounting/invoice_reminders.rb +224 -224
  79. data/lib/xero-ruby/models/accounting/invoices.rb +224 -224
  80. data/lib/xero-ruby/models/accounting/item.rb +443 -443
  81. data/lib/xero-ruby/models/accounting/items.rb +224 -224
  82. data/lib/xero-ruby/models/accounting/journal.rb +353 -353
  83. data/lib/xero-ruby/models/accounting/journal_line.rb +334 -334
  84. data/lib/xero-ruby/models/accounting/journals.rb +224 -224
  85. data/lib/xero-ruby/models/accounting/line_amount_types.rb +37 -37
  86. data/lib/xero-ruby/models/accounting/line_item.rb +364 -364
  87. data/lib/xero-ruby/models/accounting/line_item_item.rb +272 -272
  88. data/lib/xero-ruby/models/accounting/line_item_tracking.rb +267 -267
  89. data/lib/xero-ruby/models/accounting/linked_transaction.rb +390 -390
  90. data/lib/xero-ruby/models/accounting/linked_transactions.rb +224 -224
  91. data/lib/xero-ruby/models/accounting/manual_journal.rb +406 -406
  92. data/lib/xero-ruby/models/accounting/manual_journal_line.rb +294 -294
  93. data/lib/xero-ruby/models/accounting/manual_journals.rb +224 -224
  94. data/lib/xero-ruby/models/accounting/online_invoice.rb +222 -222
  95. data/lib/xero-ruby/models/accounting/online_invoices.rb +224 -224
  96. data/lib/xero-ruby/models/accounting/organisation.rb +728 -728
  97. data/lib/xero-ruby/models/accounting/organisations.rb +224 -224
  98. data/lib/xero-ruby/models/accounting/overpayment.rb +464 -464
  99. data/lib/xero-ruby/models/accounting/overpayments.rb +224 -224
  100. data/lib/xero-ruby/models/accounting/payment.rb +544 -544
  101. data/lib/xero-ruby/models/accounting/payment_delete.rb +229 -229
  102. data/lib/xero-ruby/models/accounting/payment_service.rb +274 -274
  103. data/lib/xero-ruby/models/accounting/payment_services.rb +224 -224
  104. data/lib/xero-ruby/models/accounting/payment_term.rb +232 -232
  105. data/lib/xero-ruby/models/accounting/payment_term_type.rb +38 -38
  106. data/lib/xero-ruby/models/accounting/payments.rb +224 -224
  107. data/lib/xero-ruby/models/accounting/phone.rb +336 -336
  108. data/lib/xero-ruby/models/accounting/prepayment.rb +475 -475
  109. data/lib/xero-ruby/models/accounting/prepayments.rb +224 -224
  110. data/lib/xero-ruby/models/accounting/purchase.rb +252 -252
  111. data/lib/xero-ruby/models/accounting/purchase_order.rb +541 -541
  112. data/lib/xero-ruby/models/accounting/purchase_orders.rb +224 -224
  113. data/lib/xero-ruby/models/accounting/quote.rb +531 -531
  114. data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +37 -37
  115. data/lib/xero-ruby/models/accounting/quote_status_codes.rb +40 -40
  116. data/lib/xero-ruby/models/accounting/quotes.rb +224 -224
  117. data/lib/xero-ruby/models/accounting/receipt.rb +441 -441
  118. data/lib/xero-ruby/models/accounting/receipts.rb +224 -224
  119. data/lib/xero-ruby/models/accounting/repeating_invoice.rb +477 -477
  120. data/lib/xero-ruby/models/accounting/repeating_invoices.rb +224 -224
  121. data/lib/xero-ruby/models/accounting/report.rb +309 -309
  122. data/lib/xero-ruby/models/accounting/report_attribute.rb +232 -232
  123. data/lib/xero-ruby/models/accounting/report_cell.rb +234 -234
  124. data/lib/xero-ruby/models/accounting/report_fields.rb +242 -242
  125. data/lib/xero-ruby/models/accounting/report_row.rb +244 -244
  126. data/lib/xero-ruby/models/accounting/report_rows.rb +256 -256
  127. data/lib/xero-ruby/models/accounting/report_with_row.rb +308 -308
  128. data/lib/xero-ruby/models/accounting/report_with_rows.rb +224 -224
  129. data/lib/xero-ruby/models/accounting/reports.rb +224 -224
  130. data/lib/xero-ruby/models/accounting/request_empty.rb +222 -222
  131. data/lib/xero-ruby/models/accounting/row_type.rb +38 -38
  132. data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +232 -232
  133. data/lib/xero-ruby/models/accounting/schedule.rb +336 -336
  134. data/lib/xero-ruby/models/accounting/setup.rb +246 -246
  135. data/lib/xero-ruby/models/accounting/tax_component.rb +252 -252
  136. data/lib/xero-ruby/models/accounting/tax_rate.rb +481 -476
  137. data/lib/xero-ruby/models/accounting/tax_rates.rb +224 -224
  138. data/lib/xero-ruby/models/accounting/tax_type.rb +130 -120
  139. data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +432 -432
  140. data/lib/xero-ruby/models/accounting/time_zone.rb +175 -175
  141. data/lib/xero-ruby/models/accounting/tracking_categories.rb +224 -224
  142. data/lib/xero-ruby/models/accounting/tracking_category.rb +341 -341
  143. data/lib/xero-ruby/models/accounting/tracking_option.rb +304 -304
  144. data/lib/xero-ruby/models/accounting/tracking_options.rb +224 -224
  145. data/lib/xero-ruby/models/accounting/user.rb +323 -323
  146. data/lib/xero-ruby/models/accounting/users.rb +224 -224
  147. data/lib/xero-ruby/models/accounting/validation_error.rb +222 -222
  148. data/lib/xero-ruby/models/app_store/create_usage_record.rb +243 -243
  149. data/lib/xero-ruby/models/app_store/plan.rb +311 -311
  150. data/lib/xero-ruby/models/app_store/price.rb +257 -257
  151. data/lib/xero-ruby/models/app_store/problem_details.rb +272 -272
  152. data/lib/xero-ruby/models/app_store/product.rb +299 -299
  153. data/lib/xero-ruby/models/app_store/subscription.rb +361 -361
  154. data/lib/xero-ruby/models/app_store/subscription_item.rb +354 -354
  155. data/lib/xero-ruby/models/app_store/update_usage_record.rb +228 -228
  156. data/lib/xero-ruby/models/app_store/usage_record.rb +332 -332
  157. data/lib/xero-ruby/models/app_store/usage_records_list.rb +230 -230
  158. data/lib/xero-ruby/models/assets/asset.rb +377 -377
  159. data/lib/xero-ruby/models/assets/asset_status.rb +37 -37
  160. data/lib/xero-ruby/models/assets/asset_status_query_param.rb +37 -37
  161. data/lib/xero-ruby/models/assets/asset_type.rb +292 -292
  162. data/lib/xero-ruby/models/assets/assets.rb +234 -234
  163. data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +282 -282
  164. data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +361 -361
  165. data/lib/xero-ruby/models/assets/error.rb +266 -266
  166. data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +272 -272
  167. data/lib/xero-ruby/models/assets/pagination.rb +252 -252
  168. data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +262 -262
  169. data/lib/xero-ruby/models/assets/setting.rb +292 -292
  170. data/lib/xero-ruby/models/files/association.rb +252 -252
  171. data/lib/xero-ruby/models/files/file_object.rb +292 -292
  172. data/lib/xero-ruby/models/files/files.rb +254 -254
  173. data/lib/xero-ruby/models/files/folder.rb +262 -262
  174. data/lib/xero-ruby/models/files/folders.rb +224 -224
  175. data/lib/xero-ruby/models/files/object_group.rb +46 -46
  176. data/lib/xero-ruby/models/files/object_type.rb +90 -90
  177. data/lib/xero-ruby/models/files/upload_object.rb +267 -267
  178. data/lib/xero-ruby/models/files/user.rb +267 -267
  179. data/lib/xero-ruby/models/finance/account_usage.rb +342 -342
  180. data/lib/xero-ruby/models/finance/account_usage_response.rb +254 -254
  181. data/lib/xero-ruby/models/finance/balance_sheet_account_detail.rb +262 -262
  182. data/lib/xero-ruby/models/finance/balance_sheet_account_group.rb +234 -234
  183. data/lib/xero-ruby/models/finance/balance_sheet_account_type.rb +244 -244
  184. data/lib/xero-ruby/models/finance/balance_sheet_response.rb +252 -252
  185. data/lib/xero-ruby/models/finance/bank_statement_accounting_response.rb +254 -254
  186. data/lib/xero-ruby/models/finance/bank_statement_response.rb +232 -232
  187. data/lib/xero-ruby/models/finance/bank_transaction_response.rb +274 -274
  188. data/lib/xero-ruby/models/finance/cash_account_response.rb +262 -262
  189. data/lib/xero-ruby/models/finance/cash_balance.rb +242 -242
  190. data/lib/xero-ruby/models/finance/cash_validation_response.rb +262 -262
  191. data/lib/xero-ruby/models/finance/cashflow_account.rb +282 -282
  192. data/lib/xero-ruby/models/finance/cashflow_activity.rb +244 -244
  193. data/lib/xero-ruby/models/finance/cashflow_response.rb +254 -254
  194. data/lib/xero-ruby/models/finance/cashflow_type.rb +244 -244
  195. data/lib/xero-ruby/models/finance/contact_detail.rb +274 -274
  196. data/lib/xero-ruby/models/finance/contact_response.rb +232 -232
  197. data/lib/xero-ruby/models/finance/contact_total_detail.rb +242 -242
  198. data/lib/xero-ruby/models/finance/contact_total_other.rb +252 -252
  199. data/lib/xero-ruby/models/finance/credit_note_response.rb +254 -254
  200. data/lib/xero-ruby/models/finance/current_statement_response.rb +272 -272
  201. data/lib/xero-ruby/models/finance/data_source_response.rb +362 -362
  202. data/lib/xero-ruby/models/finance/history_record_response.rb +262 -262
  203. data/lib/xero-ruby/models/finance/income_by_contact_response.rb +284 -284
  204. data/lib/xero-ruby/models/finance/invoice_response.rb +254 -254
  205. data/lib/xero-ruby/models/finance/line_item_response.rb +252 -252
  206. data/lib/xero-ruby/models/finance/lock_history_model.rb +242 -242
  207. data/lib/xero-ruby/models/finance/lock_history_response.rb +244 -244
  208. data/lib/xero-ruby/models/finance/manual_journal_total.rb +222 -222
  209. data/lib/xero-ruby/models/finance/overpayment_response.rb +254 -254
  210. data/lib/xero-ruby/models/finance/payment_response.rb +312 -312
  211. data/lib/xero-ruby/models/finance/pnl_account.rb +272 -272
  212. data/lib/xero-ruby/models/finance/pnl_account_class.rb +234 -234
  213. data/lib/xero-ruby/models/finance/pnl_account_type.rb +244 -244
  214. data/lib/xero-ruby/models/finance/practice_response.rb +262 -262
  215. data/lib/xero-ruby/models/finance/prepayment_response.rb +254 -254
  216. data/lib/xero-ruby/models/finance/problem.rb +252 -252
  217. data/lib/xero-ruby/models/finance/problem_type.rb +44 -44
  218. data/lib/xero-ruby/models/finance/profit_and_loss_response.rb +262 -262
  219. data/lib/xero-ruby/models/finance/report_history_model.rb +242 -242
  220. data/lib/xero-ruby/models/finance/report_history_response.rb +244 -244
  221. data/lib/xero-ruby/models/finance/statement_balance_response.rb +232 -232
  222. data/lib/xero-ruby/models/finance/statement_line_response.rb +356 -356
  223. data/lib/xero-ruby/models/finance/statement_lines_response.rb +382 -382
  224. data/lib/xero-ruby/models/finance/statement_response.rb +314 -314
  225. data/lib/xero-ruby/models/finance/total_detail.rb +242 -242
  226. data/lib/xero-ruby/models/finance/total_other.rb +242 -242
  227. data/lib/xero-ruby/models/finance/trial_balance_account.rb +312 -312
  228. data/lib/xero-ruby/models/finance/trial_balance_entry.rb +232 -232
  229. data/lib/xero-ruby/models/finance/trial_balance_movement.rb +252 -252
  230. data/lib/xero-ruby/models/finance/trial_balance_response.rb +244 -244
  231. data/lib/xero-ruby/models/finance/user_activities_response.rb +244 -244
  232. data/lib/xero-ruby/models/finance/user_response.rb +336 -336
  233. data/lib/xero-ruby/models/payroll_au/account.rb +252 -252
  234. data/lib/xero-ruby/models/payroll_au/account_type.rb +57 -57
  235. data/lib/xero-ruby/models/payroll_au/allowance_category.rb +41 -41
  236. data/lib/xero-ruby/models/payroll_au/allowance_type.rb +44 -44
  237. data/lib/xero-ruby/models/payroll_au/api_exception.rb +243 -243
  238. data/lib/xero-ruby/models/payroll_au/bank_account.rb +272 -272
  239. data/lib/xero-ruby/models/payroll_au/calendar_type.rb +40 -40
  240. data/lib/xero-ruby/models/payroll_au/country_of_residence.rb +285 -285
  241. data/lib/xero-ruby/models/payroll_au/deduction_line.rb +267 -267
  242. data/lib/xero-ruby/models/payroll_au/deduction_type.rb +354 -354
  243. data/lib/xero-ruby/models/payroll_au/deduction_type_calculation_type.rb +37 -37
  244. data/lib/xero-ruby/models/payroll_au/earnings_line.rb +307 -307
  245. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +442 -442
  246. data/lib/xero-ruby/models/payroll_au/earnings_rate_calculation_type.rb +37 -37
  247. data/lib/xero-ruby/models/payroll_au/earnings_type.rb +48 -48
  248. data/lib/xero-ruby/models/payroll_au/employee.rb +654 -654
  249. data/lib/xero-ruby/models/payroll_au/employee_status.rb +36 -36
  250. data/lib/xero-ruby/models/payroll_au/employees.rb +224 -224
  251. data/lib/xero-ruby/models/payroll_au/employment_basis.rb +40 -40
  252. data/lib/xero-ruby/models/payroll_au/employment_termination_payment_type.rb +36 -36
  253. data/lib/xero-ruby/models/payroll_au/employment_type.rb +36 -36
  254. data/lib/xero-ruby/models/payroll_au/entitlement_final_pay_payout_type.rb +36 -36
  255. data/lib/xero-ruby/models/payroll_au/home_address.rb +277 -277
  256. data/lib/xero-ruby/models/payroll_au/income_type.rb +39 -39
  257. data/lib/xero-ruby/models/payroll_au/leave_accrual_line.rb +242 -242
  258. data/lib/xero-ruby/models/payroll_au/leave_application.rb +326 -326
  259. data/lib/xero-ruby/models/payroll_au/leave_applications.rb +224 -224
  260. data/lib/xero-ruby/models/payroll_au/leave_balance.rb +252 -252
  261. data/lib/xero-ruby/models/payroll_au/leave_category_code.rb +46 -46
  262. data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +252 -252
  263. data/lib/xero-ruby/models/payroll_au/leave_line.rb +292 -292
  264. data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +39 -39
  265. data/lib/xero-ruby/models/payroll_au/leave_lines.rb +225 -225
  266. data/lib/xero-ruby/models/payroll_au/leave_period.rb +252 -252
  267. data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +36 -36
  268. data/lib/xero-ruby/models/payroll_au/leave_type.rb +337 -337
  269. data/lib/xero-ruby/models/payroll_au/leave_type_contribution_type.rb +38 -38
  270. data/lib/xero-ruby/models/payroll_au/manual_tax_type.rb +40 -40
  271. data/lib/xero-ruby/models/payroll_au/opening_balances.rb +304 -304
  272. data/lib/xero-ruby/models/payroll_au/paid_leave_earnings_line.rb +272 -272
  273. data/lib/xero-ruby/models/payroll_au/pay_item.rb +260 -260
  274. data/lib/xero-ruby/models/payroll_au/pay_items.rb +222 -222
  275. data/lib/xero-ruby/models/payroll_au/pay_out_type.rb +36 -36
  276. data/lib/xero-ruby/models/payroll_au/pay_run.rb +381 -381
  277. data/lib/xero-ruby/models/payroll_au/pay_run_status.rb +36 -36
  278. data/lib/xero-ruby/models/payroll_au/pay_runs.rb +224 -224
  279. data/lib/xero-ruby/models/payroll_au/pay_template.rb +272 -272
  280. data/lib/xero-ruby/models/payroll_au/payment_frequency_type.rb +41 -41
  281. data/lib/xero-ruby/models/payroll_au/payroll_calendar.rb +294 -294
  282. data/lib/xero-ruby/models/payroll_au/payroll_calendars.rb +224 -224
  283. data/lib/xero-ruby/models/payroll_au/payslip.rb +418 -418
  284. data/lib/xero-ruby/models/payroll_au/payslip_lines.rb +308 -308
  285. data/lib/xero-ruby/models/payroll_au/payslip_object.rb +222 -222
  286. data/lib/xero-ruby/models/payroll_au/payslip_summary.rb +332 -332
  287. data/lib/xero-ruby/models/payroll_au/payslips.rb +224 -224
  288. data/lib/xero-ruby/models/payroll_au/rate_type.rb +37 -37
  289. data/lib/xero-ruby/models/payroll_au/reimbursement_line.rb +267 -267
  290. data/lib/xero-ruby/models/payroll_au/reimbursement_lines.rb +225 -225
  291. data/lib/xero-ruby/models/payroll_au/reimbursement_type.rb +277 -277
  292. data/lib/xero-ruby/models/payroll_au/residency_status.rb +37 -37
  293. data/lib/xero-ruby/models/payroll_au/senior_marital_status.rb +37 -37
  294. data/lib/xero-ruby/models/payroll_au/settings.rb +254 -254
  295. data/lib/xero-ruby/models/payroll_au/settings_object.rb +222 -222
  296. data/lib/xero-ruby/models/payroll_au/settings_tracking_categories.rb +233 -233
  297. data/lib/xero-ruby/models/payroll_au/settings_tracking_categories_employee_groups.rb +233 -233
  298. data/lib/xero-ruby/models/payroll_au/settings_tracking_categories_timesheet_categories.rb +233 -233
  299. data/lib/xero-ruby/models/payroll_au/state.rb +42 -42
  300. data/lib/xero-ruby/models/payroll_au/super_fund.rb +349 -349
  301. data/lib/xero-ruby/models/payroll_au/super_fund_product.rb +252 -252
  302. data/lib/xero-ruby/models/payroll_au/super_fund_products.rb +224 -224
  303. data/lib/xero-ruby/models/payroll_au/super_fund_type.rb +36 -36
  304. data/lib/xero-ruby/models/payroll_au/super_funds.rb +224 -224
  305. data/lib/xero-ruby/models/payroll_au/super_line.rb +292 -292
  306. data/lib/xero-ruby/models/payroll_au/super_membership.rb +252 -252
  307. data/lib/xero-ruby/models/payroll_au/superannuation_calculation_type.rb +37 -37
  308. data/lib/xero-ruby/models/payroll_au/superannuation_contribution_type.rb +38 -38
  309. data/lib/xero-ruby/models/payroll_au/superannuation_line.rb +302 -302
  310. data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +422 -422
  311. data/lib/xero-ruby/models/payroll_au/tax_line.rb +272 -272
  312. data/lib/xero-ruby/models/payroll_au/tax_scale_type.rb +40 -40
  313. data/lib/xero-ruby/models/payroll_au/tfn_exemption_type.rb +38 -38
  314. data/lib/xero-ruby/models/payroll_au/timesheet.rb +321 -321
  315. data/lib/xero-ruby/models/payroll_au/timesheet_line.rb +254 -254
  316. data/lib/xero-ruby/models/payroll_au/timesheet_object.rb +222 -222
  317. data/lib/xero-ruby/models/payroll_au/timesheet_status.rb +39 -39
  318. data/lib/xero-ruby/models/payroll_au/timesheets.rb +224 -224
  319. data/lib/xero-ruby/models/payroll_au/validation_error.rb +222 -222
  320. data/lib/xero-ruby/models/payroll_au/work_condition.rb +37 -37
  321. data/lib/xero-ruby/models/payroll_nz/account.rb +290 -290
  322. data/lib/xero-ruby/models/payroll_nz/accounts.rb +224 -224
  323. data/lib/xero-ruby/models/payroll_nz/address.rb +287 -287
  324. data/lib/xero-ruby/models/payroll_nz/bank_account.rb +343 -343
  325. data/lib/xero-ruby/models/payroll_nz/benefit.rb +383 -383
  326. data/lib/xero-ruby/models/payroll_nz/calendar_type.rb +41 -41
  327. data/lib/xero-ruby/models/payroll_nz/deduction.rb +325 -325
  328. data/lib/xero-ruby/models/payroll_nz/deduction_line.rb +262 -262
  329. data/lib/xero-ruby/models/payroll_nz/deduction_object.rb +242 -242
  330. data/lib/xero-ruby/models/payroll_nz/deductions.rb +244 -244
  331. data/lib/xero-ruby/models/payroll_nz/earnings_line.rb +312 -312
  332. data/lib/xero-ruby/models/payroll_nz/earnings_order.rb +269 -269
  333. data/lib/xero-ruby/models/payroll_nz/earnings_order_object.rb +242 -242
  334. data/lib/xero-ruby/models/payroll_nz/earnings_orders.rb +244 -244
  335. data/lib/xero-ruby/models/payroll_nz/earnings_rate.rb +401 -401
  336. data/lib/xero-ruby/models/payroll_nz/earnings_rate_object.rb +242 -242
  337. data/lib/xero-ruby/models/payroll_nz/earnings_rates.rb +244 -244
  338. data/lib/xero-ruby/models/payroll_nz/earnings_template.rb +272 -272
  339. data/lib/xero-ruby/models/payroll_nz/earnings_template_object.rb +242 -242
  340. data/lib/xero-ruby/models/payroll_nz/employee.rb +388 -388
  341. data/lib/xero-ruby/models/payroll_nz/employee_earnings_templates.rb +244 -244
  342. data/lib/xero-ruby/models/payroll_nz/employee_leave.rb +304 -304
  343. data/lib/xero-ruby/models/payroll_nz/employee_leave_balance.rb +252 -252
  344. data/lib/xero-ruby/models/payroll_nz/employee_leave_balances.rb +244 -244
  345. data/lib/xero-ruby/models/payroll_nz/employee_leave_object.rb +242 -242
  346. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +282 -282
  347. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup_object.rb +242 -242
  348. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +350 -350
  349. data/lib/xero-ruby/models/payroll_nz/employee_leave_type_object.rb +242 -242
  350. data/lib/xero-ruby/models/payroll_nz/employee_leave_types.rb +244 -244
  351. data/lib/xero-ruby/models/payroll_nz/employee_leaves.rb +244 -244
  352. data/lib/xero-ruby/models/payroll_nz/employee_object.rb +242 -242
  353. data/lib/xero-ruby/models/payroll_nz/employee_opening_balance.rb +252 -252
  354. data/lib/xero-ruby/models/payroll_nz/employee_opening_balances_object.rb +244 -244
  355. data/lib/xero-ruby/models/payroll_nz/employee_pay_template.rb +234 -234
  356. data/lib/xero-ruby/models/payroll_nz/employee_pay_template_object.rb +242 -242
  357. data/lib/xero-ruby/models/payroll_nz/employee_pay_templates.rb +242 -242
  358. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance.rb +294 -294
  359. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance_object.rb +242 -242
  360. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_summary.rb +336 -336
  361. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leaves_summaries.rb +244 -244
  362. data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leave.rb +433 -433
  363. data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leave_object.rb +242 -242
  364. data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leaves.rb +244 -244
  365. data/lib/xero-ruby/models/payroll_nz/employee_tax.rb +411 -411
  366. data/lib/xero-ruby/models/payroll_nz/employee_tax_object.rb +242 -242
  367. data/lib/xero-ruby/models/payroll_nz/employees.rb +244 -244
  368. data/lib/xero-ruby/models/payroll_nz/employment.rb +242 -242
  369. data/lib/xero-ruby/models/payroll_nz/employment_object.rb +242 -242
  370. data/lib/xero-ruby/models/payroll_nz/gross_earnings_history.rb +232 -232
  371. data/lib/xero-ruby/models/payroll_nz/invalid_field.rb +232 -232
  372. data/lib/xero-ruby/models/payroll_nz/leave_accrual_line.rb +232 -232
  373. data/lib/xero-ruby/models/payroll_nz/leave_earnings_line.rb +312 -312
  374. data/lib/xero-ruby/models/payroll_nz/leave_period.rb +288 -288
  375. data/lib/xero-ruby/models/payroll_nz/leave_periods.rb +244 -244
  376. data/lib/xero-ruby/models/payroll_nz/leave_type.rb +287 -287
  377. data/lib/xero-ruby/models/payroll_nz/leave_type_object.rb +242 -242
  378. data/lib/xero-ruby/models/payroll_nz/leave_types.rb +244 -244
  379. data/lib/xero-ruby/models/payroll_nz/pagination.rb +252 -252
  380. data/lib/xero-ruby/models/payroll_nz/pay_run.rb +385 -385
  381. data/lib/xero-ruby/models/payroll_nz/pay_run_calendar.rb +302 -302
  382. data/lib/xero-ruby/models/payroll_nz/pay_run_calendar_object.rb +242 -242
  383. data/lib/xero-ruby/models/payroll_nz/pay_run_calendars.rb +244 -244
  384. data/lib/xero-ruby/models/payroll_nz/pay_run_object.rb +242 -242
  385. data/lib/xero-ruby/models/payroll_nz/pay_runs.rb +244 -244
  386. data/lib/xero-ruby/models/payroll_nz/pay_slip.rb +571 -571
  387. data/lib/xero-ruby/models/payroll_nz/pay_slip_object.rb +242 -242
  388. data/lib/xero-ruby/models/payroll_nz/pay_slips.rb +244 -244
  389. data/lib/xero-ruby/models/payroll_nz/payment_line.rb +262 -262
  390. data/lib/xero-ruby/models/payroll_nz/payment_method.rb +271 -271
  391. data/lib/xero-ruby/models/payroll_nz/payment_method_object.rb +242 -242
  392. data/lib/xero-ruby/models/payroll_nz/problem.rb +275 -275
  393. data/lib/xero-ruby/models/payroll_nz/reimbursement.rb +378 -378
  394. data/lib/xero-ruby/models/payroll_nz/reimbursement_line.rb +262 -262
  395. data/lib/xero-ruby/models/payroll_nz/reimbursement_object.rb +242 -242
  396. data/lib/xero-ruby/models/payroll_nz/reimbursements.rb +244 -244
  397. data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +398 -398
  398. data/lib/xero-ruby/models/payroll_nz/salary_and_wage_object.rb +242 -242
  399. data/lib/xero-ruby/models/payroll_nz/salary_and_wages.rb +244 -244
  400. data/lib/xero-ruby/models/payroll_nz/settings.rb +242 -242
  401. data/lib/xero-ruby/models/payroll_nz/statutory_deduction.rb +262 -262
  402. data/lib/xero-ruby/models/payroll_nz/statutory_deduction_category.rb +45 -45
  403. data/lib/xero-ruby/models/payroll_nz/statutory_deduction_line.rb +252 -252
  404. data/lib/xero-ruby/models/payroll_nz/statutory_deduction_object.rb +242 -242
  405. data/lib/xero-ruby/models/payroll_nz/statutory_deductions.rb +244 -244
  406. data/lib/xero-ruby/models/payroll_nz/superannuation_line.rb +272 -272
  407. data/lib/xero-ruby/models/payroll_nz/superannuation_object.rb +242 -242
  408. data/lib/xero-ruby/models/payroll_nz/superannuations.rb +244 -244
  409. data/lib/xero-ruby/models/payroll_nz/tax_code.rb +53 -53
  410. data/lib/xero-ruby/models/payroll_nz/tax_line.rb +262 -262
  411. data/lib/xero-ruby/models/payroll_nz/tax_settings.rb +308 -308
  412. data/lib/xero-ruby/models/payroll_nz/timesheet.rb +362 -362
  413. data/lib/xero-ruby/models/payroll_nz/timesheet_earnings_line.rb +312 -312
  414. data/lib/xero-ruby/models/payroll_nz/timesheet_line.rb +277 -277
  415. data/lib/xero-ruby/models/payroll_nz/timesheet_line_object.rb +242 -242
  416. data/lib/xero-ruby/models/payroll_nz/timesheet_object.rb +242 -242
  417. data/lib/xero-ruby/models/payroll_nz/timesheets.rb +244 -244
  418. data/lib/xero-ruby/models/payroll_nz/tracking_categories.rb +242 -242
  419. data/lib/xero-ruby/models/payroll_nz/tracking_category.rb +232 -232
  420. data/lib/xero-ruby/models/payroll_uk/account.rb +293 -293
  421. data/lib/xero-ruby/models/payroll_uk/accounts.rb +224 -224
  422. data/lib/xero-ruby/models/payroll_uk/address.rb +277 -277
  423. data/lib/xero-ruby/models/payroll_uk/bank_account.rb +257 -257
  424. data/lib/xero-ruby/models/payroll_uk/benefit.rb +432 -432
  425. data/lib/xero-ruby/models/payroll_uk/benefit_line.rb +262 -262
  426. data/lib/xero-ruby/models/payroll_uk/benefit_object.rb +242 -242
  427. data/lib/xero-ruby/models/payroll_uk/benefits.rb +244 -244
  428. data/lib/xero-ruby/models/payroll_uk/court_order_line.rb +232 -232
  429. data/lib/xero-ruby/models/payroll_uk/deduction.rb +440 -440
  430. data/lib/xero-ruby/models/payroll_uk/deduction_line.rb +252 -252
  431. data/lib/xero-ruby/models/payroll_uk/deduction_object.rb +242 -242
  432. data/lib/xero-ruby/models/payroll_uk/deductions.rb +244 -244
  433. data/lib/xero-ruby/models/payroll_uk/earnings_line.rb +302 -302
  434. data/lib/xero-ruby/models/payroll_uk/earnings_order.rb +269 -269
  435. data/lib/xero-ruby/models/payroll_uk/earnings_order_object.rb +242 -242
  436. data/lib/xero-ruby/models/payroll_uk/earnings_orders.rb +244 -244
  437. data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +409 -409
  438. data/lib/xero-ruby/models/payroll_uk/earnings_rate_object.rb +242 -242
  439. data/lib/xero-ruby/models/payroll_uk/earnings_rates.rb +244 -244
  440. data/lib/xero-ruby/models/payroll_uk/earnings_template.rb +272 -272
  441. data/lib/xero-ruby/models/payroll_uk/earnings_template_object.rb +242 -242
  442. data/lib/xero-ruby/models/payroll_uk/employee.rb +408 -408
  443. data/lib/xero-ruby/models/payroll_uk/employee_leave.rb +304 -304
  444. data/lib/xero-ruby/models/payroll_uk/employee_leave_balance.rb +252 -252
  445. data/lib/xero-ruby/models/payroll_uk/employee_leave_balances.rb +244 -244
  446. data/lib/xero-ruby/models/payroll_uk/employee_leave_object.rb +242 -242
  447. data/lib/xero-ruby/models/payroll_uk/employee_leave_type.rb +320 -320
  448. data/lib/xero-ruby/models/payroll_uk/employee_leave_type_object.rb +242 -242
  449. data/lib/xero-ruby/models/payroll_uk/employee_leave_types.rb +244 -244
  450. data/lib/xero-ruby/models/payroll_uk/employee_leaves.rb +244 -244
  451. data/lib/xero-ruby/models/payroll_uk/employee_object.rb +242 -242
  452. data/lib/xero-ruby/models/payroll_uk/employee_opening_balances.rb +272 -272
  453. data/lib/xero-ruby/models/payroll_uk/employee_opening_balances_object.rb +242 -242
  454. data/lib/xero-ruby/models/payroll_uk/employee_pay_template.rb +234 -234
  455. data/lib/xero-ruby/models/payroll_uk/employee_pay_template_object.rb +242 -242
  456. data/lib/xero-ruby/models/payroll_uk/employee_pay_templates.rb +244 -244
  457. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance.rb +294 -294
  458. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance_object.rb +242 -242
  459. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_summary.rb +336 -336
  460. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leaves_summaries.rb +244 -244
  461. data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leave.rb +433 -433
  462. data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leave_object.rb +242 -242
  463. data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leaves.rb +244 -244
  464. data/lib/xero-ruby/models/payroll_uk/employee_tax.rb +322 -322
  465. data/lib/xero-ruby/models/payroll_uk/employee_tax_object.rb +242 -242
  466. data/lib/xero-ruby/models/payroll_uk/employees.rb +244 -244
  467. data/lib/xero-ruby/models/payroll_uk/employment.rb +299 -299
  468. data/lib/xero-ruby/models/payroll_uk/employment_object.rb +242 -242
  469. data/lib/xero-ruby/models/payroll_uk/invalid_field.rb +232 -232
  470. data/lib/xero-ruby/models/payroll_uk/leave_accrual_line.rb +232 -232
  471. data/lib/xero-ruby/models/payroll_uk/leave_earnings_line.rb +272 -272
  472. data/lib/xero-ruby/models/payroll_uk/leave_period.rb +288 -288
  473. data/lib/xero-ruby/models/payroll_uk/leave_periods.rb +244 -244
  474. data/lib/xero-ruby/models/payroll_uk/leave_type.rb +307 -307
  475. data/lib/xero-ruby/models/payroll_uk/leave_type_object.rb +242 -242
  476. data/lib/xero-ruby/models/payroll_uk/leave_types.rb +244 -244
  477. data/lib/xero-ruby/models/payroll_uk/pagination.rb +252 -252
  478. data/lib/xero-ruby/models/payroll_uk/pay_run.rb +403 -403
  479. data/lib/xero-ruby/models/payroll_uk/pay_run_calendar.rb +342 -342
  480. data/lib/xero-ruby/models/payroll_uk/pay_run_calendar_object.rb +242 -242
  481. data/lib/xero-ruby/models/payroll_uk/pay_run_calendars.rb +244 -244
  482. data/lib/xero-ruby/models/payroll_uk/pay_run_object.rb +242 -242
  483. data/lib/xero-ruby/models/payroll_uk/pay_runs.rb +244 -244
  484. data/lib/xero-ruby/models/payroll_uk/payment_line.rb +262 -262
  485. data/lib/xero-ruby/models/payroll_uk/payment_method.rb +276 -276
  486. data/lib/xero-ruby/models/payroll_uk/payment_method_object.rb +242 -242
  487. data/lib/xero-ruby/models/payroll_uk/payslip.rb +551 -551
  488. data/lib/xero-ruby/models/payroll_uk/payslip_object.rb +242 -242
  489. data/lib/xero-ruby/models/payroll_uk/payslips.rb +244 -244
  490. data/lib/xero-ruby/models/payroll_uk/problem.rb +275 -275
  491. data/lib/xero-ruby/models/payroll_uk/reimbursement.rb +262 -262
  492. data/lib/xero-ruby/models/payroll_uk/reimbursement_line.rb +242 -242
  493. data/lib/xero-ruby/models/payroll_uk/reimbursement_object.rb +242 -242
  494. data/lib/xero-ruby/models/payroll_uk/reimbursements.rb +244 -244
  495. data/lib/xero-ruby/models/payroll_uk/salary_and_wage.rb +383 -383
  496. data/lib/xero-ruby/models/payroll_uk/salary_and_wage_object.rb +242 -242
  497. data/lib/xero-ruby/models/payroll_uk/salary_and_wages.rb +244 -244
  498. data/lib/xero-ruby/models/payroll_uk/settings.rb +242 -242
  499. data/lib/xero-ruby/models/payroll_uk/statutory_deduction.rb +262 -262
  500. data/lib/xero-ruby/models/payroll_uk/statutory_deduction_category.rb +48 -48
  501. data/lib/xero-ruby/models/payroll_uk/tax_line.rb +272 -272
  502. data/lib/xero-ruby/models/payroll_uk/timesheet.rb +361 -361
  503. data/lib/xero-ruby/models/payroll_uk/timesheet_earnings_line.rb +272 -272
  504. data/lib/xero-ruby/models/payroll_uk/timesheet_line.rb +277 -277
  505. data/lib/xero-ruby/models/payroll_uk/timesheet_line_object.rb +242 -242
  506. data/lib/xero-ruby/models/payroll_uk/timesheet_object.rb +242 -242
  507. data/lib/xero-ruby/models/payroll_uk/timesheets.rb +244 -244
  508. data/lib/xero-ruby/models/payroll_uk/tracking_categories.rb +242 -242
  509. data/lib/xero-ruby/models/payroll_uk/tracking_category.rb +232 -232
  510. data/lib/xero-ruby/models/projects/amount.rb +232 -232
  511. data/lib/xero-ruby/models/projects/charge_type.rb +37 -37
  512. data/lib/xero-ruby/models/projects/currency_code.rb +198 -198
  513. data/lib/xero-ruby/models/projects/error.rb +232 -232
  514. data/lib/xero-ruby/models/projects/pagination.rb +252 -252
  515. data/lib/xero-ruby/models/projects/project.rb +437 -437
  516. data/lib/xero-ruby/models/projects/project_create_or_update.rb +257 -257
  517. data/lib/xero-ruby/models/projects/project_patch.rb +227 -227
  518. data/lib/xero-ruby/models/projects/project_status.rb +36 -36
  519. data/lib/xero-ruby/models/projects/project_user.rb +242 -242
  520. data/lib/xero-ruby/models/projects/project_users.rb +234 -234
  521. data/lib/xero-ruby/models/projects/projects.rb +234 -234
  522. data/lib/xero-ruby/models/projects/task.rb +399 -399
  523. data/lib/xero-ruby/models/projects/task_create_or_update.rb +267 -267
  524. data/lib/xero-ruby/models/projects/tasks.rb +234 -234
  525. data/lib/xero-ruby/models/projects/time_entries.rb +234 -234
  526. data/lib/xero-ruby/models/projects/time_entry.rb +339 -339
  527. data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +282 -282
  528. data/lib/xero-ruby/string_serialization.rb +52 -52
  529. data/lib/xero-ruby/version.rb +15 -15
  530. data/lib/xero-ruby/where.rb +67 -67
  531. data/lib/xero-ruby.rb +556 -556
  532. data/spec/accounting/api/accounting_api_spec.rb +2873 -2873
  533. data/spec/accounting/models/account_spec.rb +171 -171
  534. data/spec/accounting/models/account_type_spec.rb +35 -35
  535. data/spec/accounting/models/accounts_payable_spec.rb +47 -47
  536. data/spec/accounting/models/accounts_receivable_spec.rb +47 -47
  537. data/spec/accounting/models/accounts_spec.rb +41 -41
  538. data/spec/accounting/models/address_spec.rb +99 -99
  539. data/spec/accounting/models/allocation_spec.rb +53 -53
  540. data/spec/accounting/models/allocations_spec.rb +41 -41
  541. data/spec/accounting/models/attachment_spec.rb +71 -71
  542. data/spec/accounting/models/attachments_spec.rb +41 -41
  543. data/spec/accounting/models/balances_spec.rb +47 -47
  544. data/spec/accounting/models/bank_transaction_spec.rb +175 -175
  545. data/spec/accounting/models/bank_transactions_spec.rb +41 -41
  546. data/spec/accounting/models/bank_transfer_spec.rb +101 -101
  547. data/spec/accounting/models/bank_transfers_spec.rb +41 -41
  548. data/spec/accounting/models/batch_payment_details_spec.rb +65 -65
  549. data/spec/accounting/models/batch_payment_spec.rb +139 -139
  550. data/spec/accounting/models/batch_payments_spec.rb +41 -41
  551. data/spec/accounting/models/bill_spec.rb +47 -47
  552. data/spec/accounting/models/branding_theme_spec.rb +75 -75
  553. data/spec/accounting/models/branding_themes_spec.rb +41 -41
  554. data/spec/accounting/models/cis_org_setting_spec.rb +53 -53
  555. data/spec/accounting/models/cis_setting_spec.rb +47 -47
  556. data/spec/accounting/models/cis_settings_spec.rb +41 -41
  557. data/spec/accounting/models/contact_group_spec.rb +63 -63
  558. data/spec/accounting/models/contact_groups_spec.rb +41 -41
  559. data/spec/accounting/models/contact_person_spec.rb +59 -59
  560. data/spec/accounting/models/contact_spec.rb +273 -273
  561. data/spec/accounting/models/contacts_spec.rb +41 -41
  562. data/spec/accounting/models/country_code_spec.rb +35 -35
  563. data/spec/accounting/models/credit_note_spec.rb +199 -199
  564. data/spec/accounting/models/credit_notes_spec.rb +41 -41
  565. data/spec/accounting/models/currencies_spec.rb +41 -41
  566. data/spec/accounting/models/currency_code_spec.rb +35 -35
  567. data/spec/accounting/models/currency_spec.rb +47 -47
  568. data/spec/accounting/models/element_spec.rb +83 -83
  569. data/spec/accounting/models/employee_spec.rb +87 -87
  570. data/spec/accounting/models/employees_spec.rb +41 -41
  571. data/spec/accounting/models/error_spec.rb +59 -59
  572. data/spec/accounting/models/expense_claim_spec.rb +111 -111
  573. data/spec/accounting/models/expense_claims_spec.rb +41 -41
  574. data/spec/accounting/models/external_link_spec.rb +57 -57
  575. data/spec/accounting/models/history_record_spec.rb +59 -59
  576. data/spec/accounting/models/history_records_spec.rb +41 -41
  577. data/spec/accounting/models/invoice_reminder_spec.rb +41 -41
  578. data/spec/accounting/models/invoice_reminders_spec.rb +41 -41
  579. data/spec/accounting/models/invoice_spec.rb +271 -271
  580. data/spec/accounting/models/invoices_spec.rb +41 -41
  581. data/spec/accounting/models/item_spec.rb +131 -131
  582. data/spec/accounting/models/items_spec.rb +41 -41
  583. data/spec/accounting/models/journal_line_spec.rb +107 -107
  584. data/spec/accounting/models/journal_spec.rb +87 -87
  585. data/spec/accounting/models/journals_spec.rb +41 -41
  586. data/spec/accounting/models/line_amount_types_spec.rb +35 -35
  587. data/spec/accounting/models/line_item_spec.rb +113 -113
  588. data/spec/accounting/models/line_item_tracking_spec.rb +59 -59
  589. data/spec/accounting/models/linked_transaction_spec.rb +113 -113
  590. data/spec/accounting/models/linked_transactions_spec.rb +41 -41
  591. data/spec/accounting/models/manual_journal_line_spec.rb +77 -77
  592. data/spec/accounting/models/manual_journal_spec.rb +123 -123
  593. data/spec/accounting/models/manual_journals_spec.rb +41 -41
  594. data/spec/accounting/models/online_invoice_spec.rb +41 -41
  595. data/spec/accounting/models/online_invoices_spec.rb +41 -41
  596. data/spec/accounting/models/organisation_spec.rb +255 -255
  597. data/spec/accounting/models/organisations_spec.rb +41 -41
  598. data/spec/accounting/models/overpayment_spec.rb +157 -157
  599. data/spec/accounting/models/overpayments_spec.rb +41 -41
  600. data/spec/accounting/models/payment_delete_spec.rb +41 -41
  601. data/spec/accounting/models/payment_service_spec.rb +71 -71
  602. data/spec/accounting/models/payment_services_spec.rb +41 -41
  603. data/spec/accounting/models/payment_spec.rb +187 -187
  604. data/spec/accounting/models/payment_term_spec.rb +47 -47
  605. data/spec/accounting/models/payment_term_type_spec.rb +35 -35
  606. data/spec/accounting/models/payments_spec.rb +41 -41
  607. data/spec/accounting/models/phone_spec.rb +63 -63
  608. data/spec/accounting/models/prepayment_spec.rb +157 -157
  609. data/spec/accounting/models/prepayments_spec.rb +41 -41
  610. data/spec/accounting/models/purchase_order_spec.rb +207 -207
  611. data/spec/accounting/models/purchase_orders_spec.rb +41 -41
  612. data/spec/accounting/models/purchase_spec.rb +59 -59
  613. data/spec/accounting/models/quote_line_amount_types_spec.rb +35 -35
  614. data/spec/accounting/models/quote_spec.rb +167 -167
  615. data/spec/accounting/models/quote_status_codes_spec.rb +35 -35
  616. data/spec/accounting/models/quotes_spec.rb +41 -41
  617. data/spec/accounting/models/receipt_spec.rb +147 -147
  618. data/spec/accounting/models/receipts_spec.rb +41 -41
  619. data/spec/accounting/models/repeating_invoice_spec.rb +139 -139
  620. data/spec/accounting/models/repeating_invoices_spec.rb +41 -41
  621. data/spec/accounting/models/report_attribute_spec.rb +47 -47
  622. data/spec/accounting/models/report_cell_spec.rb +47 -47
  623. data/spec/accounting/models/report_fields_spec.rb +53 -53
  624. data/spec/accounting/models/report_row_spec.rb +53 -53
  625. data/spec/accounting/models/report_rows_spec.rb +59 -59
  626. data/spec/accounting/models/report_spec.rb +81 -81
  627. data/spec/accounting/models/report_with_row_spec.rb +89 -89
  628. data/spec/accounting/models/report_with_rows_spec.rb +41 -41
  629. data/spec/accounting/models/reports_spec.rb +41 -41
  630. data/spec/accounting/models/request_empty_spec.rb +41 -41
  631. data/spec/accounting/models/row_type_spec.rb +35 -35
  632. data/spec/accounting/models/sales_tracking_category_spec.rb +47 -47
  633. data/spec/accounting/models/schedule_spec.rb +85 -85
  634. data/spec/accounting/models/tax_component_spec.rb +59 -59
  635. data/spec/accounting/models/tax_rate_spec.rb +115 -115
  636. data/spec/accounting/models/tax_rates_spec.rb +41 -41
  637. data/spec/accounting/models/tax_type_spec.rb +35 -35
  638. data/spec/accounting/models/ten_nintey_nine_contact_spec.rb +167 -167
  639. data/spec/accounting/models/time_zone_spec.rb +35 -35
  640. data/spec/accounting/models/tracking_categories_spec.rb +41 -41
  641. data/spec/accounting/models/tracking_category_spec.rb +75 -75
  642. data/spec/accounting/models/tracking_option_spec.rb +63 -63
  643. data/spec/accounting/models/tracking_options_spec.rb +41 -41
  644. data/spec/accounting/models/user_spec.rb +81 -81
  645. data/spec/accounting/models/users_spec.rb +41 -41
  646. data/spec/accounting/models/validation_error_spec.rb +41 -41
  647. data/spec/api_client_spec.rb +556 -556
  648. data/spec/api_error_spec.rb +45 -45
  649. data/spec/app_store/api/app_store_api_spec.rb +45 -45
  650. data/spec/app_store/models/plan_spec.rb +62 -62
  651. data/spec/app_store/models/price_spec.rb +52 -52
  652. data/spec/app_store/models/problem_details_spec.rb +70 -70
  653. data/spec/app_store/models/product_spec.rb +56 -56
  654. data/spec/app_store/models/subscription_item_spec.rb +70 -70
  655. data/spec/app_store/models/subscription_spec.rb +82 -82
  656. data/spec/assets/api/asset_api_spec.rb +116 -116
  657. data/spec/assets/models/asset_spec.rb +125 -125
  658. data/spec/assets/models/asset_status_query_param_spec.rb +35 -35
  659. data/spec/assets/models/asset_status_spec.rb +35 -35
  660. data/spec/assets/models/asset_type_spec.rb +77 -77
  661. data/spec/assets/models/assets_spec.rb +47 -47
  662. data/spec/assets/models/book_depreciation_detail_spec.rb +77 -77
  663. data/spec/assets/models/book_depreciation_setting_spec.rb +95 -95
  664. data/spec/assets/models/error_spec.rb +65 -65
  665. data/spec/assets/models/field_validation_errors_element_spec.rb +71 -71
  666. data/spec/assets/models/pagination_spec.rb +59 -59
  667. data/spec/assets/models/resource_validation_errors_element_spec.rb +65 -65
  668. data/spec/assets/models/setting_spec.rb +83 -83
  669. data/spec/configuration_spec.rb +37 -37
  670. data/spec/files/api/files_api_spec.rb +249 -249
  671. data/spec/files/models/association_spec.rb +59 -59
  672. data/spec/files/models/file_object_spec.rb +83 -83
  673. data/spec/files/models/files_spec.rb +59 -59
  674. data/spec/files/models/folder_spec.rb +65 -65
  675. data/spec/files/models/folders_spec.rb +41 -41
  676. data/spec/files/models/inline_object_spec.rb +59 -59
  677. data/spec/files/models/object_group_spec.rb +35 -35
  678. data/spec/files/models/object_type_spec.rb +35 -35
  679. data/spec/files/models/user_spec.rb +81 -81
  680. data/spec/finance/api/finance_api_spec.rb +156 -156
  681. data/spec/finance/models/account_usage_response_spec.rb +58 -58
  682. data/spec/finance/models/account_usage_spec.rb +112 -112
  683. data/spec/finance/models/balance_sheet_account_detail_spec.rb +64 -64
  684. data/spec/finance/models/balance_sheet_account_group_spec.rb +46 -46
  685. data/spec/finance/models/balance_sheet_account_type_spec.rb +52 -52
  686. data/spec/finance/models/balance_sheet_response_spec.rb +58 -58
  687. data/spec/finance/models/bank_statement_response_spec.rb +46 -46
  688. data/spec/finance/models/cash_account_response_spec.rb +64 -64
  689. data/spec/finance/models/cash_balance_spec.rb +52 -52
  690. data/spec/finance/models/cash_validation_response_spec.rb +64 -64
  691. data/spec/finance/models/cashflow_account_spec.rb +76 -76
  692. data/spec/finance/models/cashflow_activity_spec.rb +52 -52
  693. data/spec/finance/models/cashflow_response_spec.rb +58 -58
  694. data/spec/finance/models/cashflow_type_spec.rb +52 -52
  695. data/spec/finance/models/current_statement_response_spec.rb +70 -70
  696. data/spec/finance/models/data_source_response_spec.rb +124 -124
  697. data/spec/finance/models/history_record_response_spec.rb +64 -64
  698. data/spec/finance/models/lock_history_model_spec.rb +52 -52
  699. data/spec/finance/models/lock_history_response_spec.rb +52 -52
  700. data/spec/finance/models/pnl_account_class_spec.rb +46 -46
  701. data/spec/finance/models/pnl_account_spec.rb +70 -70
  702. data/spec/finance/models/pnl_account_type_spec.rb +52 -52
  703. data/spec/finance/models/practice_response_spec.rb +64 -64
  704. data/spec/finance/models/problem_spec.rb +58 -58
  705. data/spec/finance/models/problem_type_spec.rb +34 -34
  706. data/spec/finance/models/profit_and_loss_response_spec.rb +64 -64
  707. data/spec/finance/models/report_history_model_spec.rb +52 -52
  708. data/spec/finance/models/report_history_response_spec.rb +52 -52
  709. data/spec/finance/models/statement_balance_response_spec.rb +46 -46
  710. data/spec/finance/models/statement_lines_response_spec.rb +136 -136
  711. data/spec/finance/models/trial_balance_account_spec.rb +94 -94
  712. data/spec/finance/models/trial_balance_entry_spec.rb +46 -46
  713. data/spec/finance/models/trial_balance_movement_spec.rb +58 -58
  714. data/spec/finance/models/trial_balance_response_spec.rb +52 -52
  715. data/spec/finance/models/user_activities_response_spec.rb +52 -52
  716. data/spec/finance/models/user_response_spec.rb +106 -106
  717. data/spec/helper_methods_spec.rb +110 -110
  718. data/spec/payroll_au/api/payroll_au_api_spec.rb +415 -415
  719. data/spec/payroll_au/models/account_spec.rb +59 -59
  720. data/spec/payroll_au/models/account_type_spec.rb +35 -35
  721. data/spec/payroll_au/models/allowance_type_spec.rb +35 -35
  722. data/spec/payroll_au/models/api_exception_spec.rb +53 -53
  723. data/spec/payroll_au/models/bank_account_spec.rb +71 -71
  724. data/spec/payroll_au/models/calendar_type_spec.rb +35 -35
  725. data/spec/payroll_au/models/deduction_line_spec.rb +65 -65
  726. data/spec/payroll_au/models/deduction_type_calculation_type_spec.rb +35 -35
  727. data/spec/payroll_au/models/deduction_type_spec.rb +93 -93
  728. data/spec/payroll_au/models/earnings_line_spec.rb +89 -89
  729. data/spec/payroll_au/models/earnings_rate_calculation_type_spec.rb +35 -35
  730. data/spec/payroll_au/models/earnings_rate_spec.rb +137 -137
  731. data/spec/payroll_au/models/earnings_type_spec.rb +35 -35
  732. data/spec/payroll_au/models/employee_spec.rb +225 -225
  733. data/spec/payroll_au/models/employee_status_spec.rb +35 -35
  734. data/spec/payroll_au/models/employees_spec.rb +41 -41
  735. data/spec/payroll_au/models/employment_basis_spec.rb +35 -35
  736. data/spec/payroll_au/models/employment_termination_payment_type_spec.rb +35 -35
  737. data/spec/payroll_au/models/entitlement_final_pay_payout_type_spec.rb +35 -35
  738. data/spec/payroll_au/models/home_address_spec.rb +71 -71
  739. data/spec/payroll_au/models/leave_accrual_line_spec.rb +53 -53
  740. data/spec/payroll_au/models/leave_application_spec.rb +95 -95
  741. data/spec/payroll_au/models/leave_applications_spec.rb +41 -41
  742. data/spec/payroll_au/models/leave_balance_spec.rb +59 -59
  743. data/spec/payroll_au/models/leave_earnings_line_spec.rb +53 -53
  744. data/spec/payroll_au/models/leave_line_calculation_type_spec.rb +35 -35
  745. data/spec/payroll_au/models/leave_line_spec.rb +83 -83
  746. data/spec/payroll_au/models/leave_lines_spec.rb +41 -41
  747. data/spec/payroll_au/models/leave_period_spec.rb +59 -59
  748. data/spec/payroll_au/models/leave_period_status_spec.rb +35 -35
  749. data/spec/payroll_au/models/leave_type_contribution_type_spec.rb +35 -35
  750. data/spec/payroll_au/models/leave_type_spec.rb +89 -89
  751. data/spec/payroll_au/models/manual_tax_type_spec.rb +35 -35
  752. data/spec/payroll_au/models/opening_balances_spec.rb +77 -77
  753. data/spec/payroll_au/models/pay_item_spec.rb +59 -59
  754. data/spec/payroll_au/models/pay_items_spec.rb +41 -41
  755. data/spec/payroll_au/models/pay_run_spec.rb +131 -131
  756. data/spec/payroll_au/models/pay_run_status_spec.rb +35 -35
  757. data/spec/payroll_au/models/pay_runs_spec.rb +41 -41
  758. data/spec/payroll_au/models/pay_template_spec.rb +65 -65
  759. data/spec/payroll_au/models/payment_frequency_type_spec.rb +35 -35
  760. data/spec/payroll_au/models/payroll_calendar_spec.rb +77 -77
  761. data/spec/payroll_au/models/payroll_calendars_spec.rb +41 -41
  762. data/spec/payroll_au/models/payslip_lines_spec.rb +83 -83
  763. data/spec/payroll_au/models/payslip_object_spec.rb +41 -41
  764. data/spec/payroll_au/models/payslip_spec.rb +149 -149
  765. data/spec/payroll_au/models/payslip_summary_spec.rb +107 -107
  766. data/spec/payroll_au/models/payslips_spec.rb +41 -41
  767. data/spec/payroll_au/models/rate_type_spec.rb +35 -35
  768. data/spec/payroll_au/models/reimbursement_line_spec.rb +59 -59
  769. data/spec/payroll_au/models/reimbursement_lines_spec.rb +41 -41
  770. data/spec/payroll_au/models/reimbursement_type_spec.rb +65 -65
  771. data/spec/payroll_au/models/residency_status_spec.rb +35 -35
  772. data/spec/payroll_au/models/settings_object_spec.rb +41 -41
  773. data/spec/payroll_au/models/settings_spec.rb +53 -53
  774. data/spec/payroll_au/models/settings_tracking_categories_employee_groups_spec.rb +47 -47
  775. data/spec/payroll_au/models/settings_tracking_categories_spec.rb +47 -47
  776. data/spec/payroll_au/models/settings_tracking_categories_timesheet_categories_spec.rb +47 -47
  777. data/spec/payroll_au/models/state_spec.rb +35 -35
  778. data/spec/payroll_au/models/super_fund_product_spec.rb +59 -59
  779. data/spec/payroll_au/models/super_fund_products_spec.rb +41 -41
  780. data/spec/payroll_au/models/super_fund_spec.rb +113 -113
  781. data/spec/payroll_au/models/super_fund_type_spec.rb +35 -35
  782. data/spec/payroll_au/models/super_funds_spec.rb +41 -41
  783. data/spec/payroll_au/models/super_line_spec.rb +83 -83
  784. data/spec/payroll_au/models/super_membership_spec.rb +53 -53
  785. data/spec/payroll_au/models/superannuation_calculation_type_spec.rb +35 -35
  786. data/spec/payroll_au/models/superannuation_contribution_type_spec.rb +35 -35
  787. data/spec/payroll_au/models/superannuation_line_spec.rb +89 -89
  788. data/spec/payroll_au/models/tax_declaration_spec.rb +131 -131
  789. data/spec/payroll_au/models/tax_line_spec.rb +71 -71
  790. data/spec/payroll_au/models/tfn_exemption_type_spec.rb +35 -35
  791. data/spec/payroll_au/models/timesheet_line_spec.rb +59 -59
  792. data/spec/payroll_au/models/timesheet_object_spec.rb +41 -41
  793. data/spec/payroll_au/models/timesheet_spec.rb +89 -89
  794. data/spec/payroll_au/models/timesheet_status_spec.rb +35 -35
  795. data/spec/payroll_au/models/timesheets_spec.rb +41 -41
  796. data/spec/payroll_au/models/validation_error_spec.rb +41 -41
  797. data/spec/payroll_nz/api/payroll_nz_api_spec.rb +886 -886
  798. data/spec/payroll_nz/models/account_spec.rb +63 -63
  799. data/spec/payroll_nz/models/accounts_spec.rb +41 -41
  800. data/spec/payroll_nz/models/address_spec.rb +71 -71
  801. data/spec/payroll_nz/models/bank_account_spec.rb +87 -87
  802. data/spec/payroll_nz/models/benefit_spec.rb +103 -103
  803. data/spec/payroll_nz/models/deduction_line_spec.rb +65 -65
  804. data/spec/payroll_nz/models/deduction_object_spec.rb +53 -53
  805. data/spec/payroll_nz/models/deduction_spec.rb +75 -75
  806. data/spec/payroll_nz/models/deductions_spec.rb +53 -53
  807. data/spec/payroll_nz/models/earnings_line_spec.rb +95 -95
  808. data/spec/payroll_nz/models/earnings_order_object_spec.rb +53 -53
  809. data/spec/payroll_nz/models/earnings_order_spec.rb +65 -65
  810. data/spec/payroll_nz/models/earnings_orders_spec.rb +53 -53
  811. data/spec/payroll_nz/models/earnings_rate_object_spec.rb +53 -53
  812. data/spec/payroll_nz/models/earnings_rate_spec.rb +103 -103
  813. data/spec/payroll_nz/models/earnings_rates_spec.rb +53 -53
  814. data/spec/payroll_nz/models/earnings_template_object_spec.rb +53 -53
  815. data/spec/payroll_nz/models/earnings_template_spec.rb +71 -71
  816. data/spec/payroll_nz/models/employee_earnings_templates_spec.rb +53 -53
  817. data/spec/payroll_nz/models/employee_leave_balance_spec.rb +59 -59
  818. data/spec/payroll_nz/models/employee_leave_balances_spec.rb +53 -53
  819. data/spec/payroll_nz/models/employee_leave_object_spec.rb +53 -53
  820. data/spec/payroll_nz/models/employee_leave_setup_object_spec.rb +53 -53
  821. data/spec/payroll_nz/models/employee_leave_setup_spec.rb +77 -77
  822. data/spec/payroll_nz/models/employee_leave_spec.rb +77 -77
  823. data/spec/payroll_nz/models/employee_leave_type_object_spec.rb +53 -53
  824. data/spec/payroll_nz/models/employee_leave_type_spec.rb +99 -99
  825. data/spec/payroll_nz/models/employee_leave_types_spec.rb +53 -53
  826. data/spec/payroll_nz/models/employee_leaves_spec.rb +53 -53
  827. data/spec/payroll_nz/models/employee_object_spec.rb +53 -53
  828. data/spec/payroll_nz/models/employee_opening_balance_spec.rb +59 -59
  829. data/spec/payroll_nz/models/employee_opening_balances_object_spec.rb +53 -53
  830. data/spec/payroll_nz/models/employee_pay_template_object_spec.rb +53 -53
  831. data/spec/payroll_nz/models/employee_pay_template_spec.rb +47 -47
  832. data/spec/payroll_nz/models/employee_pay_templates_spec.rb +53 -53
  833. data/spec/payroll_nz/models/employee_spec.rb +123 -123
  834. data/spec/payroll_nz/models/employee_statutory_leave_balance_object_spec.rb +53 -53
  835. data/spec/payroll_nz/models/employee_statutory_leave_balance_spec.rb +61 -61
  836. data/spec/payroll_nz/models/employee_statutory_leave_summary_spec.rb +85 -85
  837. data/spec/payroll_nz/models/employee_statutory_leaves_summaries_spec.rb +53 -53
  838. data/spec/payroll_nz/models/employee_statutory_sick_leave_object_spec.rb +53 -53
  839. data/spec/payroll_nz/models/employee_statutory_sick_leave_spec.rb +135 -135
  840. data/spec/payroll_nz/models/employee_statutory_sick_leaves_spec.rb +53 -53
  841. data/spec/payroll_nz/models/employee_tax_object_spec.rb +53 -53
  842. data/spec/payroll_nz/models/employee_tax_spec.rb +135 -135
  843. data/spec/payroll_nz/models/employees_spec.rb +53 -53
  844. data/spec/payroll_nz/models/employment_object_spec.rb +53 -53
  845. data/spec/payroll_nz/models/employment_spec.rb +53 -53
  846. data/spec/payroll_nz/models/gross_earnings_history_spec.rb +47 -47
  847. data/spec/payroll_nz/models/invalid_field_spec.rb +47 -47
  848. data/spec/payroll_nz/models/leave_accrual_line_spec.rb +47 -47
  849. data/spec/payroll_nz/models/leave_earnings_line_spec.rb +95 -95
  850. data/spec/payroll_nz/models/leave_period_spec.rb +63 -63
  851. data/spec/payroll_nz/models/leave_periods_spec.rb +53 -53
  852. data/spec/payroll_nz/models/leave_type_object_spec.rb +53 -53
  853. data/spec/payroll_nz/models/leave_type_spec.rb +71 -71
  854. data/spec/payroll_nz/models/leave_types_spec.rb +53 -53
  855. data/spec/payroll_nz/models/pagination_spec.rb +59 -59
  856. data/spec/payroll_nz/models/pay_run_calendar_object_spec.rb +53 -53
  857. data/spec/payroll_nz/models/pay_run_calendar_spec.rb +81 -81
  858. data/spec/payroll_nz/models/pay_run_calendars_spec.rb +53 -53
  859. data/spec/payroll_nz/models/pay_run_object_spec.rb +53 -53
  860. data/spec/payroll_nz/models/pay_run_spec.rb +119 -119
  861. data/spec/payroll_nz/models/pay_runs_spec.rb +53 -53
  862. data/spec/payroll_nz/models/pay_slip_object_spec.rb +53 -53
  863. data/spec/payroll_nz/models/pay_slip_spec.rb +219 -219
  864. data/spec/payroll_nz/models/pay_slips_spec.rb +53 -53
  865. data/spec/payroll_nz/models/payment_line_spec.rb +65 -65
  866. data/spec/payroll_nz/models/payment_method_object_spec.rb +53 -53
  867. data/spec/payroll_nz/models/payment_method_spec.rb +51 -51
  868. data/spec/payroll_nz/models/problem_spec.rb +71 -71
  869. data/spec/payroll_nz/models/reimbursement_line_spec.rb +65 -65
  870. data/spec/payroll_nz/models/reimbursement_object_spec.rb +53 -53
  871. data/spec/payroll_nz/models/reimbursement_spec.rb +101 -101
  872. data/spec/payroll_nz/models/reimbursements_spec.rb +53 -53
  873. data/spec/payroll_nz/models/salary_and_wage_object_spec.rb +53 -53
  874. data/spec/payroll_nz/models/salary_and_wage_spec.rb +103 -103
  875. data/spec/payroll_nz/models/salary_and_wages_spec.rb +53 -53
  876. data/spec/payroll_nz/models/settings_spec.rb +53 -53
  877. data/spec/payroll_nz/models/statutory_deduction_category_spec.rb +35 -35
  878. data/spec/payroll_nz/models/statutory_deduction_line_spec.rb +59 -59
  879. data/spec/payroll_nz/models/statutory_deduction_object_spec.rb +53 -53
  880. data/spec/payroll_nz/models/statutory_deduction_spec.rb +65 -65
  881. data/spec/payroll_nz/models/statutory_deductions_spec.rb +53 -53
  882. data/spec/payroll_nz/models/superannuation_line_spec.rb +71 -71
  883. data/spec/payroll_nz/models/superannuation_object_spec.rb +53 -53
  884. data/spec/payroll_nz/models/superannuations_spec.rb +53 -53
  885. data/spec/payroll_nz/models/tax_code_spec.rb +35 -35
  886. data/spec/payroll_nz/models/tax_line_spec.rb +65 -65
  887. data/spec/payroll_nz/models/tax_settings_spec.rb +75 -75
  888. data/spec/payroll_nz/models/timesheet_earnings_line_spec.rb +95 -95
  889. data/spec/payroll_nz/models/timesheet_line_object_spec.rb +53 -53
  890. data/spec/payroll_nz/models/timesheet_line_spec.rb +65 -65
  891. data/spec/payroll_nz/models/timesheet_object_spec.rb +53 -53
  892. data/spec/payroll_nz/models/timesheet_spec.rb +93 -93
  893. data/spec/payroll_nz/models/timesheets_spec.rb +53 -53
  894. data/spec/payroll_nz/models/tracking_categories_spec.rb +53 -53
  895. data/spec/payroll_nz/models/tracking_category_spec.rb +47 -47
  896. data/spec/payroll_uk/api/payroll_uk_api_spec.rb +912 -912
  897. data/spec/payroll_uk/models/account_spec.rb +63 -63
  898. data/spec/payroll_uk/models/accounts_spec.rb +41 -41
  899. data/spec/payroll_uk/models/address_spec.rb +65 -65
  900. data/spec/payroll_uk/models/bank_account_spec.rb +53 -53
  901. data/spec/payroll_uk/models/benefit_line_spec.rb +65 -65
  902. data/spec/payroll_uk/models/benefit_object_spec.rb +53 -53
  903. data/spec/payroll_uk/models/benefit_spec.rb +127 -127
  904. data/spec/payroll_uk/models/benefits_spec.rb +53 -53
  905. data/spec/payroll_uk/models/court_order_line_spec.rb +47 -47
  906. data/spec/payroll_uk/models/deduction_line_spec.rb +59 -59
  907. data/spec/payroll_uk/models/deduction_object_spec.rb +53 -53
  908. data/spec/payroll_uk/models/deduction_spec.rb +139 -139
  909. data/spec/payroll_uk/models/deductions_spec.rb +53 -53
  910. data/spec/payroll_uk/models/earnings_line_spec.rb +89 -89
  911. data/spec/payroll_uk/models/earnings_order_object_spec.rb +53 -53
  912. data/spec/payroll_uk/models/earnings_order_spec.rb +65 -65
  913. data/spec/payroll_uk/models/earnings_orders_spec.rb +53 -53
  914. data/spec/payroll_uk/models/earnings_rate_object_spec.rb +53 -53
  915. data/spec/payroll_uk/models/earnings_rate_spec.rb +103 -103
  916. data/spec/payroll_uk/models/earnings_rates_spec.rb +53 -53
  917. data/spec/payroll_uk/models/earnings_template_object_spec.rb +53 -53
  918. data/spec/payroll_uk/models/earnings_template_spec.rb +71 -71
  919. data/spec/payroll_uk/models/employee_leave_balance_spec.rb +59 -59
  920. data/spec/payroll_uk/models/employee_leave_balances_spec.rb +53 -53
  921. data/spec/payroll_uk/models/employee_leave_object_spec.rb +53 -53
  922. data/spec/payroll_uk/models/employee_leave_spec.rb +77 -77
  923. data/spec/payroll_uk/models/employee_leave_type_object_spec.rb +53 -53
  924. data/spec/payroll_uk/models/employee_leave_type_spec.rb +75 -75
  925. data/spec/payroll_uk/models/employee_leave_types_spec.rb +53 -53
  926. data/spec/payroll_uk/models/employee_leaves_spec.rb +53 -53
  927. data/spec/payroll_uk/models/employee_object_spec.rb +53 -53
  928. data/spec/payroll_uk/models/employee_opening_balances_object_spec.rb +53 -53
  929. data/spec/payroll_uk/models/employee_opening_balances_spec.rb +71 -71
  930. data/spec/payroll_uk/models/employee_pay_template_object_spec.rb +53 -53
  931. data/spec/payroll_uk/models/employee_pay_template_spec.rb +47 -47
  932. data/spec/payroll_uk/models/employee_pay_templates_spec.rb +53 -53
  933. data/spec/payroll_uk/models/employee_spec.rb +129 -129
  934. data/spec/payroll_uk/models/employee_statutory_leave_balance_object_spec.rb +53 -53
  935. data/spec/payroll_uk/models/employee_statutory_leave_balance_spec.rb +61 -61
  936. data/spec/payroll_uk/models/employee_statutory_leave_summary_spec.rb +85 -85
  937. data/spec/payroll_uk/models/employee_statutory_leaves_summaries_spec.rb +53 -53
  938. data/spec/payroll_uk/models/employee_statutory_sick_leave_object_spec.rb +53 -53
  939. data/spec/payroll_uk/models/employee_statutory_sick_leave_spec.rb +135 -135
  940. data/spec/payroll_uk/models/employee_statutory_sick_leaves_spec.rb +53 -53
  941. data/spec/payroll_uk/models/employee_tax_object_spec.rb +53 -53
  942. data/spec/payroll_uk/models/employee_tax_spec.rb +101 -101
  943. data/spec/payroll_uk/models/employees_spec.rb +53 -53
  944. data/spec/payroll_uk/models/employment_object_spec.rb +53 -53
  945. data/spec/payroll_uk/models/employment_spec.rb +63 -63
  946. data/spec/payroll_uk/models/invalid_field_spec.rb +47 -47
  947. data/spec/payroll_uk/models/leave_accrual_line_spec.rb +47 -47
  948. data/spec/payroll_uk/models/leave_earnings_line_spec.rb +71 -71
  949. data/spec/payroll_uk/models/leave_period_spec.rb +63 -63
  950. data/spec/payroll_uk/models/leave_periods_spec.rb +53 -53
  951. data/spec/payroll_uk/models/leave_type_object_spec.rb +53 -53
  952. data/spec/payroll_uk/models/leave_type_spec.rb +83 -83
  953. data/spec/payroll_uk/models/leave_types_spec.rb +53 -53
  954. data/spec/payroll_uk/models/pagination_spec.rb +59 -59
  955. data/spec/payroll_uk/models/pay_run_calendar_object_spec.rb +53 -53
  956. data/spec/payroll_uk/models/pay_run_calendar_spec.rb +81 -81
  957. data/spec/payroll_uk/models/pay_run_calendars_spec.rb +53 -53
  958. data/spec/payroll_uk/models/pay_run_object_spec.rb +53 -53
  959. data/spec/payroll_uk/models/pay_run_spec.rb +119 -119
  960. data/spec/payroll_uk/models/pay_runs_spec.rb +53 -53
  961. data/spec/payroll_uk/models/payment_line_spec.rb +65 -65
  962. data/spec/payroll_uk/models/payment_method_object_spec.rb +53 -53
  963. data/spec/payroll_uk/models/payment_method_spec.rb +51 -51
  964. data/spec/payroll_uk/models/payslip_object_spec.rb +53 -53
  965. data/spec/payroll_uk/models/payslip_spec.rb +201 -201
  966. data/spec/payroll_uk/models/payslips_spec.rb +53 -53
  967. data/spec/payroll_uk/models/problem_spec.rb +71 -71
  968. data/spec/payroll_uk/models/reimbursement_line_spec.rb +53 -53
  969. data/spec/payroll_uk/models/reimbursement_object_spec.rb +53 -53
  970. data/spec/payroll_uk/models/reimbursement_spec.rb +59 -59
  971. data/spec/payroll_uk/models/reimbursements_spec.rb +53 -53
  972. data/spec/payroll_uk/models/salary_and_wage_object_spec.rb +53 -53
  973. data/spec/payroll_uk/models/salary_and_wage_spec.rb +97 -97
  974. data/spec/payroll_uk/models/salary_and_wages_spec.rb +53 -53
  975. data/spec/payroll_uk/models/settings_spec.rb +53 -53
  976. data/spec/payroll_uk/models/statutory_deduction_category_spec.rb +35 -35
  977. data/spec/payroll_uk/models/statutory_deduction_spec.rb +65 -65
  978. data/spec/payroll_uk/models/tax_line_spec.rb +71 -71
  979. data/spec/payroll_uk/models/timesheet_earnings_line_spec.rb +71 -71
  980. data/spec/payroll_uk/models/timesheet_line_object_spec.rb +53 -53
  981. data/spec/payroll_uk/models/timesheet_line_spec.rb +65 -65
  982. data/spec/payroll_uk/models/timesheet_object_spec.rb +53 -53
  983. data/spec/payroll_uk/models/timesheet_spec.rb +93 -93
  984. data/spec/payroll_uk/models/timesheets_spec.rb +53 -53
  985. data/spec/payroll_uk/models/tracking_categories_spec.rb +53 -53
  986. data/spec/payroll_uk/models/tracking_category_spec.rb +47 -47
  987. data/spec/projects/api/project_api_spec.rb +229 -229
  988. data/spec/projects/models/amount_spec.rb +47 -47
  989. data/spec/projects/models/charge_type_spec.rb +35 -35
  990. data/spec/projects/models/currency_code_spec.rb +35 -35
  991. data/spec/projects/models/error_spec.rb +47 -47
  992. data/spec/projects/models/pagination_spec.rb +59 -59
  993. data/spec/projects/models/project_create_or_update_spec.rb +59 -59
  994. data/spec/projects/models/project_patch_spec.rb +41 -41
  995. data/spec/projects/models/project_spec.rb +167 -167
  996. data/spec/projects/models/project_status_spec.rb +35 -35
  997. data/spec/projects/models/project_user_spec.rb +53 -53
  998. data/spec/projects/models/project_users_spec.rb +47 -47
  999. data/spec/projects/models/projects_spec.rb +47 -47
  1000. data/spec/projects/models/task_create_or_update_spec.rb +59 -59
  1001. data/spec/projects/models/task_spec.rb +129 -129
  1002. data/spec/projects/models/tasks_spec.rb +47 -47
  1003. data/spec/projects/models/time_entries_spec.rb +47 -47
  1004. data/spec/projects/models/time_entry_create_or_update_spec.rb +65 -65
  1005. data/spec/projects/models/time_entry_spec.rb +93 -93
  1006. data/spec/spec_helper.rb +111 -111
  1007. data/spec/where_spec.rb +82 -82
  1008. metadata +386 -386
@@ -1,2282 +1,2513 @@
1
- =begin
2
- #Xero Payroll AU API
3
-
4
- #This is the Xero Payroll API for orgs in Australia region.
5
-
6
- Contact: api@xero.com
7
- Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 4.3.1
9
-
10
- =end
11
-
12
- module XeroRuby
13
- class PayrollAuApi
14
- attr_accessor :api_client
15
-
16
- def initialize(api_client = ApiClient.new)
17
- @api_client = api_client
18
- end
19
- # Creates a payroll employee
20
- # @param xero_tenant_id [String] Xero identifier for Tenant
21
- # @param employee [Array<Employee>]
22
- # @param [Hash] opts the optional parameters
23
- # @return [Employees]
24
- def create_employee(xero_tenant_id, employee, opts = {})
25
- data, _status_code, _headers = create_employee_with_http_info(xero_tenant_id, employee, opts)
26
- data
27
- end
28
-
29
- # Creates a payroll employee
30
- # @param xero_tenant_id [String] Xero identifier for Tenant
31
- # @param employee [Array<Employee>]
32
- # @param [Hash] opts the optional parameters
33
- # @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
34
- def create_employee_with_http_info(xero_tenant_id, employee, options = {})
35
- opts = options.dup
36
- if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_employee ...'
38
- end
39
- # verify the required parameter 'xero_tenant_id' is set
40
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
41
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_employee"
42
- end
43
- # verify the required parameter 'employee' is set
44
- if @api_client.config.client_side_validation && employee.nil?
45
- fail ArgumentError, "Missing the required parameter 'employee' when calling PayrollAuApi.create_employee"
46
- end
47
- # resource path
48
- local_var_path = '/Employees'
49
-
50
- # camelize keys of incoming `where` opts
51
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
52
-
53
- # query parameters
54
- query_params = opts[:query_params] || {}
55
-
56
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
57
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
58
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
59
-
60
- # header parameters
61
- header_params = opts[:header_params] || {}
62
- # HTTP header 'Accept' (if needed)
63
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
64
- # HTTP header 'Content-Type'
65
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
66
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
67
-
68
- # form parameters
69
- form_params = opts[:form_params] || {}
70
-
71
- # http body (model)
72
- post_body = opts[:body] || @api_client.object_to_http_body(employee)
73
-
74
- # return_type
75
- return_type = opts[:return_type] || 'Employees'
76
-
77
- # auth_names
78
- auth_names = opts[:auth_names] || ['OAuth2']
79
-
80
- new_options = opts.merge(
81
- :header_params => header_params,
82
- :query_params => query_params,
83
- :form_params => form_params,
84
- :body => post_body,
85
- :auth_names => auth_names,
86
- :return_type => return_type
87
- )
88
-
89
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
90
- if @api_client.config.debugging
91
- @api_client.config.logger.debug "API called: PayrollAuApi#create_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
- end
93
- return data, status_code, headers
94
- end
95
-
96
- # Creates a leave application
97
- # @param xero_tenant_id [String] Xero identifier for Tenant
98
- # @param leave_application [Array<LeaveApplication>]
99
- # @param [Hash] opts the optional parameters
100
- # @return [LeaveApplications]
101
- def create_leave_application(xero_tenant_id, leave_application, opts = {})
102
- data, _status_code, _headers = create_leave_application_with_http_info(xero_tenant_id, leave_application, opts)
103
- data
104
- end
105
-
106
- # Creates a leave application
107
- # @param xero_tenant_id [String] Xero identifier for Tenant
108
- # @param leave_application [Array<LeaveApplication>]
109
- # @param [Hash] opts the optional parameters
110
- # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
111
- def create_leave_application_with_http_info(xero_tenant_id, leave_application, options = {})
112
- opts = options.dup
113
- if @api_client.config.debugging
114
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_leave_application ...'
115
- end
116
- # verify the required parameter 'xero_tenant_id' is set
117
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
118
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_leave_application"
119
- end
120
- # verify the required parameter 'leave_application' is set
121
- if @api_client.config.client_side_validation && leave_application.nil?
122
- fail ArgumentError, "Missing the required parameter 'leave_application' when calling PayrollAuApi.create_leave_application"
123
- end
124
- # resource path
125
- local_var_path = '/LeaveApplications'
126
-
127
- # camelize keys of incoming `where` opts
128
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
129
-
130
- # query parameters
131
- query_params = opts[:query_params] || {}
132
-
133
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
134
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
135
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
136
-
137
- # header parameters
138
- header_params = opts[:header_params] || {}
139
- # HTTP header 'Accept' (if needed)
140
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
141
- # HTTP header 'Content-Type'
142
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
143
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
144
-
145
- # form parameters
146
- form_params = opts[:form_params] || {}
147
-
148
- # http body (model)
149
- post_body = opts[:body] || @api_client.object_to_http_body(leave_application)
150
-
151
- # return_type
152
- return_type = opts[:return_type] || 'LeaveApplications'
153
-
154
- # auth_names
155
- auth_names = opts[:auth_names] || ['OAuth2']
156
-
157
- new_options = opts.merge(
158
- :header_params => header_params,
159
- :query_params => query_params,
160
- :form_params => form_params,
161
- :body => post_body,
162
- :auth_names => auth_names,
163
- :return_type => return_type
164
- )
165
-
166
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
167
- if @api_client.config.debugging
168
- @api_client.config.logger.debug "API called: PayrollAuApi#create_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
169
- end
170
- return data, status_code, headers
171
- end
172
-
173
- # Creates a pay item
174
- # @param xero_tenant_id [String] Xero identifier for Tenant
175
- # @param pay_item [PayItem]
176
- # @param [Hash] opts the optional parameters
177
- # @return [PayItems]
178
- def create_pay_item(xero_tenant_id, pay_item, opts = {})
179
- data, _status_code, _headers = create_pay_item_with_http_info(xero_tenant_id, pay_item, opts)
180
- data
181
- end
182
-
183
- # Creates a pay item
184
- # @param xero_tenant_id [String] Xero identifier for Tenant
185
- # @param pay_item [PayItem]
186
- # @param [Hash] opts the optional parameters
187
- # @return [Array<(PayItems, Integer, Hash)>] PayItems data, response status code and response headers
188
- def create_pay_item_with_http_info(xero_tenant_id, pay_item, options = {})
189
- opts = options.dup
190
- if @api_client.config.debugging
191
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_pay_item ...'
192
- end
193
- # verify the required parameter 'xero_tenant_id' is set
194
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
195
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_pay_item"
196
- end
197
- # verify the required parameter 'pay_item' is set
198
- if @api_client.config.client_side_validation && pay_item.nil?
199
- fail ArgumentError, "Missing the required parameter 'pay_item' when calling PayrollAuApi.create_pay_item"
200
- end
201
- # resource path
202
- local_var_path = '/PayItems'
203
-
204
- # camelize keys of incoming `where` opts
205
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
206
-
207
- # query parameters
208
- query_params = opts[:query_params] || {}
209
-
210
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
211
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
212
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
213
-
214
- # header parameters
215
- header_params = opts[:header_params] || {}
216
- # HTTP header 'Accept' (if needed)
217
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
218
- # HTTP header 'Content-Type'
219
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
220
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
221
-
222
- # form parameters
223
- form_params = opts[:form_params] || {}
224
-
225
- # http body (model)
226
- post_body = opts[:body] || @api_client.object_to_http_body(pay_item)
227
-
228
- # return_type
229
- return_type = opts[:return_type] || 'PayItems'
230
-
231
- # auth_names
232
- auth_names = opts[:auth_names] || ['OAuth2']
233
-
234
- new_options = opts.merge(
235
- :header_params => header_params,
236
- :query_params => query_params,
237
- :form_params => form_params,
238
- :body => post_body,
239
- :auth_names => auth_names,
240
- :return_type => return_type
241
- )
242
-
243
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
244
- if @api_client.config.debugging
245
- @api_client.config.logger.debug "API called: PayrollAuApi#create_pay_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
246
- end
247
- return data, status_code, headers
248
- end
249
-
250
- # Creates a pay run
251
- # @param xero_tenant_id [String] Xero identifier for Tenant
252
- # @param pay_run [Array<PayRun>]
253
- # @param [Hash] opts the optional parameters
254
- # @return [PayRuns]
255
- def create_pay_run(xero_tenant_id, pay_run, opts = {})
256
- data, _status_code, _headers = create_pay_run_with_http_info(xero_tenant_id, pay_run, opts)
257
- data
258
- end
259
-
260
- # Creates a pay run
261
- # @param xero_tenant_id [String] Xero identifier for Tenant
262
- # @param pay_run [Array<PayRun>]
263
- # @param [Hash] opts the optional parameters
264
- # @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
265
- def create_pay_run_with_http_info(xero_tenant_id, pay_run, options = {})
266
- opts = options.dup
267
- if @api_client.config.debugging
268
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_pay_run ...'
269
- end
270
- # verify the required parameter 'xero_tenant_id' is set
271
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
272
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_pay_run"
273
- end
274
- # verify the required parameter 'pay_run' is set
275
- if @api_client.config.client_side_validation && pay_run.nil?
276
- fail ArgumentError, "Missing the required parameter 'pay_run' when calling PayrollAuApi.create_pay_run"
277
- end
278
- # resource path
279
- local_var_path = '/PayRuns'
280
-
281
- # camelize keys of incoming `where` opts
282
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
283
-
284
- # query parameters
285
- query_params = opts[:query_params] || {}
286
-
287
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
288
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
289
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
290
-
291
- # header parameters
292
- header_params = opts[:header_params] || {}
293
- # HTTP header 'Accept' (if needed)
294
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
295
- # HTTP header 'Content-Type'
296
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
297
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
298
-
299
- # form parameters
300
- form_params = opts[:form_params] || {}
301
-
302
- # http body (model)
303
- post_body = opts[:body] || @api_client.object_to_http_body(pay_run)
304
-
305
- # return_type
306
- return_type = opts[:return_type] || 'PayRuns'
307
-
308
- # auth_names
309
- auth_names = opts[:auth_names] || ['OAuth2']
310
-
311
- new_options = opts.merge(
312
- :header_params => header_params,
313
- :query_params => query_params,
314
- :form_params => form_params,
315
- :body => post_body,
316
- :auth_names => auth_names,
317
- :return_type => return_type
318
- )
319
-
320
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
321
- if @api_client.config.debugging
322
- @api_client.config.logger.debug "API called: PayrollAuApi#create_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
323
- end
324
- return data, status_code, headers
325
- end
326
-
327
- # Creates a Payroll Calendar
328
- # @param xero_tenant_id [String] Xero identifier for Tenant
329
- # @param payroll_calendar [Array<PayrollCalendar>]
330
- # @param [Hash] opts the optional parameters
331
- # @return [PayrollCalendars]
332
- def create_payroll_calendar(xero_tenant_id, payroll_calendar, opts = {})
333
- data, _status_code, _headers = create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, opts)
334
- data
335
- end
336
-
337
- # Creates a Payroll Calendar
338
- # @param xero_tenant_id [String] Xero identifier for Tenant
339
- # @param payroll_calendar [Array<PayrollCalendar>]
340
- # @param [Hash] opts the optional parameters
341
- # @return [Array<(PayrollCalendars, Integer, Hash)>] PayrollCalendars data, response status code and response headers
342
- def create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, options = {})
343
- opts = options.dup
344
- if @api_client.config.debugging
345
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_payroll_calendar ...'
346
- end
347
- # verify the required parameter 'xero_tenant_id' is set
348
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
349
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_payroll_calendar"
350
- end
351
- # verify the required parameter 'payroll_calendar' is set
352
- if @api_client.config.client_side_validation && payroll_calendar.nil?
353
- fail ArgumentError, "Missing the required parameter 'payroll_calendar' when calling PayrollAuApi.create_payroll_calendar"
354
- end
355
- # resource path
356
- local_var_path = '/PayrollCalendars'
357
-
358
- # camelize keys of incoming `where` opts
359
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
360
-
361
- # query parameters
362
- query_params = opts[:query_params] || {}
363
-
364
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
365
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
366
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
367
-
368
- # header parameters
369
- header_params = opts[:header_params] || {}
370
- # HTTP header 'Accept' (if needed)
371
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
372
- # HTTP header 'Content-Type'
373
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
374
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
375
-
376
- # form parameters
377
- form_params = opts[:form_params] || {}
378
-
379
- # http body (model)
380
- post_body = opts[:body] || @api_client.object_to_http_body(payroll_calendar)
381
-
382
- # return_type
383
- return_type = opts[:return_type] || 'PayrollCalendars'
384
-
385
- # auth_names
386
- auth_names = opts[:auth_names] || ['OAuth2']
387
-
388
- new_options = opts.merge(
389
- :header_params => header_params,
390
- :query_params => query_params,
391
- :form_params => form_params,
392
- :body => post_body,
393
- :auth_names => auth_names,
394
- :return_type => return_type
395
- )
396
-
397
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
398
- if @api_client.config.debugging
399
- @api_client.config.logger.debug "API called: PayrollAuApi#create_payroll_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
400
- end
401
- return data, status_code, headers
402
- end
403
-
404
- # Creates a superfund
405
- # @param xero_tenant_id [String] Xero identifier for Tenant
406
- # @param super_fund [Array<SuperFund>]
407
- # @param [Hash] opts the optional parameters
408
- # @return [SuperFunds]
409
- def create_superfund(xero_tenant_id, super_fund, opts = {})
410
- data, _status_code, _headers = create_superfund_with_http_info(xero_tenant_id, super_fund, opts)
411
- data
412
- end
413
-
414
- # Creates a superfund
415
- # @param xero_tenant_id [String] Xero identifier for Tenant
416
- # @param super_fund [Array<SuperFund>]
417
- # @param [Hash] opts the optional parameters
418
- # @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
419
- def create_superfund_with_http_info(xero_tenant_id, super_fund, options = {})
420
- opts = options.dup
421
- if @api_client.config.debugging
422
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_superfund ...'
423
- end
424
- # verify the required parameter 'xero_tenant_id' is set
425
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
426
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_superfund"
427
- end
428
- # verify the required parameter 'super_fund' is set
429
- if @api_client.config.client_side_validation && super_fund.nil?
430
- fail ArgumentError, "Missing the required parameter 'super_fund' when calling PayrollAuApi.create_superfund"
431
- end
432
- # resource path
433
- local_var_path = '/Superfunds'
434
-
435
- # camelize keys of incoming `where` opts
436
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
437
-
438
- # query parameters
439
- query_params = opts[:query_params] || {}
440
-
441
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
442
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
443
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
444
-
445
- # header parameters
446
- header_params = opts[:header_params] || {}
447
- # HTTP header 'Accept' (if needed)
448
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
449
- # HTTP header 'Content-Type'
450
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
451
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
452
-
453
- # form parameters
454
- form_params = opts[:form_params] || {}
455
-
456
- # http body (model)
457
- post_body = opts[:body] || @api_client.object_to_http_body(super_fund)
458
-
459
- # return_type
460
- return_type = opts[:return_type] || 'SuperFunds'
461
-
462
- # auth_names
463
- auth_names = opts[:auth_names] || ['OAuth2']
464
-
465
- new_options = opts.merge(
466
- :header_params => header_params,
467
- :query_params => query_params,
468
- :form_params => form_params,
469
- :body => post_body,
470
- :auth_names => auth_names,
471
- :return_type => return_type
472
- )
473
-
474
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
475
- if @api_client.config.debugging
476
- @api_client.config.logger.debug "API called: PayrollAuApi#create_superfund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
477
- end
478
- return data, status_code, headers
479
- end
480
-
481
- # Creates a timesheet
482
- # @param xero_tenant_id [String] Xero identifier for Tenant
483
- # @param timesheet [Array<Timesheet>]
484
- # @param [Hash] opts the optional parameters
485
- # @return [Timesheets]
486
- def create_timesheet(xero_tenant_id, timesheet, opts = {})
487
- data, _status_code, _headers = create_timesheet_with_http_info(xero_tenant_id, timesheet, opts)
488
- data
489
- end
490
-
491
- # Creates a timesheet
492
- # @param xero_tenant_id [String] Xero identifier for Tenant
493
- # @param timesheet [Array<Timesheet>]
494
- # @param [Hash] opts the optional parameters
495
- # @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
496
- def create_timesheet_with_http_info(xero_tenant_id, timesheet, options = {})
497
- opts = options.dup
498
- if @api_client.config.debugging
499
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_timesheet ...'
500
- end
501
- # verify the required parameter 'xero_tenant_id' is set
502
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
503
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_timesheet"
504
- end
505
- # verify the required parameter 'timesheet' is set
506
- if @api_client.config.client_side_validation && timesheet.nil?
507
- fail ArgumentError, "Missing the required parameter 'timesheet' when calling PayrollAuApi.create_timesheet"
508
- end
509
- # resource path
510
- local_var_path = '/Timesheets'
511
-
512
- # camelize keys of incoming `where` opts
513
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
514
-
515
- # query parameters
516
- query_params = opts[:query_params] || {}
517
-
518
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
519
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
520
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
521
-
522
- # header parameters
523
- header_params = opts[:header_params] || {}
524
- # HTTP header 'Accept' (if needed)
525
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
526
- # HTTP header 'Content-Type'
527
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
528
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
529
-
530
- # form parameters
531
- form_params = opts[:form_params] || {}
532
-
533
- # http body (model)
534
- post_body = opts[:body] || @api_client.object_to_http_body(timesheet)
535
-
536
- # return_type
537
- return_type = opts[:return_type] || 'Timesheets'
538
-
539
- # auth_names
540
- auth_names = opts[:auth_names] || ['OAuth2']
541
-
542
- new_options = opts.merge(
543
- :header_params => header_params,
544
- :query_params => query_params,
545
- :form_params => form_params,
546
- :body => post_body,
547
- :auth_names => auth_names,
548
- :return_type => return_type
549
- )
550
-
551
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
552
- if @api_client.config.debugging
553
- @api_client.config.logger.debug "API called: PayrollAuApi#create_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
554
- end
555
- return data, status_code, headers
556
- end
557
-
558
- # Retrieves an employee's detail by unique employee id
559
- # @param xero_tenant_id [String] Xero identifier for Tenant
560
- # @param employee_id [String] Employee id for single object
561
- # @param [Hash] opts the optional parameters
562
- # @return [Employees]
563
- def get_employee(xero_tenant_id, employee_id, opts = {})
564
- data, _status_code, _headers = get_employee_with_http_info(xero_tenant_id, employee_id, opts)
565
- data
566
- end
567
-
568
- # Retrieves an employee&#39;s detail by unique employee id
569
- # @param xero_tenant_id [String] Xero identifier for Tenant
570
- # @param employee_id [String] Employee id for single object
571
- # @param [Hash] opts the optional parameters
572
- # @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
573
- def get_employee_with_http_info(xero_tenant_id, employee_id, options = {})
574
- opts = options.dup
575
- if @api_client.config.debugging
576
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_employee ...'
577
- end
578
- # verify the required parameter 'xero_tenant_id' is set
579
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
580
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_employee"
581
- end
582
- # verify the required parameter 'employee_id' is set
583
- if @api_client.config.client_side_validation && employee_id.nil?
584
- fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollAuApi.get_employee"
585
- end
586
- # resource path
587
- local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
588
-
589
- # camelize keys of incoming `where` opts
590
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
591
-
592
- # query parameters
593
- query_params = opts[:query_params] || {}
594
-
595
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
596
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
597
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
598
-
599
- # header parameters
600
- header_params = opts[:header_params] || {}
601
- # HTTP header 'Accept' (if needed)
602
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
603
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
604
-
605
- # form parameters
606
- form_params = opts[:form_params] || {}
607
-
608
- # http body (model)
609
- post_body = opts[:body]
610
-
611
- # return_type
612
- return_type = opts[:return_type] || 'Employees'
613
-
614
- # auth_names
615
- auth_names = opts[:auth_names] || ['OAuth2']
616
-
617
- new_options = opts.merge(
618
- :header_params => header_params,
619
- :query_params => query_params,
620
- :form_params => form_params,
621
- :body => post_body,
622
- :auth_names => auth_names,
623
- :return_type => return_type
624
- )
625
-
626
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
627
- if @api_client.config.debugging
628
- @api_client.config.logger.debug "API called: PayrollAuApi#get_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
629
- end
630
- return data, status_code, headers
631
- end
632
-
633
- # Searches payroll employees
634
- # @param xero_tenant_id [String] Xero identifier for Tenant
635
- # @param [Hash] opts the optional parameters
636
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
637
- # @option opts [String] :where Filter by an any element
638
- # @option opts [String] :order Order by an any element
639
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 employees will be returned in a single API call
640
- # @return [Employees]
641
- def get_employees(xero_tenant_id, opts = {})
642
- data, _status_code, _headers = get_employees_with_http_info(xero_tenant_id, opts)
643
- data
644
- end
645
-
646
- # Searches payroll employees
647
- # @param xero_tenant_id [String] Xero identifier for Tenant
648
- # @param [Hash] opts the optional parameters
649
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
650
- # @option opts [String] :where Filter by an any element
651
- # @option opts [String] :order Order by an any element
652
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 employees will be returned in a single API call
653
- # @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
654
- def get_employees_with_http_info(xero_tenant_id, options = {})
655
- opts = options.dup
656
- if @api_client.config.debugging
657
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_employees ...'
658
- end
659
- # verify the required parameter 'xero_tenant_id' is set
660
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
661
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_employees"
662
- end
663
- # resource path
664
- local_var_path = '/Employees'
665
-
666
- # camelize keys of incoming `where` opts
667
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
668
-
669
- # query parameters
670
- query_params = opts[:query_params] || {}
671
- query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
672
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
673
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
674
-
675
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
676
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
677
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
678
-
679
- # header parameters
680
- header_params = opts[:header_params] || {}
681
- # HTTP header 'Accept' (if needed)
682
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
683
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
684
- header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
685
-
686
- # form parameters
687
- form_params = opts[:form_params] || {}
688
-
689
- # http body (model)
690
- post_body = opts[:body]
691
-
692
- # return_type
693
- return_type = opts[:return_type] || 'Employees'
694
-
695
- # auth_names
696
- auth_names = opts[:auth_names] || ['OAuth2']
697
-
698
- new_options = opts.merge(
699
- :header_params => header_params,
700
- :query_params => query_params,
701
- :form_params => form_params,
702
- :body => post_body,
703
- :auth_names => auth_names,
704
- :return_type => return_type
705
- )
706
-
707
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
708
- if @api_client.config.debugging
709
- @api_client.config.logger.debug "API called: PayrollAuApi#get_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
710
- end
711
- return data, status_code, headers
712
- end
713
-
714
- # Retrieves a leave application by a unique leave application id
715
- # @param xero_tenant_id [String] Xero identifier for Tenant
716
- # @param leave_application_id [String] Leave Application id for single object
717
- # @param [Hash] opts the optional parameters
718
- # @return [LeaveApplications]
719
- def get_leave_application(xero_tenant_id, leave_application_id, opts = {})
720
- data, _status_code, _headers = get_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
721
- data
722
- end
723
-
724
- # Retrieves a leave application by a unique leave application id
725
- # @param xero_tenant_id [String] Xero identifier for Tenant
726
- # @param leave_application_id [String] Leave Application id for single object
727
- # @param [Hash] opts the optional parameters
728
- # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
729
- def get_leave_application_with_http_info(xero_tenant_id, leave_application_id, options = {})
730
- opts = options.dup
731
- if @api_client.config.debugging
732
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_leave_application ...'
733
- end
734
- # verify the required parameter 'xero_tenant_id' is set
735
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
736
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_leave_application"
737
- end
738
- # verify the required parameter 'leave_application_id' is set
739
- if @api_client.config.client_side_validation && leave_application_id.nil?
740
- fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.get_leave_application"
741
- end
742
- # resource path
743
- local_var_path = '/LeaveApplications/{LeaveApplicationID}'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)
744
-
745
- # camelize keys of incoming `where` opts
746
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
747
-
748
- # query parameters
749
- query_params = opts[:query_params] || {}
750
-
751
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
752
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
753
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
754
-
755
- # header parameters
756
- header_params = opts[:header_params] || {}
757
- # HTTP header 'Accept' (if needed)
758
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
759
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
760
-
761
- # form parameters
762
- form_params = opts[:form_params] || {}
763
-
764
- # http body (model)
765
- post_body = opts[:body]
766
-
767
- # return_type
768
- return_type = opts[:return_type] || 'LeaveApplications'
769
-
770
- # auth_names
771
- auth_names = opts[:auth_names] || ['OAuth2']
772
-
773
- new_options = opts.merge(
774
- :header_params => header_params,
775
- :query_params => query_params,
776
- :form_params => form_params,
777
- :body => post_body,
778
- :auth_names => auth_names,
779
- :return_type => return_type
780
- )
781
-
782
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
783
- if @api_client.config.debugging
784
- @api_client.config.logger.debug "API called: PayrollAuApi#get_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
785
- end
786
- return data, status_code, headers
787
- end
788
-
789
- # Retrieves leave applications
790
- # @param xero_tenant_id [String] Xero identifier for Tenant
791
- # @param [Hash] opts the optional parameters
792
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
793
- # @option opts [String] :where Filter by an any element
794
- # @option opts [String] :order Order by an any element
795
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
796
- # @return [LeaveApplications]
797
- def get_leave_applications(xero_tenant_id, opts = {})
798
- data, _status_code, _headers = get_leave_applications_with_http_info(xero_tenant_id, opts)
799
- data
800
- end
801
-
802
- # Retrieves leave applications
803
- # @param xero_tenant_id [String] Xero identifier for Tenant
804
- # @param [Hash] opts the optional parameters
805
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
806
- # @option opts [String] :where Filter by an any element
807
- # @option opts [String] :order Order by an any element
808
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
809
- # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
810
- def get_leave_applications_with_http_info(xero_tenant_id, options = {})
811
- opts = options.dup
812
- if @api_client.config.debugging
813
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_leave_applications ...'
814
- end
815
- # verify the required parameter 'xero_tenant_id' is set
816
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
817
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_leave_applications"
818
- end
819
- # resource path
820
- local_var_path = '/LeaveApplications'
821
-
822
- # camelize keys of incoming `where` opts
823
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
824
-
825
- # query parameters
826
- query_params = opts[:query_params] || {}
827
- query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
828
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
829
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
830
-
831
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
832
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
833
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
834
-
835
- # header parameters
836
- header_params = opts[:header_params] || {}
837
- # HTTP header 'Accept' (if needed)
838
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
839
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
840
- header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
841
-
842
- # form parameters
843
- form_params = opts[:form_params] || {}
844
-
845
- # http body (model)
846
- post_body = opts[:body]
847
-
848
- # return_type
849
- return_type = opts[:return_type] || 'LeaveApplications'
850
-
851
- # auth_names
852
- auth_names = opts[:auth_names] || ['OAuth2']
853
-
854
- new_options = opts.merge(
855
- :header_params => header_params,
856
- :query_params => query_params,
857
- :form_params => form_params,
858
- :body => post_body,
859
- :auth_names => auth_names,
860
- :return_type => return_type
861
- )
862
-
863
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
864
- if @api_client.config.debugging
865
- @api_client.config.logger.debug "API called: PayrollAuApi#get_leave_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
866
- end
867
- return data, status_code, headers
868
- end
869
-
870
- # Retrieves pay items
871
- # @param xero_tenant_id [String] Xero identifier for Tenant
872
- # @param [Hash] opts the optional parameters
873
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
874
- # @option opts [String] :where Filter by an any element
875
- # @option opts [String] :order Order by an any element
876
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
877
- # @return [PayItems]
878
- def get_pay_items(xero_tenant_id, opts = {})
879
- data, _status_code, _headers = get_pay_items_with_http_info(xero_tenant_id, opts)
880
- data
881
- end
882
-
883
- # Retrieves pay items
884
- # @param xero_tenant_id [String] Xero identifier for Tenant
885
- # @param [Hash] opts the optional parameters
886
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
887
- # @option opts [String] :where Filter by an any element
888
- # @option opts [String] :order Order by an any element
889
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
890
- # @return [Array<(PayItems, Integer, Hash)>] PayItems data, response status code and response headers
891
- def get_pay_items_with_http_info(xero_tenant_id, options = {})
892
- opts = options.dup
893
- if @api_client.config.debugging
894
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_pay_items ...'
895
- end
896
- # verify the required parameter 'xero_tenant_id' is set
897
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
898
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_pay_items"
899
- end
900
- # resource path
901
- local_var_path = '/PayItems'
902
-
903
- # camelize keys of incoming `where` opts
904
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
905
-
906
- # query parameters
907
- query_params = opts[:query_params] || {}
908
- query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
909
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
910
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
911
-
912
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
913
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
914
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
915
-
916
- # header parameters
917
- header_params = opts[:header_params] || {}
918
- # HTTP header 'Accept' (if needed)
919
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
920
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
921
- header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
922
-
923
- # form parameters
924
- form_params = opts[:form_params] || {}
925
-
926
- # http body (model)
927
- post_body = opts[:body]
928
-
929
- # return_type
930
- return_type = opts[:return_type] || 'PayItems'
931
-
932
- # auth_names
933
- auth_names = opts[:auth_names] || ['OAuth2']
934
-
935
- new_options = opts.merge(
936
- :header_params => header_params,
937
- :query_params => query_params,
938
- :form_params => form_params,
939
- :body => post_body,
940
- :auth_names => auth_names,
941
- :return_type => return_type
942
- )
943
-
944
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
945
- if @api_client.config.debugging
946
- @api_client.config.logger.debug "API called: PayrollAuApi#get_pay_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
947
- end
948
- return data, status_code, headers
949
- end
950
-
951
- # Retrieves a pay run by using a unique pay run id
952
- # @param xero_tenant_id [String] Xero identifier for Tenant
953
- # @param pay_run_id [String] PayRun id for single object
954
- # @param [Hash] opts the optional parameters
955
- # @return [PayRuns]
956
- def get_pay_run(xero_tenant_id, pay_run_id, opts = {})
957
- data, _status_code, _headers = get_pay_run_with_http_info(xero_tenant_id, pay_run_id, opts)
958
- data
959
- end
960
-
961
- # Retrieves a pay run by using a unique pay run id
962
- # @param xero_tenant_id [String] Xero identifier for Tenant
963
- # @param pay_run_id [String] PayRun id for single object
964
- # @param [Hash] opts the optional parameters
965
- # @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
966
- def get_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {})
967
- opts = options.dup
968
- if @api_client.config.debugging
969
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_pay_run ...'
970
- end
971
- # verify the required parameter 'xero_tenant_id' is set
972
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
973
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_pay_run"
974
- end
975
- # verify the required parameter 'pay_run_id' is set
976
- if @api_client.config.client_side_validation && pay_run_id.nil?
977
- fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollAuApi.get_pay_run"
978
- end
979
- # resource path
980
- local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)
981
-
982
- # camelize keys of incoming `where` opts
983
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
984
-
985
- # query parameters
986
- query_params = opts[:query_params] || {}
987
-
988
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
989
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
990
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
991
-
992
- # header parameters
993
- header_params = opts[:header_params] || {}
994
- # HTTP header 'Accept' (if needed)
995
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
996
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
997
-
998
- # form parameters
999
- form_params = opts[:form_params] || {}
1000
-
1001
- # http body (model)
1002
- post_body = opts[:body]
1003
-
1004
- # return_type
1005
- return_type = opts[:return_type] || 'PayRuns'
1006
-
1007
- # auth_names
1008
- auth_names = opts[:auth_names] || ['OAuth2']
1009
-
1010
- new_options = opts.merge(
1011
- :header_params => header_params,
1012
- :query_params => query_params,
1013
- :form_params => form_params,
1014
- :body => post_body,
1015
- :auth_names => auth_names,
1016
- :return_type => return_type
1017
- )
1018
-
1019
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1020
- if @api_client.config.debugging
1021
- @api_client.config.logger.debug "API called: PayrollAuApi#get_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1022
- end
1023
- return data, status_code, headers
1024
- end
1025
-
1026
- # Retrieves pay runs
1027
- # @param xero_tenant_id [String] Xero identifier for Tenant
1028
- # @param [Hash] opts the optional parameters
1029
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1030
- # @option opts [String] :where Filter by an any element
1031
- # @option opts [String] :order Order by an any element
1032
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 PayRuns will be returned in a single API call
1033
- # @return [PayRuns]
1034
- def get_pay_runs(xero_tenant_id, opts = {})
1035
- data, _status_code, _headers = get_pay_runs_with_http_info(xero_tenant_id, opts)
1036
- data
1037
- end
1038
-
1039
- # Retrieves pay runs
1040
- # @param xero_tenant_id [String] Xero identifier for Tenant
1041
- # @param [Hash] opts the optional parameters
1042
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1043
- # @option opts [String] :where Filter by an any element
1044
- # @option opts [String] :order Order by an any element
1045
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 PayRuns will be returned in a single API call
1046
- # @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
1047
- def get_pay_runs_with_http_info(xero_tenant_id, options = {})
1048
- opts = options.dup
1049
- if @api_client.config.debugging
1050
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_pay_runs ...'
1051
- end
1052
- # verify the required parameter 'xero_tenant_id' is set
1053
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1054
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_pay_runs"
1055
- end
1056
- # resource path
1057
- local_var_path = '/PayRuns'
1058
-
1059
- # camelize keys of incoming `where` opts
1060
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1061
-
1062
- # query parameters
1063
- query_params = opts[:query_params] || {}
1064
- query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
1065
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1066
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1067
-
1068
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1069
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1070
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1071
-
1072
- # header parameters
1073
- header_params = opts[:header_params] || {}
1074
- # HTTP header 'Accept' (if needed)
1075
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1076
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1077
- header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
1078
-
1079
- # form parameters
1080
- form_params = opts[:form_params] || {}
1081
-
1082
- # http body (model)
1083
- post_body = opts[:body]
1084
-
1085
- # return_type
1086
- return_type = opts[:return_type] || 'PayRuns'
1087
-
1088
- # auth_names
1089
- auth_names = opts[:auth_names] || ['OAuth2']
1090
-
1091
- new_options = opts.merge(
1092
- :header_params => header_params,
1093
- :query_params => query_params,
1094
- :form_params => form_params,
1095
- :body => post_body,
1096
- :auth_names => auth_names,
1097
- :return_type => return_type
1098
- )
1099
-
1100
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1101
- if @api_client.config.debugging
1102
- @api_client.config.logger.debug "API called: PayrollAuApi#get_pay_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1103
- end
1104
- return data, status_code, headers
1105
- end
1106
-
1107
- # Retrieves payroll calendar by using a unique payroll calendar ID
1108
- # @param xero_tenant_id [String] Xero identifier for Tenant
1109
- # @param payroll_calendar_id [String] Payroll Calendar id for single object
1110
- # @param [Hash] opts the optional parameters
1111
- # @return [PayrollCalendars]
1112
- def get_payroll_calendar(xero_tenant_id, payroll_calendar_id, opts = {})
1113
- data, _status_code, _headers = get_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar_id, opts)
1114
- data
1115
- end
1116
-
1117
- # Retrieves payroll calendar by using a unique payroll calendar ID
1118
- # @param xero_tenant_id [String] Xero identifier for Tenant
1119
- # @param payroll_calendar_id [String] Payroll Calendar id for single object
1120
- # @param [Hash] opts the optional parameters
1121
- # @return [Array<(PayrollCalendars, Integer, Hash)>] PayrollCalendars data, response status code and response headers
1122
- def get_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar_id, options = {})
1123
- opts = options.dup
1124
- if @api_client.config.debugging
1125
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_payroll_calendar ...'
1126
- end
1127
- # verify the required parameter 'xero_tenant_id' is set
1128
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1129
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_payroll_calendar"
1130
- end
1131
- # verify the required parameter 'payroll_calendar_id' is set
1132
- if @api_client.config.client_side_validation && payroll_calendar_id.nil?
1133
- fail ArgumentError, "Missing the required parameter 'payroll_calendar_id' when calling PayrollAuApi.get_payroll_calendar"
1134
- end
1135
- # resource path
1136
- local_var_path = '/PayrollCalendars/{PayrollCalendarID}'.sub('{' + 'PayrollCalendarID' + '}', payroll_calendar_id.to_s)
1137
-
1138
- # camelize keys of incoming `where` opts
1139
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1140
-
1141
- # query parameters
1142
- query_params = opts[:query_params] || {}
1143
-
1144
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1145
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1146
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1147
-
1148
- # header parameters
1149
- header_params = opts[:header_params] || {}
1150
- # HTTP header 'Accept' (if needed)
1151
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1152
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1153
-
1154
- # form parameters
1155
- form_params = opts[:form_params] || {}
1156
-
1157
- # http body (model)
1158
- post_body = opts[:body]
1159
-
1160
- # return_type
1161
- return_type = opts[:return_type] || 'PayrollCalendars'
1162
-
1163
- # auth_names
1164
- auth_names = opts[:auth_names] || ['OAuth2']
1165
-
1166
- new_options = opts.merge(
1167
- :header_params => header_params,
1168
- :query_params => query_params,
1169
- :form_params => form_params,
1170
- :body => post_body,
1171
- :auth_names => auth_names,
1172
- :return_type => return_type
1173
- )
1174
-
1175
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1176
- if @api_client.config.debugging
1177
- @api_client.config.logger.debug "API called: PayrollAuApi#get_payroll_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1178
- end
1179
- return data, status_code, headers
1180
- end
1181
-
1182
- # Retrieves payroll calendars
1183
- # @param xero_tenant_id [String] Xero identifier for Tenant
1184
- # @param [Hash] opts the optional parameters
1185
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1186
- # @option opts [String] :where Filter by an any element
1187
- # @option opts [String] :order Order by an any element
1188
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
1189
- # @return [PayrollCalendars]
1190
- def get_payroll_calendars(xero_tenant_id, opts = {})
1191
- data, _status_code, _headers = get_payroll_calendars_with_http_info(xero_tenant_id, opts)
1192
- data
1193
- end
1194
-
1195
- # Retrieves payroll calendars
1196
- # @param xero_tenant_id [String] Xero identifier for Tenant
1197
- # @param [Hash] opts the optional parameters
1198
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1199
- # @option opts [String] :where Filter by an any element
1200
- # @option opts [String] :order Order by an any element
1201
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
1202
- # @return [Array<(PayrollCalendars, Integer, Hash)>] PayrollCalendars data, response status code and response headers
1203
- def get_payroll_calendars_with_http_info(xero_tenant_id, options = {})
1204
- opts = options.dup
1205
- if @api_client.config.debugging
1206
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_payroll_calendars ...'
1207
- end
1208
- # verify the required parameter 'xero_tenant_id' is set
1209
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1210
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_payroll_calendars"
1211
- end
1212
- # resource path
1213
- local_var_path = '/PayrollCalendars'
1214
-
1215
- # camelize keys of incoming `where` opts
1216
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1217
-
1218
- # query parameters
1219
- query_params = opts[:query_params] || {}
1220
- query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
1221
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1222
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1223
-
1224
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1225
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1226
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1227
-
1228
- # header parameters
1229
- header_params = opts[:header_params] || {}
1230
- # HTTP header 'Accept' (if needed)
1231
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1232
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1233
- header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
1234
-
1235
- # form parameters
1236
- form_params = opts[:form_params] || {}
1237
-
1238
- # http body (model)
1239
- post_body = opts[:body]
1240
-
1241
- # return_type
1242
- return_type = opts[:return_type] || 'PayrollCalendars'
1243
-
1244
- # auth_names
1245
- auth_names = opts[:auth_names] || ['OAuth2']
1246
-
1247
- new_options = opts.merge(
1248
- :header_params => header_params,
1249
- :query_params => query_params,
1250
- :form_params => form_params,
1251
- :body => post_body,
1252
- :auth_names => auth_names,
1253
- :return_type => return_type
1254
- )
1255
-
1256
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1257
- if @api_client.config.debugging
1258
- @api_client.config.logger.debug "API called: PayrollAuApi#get_payroll_calendars\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1259
- end
1260
- return data, status_code, headers
1261
- end
1262
-
1263
- # Retrieves for a payslip by a unique payslip id
1264
- # @param xero_tenant_id [String] Xero identifier for Tenant
1265
- # @param payslip_id [String] Payslip id for single object
1266
- # @param [Hash] opts the optional parameters
1267
- # @return [PayslipObject]
1268
- def get_payslip(xero_tenant_id, payslip_id, opts = {})
1269
- data, _status_code, _headers = get_payslip_with_http_info(xero_tenant_id, payslip_id, opts)
1270
- data
1271
- end
1272
-
1273
- # Retrieves for a payslip by a unique payslip id
1274
- # @param xero_tenant_id [String] Xero identifier for Tenant
1275
- # @param payslip_id [String] Payslip id for single object
1276
- # @param [Hash] opts the optional parameters
1277
- # @return [Array<(PayslipObject, Integer, Hash)>] PayslipObject data, response status code and response headers
1278
- def get_payslip_with_http_info(xero_tenant_id, payslip_id, options = {})
1279
- opts = options.dup
1280
- if @api_client.config.debugging
1281
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_payslip ...'
1282
- end
1283
- # verify the required parameter 'xero_tenant_id' is set
1284
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1285
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_payslip"
1286
- end
1287
- # verify the required parameter 'payslip_id' is set
1288
- if @api_client.config.client_side_validation && payslip_id.nil?
1289
- fail ArgumentError, "Missing the required parameter 'payslip_id' when calling PayrollAuApi.get_payslip"
1290
- end
1291
- # resource path
1292
- local_var_path = '/Payslip/{PayslipID}'.sub('{' + 'PayslipID' + '}', payslip_id.to_s)
1293
-
1294
- # camelize keys of incoming `where` opts
1295
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1296
-
1297
- # query parameters
1298
- query_params = opts[:query_params] || {}
1299
-
1300
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1301
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1302
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1303
-
1304
- # header parameters
1305
- header_params = opts[:header_params] || {}
1306
- # HTTP header 'Accept' (if needed)
1307
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1308
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1309
-
1310
- # form parameters
1311
- form_params = opts[:form_params] || {}
1312
-
1313
- # http body (model)
1314
- post_body = opts[:body]
1315
-
1316
- # return_type
1317
- return_type = opts[:return_type] || 'PayslipObject'
1318
-
1319
- # auth_names
1320
- auth_names = opts[:auth_names] || ['OAuth2']
1321
-
1322
- new_options = opts.merge(
1323
- :header_params => header_params,
1324
- :query_params => query_params,
1325
- :form_params => form_params,
1326
- :body => post_body,
1327
- :auth_names => auth_names,
1328
- :return_type => return_type
1329
- )
1330
-
1331
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1332
- if @api_client.config.debugging
1333
- @api_client.config.logger.debug "API called: PayrollAuApi#get_payslip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1334
- end
1335
- return data, status_code, headers
1336
- end
1337
-
1338
- # Retrieves payroll settings
1339
- # @param xero_tenant_id [String] Xero identifier for Tenant
1340
- # @param [Hash] opts the optional parameters
1341
- # @return [SettingsObject]
1342
- def get_settings(xero_tenant_id, opts = {})
1343
- data, _status_code, _headers = get_settings_with_http_info(xero_tenant_id, opts)
1344
- data
1345
- end
1346
-
1347
- # Retrieves payroll settings
1348
- # @param xero_tenant_id [String] Xero identifier for Tenant
1349
- # @param [Hash] opts the optional parameters
1350
- # @return [Array<(SettingsObject, Integer, Hash)>] SettingsObject data, response status code and response headers
1351
- def get_settings_with_http_info(xero_tenant_id, options = {})
1352
- opts = options.dup
1353
- if @api_client.config.debugging
1354
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_settings ...'
1355
- end
1356
- # verify the required parameter 'xero_tenant_id' is set
1357
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1358
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_settings"
1359
- end
1360
- # resource path
1361
- local_var_path = '/Settings'
1362
-
1363
- # camelize keys of incoming `where` opts
1364
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1365
-
1366
- # query parameters
1367
- query_params = opts[:query_params] || {}
1368
-
1369
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1370
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1371
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1372
-
1373
- # header parameters
1374
- header_params = opts[:header_params] || {}
1375
- # HTTP header 'Accept' (if needed)
1376
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1377
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1378
-
1379
- # form parameters
1380
- form_params = opts[:form_params] || {}
1381
-
1382
- # http body (model)
1383
- post_body = opts[:body]
1384
-
1385
- # return_type
1386
- return_type = opts[:return_type] || 'SettingsObject'
1387
-
1388
- # auth_names
1389
- auth_names = opts[:auth_names] || ['OAuth2']
1390
-
1391
- new_options = opts.merge(
1392
- :header_params => header_params,
1393
- :query_params => query_params,
1394
- :form_params => form_params,
1395
- :body => post_body,
1396
- :auth_names => auth_names,
1397
- :return_type => return_type
1398
- )
1399
-
1400
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1401
- if @api_client.config.debugging
1402
- @api_client.config.logger.debug "API called: PayrollAuApi#get_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1403
- end
1404
- return data, status_code, headers
1405
- end
1406
-
1407
- # Retrieves a superfund by using a unique superfund ID
1408
- # @param xero_tenant_id [String] Xero identifier for Tenant
1409
- # @param super_fund_id [String] Superfund id for single object
1410
- # @param [Hash] opts the optional parameters
1411
- # @return [SuperFunds]
1412
- def get_superfund(xero_tenant_id, super_fund_id, opts = {})
1413
- data, _status_code, _headers = get_superfund_with_http_info(xero_tenant_id, super_fund_id, opts)
1414
- data
1415
- end
1416
-
1417
- # Retrieves a superfund by using a unique superfund ID
1418
- # @param xero_tenant_id [String] Xero identifier for Tenant
1419
- # @param super_fund_id [String] Superfund id for single object
1420
- # @param [Hash] opts the optional parameters
1421
- # @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
1422
- def get_superfund_with_http_info(xero_tenant_id, super_fund_id, options = {})
1423
- opts = options.dup
1424
- if @api_client.config.debugging
1425
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_superfund ...'
1426
- end
1427
- # verify the required parameter 'xero_tenant_id' is set
1428
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1429
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_superfund"
1430
- end
1431
- # verify the required parameter 'super_fund_id' is set
1432
- if @api_client.config.client_side_validation && super_fund_id.nil?
1433
- fail ArgumentError, "Missing the required parameter 'super_fund_id' when calling PayrollAuApi.get_superfund"
1434
- end
1435
- # resource path
1436
- local_var_path = '/Superfunds/{SuperFundID}'.sub('{' + 'SuperFundID' + '}', super_fund_id.to_s)
1437
-
1438
- # camelize keys of incoming `where` opts
1439
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1440
-
1441
- # query parameters
1442
- query_params = opts[:query_params] || {}
1443
-
1444
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1445
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1446
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1447
-
1448
- # header parameters
1449
- header_params = opts[:header_params] || {}
1450
- # HTTP header 'Accept' (if needed)
1451
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1452
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1453
-
1454
- # form parameters
1455
- form_params = opts[:form_params] || {}
1456
-
1457
- # http body (model)
1458
- post_body = opts[:body]
1459
-
1460
- # return_type
1461
- return_type = opts[:return_type] || 'SuperFunds'
1462
-
1463
- # auth_names
1464
- auth_names = opts[:auth_names] || ['OAuth2']
1465
-
1466
- new_options = opts.merge(
1467
- :header_params => header_params,
1468
- :query_params => query_params,
1469
- :form_params => form_params,
1470
- :body => post_body,
1471
- :auth_names => auth_names,
1472
- :return_type => return_type
1473
- )
1474
-
1475
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1476
- if @api_client.config.debugging
1477
- @api_client.config.logger.debug "API called: PayrollAuApi#get_superfund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1478
- end
1479
- return data, status_code, headers
1480
- end
1481
-
1482
- # Retrieves superfund products
1483
- # @param xero_tenant_id [String] Xero identifier for Tenant
1484
- # @param [Hash] opts the optional parameters
1485
- # @option opts [String] :abn The ABN of the Regulated SuperFund
1486
- # @option opts [String] :usi The USI of the Regulated SuperFund
1487
- # @return [SuperFundProducts]
1488
- def get_superfund_products(xero_tenant_id, opts = {})
1489
- data, _status_code, _headers = get_superfund_products_with_http_info(xero_tenant_id, opts)
1490
- data
1491
- end
1492
-
1493
- # Retrieves superfund products
1494
- # @param xero_tenant_id [String] Xero identifier for Tenant
1495
- # @param [Hash] opts the optional parameters
1496
- # @option opts [String] :abn The ABN of the Regulated SuperFund
1497
- # @option opts [String] :usi The USI of the Regulated SuperFund
1498
- # @return [Array<(SuperFundProducts, Integer, Hash)>] SuperFundProducts data, response status code and response headers
1499
- def get_superfund_products_with_http_info(xero_tenant_id, options = {})
1500
- opts = options.dup
1501
- if @api_client.config.debugging
1502
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_superfund_products ...'
1503
- end
1504
- # verify the required parameter 'xero_tenant_id' is set
1505
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1506
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_superfund_products"
1507
- end
1508
- # resource path
1509
- local_var_path = '/SuperfundProducts'
1510
-
1511
- # camelize keys of incoming `where` opts
1512
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1513
-
1514
- # query parameters
1515
- query_params = opts[:query_params] || {}
1516
- query_params[:'ABN'] = opts[:'abn'] if !opts[:'abn'].nil?
1517
- query_params[:'USI'] = opts[:'usi'] if !opts[:'usi'].nil?
1518
-
1519
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1520
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1521
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1522
-
1523
- # header parameters
1524
- header_params = opts[:header_params] || {}
1525
- # HTTP header 'Accept' (if needed)
1526
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1527
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1528
-
1529
- # form parameters
1530
- form_params = opts[:form_params] || {}
1531
-
1532
- # http body (model)
1533
- post_body = opts[:body]
1534
-
1535
- # return_type
1536
- return_type = opts[:return_type] || 'SuperFundProducts'
1537
-
1538
- # auth_names
1539
- auth_names = opts[:auth_names] || ['OAuth2']
1540
-
1541
- new_options = opts.merge(
1542
- :header_params => header_params,
1543
- :query_params => query_params,
1544
- :form_params => form_params,
1545
- :body => post_body,
1546
- :auth_names => auth_names,
1547
- :return_type => return_type
1548
- )
1549
-
1550
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1551
- if @api_client.config.debugging
1552
- @api_client.config.logger.debug "API called: PayrollAuApi#get_superfund_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1553
- end
1554
- return data, status_code, headers
1555
- end
1556
-
1557
- # Retrieves superfunds
1558
- # @param xero_tenant_id [String] Xero identifier for Tenant
1559
- # @param [Hash] opts the optional parameters
1560
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1561
- # @option opts [String] :where Filter by an any element
1562
- # @option opts [String] :order Order by an any element
1563
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 SuperFunds will be returned in a single API call
1564
- # @return [SuperFunds]
1565
- def get_superfunds(xero_tenant_id, opts = {})
1566
- data, _status_code, _headers = get_superfunds_with_http_info(xero_tenant_id, opts)
1567
- data
1568
- end
1569
-
1570
- # Retrieves superfunds
1571
- # @param xero_tenant_id [String] Xero identifier for Tenant
1572
- # @param [Hash] opts the optional parameters
1573
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1574
- # @option opts [String] :where Filter by an any element
1575
- # @option opts [String] :order Order by an any element
1576
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 SuperFunds will be returned in a single API call
1577
- # @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
1578
- def get_superfunds_with_http_info(xero_tenant_id, options = {})
1579
- opts = options.dup
1580
- if @api_client.config.debugging
1581
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_superfunds ...'
1582
- end
1583
- # verify the required parameter 'xero_tenant_id' is set
1584
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1585
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_superfunds"
1586
- end
1587
- # resource path
1588
- local_var_path = '/Superfunds'
1589
-
1590
- # camelize keys of incoming `where` opts
1591
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1592
-
1593
- # query parameters
1594
- query_params = opts[:query_params] || {}
1595
- query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
1596
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1597
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1598
-
1599
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1600
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1601
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1602
-
1603
- # header parameters
1604
- header_params = opts[:header_params] || {}
1605
- # HTTP header 'Accept' (if needed)
1606
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1607
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1608
- header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
1609
-
1610
- # form parameters
1611
- form_params = opts[:form_params] || {}
1612
-
1613
- # http body (model)
1614
- post_body = opts[:body]
1615
-
1616
- # return_type
1617
- return_type = opts[:return_type] || 'SuperFunds'
1618
-
1619
- # auth_names
1620
- auth_names = opts[:auth_names] || ['OAuth2']
1621
-
1622
- new_options = opts.merge(
1623
- :header_params => header_params,
1624
- :query_params => query_params,
1625
- :form_params => form_params,
1626
- :body => post_body,
1627
- :auth_names => auth_names,
1628
- :return_type => return_type
1629
- )
1630
-
1631
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1632
- if @api_client.config.debugging
1633
- @api_client.config.logger.debug "API called: PayrollAuApi#get_superfunds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1634
- end
1635
- return data, status_code, headers
1636
- end
1637
-
1638
- # Retrieves a timesheet by using a unique timesheet id
1639
- # @param xero_tenant_id [String] Xero identifier for Tenant
1640
- # @param timesheet_id [String] Timesheet id for single object
1641
- # @param [Hash] opts the optional parameters
1642
- # @return [TimesheetObject]
1643
- def get_timesheet(xero_tenant_id, timesheet_id, opts = {})
1644
- data, _status_code, _headers = get_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
1645
- data
1646
- end
1647
-
1648
- # Retrieves a timesheet by using a unique timesheet id
1649
- # @param xero_tenant_id [String] Xero identifier for Tenant
1650
- # @param timesheet_id [String] Timesheet id for single object
1651
- # @param [Hash] opts the optional parameters
1652
- # @return [Array<(TimesheetObject, Integer, Hash)>] TimesheetObject data, response status code and response headers
1653
- def get_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
1654
- opts = options.dup
1655
- if @api_client.config.debugging
1656
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_timesheet ...'
1657
- end
1658
- # verify the required parameter 'xero_tenant_id' is set
1659
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1660
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_timesheet"
1661
- end
1662
- # verify the required parameter 'timesheet_id' is set
1663
- if @api_client.config.client_side_validation && timesheet_id.nil?
1664
- fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollAuApi.get_timesheet"
1665
- end
1666
- # resource path
1667
- local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)
1668
-
1669
- # camelize keys of incoming `where` opts
1670
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1671
-
1672
- # query parameters
1673
- query_params = opts[:query_params] || {}
1674
-
1675
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1676
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1677
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1678
-
1679
- # header parameters
1680
- header_params = opts[:header_params] || {}
1681
- # HTTP header 'Accept' (if needed)
1682
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1683
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1684
-
1685
- # form parameters
1686
- form_params = opts[:form_params] || {}
1687
-
1688
- # http body (model)
1689
- post_body = opts[:body]
1690
-
1691
- # return_type
1692
- return_type = opts[:return_type] || 'TimesheetObject'
1693
-
1694
- # auth_names
1695
- auth_names = opts[:auth_names] || ['OAuth2']
1696
-
1697
- new_options = opts.merge(
1698
- :header_params => header_params,
1699
- :query_params => query_params,
1700
- :form_params => form_params,
1701
- :body => post_body,
1702
- :auth_names => auth_names,
1703
- :return_type => return_type
1704
- )
1705
-
1706
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1707
- if @api_client.config.debugging
1708
- @api_client.config.logger.debug "API called: PayrollAuApi#get_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1709
- end
1710
- return data, status_code, headers
1711
- end
1712
-
1713
- # Retrieves timesheets
1714
- # @param xero_tenant_id [String] Xero identifier for Tenant
1715
- # @param [Hash] opts the optional parameters
1716
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1717
- # @option opts [String] :where Filter by an any element
1718
- # @option opts [String] :order Order by an any element
1719
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 timesheets will be returned in a single API call
1720
- # @return [Timesheets]
1721
- def get_timesheets(xero_tenant_id, opts = {})
1722
- data, _status_code, _headers = get_timesheets_with_http_info(xero_tenant_id, opts)
1723
- data
1724
- end
1725
-
1726
- # Retrieves timesheets
1727
- # @param xero_tenant_id [String] Xero identifier for Tenant
1728
- # @param [Hash] opts the optional parameters
1729
- # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1730
- # @option opts [String] :where Filter by an any element
1731
- # @option opts [String] :order Order by an any element
1732
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 timesheets will be returned in a single API call
1733
- # @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
1734
- def get_timesheets_with_http_info(xero_tenant_id, options = {})
1735
- opts = options.dup
1736
- if @api_client.config.debugging
1737
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_timesheets ...'
1738
- end
1739
- # verify the required parameter 'xero_tenant_id' is set
1740
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1741
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_timesheets"
1742
- end
1743
- # resource path
1744
- local_var_path = '/Timesheets'
1745
-
1746
- # camelize keys of incoming `where` opts
1747
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1748
-
1749
- # query parameters
1750
- query_params = opts[:query_params] || {}
1751
- query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
1752
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1753
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1754
-
1755
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1756
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1757
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1758
-
1759
- # header parameters
1760
- header_params = opts[:header_params] || {}
1761
- # HTTP header 'Accept' (if needed)
1762
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1763
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1764
- header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
1765
-
1766
- # form parameters
1767
- form_params = opts[:form_params] || {}
1768
-
1769
- # http body (model)
1770
- post_body = opts[:body]
1771
-
1772
- # return_type
1773
- return_type = opts[:return_type] || 'Timesheets'
1774
-
1775
- # auth_names
1776
- auth_names = opts[:auth_names] || ['OAuth2']
1777
-
1778
- new_options = opts.merge(
1779
- :header_params => header_params,
1780
- :query_params => query_params,
1781
- :form_params => form_params,
1782
- :body => post_body,
1783
- :auth_names => auth_names,
1784
- :return_type => return_type
1785
- )
1786
-
1787
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1788
- if @api_client.config.debugging
1789
- @api_client.config.logger.debug "API called: PayrollAuApi#get_timesheets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1790
- end
1791
- return data, status_code, headers
1792
- end
1793
-
1794
- # Updates an employee's detail
1795
- # Update properties on a single employee
1796
- # @param xero_tenant_id [String] Xero identifier for Tenant
1797
- # @param employee_id [String] Employee id for single object
1798
- # @param [Hash] opts the optional parameters
1799
- # @option opts [Array<Employee>] :employee
1800
- # @return [Employees]
1801
- def update_employee(xero_tenant_id, employee_id, opts = {})
1802
- data, _status_code, _headers = update_employee_with_http_info(xero_tenant_id, employee_id, opts)
1803
- data
1804
- end
1805
-
1806
- # Updates an employee&#39;s detail
1807
- # Update properties on a single employee
1808
- # @param xero_tenant_id [String] Xero identifier for Tenant
1809
- # @param employee_id [String] Employee id for single object
1810
- # @param [Hash] opts the optional parameters
1811
- # @option opts [Array<Employee>] :employee
1812
- # @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
1813
- def update_employee_with_http_info(xero_tenant_id, employee_id, options = {})
1814
- opts = options.dup
1815
- if @api_client.config.debugging
1816
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_employee ...'
1817
- end
1818
- # verify the required parameter 'xero_tenant_id' is set
1819
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1820
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_employee"
1821
- end
1822
- # verify the required parameter 'employee_id' is set
1823
- if @api_client.config.client_side_validation && employee_id.nil?
1824
- fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollAuApi.update_employee"
1825
- end
1826
- # resource path
1827
- local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
1828
-
1829
- # camelize keys of incoming `where` opts
1830
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1831
-
1832
- # query parameters
1833
- query_params = opts[:query_params] || {}
1834
-
1835
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1836
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1837
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1838
-
1839
- # header parameters
1840
- header_params = opts[:header_params] || {}
1841
- # HTTP header 'Accept' (if needed)
1842
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1843
- # HTTP header 'Content-Type'
1844
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1845
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1846
-
1847
- # form parameters
1848
- form_params = opts[:form_params] || {}
1849
-
1850
- # http body (model)
1851
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'employee'])
1852
-
1853
- # return_type
1854
- return_type = opts[:return_type] || 'Employees'
1855
-
1856
- # auth_names
1857
- auth_names = opts[:auth_names] || ['OAuth2']
1858
-
1859
- new_options = opts.merge(
1860
- :header_params => header_params,
1861
- :query_params => query_params,
1862
- :form_params => form_params,
1863
- :body => post_body,
1864
- :auth_names => auth_names,
1865
- :return_type => return_type
1866
- )
1867
-
1868
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
1869
- if @api_client.config.debugging
1870
- @api_client.config.logger.debug "API called: PayrollAuApi#update_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1871
- end
1872
- return data, status_code, headers
1873
- end
1874
-
1875
- # Updates a specific leave application
1876
- # @param xero_tenant_id [String] Xero identifier for Tenant
1877
- # @param leave_application_id [String] Leave Application id for single object
1878
- # @param leave_application [Array<LeaveApplication>]
1879
- # @param [Hash] opts the optional parameters
1880
- # @return [LeaveApplications]
1881
- def update_leave_application(xero_tenant_id, leave_application_id, leave_application, opts = {})
1882
- data, _status_code, _headers = update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, opts)
1883
- data
1884
- end
1885
-
1886
- # Updates a specific leave application
1887
- # @param xero_tenant_id [String] Xero identifier for Tenant
1888
- # @param leave_application_id [String] Leave Application id for single object
1889
- # @param leave_application [Array<LeaveApplication>]
1890
- # @param [Hash] opts the optional parameters
1891
- # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
1892
- def update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, options = {})
1893
- opts = options.dup
1894
- if @api_client.config.debugging
1895
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_leave_application ...'
1896
- end
1897
- # verify the required parameter 'xero_tenant_id' is set
1898
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1899
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_leave_application"
1900
- end
1901
- # verify the required parameter 'leave_application_id' is set
1902
- if @api_client.config.client_side_validation && leave_application_id.nil?
1903
- fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.update_leave_application"
1904
- end
1905
- # verify the required parameter 'leave_application' is set
1906
- if @api_client.config.client_side_validation && leave_application.nil?
1907
- fail ArgumentError, "Missing the required parameter 'leave_application' when calling PayrollAuApi.update_leave_application"
1908
- end
1909
- # resource path
1910
- local_var_path = '/LeaveApplications/{LeaveApplicationID}'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)
1911
-
1912
- # camelize keys of incoming `where` opts
1913
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1914
-
1915
- # query parameters
1916
- query_params = opts[:query_params] || {}
1917
-
1918
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1919
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1920
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1921
-
1922
- # header parameters
1923
- header_params = opts[:header_params] || {}
1924
- # HTTP header 'Accept' (if needed)
1925
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1926
- # HTTP header 'Content-Type'
1927
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1928
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1929
-
1930
- # form parameters
1931
- form_params = opts[:form_params] || {}
1932
-
1933
- # http body (model)
1934
- post_body = opts[:body] || @api_client.object_to_http_body(leave_application)
1935
-
1936
- # return_type
1937
- return_type = opts[:return_type] || 'LeaveApplications'
1938
-
1939
- # auth_names
1940
- auth_names = opts[:auth_names] || ['OAuth2']
1941
-
1942
- new_options = opts.merge(
1943
- :header_params => header_params,
1944
- :query_params => query_params,
1945
- :form_params => form_params,
1946
- :body => post_body,
1947
- :auth_names => auth_names,
1948
- :return_type => return_type
1949
- )
1950
-
1951
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
1952
- if @api_client.config.debugging
1953
- @api_client.config.logger.debug "API called: PayrollAuApi#update_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1954
- end
1955
- return data, status_code, headers
1956
- end
1957
-
1958
- # Updates a pay run
1959
- # Update properties on a single PayRun
1960
- # @param xero_tenant_id [String] Xero identifier for Tenant
1961
- # @param pay_run_id [String] PayRun id for single object
1962
- # @param [Hash] opts the optional parameters
1963
- # @option opts [Array<PayRun>] :pay_run
1964
- # @return [PayRuns]
1965
- def update_pay_run(xero_tenant_id, pay_run_id, opts = {})
1966
- data, _status_code, _headers = update_pay_run_with_http_info(xero_tenant_id, pay_run_id, opts)
1967
- data
1968
- end
1969
-
1970
- # Updates a pay run
1971
- # Update properties on a single PayRun
1972
- # @param xero_tenant_id [String] Xero identifier for Tenant
1973
- # @param pay_run_id [String] PayRun id for single object
1974
- # @param [Hash] opts the optional parameters
1975
- # @option opts [Array<PayRun>] :pay_run
1976
- # @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
1977
- def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {})
1978
- opts = options.dup
1979
- if @api_client.config.debugging
1980
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_pay_run ...'
1981
- end
1982
- # verify the required parameter 'xero_tenant_id' is set
1983
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
1984
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_pay_run"
1985
- end
1986
- # verify the required parameter 'pay_run_id' is set
1987
- if @api_client.config.client_side_validation && pay_run_id.nil?
1988
- fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollAuApi.update_pay_run"
1989
- end
1990
- # resource path
1991
- local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)
1992
-
1993
- # camelize keys of incoming `where` opts
1994
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1995
-
1996
- # query parameters
1997
- query_params = opts[:query_params] || {}
1998
-
1999
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2000
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2001
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2002
-
2003
- # header parameters
2004
- header_params = opts[:header_params] || {}
2005
- # HTTP header 'Accept' (if needed)
2006
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2007
- # HTTP header 'Content-Type'
2008
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2009
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2010
-
2011
- # form parameters
2012
- form_params = opts[:form_params] || {}
2013
-
2014
- # http body (model)
2015
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'pay_run'])
2016
-
2017
- # return_type
2018
- return_type = opts[:return_type] || 'PayRuns'
2019
-
2020
- # auth_names
2021
- auth_names = opts[:auth_names] || ['OAuth2']
2022
-
2023
- new_options = opts.merge(
2024
- :header_params => header_params,
2025
- :query_params => query_params,
2026
- :form_params => form_params,
2027
- :body => post_body,
2028
- :auth_names => auth_names,
2029
- :return_type => return_type
2030
- )
2031
-
2032
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2033
- if @api_client.config.debugging
2034
- @api_client.config.logger.debug "API called: PayrollAuApi#update_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2035
- end
2036
- return data, status_code, headers
2037
- end
2038
-
2039
- # Updates a payslip
2040
- # Update lines on a single payslips
2041
- # @param xero_tenant_id [String] Xero identifier for Tenant
2042
- # @param payslip_id [String] Payslip id for single object
2043
- # @param [Hash] opts the optional parameters
2044
- # @option opts [Array<PayslipLines>] :payslip_lines
2045
- # @return [Payslips]
2046
- def update_payslip(xero_tenant_id, payslip_id, opts = {})
2047
- data, _status_code, _headers = update_payslip_with_http_info(xero_tenant_id, payslip_id, opts)
2048
- data
2049
- end
2050
-
2051
- # Updates a payslip
2052
- # Update lines on a single payslips
2053
- # @param xero_tenant_id [String] Xero identifier for Tenant
2054
- # @param payslip_id [String] Payslip id for single object
2055
- # @param [Hash] opts the optional parameters
2056
- # @option opts [Array<PayslipLines>] :payslip_lines
2057
- # @return [Array<(Payslips, Integer, Hash)>] Payslips data, response status code and response headers
2058
- def update_payslip_with_http_info(xero_tenant_id, payslip_id, options = {})
2059
- opts = options.dup
2060
- if @api_client.config.debugging
2061
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_payslip ...'
2062
- end
2063
- # verify the required parameter 'xero_tenant_id' is set
2064
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
2065
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_payslip"
2066
- end
2067
- # verify the required parameter 'payslip_id' is set
2068
- if @api_client.config.client_side_validation && payslip_id.nil?
2069
- fail ArgumentError, "Missing the required parameter 'payslip_id' when calling PayrollAuApi.update_payslip"
2070
- end
2071
- # resource path
2072
- local_var_path = '/Payslip/{PayslipID}'.sub('{' + 'PayslipID' + '}', payslip_id.to_s)
2073
-
2074
- # camelize keys of incoming `where` opts
2075
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2076
-
2077
- # query parameters
2078
- query_params = opts[:query_params] || {}
2079
-
2080
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2081
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2082
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2083
-
2084
- # header parameters
2085
- header_params = opts[:header_params] || {}
2086
- # HTTP header 'Accept' (if needed)
2087
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2088
- # HTTP header 'Content-Type'
2089
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2090
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2091
-
2092
- # form parameters
2093
- form_params = opts[:form_params] || {}
2094
-
2095
- # http body (model)
2096
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'payslip_lines'])
2097
-
2098
- # return_type
2099
- return_type = opts[:return_type] || 'Payslips'
2100
-
2101
- # auth_names
2102
- auth_names = opts[:auth_names] || ['OAuth2']
2103
-
2104
- new_options = opts.merge(
2105
- :header_params => header_params,
2106
- :query_params => query_params,
2107
- :form_params => form_params,
2108
- :body => post_body,
2109
- :auth_names => auth_names,
2110
- :return_type => return_type
2111
- )
2112
-
2113
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2114
- if @api_client.config.debugging
2115
- @api_client.config.logger.debug "API called: PayrollAuApi#update_payslip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2116
- end
2117
- return data, status_code, headers
2118
- end
2119
-
2120
- # Updates a superfund
2121
- # Update properties on a single Superfund
2122
- # @param xero_tenant_id [String] Xero identifier for Tenant
2123
- # @param super_fund_id [String] Superfund id for single object
2124
- # @param [Hash] opts the optional parameters
2125
- # @option opts [Array<SuperFund>] :super_fund
2126
- # @return [SuperFunds]
2127
- def update_superfund(xero_tenant_id, super_fund_id, opts = {})
2128
- data, _status_code, _headers = update_superfund_with_http_info(xero_tenant_id, super_fund_id, opts)
2129
- data
2130
- end
2131
-
2132
- # Updates a superfund
2133
- # Update properties on a single Superfund
2134
- # @param xero_tenant_id [String] Xero identifier for Tenant
2135
- # @param super_fund_id [String] Superfund id for single object
2136
- # @param [Hash] opts the optional parameters
2137
- # @option opts [Array<SuperFund>] :super_fund
2138
- # @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
2139
- def update_superfund_with_http_info(xero_tenant_id, super_fund_id, options = {})
2140
- opts = options.dup
2141
- if @api_client.config.debugging
2142
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_superfund ...'
2143
- end
2144
- # verify the required parameter 'xero_tenant_id' is set
2145
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
2146
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_superfund"
2147
- end
2148
- # verify the required parameter 'super_fund_id' is set
2149
- if @api_client.config.client_side_validation && super_fund_id.nil?
2150
- fail ArgumentError, "Missing the required parameter 'super_fund_id' when calling PayrollAuApi.update_superfund"
2151
- end
2152
- # resource path
2153
- local_var_path = '/Superfunds/{SuperFundID}'.sub('{' + 'SuperFundID' + '}', super_fund_id.to_s)
2154
-
2155
- # camelize keys of incoming `where` opts
2156
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2157
-
2158
- # query parameters
2159
- query_params = opts[:query_params] || {}
2160
-
2161
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2162
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2163
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2164
-
2165
- # header parameters
2166
- header_params = opts[:header_params] || {}
2167
- # HTTP header 'Accept' (if needed)
2168
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2169
- # HTTP header 'Content-Type'
2170
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2171
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2172
-
2173
- # form parameters
2174
- form_params = opts[:form_params] || {}
2175
-
2176
- # http body (model)
2177
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'super_fund'])
2178
-
2179
- # return_type
2180
- return_type = opts[:return_type] || 'SuperFunds'
2181
-
2182
- # auth_names
2183
- auth_names = opts[:auth_names] || ['OAuth2']
2184
-
2185
- new_options = opts.merge(
2186
- :header_params => header_params,
2187
- :query_params => query_params,
2188
- :form_params => form_params,
2189
- :body => post_body,
2190
- :auth_names => auth_names,
2191
- :return_type => return_type
2192
- )
2193
-
2194
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2195
- if @api_client.config.debugging
2196
- @api_client.config.logger.debug "API called: PayrollAuApi#update_superfund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2197
- end
2198
- return data, status_code, headers
2199
- end
2200
-
2201
- # Updates a timesheet
2202
- # Update properties on a single timesheet
2203
- # @param xero_tenant_id [String] Xero identifier for Tenant
2204
- # @param timesheet_id [String] Timesheet id for single object
2205
- # @param [Hash] opts the optional parameters
2206
- # @option opts [Array<Timesheet>] :timesheet
2207
- # @return [Timesheets]
2208
- def update_timesheet(xero_tenant_id, timesheet_id, opts = {})
2209
- data, _status_code, _headers = update_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
2210
- data
2211
- end
2212
-
2213
- # Updates a timesheet
2214
- # Update properties on a single timesheet
2215
- # @param xero_tenant_id [String] Xero identifier for Tenant
2216
- # @param timesheet_id [String] Timesheet id for single object
2217
- # @param [Hash] opts the optional parameters
2218
- # @option opts [Array<Timesheet>] :timesheet
2219
- # @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
2220
- def update_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
2221
- opts = options.dup
2222
- if @api_client.config.debugging
2223
- @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_timesheet ...'
2224
- end
2225
- # verify the required parameter 'xero_tenant_id' is set
2226
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
2227
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_timesheet"
2228
- end
2229
- # verify the required parameter 'timesheet_id' is set
2230
- if @api_client.config.client_side_validation && timesheet_id.nil?
2231
- fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollAuApi.update_timesheet"
2232
- end
2233
- # resource path
2234
- local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)
2235
-
2236
- # camelize keys of incoming `where` opts
2237
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2238
-
2239
- # query parameters
2240
- query_params = opts[:query_params] || {}
2241
-
2242
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2243
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2244
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2245
-
2246
- # header parameters
2247
- header_params = opts[:header_params] || {}
2248
- # HTTP header 'Accept' (if needed)
2249
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2250
- # HTTP header 'Content-Type'
2251
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2252
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2253
-
2254
- # form parameters
2255
- form_params = opts[:form_params] || {}
2256
-
2257
- # http body (model)
2258
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'timesheet'])
2259
-
2260
- # return_type
2261
- return_type = opts[:return_type] || 'Timesheets'
2262
-
2263
- # auth_names
2264
- auth_names = opts[:auth_names] || ['OAuth2']
2265
-
2266
- new_options = opts.merge(
2267
- :header_params => header_params,
2268
- :query_params => query_params,
2269
- :form_params => form_params,
2270
- :body => post_body,
2271
- :auth_names => auth_names,
2272
- :return_type => return_type
2273
- )
2274
-
2275
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2276
- if @api_client.config.debugging
2277
- @api_client.config.logger.debug "API called: PayrollAuApi#update_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2278
- end
2279
- return data, status_code, headers
2280
- end
2281
- end
2282
- end
1
+ =begin
2
+ #Xero Payroll AU API
3
+
4
+ #This is the Xero Payroll API for orgs in Australia region.
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ module XeroRuby
13
+ class PayrollAuApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.new)
17
+ @api_client = api_client
18
+ end
19
+ # Approve a requested leave application by a unique leave application id
20
+ # @param xero_tenant_id [String] Xero identifier for Tenant
21
+ # @param leave_application_id [String] Leave Application id for single object
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [LeaveApplications]
24
+ def approve_leave_application(xero_tenant_id, leave_application_id, opts = {})
25
+ data, _status_code, _headers = approve_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
26
+ data
27
+ end
28
+
29
+ # Approve a requested leave application by a unique leave application id
30
+ # @param xero_tenant_id [String] Xero identifier for Tenant
31
+ # @param leave_application_id [String] Leave Application id for single object
32
+ # @param [Hash] opts the optional parameters
33
+ # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
34
+ def approve_leave_application_with_http_info(xero_tenant_id, leave_application_id, options = {})
35
+ opts = options.dup
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.approve_leave_application ...'
38
+ end
39
+ # verify the required parameter 'xero_tenant_id' is set
40
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.approve_leave_application"
42
+ end
43
+ # verify the required parameter 'leave_application_id' is set
44
+ if @api_client.config.client_side_validation && leave_application_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.approve_leave_application"
46
+ end
47
+ # resource path
48
+ local_var_path = '/LeaveApplications/{LeaveApplicationID}/approve'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)
49
+
50
+ # camelize keys of incoming `where` opts
51
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+
56
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
57
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
58
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
59
+
60
+ # header parameters
61
+ header_params = opts[:header_params] || {}
62
+ # HTTP header 'Accept' (if needed)
63
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
64
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
65
+
66
+ # form parameters
67
+ form_params = opts[:form_params] || {}
68
+
69
+ # http body (model)
70
+ post_body = opts[:body]
71
+
72
+ # return_type
73
+ return_type = opts[:return_type] || 'LeaveApplications'
74
+
75
+ # auth_names
76
+ auth_names = opts[:auth_names] || ['OAuth2']
77
+
78
+ new_options = opts.merge(
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => return_type
85
+ )
86
+
87
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: PayrollAuApi#approve_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ return data, status_code, headers
92
+ end
93
+
94
+ # Creates a payroll employee
95
+ # @param xero_tenant_id [String] Xero identifier for Tenant
96
+ # @param employee [Array<Employee>]
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [Employees]
99
+ def create_employee(xero_tenant_id, employee, opts = {})
100
+ data, _status_code, _headers = create_employee_with_http_info(xero_tenant_id, employee, opts)
101
+ data
102
+ end
103
+
104
+ # Creates a payroll employee
105
+ # @param xero_tenant_id [String] Xero identifier for Tenant
106
+ # @param employee [Array<Employee>]
107
+ # @param [Hash] opts the optional parameters
108
+ # @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
109
+ def create_employee_with_http_info(xero_tenant_id, employee, options = {})
110
+ opts = options.dup
111
+ if @api_client.config.debugging
112
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_employee ...'
113
+ end
114
+ # verify the required parameter 'xero_tenant_id' is set
115
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
116
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_employee"
117
+ end
118
+ # verify the required parameter 'employee' is set
119
+ if @api_client.config.client_side_validation && employee.nil?
120
+ fail ArgumentError, "Missing the required parameter 'employee' when calling PayrollAuApi.create_employee"
121
+ end
122
+ # resource path
123
+ local_var_path = '/Employees'
124
+
125
+ # camelize keys of incoming `where` opts
126
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+
131
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
132
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
133
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
134
+
135
+ # header parameters
136
+ header_params = opts[:header_params] || {}
137
+ # HTTP header 'Accept' (if needed)
138
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
139
+ # HTTP header 'Content-Type'
140
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
141
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
142
+
143
+ # form parameters
144
+ form_params = opts[:form_params] || {}
145
+
146
+ # http body (model)
147
+ post_body = opts[:body] || @api_client.object_to_http_body(employee)
148
+
149
+ # return_type
150
+ return_type = opts[:return_type] || 'Employees'
151
+
152
+ # auth_names
153
+ auth_names = opts[:auth_names] || ['OAuth2']
154
+
155
+ new_options = opts.merge(
156
+ :header_params => header_params,
157
+ :query_params => query_params,
158
+ :form_params => form_params,
159
+ :body => post_body,
160
+ :auth_names => auth_names,
161
+ :return_type => return_type
162
+ )
163
+
164
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug "API called: PayrollAuApi#create_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
+ end
168
+ return data, status_code, headers
169
+ end
170
+
171
+ # Creates a leave application
172
+ # @param xero_tenant_id [String] Xero identifier for Tenant
173
+ # @param leave_application [Array<LeaveApplication>]
174
+ # @param [Hash] opts the optional parameters
175
+ # @return [LeaveApplications]
176
+ def create_leave_application(xero_tenant_id, leave_application, opts = {})
177
+ data, _status_code, _headers = create_leave_application_with_http_info(xero_tenant_id, leave_application, opts)
178
+ data
179
+ end
180
+
181
+ # Creates a leave application
182
+ # @param xero_tenant_id [String] Xero identifier for Tenant
183
+ # @param leave_application [Array<LeaveApplication>]
184
+ # @param [Hash] opts the optional parameters
185
+ # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
186
+ def create_leave_application_with_http_info(xero_tenant_id, leave_application, options = {})
187
+ opts = options.dup
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_leave_application ...'
190
+ end
191
+ # verify the required parameter 'xero_tenant_id' is set
192
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
193
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_leave_application"
194
+ end
195
+ # verify the required parameter 'leave_application' is set
196
+ if @api_client.config.client_side_validation && leave_application.nil?
197
+ fail ArgumentError, "Missing the required parameter 'leave_application' when calling PayrollAuApi.create_leave_application"
198
+ end
199
+ # resource path
200
+ local_var_path = '/LeaveApplications'
201
+
202
+ # camelize keys of incoming `where` opts
203
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
204
+
205
+ # query parameters
206
+ query_params = opts[:query_params] || {}
207
+
208
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
209
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
210
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
211
+
212
+ # header parameters
213
+ header_params = opts[:header_params] || {}
214
+ # HTTP header 'Accept' (if needed)
215
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
216
+ # HTTP header 'Content-Type'
217
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
218
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
219
+
220
+ # form parameters
221
+ form_params = opts[:form_params] || {}
222
+
223
+ # http body (model)
224
+ post_body = opts[:body] || @api_client.object_to_http_body(leave_application)
225
+
226
+ # return_type
227
+ return_type = opts[:return_type] || 'LeaveApplications'
228
+
229
+ # auth_names
230
+ auth_names = opts[:auth_names] || ['OAuth2']
231
+
232
+ new_options = opts.merge(
233
+ :header_params => header_params,
234
+ :query_params => query_params,
235
+ :form_params => form_params,
236
+ :body => post_body,
237
+ :auth_names => auth_names,
238
+ :return_type => return_type
239
+ )
240
+
241
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug "API called: PayrollAuApi#create_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
244
+ end
245
+ return data, status_code, headers
246
+ end
247
+
248
+ # Creates a pay item
249
+ # @param xero_tenant_id [String] Xero identifier for Tenant
250
+ # @param pay_item [PayItem]
251
+ # @param [Hash] opts the optional parameters
252
+ # @return [PayItems]
253
+ def create_pay_item(xero_tenant_id, pay_item, opts = {})
254
+ data, _status_code, _headers = create_pay_item_with_http_info(xero_tenant_id, pay_item, opts)
255
+ data
256
+ end
257
+
258
+ # Creates a pay item
259
+ # @param xero_tenant_id [String] Xero identifier for Tenant
260
+ # @param pay_item [PayItem]
261
+ # @param [Hash] opts the optional parameters
262
+ # @return [Array<(PayItems, Integer, Hash)>] PayItems data, response status code and response headers
263
+ def create_pay_item_with_http_info(xero_tenant_id, pay_item, options = {})
264
+ opts = options.dup
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_pay_item ...'
267
+ end
268
+ # verify the required parameter 'xero_tenant_id' is set
269
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
270
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_pay_item"
271
+ end
272
+ # verify the required parameter 'pay_item' is set
273
+ if @api_client.config.client_side_validation && pay_item.nil?
274
+ fail ArgumentError, "Missing the required parameter 'pay_item' when calling PayrollAuApi.create_pay_item"
275
+ end
276
+ # resource path
277
+ local_var_path = '/PayItems'
278
+
279
+ # camelize keys of incoming `where` opts
280
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
281
+
282
+ # query parameters
283
+ query_params = opts[:query_params] || {}
284
+
285
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
286
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
287
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
288
+
289
+ # header parameters
290
+ header_params = opts[:header_params] || {}
291
+ # HTTP header 'Accept' (if needed)
292
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
293
+ # HTTP header 'Content-Type'
294
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
295
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
296
+
297
+ # form parameters
298
+ form_params = opts[:form_params] || {}
299
+
300
+ # http body (model)
301
+ post_body = opts[:body] || @api_client.object_to_http_body(pay_item)
302
+
303
+ # return_type
304
+ return_type = opts[:return_type] || 'PayItems'
305
+
306
+ # auth_names
307
+ auth_names = opts[:auth_names] || ['OAuth2']
308
+
309
+ new_options = opts.merge(
310
+ :header_params => header_params,
311
+ :query_params => query_params,
312
+ :form_params => form_params,
313
+ :body => post_body,
314
+ :auth_names => auth_names,
315
+ :return_type => return_type
316
+ )
317
+
318
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
319
+ if @api_client.config.debugging
320
+ @api_client.config.logger.debug "API called: PayrollAuApi#create_pay_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
321
+ end
322
+ return data, status_code, headers
323
+ end
324
+
325
+ # Creates a pay run
326
+ # @param xero_tenant_id [String] Xero identifier for Tenant
327
+ # @param pay_run [Array<PayRun>]
328
+ # @param [Hash] opts the optional parameters
329
+ # @return [PayRuns]
330
+ def create_pay_run(xero_tenant_id, pay_run, opts = {})
331
+ data, _status_code, _headers = create_pay_run_with_http_info(xero_tenant_id, pay_run, opts)
332
+ data
333
+ end
334
+
335
+ # Creates a pay run
336
+ # @param xero_tenant_id [String] Xero identifier for Tenant
337
+ # @param pay_run [Array<PayRun>]
338
+ # @param [Hash] opts the optional parameters
339
+ # @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
340
+ def create_pay_run_with_http_info(xero_tenant_id, pay_run, options = {})
341
+ opts = options.dup
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_pay_run ...'
344
+ end
345
+ # verify the required parameter 'xero_tenant_id' is set
346
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
347
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_pay_run"
348
+ end
349
+ # verify the required parameter 'pay_run' is set
350
+ if @api_client.config.client_side_validation && pay_run.nil?
351
+ fail ArgumentError, "Missing the required parameter 'pay_run' when calling PayrollAuApi.create_pay_run"
352
+ end
353
+ # resource path
354
+ local_var_path = '/PayRuns'
355
+
356
+ # camelize keys of incoming `where` opts
357
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
358
+
359
+ # query parameters
360
+ query_params = opts[:query_params] || {}
361
+
362
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
363
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
364
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
365
+
366
+ # header parameters
367
+ header_params = opts[:header_params] || {}
368
+ # HTTP header 'Accept' (if needed)
369
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
370
+ # HTTP header 'Content-Type'
371
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
372
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
373
+
374
+ # form parameters
375
+ form_params = opts[:form_params] || {}
376
+
377
+ # http body (model)
378
+ post_body = opts[:body] || @api_client.object_to_http_body(pay_run)
379
+
380
+ # return_type
381
+ return_type = opts[:return_type] || 'PayRuns'
382
+
383
+ # auth_names
384
+ auth_names = opts[:auth_names] || ['OAuth2']
385
+
386
+ new_options = opts.merge(
387
+ :header_params => header_params,
388
+ :query_params => query_params,
389
+ :form_params => form_params,
390
+ :body => post_body,
391
+ :auth_names => auth_names,
392
+ :return_type => return_type
393
+ )
394
+
395
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
396
+ if @api_client.config.debugging
397
+ @api_client.config.logger.debug "API called: PayrollAuApi#create_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
398
+ end
399
+ return data, status_code, headers
400
+ end
401
+
402
+ # Creates a Payroll Calendar
403
+ # @param xero_tenant_id [String] Xero identifier for Tenant
404
+ # @param payroll_calendar [Array<PayrollCalendar>]
405
+ # @param [Hash] opts the optional parameters
406
+ # @return [PayrollCalendars]
407
+ def create_payroll_calendar(xero_tenant_id, payroll_calendar, opts = {})
408
+ data, _status_code, _headers = create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, opts)
409
+ data
410
+ end
411
+
412
+ # Creates a Payroll Calendar
413
+ # @param xero_tenant_id [String] Xero identifier for Tenant
414
+ # @param payroll_calendar [Array<PayrollCalendar>]
415
+ # @param [Hash] opts the optional parameters
416
+ # @return [Array<(PayrollCalendars, Integer, Hash)>] PayrollCalendars data, response status code and response headers
417
+ def create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, options = {})
418
+ opts = options.dup
419
+ if @api_client.config.debugging
420
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_payroll_calendar ...'
421
+ end
422
+ # verify the required parameter 'xero_tenant_id' is set
423
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
424
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_payroll_calendar"
425
+ end
426
+ # verify the required parameter 'payroll_calendar' is set
427
+ if @api_client.config.client_side_validation && payroll_calendar.nil?
428
+ fail ArgumentError, "Missing the required parameter 'payroll_calendar' when calling PayrollAuApi.create_payroll_calendar"
429
+ end
430
+ # resource path
431
+ local_var_path = '/PayrollCalendars'
432
+
433
+ # camelize keys of incoming `where` opts
434
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
435
+
436
+ # query parameters
437
+ query_params = opts[:query_params] || {}
438
+
439
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
440
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
441
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
442
+
443
+ # header parameters
444
+ header_params = opts[:header_params] || {}
445
+ # HTTP header 'Accept' (if needed)
446
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
447
+ # HTTP header 'Content-Type'
448
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
449
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
450
+
451
+ # form parameters
452
+ form_params = opts[:form_params] || {}
453
+
454
+ # http body (model)
455
+ post_body = opts[:body] || @api_client.object_to_http_body(payroll_calendar)
456
+
457
+ # return_type
458
+ return_type = opts[:return_type] || 'PayrollCalendars'
459
+
460
+ # auth_names
461
+ auth_names = opts[:auth_names] || ['OAuth2']
462
+
463
+ new_options = opts.merge(
464
+ :header_params => header_params,
465
+ :query_params => query_params,
466
+ :form_params => form_params,
467
+ :body => post_body,
468
+ :auth_names => auth_names,
469
+ :return_type => return_type
470
+ )
471
+
472
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
473
+ if @api_client.config.debugging
474
+ @api_client.config.logger.debug "API called: PayrollAuApi#create_payroll_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
475
+ end
476
+ return data, status_code, headers
477
+ end
478
+
479
+ # Creates a superfund
480
+ # @param xero_tenant_id [String] Xero identifier for Tenant
481
+ # @param super_fund [Array<SuperFund>]
482
+ # @param [Hash] opts the optional parameters
483
+ # @return [SuperFunds]
484
+ def create_superfund(xero_tenant_id, super_fund, opts = {})
485
+ data, _status_code, _headers = create_superfund_with_http_info(xero_tenant_id, super_fund, opts)
486
+ data
487
+ end
488
+
489
+ # Creates a superfund
490
+ # @param xero_tenant_id [String] Xero identifier for Tenant
491
+ # @param super_fund [Array<SuperFund>]
492
+ # @param [Hash] opts the optional parameters
493
+ # @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
494
+ def create_superfund_with_http_info(xero_tenant_id, super_fund, options = {})
495
+ opts = options.dup
496
+ if @api_client.config.debugging
497
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_superfund ...'
498
+ end
499
+ # verify the required parameter 'xero_tenant_id' is set
500
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
501
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_superfund"
502
+ end
503
+ # verify the required parameter 'super_fund' is set
504
+ if @api_client.config.client_side_validation && super_fund.nil?
505
+ fail ArgumentError, "Missing the required parameter 'super_fund' when calling PayrollAuApi.create_superfund"
506
+ end
507
+ # resource path
508
+ local_var_path = '/Superfunds'
509
+
510
+ # camelize keys of incoming `where` opts
511
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
512
+
513
+ # query parameters
514
+ query_params = opts[:query_params] || {}
515
+
516
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
517
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
518
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
519
+
520
+ # header parameters
521
+ header_params = opts[:header_params] || {}
522
+ # HTTP header 'Accept' (if needed)
523
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
524
+ # HTTP header 'Content-Type'
525
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
526
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
527
+
528
+ # form parameters
529
+ form_params = opts[:form_params] || {}
530
+
531
+ # http body (model)
532
+ post_body = opts[:body] || @api_client.object_to_http_body(super_fund)
533
+
534
+ # return_type
535
+ return_type = opts[:return_type] || 'SuperFunds'
536
+
537
+ # auth_names
538
+ auth_names = opts[:auth_names] || ['OAuth2']
539
+
540
+ new_options = opts.merge(
541
+ :header_params => header_params,
542
+ :query_params => query_params,
543
+ :form_params => form_params,
544
+ :body => post_body,
545
+ :auth_names => auth_names,
546
+ :return_type => return_type
547
+ )
548
+
549
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
550
+ if @api_client.config.debugging
551
+ @api_client.config.logger.debug "API called: PayrollAuApi#create_superfund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
552
+ end
553
+ return data, status_code, headers
554
+ end
555
+
556
+ # Creates a timesheet
557
+ # @param xero_tenant_id [String] Xero identifier for Tenant
558
+ # @param timesheet [Array<Timesheet>]
559
+ # @param [Hash] opts the optional parameters
560
+ # @return [Timesheets]
561
+ def create_timesheet(xero_tenant_id, timesheet, opts = {})
562
+ data, _status_code, _headers = create_timesheet_with_http_info(xero_tenant_id, timesheet, opts)
563
+ data
564
+ end
565
+
566
+ # Creates a timesheet
567
+ # @param xero_tenant_id [String] Xero identifier for Tenant
568
+ # @param timesheet [Array<Timesheet>]
569
+ # @param [Hash] opts the optional parameters
570
+ # @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
571
+ def create_timesheet_with_http_info(xero_tenant_id, timesheet, options = {})
572
+ opts = options.dup
573
+ if @api_client.config.debugging
574
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_timesheet ...'
575
+ end
576
+ # verify the required parameter 'xero_tenant_id' is set
577
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
578
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_timesheet"
579
+ end
580
+ # verify the required parameter 'timesheet' is set
581
+ if @api_client.config.client_side_validation && timesheet.nil?
582
+ fail ArgumentError, "Missing the required parameter 'timesheet' when calling PayrollAuApi.create_timesheet"
583
+ end
584
+ # resource path
585
+ local_var_path = '/Timesheets'
586
+
587
+ # camelize keys of incoming `where` opts
588
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
589
+
590
+ # query parameters
591
+ query_params = opts[:query_params] || {}
592
+
593
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
594
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
595
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
596
+
597
+ # header parameters
598
+ header_params = opts[:header_params] || {}
599
+ # HTTP header 'Accept' (if needed)
600
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
601
+ # HTTP header 'Content-Type'
602
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
603
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
604
+
605
+ # form parameters
606
+ form_params = opts[:form_params] || {}
607
+
608
+ # http body (model)
609
+ post_body = opts[:body] || @api_client.object_to_http_body(timesheet)
610
+
611
+ # return_type
612
+ return_type = opts[:return_type] || 'Timesheets'
613
+
614
+ # auth_names
615
+ auth_names = opts[:auth_names] || ['OAuth2']
616
+
617
+ new_options = opts.merge(
618
+ :header_params => header_params,
619
+ :query_params => query_params,
620
+ :form_params => form_params,
621
+ :body => post_body,
622
+ :auth_names => auth_names,
623
+ :return_type => return_type
624
+ )
625
+
626
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
627
+ if @api_client.config.debugging
628
+ @api_client.config.logger.debug "API called: PayrollAuApi#create_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
629
+ end
630
+ return data, status_code, headers
631
+ end
632
+
633
+ # Retrieves an employee's detail by unique employee id
634
+ # @param xero_tenant_id [String] Xero identifier for Tenant
635
+ # @param employee_id [String] Employee id for single object
636
+ # @param [Hash] opts the optional parameters
637
+ # @return [Employees]
638
+ def get_employee(xero_tenant_id, employee_id, opts = {})
639
+ data, _status_code, _headers = get_employee_with_http_info(xero_tenant_id, employee_id, opts)
640
+ data
641
+ end
642
+
643
+ # Retrieves an employee&#39;s detail by unique employee id
644
+ # @param xero_tenant_id [String] Xero identifier for Tenant
645
+ # @param employee_id [String] Employee id for single object
646
+ # @param [Hash] opts the optional parameters
647
+ # @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
648
+ def get_employee_with_http_info(xero_tenant_id, employee_id, options = {})
649
+ opts = options.dup
650
+ if @api_client.config.debugging
651
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_employee ...'
652
+ end
653
+ # verify the required parameter 'xero_tenant_id' is set
654
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
655
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_employee"
656
+ end
657
+ # verify the required parameter 'employee_id' is set
658
+ if @api_client.config.client_side_validation && employee_id.nil?
659
+ fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollAuApi.get_employee"
660
+ end
661
+ # resource path
662
+ local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
663
+
664
+ # camelize keys of incoming `where` opts
665
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
666
+
667
+ # query parameters
668
+ query_params = opts[:query_params] || {}
669
+
670
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
671
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
672
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
673
+
674
+ # header parameters
675
+ header_params = opts[:header_params] || {}
676
+ # HTTP header 'Accept' (if needed)
677
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
678
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
679
+
680
+ # form parameters
681
+ form_params = opts[:form_params] || {}
682
+
683
+ # http body (model)
684
+ post_body = opts[:body]
685
+
686
+ # return_type
687
+ return_type = opts[:return_type] || 'Employees'
688
+
689
+ # auth_names
690
+ auth_names = opts[:auth_names] || ['OAuth2']
691
+
692
+ new_options = opts.merge(
693
+ :header_params => header_params,
694
+ :query_params => query_params,
695
+ :form_params => form_params,
696
+ :body => post_body,
697
+ :auth_names => auth_names,
698
+ :return_type => return_type
699
+ )
700
+
701
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
702
+ if @api_client.config.debugging
703
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
704
+ end
705
+ return data, status_code, headers
706
+ end
707
+
708
+ # Searches payroll employees
709
+ # @param xero_tenant_id [String] Xero identifier for Tenant
710
+ # @param [Hash] opts the optional parameters
711
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
712
+ # @option opts [String] :where Filter by an any element
713
+ # @option opts [String] :order Order by an any element
714
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 employees will be returned in a single API call
715
+ # @return [Employees]
716
+ def get_employees(xero_tenant_id, opts = {})
717
+ data, _status_code, _headers = get_employees_with_http_info(xero_tenant_id, opts)
718
+ data
719
+ end
720
+
721
+ # Searches payroll employees
722
+ # @param xero_tenant_id [String] Xero identifier for Tenant
723
+ # @param [Hash] opts the optional parameters
724
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
725
+ # @option opts [String] :where Filter by an any element
726
+ # @option opts [String] :order Order by an any element
727
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 employees will be returned in a single API call
728
+ # @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
729
+ def get_employees_with_http_info(xero_tenant_id, options = {})
730
+ opts = options.dup
731
+ if @api_client.config.debugging
732
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_employees ...'
733
+ end
734
+ # verify the required parameter 'xero_tenant_id' is set
735
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
736
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_employees"
737
+ end
738
+ # resource path
739
+ local_var_path = '/Employees'
740
+
741
+ # camelize keys of incoming `where` opts
742
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
743
+
744
+ # query parameters
745
+ query_params = opts[:query_params] || {}
746
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
747
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
748
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
749
+
750
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
751
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
752
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
753
+
754
+ # header parameters
755
+ header_params = opts[:header_params] || {}
756
+ # HTTP header 'Accept' (if needed)
757
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
758
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
759
+ header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
760
+
761
+ # form parameters
762
+ form_params = opts[:form_params] || {}
763
+
764
+ # http body (model)
765
+ post_body = opts[:body]
766
+
767
+ # return_type
768
+ return_type = opts[:return_type] || 'Employees'
769
+
770
+ # auth_names
771
+ auth_names = opts[:auth_names] || ['OAuth2']
772
+
773
+ new_options = opts.merge(
774
+ :header_params => header_params,
775
+ :query_params => query_params,
776
+ :form_params => form_params,
777
+ :body => post_body,
778
+ :auth_names => auth_names,
779
+ :return_type => return_type
780
+ )
781
+
782
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
783
+ if @api_client.config.debugging
784
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
785
+ end
786
+ return data, status_code, headers
787
+ end
788
+
789
+ # Retrieves a leave application by a unique leave application id
790
+ # @param xero_tenant_id [String] Xero identifier for Tenant
791
+ # @param leave_application_id [String] Leave Application id for single object
792
+ # @param [Hash] opts the optional parameters
793
+ # @return [LeaveApplications]
794
+ def get_leave_application(xero_tenant_id, leave_application_id, opts = {})
795
+ data, _status_code, _headers = get_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
796
+ data
797
+ end
798
+
799
+ # Retrieves a leave application by a unique leave application id
800
+ # @param xero_tenant_id [String] Xero identifier for Tenant
801
+ # @param leave_application_id [String] Leave Application id for single object
802
+ # @param [Hash] opts the optional parameters
803
+ # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
804
+ def get_leave_application_with_http_info(xero_tenant_id, leave_application_id, options = {})
805
+ opts = options.dup
806
+ if @api_client.config.debugging
807
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_leave_application ...'
808
+ end
809
+ # verify the required parameter 'xero_tenant_id' is set
810
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
811
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_leave_application"
812
+ end
813
+ # verify the required parameter 'leave_application_id' is set
814
+ if @api_client.config.client_side_validation && leave_application_id.nil?
815
+ fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.get_leave_application"
816
+ end
817
+ # resource path
818
+ local_var_path = '/LeaveApplications/{LeaveApplicationID}'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)
819
+
820
+ # camelize keys of incoming `where` opts
821
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
822
+
823
+ # query parameters
824
+ query_params = opts[:query_params] || {}
825
+
826
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
827
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
828
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
829
+
830
+ # header parameters
831
+ header_params = opts[:header_params] || {}
832
+ # HTTP header 'Accept' (if needed)
833
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
834
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
835
+
836
+ # form parameters
837
+ form_params = opts[:form_params] || {}
838
+
839
+ # http body (model)
840
+ post_body = opts[:body]
841
+
842
+ # return_type
843
+ return_type = opts[:return_type] || 'LeaveApplications'
844
+
845
+ # auth_names
846
+ auth_names = opts[:auth_names] || ['OAuth2']
847
+
848
+ new_options = opts.merge(
849
+ :header_params => header_params,
850
+ :query_params => query_params,
851
+ :form_params => form_params,
852
+ :body => post_body,
853
+ :auth_names => auth_names,
854
+ :return_type => return_type
855
+ )
856
+
857
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
858
+ if @api_client.config.debugging
859
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
860
+ end
861
+ return data, status_code, headers
862
+ end
863
+
864
+ # Retrieves leave applications
865
+ # @param xero_tenant_id [String] Xero identifier for Tenant
866
+ # @param [Hash] opts the optional parameters
867
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
868
+ # @option opts [String] :where Filter by an any element
869
+ # @option opts [String] :order Order by an any element
870
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
871
+ # @return [LeaveApplications]
872
+ def get_leave_applications(xero_tenant_id, opts = {})
873
+ data, _status_code, _headers = get_leave_applications_with_http_info(xero_tenant_id, opts)
874
+ data
875
+ end
876
+
877
+ # Retrieves leave applications
878
+ # @param xero_tenant_id [String] Xero identifier for Tenant
879
+ # @param [Hash] opts the optional parameters
880
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
881
+ # @option opts [String] :where Filter by an any element
882
+ # @option opts [String] :order Order by an any element
883
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
884
+ # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
885
+ def get_leave_applications_with_http_info(xero_tenant_id, options = {})
886
+ opts = options.dup
887
+ if @api_client.config.debugging
888
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_leave_applications ...'
889
+ end
890
+ # verify the required parameter 'xero_tenant_id' is set
891
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
892
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_leave_applications"
893
+ end
894
+ # resource path
895
+ local_var_path = '/LeaveApplications'
896
+
897
+ # camelize keys of incoming `where` opts
898
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
899
+
900
+ # query parameters
901
+ query_params = opts[:query_params] || {}
902
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
903
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
904
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
905
+
906
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
907
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
908
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
909
+
910
+ # header parameters
911
+ header_params = opts[:header_params] || {}
912
+ # HTTP header 'Accept' (if needed)
913
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
914
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
915
+ header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
916
+
917
+ # form parameters
918
+ form_params = opts[:form_params] || {}
919
+
920
+ # http body (model)
921
+ post_body = opts[:body]
922
+
923
+ # return_type
924
+ return_type = opts[:return_type] || 'LeaveApplications'
925
+
926
+ # auth_names
927
+ auth_names = opts[:auth_names] || ['OAuth2']
928
+
929
+ new_options = opts.merge(
930
+ :header_params => header_params,
931
+ :query_params => query_params,
932
+ :form_params => form_params,
933
+ :body => post_body,
934
+ :auth_names => auth_names,
935
+ :return_type => return_type
936
+ )
937
+
938
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
939
+ if @api_client.config.debugging
940
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_leave_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
941
+ end
942
+ return data, status_code, headers
943
+ end
944
+
945
+ # Retrieves leave applications including leave requests
946
+ # @param xero_tenant_id [String] Xero identifier for Tenant
947
+ # @param [Hash] opts the optional parameters
948
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
949
+ # @option opts [String] :where Filter by an any element
950
+ # @option opts [String] :order Order by an any element
951
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
952
+ # @return [LeaveApplications]
953
+ def get_leave_applications_v2(xero_tenant_id, opts = {})
954
+ data, _status_code, _headers = get_leave_applications_v2_with_http_info(xero_tenant_id, opts)
955
+ data
956
+ end
957
+
958
+ # Retrieves leave applications including leave requests
959
+ # @param xero_tenant_id [String] Xero identifier for Tenant
960
+ # @param [Hash] opts the optional parameters
961
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
962
+ # @option opts [String] :where Filter by an any element
963
+ # @option opts [String] :order Order by an any element
964
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
965
+ # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
966
+ def get_leave_applications_v2_with_http_info(xero_tenant_id, options = {})
967
+ opts = options.dup
968
+ if @api_client.config.debugging
969
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_leave_applications_v2 ...'
970
+ end
971
+ # verify the required parameter 'xero_tenant_id' is set
972
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
973
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_leave_applications_v2"
974
+ end
975
+ # resource path
976
+ local_var_path = '/LeaveApplications/v2'
977
+
978
+ # camelize keys of incoming `where` opts
979
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
980
+
981
+ # query parameters
982
+ query_params = opts[:query_params] || {}
983
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
984
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
985
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
986
+
987
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
988
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
989
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
990
+
991
+ # header parameters
992
+ header_params = opts[:header_params] || {}
993
+ # HTTP header 'Accept' (if needed)
994
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
995
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
996
+ header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
997
+
998
+ # form parameters
999
+ form_params = opts[:form_params] || {}
1000
+
1001
+ # http body (model)
1002
+ post_body = opts[:body]
1003
+
1004
+ # return_type
1005
+ return_type = opts[:return_type] || 'LeaveApplications'
1006
+
1007
+ # auth_names
1008
+ auth_names = opts[:auth_names] || ['OAuth2']
1009
+
1010
+ new_options = opts.merge(
1011
+ :header_params => header_params,
1012
+ :query_params => query_params,
1013
+ :form_params => form_params,
1014
+ :body => post_body,
1015
+ :auth_names => auth_names,
1016
+ :return_type => return_type
1017
+ )
1018
+
1019
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1020
+ if @api_client.config.debugging
1021
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_leave_applications_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1022
+ end
1023
+ return data, status_code, headers
1024
+ end
1025
+
1026
+ # Retrieves pay items
1027
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1028
+ # @param [Hash] opts the optional parameters
1029
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1030
+ # @option opts [String] :where Filter by an any element
1031
+ # @option opts [String] :order Order by an any element
1032
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
1033
+ # @return [PayItems]
1034
+ def get_pay_items(xero_tenant_id, opts = {})
1035
+ data, _status_code, _headers = get_pay_items_with_http_info(xero_tenant_id, opts)
1036
+ data
1037
+ end
1038
+
1039
+ # Retrieves pay items
1040
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1041
+ # @param [Hash] opts the optional parameters
1042
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1043
+ # @option opts [String] :where Filter by an any element
1044
+ # @option opts [String] :order Order by an any element
1045
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
1046
+ # @return [Array<(PayItems, Integer, Hash)>] PayItems data, response status code and response headers
1047
+ def get_pay_items_with_http_info(xero_tenant_id, options = {})
1048
+ opts = options.dup
1049
+ if @api_client.config.debugging
1050
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_pay_items ...'
1051
+ end
1052
+ # verify the required parameter 'xero_tenant_id' is set
1053
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1054
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_pay_items"
1055
+ end
1056
+ # resource path
1057
+ local_var_path = '/PayItems'
1058
+
1059
+ # camelize keys of incoming `where` opts
1060
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1061
+
1062
+ # query parameters
1063
+ query_params = opts[:query_params] || {}
1064
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
1065
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1066
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1067
+
1068
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1069
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1070
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1071
+
1072
+ # header parameters
1073
+ header_params = opts[:header_params] || {}
1074
+ # HTTP header 'Accept' (if needed)
1075
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1076
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1077
+ header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
1078
+
1079
+ # form parameters
1080
+ form_params = opts[:form_params] || {}
1081
+
1082
+ # http body (model)
1083
+ post_body = opts[:body]
1084
+
1085
+ # return_type
1086
+ return_type = opts[:return_type] || 'PayItems'
1087
+
1088
+ # auth_names
1089
+ auth_names = opts[:auth_names] || ['OAuth2']
1090
+
1091
+ new_options = opts.merge(
1092
+ :header_params => header_params,
1093
+ :query_params => query_params,
1094
+ :form_params => form_params,
1095
+ :body => post_body,
1096
+ :auth_names => auth_names,
1097
+ :return_type => return_type
1098
+ )
1099
+
1100
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1101
+ if @api_client.config.debugging
1102
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_pay_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1103
+ end
1104
+ return data, status_code, headers
1105
+ end
1106
+
1107
+ # Retrieves a pay run by using a unique pay run id
1108
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1109
+ # @param pay_run_id [String] PayRun id for single object
1110
+ # @param [Hash] opts the optional parameters
1111
+ # @return [PayRuns]
1112
+ def get_pay_run(xero_tenant_id, pay_run_id, opts = {})
1113
+ data, _status_code, _headers = get_pay_run_with_http_info(xero_tenant_id, pay_run_id, opts)
1114
+ data
1115
+ end
1116
+
1117
+ # Retrieves a pay run by using a unique pay run id
1118
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1119
+ # @param pay_run_id [String] PayRun id for single object
1120
+ # @param [Hash] opts the optional parameters
1121
+ # @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
1122
+ def get_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {})
1123
+ opts = options.dup
1124
+ if @api_client.config.debugging
1125
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_pay_run ...'
1126
+ end
1127
+ # verify the required parameter 'xero_tenant_id' is set
1128
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1129
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_pay_run"
1130
+ end
1131
+ # verify the required parameter 'pay_run_id' is set
1132
+ if @api_client.config.client_side_validation && pay_run_id.nil?
1133
+ fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollAuApi.get_pay_run"
1134
+ end
1135
+ # resource path
1136
+ local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)
1137
+
1138
+ # camelize keys of incoming `where` opts
1139
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1140
+
1141
+ # query parameters
1142
+ query_params = opts[:query_params] || {}
1143
+
1144
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1145
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1146
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1147
+
1148
+ # header parameters
1149
+ header_params = opts[:header_params] || {}
1150
+ # HTTP header 'Accept' (if needed)
1151
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1152
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1153
+
1154
+ # form parameters
1155
+ form_params = opts[:form_params] || {}
1156
+
1157
+ # http body (model)
1158
+ post_body = opts[:body]
1159
+
1160
+ # return_type
1161
+ return_type = opts[:return_type] || 'PayRuns'
1162
+
1163
+ # auth_names
1164
+ auth_names = opts[:auth_names] || ['OAuth2']
1165
+
1166
+ new_options = opts.merge(
1167
+ :header_params => header_params,
1168
+ :query_params => query_params,
1169
+ :form_params => form_params,
1170
+ :body => post_body,
1171
+ :auth_names => auth_names,
1172
+ :return_type => return_type
1173
+ )
1174
+
1175
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1176
+ if @api_client.config.debugging
1177
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1178
+ end
1179
+ return data, status_code, headers
1180
+ end
1181
+
1182
+ # Retrieves pay runs
1183
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1184
+ # @param [Hash] opts the optional parameters
1185
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1186
+ # @option opts [String] :where Filter by an any element
1187
+ # @option opts [String] :order Order by an any element
1188
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 PayRuns will be returned in a single API call
1189
+ # @return [PayRuns]
1190
+ def get_pay_runs(xero_tenant_id, opts = {})
1191
+ data, _status_code, _headers = get_pay_runs_with_http_info(xero_tenant_id, opts)
1192
+ data
1193
+ end
1194
+
1195
+ # Retrieves pay runs
1196
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1197
+ # @param [Hash] opts the optional parameters
1198
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1199
+ # @option opts [String] :where Filter by an any element
1200
+ # @option opts [String] :order Order by an any element
1201
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 PayRuns will be returned in a single API call
1202
+ # @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
1203
+ def get_pay_runs_with_http_info(xero_tenant_id, options = {})
1204
+ opts = options.dup
1205
+ if @api_client.config.debugging
1206
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_pay_runs ...'
1207
+ end
1208
+ # verify the required parameter 'xero_tenant_id' is set
1209
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1210
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_pay_runs"
1211
+ end
1212
+ # resource path
1213
+ local_var_path = '/PayRuns'
1214
+
1215
+ # camelize keys of incoming `where` opts
1216
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1217
+
1218
+ # query parameters
1219
+ query_params = opts[:query_params] || {}
1220
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
1221
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1222
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1223
+
1224
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1225
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1226
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1227
+
1228
+ # header parameters
1229
+ header_params = opts[:header_params] || {}
1230
+ # HTTP header 'Accept' (if needed)
1231
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1232
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1233
+ header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
1234
+
1235
+ # form parameters
1236
+ form_params = opts[:form_params] || {}
1237
+
1238
+ # http body (model)
1239
+ post_body = opts[:body]
1240
+
1241
+ # return_type
1242
+ return_type = opts[:return_type] || 'PayRuns'
1243
+
1244
+ # auth_names
1245
+ auth_names = opts[:auth_names] || ['OAuth2']
1246
+
1247
+ new_options = opts.merge(
1248
+ :header_params => header_params,
1249
+ :query_params => query_params,
1250
+ :form_params => form_params,
1251
+ :body => post_body,
1252
+ :auth_names => auth_names,
1253
+ :return_type => return_type
1254
+ )
1255
+
1256
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1257
+ if @api_client.config.debugging
1258
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_pay_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1259
+ end
1260
+ return data, status_code, headers
1261
+ end
1262
+
1263
+ # Retrieves payroll calendar by using a unique payroll calendar ID
1264
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1265
+ # @param payroll_calendar_id [String] Payroll Calendar id for single object
1266
+ # @param [Hash] opts the optional parameters
1267
+ # @return [PayrollCalendars]
1268
+ def get_payroll_calendar(xero_tenant_id, payroll_calendar_id, opts = {})
1269
+ data, _status_code, _headers = get_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar_id, opts)
1270
+ data
1271
+ end
1272
+
1273
+ # Retrieves payroll calendar by using a unique payroll calendar ID
1274
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1275
+ # @param payroll_calendar_id [String] Payroll Calendar id for single object
1276
+ # @param [Hash] opts the optional parameters
1277
+ # @return [Array<(PayrollCalendars, Integer, Hash)>] PayrollCalendars data, response status code and response headers
1278
+ def get_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar_id, options = {})
1279
+ opts = options.dup
1280
+ if @api_client.config.debugging
1281
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_payroll_calendar ...'
1282
+ end
1283
+ # verify the required parameter 'xero_tenant_id' is set
1284
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1285
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_payroll_calendar"
1286
+ end
1287
+ # verify the required parameter 'payroll_calendar_id' is set
1288
+ if @api_client.config.client_side_validation && payroll_calendar_id.nil?
1289
+ fail ArgumentError, "Missing the required parameter 'payroll_calendar_id' when calling PayrollAuApi.get_payroll_calendar"
1290
+ end
1291
+ # resource path
1292
+ local_var_path = '/PayrollCalendars/{PayrollCalendarID}'.sub('{' + 'PayrollCalendarID' + '}', payroll_calendar_id.to_s)
1293
+
1294
+ # camelize keys of incoming `where` opts
1295
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1296
+
1297
+ # query parameters
1298
+ query_params = opts[:query_params] || {}
1299
+
1300
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1301
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1302
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1303
+
1304
+ # header parameters
1305
+ header_params = opts[:header_params] || {}
1306
+ # HTTP header 'Accept' (if needed)
1307
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1308
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1309
+
1310
+ # form parameters
1311
+ form_params = opts[:form_params] || {}
1312
+
1313
+ # http body (model)
1314
+ post_body = opts[:body]
1315
+
1316
+ # return_type
1317
+ return_type = opts[:return_type] || 'PayrollCalendars'
1318
+
1319
+ # auth_names
1320
+ auth_names = opts[:auth_names] || ['OAuth2']
1321
+
1322
+ new_options = opts.merge(
1323
+ :header_params => header_params,
1324
+ :query_params => query_params,
1325
+ :form_params => form_params,
1326
+ :body => post_body,
1327
+ :auth_names => auth_names,
1328
+ :return_type => return_type
1329
+ )
1330
+
1331
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1332
+ if @api_client.config.debugging
1333
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_payroll_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1334
+ end
1335
+ return data, status_code, headers
1336
+ end
1337
+
1338
+ # Retrieves payroll calendars
1339
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1340
+ # @param [Hash] opts the optional parameters
1341
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1342
+ # @option opts [String] :where Filter by an any element
1343
+ # @option opts [String] :order Order by an any element
1344
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
1345
+ # @return [PayrollCalendars]
1346
+ def get_payroll_calendars(xero_tenant_id, opts = {})
1347
+ data, _status_code, _headers = get_payroll_calendars_with_http_info(xero_tenant_id, opts)
1348
+ data
1349
+ end
1350
+
1351
+ # Retrieves payroll calendars
1352
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1353
+ # @param [Hash] opts the optional parameters
1354
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1355
+ # @option opts [String] :where Filter by an any element
1356
+ # @option opts [String] :order Order by an any element
1357
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call
1358
+ # @return [Array<(PayrollCalendars, Integer, Hash)>] PayrollCalendars data, response status code and response headers
1359
+ def get_payroll_calendars_with_http_info(xero_tenant_id, options = {})
1360
+ opts = options.dup
1361
+ if @api_client.config.debugging
1362
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_payroll_calendars ...'
1363
+ end
1364
+ # verify the required parameter 'xero_tenant_id' is set
1365
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1366
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_payroll_calendars"
1367
+ end
1368
+ # resource path
1369
+ local_var_path = '/PayrollCalendars'
1370
+
1371
+ # camelize keys of incoming `where` opts
1372
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1373
+
1374
+ # query parameters
1375
+ query_params = opts[:query_params] || {}
1376
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
1377
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1378
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1379
+
1380
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1381
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1382
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1383
+
1384
+ # header parameters
1385
+ header_params = opts[:header_params] || {}
1386
+ # HTTP header 'Accept' (if needed)
1387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1388
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1389
+ header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
1390
+
1391
+ # form parameters
1392
+ form_params = opts[:form_params] || {}
1393
+
1394
+ # http body (model)
1395
+ post_body = opts[:body]
1396
+
1397
+ # return_type
1398
+ return_type = opts[:return_type] || 'PayrollCalendars'
1399
+
1400
+ # auth_names
1401
+ auth_names = opts[:auth_names] || ['OAuth2']
1402
+
1403
+ new_options = opts.merge(
1404
+ :header_params => header_params,
1405
+ :query_params => query_params,
1406
+ :form_params => form_params,
1407
+ :body => post_body,
1408
+ :auth_names => auth_names,
1409
+ :return_type => return_type
1410
+ )
1411
+
1412
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1413
+ if @api_client.config.debugging
1414
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_payroll_calendars\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1415
+ end
1416
+ return data, status_code, headers
1417
+ end
1418
+
1419
+ # Retrieves for a payslip by a unique payslip id
1420
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1421
+ # @param payslip_id [String] Payslip id for single object
1422
+ # @param [Hash] opts the optional parameters
1423
+ # @return [PayslipObject]
1424
+ def get_payslip(xero_tenant_id, payslip_id, opts = {})
1425
+ data, _status_code, _headers = get_payslip_with_http_info(xero_tenant_id, payslip_id, opts)
1426
+ data
1427
+ end
1428
+
1429
+ # Retrieves for a payslip by a unique payslip id
1430
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1431
+ # @param payslip_id [String] Payslip id for single object
1432
+ # @param [Hash] opts the optional parameters
1433
+ # @return [Array<(PayslipObject, Integer, Hash)>] PayslipObject data, response status code and response headers
1434
+ def get_payslip_with_http_info(xero_tenant_id, payslip_id, options = {})
1435
+ opts = options.dup
1436
+ if @api_client.config.debugging
1437
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_payslip ...'
1438
+ end
1439
+ # verify the required parameter 'xero_tenant_id' is set
1440
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1441
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_payslip"
1442
+ end
1443
+ # verify the required parameter 'payslip_id' is set
1444
+ if @api_client.config.client_side_validation && payslip_id.nil?
1445
+ fail ArgumentError, "Missing the required parameter 'payslip_id' when calling PayrollAuApi.get_payslip"
1446
+ end
1447
+ # resource path
1448
+ local_var_path = '/Payslip/{PayslipID}'.sub('{' + 'PayslipID' + '}', payslip_id.to_s)
1449
+
1450
+ # camelize keys of incoming `where` opts
1451
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1452
+
1453
+ # query parameters
1454
+ query_params = opts[:query_params] || {}
1455
+
1456
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1457
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1458
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1459
+
1460
+ # header parameters
1461
+ header_params = opts[:header_params] || {}
1462
+ # HTTP header 'Accept' (if needed)
1463
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1464
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1465
+
1466
+ # form parameters
1467
+ form_params = opts[:form_params] || {}
1468
+
1469
+ # http body (model)
1470
+ post_body = opts[:body]
1471
+
1472
+ # return_type
1473
+ return_type = opts[:return_type] || 'PayslipObject'
1474
+
1475
+ # auth_names
1476
+ auth_names = opts[:auth_names] || ['OAuth2']
1477
+
1478
+ new_options = opts.merge(
1479
+ :header_params => header_params,
1480
+ :query_params => query_params,
1481
+ :form_params => form_params,
1482
+ :body => post_body,
1483
+ :auth_names => auth_names,
1484
+ :return_type => return_type
1485
+ )
1486
+
1487
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1488
+ if @api_client.config.debugging
1489
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_payslip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1490
+ end
1491
+ return data, status_code, headers
1492
+ end
1493
+
1494
+ # Retrieves payroll settings
1495
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1496
+ # @param [Hash] opts the optional parameters
1497
+ # @return [SettingsObject]
1498
+ def get_settings(xero_tenant_id, opts = {})
1499
+ data, _status_code, _headers = get_settings_with_http_info(xero_tenant_id, opts)
1500
+ data
1501
+ end
1502
+
1503
+ # Retrieves payroll settings
1504
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1505
+ # @param [Hash] opts the optional parameters
1506
+ # @return [Array<(SettingsObject, Integer, Hash)>] SettingsObject data, response status code and response headers
1507
+ def get_settings_with_http_info(xero_tenant_id, options = {})
1508
+ opts = options.dup
1509
+ if @api_client.config.debugging
1510
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_settings ...'
1511
+ end
1512
+ # verify the required parameter 'xero_tenant_id' is set
1513
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1514
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_settings"
1515
+ end
1516
+ # resource path
1517
+ local_var_path = '/Settings'
1518
+
1519
+ # camelize keys of incoming `where` opts
1520
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1521
+
1522
+ # query parameters
1523
+ query_params = opts[:query_params] || {}
1524
+
1525
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1526
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1527
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1528
+
1529
+ # header parameters
1530
+ header_params = opts[:header_params] || {}
1531
+ # HTTP header 'Accept' (if needed)
1532
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1533
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1534
+
1535
+ # form parameters
1536
+ form_params = opts[:form_params] || {}
1537
+
1538
+ # http body (model)
1539
+ post_body = opts[:body]
1540
+
1541
+ # return_type
1542
+ return_type = opts[:return_type] || 'SettingsObject'
1543
+
1544
+ # auth_names
1545
+ auth_names = opts[:auth_names] || ['OAuth2']
1546
+
1547
+ new_options = opts.merge(
1548
+ :header_params => header_params,
1549
+ :query_params => query_params,
1550
+ :form_params => form_params,
1551
+ :body => post_body,
1552
+ :auth_names => auth_names,
1553
+ :return_type => return_type
1554
+ )
1555
+
1556
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1557
+ if @api_client.config.debugging
1558
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1559
+ end
1560
+ return data, status_code, headers
1561
+ end
1562
+
1563
+ # Retrieves a superfund by using a unique superfund ID
1564
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1565
+ # @param super_fund_id [String] Superfund id for single object
1566
+ # @param [Hash] opts the optional parameters
1567
+ # @return [SuperFunds]
1568
+ def get_superfund(xero_tenant_id, super_fund_id, opts = {})
1569
+ data, _status_code, _headers = get_superfund_with_http_info(xero_tenant_id, super_fund_id, opts)
1570
+ data
1571
+ end
1572
+
1573
+ # Retrieves a superfund by using a unique superfund ID
1574
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1575
+ # @param super_fund_id [String] Superfund id for single object
1576
+ # @param [Hash] opts the optional parameters
1577
+ # @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
1578
+ def get_superfund_with_http_info(xero_tenant_id, super_fund_id, options = {})
1579
+ opts = options.dup
1580
+ if @api_client.config.debugging
1581
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_superfund ...'
1582
+ end
1583
+ # verify the required parameter 'xero_tenant_id' is set
1584
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1585
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_superfund"
1586
+ end
1587
+ # verify the required parameter 'super_fund_id' is set
1588
+ if @api_client.config.client_side_validation && super_fund_id.nil?
1589
+ fail ArgumentError, "Missing the required parameter 'super_fund_id' when calling PayrollAuApi.get_superfund"
1590
+ end
1591
+ # resource path
1592
+ local_var_path = '/Superfunds/{SuperFundID}'.sub('{' + 'SuperFundID' + '}', super_fund_id.to_s)
1593
+
1594
+ # camelize keys of incoming `where` opts
1595
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1596
+
1597
+ # query parameters
1598
+ query_params = opts[:query_params] || {}
1599
+
1600
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1601
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1602
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1603
+
1604
+ # header parameters
1605
+ header_params = opts[:header_params] || {}
1606
+ # HTTP header 'Accept' (if needed)
1607
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1608
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1609
+
1610
+ # form parameters
1611
+ form_params = opts[:form_params] || {}
1612
+
1613
+ # http body (model)
1614
+ post_body = opts[:body]
1615
+
1616
+ # return_type
1617
+ return_type = opts[:return_type] || 'SuperFunds'
1618
+
1619
+ # auth_names
1620
+ auth_names = opts[:auth_names] || ['OAuth2']
1621
+
1622
+ new_options = opts.merge(
1623
+ :header_params => header_params,
1624
+ :query_params => query_params,
1625
+ :form_params => form_params,
1626
+ :body => post_body,
1627
+ :auth_names => auth_names,
1628
+ :return_type => return_type
1629
+ )
1630
+
1631
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1632
+ if @api_client.config.debugging
1633
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_superfund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1634
+ end
1635
+ return data, status_code, headers
1636
+ end
1637
+
1638
+ # Retrieves superfund products
1639
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1640
+ # @param [Hash] opts the optional parameters
1641
+ # @option opts [String] :abn The ABN of the Regulated SuperFund
1642
+ # @option opts [String] :usi The USI of the Regulated SuperFund
1643
+ # @return [SuperFundProducts]
1644
+ def get_superfund_products(xero_tenant_id, opts = {})
1645
+ data, _status_code, _headers = get_superfund_products_with_http_info(xero_tenant_id, opts)
1646
+ data
1647
+ end
1648
+
1649
+ # Retrieves superfund products
1650
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1651
+ # @param [Hash] opts the optional parameters
1652
+ # @option opts [String] :abn The ABN of the Regulated SuperFund
1653
+ # @option opts [String] :usi The USI of the Regulated SuperFund
1654
+ # @return [Array<(SuperFundProducts, Integer, Hash)>] SuperFundProducts data, response status code and response headers
1655
+ def get_superfund_products_with_http_info(xero_tenant_id, options = {})
1656
+ opts = options.dup
1657
+ if @api_client.config.debugging
1658
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_superfund_products ...'
1659
+ end
1660
+ # verify the required parameter 'xero_tenant_id' is set
1661
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1662
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_superfund_products"
1663
+ end
1664
+ # resource path
1665
+ local_var_path = '/SuperfundProducts'
1666
+
1667
+ # camelize keys of incoming `where` opts
1668
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1669
+
1670
+ # query parameters
1671
+ query_params = opts[:query_params] || {}
1672
+ query_params[:'ABN'] = opts[:'abn'] if !opts[:'abn'].nil?
1673
+ query_params[:'USI'] = opts[:'usi'] if !opts[:'usi'].nil?
1674
+
1675
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1676
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1677
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1678
+
1679
+ # header parameters
1680
+ header_params = opts[:header_params] || {}
1681
+ # HTTP header 'Accept' (if needed)
1682
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1683
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1684
+
1685
+ # form parameters
1686
+ form_params = opts[:form_params] || {}
1687
+
1688
+ # http body (model)
1689
+ post_body = opts[:body]
1690
+
1691
+ # return_type
1692
+ return_type = opts[:return_type] || 'SuperFundProducts'
1693
+
1694
+ # auth_names
1695
+ auth_names = opts[:auth_names] || ['OAuth2']
1696
+
1697
+ new_options = opts.merge(
1698
+ :header_params => header_params,
1699
+ :query_params => query_params,
1700
+ :form_params => form_params,
1701
+ :body => post_body,
1702
+ :auth_names => auth_names,
1703
+ :return_type => return_type
1704
+ )
1705
+
1706
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1707
+ if @api_client.config.debugging
1708
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_superfund_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1709
+ end
1710
+ return data, status_code, headers
1711
+ end
1712
+
1713
+ # Retrieves superfunds
1714
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1715
+ # @param [Hash] opts the optional parameters
1716
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1717
+ # @option opts [String] :where Filter by an any element
1718
+ # @option opts [String] :order Order by an any element
1719
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 SuperFunds will be returned in a single API call
1720
+ # @return [SuperFunds]
1721
+ def get_superfunds(xero_tenant_id, opts = {})
1722
+ data, _status_code, _headers = get_superfunds_with_http_info(xero_tenant_id, opts)
1723
+ data
1724
+ end
1725
+
1726
+ # Retrieves superfunds
1727
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1728
+ # @param [Hash] opts the optional parameters
1729
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1730
+ # @option opts [String] :where Filter by an any element
1731
+ # @option opts [String] :order Order by an any element
1732
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 SuperFunds will be returned in a single API call
1733
+ # @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
1734
+ def get_superfunds_with_http_info(xero_tenant_id, options = {})
1735
+ opts = options.dup
1736
+ if @api_client.config.debugging
1737
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_superfunds ...'
1738
+ end
1739
+ # verify the required parameter 'xero_tenant_id' is set
1740
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1741
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_superfunds"
1742
+ end
1743
+ # resource path
1744
+ local_var_path = '/Superfunds'
1745
+
1746
+ # camelize keys of incoming `where` opts
1747
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1748
+
1749
+ # query parameters
1750
+ query_params = opts[:query_params] || {}
1751
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
1752
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1753
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1754
+
1755
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1756
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1757
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1758
+
1759
+ # header parameters
1760
+ header_params = opts[:header_params] || {}
1761
+ # HTTP header 'Accept' (if needed)
1762
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1763
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1764
+ header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
1765
+
1766
+ # form parameters
1767
+ form_params = opts[:form_params] || {}
1768
+
1769
+ # http body (model)
1770
+ post_body = opts[:body]
1771
+
1772
+ # return_type
1773
+ return_type = opts[:return_type] || 'SuperFunds'
1774
+
1775
+ # auth_names
1776
+ auth_names = opts[:auth_names] || ['OAuth2']
1777
+
1778
+ new_options = opts.merge(
1779
+ :header_params => header_params,
1780
+ :query_params => query_params,
1781
+ :form_params => form_params,
1782
+ :body => post_body,
1783
+ :auth_names => auth_names,
1784
+ :return_type => return_type
1785
+ )
1786
+
1787
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1788
+ if @api_client.config.debugging
1789
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_superfunds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1790
+ end
1791
+ return data, status_code, headers
1792
+ end
1793
+
1794
+ # Retrieves a timesheet by using a unique timesheet id
1795
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1796
+ # @param timesheet_id [String] Timesheet id for single object
1797
+ # @param [Hash] opts the optional parameters
1798
+ # @return [TimesheetObject]
1799
+ def get_timesheet(xero_tenant_id, timesheet_id, opts = {})
1800
+ data, _status_code, _headers = get_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
1801
+ data
1802
+ end
1803
+
1804
+ # Retrieves a timesheet by using a unique timesheet id
1805
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1806
+ # @param timesheet_id [String] Timesheet id for single object
1807
+ # @param [Hash] opts the optional parameters
1808
+ # @return [Array<(TimesheetObject, Integer, Hash)>] TimesheetObject data, response status code and response headers
1809
+ def get_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
1810
+ opts = options.dup
1811
+ if @api_client.config.debugging
1812
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_timesheet ...'
1813
+ end
1814
+ # verify the required parameter 'xero_tenant_id' is set
1815
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1816
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_timesheet"
1817
+ end
1818
+ # verify the required parameter 'timesheet_id' is set
1819
+ if @api_client.config.client_side_validation && timesheet_id.nil?
1820
+ fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollAuApi.get_timesheet"
1821
+ end
1822
+ # resource path
1823
+ local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)
1824
+
1825
+ # camelize keys of incoming `where` opts
1826
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1827
+
1828
+ # query parameters
1829
+ query_params = opts[:query_params] || {}
1830
+
1831
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1832
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1833
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1834
+
1835
+ # header parameters
1836
+ header_params = opts[:header_params] || {}
1837
+ # HTTP header 'Accept' (if needed)
1838
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1839
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1840
+
1841
+ # form parameters
1842
+ form_params = opts[:form_params] || {}
1843
+
1844
+ # http body (model)
1845
+ post_body = opts[:body]
1846
+
1847
+ # return_type
1848
+ return_type = opts[:return_type] || 'TimesheetObject'
1849
+
1850
+ # auth_names
1851
+ auth_names = opts[:auth_names] || ['OAuth2']
1852
+
1853
+ new_options = opts.merge(
1854
+ :header_params => header_params,
1855
+ :query_params => query_params,
1856
+ :form_params => form_params,
1857
+ :body => post_body,
1858
+ :auth_names => auth_names,
1859
+ :return_type => return_type
1860
+ )
1861
+
1862
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1863
+ if @api_client.config.debugging
1864
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1865
+ end
1866
+ return data, status_code, headers
1867
+ end
1868
+
1869
+ # Retrieves timesheets
1870
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1871
+ # @param [Hash] opts the optional parameters
1872
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1873
+ # @option opts [String] :where Filter by an any element
1874
+ # @option opts [String] :order Order by an any element
1875
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 timesheets will be returned in a single API call
1876
+ # @return [Timesheets]
1877
+ def get_timesheets(xero_tenant_id, opts = {})
1878
+ data, _status_code, _headers = get_timesheets_with_http_info(xero_tenant_id, opts)
1879
+ data
1880
+ end
1881
+
1882
+ # Retrieves timesheets
1883
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1884
+ # @param [Hash] opts the optional parameters
1885
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1886
+ # @option opts [String] :where Filter by an any element
1887
+ # @option opts [String] :order Order by an any element
1888
+ # @option opts [Integer] :page e.g. page&#x3D;1 Up to 100 timesheets will be returned in a single API call
1889
+ # @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
1890
+ def get_timesheets_with_http_info(xero_tenant_id, options = {})
1891
+ opts = options.dup
1892
+ if @api_client.config.debugging
1893
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_timesheets ...'
1894
+ end
1895
+ # verify the required parameter 'xero_tenant_id' is set
1896
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1897
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_timesheets"
1898
+ end
1899
+ # resource path
1900
+ local_var_path = '/Timesheets'
1901
+
1902
+ # camelize keys of incoming `where` opts
1903
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1904
+
1905
+ # query parameters
1906
+ query_params = opts[:query_params] || {}
1907
+ query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
1908
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1909
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1910
+
1911
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1912
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1913
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1914
+
1915
+ # header parameters
1916
+ header_params = opts[:header_params] || {}
1917
+ # HTTP header 'Accept' (if needed)
1918
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1919
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1920
+ header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
1921
+
1922
+ # form parameters
1923
+ form_params = opts[:form_params] || {}
1924
+
1925
+ # http body (model)
1926
+ post_body = opts[:body]
1927
+
1928
+ # return_type
1929
+ return_type = opts[:return_type] || 'Timesheets'
1930
+
1931
+ # auth_names
1932
+ auth_names = opts[:auth_names] || ['OAuth2']
1933
+
1934
+ new_options = opts.merge(
1935
+ :header_params => header_params,
1936
+ :query_params => query_params,
1937
+ :form_params => form_params,
1938
+ :body => post_body,
1939
+ :auth_names => auth_names,
1940
+ :return_type => return_type
1941
+ )
1942
+
1943
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
1944
+ if @api_client.config.debugging
1945
+ @api_client.config.logger.debug "API called: PayrollAuApi#get_timesheets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1946
+ end
1947
+ return data, status_code, headers
1948
+ end
1949
+
1950
+ # Reject a leave application by a unique leave application id
1951
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1952
+ # @param leave_application_id [String] Leave Application id for single object
1953
+ # @param [Hash] opts the optional parameters
1954
+ # @return [LeaveApplications]
1955
+ def reject_leave_application(xero_tenant_id, leave_application_id, opts = {})
1956
+ data, _status_code, _headers = reject_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
1957
+ data
1958
+ end
1959
+
1960
+ # Reject a leave application by a unique leave application id
1961
+ # @param xero_tenant_id [String] Xero identifier for Tenant
1962
+ # @param leave_application_id [String] Leave Application id for single object
1963
+ # @param [Hash] opts the optional parameters
1964
+ # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
1965
+ def reject_leave_application_with_http_info(xero_tenant_id, leave_application_id, options = {})
1966
+ opts = options.dup
1967
+ if @api_client.config.debugging
1968
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.reject_leave_application ...'
1969
+ end
1970
+ # verify the required parameter 'xero_tenant_id' is set
1971
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
1972
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.reject_leave_application"
1973
+ end
1974
+ # verify the required parameter 'leave_application_id' is set
1975
+ if @api_client.config.client_side_validation && leave_application_id.nil?
1976
+ fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.reject_leave_application"
1977
+ end
1978
+ # resource path
1979
+ local_var_path = '/LeaveApplications/{LeaveApplicationID}/reject'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)
1980
+
1981
+ # camelize keys of incoming `where` opts
1982
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
1983
+
1984
+ # query parameters
1985
+ query_params = opts[:query_params] || {}
1986
+
1987
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
1988
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
1989
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
1990
+
1991
+ # header parameters
1992
+ header_params = opts[:header_params] || {}
1993
+ # HTTP header 'Accept' (if needed)
1994
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1995
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
1996
+
1997
+ # form parameters
1998
+ form_params = opts[:form_params] || {}
1999
+
2000
+ # http body (model)
2001
+ post_body = opts[:body]
2002
+
2003
+ # return_type
2004
+ return_type = opts[:return_type] || 'LeaveApplications'
2005
+
2006
+ # auth_names
2007
+ auth_names = opts[:auth_names] || ['OAuth2']
2008
+
2009
+ new_options = opts.merge(
2010
+ :header_params => header_params,
2011
+ :query_params => query_params,
2012
+ :form_params => form_params,
2013
+ :body => post_body,
2014
+ :auth_names => auth_names,
2015
+ :return_type => return_type
2016
+ )
2017
+
2018
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2019
+ if @api_client.config.debugging
2020
+ @api_client.config.logger.debug "API called: PayrollAuApi#reject_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2021
+ end
2022
+ return data, status_code, headers
2023
+ end
2024
+
2025
+ # Updates an employee's detail
2026
+ # Update properties on a single employee
2027
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2028
+ # @param employee_id [String] Employee id for single object
2029
+ # @param [Hash] opts the optional parameters
2030
+ # @option opts [Array<Employee>] :employee
2031
+ # @return [Employees]
2032
+ def update_employee(xero_tenant_id, employee_id, opts = {})
2033
+ data, _status_code, _headers = update_employee_with_http_info(xero_tenant_id, employee_id, opts)
2034
+ data
2035
+ end
2036
+
2037
+ # Updates an employee&#39;s detail
2038
+ # Update properties on a single employee
2039
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2040
+ # @param employee_id [String] Employee id for single object
2041
+ # @param [Hash] opts the optional parameters
2042
+ # @option opts [Array<Employee>] :employee
2043
+ # @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
2044
+ def update_employee_with_http_info(xero_tenant_id, employee_id, options = {})
2045
+ opts = options.dup
2046
+ if @api_client.config.debugging
2047
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_employee ...'
2048
+ end
2049
+ # verify the required parameter 'xero_tenant_id' is set
2050
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
2051
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_employee"
2052
+ end
2053
+ # verify the required parameter 'employee_id' is set
2054
+ if @api_client.config.client_side_validation && employee_id.nil?
2055
+ fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollAuApi.update_employee"
2056
+ end
2057
+ # resource path
2058
+ local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
2059
+
2060
+ # camelize keys of incoming `where` opts
2061
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2062
+
2063
+ # query parameters
2064
+ query_params = opts[:query_params] || {}
2065
+
2066
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2067
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2068
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2069
+
2070
+ # header parameters
2071
+ header_params = opts[:header_params] || {}
2072
+ # HTTP header 'Accept' (if needed)
2073
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2074
+ # HTTP header 'Content-Type'
2075
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2076
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2077
+
2078
+ # form parameters
2079
+ form_params = opts[:form_params] || {}
2080
+
2081
+ # http body (model)
2082
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'employee'])
2083
+
2084
+ # return_type
2085
+ return_type = opts[:return_type] || 'Employees'
2086
+
2087
+ # auth_names
2088
+ auth_names = opts[:auth_names] || ['OAuth2']
2089
+
2090
+ new_options = opts.merge(
2091
+ :header_params => header_params,
2092
+ :query_params => query_params,
2093
+ :form_params => form_params,
2094
+ :body => post_body,
2095
+ :auth_names => auth_names,
2096
+ :return_type => return_type
2097
+ )
2098
+
2099
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2100
+ if @api_client.config.debugging
2101
+ @api_client.config.logger.debug "API called: PayrollAuApi#update_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2102
+ end
2103
+ return data, status_code, headers
2104
+ end
2105
+
2106
+ # Updates a specific leave application
2107
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2108
+ # @param leave_application_id [String] Leave Application id for single object
2109
+ # @param leave_application [Array<LeaveApplication>]
2110
+ # @param [Hash] opts the optional parameters
2111
+ # @return [LeaveApplications]
2112
+ def update_leave_application(xero_tenant_id, leave_application_id, leave_application, opts = {})
2113
+ data, _status_code, _headers = update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, opts)
2114
+ data
2115
+ end
2116
+
2117
+ # Updates a specific leave application
2118
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2119
+ # @param leave_application_id [String] Leave Application id for single object
2120
+ # @param leave_application [Array<LeaveApplication>]
2121
+ # @param [Hash] opts the optional parameters
2122
+ # @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
2123
+ def update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, options = {})
2124
+ opts = options.dup
2125
+ if @api_client.config.debugging
2126
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_leave_application ...'
2127
+ end
2128
+ # verify the required parameter 'xero_tenant_id' is set
2129
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
2130
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_leave_application"
2131
+ end
2132
+ # verify the required parameter 'leave_application_id' is set
2133
+ if @api_client.config.client_side_validation && leave_application_id.nil?
2134
+ fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.update_leave_application"
2135
+ end
2136
+ # verify the required parameter 'leave_application' is set
2137
+ if @api_client.config.client_side_validation && leave_application.nil?
2138
+ fail ArgumentError, "Missing the required parameter 'leave_application' when calling PayrollAuApi.update_leave_application"
2139
+ end
2140
+ # resource path
2141
+ local_var_path = '/LeaveApplications/{LeaveApplicationID}'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)
2142
+
2143
+ # camelize keys of incoming `where` opts
2144
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2145
+
2146
+ # query parameters
2147
+ query_params = opts[:query_params] || {}
2148
+
2149
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2150
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2151
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2152
+
2153
+ # header parameters
2154
+ header_params = opts[:header_params] || {}
2155
+ # HTTP header 'Accept' (if needed)
2156
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2157
+ # HTTP header 'Content-Type'
2158
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2159
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2160
+
2161
+ # form parameters
2162
+ form_params = opts[:form_params] || {}
2163
+
2164
+ # http body (model)
2165
+ post_body = opts[:body] || @api_client.object_to_http_body(leave_application)
2166
+
2167
+ # return_type
2168
+ return_type = opts[:return_type] || 'LeaveApplications'
2169
+
2170
+ # auth_names
2171
+ auth_names = opts[:auth_names] || ['OAuth2']
2172
+
2173
+ new_options = opts.merge(
2174
+ :header_params => header_params,
2175
+ :query_params => query_params,
2176
+ :form_params => form_params,
2177
+ :body => post_body,
2178
+ :auth_names => auth_names,
2179
+ :return_type => return_type
2180
+ )
2181
+
2182
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2183
+ if @api_client.config.debugging
2184
+ @api_client.config.logger.debug "API called: PayrollAuApi#update_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2185
+ end
2186
+ return data, status_code, headers
2187
+ end
2188
+
2189
+ # Updates a pay run
2190
+ # Update properties on a single PayRun
2191
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2192
+ # @param pay_run_id [String] PayRun id for single object
2193
+ # @param [Hash] opts the optional parameters
2194
+ # @option opts [Array<PayRun>] :pay_run
2195
+ # @return [PayRuns]
2196
+ def update_pay_run(xero_tenant_id, pay_run_id, opts = {})
2197
+ data, _status_code, _headers = update_pay_run_with_http_info(xero_tenant_id, pay_run_id, opts)
2198
+ data
2199
+ end
2200
+
2201
+ # Updates a pay run
2202
+ # Update properties on a single PayRun
2203
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2204
+ # @param pay_run_id [String] PayRun id for single object
2205
+ # @param [Hash] opts the optional parameters
2206
+ # @option opts [Array<PayRun>] :pay_run
2207
+ # @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
2208
+ def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {})
2209
+ opts = options.dup
2210
+ if @api_client.config.debugging
2211
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_pay_run ...'
2212
+ end
2213
+ # verify the required parameter 'xero_tenant_id' is set
2214
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
2215
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_pay_run"
2216
+ end
2217
+ # verify the required parameter 'pay_run_id' is set
2218
+ if @api_client.config.client_side_validation && pay_run_id.nil?
2219
+ fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollAuApi.update_pay_run"
2220
+ end
2221
+ # resource path
2222
+ local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)
2223
+
2224
+ # camelize keys of incoming `where` opts
2225
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2226
+
2227
+ # query parameters
2228
+ query_params = opts[:query_params] || {}
2229
+
2230
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2231
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2232
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2233
+
2234
+ # header parameters
2235
+ header_params = opts[:header_params] || {}
2236
+ # HTTP header 'Accept' (if needed)
2237
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2238
+ # HTTP header 'Content-Type'
2239
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2240
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2241
+
2242
+ # form parameters
2243
+ form_params = opts[:form_params] || {}
2244
+
2245
+ # http body (model)
2246
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'pay_run'])
2247
+
2248
+ # return_type
2249
+ return_type = opts[:return_type] || 'PayRuns'
2250
+
2251
+ # auth_names
2252
+ auth_names = opts[:auth_names] || ['OAuth2']
2253
+
2254
+ new_options = opts.merge(
2255
+ :header_params => header_params,
2256
+ :query_params => query_params,
2257
+ :form_params => form_params,
2258
+ :body => post_body,
2259
+ :auth_names => auth_names,
2260
+ :return_type => return_type
2261
+ )
2262
+
2263
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2264
+ if @api_client.config.debugging
2265
+ @api_client.config.logger.debug "API called: PayrollAuApi#update_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2266
+ end
2267
+ return data, status_code, headers
2268
+ end
2269
+
2270
+ # Updates a payslip
2271
+ # Update lines on a single payslips
2272
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2273
+ # @param payslip_id [String] Payslip id for single object
2274
+ # @param [Hash] opts the optional parameters
2275
+ # @option opts [Array<PayslipLines>] :payslip_lines
2276
+ # @return [Payslips]
2277
+ def update_payslip(xero_tenant_id, payslip_id, opts = {})
2278
+ data, _status_code, _headers = update_payslip_with_http_info(xero_tenant_id, payslip_id, opts)
2279
+ data
2280
+ end
2281
+
2282
+ # Updates a payslip
2283
+ # Update lines on a single payslips
2284
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2285
+ # @param payslip_id [String] Payslip id for single object
2286
+ # @param [Hash] opts the optional parameters
2287
+ # @option opts [Array<PayslipLines>] :payslip_lines
2288
+ # @return [Array<(Payslips, Integer, Hash)>] Payslips data, response status code and response headers
2289
+ def update_payslip_with_http_info(xero_tenant_id, payslip_id, options = {})
2290
+ opts = options.dup
2291
+ if @api_client.config.debugging
2292
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_payslip ...'
2293
+ end
2294
+ # verify the required parameter 'xero_tenant_id' is set
2295
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
2296
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_payslip"
2297
+ end
2298
+ # verify the required parameter 'payslip_id' is set
2299
+ if @api_client.config.client_side_validation && payslip_id.nil?
2300
+ fail ArgumentError, "Missing the required parameter 'payslip_id' when calling PayrollAuApi.update_payslip"
2301
+ end
2302
+ # resource path
2303
+ local_var_path = '/Payslip/{PayslipID}'.sub('{' + 'PayslipID' + '}', payslip_id.to_s)
2304
+
2305
+ # camelize keys of incoming `where` opts
2306
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2307
+
2308
+ # query parameters
2309
+ query_params = opts[:query_params] || {}
2310
+
2311
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2312
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2313
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2314
+
2315
+ # header parameters
2316
+ header_params = opts[:header_params] || {}
2317
+ # HTTP header 'Accept' (if needed)
2318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2319
+ # HTTP header 'Content-Type'
2320
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2321
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2322
+
2323
+ # form parameters
2324
+ form_params = opts[:form_params] || {}
2325
+
2326
+ # http body (model)
2327
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'payslip_lines'])
2328
+
2329
+ # return_type
2330
+ return_type = opts[:return_type] || 'Payslips'
2331
+
2332
+ # auth_names
2333
+ auth_names = opts[:auth_names] || ['OAuth2']
2334
+
2335
+ new_options = opts.merge(
2336
+ :header_params => header_params,
2337
+ :query_params => query_params,
2338
+ :form_params => form_params,
2339
+ :body => post_body,
2340
+ :auth_names => auth_names,
2341
+ :return_type => return_type
2342
+ )
2343
+
2344
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2345
+ if @api_client.config.debugging
2346
+ @api_client.config.logger.debug "API called: PayrollAuApi#update_payslip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2347
+ end
2348
+ return data, status_code, headers
2349
+ end
2350
+
2351
+ # Updates a superfund
2352
+ # Update properties on a single Superfund
2353
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2354
+ # @param super_fund_id [String] Superfund id for single object
2355
+ # @param [Hash] opts the optional parameters
2356
+ # @option opts [Array<SuperFund>] :super_fund
2357
+ # @return [SuperFunds]
2358
+ def update_superfund(xero_tenant_id, super_fund_id, opts = {})
2359
+ data, _status_code, _headers = update_superfund_with_http_info(xero_tenant_id, super_fund_id, opts)
2360
+ data
2361
+ end
2362
+
2363
+ # Updates a superfund
2364
+ # Update properties on a single Superfund
2365
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2366
+ # @param super_fund_id [String] Superfund id for single object
2367
+ # @param [Hash] opts the optional parameters
2368
+ # @option opts [Array<SuperFund>] :super_fund
2369
+ # @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
2370
+ def update_superfund_with_http_info(xero_tenant_id, super_fund_id, options = {})
2371
+ opts = options.dup
2372
+ if @api_client.config.debugging
2373
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_superfund ...'
2374
+ end
2375
+ # verify the required parameter 'xero_tenant_id' is set
2376
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
2377
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_superfund"
2378
+ end
2379
+ # verify the required parameter 'super_fund_id' is set
2380
+ if @api_client.config.client_side_validation && super_fund_id.nil?
2381
+ fail ArgumentError, "Missing the required parameter 'super_fund_id' when calling PayrollAuApi.update_superfund"
2382
+ end
2383
+ # resource path
2384
+ local_var_path = '/Superfunds/{SuperFundID}'.sub('{' + 'SuperFundID' + '}', super_fund_id.to_s)
2385
+
2386
+ # camelize keys of incoming `where` opts
2387
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2388
+
2389
+ # query parameters
2390
+ query_params = opts[:query_params] || {}
2391
+
2392
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2393
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2394
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2395
+
2396
+ # header parameters
2397
+ header_params = opts[:header_params] || {}
2398
+ # HTTP header 'Accept' (if needed)
2399
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2400
+ # HTTP header 'Content-Type'
2401
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2402
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2403
+
2404
+ # form parameters
2405
+ form_params = opts[:form_params] || {}
2406
+
2407
+ # http body (model)
2408
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'super_fund'])
2409
+
2410
+ # return_type
2411
+ return_type = opts[:return_type] || 'SuperFunds'
2412
+
2413
+ # auth_names
2414
+ auth_names = opts[:auth_names] || ['OAuth2']
2415
+
2416
+ new_options = opts.merge(
2417
+ :header_params => header_params,
2418
+ :query_params => query_params,
2419
+ :form_params => form_params,
2420
+ :body => post_body,
2421
+ :auth_names => auth_names,
2422
+ :return_type => return_type
2423
+ )
2424
+
2425
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2426
+ if @api_client.config.debugging
2427
+ @api_client.config.logger.debug "API called: PayrollAuApi#update_superfund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2428
+ end
2429
+ return data, status_code, headers
2430
+ end
2431
+
2432
+ # Updates a timesheet
2433
+ # Update properties on a single timesheet
2434
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2435
+ # @param timesheet_id [String] Timesheet id for single object
2436
+ # @param [Hash] opts the optional parameters
2437
+ # @option opts [Array<Timesheet>] :timesheet
2438
+ # @return [Timesheets]
2439
+ def update_timesheet(xero_tenant_id, timesheet_id, opts = {})
2440
+ data, _status_code, _headers = update_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
2441
+ data
2442
+ end
2443
+
2444
+ # Updates a timesheet
2445
+ # Update properties on a single timesheet
2446
+ # @param xero_tenant_id [String] Xero identifier for Tenant
2447
+ # @param timesheet_id [String] Timesheet id for single object
2448
+ # @param [Hash] opts the optional parameters
2449
+ # @option opts [Array<Timesheet>] :timesheet
2450
+ # @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
2451
+ def update_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
2452
+ opts = options.dup
2453
+ if @api_client.config.debugging
2454
+ @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_timesheet ...'
2455
+ end
2456
+ # verify the required parameter 'xero_tenant_id' is set
2457
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
2458
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_timesheet"
2459
+ end
2460
+ # verify the required parameter 'timesheet_id' is set
2461
+ if @api_client.config.client_side_validation && timesheet_id.nil?
2462
+ fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollAuApi.update_timesheet"
2463
+ end
2464
+ # resource path
2465
+ local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)
2466
+
2467
+ # camelize keys of incoming `where` opts
2468
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
2469
+
2470
+ # query parameters
2471
+ query_params = opts[:query_params] || {}
2472
+
2473
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2474
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
2475
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
2476
+
2477
+ # header parameters
2478
+ header_params = opts[:header_params] || {}
2479
+ # HTTP header 'Accept' (if needed)
2480
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2481
+ # HTTP header 'Content-Type'
2482
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2483
+ header_params[:'Xero-Tenant-Id'] = xero_tenant_id
2484
+
2485
+ # form parameters
2486
+ form_params = opts[:form_params] || {}
2487
+
2488
+ # http body (model)
2489
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'timesheet'])
2490
+
2491
+ # return_type
2492
+ return_type = opts[:return_type] || 'Timesheets'
2493
+
2494
+ # auth_names
2495
+ auth_names = opts[:auth_names] || ['OAuth2']
2496
+
2497
+ new_options = opts.merge(
2498
+ :header_params => header_params,
2499
+ :query_params => query_params,
2500
+ :form_params => form_params,
2501
+ :body => post_body,
2502
+ :auth_names => auth_names,
2503
+ :return_type => return_type
2504
+ )
2505
+
2506
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
2507
+ if @api_client.config.debugging
2508
+ @api_client.config.logger.debug "API called: PayrollAuApi#update_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2509
+ end
2510
+ return data, status_code, headers
2511
+ end
2512
+ end
2513
+ end