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.
- checksums.yaml +4 -4
- data/README.md +450 -450
- data/lib/xero-ruby/api/accounting_api.rb +18858 -18858
- data/lib/xero-ruby/api/app_store_api.rb +325 -325
- data/lib/xero-ruby/api/asset_api.rb +493 -493
- data/lib/xero-ruby/api/files_api.rb +1468 -1468
- data/lib/xero-ruby/api/finance_api.rb +961 -961
- data/lib/xero-ruby/api/payroll_au_api.rb +2513 -2282
- data/lib/xero-ruby/api/payroll_nz_api.rb +5334 -5334
- data/lib/xero-ruby/api/payroll_uk_api.rb +5479 -5479
- data/lib/xero-ruby/api/project_api.rb +1402 -1402
- data/lib/xero-ruby/api_client.rb +675 -675
- data/lib/xero-ruby/api_error.rb +57 -57
- data/lib/xero-ruby/configuration.rb +282 -282
- data/lib/xero-ruby/models/accounting/account.rb +535 -535
- data/lib/xero-ruby/models/accounting/account_type.rb +56 -56
- data/lib/xero-ruby/models/accounting/accounts.rb +224 -224
- data/lib/xero-ruby/models/accounting/accounts_payable.rb +232 -232
- data/lib/xero-ruby/models/accounting/accounts_receivable.rb +232 -232
- data/lib/xero-ruby/models/accounting/action.rb +268 -268
- data/lib/xero-ruby/models/accounting/actions.rb +224 -224
- data/lib/xero-ruby/models/accounting/address.rb +483 -483
- data/lib/xero-ruby/models/accounting/address_for_organisation.rb +484 -484
- data/lib/xero-ruby/models/accounting/allocation.rb +309 -309
- data/lib/xero-ruby/models/accounting/allocations.rb +224 -224
- data/lib/xero-ruby/models/accounting/attachment.rb +272 -272
- data/lib/xero-ruby/models/accounting/attachments.rb +224 -224
- data/lib/xero-ruby/models/accounting/balance_details.rb +243 -243
- data/lib/xero-ruby/models/accounting/balances.rb +233 -233
- data/lib/xero-ruby/models/accounting/bank_transaction.rb +510 -510
- data/lib/xero-ruby/models/accounting/bank_transactions.rb +224 -224
- data/lib/xero-ruby/models/accounting/bank_transfer.rb +375 -375
- data/lib/xero-ruby/models/accounting/bank_transfers.rb +224 -224
- data/lib/xero-ruby/models/accounting/batch_payment.rb +496 -496
- data/lib/xero-ruby/models/accounting/batch_payment_delete.rb +244 -244
- data/lib/xero-ruby/models/accounting/batch_payment_delete_by_url_param.rb +229 -229
- data/lib/xero-ruby/models/accounting/batch_payment_details.rb +293 -293
- data/lib/xero-ruby/models/accounting/batch_payments.rb +224 -224
- data/lib/xero-ruby/models/accounting/bill.rb +232 -232
- data/lib/xero-ruby/models/accounting/branding_theme.rb +307 -307
- data/lib/xero-ruby/models/accounting/branding_themes.rb +224 -224
- data/lib/xero-ruby/models/accounting/budget.rb +327 -327
- data/lib/xero-ruby/models/accounting/budget_balance.rb +267 -267
- data/lib/xero-ruby/models/accounting/budget_line.rb +244 -244
- data/lib/xero-ruby/models/accounting/budgets.rb +224 -224
- data/lib/xero-ruby/models/accounting/cis_org_setting.rb +242 -242
- data/lib/xero-ruby/models/accounting/cis_org_settings.rb +224 -224
- data/lib/xero-ruby/models/accounting/cis_setting.rb +232 -232
- data/lib/xero-ruby/models/accounting/cis_settings.rb +224 -224
- data/lib/xero-ruby/models/accounting/contact.rb +849 -849
- data/lib/xero-ruby/models/accounting/contact_group.rb +290 -290
- data/lib/xero-ruby/models/accounting/contact_groups.rb +224 -224
- data/lib/xero-ruby/models/accounting/contact_person.rb +252 -252
- data/lib/xero-ruby/models/accounting/contacts.rb +224 -224
- data/lib/xero-ruby/models/accounting/conversion_balances.rb +245 -245
- data/lib/xero-ruby/models/accounting/conversion_date.rb +233 -233
- data/lib/xero-ruby/models/accounting/country_code.rb +274 -274
- data/lib/xero-ruby/models/accounting/credit_note.rb +580 -580
- data/lib/xero-ruby/models/accounting/credit_notes.rb +224 -224
- data/lib/xero-ruby/models/accounting/currencies.rb +224 -224
- data/lib/xero-ruby/models/accounting/currency.rb +232 -232
- data/lib/xero-ruby/models/accounting/currency_code.rb +203 -203
- data/lib/xero-ruby/models/accounting/element.rb +294 -294
- data/lib/xero-ruby/models/accounting/employee.rb +362 -362
- data/lib/xero-ruby/models/accounting/employees.rb +224 -224
- data/lib/xero-ruby/models/accounting/error.rb +254 -254
- data/lib/xero-ruby/models/accounting/expense_claim.rb +375 -375
- data/lib/xero-ruby/models/accounting/expense_claims.rb +224 -224
- data/lib/xero-ruby/models/accounting/external_link.rb +281 -281
- data/lib/xero-ruby/models/accounting/history_record.rb +252 -252
- data/lib/xero-ruby/models/accounting/history_records.rb +224 -224
- data/lib/xero-ruby/models/accounting/import_summary.rb +233 -233
- data/lib/xero-ruby/models/accounting/import_summary_accounts.rb +303 -303
- data/lib/xero-ruby/models/accounting/import_summary_object.rb +222 -222
- data/lib/xero-ruby/models/accounting/import_summary_organisation.rb +222 -222
- data/lib/xero-ruby/models/accounting/invoice.rb +707 -707
- data/lib/xero-ruby/models/accounting/invoice_reminder.rb +222 -222
- data/lib/xero-ruby/models/accounting/invoice_reminders.rb +224 -224
- data/lib/xero-ruby/models/accounting/invoices.rb +224 -224
- data/lib/xero-ruby/models/accounting/item.rb +443 -443
- data/lib/xero-ruby/models/accounting/items.rb +224 -224
- data/lib/xero-ruby/models/accounting/journal.rb +353 -353
- data/lib/xero-ruby/models/accounting/journal_line.rb +334 -334
- data/lib/xero-ruby/models/accounting/journals.rb +224 -224
- data/lib/xero-ruby/models/accounting/line_amount_types.rb +37 -37
- data/lib/xero-ruby/models/accounting/line_item.rb +364 -364
- data/lib/xero-ruby/models/accounting/line_item_item.rb +272 -272
- data/lib/xero-ruby/models/accounting/line_item_tracking.rb +267 -267
- data/lib/xero-ruby/models/accounting/linked_transaction.rb +390 -390
- data/lib/xero-ruby/models/accounting/linked_transactions.rb +224 -224
- data/lib/xero-ruby/models/accounting/manual_journal.rb +406 -406
- data/lib/xero-ruby/models/accounting/manual_journal_line.rb +294 -294
- data/lib/xero-ruby/models/accounting/manual_journals.rb +224 -224
- data/lib/xero-ruby/models/accounting/online_invoice.rb +222 -222
- data/lib/xero-ruby/models/accounting/online_invoices.rb +224 -224
- data/lib/xero-ruby/models/accounting/organisation.rb +728 -728
- data/lib/xero-ruby/models/accounting/organisations.rb +224 -224
- data/lib/xero-ruby/models/accounting/overpayment.rb +464 -464
- data/lib/xero-ruby/models/accounting/overpayments.rb +224 -224
- data/lib/xero-ruby/models/accounting/payment.rb +544 -544
- data/lib/xero-ruby/models/accounting/payment_delete.rb +229 -229
- data/lib/xero-ruby/models/accounting/payment_service.rb +274 -274
- data/lib/xero-ruby/models/accounting/payment_services.rb +224 -224
- data/lib/xero-ruby/models/accounting/payment_term.rb +232 -232
- data/lib/xero-ruby/models/accounting/payment_term_type.rb +38 -38
- data/lib/xero-ruby/models/accounting/payments.rb +224 -224
- data/lib/xero-ruby/models/accounting/phone.rb +336 -336
- data/lib/xero-ruby/models/accounting/prepayment.rb +475 -475
- data/lib/xero-ruby/models/accounting/prepayments.rb +224 -224
- data/lib/xero-ruby/models/accounting/purchase.rb +252 -252
- data/lib/xero-ruby/models/accounting/purchase_order.rb +541 -541
- data/lib/xero-ruby/models/accounting/purchase_orders.rb +224 -224
- data/lib/xero-ruby/models/accounting/quote.rb +531 -531
- data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +37 -37
- data/lib/xero-ruby/models/accounting/quote_status_codes.rb +40 -40
- data/lib/xero-ruby/models/accounting/quotes.rb +224 -224
- data/lib/xero-ruby/models/accounting/receipt.rb +441 -441
- data/lib/xero-ruby/models/accounting/receipts.rb +224 -224
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +477 -477
- data/lib/xero-ruby/models/accounting/repeating_invoices.rb +224 -224
- data/lib/xero-ruby/models/accounting/report.rb +309 -309
- data/lib/xero-ruby/models/accounting/report_attribute.rb +232 -232
- data/lib/xero-ruby/models/accounting/report_cell.rb +234 -234
- data/lib/xero-ruby/models/accounting/report_fields.rb +242 -242
- data/lib/xero-ruby/models/accounting/report_row.rb +244 -244
- data/lib/xero-ruby/models/accounting/report_rows.rb +256 -256
- data/lib/xero-ruby/models/accounting/report_with_row.rb +308 -308
- data/lib/xero-ruby/models/accounting/report_with_rows.rb +224 -224
- data/lib/xero-ruby/models/accounting/reports.rb +224 -224
- data/lib/xero-ruby/models/accounting/request_empty.rb +222 -222
- data/lib/xero-ruby/models/accounting/row_type.rb +38 -38
- data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +232 -232
- data/lib/xero-ruby/models/accounting/schedule.rb +336 -336
- data/lib/xero-ruby/models/accounting/setup.rb +246 -246
- data/lib/xero-ruby/models/accounting/tax_component.rb +252 -252
- data/lib/xero-ruby/models/accounting/tax_rate.rb +481 -476
- data/lib/xero-ruby/models/accounting/tax_rates.rb +224 -224
- data/lib/xero-ruby/models/accounting/tax_type.rb +130 -120
- data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +432 -432
- data/lib/xero-ruby/models/accounting/time_zone.rb +175 -175
- data/lib/xero-ruby/models/accounting/tracking_categories.rb +224 -224
- data/lib/xero-ruby/models/accounting/tracking_category.rb +341 -341
- data/lib/xero-ruby/models/accounting/tracking_option.rb +304 -304
- data/lib/xero-ruby/models/accounting/tracking_options.rb +224 -224
- data/lib/xero-ruby/models/accounting/user.rb +323 -323
- data/lib/xero-ruby/models/accounting/users.rb +224 -224
- data/lib/xero-ruby/models/accounting/validation_error.rb +222 -222
- data/lib/xero-ruby/models/app_store/create_usage_record.rb +243 -243
- data/lib/xero-ruby/models/app_store/plan.rb +311 -311
- data/lib/xero-ruby/models/app_store/price.rb +257 -257
- data/lib/xero-ruby/models/app_store/problem_details.rb +272 -272
- data/lib/xero-ruby/models/app_store/product.rb +299 -299
- data/lib/xero-ruby/models/app_store/subscription.rb +361 -361
- data/lib/xero-ruby/models/app_store/subscription_item.rb +354 -354
- data/lib/xero-ruby/models/app_store/update_usage_record.rb +228 -228
- data/lib/xero-ruby/models/app_store/usage_record.rb +332 -332
- data/lib/xero-ruby/models/app_store/usage_records_list.rb +230 -230
- data/lib/xero-ruby/models/assets/asset.rb +377 -377
- data/lib/xero-ruby/models/assets/asset_status.rb +37 -37
- data/lib/xero-ruby/models/assets/asset_status_query_param.rb +37 -37
- data/lib/xero-ruby/models/assets/asset_type.rb +292 -292
- data/lib/xero-ruby/models/assets/assets.rb +234 -234
- data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +282 -282
- data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +361 -361
- data/lib/xero-ruby/models/assets/error.rb +266 -266
- data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +272 -272
- data/lib/xero-ruby/models/assets/pagination.rb +252 -252
- data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +262 -262
- data/lib/xero-ruby/models/assets/setting.rb +292 -292
- data/lib/xero-ruby/models/files/association.rb +252 -252
- data/lib/xero-ruby/models/files/file_object.rb +292 -292
- data/lib/xero-ruby/models/files/files.rb +254 -254
- data/lib/xero-ruby/models/files/folder.rb +262 -262
- data/lib/xero-ruby/models/files/folders.rb +224 -224
- data/lib/xero-ruby/models/files/object_group.rb +46 -46
- data/lib/xero-ruby/models/files/object_type.rb +90 -90
- data/lib/xero-ruby/models/files/upload_object.rb +267 -267
- data/lib/xero-ruby/models/files/user.rb +267 -267
- data/lib/xero-ruby/models/finance/account_usage.rb +342 -342
- data/lib/xero-ruby/models/finance/account_usage_response.rb +254 -254
- data/lib/xero-ruby/models/finance/balance_sheet_account_detail.rb +262 -262
- data/lib/xero-ruby/models/finance/balance_sheet_account_group.rb +234 -234
- data/lib/xero-ruby/models/finance/balance_sheet_account_type.rb +244 -244
- data/lib/xero-ruby/models/finance/balance_sheet_response.rb +252 -252
- data/lib/xero-ruby/models/finance/bank_statement_accounting_response.rb +254 -254
- data/lib/xero-ruby/models/finance/bank_statement_response.rb +232 -232
- data/lib/xero-ruby/models/finance/bank_transaction_response.rb +274 -274
- data/lib/xero-ruby/models/finance/cash_account_response.rb +262 -262
- data/lib/xero-ruby/models/finance/cash_balance.rb +242 -242
- data/lib/xero-ruby/models/finance/cash_validation_response.rb +262 -262
- data/lib/xero-ruby/models/finance/cashflow_account.rb +282 -282
- data/lib/xero-ruby/models/finance/cashflow_activity.rb +244 -244
- data/lib/xero-ruby/models/finance/cashflow_response.rb +254 -254
- data/lib/xero-ruby/models/finance/cashflow_type.rb +244 -244
- data/lib/xero-ruby/models/finance/contact_detail.rb +274 -274
- data/lib/xero-ruby/models/finance/contact_response.rb +232 -232
- data/lib/xero-ruby/models/finance/contact_total_detail.rb +242 -242
- data/lib/xero-ruby/models/finance/contact_total_other.rb +252 -252
- data/lib/xero-ruby/models/finance/credit_note_response.rb +254 -254
- data/lib/xero-ruby/models/finance/current_statement_response.rb +272 -272
- data/lib/xero-ruby/models/finance/data_source_response.rb +362 -362
- data/lib/xero-ruby/models/finance/history_record_response.rb +262 -262
- data/lib/xero-ruby/models/finance/income_by_contact_response.rb +284 -284
- data/lib/xero-ruby/models/finance/invoice_response.rb +254 -254
- data/lib/xero-ruby/models/finance/line_item_response.rb +252 -252
- data/lib/xero-ruby/models/finance/lock_history_model.rb +242 -242
- data/lib/xero-ruby/models/finance/lock_history_response.rb +244 -244
- data/lib/xero-ruby/models/finance/manual_journal_total.rb +222 -222
- data/lib/xero-ruby/models/finance/overpayment_response.rb +254 -254
- data/lib/xero-ruby/models/finance/payment_response.rb +312 -312
- data/lib/xero-ruby/models/finance/pnl_account.rb +272 -272
- data/lib/xero-ruby/models/finance/pnl_account_class.rb +234 -234
- data/lib/xero-ruby/models/finance/pnl_account_type.rb +244 -244
- data/lib/xero-ruby/models/finance/practice_response.rb +262 -262
- data/lib/xero-ruby/models/finance/prepayment_response.rb +254 -254
- data/lib/xero-ruby/models/finance/problem.rb +252 -252
- data/lib/xero-ruby/models/finance/problem_type.rb +44 -44
- data/lib/xero-ruby/models/finance/profit_and_loss_response.rb +262 -262
- data/lib/xero-ruby/models/finance/report_history_model.rb +242 -242
- data/lib/xero-ruby/models/finance/report_history_response.rb +244 -244
- data/lib/xero-ruby/models/finance/statement_balance_response.rb +232 -232
- data/lib/xero-ruby/models/finance/statement_line_response.rb +356 -356
- data/lib/xero-ruby/models/finance/statement_lines_response.rb +382 -382
- data/lib/xero-ruby/models/finance/statement_response.rb +314 -314
- data/lib/xero-ruby/models/finance/total_detail.rb +242 -242
- data/lib/xero-ruby/models/finance/total_other.rb +242 -242
- data/lib/xero-ruby/models/finance/trial_balance_account.rb +312 -312
- data/lib/xero-ruby/models/finance/trial_balance_entry.rb +232 -232
- data/lib/xero-ruby/models/finance/trial_balance_movement.rb +252 -252
- data/lib/xero-ruby/models/finance/trial_balance_response.rb +244 -244
- data/lib/xero-ruby/models/finance/user_activities_response.rb +244 -244
- data/lib/xero-ruby/models/finance/user_response.rb +336 -336
- data/lib/xero-ruby/models/payroll_au/account.rb +252 -252
- data/lib/xero-ruby/models/payroll_au/account_type.rb +57 -57
- data/lib/xero-ruby/models/payroll_au/allowance_category.rb +41 -41
- data/lib/xero-ruby/models/payroll_au/allowance_type.rb +44 -44
- data/lib/xero-ruby/models/payroll_au/api_exception.rb +243 -243
- data/lib/xero-ruby/models/payroll_au/bank_account.rb +272 -272
- data/lib/xero-ruby/models/payroll_au/calendar_type.rb +40 -40
- data/lib/xero-ruby/models/payroll_au/country_of_residence.rb +285 -285
- data/lib/xero-ruby/models/payroll_au/deduction_line.rb +267 -267
- data/lib/xero-ruby/models/payroll_au/deduction_type.rb +354 -354
- data/lib/xero-ruby/models/payroll_au/deduction_type_calculation_type.rb +37 -37
- data/lib/xero-ruby/models/payroll_au/earnings_line.rb +307 -307
- data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +442 -442
- data/lib/xero-ruby/models/payroll_au/earnings_rate_calculation_type.rb +37 -37
- data/lib/xero-ruby/models/payroll_au/earnings_type.rb +48 -48
- data/lib/xero-ruby/models/payroll_au/employee.rb +654 -654
- data/lib/xero-ruby/models/payroll_au/employee_status.rb +36 -36
- data/lib/xero-ruby/models/payroll_au/employees.rb +224 -224
- data/lib/xero-ruby/models/payroll_au/employment_basis.rb +40 -40
- data/lib/xero-ruby/models/payroll_au/employment_termination_payment_type.rb +36 -36
- data/lib/xero-ruby/models/payroll_au/employment_type.rb +36 -36
- data/lib/xero-ruby/models/payroll_au/entitlement_final_pay_payout_type.rb +36 -36
- data/lib/xero-ruby/models/payroll_au/home_address.rb +277 -277
- data/lib/xero-ruby/models/payroll_au/income_type.rb +39 -39
- data/lib/xero-ruby/models/payroll_au/leave_accrual_line.rb +242 -242
- data/lib/xero-ruby/models/payroll_au/leave_application.rb +326 -326
- data/lib/xero-ruby/models/payroll_au/leave_applications.rb +224 -224
- data/lib/xero-ruby/models/payroll_au/leave_balance.rb +252 -252
- data/lib/xero-ruby/models/payroll_au/leave_category_code.rb +46 -46
- data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +252 -252
- data/lib/xero-ruby/models/payroll_au/leave_line.rb +292 -292
- data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +39 -39
- data/lib/xero-ruby/models/payroll_au/leave_lines.rb +225 -225
- data/lib/xero-ruby/models/payroll_au/leave_period.rb +252 -252
- data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +36 -36
- data/lib/xero-ruby/models/payroll_au/leave_type.rb +337 -337
- data/lib/xero-ruby/models/payroll_au/leave_type_contribution_type.rb +38 -38
- data/lib/xero-ruby/models/payroll_au/manual_tax_type.rb +40 -40
- data/lib/xero-ruby/models/payroll_au/opening_balances.rb +304 -304
- data/lib/xero-ruby/models/payroll_au/paid_leave_earnings_line.rb +272 -272
- data/lib/xero-ruby/models/payroll_au/pay_item.rb +260 -260
- data/lib/xero-ruby/models/payroll_au/pay_items.rb +222 -222
- data/lib/xero-ruby/models/payroll_au/pay_out_type.rb +36 -36
- data/lib/xero-ruby/models/payroll_au/pay_run.rb +381 -381
- data/lib/xero-ruby/models/payroll_au/pay_run_status.rb +36 -36
- data/lib/xero-ruby/models/payroll_au/pay_runs.rb +224 -224
- data/lib/xero-ruby/models/payroll_au/pay_template.rb +272 -272
- data/lib/xero-ruby/models/payroll_au/payment_frequency_type.rb +41 -41
- data/lib/xero-ruby/models/payroll_au/payroll_calendar.rb +294 -294
- data/lib/xero-ruby/models/payroll_au/payroll_calendars.rb +224 -224
- data/lib/xero-ruby/models/payroll_au/payslip.rb +418 -418
- data/lib/xero-ruby/models/payroll_au/payslip_lines.rb +308 -308
- data/lib/xero-ruby/models/payroll_au/payslip_object.rb +222 -222
- data/lib/xero-ruby/models/payroll_au/payslip_summary.rb +332 -332
- data/lib/xero-ruby/models/payroll_au/payslips.rb +224 -224
- data/lib/xero-ruby/models/payroll_au/rate_type.rb +37 -37
- data/lib/xero-ruby/models/payroll_au/reimbursement_line.rb +267 -267
- data/lib/xero-ruby/models/payroll_au/reimbursement_lines.rb +225 -225
- data/lib/xero-ruby/models/payroll_au/reimbursement_type.rb +277 -277
- data/lib/xero-ruby/models/payroll_au/residency_status.rb +37 -37
- data/lib/xero-ruby/models/payroll_au/senior_marital_status.rb +37 -37
- data/lib/xero-ruby/models/payroll_au/settings.rb +254 -254
- data/lib/xero-ruby/models/payroll_au/settings_object.rb +222 -222
- data/lib/xero-ruby/models/payroll_au/settings_tracking_categories.rb +233 -233
- data/lib/xero-ruby/models/payroll_au/settings_tracking_categories_employee_groups.rb +233 -233
- data/lib/xero-ruby/models/payroll_au/settings_tracking_categories_timesheet_categories.rb +233 -233
- data/lib/xero-ruby/models/payroll_au/state.rb +42 -42
- data/lib/xero-ruby/models/payroll_au/super_fund.rb +349 -349
- data/lib/xero-ruby/models/payroll_au/super_fund_product.rb +252 -252
- data/lib/xero-ruby/models/payroll_au/super_fund_products.rb +224 -224
- data/lib/xero-ruby/models/payroll_au/super_fund_type.rb +36 -36
- data/lib/xero-ruby/models/payroll_au/super_funds.rb +224 -224
- data/lib/xero-ruby/models/payroll_au/super_line.rb +292 -292
- data/lib/xero-ruby/models/payroll_au/super_membership.rb +252 -252
- data/lib/xero-ruby/models/payroll_au/superannuation_calculation_type.rb +37 -37
- data/lib/xero-ruby/models/payroll_au/superannuation_contribution_type.rb +38 -38
- data/lib/xero-ruby/models/payroll_au/superannuation_line.rb +302 -302
- data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +422 -422
- data/lib/xero-ruby/models/payroll_au/tax_line.rb +272 -272
- data/lib/xero-ruby/models/payroll_au/tax_scale_type.rb +40 -40
- data/lib/xero-ruby/models/payroll_au/tfn_exemption_type.rb +38 -38
- data/lib/xero-ruby/models/payroll_au/timesheet.rb +321 -321
- data/lib/xero-ruby/models/payroll_au/timesheet_line.rb +254 -254
- data/lib/xero-ruby/models/payroll_au/timesheet_object.rb +222 -222
- data/lib/xero-ruby/models/payroll_au/timesheet_status.rb +39 -39
- data/lib/xero-ruby/models/payroll_au/timesheets.rb +224 -224
- data/lib/xero-ruby/models/payroll_au/validation_error.rb +222 -222
- data/lib/xero-ruby/models/payroll_au/work_condition.rb +37 -37
- data/lib/xero-ruby/models/payroll_nz/account.rb +290 -290
- data/lib/xero-ruby/models/payroll_nz/accounts.rb +224 -224
- data/lib/xero-ruby/models/payroll_nz/address.rb +287 -287
- data/lib/xero-ruby/models/payroll_nz/bank_account.rb +343 -343
- data/lib/xero-ruby/models/payroll_nz/benefit.rb +383 -383
- data/lib/xero-ruby/models/payroll_nz/calendar_type.rb +41 -41
- data/lib/xero-ruby/models/payroll_nz/deduction.rb +325 -325
- data/lib/xero-ruby/models/payroll_nz/deduction_line.rb +262 -262
- data/lib/xero-ruby/models/payroll_nz/deduction_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/deductions.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/earnings_line.rb +312 -312
- data/lib/xero-ruby/models/payroll_nz/earnings_order.rb +269 -269
- data/lib/xero-ruby/models/payroll_nz/earnings_order_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/earnings_orders.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/earnings_rate.rb +401 -401
- data/lib/xero-ruby/models/payroll_nz/earnings_rate_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/earnings_rates.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/earnings_template.rb +272 -272
- data/lib/xero-ruby/models/payroll_nz/earnings_template_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employee.rb +388 -388
- data/lib/xero-ruby/models/payroll_nz/employee_earnings_templates.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/employee_leave.rb +304 -304
- data/lib/xero-ruby/models/payroll_nz/employee_leave_balance.rb +252 -252
- data/lib/xero-ruby/models/payroll_nz/employee_leave_balances.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/employee_leave_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +282 -282
- data/lib/xero-ruby/models/payroll_nz/employee_leave_setup_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +350 -350
- data/lib/xero-ruby/models/payroll_nz/employee_leave_type_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employee_leave_types.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/employee_leaves.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/employee_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employee_opening_balance.rb +252 -252
- data/lib/xero-ruby/models/payroll_nz/employee_opening_balances_object.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/employee_pay_template.rb +234 -234
- data/lib/xero-ruby/models/payroll_nz/employee_pay_template_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employee_pay_templates.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance.rb +294 -294
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_summary.rb +336 -336
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leaves_summaries.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leave.rb +433 -433
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leave_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leaves.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/employee_tax.rb +411 -411
- data/lib/xero-ruby/models/payroll_nz/employee_tax_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employees.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/employment.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/employment_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/gross_earnings_history.rb +232 -232
- data/lib/xero-ruby/models/payroll_nz/invalid_field.rb +232 -232
- data/lib/xero-ruby/models/payroll_nz/leave_accrual_line.rb +232 -232
- data/lib/xero-ruby/models/payroll_nz/leave_earnings_line.rb +312 -312
- data/lib/xero-ruby/models/payroll_nz/leave_period.rb +288 -288
- data/lib/xero-ruby/models/payroll_nz/leave_periods.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/leave_type.rb +287 -287
- data/lib/xero-ruby/models/payroll_nz/leave_type_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/leave_types.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/pagination.rb +252 -252
- data/lib/xero-ruby/models/payroll_nz/pay_run.rb +385 -385
- data/lib/xero-ruby/models/payroll_nz/pay_run_calendar.rb +302 -302
- data/lib/xero-ruby/models/payroll_nz/pay_run_calendar_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/pay_run_calendars.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/pay_run_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/pay_runs.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/pay_slip.rb +571 -571
- data/lib/xero-ruby/models/payroll_nz/pay_slip_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/pay_slips.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/payment_line.rb +262 -262
- data/lib/xero-ruby/models/payroll_nz/payment_method.rb +271 -271
- data/lib/xero-ruby/models/payroll_nz/payment_method_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/problem.rb +275 -275
- data/lib/xero-ruby/models/payroll_nz/reimbursement.rb +378 -378
- data/lib/xero-ruby/models/payroll_nz/reimbursement_line.rb +262 -262
- data/lib/xero-ruby/models/payroll_nz/reimbursement_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/reimbursements.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +398 -398
- data/lib/xero-ruby/models/payroll_nz/salary_and_wage_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/salary_and_wages.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/settings.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/statutory_deduction.rb +262 -262
- data/lib/xero-ruby/models/payroll_nz/statutory_deduction_category.rb +45 -45
- data/lib/xero-ruby/models/payroll_nz/statutory_deduction_line.rb +252 -252
- data/lib/xero-ruby/models/payroll_nz/statutory_deduction_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/statutory_deductions.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/superannuation_line.rb +272 -272
- data/lib/xero-ruby/models/payroll_nz/superannuation_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/superannuations.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/tax_code.rb +53 -53
- data/lib/xero-ruby/models/payroll_nz/tax_line.rb +262 -262
- data/lib/xero-ruby/models/payroll_nz/tax_settings.rb +308 -308
- data/lib/xero-ruby/models/payroll_nz/timesheet.rb +362 -362
- data/lib/xero-ruby/models/payroll_nz/timesheet_earnings_line.rb +312 -312
- data/lib/xero-ruby/models/payroll_nz/timesheet_line.rb +277 -277
- data/lib/xero-ruby/models/payroll_nz/timesheet_line_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/timesheet_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/timesheets.rb +244 -244
- data/lib/xero-ruby/models/payroll_nz/tracking_categories.rb +242 -242
- data/lib/xero-ruby/models/payroll_nz/tracking_category.rb +232 -232
- data/lib/xero-ruby/models/payroll_uk/account.rb +293 -293
- data/lib/xero-ruby/models/payroll_uk/accounts.rb +224 -224
- data/lib/xero-ruby/models/payroll_uk/address.rb +277 -277
- data/lib/xero-ruby/models/payroll_uk/bank_account.rb +257 -257
- data/lib/xero-ruby/models/payroll_uk/benefit.rb +432 -432
- data/lib/xero-ruby/models/payroll_uk/benefit_line.rb +262 -262
- data/lib/xero-ruby/models/payroll_uk/benefit_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/benefits.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/court_order_line.rb +232 -232
- data/lib/xero-ruby/models/payroll_uk/deduction.rb +440 -440
- data/lib/xero-ruby/models/payroll_uk/deduction_line.rb +252 -252
- data/lib/xero-ruby/models/payroll_uk/deduction_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/deductions.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/earnings_line.rb +302 -302
- data/lib/xero-ruby/models/payroll_uk/earnings_order.rb +269 -269
- data/lib/xero-ruby/models/payroll_uk/earnings_order_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/earnings_orders.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +409 -409
- data/lib/xero-ruby/models/payroll_uk/earnings_rate_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/earnings_rates.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/earnings_template.rb +272 -272
- data/lib/xero-ruby/models/payroll_uk/earnings_template_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/employee.rb +408 -408
- data/lib/xero-ruby/models/payroll_uk/employee_leave.rb +304 -304
- data/lib/xero-ruby/models/payroll_uk/employee_leave_balance.rb +252 -252
- data/lib/xero-ruby/models/payroll_uk/employee_leave_balances.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/employee_leave_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/employee_leave_type.rb +320 -320
- data/lib/xero-ruby/models/payroll_uk/employee_leave_type_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/employee_leave_types.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/employee_leaves.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/employee_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/employee_opening_balances.rb +272 -272
- data/lib/xero-ruby/models/payroll_uk/employee_opening_balances_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/employee_pay_template.rb +234 -234
- data/lib/xero-ruby/models/payroll_uk/employee_pay_template_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/employee_pay_templates.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance.rb +294 -294
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_summary.rb +336 -336
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leaves_summaries.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leave.rb +433 -433
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leave_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leaves.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/employee_tax.rb +322 -322
- data/lib/xero-ruby/models/payroll_uk/employee_tax_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/employees.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/employment.rb +299 -299
- data/lib/xero-ruby/models/payroll_uk/employment_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/invalid_field.rb +232 -232
- data/lib/xero-ruby/models/payroll_uk/leave_accrual_line.rb +232 -232
- data/lib/xero-ruby/models/payroll_uk/leave_earnings_line.rb +272 -272
- data/lib/xero-ruby/models/payroll_uk/leave_period.rb +288 -288
- data/lib/xero-ruby/models/payroll_uk/leave_periods.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/leave_type.rb +307 -307
- data/lib/xero-ruby/models/payroll_uk/leave_type_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/leave_types.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/pagination.rb +252 -252
- data/lib/xero-ruby/models/payroll_uk/pay_run.rb +403 -403
- data/lib/xero-ruby/models/payroll_uk/pay_run_calendar.rb +342 -342
- data/lib/xero-ruby/models/payroll_uk/pay_run_calendar_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/pay_run_calendars.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/pay_run_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/pay_runs.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/payment_line.rb +262 -262
- data/lib/xero-ruby/models/payroll_uk/payment_method.rb +276 -276
- data/lib/xero-ruby/models/payroll_uk/payment_method_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/payslip.rb +551 -551
- data/lib/xero-ruby/models/payroll_uk/payslip_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/payslips.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/problem.rb +275 -275
- data/lib/xero-ruby/models/payroll_uk/reimbursement.rb +262 -262
- data/lib/xero-ruby/models/payroll_uk/reimbursement_line.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/reimbursement_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/reimbursements.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/salary_and_wage.rb +383 -383
- data/lib/xero-ruby/models/payroll_uk/salary_and_wage_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/salary_and_wages.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/settings.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/statutory_deduction.rb +262 -262
- data/lib/xero-ruby/models/payroll_uk/statutory_deduction_category.rb +48 -48
- data/lib/xero-ruby/models/payroll_uk/tax_line.rb +272 -272
- data/lib/xero-ruby/models/payroll_uk/timesheet.rb +361 -361
- data/lib/xero-ruby/models/payroll_uk/timesheet_earnings_line.rb +272 -272
- data/lib/xero-ruby/models/payroll_uk/timesheet_line.rb +277 -277
- data/lib/xero-ruby/models/payroll_uk/timesheet_line_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/timesheet_object.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/timesheets.rb +244 -244
- data/lib/xero-ruby/models/payroll_uk/tracking_categories.rb +242 -242
- data/lib/xero-ruby/models/payroll_uk/tracking_category.rb +232 -232
- data/lib/xero-ruby/models/projects/amount.rb +232 -232
- data/lib/xero-ruby/models/projects/charge_type.rb +37 -37
- data/lib/xero-ruby/models/projects/currency_code.rb +198 -198
- data/lib/xero-ruby/models/projects/error.rb +232 -232
- data/lib/xero-ruby/models/projects/pagination.rb +252 -252
- data/lib/xero-ruby/models/projects/project.rb +437 -437
- data/lib/xero-ruby/models/projects/project_create_or_update.rb +257 -257
- data/lib/xero-ruby/models/projects/project_patch.rb +227 -227
- data/lib/xero-ruby/models/projects/project_status.rb +36 -36
- data/lib/xero-ruby/models/projects/project_user.rb +242 -242
- data/lib/xero-ruby/models/projects/project_users.rb +234 -234
- data/lib/xero-ruby/models/projects/projects.rb +234 -234
- data/lib/xero-ruby/models/projects/task.rb +399 -399
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +267 -267
- data/lib/xero-ruby/models/projects/tasks.rb +234 -234
- data/lib/xero-ruby/models/projects/time_entries.rb +234 -234
- data/lib/xero-ruby/models/projects/time_entry.rb +339 -339
- data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +282 -282
- data/lib/xero-ruby/string_serialization.rb +52 -52
- data/lib/xero-ruby/version.rb +15 -15
- data/lib/xero-ruby/where.rb +67 -67
- data/lib/xero-ruby.rb +556 -556
- data/spec/accounting/api/accounting_api_spec.rb +2873 -2873
- data/spec/accounting/models/account_spec.rb +171 -171
- data/spec/accounting/models/account_type_spec.rb +35 -35
- data/spec/accounting/models/accounts_payable_spec.rb +47 -47
- data/spec/accounting/models/accounts_receivable_spec.rb +47 -47
- data/spec/accounting/models/accounts_spec.rb +41 -41
- data/spec/accounting/models/address_spec.rb +99 -99
- data/spec/accounting/models/allocation_spec.rb +53 -53
- data/spec/accounting/models/allocations_spec.rb +41 -41
- data/spec/accounting/models/attachment_spec.rb +71 -71
- data/spec/accounting/models/attachments_spec.rb +41 -41
- data/spec/accounting/models/balances_spec.rb +47 -47
- data/spec/accounting/models/bank_transaction_spec.rb +175 -175
- data/spec/accounting/models/bank_transactions_spec.rb +41 -41
- data/spec/accounting/models/bank_transfer_spec.rb +101 -101
- data/spec/accounting/models/bank_transfers_spec.rb +41 -41
- data/spec/accounting/models/batch_payment_details_spec.rb +65 -65
- data/spec/accounting/models/batch_payment_spec.rb +139 -139
- data/spec/accounting/models/batch_payments_spec.rb +41 -41
- data/spec/accounting/models/bill_spec.rb +47 -47
- data/spec/accounting/models/branding_theme_spec.rb +75 -75
- data/spec/accounting/models/branding_themes_spec.rb +41 -41
- data/spec/accounting/models/cis_org_setting_spec.rb +53 -53
- data/spec/accounting/models/cis_setting_spec.rb +47 -47
- data/spec/accounting/models/cis_settings_spec.rb +41 -41
- data/spec/accounting/models/contact_group_spec.rb +63 -63
- data/spec/accounting/models/contact_groups_spec.rb +41 -41
- data/spec/accounting/models/contact_person_spec.rb +59 -59
- data/spec/accounting/models/contact_spec.rb +273 -273
- data/spec/accounting/models/contacts_spec.rb +41 -41
- data/spec/accounting/models/country_code_spec.rb +35 -35
- data/spec/accounting/models/credit_note_spec.rb +199 -199
- data/spec/accounting/models/credit_notes_spec.rb +41 -41
- data/spec/accounting/models/currencies_spec.rb +41 -41
- data/spec/accounting/models/currency_code_spec.rb +35 -35
- data/spec/accounting/models/currency_spec.rb +47 -47
- data/spec/accounting/models/element_spec.rb +83 -83
- data/spec/accounting/models/employee_spec.rb +87 -87
- data/spec/accounting/models/employees_spec.rb +41 -41
- data/spec/accounting/models/error_spec.rb +59 -59
- data/spec/accounting/models/expense_claim_spec.rb +111 -111
- data/spec/accounting/models/expense_claims_spec.rb +41 -41
- data/spec/accounting/models/external_link_spec.rb +57 -57
- data/spec/accounting/models/history_record_spec.rb +59 -59
- data/spec/accounting/models/history_records_spec.rb +41 -41
- data/spec/accounting/models/invoice_reminder_spec.rb +41 -41
- data/spec/accounting/models/invoice_reminders_spec.rb +41 -41
- data/spec/accounting/models/invoice_spec.rb +271 -271
- data/spec/accounting/models/invoices_spec.rb +41 -41
- data/spec/accounting/models/item_spec.rb +131 -131
- data/spec/accounting/models/items_spec.rb +41 -41
- data/spec/accounting/models/journal_line_spec.rb +107 -107
- data/spec/accounting/models/journal_spec.rb +87 -87
- data/spec/accounting/models/journals_spec.rb +41 -41
- data/spec/accounting/models/line_amount_types_spec.rb +35 -35
- data/spec/accounting/models/line_item_spec.rb +113 -113
- data/spec/accounting/models/line_item_tracking_spec.rb +59 -59
- data/spec/accounting/models/linked_transaction_spec.rb +113 -113
- data/spec/accounting/models/linked_transactions_spec.rb +41 -41
- data/spec/accounting/models/manual_journal_line_spec.rb +77 -77
- data/spec/accounting/models/manual_journal_spec.rb +123 -123
- data/spec/accounting/models/manual_journals_spec.rb +41 -41
- data/spec/accounting/models/online_invoice_spec.rb +41 -41
- data/spec/accounting/models/online_invoices_spec.rb +41 -41
- data/spec/accounting/models/organisation_spec.rb +255 -255
- data/spec/accounting/models/organisations_spec.rb +41 -41
- data/spec/accounting/models/overpayment_spec.rb +157 -157
- data/spec/accounting/models/overpayments_spec.rb +41 -41
- data/spec/accounting/models/payment_delete_spec.rb +41 -41
- data/spec/accounting/models/payment_service_spec.rb +71 -71
- data/spec/accounting/models/payment_services_spec.rb +41 -41
- data/spec/accounting/models/payment_spec.rb +187 -187
- data/spec/accounting/models/payment_term_spec.rb +47 -47
- data/spec/accounting/models/payment_term_type_spec.rb +35 -35
- data/spec/accounting/models/payments_spec.rb +41 -41
- data/spec/accounting/models/phone_spec.rb +63 -63
- data/spec/accounting/models/prepayment_spec.rb +157 -157
- data/spec/accounting/models/prepayments_spec.rb +41 -41
- data/spec/accounting/models/purchase_order_spec.rb +207 -207
- data/spec/accounting/models/purchase_orders_spec.rb +41 -41
- data/spec/accounting/models/purchase_spec.rb +59 -59
- data/spec/accounting/models/quote_line_amount_types_spec.rb +35 -35
- data/spec/accounting/models/quote_spec.rb +167 -167
- data/spec/accounting/models/quote_status_codes_spec.rb +35 -35
- data/spec/accounting/models/quotes_spec.rb +41 -41
- data/spec/accounting/models/receipt_spec.rb +147 -147
- data/spec/accounting/models/receipts_spec.rb +41 -41
- data/spec/accounting/models/repeating_invoice_spec.rb +139 -139
- data/spec/accounting/models/repeating_invoices_spec.rb +41 -41
- data/spec/accounting/models/report_attribute_spec.rb +47 -47
- data/spec/accounting/models/report_cell_spec.rb +47 -47
- data/spec/accounting/models/report_fields_spec.rb +53 -53
- data/spec/accounting/models/report_row_spec.rb +53 -53
- data/spec/accounting/models/report_rows_spec.rb +59 -59
- data/spec/accounting/models/report_spec.rb +81 -81
- data/spec/accounting/models/report_with_row_spec.rb +89 -89
- data/spec/accounting/models/report_with_rows_spec.rb +41 -41
- data/spec/accounting/models/reports_spec.rb +41 -41
- data/spec/accounting/models/request_empty_spec.rb +41 -41
- data/spec/accounting/models/row_type_spec.rb +35 -35
- data/spec/accounting/models/sales_tracking_category_spec.rb +47 -47
- data/spec/accounting/models/schedule_spec.rb +85 -85
- data/spec/accounting/models/tax_component_spec.rb +59 -59
- data/spec/accounting/models/tax_rate_spec.rb +115 -115
- data/spec/accounting/models/tax_rates_spec.rb +41 -41
- data/spec/accounting/models/tax_type_spec.rb +35 -35
- data/spec/accounting/models/ten_nintey_nine_contact_spec.rb +167 -167
- data/spec/accounting/models/time_zone_spec.rb +35 -35
- data/spec/accounting/models/tracking_categories_spec.rb +41 -41
- data/spec/accounting/models/tracking_category_spec.rb +75 -75
- data/spec/accounting/models/tracking_option_spec.rb +63 -63
- data/spec/accounting/models/tracking_options_spec.rb +41 -41
- data/spec/accounting/models/user_spec.rb +81 -81
- data/spec/accounting/models/users_spec.rb +41 -41
- data/spec/accounting/models/validation_error_spec.rb +41 -41
- data/spec/api_client_spec.rb +556 -556
- data/spec/api_error_spec.rb +45 -45
- data/spec/app_store/api/app_store_api_spec.rb +45 -45
- data/spec/app_store/models/plan_spec.rb +62 -62
- data/spec/app_store/models/price_spec.rb +52 -52
- data/spec/app_store/models/problem_details_spec.rb +70 -70
- data/spec/app_store/models/product_spec.rb +56 -56
- data/spec/app_store/models/subscription_item_spec.rb +70 -70
- data/spec/app_store/models/subscription_spec.rb +82 -82
- data/spec/assets/api/asset_api_spec.rb +116 -116
- data/spec/assets/models/asset_spec.rb +125 -125
- data/spec/assets/models/asset_status_query_param_spec.rb +35 -35
- data/spec/assets/models/asset_status_spec.rb +35 -35
- data/spec/assets/models/asset_type_spec.rb +77 -77
- data/spec/assets/models/assets_spec.rb +47 -47
- data/spec/assets/models/book_depreciation_detail_spec.rb +77 -77
- data/spec/assets/models/book_depreciation_setting_spec.rb +95 -95
- data/spec/assets/models/error_spec.rb +65 -65
- data/spec/assets/models/field_validation_errors_element_spec.rb +71 -71
- data/spec/assets/models/pagination_spec.rb +59 -59
- data/spec/assets/models/resource_validation_errors_element_spec.rb +65 -65
- data/spec/assets/models/setting_spec.rb +83 -83
- data/spec/configuration_spec.rb +37 -37
- data/spec/files/api/files_api_spec.rb +249 -249
- data/spec/files/models/association_spec.rb +59 -59
- data/spec/files/models/file_object_spec.rb +83 -83
- data/spec/files/models/files_spec.rb +59 -59
- data/spec/files/models/folder_spec.rb +65 -65
- data/spec/files/models/folders_spec.rb +41 -41
- data/spec/files/models/inline_object_spec.rb +59 -59
- data/spec/files/models/object_group_spec.rb +35 -35
- data/spec/files/models/object_type_spec.rb +35 -35
- data/spec/files/models/user_spec.rb +81 -81
- data/spec/finance/api/finance_api_spec.rb +156 -156
- data/spec/finance/models/account_usage_response_spec.rb +58 -58
- data/spec/finance/models/account_usage_spec.rb +112 -112
- data/spec/finance/models/balance_sheet_account_detail_spec.rb +64 -64
- data/spec/finance/models/balance_sheet_account_group_spec.rb +46 -46
- data/spec/finance/models/balance_sheet_account_type_spec.rb +52 -52
- data/spec/finance/models/balance_sheet_response_spec.rb +58 -58
- data/spec/finance/models/bank_statement_response_spec.rb +46 -46
- data/spec/finance/models/cash_account_response_spec.rb +64 -64
- data/spec/finance/models/cash_balance_spec.rb +52 -52
- data/spec/finance/models/cash_validation_response_spec.rb +64 -64
- data/spec/finance/models/cashflow_account_spec.rb +76 -76
- data/spec/finance/models/cashflow_activity_spec.rb +52 -52
- data/spec/finance/models/cashflow_response_spec.rb +58 -58
- data/spec/finance/models/cashflow_type_spec.rb +52 -52
- data/spec/finance/models/current_statement_response_spec.rb +70 -70
- data/spec/finance/models/data_source_response_spec.rb +124 -124
- data/spec/finance/models/history_record_response_spec.rb +64 -64
- data/spec/finance/models/lock_history_model_spec.rb +52 -52
- data/spec/finance/models/lock_history_response_spec.rb +52 -52
- data/spec/finance/models/pnl_account_class_spec.rb +46 -46
- data/spec/finance/models/pnl_account_spec.rb +70 -70
- data/spec/finance/models/pnl_account_type_spec.rb +52 -52
- data/spec/finance/models/practice_response_spec.rb +64 -64
- data/spec/finance/models/problem_spec.rb +58 -58
- data/spec/finance/models/problem_type_spec.rb +34 -34
- data/spec/finance/models/profit_and_loss_response_spec.rb +64 -64
- data/spec/finance/models/report_history_model_spec.rb +52 -52
- data/spec/finance/models/report_history_response_spec.rb +52 -52
- data/spec/finance/models/statement_balance_response_spec.rb +46 -46
- data/spec/finance/models/statement_lines_response_spec.rb +136 -136
- data/spec/finance/models/trial_balance_account_spec.rb +94 -94
- data/spec/finance/models/trial_balance_entry_spec.rb +46 -46
- data/spec/finance/models/trial_balance_movement_spec.rb +58 -58
- data/spec/finance/models/trial_balance_response_spec.rb +52 -52
- data/spec/finance/models/user_activities_response_spec.rb +52 -52
- data/spec/finance/models/user_response_spec.rb +106 -106
- data/spec/helper_methods_spec.rb +110 -110
- data/spec/payroll_au/api/payroll_au_api_spec.rb +415 -415
- data/spec/payroll_au/models/account_spec.rb +59 -59
- data/spec/payroll_au/models/account_type_spec.rb +35 -35
- data/spec/payroll_au/models/allowance_type_spec.rb +35 -35
- data/spec/payroll_au/models/api_exception_spec.rb +53 -53
- data/spec/payroll_au/models/bank_account_spec.rb +71 -71
- data/spec/payroll_au/models/calendar_type_spec.rb +35 -35
- data/spec/payroll_au/models/deduction_line_spec.rb +65 -65
- data/spec/payroll_au/models/deduction_type_calculation_type_spec.rb +35 -35
- data/spec/payroll_au/models/deduction_type_spec.rb +93 -93
- data/spec/payroll_au/models/earnings_line_spec.rb +89 -89
- data/spec/payroll_au/models/earnings_rate_calculation_type_spec.rb +35 -35
- data/spec/payroll_au/models/earnings_rate_spec.rb +137 -137
- data/spec/payroll_au/models/earnings_type_spec.rb +35 -35
- data/spec/payroll_au/models/employee_spec.rb +225 -225
- data/spec/payroll_au/models/employee_status_spec.rb +35 -35
- data/spec/payroll_au/models/employees_spec.rb +41 -41
- data/spec/payroll_au/models/employment_basis_spec.rb +35 -35
- data/spec/payroll_au/models/employment_termination_payment_type_spec.rb +35 -35
- data/spec/payroll_au/models/entitlement_final_pay_payout_type_spec.rb +35 -35
- data/spec/payroll_au/models/home_address_spec.rb +71 -71
- data/spec/payroll_au/models/leave_accrual_line_spec.rb +53 -53
- data/spec/payroll_au/models/leave_application_spec.rb +95 -95
- data/spec/payroll_au/models/leave_applications_spec.rb +41 -41
- data/spec/payroll_au/models/leave_balance_spec.rb +59 -59
- data/spec/payroll_au/models/leave_earnings_line_spec.rb +53 -53
- data/spec/payroll_au/models/leave_line_calculation_type_spec.rb +35 -35
- data/spec/payroll_au/models/leave_line_spec.rb +83 -83
- data/spec/payroll_au/models/leave_lines_spec.rb +41 -41
- data/spec/payroll_au/models/leave_period_spec.rb +59 -59
- data/spec/payroll_au/models/leave_period_status_spec.rb +35 -35
- data/spec/payroll_au/models/leave_type_contribution_type_spec.rb +35 -35
- data/spec/payroll_au/models/leave_type_spec.rb +89 -89
- data/spec/payroll_au/models/manual_tax_type_spec.rb +35 -35
- data/spec/payroll_au/models/opening_balances_spec.rb +77 -77
- data/spec/payroll_au/models/pay_item_spec.rb +59 -59
- data/spec/payroll_au/models/pay_items_spec.rb +41 -41
- data/spec/payroll_au/models/pay_run_spec.rb +131 -131
- data/spec/payroll_au/models/pay_run_status_spec.rb +35 -35
- data/spec/payroll_au/models/pay_runs_spec.rb +41 -41
- data/spec/payroll_au/models/pay_template_spec.rb +65 -65
- data/spec/payroll_au/models/payment_frequency_type_spec.rb +35 -35
- data/spec/payroll_au/models/payroll_calendar_spec.rb +77 -77
- data/spec/payroll_au/models/payroll_calendars_spec.rb +41 -41
- data/spec/payroll_au/models/payslip_lines_spec.rb +83 -83
- data/spec/payroll_au/models/payslip_object_spec.rb +41 -41
- data/spec/payroll_au/models/payslip_spec.rb +149 -149
- data/spec/payroll_au/models/payslip_summary_spec.rb +107 -107
- data/spec/payroll_au/models/payslips_spec.rb +41 -41
- data/spec/payroll_au/models/rate_type_spec.rb +35 -35
- data/spec/payroll_au/models/reimbursement_line_spec.rb +59 -59
- data/spec/payroll_au/models/reimbursement_lines_spec.rb +41 -41
- data/spec/payroll_au/models/reimbursement_type_spec.rb +65 -65
- data/spec/payroll_au/models/residency_status_spec.rb +35 -35
- data/spec/payroll_au/models/settings_object_spec.rb +41 -41
- data/spec/payroll_au/models/settings_spec.rb +53 -53
- data/spec/payroll_au/models/settings_tracking_categories_employee_groups_spec.rb +47 -47
- data/spec/payroll_au/models/settings_tracking_categories_spec.rb +47 -47
- data/spec/payroll_au/models/settings_tracking_categories_timesheet_categories_spec.rb +47 -47
- data/spec/payroll_au/models/state_spec.rb +35 -35
- data/spec/payroll_au/models/super_fund_product_spec.rb +59 -59
- data/spec/payroll_au/models/super_fund_products_spec.rb +41 -41
- data/spec/payroll_au/models/super_fund_spec.rb +113 -113
- data/spec/payroll_au/models/super_fund_type_spec.rb +35 -35
- data/spec/payroll_au/models/super_funds_spec.rb +41 -41
- data/spec/payroll_au/models/super_line_spec.rb +83 -83
- data/spec/payroll_au/models/super_membership_spec.rb +53 -53
- data/spec/payroll_au/models/superannuation_calculation_type_spec.rb +35 -35
- data/spec/payroll_au/models/superannuation_contribution_type_spec.rb +35 -35
- data/spec/payroll_au/models/superannuation_line_spec.rb +89 -89
- data/spec/payroll_au/models/tax_declaration_spec.rb +131 -131
- data/spec/payroll_au/models/tax_line_spec.rb +71 -71
- data/spec/payroll_au/models/tfn_exemption_type_spec.rb +35 -35
- data/spec/payroll_au/models/timesheet_line_spec.rb +59 -59
- data/spec/payroll_au/models/timesheet_object_spec.rb +41 -41
- data/spec/payroll_au/models/timesheet_spec.rb +89 -89
- data/spec/payroll_au/models/timesheet_status_spec.rb +35 -35
- data/spec/payroll_au/models/timesheets_spec.rb +41 -41
- data/spec/payroll_au/models/validation_error_spec.rb +41 -41
- data/spec/payroll_nz/api/payroll_nz_api_spec.rb +886 -886
- data/spec/payroll_nz/models/account_spec.rb +63 -63
- data/spec/payroll_nz/models/accounts_spec.rb +41 -41
- data/spec/payroll_nz/models/address_spec.rb +71 -71
- data/spec/payroll_nz/models/bank_account_spec.rb +87 -87
- data/spec/payroll_nz/models/benefit_spec.rb +103 -103
- data/spec/payroll_nz/models/deduction_line_spec.rb +65 -65
- data/spec/payroll_nz/models/deduction_object_spec.rb +53 -53
- data/spec/payroll_nz/models/deduction_spec.rb +75 -75
- data/spec/payroll_nz/models/deductions_spec.rb +53 -53
- data/spec/payroll_nz/models/earnings_line_spec.rb +95 -95
- data/spec/payroll_nz/models/earnings_order_object_spec.rb +53 -53
- data/spec/payroll_nz/models/earnings_order_spec.rb +65 -65
- data/spec/payroll_nz/models/earnings_orders_spec.rb +53 -53
- data/spec/payroll_nz/models/earnings_rate_object_spec.rb +53 -53
- data/spec/payroll_nz/models/earnings_rate_spec.rb +103 -103
- data/spec/payroll_nz/models/earnings_rates_spec.rb +53 -53
- data/spec/payroll_nz/models/earnings_template_object_spec.rb +53 -53
- data/spec/payroll_nz/models/earnings_template_spec.rb +71 -71
- data/spec/payroll_nz/models/employee_earnings_templates_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_leave_balance_spec.rb +59 -59
- data/spec/payroll_nz/models/employee_leave_balances_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_leave_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_leave_setup_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_leave_setup_spec.rb +77 -77
- data/spec/payroll_nz/models/employee_leave_spec.rb +77 -77
- data/spec/payroll_nz/models/employee_leave_type_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_leave_type_spec.rb +99 -99
- data/spec/payroll_nz/models/employee_leave_types_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_leaves_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_opening_balance_spec.rb +59 -59
- data/spec/payroll_nz/models/employee_opening_balances_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_pay_template_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_pay_template_spec.rb +47 -47
- data/spec/payroll_nz/models/employee_pay_templates_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_spec.rb +123 -123
- data/spec/payroll_nz/models/employee_statutory_leave_balance_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_statutory_leave_balance_spec.rb +61 -61
- data/spec/payroll_nz/models/employee_statutory_leave_summary_spec.rb +85 -85
- data/spec/payroll_nz/models/employee_statutory_leaves_summaries_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_statutory_sick_leave_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_statutory_sick_leave_spec.rb +135 -135
- data/spec/payroll_nz/models/employee_statutory_sick_leaves_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_tax_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employee_tax_spec.rb +135 -135
- data/spec/payroll_nz/models/employees_spec.rb +53 -53
- data/spec/payroll_nz/models/employment_object_spec.rb +53 -53
- data/spec/payroll_nz/models/employment_spec.rb +53 -53
- data/spec/payroll_nz/models/gross_earnings_history_spec.rb +47 -47
- data/spec/payroll_nz/models/invalid_field_spec.rb +47 -47
- data/spec/payroll_nz/models/leave_accrual_line_spec.rb +47 -47
- data/spec/payroll_nz/models/leave_earnings_line_spec.rb +95 -95
- data/spec/payroll_nz/models/leave_period_spec.rb +63 -63
- data/spec/payroll_nz/models/leave_periods_spec.rb +53 -53
- data/spec/payroll_nz/models/leave_type_object_spec.rb +53 -53
- data/spec/payroll_nz/models/leave_type_spec.rb +71 -71
- data/spec/payroll_nz/models/leave_types_spec.rb +53 -53
- data/spec/payroll_nz/models/pagination_spec.rb +59 -59
- data/spec/payroll_nz/models/pay_run_calendar_object_spec.rb +53 -53
- data/spec/payroll_nz/models/pay_run_calendar_spec.rb +81 -81
- data/spec/payroll_nz/models/pay_run_calendars_spec.rb +53 -53
- data/spec/payroll_nz/models/pay_run_object_spec.rb +53 -53
- data/spec/payroll_nz/models/pay_run_spec.rb +119 -119
- data/spec/payroll_nz/models/pay_runs_spec.rb +53 -53
- data/spec/payroll_nz/models/pay_slip_object_spec.rb +53 -53
- data/spec/payroll_nz/models/pay_slip_spec.rb +219 -219
- data/spec/payroll_nz/models/pay_slips_spec.rb +53 -53
- data/spec/payroll_nz/models/payment_line_spec.rb +65 -65
- data/spec/payroll_nz/models/payment_method_object_spec.rb +53 -53
- data/spec/payroll_nz/models/payment_method_spec.rb +51 -51
- data/spec/payroll_nz/models/problem_spec.rb +71 -71
- data/spec/payroll_nz/models/reimbursement_line_spec.rb +65 -65
- data/spec/payroll_nz/models/reimbursement_object_spec.rb +53 -53
- data/spec/payroll_nz/models/reimbursement_spec.rb +101 -101
- data/spec/payroll_nz/models/reimbursements_spec.rb +53 -53
- data/spec/payroll_nz/models/salary_and_wage_object_spec.rb +53 -53
- data/spec/payroll_nz/models/salary_and_wage_spec.rb +103 -103
- data/spec/payroll_nz/models/salary_and_wages_spec.rb +53 -53
- data/spec/payroll_nz/models/settings_spec.rb +53 -53
- data/spec/payroll_nz/models/statutory_deduction_category_spec.rb +35 -35
- data/spec/payroll_nz/models/statutory_deduction_line_spec.rb +59 -59
- data/spec/payroll_nz/models/statutory_deduction_object_spec.rb +53 -53
- data/spec/payroll_nz/models/statutory_deduction_spec.rb +65 -65
- data/spec/payroll_nz/models/statutory_deductions_spec.rb +53 -53
- data/spec/payroll_nz/models/superannuation_line_spec.rb +71 -71
- data/spec/payroll_nz/models/superannuation_object_spec.rb +53 -53
- data/spec/payroll_nz/models/superannuations_spec.rb +53 -53
- data/spec/payroll_nz/models/tax_code_spec.rb +35 -35
- data/spec/payroll_nz/models/tax_line_spec.rb +65 -65
- data/spec/payroll_nz/models/tax_settings_spec.rb +75 -75
- data/spec/payroll_nz/models/timesheet_earnings_line_spec.rb +95 -95
- data/spec/payroll_nz/models/timesheet_line_object_spec.rb +53 -53
- data/spec/payroll_nz/models/timesheet_line_spec.rb +65 -65
- data/spec/payroll_nz/models/timesheet_object_spec.rb +53 -53
- data/spec/payroll_nz/models/timesheet_spec.rb +93 -93
- data/spec/payroll_nz/models/timesheets_spec.rb +53 -53
- data/spec/payroll_nz/models/tracking_categories_spec.rb +53 -53
- data/spec/payroll_nz/models/tracking_category_spec.rb +47 -47
- data/spec/payroll_uk/api/payroll_uk_api_spec.rb +912 -912
- data/spec/payroll_uk/models/account_spec.rb +63 -63
- data/spec/payroll_uk/models/accounts_spec.rb +41 -41
- data/spec/payroll_uk/models/address_spec.rb +65 -65
- data/spec/payroll_uk/models/bank_account_spec.rb +53 -53
- data/spec/payroll_uk/models/benefit_line_spec.rb +65 -65
- data/spec/payroll_uk/models/benefit_object_spec.rb +53 -53
- data/spec/payroll_uk/models/benefit_spec.rb +127 -127
- data/spec/payroll_uk/models/benefits_spec.rb +53 -53
- data/spec/payroll_uk/models/court_order_line_spec.rb +47 -47
- data/spec/payroll_uk/models/deduction_line_spec.rb +59 -59
- data/spec/payroll_uk/models/deduction_object_spec.rb +53 -53
- data/spec/payroll_uk/models/deduction_spec.rb +139 -139
- data/spec/payroll_uk/models/deductions_spec.rb +53 -53
- data/spec/payroll_uk/models/earnings_line_spec.rb +89 -89
- data/spec/payroll_uk/models/earnings_order_object_spec.rb +53 -53
- data/spec/payroll_uk/models/earnings_order_spec.rb +65 -65
- data/spec/payroll_uk/models/earnings_orders_spec.rb +53 -53
- data/spec/payroll_uk/models/earnings_rate_object_spec.rb +53 -53
- data/spec/payroll_uk/models/earnings_rate_spec.rb +103 -103
- data/spec/payroll_uk/models/earnings_rates_spec.rb +53 -53
- data/spec/payroll_uk/models/earnings_template_object_spec.rb +53 -53
- data/spec/payroll_uk/models/earnings_template_spec.rb +71 -71
- data/spec/payroll_uk/models/employee_leave_balance_spec.rb +59 -59
- data/spec/payroll_uk/models/employee_leave_balances_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_leave_object_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_leave_spec.rb +77 -77
- data/spec/payroll_uk/models/employee_leave_type_object_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_leave_type_spec.rb +75 -75
- data/spec/payroll_uk/models/employee_leave_types_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_leaves_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_object_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_opening_balances_object_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_opening_balances_spec.rb +71 -71
- data/spec/payroll_uk/models/employee_pay_template_object_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_pay_template_spec.rb +47 -47
- data/spec/payroll_uk/models/employee_pay_templates_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_spec.rb +129 -129
- data/spec/payroll_uk/models/employee_statutory_leave_balance_object_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_statutory_leave_balance_spec.rb +61 -61
- data/spec/payroll_uk/models/employee_statutory_leave_summary_spec.rb +85 -85
- data/spec/payroll_uk/models/employee_statutory_leaves_summaries_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_statutory_sick_leave_object_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_statutory_sick_leave_spec.rb +135 -135
- data/spec/payroll_uk/models/employee_statutory_sick_leaves_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_tax_object_spec.rb +53 -53
- data/spec/payroll_uk/models/employee_tax_spec.rb +101 -101
- data/spec/payroll_uk/models/employees_spec.rb +53 -53
- data/spec/payroll_uk/models/employment_object_spec.rb +53 -53
- data/spec/payroll_uk/models/employment_spec.rb +63 -63
- data/spec/payroll_uk/models/invalid_field_spec.rb +47 -47
- data/spec/payroll_uk/models/leave_accrual_line_spec.rb +47 -47
- data/spec/payroll_uk/models/leave_earnings_line_spec.rb +71 -71
- data/spec/payroll_uk/models/leave_period_spec.rb +63 -63
- data/spec/payroll_uk/models/leave_periods_spec.rb +53 -53
- data/spec/payroll_uk/models/leave_type_object_spec.rb +53 -53
- data/spec/payroll_uk/models/leave_type_spec.rb +83 -83
- data/spec/payroll_uk/models/leave_types_spec.rb +53 -53
- data/spec/payroll_uk/models/pagination_spec.rb +59 -59
- data/spec/payroll_uk/models/pay_run_calendar_object_spec.rb +53 -53
- data/spec/payroll_uk/models/pay_run_calendar_spec.rb +81 -81
- data/spec/payroll_uk/models/pay_run_calendars_spec.rb +53 -53
- data/spec/payroll_uk/models/pay_run_object_spec.rb +53 -53
- data/spec/payroll_uk/models/pay_run_spec.rb +119 -119
- data/spec/payroll_uk/models/pay_runs_spec.rb +53 -53
- data/spec/payroll_uk/models/payment_line_spec.rb +65 -65
- data/spec/payroll_uk/models/payment_method_object_spec.rb +53 -53
- data/spec/payroll_uk/models/payment_method_spec.rb +51 -51
- data/spec/payroll_uk/models/payslip_object_spec.rb +53 -53
- data/spec/payroll_uk/models/payslip_spec.rb +201 -201
- data/spec/payroll_uk/models/payslips_spec.rb +53 -53
- data/spec/payroll_uk/models/problem_spec.rb +71 -71
- data/spec/payroll_uk/models/reimbursement_line_spec.rb +53 -53
- data/spec/payroll_uk/models/reimbursement_object_spec.rb +53 -53
- data/spec/payroll_uk/models/reimbursement_spec.rb +59 -59
- data/spec/payroll_uk/models/reimbursements_spec.rb +53 -53
- data/spec/payroll_uk/models/salary_and_wage_object_spec.rb +53 -53
- data/spec/payroll_uk/models/salary_and_wage_spec.rb +97 -97
- data/spec/payroll_uk/models/salary_and_wages_spec.rb +53 -53
- data/spec/payroll_uk/models/settings_spec.rb +53 -53
- data/spec/payroll_uk/models/statutory_deduction_category_spec.rb +35 -35
- data/spec/payroll_uk/models/statutory_deduction_spec.rb +65 -65
- data/spec/payroll_uk/models/tax_line_spec.rb +71 -71
- data/spec/payroll_uk/models/timesheet_earnings_line_spec.rb +71 -71
- data/spec/payroll_uk/models/timesheet_line_object_spec.rb +53 -53
- data/spec/payroll_uk/models/timesheet_line_spec.rb +65 -65
- data/spec/payroll_uk/models/timesheet_object_spec.rb +53 -53
- data/spec/payroll_uk/models/timesheet_spec.rb +93 -93
- data/spec/payroll_uk/models/timesheets_spec.rb +53 -53
- data/spec/payroll_uk/models/tracking_categories_spec.rb +53 -53
- data/spec/payroll_uk/models/tracking_category_spec.rb +47 -47
- data/spec/projects/api/project_api_spec.rb +229 -229
- data/spec/projects/models/amount_spec.rb +47 -47
- data/spec/projects/models/charge_type_spec.rb +35 -35
- data/spec/projects/models/currency_code_spec.rb +35 -35
- data/spec/projects/models/error_spec.rb +47 -47
- data/spec/projects/models/pagination_spec.rb +59 -59
- data/spec/projects/models/project_create_or_update_spec.rb +59 -59
- data/spec/projects/models/project_patch_spec.rb +41 -41
- data/spec/projects/models/project_spec.rb +167 -167
- data/spec/projects/models/project_status_spec.rb +35 -35
- data/spec/projects/models/project_user_spec.rb +53 -53
- data/spec/projects/models/project_users_spec.rb +47 -47
- data/spec/projects/models/projects_spec.rb +47 -47
- data/spec/projects/models/task_create_or_update_spec.rb +59 -59
- data/spec/projects/models/task_spec.rb +129 -129
- data/spec/projects/models/tasks_spec.rb +47 -47
- data/spec/projects/models/time_entries_spec.rb +47 -47
- data/spec/projects/models/time_entry_create_or_update_spec.rb +65 -65
- data/spec/projects/models/time_entry_spec.rb +93 -93
- data/spec/spec_helper.rb +111 -111
- data/spec/where_spec.rb +82 -82
- metadata +386 -386
|
@@ -1,1402 +1,1402 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Xero Projects API
|
|
3
|
-
|
|
4
|
-
#This is the Xero Projects API
|
|
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 ProjectApi
|
|
14
|
-
attr_accessor :api_client
|
|
15
|
-
|
|
16
|
-
def initialize(api_client = ApiClient.new)
|
|
17
|
-
@api_client = api_client
|
|
18
|
-
end
|
|
19
|
-
# Create one or more new projects
|
|
20
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
21
|
-
# @param project_create_or_update [ProjectCreateOrUpdate] Create a new project with ProjectCreateOrUpdate object
|
|
22
|
-
# @param [Hash] opts the optional parameters
|
|
23
|
-
# @return [Project]
|
|
24
|
-
def create_project(xero_tenant_id, project_create_or_update, opts = {})
|
|
25
|
-
data, _status_code, _headers = create_project_with_http_info(xero_tenant_id, project_create_or_update, opts)
|
|
26
|
-
data
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# Create one or more new projects
|
|
30
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
31
|
-
# @param project_create_or_update [ProjectCreateOrUpdate] Create a new project with ProjectCreateOrUpdate object
|
|
32
|
-
# @param [Hash] opts the optional parameters
|
|
33
|
-
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
34
|
-
def create_project_with_http_info(xero_tenant_id, project_create_or_update, options = {})
|
|
35
|
-
opts = options.dup
|
|
36
|
-
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.create_project ...'
|
|
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 ProjectApi.create_project"
|
|
42
|
-
end
|
|
43
|
-
# verify the required parameter 'project_create_or_update' is set
|
|
44
|
-
if @api_client.config.client_side_validation && project_create_or_update.nil?
|
|
45
|
-
fail ArgumentError, "Missing the required parameter 'project_create_or_update' when calling ProjectApi.create_project"
|
|
46
|
-
end
|
|
47
|
-
# resource path
|
|
48
|
-
local_var_path = '/Projects'
|
|
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(project_create_or_update)
|
|
73
|
-
|
|
74
|
-
# return_type
|
|
75
|
-
return_type = opts[:return_type] || 'Project'
|
|
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, "ProjectApi", new_options)
|
|
90
|
-
if @api_client.config.debugging
|
|
91
|
-
@api_client.config.logger.debug "API called: ProjectApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
-
end
|
|
93
|
-
return data, status_code, headers
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Allows you to create a task
|
|
97
|
-
# Allows you to create a specific task
|
|
98
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
99
|
-
# @param project_id [String] You can create a task on a specified projectId
|
|
100
|
-
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are creating
|
|
101
|
-
# @param [Hash] opts the optional parameters
|
|
102
|
-
# @return [Task]
|
|
103
|
-
def create_task(xero_tenant_id, project_id, task_create_or_update, opts = {})
|
|
104
|
-
data, _status_code, _headers = create_task_with_http_info(xero_tenant_id, project_id, task_create_or_update, opts)
|
|
105
|
-
data
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
# Allows you to create a task
|
|
109
|
-
# Allows you to create a specific task
|
|
110
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
111
|
-
# @param project_id [String] You can create a task on a specified projectId
|
|
112
|
-
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are creating
|
|
113
|
-
# @param [Hash] opts the optional parameters
|
|
114
|
-
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
|
115
|
-
def create_task_with_http_info(xero_tenant_id, project_id, task_create_or_update, options = {})
|
|
116
|
-
opts = options.dup
|
|
117
|
-
if @api_client.config.debugging
|
|
118
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.create_task ...'
|
|
119
|
-
end
|
|
120
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
121
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
122
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.create_task"
|
|
123
|
-
end
|
|
124
|
-
# verify the required parameter 'project_id' is set
|
|
125
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
126
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.create_task"
|
|
127
|
-
end
|
|
128
|
-
# verify the required parameter 'task_create_or_update' is set
|
|
129
|
-
if @api_client.config.client_side_validation && task_create_or_update.nil?
|
|
130
|
-
fail ArgumentError, "Missing the required parameter 'task_create_or_update' when calling ProjectApi.create_task"
|
|
131
|
-
end
|
|
132
|
-
# resource path
|
|
133
|
-
local_var_path = '/Projects/{projectId}/Tasks'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
134
|
-
|
|
135
|
-
# camelize keys of incoming `where` opts
|
|
136
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
137
|
-
|
|
138
|
-
# query parameters
|
|
139
|
-
query_params = opts[:query_params] || {}
|
|
140
|
-
|
|
141
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
142
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
143
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
144
|
-
|
|
145
|
-
# header parameters
|
|
146
|
-
header_params = opts[:header_params] || {}
|
|
147
|
-
# HTTP header 'Accept' (if needed)
|
|
148
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
149
|
-
# HTTP header 'Content-Type'
|
|
150
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
151
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
152
|
-
|
|
153
|
-
# form parameters
|
|
154
|
-
form_params = opts[:form_params] || {}
|
|
155
|
-
|
|
156
|
-
# http body (model)
|
|
157
|
-
post_body = opts[:body] || @api_client.object_to_http_body(task_create_or_update)
|
|
158
|
-
|
|
159
|
-
# return_type
|
|
160
|
-
return_type = opts[:return_type] || 'Task'
|
|
161
|
-
|
|
162
|
-
# auth_names
|
|
163
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
164
|
-
|
|
165
|
-
new_options = opts.merge(
|
|
166
|
-
:header_params => header_params,
|
|
167
|
-
:query_params => query_params,
|
|
168
|
-
:form_params => form_params,
|
|
169
|
-
:body => post_body,
|
|
170
|
-
:auth_names => auth_names,
|
|
171
|
-
:return_type => return_type
|
|
172
|
-
)
|
|
173
|
-
|
|
174
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, "ProjectApi", new_options)
|
|
175
|
-
if @api_client.config.debugging
|
|
176
|
-
@api_client.config.logger.debug "API called: ProjectApi#create_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
177
|
-
end
|
|
178
|
-
return data, status_code, headers
|
|
179
|
-
end
|
|
180
|
-
|
|
181
|
-
# Creates a time entry for a specific project
|
|
182
|
-
# Allows you to create a specific task
|
|
183
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
184
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
185
|
-
# @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are creating
|
|
186
|
-
# @param [Hash] opts the optional parameters
|
|
187
|
-
# @return [TimeEntry]
|
|
188
|
-
def create_time_entry(xero_tenant_id, project_id, time_entry_create_or_update, opts = {})
|
|
189
|
-
data, _status_code, _headers = create_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_create_or_update, opts)
|
|
190
|
-
data
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
# Creates a time entry for a specific project
|
|
194
|
-
# Allows you to create a specific task
|
|
195
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
196
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
197
|
-
# @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are creating
|
|
198
|
-
# @param [Hash] opts the optional parameters
|
|
199
|
-
# @return [Array<(TimeEntry, Integer, Hash)>] TimeEntry data, response status code and response headers
|
|
200
|
-
def create_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_create_or_update, options = {})
|
|
201
|
-
opts = options.dup
|
|
202
|
-
if @api_client.config.debugging
|
|
203
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.create_time_entry ...'
|
|
204
|
-
end
|
|
205
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
206
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
207
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.create_time_entry"
|
|
208
|
-
end
|
|
209
|
-
# verify the required parameter 'project_id' is set
|
|
210
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
211
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.create_time_entry"
|
|
212
|
-
end
|
|
213
|
-
# verify the required parameter 'time_entry_create_or_update' is set
|
|
214
|
-
if @api_client.config.client_side_validation && time_entry_create_or_update.nil?
|
|
215
|
-
fail ArgumentError, "Missing the required parameter 'time_entry_create_or_update' when calling ProjectApi.create_time_entry"
|
|
216
|
-
end
|
|
217
|
-
# resource path
|
|
218
|
-
local_var_path = '/Projects/{projectId}/Time'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
219
|
-
|
|
220
|
-
# camelize keys of incoming `where` opts
|
|
221
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
222
|
-
|
|
223
|
-
# query parameters
|
|
224
|
-
query_params = opts[:query_params] || {}
|
|
225
|
-
|
|
226
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
227
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
228
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
229
|
-
|
|
230
|
-
# header parameters
|
|
231
|
-
header_params = opts[:header_params] || {}
|
|
232
|
-
# HTTP header 'Accept' (if needed)
|
|
233
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
234
|
-
# HTTP header 'Content-Type'
|
|
235
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
236
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
237
|
-
|
|
238
|
-
# form parameters
|
|
239
|
-
form_params = opts[:form_params] || {}
|
|
240
|
-
|
|
241
|
-
# http body (model)
|
|
242
|
-
post_body = opts[:body] || @api_client.object_to_http_body(time_entry_create_or_update)
|
|
243
|
-
|
|
244
|
-
# return_type
|
|
245
|
-
return_type = opts[:return_type] || 'TimeEntry'
|
|
246
|
-
|
|
247
|
-
# auth_names
|
|
248
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
249
|
-
|
|
250
|
-
new_options = opts.merge(
|
|
251
|
-
:header_params => header_params,
|
|
252
|
-
:query_params => query_params,
|
|
253
|
-
:form_params => form_params,
|
|
254
|
-
:body => post_body,
|
|
255
|
-
:auth_names => auth_names,
|
|
256
|
-
:return_type => return_type
|
|
257
|
-
)
|
|
258
|
-
|
|
259
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, "ProjectApi", new_options)
|
|
260
|
-
if @api_client.config.debugging
|
|
261
|
-
@api_client.config.logger.debug "API called: ProjectApi#create_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
262
|
-
end
|
|
263
|
-
return data, status_code, headers
|
|
264
|
-
end
|
|
265
|
-
|
|
266
|
-
# Allows you to delete a task
|
|
267
|
-
# Allows you to delete a specific task
|
|
268
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
269
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
270
|
-
# @param task_id [String] You can specify an individual task by appending the id to the endpoint
|
|
271
|
-
# @param [Hash] opts the optional parameters
|
|
272
|
-
# @return [nil]
|
|
273
|
-
def delete_task(xero_tenant_id, project_id, task_id, opts = {})
|
|
274
|
-
delete_task_with_http_info(xero_tenant_id, project_id, task_id, opts)
|
|
275
|
-
nil
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
# Allows you to delete a task
|
|
279
|
-
# Allows you to delete a specific task
|
|
280
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
281
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
282
|
-
# @param task_id [String] You can specify an individual task by appending the id to the endpoint
|
|
283
|
-
# @param [Hash] opts the optional parameters
|
|
284
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
285
|
-
def delete_task_with_http_info(xero_tenant_id, project_id, task_id, options = {})
|
|
286
|
-
opts = options.dup
|
|
287
|
-
if @api_client.config.debugging
|
|
288
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.delete_task ...'
|
|
289
|
-
end
|
|
290
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
291
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
292
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.delete_task"
|
|
293
|
-
end
|
|
294
|
-
# verify the required parameter 'project_id' is set
|
|
295
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
296
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.delete_task"
|
|
297
|
-
end
|
|
298
|
-
# verify the required parameter 'task_id' is set
|
|
299
|
-
if @api_client.config.client_side_validation && task_id.nil?
|
|
300
|
-
fail ArgumentError, "Missing the required parameter 'task_id' when calling ProjectApi.delete_task"
|
|
301
|
-
end
|
|
302
|
-
# resource path
|
|
303
|
-
local_var_path = '/Projects/{projectId}/Tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)
|
|
304
|
-
|
|
305
|
-
# camelize keys of incoming `where` opts
|
|
306
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
307
|
-
|
|
308
|
-
# query parameters
|
|
309
|
-
query_params = opts[:query_params] || {}
|
|
310
|
-
|
|
311
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
312
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
313
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
314
|
-
|
|
315
|
-
# header parameters
|
|
316
|
-
header_params = opts[:header_params] || {}
|
|
317
|
-
# HTTP header 'Accept' (if needed)
|
|
318
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
319
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
320
|
-
|
|
321
|
-
# form parameters
|
|
322
|
-
form_params = opts[:form_params] || {}
|
|
323
|
-
|
|
324
|
-
# http body (model)
|
|
325
|
-
post_body = opts[:body]
|
|
326
|
-
|
|
327
|
-
# return_type
|
|
328
|
-
return_type = opts[:return_type]
|
|
329
|
-
|
|
330
|
-
# auth_names
|
|
331
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
332
|
-
|
|
333
|
-
new_options = opts.merge(
|
|
334
|
-
:header_params => header_params,
|
|
335
|
-
:query_params => query_params,
|
|
336
|
-
:form_params => form_params,
|
|
337
|
-
:body => post_body,
|
|
338
|
-
:auth_names => auth_names,
|
|
339
|
-
:return_type => return_type
|
|
340
|
-
)
|
|
341
|
-
|
|
342
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "ProjectApi", new_options)
|
|
343
|
-
if @api_client.config.debugging
|
|
344
|
-
@api_client.config.logger.debug "API called: ProjectApi#delete_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
345
|
-
end
|
|
346
|
-
return data, status_code, headers
|
|
347
|
-
end
|
|
348
|
-
|
|
349
|
-
# Deletes a time entry for a specific project
|
|
350
|
-
# Allows you to delete a specific time entry
|
|
351
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
352
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
353
|
-
# @param time_entry_id [String] You can specify an individual task by appending the id to the endpoint
|
|
354
|
-
# @param [Hash] opts the optional parameters
|
|
355
|
-
# @return [nil]
|
|
356
|
-
def delete_time_entry(xero_tenant_id, project_id, time_entry_id, opts = {})
|
|
357
|
-
delete_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, opts)
|
|
358
|
-
nil
|
|
359
|
-
end
|
|
360
|
-
|
|
361
|
-
# Deletes a time entry for a specific project
|
|
362
|
-
# Allows you to delete a specific time entry
|
|
363
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
364
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
365
|
-
# @param time_entry_id [String] You can specify an individual task by appending the id to the endpoint
|
|
366
|
-
# @param [Hash] opts the optional parameters
|
|
367
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
368
|
-
def delete_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, options = {})
|
|
369
|
-
opts = options.dup
|
|
370
|
-
if @api_client.config.debugging
|
|
371
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.delete_time_entry ...'
|
|
372
|
-
end
|
|
373
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
374
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
375
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.delete_time_entry"
|
|
376
|
-
end
|
|
377
|
-
# verify the required parameter 'project_id' is set
|
|
378
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
379
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.delete_time_entry"
|
|
380
|
-
end
|
|
381
|
-
# verify the required parameter 'time_entry_id' is set
|
|
382
|
-
if @api_client.config.client_side_validation && time_entry_id.nil?
|
|
383
|
-
fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.delete_time_entry"
|
|
384
|
-
end
|
|
385
|
-
# resource path
|
|
386
|
-
local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
|
387
|
-
|
|
388
|
-
# camelize keys of incoming `where` opts
|
|
389
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
390
|
-
|
|
391
|
-
# query parameters
|
|
392
|
-
query_params = opts[:query_params] || {}
|
|
393
|
-
|
|
394
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
395
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
396
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
397
|
-
|
|
398
|
-
# header parameters
|
|
399
|
-
header_params = opts[:header_params] || {}
|
|
400
|
-
# HTTP header 'Accept' (if needed)
|
|
401
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
402
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
403
|
-
|
|
404
|
-
# form parameters
|
|
405
|
-
form_params = opts[:form_params] || {}
|
|
406
|
-
|
|
407
|
-
# http body (model)
|
|
408
|
-
post_body = opts[:body]
|
|
409
|
-
|
|
410
|
-
# return_type
|
|
411
|
-
return_type = opts[:return_type]
|
|
412
|
-
|
|
413
|
-
# auth_names
|
|
414
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
415
|
-
|
|
416
|
-
new_options = opts.merge(
|
|
417
|
-
:header_params => header_params,
|
|
418
|
-
:query_params => query_params,
|
|
419
|
-
:form_params => form_params,
|
|
420
|
-
:body => post_body,
|
|
421
|
-
:auth_names => auth_names,
|
|
422
|
-
:return_type => return_type
|
|
423
|
-
)
|
|
424
|
-
|
|
425
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "ProjectApi", new_options)
|
|
426
|
-
if @api_client.config.debugging
|
|
427
|
-
@api_client.config.logger.debug "API called: ProjectApi#delete_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
428
|
-
end
|
|
429
|
-
return data, status_code, headers
|
|
430
|
-
end
|
|
431
|
-
|
|
432
|
-
# Retrieves a single project
|
|
433
|
-
# Allows you to retrieve a specific project using the projectId
|
|
434
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
435
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
436
|
-
# @param [Hash] opts the optional parameters
|
|
437
|
-
# @return [Project]
|
|
438
|
-
def get_project(xero_tenant_id, project_id, opts = {})
|
|
439
|
-
data, _status_code, _headers = get_project_with_http_info(xero_tenant_id, project_id, opts)
|
|
440
|
-
data
|
|
441
|
-
end
|
|
442
|
-
|
|
443
|
-
# Retrieves a single project
|
|
444
|
-
# Allows you to retrieve a specific project using the projectId
|
|
445
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
446
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
447
|
-
# @param [Hash] opts the optional parameters
|
|
448
|
-
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
449
|
-
def get_project_with_http_info(xero_tenant_id, project_id, options = {})
|
|
450
|
-
opts = options.dup
|
|
451
|
-
if @api_client.config.debugging
|
|
452
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.get_project ...'
|
|
453
|
-
end
|
|
454
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
455
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
456
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_project"
|
|
457
|
-
end
|
|
458
|
-
# verify the required parameter 'project_id' is set
|
|
459
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
460
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_project"
|
|
461
|
-
end
|
|
462
|
-
# resource path
|
|
463
|
-
local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
464
|
-
|
|
465
|
-
# camelize keys of incoming `where` opts
|
|
466
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
467
|
-
|
|
468
|
-
# query parameters
|
|
469
|
-
query_params = opts[:query_params] || {}
|
|
470
|
-
|
|
471
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
472
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
473
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
474
|
-
|
|
475
|
-
# header parameters
|
|
476
|
-
header_params = opts[:header_params] || {}
|
|
477
|
-
# HTTP header 'Accept' (if needed)
|
|
478
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
479
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
480
|
-
|
|
481
|
-
# form parameters
|
|
482
|
-
form_params = opts[:form_params] || {}
|
|
483
|
-
|
|
484
|
-
# http body (model)
|
|
485
|
-
post_body = opts[:body]
|
|
486
|
-
|
|
487
|
-
# return_type
|
|
488
|
-
return_type = opts[:return_type] || 'Project'
|
|
489
|
-
|
|
490
|
-
# auth_names
|
|
491
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
492
|
-
|
|
493
|
-
new_options = opts.merge(
|
|
494
|
-
:header_params => header_params,
|
|
495
|
-
:query_params => query_params,
|
|
496
|
-
:form_params => form_params,
|
|
497
|
-
:body => post_body,
|
|
498
|
-
:auth_names => auth_names,
|
|
499
|
-
:return_type => return_type
|
|
500
|
-
)
|
|
501
|
-
|
|
502
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
503
|
-
if @api_client.config.debugging
|
|
504
|
-
@api_client.config.logger.debug "API called: ProjectApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
505
|
-
end
|
|
506
|
-
return data, status_code, headers
|
|
507
|
-
end
|
|
508
|
-
|
|
509
|
-
# Retrieves a list of all project users
|
|
510
|
-
# Allows you to retrieve the users on a projects.
|
|
511
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
512
|
-
# @param [Hash] opts the optional parameters
|
|
513
|
-
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. (default to 1)
|
|
514
|
-
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. (default to 50)
|
|
515
|
-
# @return [ProjectUsers]
|
|
516
|
-
def get_project_users(xero_tenant_id, opts = {})
|
|
517
|
-
data, _status_code, _headers = get_project_users_with_http_info(xero_tenant_id, opts)
|
|
518
|
-
data
|
|
519
|
-
end
|
|
520
|
-
|
|
521
|
-
# Retrieves a list of all project users
|
|
522
|
-
# Allows you to retrieve the users on a projects.
|
|
523
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
524
|
-
# @param [Hash] opts the optional parameters
|
|
525
|
-
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
526
|
-
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
527
|
-
# @return [Array<(ProjectUsers, Integer, Hash)>] ProjectUsers data, response status code and response headers
|
|
528
|
-
def get_project_users_with_http_info(xero_tenant_id, options = {})
|
|
529
|
-
opts = options.dup
|
|
530
|
-
if @api_client.config.debugging
|
|
531
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.get_project_users ...'
|
|
532
|
-
end
|
|
533
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
534
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
535
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_project_users"
|
|
536
|
-
end
|
|
537
|
-
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
|
|
538
|
-
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_project_users, must be smaller than or equal to 500.'
|
|
539
|
-
end
|
|
540
|
-
|
|
541
|
-
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
542
|
-
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_project_users, must be greater than or equal to 1.'
|
|
543
|
-
end
|
|
544
|
-
|
|
545
|
-
# resource path
|
|
546
|
-
local_var_path = '/ProjectsUsers'
|
|
547
|
-
|
|
548
|
-
# camelize keys of incoming `where` opts
|
|
549
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
550
|
-
|
|
551
|
-
# query parameters
|
|
552
|
-
query_params = opts[:query_params] || {}
|
|
553
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
554
|
-
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
555
|
-
|
|
556
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
557
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
558
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
559
|
-
|
|
560
|
-
# header parameters
|
|
561
|
-
header_params = opts[:header_params] || {}
|
|
562
|
-
# HTTP header 'Accept' (if needed)
|
|
563
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
564
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
565
|
-
|
|
566
|
-
# form parameters
|
|
567
|
-
form_params = opts[:form_params] || {}
|
|
568
|
-
|
|
569
|
-
# http body (model)
|
|
570
|
-
post_body = opts[:body]
|
|
571
|
-
|
|
572
|
-
# return_type
|
|
573
|
-
return_type = opts[:return_type] || 'ProjectUsers'
|
|
574
|
-
|
|
575
|
-
# auth_names
|
|
576
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
577
|
-
|
|
578
|
-
new_options = opts.merge(
|
|
579
|
-
:header_params => header_params,
|
|
580
|
-
:query_params => query_params,
|
|
581
|
-
:form_params => form_params,
|
|
582
|
-
:body => post_body,
|
|
583
|
-
:auth_names => auth_names,
|
|
584
|
-
:return_type => return_type
|
|
585
|
-
)
|
|
586
|
-
|
|
587
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
588
|
-
if @api_client.config.debugging
|
|
589
|
-
@api_client.config.logger.debug "API called: ProjectApi#get_project_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
590
|
-
end
|
|
591
|
-
return data, status_code, headers
|
|
592
|
-
end
|
|
593
|
-
|
|
594
|
-
# Retrieves all projects
|
|
595
|
-
# Allows you to retrieve, create and update projects.
|
|
596
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
597
|
-
# @param [Hash] opts the optional parameters
|
|
598
|
-
# @option opts [Array<String>] :project_ids Search for all projects that match a comma separated list of projectIds
|
|
599
|
-
# @option opts [String] :contact_id Filter for projects for a specific contact
|
|
600
|
-
# @option opts [String] :states Filter for projects in a particular state (INPROGRESS or CLOSED)
|
|
601
|
-
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. (default to 1)
|
|
602
|
-
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. (default to 50)
|
|
603
|
-
# @return [Projects]
|
|
604
|
-
def get_projects(xero_tenant_id, opts = {})
|
|
605
|
-
data, _status_code, _headers = get_projects_with_http_info(xero_tenant_id, opts)
|
|
606
|
-
data
|
|
607
|
-
end
|
|
608
|
-
|
|
609
|
-
# Retrieves all projects
|
|
610
|
-
# Allows you to retrieve, create and update projects.
|
|
611
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
612
|
-
# @param [Hash] opts the optional parameters
|
|
613
|
-
# @option opts [Array<String>] :project_ids Search for all projects that match a comma separated list of projectIds
|
|
614
|
-
# @option opts [String] :contact_id Filter for projects for a specific contact
|
|
615
|
-
# @option opts [String] :states Filter for projects in a particular state (INPROGRESS or CLOSED)
|
|
616
|
-
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
617
|
-
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
618
|
-
# @return [Array<(Projects, Integer, Hash)>] Projects data, response status code and response headers
|
|
619
|
-
def get_projects_with_http_info(xero_tenant_id, options = {})
|
|
620
|
-
opts = options.dup
|
|
621
|
-
if @api_client.config.debugging
|
|
622
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.get_projects ...'
|
|
623
|
-
end
|
|
624
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
625
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
626
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_projects"
|
|
627
|
-
end
|
|
628
|
-
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
|
|
629
|
-
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_projects, must be smaller than or equal to 500.'
|
|
630
|
-
end
|
|
631
|
-
|
|
632
|
-
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
633
|
-
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_projects, must be greater than or equal to 1.'
|
|
634
|
-
end
|
|
635
|
-
|
|
636
|
-
# resource path
|
|
637
|
-
local_var_path = '/Projects'
|
|
638
|
-
|
|
639
|
-
# camelize keys of incoming `where` opts
|
|
640
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
641
|
-
|
|
642
|
-
# query parameters
|
|
643
|
-
query_params = opts[:query_params] || {}
|
|
644
|
-
query_params[:'projectIds'] = @api_client.build_collection_param(opts[:'project_ids'], :multi) if !opts[:'project_ids'].nil?
|
|
645
|
-
query_params[:'contactID'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
|
|
646
|
-
query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
|
|
647
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
648
|
-
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
649
|
-
|
|
650
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
651
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
652
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
653
|
-
|
|
654
|
-
# header parameters
|
|
655
|
-
header_params = opts[:header_params] || {}
|
|
656
|
-
# HTTP header 'Accept' (if needed)
|
|
657
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
658
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
659
|
-
|
|
660
|
-
# form parameters
|
|
661
|
-
form_params = opts[:form_params] || {}
|
|
662
|
-
|
|
663
|
-
# http body (model)
|
|
664
|
-
post_body = opts[:body]
|
|
665
|
-
|
|
666
|
-
# return_type
|
|
667
|
-
return_type = opts[:return_type] || 'Projects'
|
|
668
|
-
|
|
669
|
-
# auth_names
|
|
670
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
671
|
-
|
|
672
|
-
new_options = opts.merge(
|
|
673
|
-
:header_params => header_params,
|
|
674
|
-
:query_params => query_params,
|
|
675
|
-
:form_params => form_params,
|
|
676
|
-
:body => post_body,
|
|
677
|
-
:auth_names => auth_names,
|
|
678
|
-
:return_type => return_type
|
|
679
|
-
)
|
|
680
|
-
|
|
681
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
682
|
-
if @api_client.config.debugging
|
|
683
|
-
@api_client.config.logger.debug "API called: ProjectApi#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
684
|
-
end
|
|
685
|
-
return data, status_code, headers
|
|
686
|
-
end
|
|
687
|
-
|
|
688
|
-
# Retrieves a single project task
|
|
689
|
-
# Allows you to retrieve a specific project
|
|
690
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
691
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
692
|
-
# @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}
|
|
693
|
-
# @param [Hash] opts the optional parameters
|
|
694
|
-
# @return [Task]
|
|
695
|
-
def get_task(xero_tenant_id, project_id, task_id, opts = {})
|
|
696
|
-
data, _status_code, _headers = get_task_with_http_info(xero_tenant_id, project_id, task_id, opts)
|
|
697
|
-
data
|
|
698
|
-
end
|
|
699
|
-
|
|
700
|
-
# Retrieves a single project task
|
|
701
|
-
# Allows you to retrieve a specific project
|
|
702
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
703
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
704
|
-
# @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}
|
|
705
|
-
# @param [Hash] opts the optional parameters
|
|
706
|
-
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
|
707
|
-
def get_task_with_http_info(xero_tenant_id, project_id, task_id, options = {})
|
|
708
|
-
opts = options.dup
|
|
709
|
-
if @api_client.config.debugging
|
|
710
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.get_task ...'
|
|
711
|
-
end
|
|
712
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
713
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
714
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_task"
|
|
715
|
-
end
|
|
716
|
-
# verify the required parameter 'project_id' is set
|
|
717
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
718
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_task"
|
|
719
|
-
end
|
|
720
|
-
# verify the required parameter 'task_id' is set
|
|
721
|
-
if @api_client.config.client_side_validation && task_id.nil?
|
|
722
|
-
fail ArgumentError, "Missing the required parameter 'task_id' when calling ProjectApi.get_task"
|
|
723
|
-
end
|
|
724
|
-
# resource path
|
|
725
|
-
local_var_path = '/Projects/{projectId}/Tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)
|
|
726
|
-
|
|
727
|
-
# camelize keys of incoming `where` opts
|
|
728
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
729
|
-
|
|
730
|
-
# query parameters
|
|
731
|
-
query_params = opts[:query_params] || {}
|
|
732
|
-
|
|
733
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
734
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
735
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
736
|
-
|
|
737
|
-
# header parameters
|
|
738
|
-
header_params = opts[:header_params] || {}
|
|
739
|
-
# HTTP header 'Accept' (if needed)
|
|
740
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
741
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
742
|
-
|
|
743
|
-
# form parameters
|
|
744
|
-
form_params = opts[:form_params] || {}
|
|
745
|
-
|
|
746
|
-
# http body (model)
|
|
747
|
-
post_body = opts[:body]
|
|
748
|
-
|
|
749
|
-
# return_type
|
|
750
|
-
return_type = opts[:return_type] || 'Task'
|
|
751
|
-
|
|
752
|
-
# auth_names
|
|
753
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
754
|
-
|
|
755
|
-
new_options = opts.merge(
|
|
756
|
-
:header_params => header_params,
|
|
757
|
-
:query_params => query_params,
|
|
758
|
-
:form_params => form_params,
|
|
759
|
-
:body => post_body,
|
|
760
|
-
:auth_names => auth_names,
|
|
761
|
-
:return_type => return_type
|
|
762
|
-
)
|
|
763
|
-
|
|
764
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
765
|
-
if @api_client.config.debugging
|
|
766
|
-
@api_client.config.logger.debug "API called: ProjectApi#get_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
767
|
-
end
|
|
768
|
-
return data, status_code, headers
|
|
769
|
-
end
|
|
770
|
-
|
|
771
|
-
# Retrieves all project tasks
|
|
772
|
-
# Allows you to retrieve a specific project
|
|
773
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
774
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
775
|
-
# @param [Hash] opts the optional parameters
|
|
776
|
-
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
777
|
-
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
778
|
-
# @option opts [String] :task_ids Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}
|
|
779
|
-
# @option opts [ChargeType] :charge_type
|
|
780
|
-
# @return [Tasks]
|
|
781
|
-
def get_tasks(xero_tenant_id, project_id, opts = {})
|
|
782
|
-
data, _status_code, _headers = get_tasks_with_http_info(xero_tenant_id, project_id, opts)
|
|
783
|
-
data
|
|
784
|
-
end
|
|
785
|
-
|
|
786
|
-
# Retrieves all project tasks
|
|
787
|
-
# Allows you to retrieve a specific project
|
|
788
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
789
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
790
|
-
# @param [Hash] opts the optional parameters
|
|
791
|
-
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
792
|
-
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
793
|
-
# @option opts [String] :task_ids Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}
|
|
794
|
-
# @option opts [ChargeType] :charge_type
|
|
795
|
-
# @return [Array<(Tasks, Integer, Hash)>] Tasks data, response status code and response headers
|
|
796
|
-
def get_tasks_with_http_info(xero_tenant_id, project_id, options = {})
|
|
797
|
-
opts = options.dup
|
|
798
|
-
if @api_client.config.debugging
|
|
799
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.get_tasks ...'
|
|
800
|
-
end
|
|
801
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
802
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
803
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_tasks"
|
|
804
|
-
end
|
|
805
|
-
# verify the required parameter 'project_id' is set
|
|
806
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
807
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_tasks"
|
|
808
|
-
end
|
|
809
|
-
# resource path
|
|
810
|
-
local_var_path = '/Projects/{projectId}/Tasks'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
811
|
-
|
|
812
|
-
# camelize keys of incoming `where` opts
|
|
813
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
814
|
-
|
|
815
|
-
# query parameters
|
|
816
|
-
query_params = opts[:query_params] || {}
|
|
817
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
818
|
-
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
819
|
-
query_params[:'taskIds'] = opts[:'task_ids'] if !opts[:'task_ids'].nil?
|
|
820
|
-
query_params[:'chargeType'] = opts[:'charge_type'] if !opts[:'charge_type'].nil?
|
|
821
|
-
|
|
822
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
823
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
824
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
825
|
-
|
|
826
|
-
# header parameters
|
|
827
|
-
header_params = opts[:header_params] || {}
|
|
828
|
-
# HTTP header 'Accept' (if needed)
|
|
829
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
830
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
831
|
-
|
|
832
|
-
# form parameters
|
|
833
|
-
form_params = opts[:form_params] || {}
|
|
834
|
-
|
|
835
|
-
# http body (model)
|
|
836
|
-
post_body = opts[:body]
|
|
837
|
-
|
|
838
|
-
# return_type
|
|
839
|
-
return_type = opts[:return_type] || 'Tasks'
|
|
840
|
-
|
|
841
|
-
# auth_names
|
|
842
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
843
|
-
|
|
844
|
-
new_options = opts.merge(
|
|
845
|
-
:header_params => header_params,
|
|
846
|
-
:query_params => query_params,
|
|
847
|
-
:form_params => form_params,
|
|
848
|
-
:body => post_body,
|
|
849
|
-
:auth_names => auth_names,
|
|
850
|
-
:return_type => return_type
|
|
851
|
-
)
|
|
852
|
-
|
|
853
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
854
|
-
if @api_client.config.debugging
|
|
855
|
-
@api_client.config.logger.debug "API called: ProjectApi#get_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
856
|
-
end
|
|
857
|
-
return data, status_code, headers
|
|
858
|
-
end
|
|
859
|
-
|
|
860
|
-
# Retrieves all time entries associated with a specific project
|
|
861
|
-
# Allows you to retrieve the time entries associated with a specific project
|
|
862
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
863
|
-
# @param project_id [String] Identifier of the project, that the task (which the time entry is logged against) belongs to.
|
|
864
|
-
# @param [Hash] opts the optional parameters
|
|
865
|
-
# @option opts [String] :user_id The xero user identifier of the person who logged time.
|
|
866
|
-
# @option opts [String] :task_id Identifier of the task that time entry is logged against.
|
|
867
|
-
# @option opts [String] :invoice_id Finds all time entries for this invoice.
|
|
868
|
-
# @option opts [String] :contact_id Finds all time entries for this contact identifier.
|
|
869
|
-
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
870
|
-
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
871
|
-
# @option opts [Array<String>] :states Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified.
|
|
872
|
-
# @option opts [Boolean] :is_chargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.
|
|
873
|
-
# @option opts [DateTime] :date_after_utc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.
|
|
874
|
-
# @option opts [DateTime] :date_before_utc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.
|
|
875
|
-
# @return [TimeEntries]
|
|
876
|
-
def get_time_entries(xero_tenant_id, project_id, opts = {})
|
|
877
|
-
data, _status_code, _headers = get_time_entries_with_http_info(xero_tenant_id, project_id, opts)
|
|
878
|
-
data
|
|
879
|
-
end
|
|
880
|
-
|
|
881
|
-
# Retrieves all time entries associated with a specific project
|
|
882
|
-
# Allows you to retrieve the time entries associated with a specific project
|
|
883
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
884
|
-
# @param project_id [String] Identifier of the project, that the task (which the time entry is logged against) belongs to.
|
|
885
|
-
# @param [Hash] opts the optional parameters
|
|
886
|
-
# @option opts [String] :user_id The xero user identifier of the person who logged time.
|
|
887
|
-
# @option opts [String] :task_id Identifier of the task that time entry is logged against.
|
|
888
|
-
# @option opts [String] :invoice_id Finds all time entries for this invoice.
|
|
889
|
-
# @option opts [String] :contact_id Finds all time entries for this contact identifier.
|
|
890
|
-
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
891
|
-
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
892
|
-
# @option opts [Array<String>] :states Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified.
|
|
893
|
-
# @option opts [Boolean] :is_chargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.
|
|
894
|
-
# @option opts [DateTime] :date_after_utc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.
|
|
895
|
-
# @option opts [DateTime] :date_before_utc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.
|
|
896
|
-
# @return [Array<(TimeEntries, Integer, Hash)>] TimeEntries data, response status code and response headers
|
|
897
|
-
def get_time_entries_with_http_info(xero_tenant_id, project_id, options = {})
|
|
898
|
-
opts = options.dup
|
|
899
|
-
if @api_client.config.debugging
|
|
900
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.get_time_entries ...'
|
|
901
|
-
end
|
|
902
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
903
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
904
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_time_entries"
|
|
905
|
-
end
|
|
906
|
-
# verify the required parameter 'project_id' is set
|
|
907
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
908
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_time_entries"
|
|
909
|
-
end
|
|
910
|
-
# resource path
|
|
911
|
-
local_var_path = '/Projects/{projectId}/Time'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
912
|
-
|
|
913
|
-
# camelize keys of incoming `where` opts
|
|
914
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
915
|
-
|
|
916
|
-
# query parameters
|
|
917
|
-
query_params = opts[:query_params] || {}
|
|
918
|
-
query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
|
919
|
-
query_params[:'taskId'] = opts[:'task_id'] if !opts[:'task_id'].nil?
|
|
920
|
-
query_params[:'invoiceId'] = opts[:'invoice_id'] if !opts[:'invoice_id'].nil?
|
|
921
|
-
query_params[:'contactId'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
|
|
922
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
923
|
-
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
924
|
-
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
925
|
-
query_params[:'isChargeable'] = opts[:'is_chargeable'] if !opts[:'is_chargeable'].nil?
|
|
926
|
-
query_params[:'dateAfterUtc'] = opts[:'date_after_utc'] if !opts[:'date_after_utc'].nil?
|
|
927
|
-
query_params[:'dateBeforeUtc'] = opts[:'date_before_utc'] if !opts[:'date_before_utc'].nil?
|
|
928
|
-
|
|
929
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
930
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
931
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
932
|
-
|
|
933
|
-
# header parameters
|
|
934
|
-
header_params = opts[:header_params] || {}
|
|
935
|
-
# HTTP header 'Accept' (if needed)
|
|
936
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
937
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
938
|
-
|
|
939
|
-
# form parameters
|
|
940
|
-
form_params = opts[:form_params] || {}
|
|
941
|
-
|
|
942
|
-
# http body (model)
|
|
943
|
-
post_body = opts[:body]
|
|
944
|
-
|
|
945
|
-
# return_type
|
|
946
|
-
return_type = opts[:return_type] || 'TimeEntries'
|
|
947
|
-
|
|
948
|
-
# auth_names
|
|
949
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
950
|
-
|
|
951
|
-
new_options = opts.merge(
|
|
952
|
-
:header_params => header_params,
|
|
953
|
-
:query_params => query_params,
|
|
954
|
-
:form_params => form_params,
|
|
955
|
-
:body => post_body,
|
|
956
|
-
:auth_names => auth_names,
|
|
957
|
-
:return_type => return_type
|
|
958
|
-
)
|
|
959
|
-
|
|
960
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
961
|
-
if @api_client.config.debugging
|
|
962
|
-
@api_client.config.logger.debug "API called: ProjectApi#get_time_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
963
|
-
end
|
|
964
|
-
return data, status_code, headers
|
|
965
|
-
end
|
|
966
|
-
|
|
967
|
-
# Retrieves a single time entry for a specific project
|
|
968
|
-
# Allows you to get a single time entry in a project
|
|
969
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
970
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
971
|
-
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
|
972
|
-
# @param [Hash] opts the optional parameters
|
|
973
|
-
# @return [TimeEntry]
|
|
974
|
-
def get_time_entry(xero_tenant_id, project_id, time_entry_id, opts = {})
|
|
975
|
-
data, _status_code, _headers = get_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, opts)
|
|
976
|
-
data
|
|
977
|
-
end
|
|
978
|
-
|
|
979
|
-
# Retrieves a single time entry for a specific project
|
|
980
|
-
# Allows you to get a single time entry in a project
|
|
981
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
982
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
983
|
-
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
|
984
|
-
# @param [Hash] opts the optional parameters
|
|
985
|
-
# @return [Array<(TimeEntry, Integer, Hash)>] TimeEntry data, response status code and response headers
|
|
986
|
-
def get_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, options = {})
|
|
987
|
-
opts = options.dup
|
|
988
|
-
if @api_client.config.debugging
|
|
989
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.get_time_entry ...'
|
|
990
|
-
end
|
|
991
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
992
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
993
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_time_entry"
|
|
994
|
-
end
|
|
995
|
-
# verify the required parameter 'project_id' is set
|
|
996
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
997
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_time_entry"
|
|
998
|
-
end
|
|
999
|
-
# verify the required parameter 'time_entry_id' is set
|
|
1000
|
-
if @api_client.config.client_side_validation && time_entry_id.nil?
|
|
1001
|
-
fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.get_time_entry"
|
|
1002
|
-
end
|
|
1003
|
-
# resource path
|
|
1004
|
-
local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
|
1005
|
-
|
|
1006
|
-
# camelize keys of incoming `where` opts
|
|
1007
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1008
|
-
|
|
1009
|
-
# query parameters
|
|
1010
|
-
query_params = opts[:query_params] || {}
|
|
1011
|
-
|
|
1012
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1013
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1014
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1015
|
-
|
|
1016
|
-
# header parameters
|
|
1017
|
-
header_params = opts[:header_params] || {}
|
|
1018
|
-
# HTTP header 'Accept' (if needed)
|
|
1019
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1020
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1021
|
-
|
|
1022
|
-
# form parameters
|
|
1023
|
-
form_params = opts[:form_params] || {}
|
|
1024
|
-
|
|
1025
|
-
# http body (model)
|
|
1026
|
-
post_body = opts[:body]
|
|
1027
|
-
|
|
1028
|
-
# return_type
|
|
1029
|
-
return_type = opts[:return_type] || 'TimeEntry'
|
|
1030
|
-
|
|
1031
|
-
# auth_names
|
|
1032
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1033
|
-
|
|
1034
|
-
new_options = opts.merge(
|
|
1035
|
-
:header_params => header_params,
|
|
1036
|
-
:query_params => query_params,
|
|
1037
|
-
:form_params => form_params,
|
|
1038
|
-
:body => post_body,
|
|
1039
|
-
:auth_names => auth_names,
|
|
1040
|
-
:return_type => return_type
|
|
1041
|
-
)
|
|
1042
|
-
|
|
1043
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
1044
|
-
if @api_client.config.debugging
|
|
1045
|
-
@api_client.config.logger.debug "API called: ProjectApi#get_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1046
|
-
end
|
|
1047
|
-
return data, status_code, headers
|
|
1048
|
-
end
|
|
1049
|
-
|
|
1050
|
-
# creates a project for the specified contact
|
|
1051
|
-
# Allows you to update a specific projects.
|
|
1052
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1053
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1054
|
-
# @param project_patch [ProjectPatch] Update the status of an existing Project
|
|
1055
|
-
# @param [Hash] opts the optional parameters
|
|
1056
|
-
# @return [nil]
|
|
1057
|
-
def patch_project(xero_tenant_id, project_id, project_patch, opts = {})
|
|
1058
|
-
patch_project_with_http_info(xero_tenant_id, project_id, project_patch, opts)
|
|
1059
|
-
nil
|
|
1060
|
-
end
|
|
1061
|
-
|
|
1062
|
-
# creates a project for the specified contact
|
|
1063
|
-
# Allows you to update a specific projects.
|
|
1064
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1065
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1066
|
-
# @param project_patch [ProjectPatch] Update the status of an existing Project
|
|
1067
|
-
# @param [Hash] opts the optional parameters
|
|
1068
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1069
|
-
def patch_project_with_http_info(xero_tenant_id, project_id, project_patch, options = {})
|
|
1070
|
-
opts = options.dup
|
|
1071
|
-
if @api_client.config.debugging
|
|
1072
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.patch_project ...'
|
|
1073
|
-
end
|
|
1074
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
1075
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
1076
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.patch_project"
|
|
1077
|
-
end
|
|
1078
|
-
# verify the required parameter 'project_id' is set
|
|
1079
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
1080
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.patch_project"
|
|
1081
|
-
end
|
|
1082
|
-
# verify the required parameter 'project_patch' is set
|
|
1083
|
-
if @api_client.config.client_side_validation && project_patch.nil?
|
|
1084
|
-
fail ArgumentError, "Missing the required parameter 'project_patch' when calling ProjectApi.patch_project"
|
|
1085
|
-
end
|
|
1086
|
-
# resource path
|
|
1087
|
-
local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
1088
|
-
|
|
1089
|
-
# camelize keys of incoming `where` opts
|
|
1090
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1091
|
-
|
|
1092
|
-
# query parameters
|
|
1093
|
-
query_params = opts[:query_params] || {}
|
|
1094
|
-
|
|
1095
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1096
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1097
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1098
|
-
|
|
1099
|
-
# header parameters
|
|
1100
|
-
header_params = opts[:header_params] || {}
|
|
1101
|
-
# HTTP header 'Accept' (if needed)
|
|
1102
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1103
|
-
# HTTP header 'Content-Type'
|
|
1104
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1105
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1106
|
-
|
|
1107
|
-
# form parameters
|
|
1108
|
-
form_params = opts[:form_params] || {}
|
|
1109
|
-
|
|
1110
|
-
# http body (model)
|
|
1111
|
-
post_body = opts[:body] || @api_client.object_to_http_body(project_patch)
|
|
1112
|
-
|
|
1113
|
-
# return_type
|
|
1114
|
-
return_type = opts[:return_type]
|
|
1115
|
-
|
|
1116
|
-
# auth_names
|
|
1117
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1118
|
-
|
|
1119
|
-
new_options = opts.merge(
|
|
1120
|
-
:header_params => header_params,
|
|
1121
|
-
:query_params => query_params,
|
|
1122
|
-
:form_params => form_params,
|
|
1123
|
-
:body => post_body,
|
|
1124
|
-
:auth_names => auth_names,
|
|
1125
|
-
:return_type => return_type
|
|
1126
|
-
)
|
|
1127
|
-
|
|
1128
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, "ProjectApi", new_options)
|
|
1129
|
-
if @api_client.config.debugging
|
|
1130
|
-
@api_client.config.logger.debug "API called: ProjectApi#patch_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1131
|
-
end
|
|
1132
|
-
return data, status_code, headers
|
|
1133
|
-
end
|
|
1134
|
-
|
|
1135
|
-
# Updates a specific project
|
|
1136
|
-
# Allows you to update a specific projects.
|
|
1137
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1138
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1139
|
-
# @param project_create_or_update [ProjectCreateOrUpdate] Request of type ProjectCreateOrUpdate
|
|
1140
|
-
# @param [Hash] opts the optional parameters
|
|
1141
|
-
# @return [nil]
|
|
1142
|
-
def update_project(xero_tenant_id, project_id, project_create_or_update, opts = {})
|
|
1143
|
-
update_project_with_http_info(xero_tenant_id, project_id, project_create_or_update, opts)
|
|
1144
|
-
nil
|
|
1145
|
-
end
|
|
1146
|
-
|
|
1147
|
-
# Updates a specific project
|
|
1148
|
-
# Allows you to update a specific projects.
|
|
1149
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1150
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1151
|
-
# @param project_create_or_update [ProjectCreateOrUpdate] Request of type ProjectCreateOrUpdate
|
|
1152
|
-
# @param [Hash] opts the optional parameters
|
|
1153
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1154
|
-
def update_project_with_http_info(xero_tenant_id, project_id, project_create_or_update, options = {})
|
|
1155
|
-
opts = options.dup
|
|
1156
|
-
if @api_client.config.debugging
|
|
1157
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.update_project ...'
|
|
1158
|
-
end
|
|
1159
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
1160
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
1161
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.update_project"
|
|
1162
|
-
end
|
|
1163
|
-
# verify the required parameter 'project_id' is set
|
|
1164
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
1165
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_project"
|
|
1166
|
-
end
|
|
1167
|
-
# verify the required parameter 'project_create_or_update' is set
|
|
1168
|
-
if @api_client.config.client_side_validation && project_create_or_update.nil?
|
|
1169
|
-
fail ArgumentError, "Missing the required parameter 'project_create_or_update' when calling ProjectApi.update_project"
|
|
1170
|
-
end
|
|
1171
|
-
# resource path
|
|
1172
|
-
local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
1173
|
-
|
|
1174
|
-
# camelize keys of incoming `where` opts
|
|
1175
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1176
|
-
|
|
1177
|
-
# query parameters
|
|
1178
|
-
query_params = opts[:query_params] || {}
|
|
1179
|
-
|
|
1180
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1181
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1182
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1183
|
-
|
|
1184
|
-
# header parameters
|
|
1185
|
-
header_params = opts[:header_params] || {}
|
|
1186
|
-
# HTTP header 'Accept' (if needed)
|
|
1187
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1188
|
-
# HTTP header 'Content-Type'
|
|
1189
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1190
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1191
|
-
|
|
1192
|
-
# form parameters
|
|
1193
|
-
form_params = opts[:form_params] || {}
|
|
1194
|
-
|
|
1195
|
-
# http body (model)
|
|
1196
|
-
post_body = opts[:body] || @api_client.object_to_http_body(project_create_or_update)
|
|
1197
|
-
|
|
1198
|
-
# return_type
|
|
1199
|
-
return_type = opts[:return_type]
|
|
1200
|
-
|
|
1201
|
-
# auth_names
|
|
1202
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1203
|
-
|
|
1204
|
-
new_options = opts.merge(
|
|
1205
|
-
:header_params => header_params,
|
|
1206
|
-
:query_params => query_params,
|
|
1207
|
-
:form_params => form_params,
|
|
1208
|
-
:body => post_body,
|
|
1209
|
-
:auth_names => auth_names,
|
|
1210
|
-
:return_type => return_type
|
|
1211
|
-
)
|
|
1212
|
-
|
|
1213
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "ProjectApi", new_options)
|
|
1214
|
-
if @api_client.config.debugging
|
|
1215
|
-
@api_client.config.logger.debug "API called: ProjectApi#update_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1216
|
-
end
|
|
1217
|
-
return data, status_code, headers
|
|
1218
|
-
end
|
|
1219
|
-
|
|
1220
|
-
# Allows you to update a task
|
|
1221
|
-
# Allows you to update a specific task
|
|
1222
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1223
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1224
|
-
# @param task_id [String] You can specify an individual task by appending the id to the endpoint
|
|
1225
|
-
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are updating
|
|
1226
|
-
# @param [Hash] opts the optional parameters
|
|
1227
|
-
# @return [nil]
|
|
1228
|
-
def update_task(xero_tenant_id, project_id, task_id, task_create_or_update, opts = {})
|
|
1229
|
-
update_task_with_http_info(xero_tenant_id, project_id, task_id, task_create_or_update, opts)
|
|
1230
|
-
nil
|
|
1231
|
-
end
|
|
1232
|
-
|
|
1233
|
-
# Allows you to update a task
|
|
1234
|
-
# Allows you to update a specific task
|
|
1235
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1236
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1237
|
-
# @param task_id [String] You can specify an individual task by appending the id to the endpoint
|
|
1238
|
-
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are updating
|
|
1239
|
-
# @param [Hash] opts the optional parameters
|
|
1240
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1241
|
-
def update_task_with_http_info(xero_tenant_id, project_id, task_id, task_create_or_update, options = {})
|
|
1242
|
-
opts = options.dup
|
|
1243
|
-
if @api_client.config.debugging
|
|
1244
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.update_task ...'
|
|
1245
|
-
end
|
|
1246
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
1247
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
1248
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.update_task"
|
|
1249
|
-
end
|
|
1250
|
-
# verify the required parameter 'project_id' is set
|
|
1251
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
1252
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_task"
|
|
1253
|
-
end
|
|
1254
|
-
# verify the required parameter 'task_id' is set
|
|
1255
|
-
if @api_client.config.client_side_validation && task_id.nil?
|
|
1256
|
-
fail ArgumentError, "Missing the required parameter 'task_id' when calling ProjectApi.update_task"
|
|
1257
|
-
end
|
|
1258
|
-
# verify the required parameter 'task_create_or_update' is set
|
|
1259
|
-
if @api_client.config.client_side_validation && task_create_or_update.nil?
|
|
1260
|
-
fail ArgumentError, "Missing the required parameter 'task_create_or_update' when calling ProjectApi.update_task"
|
|
1261
|
-
end
|
|
1262
|
-
# resource path
|
|
1263
|
-
local_var_path = '/Projects/{projectId}/Tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)
|
|
1264
|
-
|
|
1265
|
-
# camelize keys of incoming `where` opts
|
|
1266
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1267
|
-
|
|
1268
|
-
# query parameters
|
|
1269
|
-
query_params = opts[:query_params] || {}
|
|
1270
|
-
|
|
1271
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1272
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1273
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1274
|
-
|
|
1275
|
-
# header parameters
|
|
1276
|
-
header_params = opts[:header_params] || {}
|
|
1277
|
-
# HTTP header 'Accept' (if needed)
|
|
1278
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1279
|
-
# HTTP header 'Content-Type'
|
|
1280
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1281
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1282
|
-
|
|
1283
|
-
# form parameters
|
|
1284
|
-
form_params = opts[:form_params] || {}
|
|
1285
|
-
|
|
1286
|
-
# http body (model)
|
|
1287
|
-
post_body = opts[:body] || @api_client.object_to_http_body(task_create_or_update)
|
|
1288
|
-
|
|
1289
|
-
# return_type
|
|
1290
|
-
return_type = opts[:return_type]
|
|
1291
|
-
|
|
1292
|
-
# auth_names
|
|
1293
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1294
|
-
|
|
1295
|
-
new_options = opts.merge(
|
|
1296
|
-
:header_params => header_params,
|
|
1297
|
-
:query_params => query_params,
|
|
1298
|
-
:form_params => form_params,
|
|
1299
|
-
:body => post_body,
|
|
1300
|
-
:auth_names => auth_names,
|
|
1301
|
-
:return_type => return_type
|
|
1302
|
-
)
|
|
1303
|
-
|
|
1304
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "ProjectApi", new_options)
|
|
1305
|
-
if @api_client.config.debugging
|
|
1306
|
-
@api_client.config.logger.debug "API called: ProjectApi#update_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1307
|
-
end
|
|
1308
|
-
return data, status_code, headers
|
|
1309
|
-
end
|
|
1310
|
-
|
|
1311
|
-
# Updates a time entry for a specific project
|
|
1312
|
-
# Allows you to update time entry in a project
|
|
1313
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1314
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1315
|
-
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
|
1316
|
-
# @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are updating
|
|
1317
|
-
# @param [Hash] opts the optional parameters
|
|
1318
|
-
# @return [nil]
|
|
1319
|
-
def update_time_entry(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update, opts = {})
|
|
1320
|
-
update_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update, opts)
|
|
1321
|
-
nil
|
|
1322
|
-
end
|
|
1323
|
-
|
|
1324
|
-
# Updates a time entry for a specific project
|
|
1325
|
-
# Allows you to update time entry in a project
|
|
1326
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1327
|
-
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1328
|
-
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
|
1329
|
-
# @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are updating
|
|
1330
|
-
# @param [Hash] opts the optional parameters
|
|
1331
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1332
|
-
def update_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update, options = {})
|
|
1333
|
-
opts = options.dup
|
|
1334
|
-
if @api_client.config.debugging
|
|
1335
|
-
@api_client.config.logger.debug 'Calling API: ProjectApi.update_time_entry ...'
|
|
1336
|
-
end
|
|
1337
|
-
# verify the required parameter 'xero_tenant_id' is set
|
|
1338
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
1339
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.update_time_entry"
|
|
1340
|
-
end
|
|
1341
|
-
# verify the required parameter 'project_id' is set
|
|
1342
|
-
if @api_client.config.client_side_validation && project_id.nil?
|
|
1343
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_time_entry"
|
|
1344
|
-
end
|
|
1345
|
-
# verify the required parameter 'time_entry_id' is set
|
|
1346
|
-
if @api_client.config.client_side_validation && time_entry_id.nil?
|
|
1347
|
-
fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.update_time_entry"
|
|
1348
|
-
end
|
|
1349
|
-
# verify the required parameter 'time_entry_create_or_update' is set
|
|
1350
|
-
if @api_client.config.client_side_validation && time_entry_create_or_update.nil?
|
|
1351
|
-
fail ArgumentError, "Missing the required parameter 'time_entry_create_or_update' when calling ProjectApi.update_time_entry"
|
|
1352
|
-
end
|
|
1353
|
-
# resource path
|
|
1354
|
-
local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
|
1355
|
-
|
|
1356
|
-
# camelize keys of incoming `where` opts
|
|
1357
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1358
|
-
|
|
1359
|
-
# query parameters
|
|
1360
|
-
query_params = opts[:query_params] || {}
|
|
1361
|
-
|
|
1362
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1363
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1364
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1365
|
-
|
|
1366
|
-
# header parameters
|
|
1367
|
-
header_params = opts[:header_params] || {}
|
|
1368
|
-
# HTTP header 'Accept' (if needed)
|
|
1369
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1370
|
-
# HTTP header 'Content-Type'
|
|
1371
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1372
|
-
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1373
|
-
|
|
1374
|
-
# form parameters
|
|
1375
|
-
form_params = opts[:form_params] || {}
|
|
1376
|
-
|
|
1377
|
-
# http body (model)
|
|
1378
|
-
post_body = opts[:body] || @api_client.object_to_http_body(time_entry_create_or_update)
|
|
1379
|
-
|
|
1380
|
-
# return_type
|
|
1381
|
-
return_type = opts[:return_type]
|
|
1382
|
-
|
|
1383
|
-
# auth_names
|
|
1384
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1385
|
-
|
|
1386
|
-
new_options = opts.merge(
|
|
1387
|
-
:header_params => header_params,
|
|
1388
|
-
:query_params => query_params,
|
|
1389
|
-
:form_params => form_params,
|
|
1390
|
-
:body => post_body,
|
|
1391
|
-
:auth_names => auth_names,
|
|
1392
|
-
:return_type => return_type
|
|
1393
|
-
)
|
|
1394
|
-
|
|
1395
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "ProjectApi", new_options)
|
|
1396
|
-
if @api_client.config.debugging
|
|
1397
|
-
@api_client.config.logger.debug "API called: ProjectApi#update_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1398
|
-
end
|
|
1399
|
-
return data, status_code, headers
|
|
1400
|
-
end
|
|
1401
|
-
end
|
|
1402
|
-
end
|
|
1
|
+
=begin
|
|
2
|
+
#Xero Projects API
|
|
3
|
+
|
|
4
|
+
#This is the Xero Projects API
|
|
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 ProjectApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.new)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# Create one or more new projects
|
|
20
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
21
|
+
# @param project_create_or_update [ProjectCreateOrUpdate] Create a new project with ProjectCreateOrUpdate object
|
|
22
|
+
# @param [Hash] opts the optional parameters
|
|
23
|
+
# @return [Project]
|
|
24
|
+
def create_project(xero_tenant_id, project_create_or_update, opts = {})
|
|
25
|
+
data, _status_code, _headers = create_project_with_http_info(xero_tenant_id, project_create_or_update, opts)
|
|
26
|
+
data
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Create one or more new projects
|
|
30
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
31
|
+
# @param project_create_or_update [ProjectCreateOrUpdate] Create a new project with ProjectCreateOrUpdate object
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
34
|
+
def create_project_with_http_info(xero_tenant_id, project_create_or_update, options = {})
|
|
35
|
+
opts = options.dup
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.create_project ...'
|
|
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 ProjectApi.create_project"
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'project_create_or_update' is set
|
|
44
|
+
if @api_client.config.client_side_validation && project_create_or_update.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'project_create_or_update' when calling ProjectApi.create_project"
|
|
46
|
+
end
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/Projects'
|
|
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(project_create_or_update)
|
|
73
|
+
|
|
74
|
+
# return_type
|
|
75
|
+
return_type = opts[:return_type] || 'Project'
|
|
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, "ProjectApi", new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: ProjectApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Allows you to create a task
|
|
97
|
+
# Allows you to create a specific task
|
|
98
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
99
|
+
# @param project_id [String] You can create a task on a specified projectId
|
|
100
|
+
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are creating
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @return [Task]
|
|
103
|
+
def create_task(xero_tenant_id, project_id, task_create_or_update, opts = {})
|
|
104
|
+
data, _status_code, _headers = create_task_with_http_info(xero_tenant_id, project_id, task_create_or_update, opts)
|
|
105
|
+
data
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Allows you to create a task
|
|
109
|
+
# Allows you to create a specific task
|
|
110
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
111
|
+
# @param project_id [String] You can create a task on a specified projectId
|
|
112
|
+
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are creating
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
|
115
|
+
def create_task_with_http_info(xero_tenant_id, project_id, task_create_or_update, options = {})
|
|
116
|
+
opts = options.dup
|
|
117
|
+
if @api_client.config.debugging
|
|
118
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.create_task ...'
|
|
119
|
+
end
|
|
120
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
121
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
122
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.create_task"
|
|
123
|
+
end
|
|
124
|
+
# verify the required parameter 'project_id' is set
|
|
125
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
126
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.create_task"
|
|
127
|
+
end
|
|
128
|
+
# verify the required parameter 'task_create_or_update' is set
|
|
129
|
+
if @api_client.config.client_side_validation && task_create_or_update.nil?
|
|
130
|
+
fail ArgumentError, "Missing the required parameter 'task_create_or_update' when calling ProjectApi.create_task"
|
|
131
|
+
end
|
|
132
|
+
# resource path
|
|
133
|
+
local_var_path = '/Projects/{projectId}/Tasks'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
134
|
+
|
|
135
|
+
# camelize keys of incoming `where` opts
|
|
136
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
137
|
+
|
|
138
|
+
# query parameters
|
|
139
|
+
query_params = opts[:query_params] || {}
|
|
140
|
+
|
|
141
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
142
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
143
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
144
|
+
|
|
145
|
+
# header parameters
|
|
146
|
+
header_params = opts[:header_params] || {}
|
|
147
|
+
# HTTP header 'Accept' (if needed)
|
|
148
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
149
|
+
# HTTP header 'Content-Type'
|
|
150
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
151
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
152
|
+
|
|
153
|
+
# form parameters
|
|
154
|
+
form_params = opts[:form_params] || {}
|
|
155
|
+
|
|
156
|
+
# http body (model)
|
|
157
|
+
post_body = opts[:body] || @api_client.object_to_http_body(task_create_or_update)
|
|
158
|
+
|
|
159
|
+
# return_type
|
|
160
|
+
return_type = opts[:return_type] || 'Task'
|
|
161
|
+
|
|
162
|
+
# auth_names
|
|
163
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
164
|
+
|
|
165
|
+
new_options = opts.merge(
|
|
166
|
+
:header_params => header_params,
|
|
167
|
+
:query_params => query_params,
|
|
168
|
+
:form_params => form_params,
|
|
169
|
+
:body => post_body,
|
|
170
|
+
:auth_names => auth_names,
|
|
171
|
+
:return_type => return_type
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, "ProjectApi", new_options)
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug "API called: ProjectApi#create_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
177
|
+
end
|
|
178
|
+
return data, status_code, headers
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Creates a time entry for a specific project
|
|
182
|
+
# Allows you to create a specific task
|
|
183
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
184
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
185
|
+
# @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are creating
|
|
186
|
+
# @param [Hash] opts the optional parameters
|
|
187
|
+
# @return [TimeEntry]
|
|
188
|
+
def create_time_entry(xero_tenant_id, project_id, time_entry_create_or_update, opts = {})
|
|
189
|
+
data, _status_code, _headers = create_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_create_or_update, opts)
|
|
190
|
+
data
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Creates a time entry for a specific project
|
|
194
|
+
# Allows you to create a specific task
|
|
195
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
196
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
197
|
+
# @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are creating
|
|
198
|
+
# @param [Hash] opts the optional parameters
|
|
199
|
+
# @return [Array<(TimeEntry, Integer, Hash)>] TimeEntry data, response status code and response headers
|
|
200
|
+
def create_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_create_or_update, options = {})
|
|
201
|
+
opts = options.dup
|
|
202
|
+
if @api_client.config.debugging
|
|
203
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.create_time_entry ...'
|
|
204
|
+
end
|
|
205
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
206
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
207
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.create_time_entry"
|
|
208
|
+
end
|
|
209
|
+
# verify the required parameter 'project_id' is set
|
|
210
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
211
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.create_time_entry"
|
|
212
|
+
end
|
|
213
|
+
# verify the required parameter 'time_entry_create_or_update' is set
|
|
214
|
+
if @api_client.config.client_side_validation && time_entry_create_or_update.nil?
|
|
215
|
+
fail ArgumentError, "Missing the required parameter 'time_entry_create_or_update' when calling ProjectApi.create_time_entry"
|
|
216
|
+
end
|
|
217
|
+
# resource path
|
|
218
|
+
local_var_path = '/Projects/{projectId}/Time'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
219
|
+
|
|
220
|
+
# camelize keys of incoming `where` opts
|
|
221
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
222
|
+
|
|
223
|
+
# query parameters
|
|
224
|
+
query_params = opts[:query_params] || {}
|
|
225
|
+
|
|
226
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
227
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
228
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
229
|
+
|
|
230
|
+
# header parameters
|
|
231
|
+
header_params = opts[:header_params] || {}
|
|
232
|
+
# HTTP header 'Accept' (if needed)
|
|
233
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
234
|
+
# HTTP header 'Content-Type'
|
|
235
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
236
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
237
|
+
|
|
238
|
+
# form parameters
|
|
239
|
+
form_params = opts[:form_params] || {}
|
|
240
|
+
|
|
241
|
+
# http body (model)
|
|
242
|
+
post_body = opts[:body] || @api_client.object_to_http_body(time_entry_create_or_update)
|
|
243
|
+
|
|
244
|
+
# return_type
|
|
245
|
+
return_type = opts[:return_type] || 'TimeEntry'
|
|
246
|
+
|
|
247
|
+
# auth_names
|
|
248
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
249
|
+
|
|
250
|
+
new_options = opts.merge(
|
|
251
|
+
:header_params => header_params,
|
|
252
|
+
:query_params => query_params,
|
|
253
|
+
:form_params => form_params,
|
|
254
|
+
:body => post_body,
|
|
255
|
+
:auth_names => auth_names,
|
|
256
|
+
:return_type => return_type
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, "ProjectApi", new_options)
|
|
260
|
+
if @api_client.config.debugging
|
|
261
|
+
@api_client.config.logger.debug "API called: ProjectApi#create_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
262
|
+
end
|
|
263
|
+
return data, status_code, headers
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Allows you to delete a task
|
|
267
|
+
# Allows you to delete a specific task
|
|
268
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
269
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
270
|
+
# @param task_id [String] You can specify an individual task by appending the id to the endpoint
|
|
271
|
+
# @param [Hash] opts the optional parameters
|
|
272
|
+
# @return [nil]
|
|
273
|
+
def delete_task(xero_tenant_id, project_id, task_id, opts = {})
|
|
274
|
+
delete_task_with_http_info(xero_tenant_id, project_id, task_id, opts)
|
|
275
|
+
nil
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Allows you to delete a task
|
|
279
|
+
# Allows you to delete a specific task
|
|
280
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
281
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
282
|
+
# @param task_id [String] You can specify an individual task by appending the id to the endpoint
|
|
283
|
+
# @param [Hash] opts the optional parameters
|
|
284
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
285
|
+
def delete_task_with_http_info(xero_tenant_id, project_id, task_id, options = {})
|
|
286
|
+
opts = options.dup
|
|
287
|
+
if @api_client.config.debugging
|
|
288
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.delete_task ...'
|
|
289
|
+
end
|
|
290
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
291
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
292
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.delete_task"
|
|
293
|
+
end
|
|
294
|
+
# verify the required parameter 'project_id' is set
|
|
295
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
296
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.delete_task"
|
|
297
|
+
end
|
|
298
|
+
# verify the required parameter 'task_id' is set
|
|
299
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
|
300
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling ProjectApi.delete_task"
|
|
301
|
+
end
|
|
302
|
+
# resource path
|
|
303
|
+
local_var_path = '/Projects/{projectId}/Tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)
|
|
304
|
+
|
|
305
|
+
# camelize keys of incoming `where` opts
|
|
306
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
307
|
+
|
|
308
|
+
# query parameters
|
|
309
|
+
query_params = opts[:query_params] || {}
|
|
310
|
+
|
|
311
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
312
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
313
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
314
|
+
|
|
315
|
+
# header parameters
|
|
316
|
+
header_params = opts[:header_params] || {}
|
|
317
|
+
# HTTP header 'Accept' (if needed)
|
|
318
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
319
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
320
|
+
|
|
321
|
+
# form parameters
|
|
322
|
+
form_params = opts[:form_params] || {}
|
|
323
|
+
|
|
324
|
+
# http body (model)
|
|
325
|
+
post_body = opts[:body]
|
|
326
|
+
|
|
327
|
+
# return_type
|
|
328
|
+
return_type = opts[:return_type]
|
|
329
|
+
|
|
330
|
+
# auth_names
|
|
331
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
332
|
+
|
|
333
|
+
new_options = opts.merge(
|
|
334
|
+
:header_params => header_params,
|
|
335
|
+
:query_params => query_params,
|
|
336
|
+
:form_params => form_params,
|
|
337
|
+
:body => post_body,
|
|
338
|
+
:auth_names => auth_names,
|
|
339
|
+
:return_type => return_type
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "ProjectApi", new_options)
|
|
343
|
+
if @api_client.config.debugging
|
|
344
|
+
@api_client.config.logger.debug "API called: ProjectApi#delete_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
345
|
+
end
|
|
346
|
+
return data, status_code, headers
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
# Deletes a time entry for a specific project
|
|
350
|
+
# Allows you to delete a specific time entry
|
|
351
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
352
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
353
|
+
# @param time_entry_id [String] You can specify an individual task by appending the id to the endpoint
|
|
354
|
+
# @param [Hash] opts the optional parameters
|
|
355
|
+
# @return [nil]
|
|
356
|
+
def delete_time_entry(xero_tenant_id, project_id, time_entry_id, opts = {})
|
|
357
|
+
delete_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, opts)
|
|
358
|
+
nil
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Deletes a time entry for a specific project
|
|
362
|
+
# Allows you to delete a specific time entry
|
|
363
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
364
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
365
|
+
# @param time_entry_id [String] You can specify an individual task by appending the id to the endpoint
|
|
366
|
+
# @param [Hash] opts the optional parameters
|
|
367
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
368
|
+
def delete_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, options = {})
|
|
369
|
+
opts = options.dup
|
|
370
|
+
if @api_client.config.debugging
|
|
371
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.delete_time_entry ...'
|
|
372
|
+
end
|
|
373
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
374
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
375
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.delete_time_entry"
|
|
376
|
+
end
|
|
377
|
+
# verify the required parameter 'project_id' is set
|
|
378
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
379
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.delete_time_entry"
|
|
380
|
+
end
|
|
381
|
+
# verify the required parameter 'time_entry_id' is set
|
|
382
|
+
if @api_client.config.client_side_validation && time_entry_id.nil?
|
|
383
|
+
fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.delete_time_entry"
|
|
384
|
+
end
|
|
385
|
+
# resource path
|
|
386
|
+
local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
|
387
|
+
|
|
388
|
+
# camelize keys of incoming `where` opts
|
|
389
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
390
|
+
|
|
391
|
+
# query parameters
|
|
392
|
+
query_params = opts[:query_params] || {}
|
|
393
|
+
|
|
394
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
395
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
396
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
397
|
+
|
|
398
|
+
# header parameters
|
|
399
|
+
header_params = opts[:header_params] || {}
|
|
400
|
+
# HTTP header 'Accept' (if needed)
|
|
401
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
402
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
403
|
+
|
|
404
|
+
# form parameters
|
|
405
|
+
form_params = opts[:form_params] || {}
|
|
406
|
+
|
|
407
|
+
# http body (model)
|
|
408
|
+
post_body = opts[:body]
|
|
409
|
+
|
|
410
|
+
# return_type
|
|
411
|
+
return_type = opts[:return_type]
|
|
412
|
+
|
|
413
|
+
# auth_names
|
|
414
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
415
|
+
|
|
416
|
+
new_options = opts.merge(
|
|
417
|
+
:header_params => header_params,
|
|
418
|
+
:query_params => query_params,
|
|
419
|
+
:form_params => form_params,
|
|
420
|
+
:body => post_body,
|
|
421
|
+
:auth_names => auth_names,
|
|
422
|
+
:return_type => return_type
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "ProjectApi", new_options)
|
|
426
|
+
if @api_client.config.debugging
|
|
427
|
+
@api_client.config.logger.debug "API called: ProjectApi#delete_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
428
|
+
end
|
|
429
|
+
return data, status_code, headers
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Retrieves a single project
|
|
433
|
+
# Allows you to retrieve a specific project using the projectId
|
|
434
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
435
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
436
|
+
# @param [Hash] opts the optional parameters
|
|
437
|
+
# @return [Project]
|
|
438
|
+
def get_project(xero_tenant_id, project_id, opts = {})
|
|
439
|
+
data, _status_code, _headers = get_project_with_http_info(xero_tenant_id, project_id, opts)
|
|
440
|
+
data
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# Retrieves a single project
|
|
444
|
+
# Allows you to retrieve a specific project using the projectId
|
|
445
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
446
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
447
|
+
# @param [Hash] opts the optional parameters
|
|
448
|
+
# @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
|
|
449
|
+
def get_project_with_http_info(xero_tenant_id, project_id, options = {})
|
|
450
|
+
opts = options.dup
|
|
451
|
+
if @api_client.config.debugging
|
|
452
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.get_project ...'
|
|
453
|
+
end
|
|
454
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
455
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
456
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_project"
|
|
457
|
+
end
|
|
458
|
+
# verify the required parameter 'project_id' is set
|
|
459
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
460
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_project"
|
|
461
|
+
end
|
|
462
|
+
# resource path
|
|
463
|
+
local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
464
|
+
|
|
465
|
+
# camelize keys of incoming `where` opts
|
|
466
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
467
|
+
|
|
468
|
+
# query parameters
|
|
469
|
+
query_params = opts[:query_params] || {}
|
|
470
|
+
|
|
471
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
472
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
473
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
474
|
+
|
|
475
|
+
# header parameters
|
|
476
|
+
header_params = opts[:header_params] || {}
|
|
477
|
+
# HTTP header 'Accept' (if needed)
|
|
478
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
479
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
480
|
+
|
|
481
|
+
# form parameters
|
|
482
|
+
form_params = opts[:form_params] || {}
|
|
483
|
+
|
|
484
|
+
# http body (model)
|
|
485
|
+
post_body = opts[:body]
|
|
486
|
+
|
|
487
|
+
# return_type
|
|
488
|
+
return_type = opts[:return_type] || 'Project'
|
|
489
|
+
|
|
490
|
+
# auth_names
|
|
491
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
492
|
+
|
|
493
|
+
new_options = opts.merge(
|
|
494
|
+
:header_params => header_params,
|
|
495
|
+
:query_params => query_params,
|
|
496
|
+
:form_params => form_params,
|
|
497
|
+
:body => post_body,
|
|
498
|
+
:auth_names => auth_names,
|
|
499
|
+
:return_type => return_type
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
503
|
+
if @api_client.config.debugging
|
|
504
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
505
|
+
end
|
|
506
|
+
return data, status_code, headers
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
# Retrieves a list of all project users
|
|
510
|
+
# Allows you to retrieve the users on a projects.
|
|
511
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
512
|
+
# @param [Hash] opts the optional parameters
|
|
513
|
+
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. (default to 1)
|
|
514
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. (default to 50)
|
|
515
|
+
# @return [ProjectUsers]
|
|
516
|
+
def get_project_users(xero_tenant_id, opts = {})
|
|
517
|
+
data, _status_code, _headers = get_project_users_with_http_info(xero_tenant_id, opts)
|
|
518
|
+
data
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
# Retrieves a list of all project users
|
|
522
|
+
# Allows you to retrieve the users on a projects.
|
|
523
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
524
|
+
# @param [Hash] opts the optional parameters
|
|
525
|
+
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
526
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
527
|
+
# @return [Array<(ProjectUsers, Integer, Hash)>] ProjectUsers data, response status code and response headers
|
|
528
|
+
def get_project_users_with_http_info(xero_tenant_id, options = {})
|
|
529
|
+
opts = options.dup
|
|
530
|
+
if @api_client.config.debugging
|
|
531
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.get_project_users ...'
|
|
532
|
+
end
|
|
533
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
534
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
535
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_project_users"
|
|
536
|
+
end
|
|
537
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
|
|
538
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_project_users, must be smaller than or equal to 500.'
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
542
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_project_users, must be greater than or equal to 1.'
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
# resource path
|
|
546
|
+
local_var_path = '/ProjectsUsers'
|
|
547
|
+
|
|
548
|
+
# camelize keys of incoming `where` opts
|
|
549
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
550
|
+
|
|
551
|
+
# query parameters
|
|
552
|
+
query_params = opts[:query_params] || {}
|
|
553
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
554
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
555
|
+
|
|
556
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
557
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
558
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
559
|
+
|
|
560
|
+
# header parameters
|
|
561
|
+
header_params = opts[:header_params] || {}
|
|
562
|
+
# HTTP header 'Accept' (if needed)
|
|
563
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
564
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
565
|
+
|
|
566
|
+
# form parameters
|
|
567
|
+
form_params = opts[:form_params] || {}
|
|
568
|
+
|
|
569
|
+
# http body (model)
|
|
570
|
+
post_body = opts[:body]
|
|
571
|
+
|
|
572
|
+
# return_type
|
|
573
|
+
return_type = opts[:return_type] || 'ProjectUsers'
|
|
574
|
+
|
|
575
|
+
# auth_names
|
|
576
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
577
|
+
|
|
578
|
+
new_options = opts.merge(
|
|
579
|
+
:header_params => header_params,
|
|
580
|
+
:query_params => query_params,
|
|
581
|
+
:form_params => form_params,
|
|
582
|
+
:body => post_body,
|
|
583
|
+
:auth_names => auth_names,
|
|
584
|
+
:return_type => return_type
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
588
|
+
if @api_client.config.debugging
|
|
589
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_project_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
590
|
+
end
|
|
591
|
+
return data, status_code, headers
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# Retrieves all projects
|
|
595
|
+
# Allows you to retrieve, create and update projects.
|
|
596
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
597
|
+
# @param [Hash] opts the optional parameters
|
|
598
|
+
# @option opts [Array<String>] :project_ids Search for all projects that match a comma separated list of projectIds
|
|
599
|
+
# @option opts [String] :contact_id Filter for projects for a specific contact
|
|
600
|
+
# @option opts [String] :states Filter for projects in a particular state (INPROGRESS or CLOSED)
|
|
601
|
+
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. (default to 1)
|
|
602
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. (default to 50)
|
|
603
|
+
# @return [Projects]
|
|
604
|
+
def get_projects(xero_tenant_id, opts = {})
|
|
605
|
+
data, _status_code, _headers = get_projects_with_http_info(xero_tenant_id, opts)
|
|
606
|
+
data
|
|
607
|
+
end
|
|
608
|
+
|
|
609
|
+
# Retrieves all projects
|
|
610
|
+
# Allows you to retrieve, create and update projects.
|
|
611
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
612
|
+
# @param [Hash] opts the optional parameters
|
|
613
|
+
# @option opts [Array<String>] :project_ids Search for all projects that match a comma separated list of projectIds
|
|
614
|
+
# @option opts [String] :contact_id Filter for projects for a specific contact
|
|
615
|
+
# @option opts [String] :states Filter for projects in a particular state (INPROGRESS or CLOSED)
|
|
616
|
+
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
617
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
618
|
+
# @return [Array<(Projects, Integer, Hash)>] Projects data, response status code and response headers
|
|
619
|
+
def get_projects_with_http_info(xero_tenant_id, options = {})
|
|
620
|
+
opts = options.dup
|
|
621
|
+
if @api_client.config.debugging
|
|
622
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.get_projects ...'
|
|
623
|
+
end
|
|
624
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
625
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
626
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_projects"
|
|
627
|
+
end
|
|
628
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
|
|
629
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_projects, must be smaller than or equal to 500.'
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
633
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_projects, must be greater than or equal to 1.'
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
# resource path
|
|
637
|
+
local_var_path = '/Projects'
|
|
638
|
+
|
|
639
|
+
# camelize keys of incoming `where` opts
|
|
640
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
641
|
+
|
|
642
|
+
# query parameters
|
|
643
|
+
query_params = opts[:query_params] || {}
|
|
644
|
+
query_params[:'projectIds'] = @api_client.build_collection_param(opts[:'project_ids'], :multi) if !opts[:'project_ids'].nil?
|
|
645
|
+
query_params[:'contactID'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
|
|
646
|
+
query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
|
|
647
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
648
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
649
|
+
|
|
650
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
651
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
652
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
653
|
+
|
|
654
|
+
# header parameters
|
|
655
|
+
header_params = opts[:header_params] || {}
|
|
656
|
+
# HTTP header 'Accept' (if needed)
|
|
657
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
658
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
659
|
+
|
|
660
|
+
# form parameters
|
|
661
|
+
form_params = opts[:form_params] || {}
|
|
662
|
+
|
|
663
|
+
# http body (model)
|
|
664
|
+
post_body = opts[:body]
|
|
665
|
+
|
|
666
|
+
# return_type
|
|
667
|
+
return_type = opts[:return_type] || 'Projects'
|
|
668
|
+
|
|
669
|
+
# auth_names
|
|
670
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
671
|
+
|
|
672
|
+
new_options = opts.merge(
|
|
673
|
+
:header_params => header_params,
|
|
674
|
+
:query_params => query_params,
|
|
675
|
+
:form_params => form_params,
|
|
676
|
+
:body => post_body,
|
|
677
|
+
:auth_names => auth_names,
|
|
678
|
+
:return_type => return_type
|
|
679
|
+
)
|
|
680
|
+
|
|
681
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
682
|
+
if @api_client.config.debugging
|
|
683
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
684
|
+
end
|
|
685
|
+
return data, status_code, headers
|
|
686
|
+
end
|
|
687
|
+
|
|
688
|
+
# Retrieves a single project task
|
|
689
|
+
# Allows you to retrieve a specific project
|
|
690
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
691
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
692
|
+
# @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}
|
|
693
|
+
# @param [Hash] opts the optional parameters
|
|
694
|
+
# @return [Task]
|
|
695
|
+
def get_task(xero_tenant_id, project_id, task_id, opts = {})
|
|
696
|
+
data, _status_code, _headers = get_task_with_http_info(xero_tenant_id, project_id, task_id, opts)
|
|
697
|
+
data
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
# Retrieves a single project task
|
|
701
|
+
# Allows you to retrieve a specific project
|
|
702
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
703
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
704
|
+
# @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}
|
|
705
|
+
# @param [Hash] opts the optional parameters
|
|
706
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
|
707
|
+
def get_task_with_http_info(xero_tenant_id, project_id, task_id, options = {})
|
|
708
|
+
opts = options.dup
|
|
709
|
+
if @api_client.config.debugging
|
|
710
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.get_task ...'
|
|
711
|
+
end
|
|
712
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
713
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
714
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_task"
|
|
715
|
+
end
|
|
716
|
+
# verify the required parameter 'project_id' is set
|
|
717
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
718
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_task"
|
|
719
|
+
end
|
|
720
|
+
# verify the required parameter 'task_id' is set
|
|
721
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
|
722
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling ProjectApi.get_task"
|
|
723
|
+
end
|
|
724
|
+
# resource path
|
|
725
|
+
local_var_path = '/Projects/{projectId}/Tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)
|
|
726
|
+
|
|
727
|
+
# camelize keys of incoming `where` opts
|
|
728
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
729
|
+
|
|
730
|
+
# query parameters
|
|
731
|
+
query_params = opts[:query_params] || {}
|
|
732
|
+
|
|
733
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
734
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
735
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
736
|
+
|
|
737
|
+
# header parameters
|
|
738
|
+
header_params = opts[:header_params] || {}
|
|
739
|
+
# HTTP header 'Accept' (if needed)
|
|
740
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
741
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
742
|
+
|
|
743
|
+
# form parameters
|
|
744
|
+
form_params = opts[:form_params] || {}
|
|
745
|
+
|
|
746
|
+
# http body (model)
|
|
747
|
+
post_body = opts[:body]
|
|
748
|
+
|
|
749
|
+
# return_type
|
|
750
|
+
return_type = opts[:return_type] || 'Task'
|
|
751
|
+
|
|
752
|
+
# auth_names
|
|
753
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
754
|
+
|
|
755
|
+
new_options = opts.merge(
|
|
756
|
+
:header_params => header_params,
|
|
757
|
+
:query_params => query_params,
|
|
758
|
+
:form_params => form_params,
|
|
759
|
+
:body => post_body,
|
|
760
|
+
:auth_names => auth_names,
|
|
761
|
+
:return_type => return_type
|
|
762
|
+
)
|
|
763
|
+
|
|
764
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
765
|
+
if @api_client.config.debugging
|
|
766
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
767
|
+
end
|
|
768
|
+
return data, status_code, headers
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
# Retrieves all project tasks
|
|
772
|
+
# Allows you to retrieve a specific project
|
|
773
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
774
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
775
|
+
# @param [Hash] opts the optional parameters
|
|
776
|
+
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
777
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
778
|
+
# @option opts [String] :task_ids Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}
|
|
779
|
+
# @option opts [ChargeType] :charge_type
|
|
780
|
+
# @return [Tasks]
|
|
781
|
+
def get_tasks(xero_tenant_id, project_id, opts = {})
|
|
782
|
+
data, _status_code, _headers = get_tasks_with_http_info(xero_tenant_id, project_id, opts)
|
|
783
|
+
data
|
|
784
|
+
end
|
|
785
|
+
|
|
786
|
+
# Retrieves all project tasks
|
|
787
|
+
# Allows you to retrieve a specific project
|
|
788
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
789
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
790
|
+
# @param [Hash] opts the optional parameters
|
|
791
|
+
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
792
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
793
|
+
# @option opts [String] :task_ids Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}
|
|
794
|
+
# @option opts [ChargeType] :charge_type
|
|
795
|
+
# @return [Array<(Tasks, Integer, Hash)>] Tasks data, response status code and response headers
|
|
796
|
+
def get_tasks_with_http_info(xero_tenant_id, project_id, options = {})
|
|
797
|
+
opts = options.dup
|
|
798
|
+
if @api_client.config.debugging
|
|
799
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.get_tasks ...'
|
|
800
|
+
end
|
|
801
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
802
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
803
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_tasks"
|
|
804
|
+
end
|
|
805
|
+
# verify the required parameter 'project_id' is set
|
|
806
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
807
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_tasks"
|
|
808
|
+
end
|
|
809
|
+
# resource path
|
|
810
|
+
local_var_path = '/Projects/{projectId}/Tasks'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
811
|
+
|
|
812
|
+
# camelize keys of incoming `where` opts
|
|
813
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
814
|
+
|
|
815
|
+
# query parameters
|
|
816
|
+
query_params = opts[:query_params] || {}
|
|
817
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
818
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
819
|
+
query_params[:'taskIds'] = opts[:'task_ids'] if !opts[:'task_ids'].nil?
|
|
820
|
+
query_params[:'chargeType'] = opts[:'charge_type'] if !opts[:'charge_type'].nil?
|
|
821
|
+
|
|
822
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
823
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
824
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
825
|
+
|
|
826
|
+
# header parameters
|
|
827
|
+
header_params = opts[:header_params] || {}
|
|
828
|
+
# HTTP header 'Accept' (if needed)
|
|
829
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
830
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
831
|
+
|
|
832
|
+
# form parameters
|
|
833
|
+
form_params = opts[:form_params] || {}
|
|
834
|
+
|
|
835
|
+
# http body (model)
|
|
836
|
+
post_body = opts[:body]
|
|
837
|
+
|
|
838
|
+
# return_type
|
|
839
|
+
return_type = opts[:return_type] || 'Tasks'
|
|
840
|
+
|
|
841
|
+
# auth_names
|
|
842
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
843
|
+
|
|
844
|
+
new_options = opts.merge(
|
|
845
|
+
:header_params => header_params,
|
|
846
|
+
:query_params => query_params,
|
|
847
|
+
:form_params => form_params,
|
|
848
|
+
:body => post_body,
|
|
849
|
+
:auth_names => auth_names,
|
|
850
|
+
:return_type => return_type
|
|
851
|
+
)
|
|
852
|
+
|
|
853
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
854
|
+
if @api_client.config.debugging
|
|
855
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
856
|
+
end
|
|
857
|
+
return data, status_code, headers
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
# Retrieves all time entries associated with a specific project
|
|
861
|
+
# Allows you to retrieve the time entries associated with a specific project
|
|
862
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
863
|
+
# @param project_id [String] Identifier of the project, that the task (which the time entry is logged against) belongs to.
|
|
864
|
+
# @param [Hash] opts the optional parameters
|
|
865
|
+
# @option opts [String] :user_id The xero user identifier of the person who logged time.
|
|
866
|
+
# @option opts [String] :task_id Identifier of the task that time entry is logged against.
|
|
867
|
+
# @option opts [String] :invoice_id Finds all time entries for this invoice.
|
|
868
|
+
# @option opts [String] :contact_id Finds all time entries for this contact identifier.
|
|
869
|
+
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
870
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
871
|
+
# @option opts [Array<String>] :states Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified.
|
|
872
|
+
# @option opts [Boolean] :is_chargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.
|
|
873
|
+
# @option opts [DateTime] :date_after_utc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.
|
|
874
|
+
# @option opts [DateTime] :date_before_utc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.
|
|
875
|
+
# @return [TimeEntries]
|
|
876
|
+
def get_time_entries(xero_tenant_id, project_id, opts = {})
|
|
877
|
+
data, _status_code, _headers = get_time_entries_with_http_info(xero_tenant_id, project_id, opts)
|
|
878
|
+
data
|
|
879
|
+
end
|
|
880
|
+
|
|
881
|
+
# Retrieves all time entries associated with a specific project
|
|
882
|
+
# Allows you to retrieve the time entries associated with a specific project
|
|
883
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
884
|
+
# @param project_id [String] Identifier of the project, that the task (which the time entry is logged against) belongs to.
|
|
885
|
+
# @param [Hash] opts the optional parameters
|
|
886
|
+
# @option opts [String] :user_id The xero user identifier of the person who logged time.
|
|
887
|
+
# @option opts [String] :task_id Identifier of the task that time entry is logged against.
|
|
888
|
+
# @option opts [String] :invoice_id Finds all time entries for this invoice.
|
|
889
|
+
# @option opts [String] :contact_id Finds all time entries for this contact identifier.
|
|
890
|
+
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
|
891
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
|
892
|
+
# @option opts [Array<String>] :states Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified.
|
|
893
|
+
# @option opts [Boolean] :is_chargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.
|
|
894
|
+
# @option opts [DateTime] :date_after_utc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.
|
|
895
|
+
# @option opts [DateTime] :date_before_utc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.
|
|
896
|
+
# @return [Array<(TimeEntries, Integer, Hash)>] TimeEntries data, response status code and response headers
|
|
897
|
+
def get_time_entries_with_http_info(xero_tenant_id, project_id, options = {})
|
|
898
|
+
opts = options.dup
|
|
899
|
+
if @api_client.config.debugging
|
|
900
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.get_time_entries ...'
|
|
901
|
+
end
|
|
902
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
903
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
904
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_time_entries"
|
|
905
|
+
end
|
|
906
|
+
# verify the required parameter 'project_id' is set
|
|
907
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
908
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_time_entries"
|
|
909
|
+
end
|
|
910
|
+
# resource path
|
|
911
|
+
local_var_path = '/Projects/{projectId}/Time'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
912
|
+
|
|
913
|
+
# camelize keys of incoming `where` opts
|
|
914
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
915
|
+
|
|
916
|
+
# query parameters
|
|
917
|
+
query_params = opts[:query_params] || {}
|
|
918
|
+
query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
|
919
|
+
query_params[:'taskId'] = opts[:'task_id'] if !opts[:'task_id'].nil?
|
|
920
|
+
query_params[:'invoiceId'] = opts[:'invoice_id'] if !opts[:'invoice_id'].nil?
|
|
921
|
+
query_params[:'contactId'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
|
|
922
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
923
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
924
|
+
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
925
|
+
query_params[:'isChargeable'] = opts[:'is_chargeable'] if !opts[:'is_chargeable'].nil?
|
|
926
|
+
query_params[:'dateAfterUtc'] = opts[:'date_after_utc'] if !opts[:'date_after_utc'].nil?
|
|
927
|
+
query_params[:'dateBeforeUtc'] = opts[:'date_before_utc'] if !opts[:'date_before_utc'].nil?
|
|
928
|
+
|
|
929
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
930
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
931
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
932
|
+
|
|
933
|
+
# header parameters
|
|
934
|
+
header_params = opts[:header_params] || {}
|
|
935
|
+
# HTTP header 'Accept' (if needed)
|
|
936
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
937
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
938
|
+
|
|
939
|
+
# form parameters
|
|
940
|
+
form_params = opts[:form_params] || {}
|
|
941
|
+
|
|
942
|
+
# http body (model)
|
|
943
|
+
post_body = opts[:body]
|
|
944
|
+
|
|
945
|
+
# return_type
|
|
946
|
+
return_type = opts[:return_type] || 'TimeEntries'
|
|
947
|
+
|
|
948
|
+
# auth_names
|
|
949
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
950
|
+
|
|
951
|
+
new_options = opts.merge(
|
|
952
|
+
:header_params => header_params,
|
|
953
|
+
:query_params => query_params,
|
|
954
|
+
:form_params => form_params,
|
|
955
|
+
:body => post_body,
|
|
956
|
+
:auth_names => auth_names,
|
|
957
|
+
:return_type => return_type
|
|
958
|
+
)
|
|
959
|
+
|
|
960
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
961
|
+
if @api_client.config.debugging
|
|
962
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_time_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
963
|
+
end
|
|
964
|
+
return data, status_code, headers
|
|
965
|
+
end
|
|
966
|
+
|
|
967
|
+
# Retrieves a single time entry for a specific project
|
|
968
|
+
# Allows you to get a single time entry in a project
|
|
969
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
970
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
971
|
+
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
|
972
|
+
# @param [Hash] opts the optional parameters
|
|
973
|
+
# @return [TimeEntry]
|
|
974
|
+
def get_time_entry(xero_tenant_id, project_id, time_entry_id, opts = {})
|
|
975
|
+
data, _status_code, _headers = get_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, opts)
|
|
976
|
+
data
|
|
977
|
+
end
|
|
978
|
+
|
|
979
|
+
# Retrieves a single time entry for a specific project
|
|
980
|
+
# Allows you to get a single time entry in a project
|
|
981
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
982
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
983
|
+
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
|
984
|
+
# @param [Hash] opts the optional parameters
|
|
985
|
+
# @return [Array<(TimeEntry, Integer, Hash)>] TimeEntry data, response status code and response headers
|
|
986
|
+
def get_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, options = {})
|
|
987
|
+
opts = options.dup
|
|
988
|
+
if @api_client.config.debugging
|
|
989
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.get_time_entry ...'
|
|
990
|
+
end
|
|
991
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
992
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
993
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_time_entry"
|
|
994
|
+
end
|
|
995
|
+
# verify the required parameter 'project_id' is set
|
|
996
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
997
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_time_entry"
|
|
998
|
+
end
|
|
999
|
+
# verify the required parameter 'time_entry_id' is set
|
|
1000
|
+
if @api_client.config.client_side_validation && time_entry_id.nil?
|
|
1001
|
+
fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.get_time_entry"
|
|
1002
|
+
end
|
|
1003
|
+
# resource path
|
|
1004
|
+
local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
|
1005
|
+
|
|
1006
|
+
# camelize keys of incoming `where` opts
|
|
1007
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1008
|
+
|
|
1009
|
+
# query parameters
|
|
1010
|
+
query_params = opts[:query_params] || {}
|
|
1011
|
+
|
|
1012
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1013
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1014
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1015
|
+
|
|
1016
|
+
# header parameters
|
|
1017
|
+
header_params = opts[:header_params] || {}
|
|
1018
|
+
# HTTP header 'Accept' (if needed)
|
|
1019
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1020
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1021
|
+
|
|
1022
|
+
# form parameters
|
|
1023
|
+
form_params = opts[:form_params] || {}
|
|
1024
|
+
|
|
1025
|
+
# http body (model)
|
|
1026
|
+
post_body = opts[:body]
|
|
1027
|
+
|
|
1028
|
+
# return_type
|
|
1029
|
+
return_type = opts[:return_type] || 'TimeEntry'
|
|
1030
|
+
|
|
1031
|
+
# auth_names
|
|
1032
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1033
|
+
|
|
1034
|
+
new_options = opts.merge(
|
|
1035
|
+
:header_params => header_params,
|
|
1036
|
+
:query_params => query_params,
|
|
1037
|
+
:form_params => form_params,
|
|
1038
|
+
:body => post_body,
|
|
1039
|
+
:auth_names => auth_names,
|
|
1040
|
+
:return_type => return_type
|
|
1041
|
+
)
|
|
1042
|
+
|
|
1043
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options)
|
|
1044
|
+
if @api_client.config.debugging
|
|
1045
|
+
@api_client.config.logger.debug "API called: ProjectApi#get_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1046
|
+
end
|
|
1047
|
+
return data, status_code, headers
|
|
1048
|
+
end
|
|
1049
|
+
|
|
1050
|
+
# creates a project for the specified contact
|
|
1051
|
+
# Allows you to update a specific projects.
|
|
1052
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1053
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1054
|
+
# @param project_patch [ProjectPatch] Update the status of an existing Project
|
|
1055
|
+
# @param [Hash] opts the optional parameters
|
|
1056
|
+
# @return [nil]
|
|
1057
|
+
def patch_project(xero_tenant_id, project_id, project_patch, opts = {})
|
|
1058
|
+
patch_project_with_http_info(xero_tenant_id, project_id, project_patch, opts)
|
|
1059
|
+
nil
|
|
1060
|
+
end
|
|
1061
|
+
|
|
1062
|
+
# creates a project for the specified contact
|
|
1063
|
+
# Allows you to update a specific projects.
|
|
1064
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1065
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1066
|
+
# @param project_patch [ProjectPatch] Update the status of an existing Project
|
|
1067
|
+
# @param [Hash] opts the optional parameters
|
|
1068
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1069
|
+
def patch_project_with_http_info(xero_tenant_id, project_id, project_patch, options = {})
|
|
1070
|
+
opts = options.dup
|
|
1071
|
+
if @api_client.config.debugging
|
|
1072
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.patch_project ...'
|
|
1073
|
+
end
|
|
1074
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
1075
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
1076
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.patch_project"
|
|
1077
|
+
end
|
|
1078
|
+
# verify the required parameter 'project_id' is set
|
|
1079
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1080
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.patch_project"
|
|
1081
|
+
end
|
|
1082
|
+
# verify the required parameter 'project_patch' is set
|
|
1083
|
+
if @api_client.config.client_side_validation && project_patch.nil?
|
|
1084
|
+
fail ArgumentError, "Missing the required parameter 'project_patch' when calling ProjectApi.patch_project"
|
|
1085
|
+
end
|
|
1086
|
+
# resource path
|
|
1087
|
+
local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
1088
|
+
|
|
1089
|
+
# camelize keys of incoming `where` opts
|
|
1090
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1091
|
+
|
|
1092
|
+
# query parameters
|
|
1093
|
+
query_params = opts[:query_params] || {}
|
|
1094
|
+
|
|
1095
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1096
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1097
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1098
|
+
|
|
1099
|
+
# header parameters
|
|
1100
|
+
header_params = opts[:header_params] || {}
|
|
1101
|
+
# HTTP header 'Accept' (if needed)
|
|
1102
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1103
|
+
# HTTP header 'Content-Type'
|
|
1104
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1105
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1106
|
+
|
|
1107
|
+
# form parameters
|
|
1108
|
+
form_params = opts[:form_params] || {}
|
|
1109
|
+
|
|
1110
|
+
# http body (model)
|
|
1111
|
+
post_body = opts[:body] || @api_client.object_to_http_body(project_patch)
|
|
1112
|
+
|
|
1113
|
+
# return_type
|
|
1114
|
+
return_type = opts[:return_type]
|
|
1115
|
+
|
|
1116
|
+
# auth_names
|
|
1117
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1118
|
+
|
|
1119
|
+
new_options = opts.merge(
|
|
1120
|
+
:header_params => header_params,
|
|
1121
|
+
:query_params => query_params,
|
|
1122
|
+
:form_params => form_params,
|
|
1123
|
+
:body => post_body,
|
|
1124
|
+
:auth_names => auth_names,
|
|
1125
|
+
:return_type => return_type
|
|
1126
|
+
)
|
|
1127
|
+
|
|
1128
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, "ProjectApi", new_options)
|
|
1129
|
+
if @api_client.config.debugging
|
|
1130
|
+
@api_client.config.logger.debug "API called: ProjectApi#patch_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1131
|
+
end
|
|
1132
|
+
return data, status_code, headers
|
|
1133
|
+
end
|
|
1134
|
+
|
|
1135
|
+
# Updates a specific project
|
|
1136
|
+
# Allows you to update a specific projects.
|
|
1137
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1138
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1139
|
+
# @param project_create_or_update [ProjectCreateOrUpdate] Request of type ProjectCreateOrUpdate
|
|
1140
|
+
# @param [Hash] opts the optional parameters
|
|
1141
|
+
# @return [nil]
|
|
1142
|
+
def update_project(xero_tenant_id, project_id, project_create_or_update, opts = {})
|
|
1143
|
+
update_project_with_http_info(xero_tenant_id, project_id, project_create_or_update, opts)
|
|
1144
|
+
nil
|
|
1145
|
+
end
|
|
1146
|
+
|
|
1147
|
+
# Updates a specific project
|
|
1148
|
+
# Allows you to update a specific projects.
|
|
1149
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1150
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1151
|
+
# @param project_create_or_update [ProjectCreateOrUpdate] Request of type ProjectCreateOrUpdate
|
|
1152
|
+
# @param [Hash] opts the optional parameters
|
|
1153
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1154
|
+
def update_project_with_http_info(xero_tenant_id, project_id, project_create_or_update, options = {})
|
|
1155
|
+
opts = options.dup
|
|
1156
|
+
if @api_client.config.debugging
|
|
1157
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.update_project ...'
|
|
1158
|
+
end
|
|
1159
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
1160
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
1161
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.update_project"
|
|
1162
|
+
end
|
|
1163
|
+
# verify the required parameter 'project_id' is set
|
|
1164
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1165
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_project"
|
|
1166
|
+
end
|
|
1167
|
+
# verify the required parameter 'project_create_or_update' is set
|
|
1168
|
+
if @api_client.config.client_side_validation && project_create_or_update.nil?
|
|
1169
|
+
fail ArgumentError, "Missing the required parameter 'project_create_or_update' when calling ProjectApi.update_project"
|
|
1170
|
+
end
|
|
1171
|
+
# resource path
|
|
1172
|
+
local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
|
1173
|
+
|
|
1174
|
+
# camelize keys of incoming `where` opts
|
|
1175
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1176
|
+
|
|
1177
|
+
# query parameters
|
|
1178
|
+
query_params = opts[:query_params] || {}
|
|
1179
|
+
|
|
1180
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1181
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1182
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1183
|
+
|
|
1184
|
+
# header parameters
|
|
1185
|
+
header_params = opts[:header_params] || {}
|
|
1186
|
+
# HTTP header 'Accept' (if needed)
|
|
1187
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1188
|
+
# HTTP header 'Content-Type'
|
|
1189
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1190
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1191
|
+
|
|
1192
|
+
# form parameters
|
|
1193
|
+
form_params = opts[:form_params] || {}
|
|
1194
|
+
|
|
1195
|
+
# http body (model)
|
|
1196
|
+
post_body = opts[:body] || @api_client.object_to_http_body(project_create_or_update)
|
|
1197
|
+
|
|
1198
|
+
# return_type
|
|
1199
|
+
return_type = opts[:return_type]
|
|
1200
|
+
|
|
1201
|
+
# auth_names
|
|
1202
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1203
|
+
|
|
1204
|
+
new_options = opts.merge(
|
|
1205
|
+
:header_params => header_params,
|
|
1206
|
+
:query_params => query_params,
|
|
1207
|
+
:form_params => form_params,
|
|
1208
|
+
:body => post_body,
|
|
1209
|
+
:auth_names => auth_names,
|
|
1210
|
+
:return_type => return_type
|
|
1211
|
+
)
|
|
1212
|
+
|
|
1213
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "ProjectApi", new_options)
|
|
1214
|
+
if @api_client.config.debugging
|
|
1215
|
+
@api_client.config.logger.debug "API called: ProjectApi#update_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1216
|
+
end
|
|
1217
|
+
return data, status_code, headers
|
|
1218
|
+
end
|
|
1219
|
+
|
|
1220
|
+
# Allows you to update a task
|
|
1221
|
+
# Allows you to update a specific task
|
|
1222
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1223
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1224
|
+
# @param task_id [String] You can specify an individual task by appending the id to the endpoint
|
|
1225
|
+
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are updating
|
|
1226
|
+
# @param [Hash] opts the optional parameters
|
|
1227
|
+
# @return [nil]
|
|
1228
|
+
def update_task(xero_tenant_id, project_id, task_id, task_create_or_update, opts = {})
|
|
1229
|
+
update_task_with_http_info(xero_tenant_id, project_id, task_id, task_create_or_update, opts)
|
|
1230
|
+
nil
|
|
1231
|
+
end
|
|
1232
|
+
|
|
1233
|
+
# Allows you to update a task
|
|
1234
|
+
# Allows you to update a specific task
|
|
1235
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1236
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1237
|
+
# @param task_id [String] You can specify an individual task by appending the id to the endpoint
|
|
1238
|
+
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are updating
|
|
1239
|
+
# @param [Hash] opts the optional parameters
|
|
1240
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1241
|
+
def update_task_with_http_info(xero_tenant_id, project_id, task_id, task_create_or_update, options = {})
|
|
1242
|
+
opts = options.dup
|
|
1243
|
+
if @api_client.config.debugging
|
|
1244
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.update_task ...'
|
|
1245
|
+
end
|
|
1246
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
1247
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
1248
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.update_task"
|
|
1249
|
+
end
|
|
1250
|
+
# verify the required parameter 'project_id' is set
|
|
1251
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1252
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_task"
|
|
1253
|
+
end
|
|
1254
|
+
# verify the required parameter 'task_id' is set
|
|
1255
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
|
1256
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling ProjectApi.update_task"
|
|
1257
|
+
end
|
|
1258
|
+
# verify the required parameter 'task_create_or_update' is set
|
|
1259
|
+
if @api_client.config.client_side_validation && task_create_or_update.nil?
|
|
1260
|
+
fail ArgumentError, "Missing the required parameter 'task_create_or_update' when calling ProjectApi.update_task"
|
|
1261
|
+
end
|
|
1262
|
+
# resource path
|
|
1263
|
+
local_var_path = '/Projects/{projectId}/Tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)
|
|
1264
|
+
|
|
1265
|
+
# camelize keys of incoming `where` opts
|
|
1266
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1267
|
+
|
|
1268
|
+
# query parameters
|
|
1269
|
+
query_params = opts[:query_params] || {}
|
|
1270
|
+
|
|
1271
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1272
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1273
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1274
|
+
|
|
1275
|
+
# header parameters
|
|
1276
|
+
header_params = opts[:header_params] || {}
|
|
1277
|
+
# HTTP header 'Accept' (if needed)
|
|
1278
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1279
|
+
# HTTP header 'Content-Type'
|
|
1280
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1281
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1282
|
+
|
|
1283
|
+
# form parameters
|
|
1284
|
+
form_params = opts[:form_params] || {}
|
|
1285
|
+
|
|
1286
|
+
# http body (model)
|
|
1287
|
+
post_body = opts[:body] || @api_client.object_to_http_body(task_create_or_update)
|
|
1288
|
+
|
|
1289
|
+
# return_type
|
|
1290
|
+
return_type = opts[:return_type]
|
|
1291
|
+
|
|
1292
|
+
# auth_names
|
|
1293
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1294
|
+
|
|
1295
|
+
new_options = opts.merge(
|
|
1296
|
+
:header_params => header_params,
|
|
1297
|
+
:query_params => query_params,
|
|
1298
|
+
:form_params => form_params,
|
|
1299
|
+
:body => post_body,
|
|
1300
|
+
:auth_names => auth_names,
|
|
1301
|
+
:return_type => return_type
|
|
1302
|
+
)
|
|
1303
|
+
|
|
1304
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "ProjectApi", new_options)
|
|
1305
|
+
if @api_client.config.debugging
|
|
1306
|
+
@api_client.config.logger.debug "API called: ProjectApi#update_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1307
|
+
end
|
|
1308
|
+
return data, status_code, headers
|
|
1309
|
+
end
|
|
1310
|
+
|
|
1311
|
+
# Updates a time entry for a specific project
|
|
1312
|
+
# Allows you to update time entry in a project
|
|
1313
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1314
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1315
|
+
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
|
1316
|
+
# @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are updating
|
|
1317
|
+
# @param [Hash] opts the optional parameters
|
|
1318
|
+
# @return [nil]
|
|
1319
|
+
def update_time_entry(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update, opts = {})
|
|
1320
|
+
update_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update, opts)
|
|
1321
|
+
nil
|
|
1322
|
+
end
|
|
1323
|
+
|
|
1324
|
+
# Updates a time entry for a specific project
|
|
1325
|
+
# Allows you to update time entry in a project
|
|
1326
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1327
|
+
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
|
1328
|
+
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
|
1329
|
+
# @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are updating
|
|
1330
|
+
# @param [Hash] opts the optional parameters
|
|
1331
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1332
|
+
def update_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update, options = {})
|
|
1333
|
+
opts = options.dup
|
|
1334
|
+
if @api_client.config.debugging
|
|
1335
|
+
@api_client.config.logger.debug 'Calling API: ProjectApi.update_time_entry ...'
|
|
1336
|
+
end
|
|
1337
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
1338
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
1339
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.update_time_entry"
|
|
1340
|
+
end
|
|
1341
|
+
# verify the required parameter 'project_id' is set
|
|
1342
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1343
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_time_entry"
|
|
1344
|
+
end
|
|
1345
|
+
# verify the required parameter 'time_entry_id' is set
|
|
1346
|
+
if @api_client.config.client_side_validation && time_entry_id.nil?
|
|
1347
|
+
fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.update_time_entry"
|
|
1348
|
+
end
|
|
1349
|
+
# verify the required parameter 'time_entry_create_or_update' is set
|
|
1350
|
+
if @api_client.config.client_side_validation && time_entry_create_or_update.nil?
|
|
1351
|
+
fail ArgumentError, "Missing the required parameter 'time_entry_create_or_update' when calling ProjectApi.update_time_entry"
|
|
1352
|
+
end
|
|
1353
|
+
# resource path
|
|
1354
|
+
local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
|
1355
|
+
|
|
1356
|
+
# camelize keys of incoming `where` opts
|
|
1357
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
1358
|
+
|
|
1359
|
+
# query parameters
|
|
1360
|
+
query_params = opts[:query_params] || {}
|
|
1361
|
+
|
|
1362
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
1363
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
1364
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
1365
|
+
|
|
1366
|
+
# header parameters
|
|
1367
|
+
header_params = opts[:header_params] || {}
|
|
1368
|
+
# HTTP header 'Accept' (if needed)
|
|
1369
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1370
|
+
# HTTP header 'Content-Type'
|
|
1371
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1372
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1373
|
+
|
|
1374
|
+
# form parameters
|
|
1375
|
+
form_params = opts[:form_params] || {}
|
|
1376
|
+
|
|
1377
|
+
# http body (model)
|
|
1378
|
+
post_body = opts[:body] || @api_client.object_to_http_body(time_entry_create_or_update)
|
|
1379
|
+
|
|
1380
|
+
# return_type
|
|
1381
|
+
return_type = opts[:return_type]
|
|
1382
|
+
|
|
1383
|
+
# auth_names
|
|
1384
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1385
|
+
|
|
1386
|
+
new_options = opts.merge(
|
|
1387
|
+
:header_params => header_params,
|
|
1388
|
+
:query_params => query_params,
|
|
1389
|
+
:form_params => form_params,
|
|
1390
|
+
:body => post_body,
|
|
1391
|
+
:auth_names => auth_names,
|
|
1392
|
+
:return_type => return_type
|
|
1393
|
+
)
|
|
1394
|
+
|
|
1395
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "ProjectApi", new_options)
|
|
1396
|
+
if @api_client.config.debugging
|
|
1397
|
+
@api_client.config.logger.debug "API called: ProjectApi#update_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1398
|
+
end
|
|
1399
|
+
return data, status_code, headers
|
|
1400
|
+
end
|
|
1401
|
+
end
|
|
1402
|
+
end
|