xero-ruby 2.5.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +46 -7
- data/lib/xero-ruby.rb +4 -3
- data/lib/xero-ruby/api/accounting_api.rb +446 -441
- data/lib/xero-ruby/api/asset_api.rb +3 -8
- data/lib/xero-ruby/api/files_api.rb +49 -56
- data/lib/xero-ruby/api/payroll_au_api.rb +63 -64
- data/lib/xero-ruby/api/payroll_nz_api.rb +171 -172
- data/lib/xero-ruby/api/payroll_uk_api.rb +173 -174
- data/lib/xero-ruby/api/project_api.rb +45 -46
- data/lib/xero-ruby/api_client.rb +28 -90
- data/lib/xero-ruby/api_error.rb +1 -2
- data/lib/xero-ruby/configuration.rb +3 -4
- data/lib/xero-ruby/models/accounting/account.rb +15 -8
- data/lib/xero-ruby/models/accounting/account_type.rb +1 -2
- data/lib/xero-ruby/models/accounting/accounts.rb +15 -7
- data/lib/xero-ruby/models/accounting/accounts_payable.rb +15 -7
- data/lib/xero-ruby/models/accounting/accounts_receivable.rb +15 -7
- data/lib/xero-ruby/models/accounting/action.rb +15 -7
- data/lib/xero-ruby/models/accounting/actions.rb +15 -7
- data/lib/xero-ruby/models/accounting/address.rb +15 -7
- data/lib/xero-ruby/models/accounting/address_for_organisation.rb +15 -7
- data/lib/xero-ruby/models/accounting/allocation.rb +15 -7
- data/lib/xero-ruby/models/accounting/allocations.rb +15 -7
- data/lib/xero-ruby/models/accounting/attachment.rb +15 -7
- data/lib/xero-ruby/models/accounting/attachments.rb +15 -7
- data/lib/xero-ruby/models/accounting/balance_details.rb +15 -7
- data/lib/xero-ruby/models/accounting/balances.rb +15 -7
- data/lib/xero-ruby/models/accounting/bank_transaction.rb +15 -7
- data/lib/xero-ruby/models/accounting/bank_transactions.rb +15 -7
- data/lib/xero-ruby/models/accounting/bank_transfer.rb +15 -7
- data/lib/xero-ruby/models/accounting/bank_transfers.rb +15 -7
- data/lib/xero-ruby/models/accounting/batch_payment.rb +15 -7
- data/lib/xero-ruby/models/accounting/batch_payment_details.rb +15 -7
- data/lib/xero-ruby/models/accounting/batch_payments.rb +15 -7
- data/lib/xero-ruby/models/accounting/bill.rb +15 -7
- data/lib/xero-ruby/models/accounting/branding_theme.rb +15 -7
- data/lib/xero-ruby/models/accounting/branding_themes.rb +15 -7
- data/lib/xero-ruby/models/accounting/cis_org_setting.rb +15 -7
- data/lib/xero-ruby/models/{files/file_response204.rb → accounting/cis_org_settings.rb} +30 -20
- data/lib/xero-ruby/models/accounting/cis_setting.rb +15 -7
- data/lib/xero-ruby/models/accounting/cis_settings.rb +15 -7
- data/lib/xero-ruby/models/accounting/contact.rb +15 -7
- data/lib/xero-ruby/models/accounting/contact_group.rb +15 -7
- data/lib/xero-ruby/models/accounting/contact_groups.rb +15 -7
- data/lib/xero-ruby/models/accounting/contact_person.rb +15 -7
- data/lib/xero-ruby/models/accounting/contacts.rb +15 -7
- data/lib/xero-ruby/models/accounting/conversion_balances.rb +15 -7
- data/lib/xero-ruby/models/accounting/conversion_date.rb +15 -7
- data/lib/xero-ruby/models/accounting/country_code.rb +1 -2
- data/lib/xero-ruby/models/accounting/credit_note.rb +32 -12
- data/lib/xero-ruby/models/accounting/credit_notes.rb +15 -7
- data/lib/xero-ruby/models/accounting/currencies.rb +15 -7
- data/lib/xero-ruby/models/accounting/currency.rb +15 -7
- data/lib/xero-ruby/models/accounting/currency_code.rb +1 -2
- data/lib/xero-ruby/models/accounting/element.rb +15 -7
- data/lib/xero-ruby/models/accounting/employee.rb +15 -7
- data/lib/xero-ruby/models/accounting/employees.rb +15 -7
- data/lib/xero-ruby/models/accounting/error.rb +15 -7
- data/lib/xero-ruby/models/accounting/expense_claim.rb +15 -7
- data/lib/xero-ruby/models/accounting/expense_claims.rb +15 -7
- data/lib/xero-ruby/models/accounting/external_link.rb +15 -7
- data/lib/xero-ruby/models/accounting/history_record.rb +15 -7
- data/lib/xero-ruby/models/accounting/history_records.rb +15 -7
- data/lib/xero-ruby/models/accounting/import_summary.rb +15 -7
- data/lib/xero-ruby/models/accounting/import_summary_accounts.rb +15 -7
- data/lib/xero-ruby/models/accounting/import_summary_object.rb +15 -7
- data/lib/xero-ruby/models/accounting/import_summary_organisation.rb +15 -7
- data/lib/xero-ruby/models/accounting/invoice.rb +15 -7
- data/lib/xero-ruby/models/accounting/invoice_reminder.rb +15 -7
- data/lib/xero-ruby/models/accounting/invoice_reminders.rb +15 -7
- data/lib/xero-ruby/models/accounting/invoices.rb +15 -7
- data/lib/xero-ruby/models/accounting/item.rb +15 -7
- data/lib/xero-ruby/models/accounting/items.rb +15 -7
- data/lib/xero-ruby/models/accounting/journal.rb +15 -7
- data/lib/xero-ruby/models/accounting/journal_line.rb +15 -7
- data/lib/xero-ruby/models/accounting/journals.rb +15 -7
- data/lib/xero-ruby/models/accounting/line_amount_types.rb +1 -2
- data/lib/xero-ruby/models/accounting/line_item.rb +15 -7
- data/lib/xero-ruby/models/accounting/line_item_tracking.rb +15 -7
- data/lib/xero-ruby/models/accounting/linked_transaction.rb +15 -7
- data/lib/xero-ruby/models/accounting/linked_transactions.rb +15 -7
- data/lib/xero-ruby/models/accounting/manual_journal.rb +15 -7
- data/lib/xero-ruby/models/accounting/manual_journal_line.rb +15 -7
- data/lib/xero-ruby/models/accounting/manual_journals.rb +15 -7
- data/lib/xero-ruby/models/accounting/online_invoice.rb +15 -7
- data/lib/xero-ruby/models/accounting/online_invoices.rb +15 -7
- data/lib/xero-ruby/models/accounting/organisation.rb +15 -9
- data/lib/xero-ruby/models/accounting/organisations.rb +15 -7
- data/lib/xero-ruby/models/accounting/overpayment.rb +15 -7
- data/lib/xero-ruby/models/accounting/overpayments.rb +15 -7
- data/lib/xero-ruby/models/accounting/payment.rb +26 -8
- data/lib/xero-ruby/models/accounting/payment_delete.rb +15 -7
- data/lib/xero-ruby/models/accounting/payment_service.rb +15 -7
- data/lib/xero-ruby/models/accounting/payment_services.rb +15 -7
- data/lib/xero-ruby/models/accounting/payment_term.rb +15 -7
- data/lib/xero-ruby/models/accounting/payment_term_type.rb +1 -2
- data/lib/xero-ruby/models/accounting/payments.rb +15 -7
- data/lib/xero-ruby/models/accounting/phone.rb +15 -7
- data/lib/xero-ruby/models/accounting/prepayment.rb +15 -7
- data/lib/xero-ruby/models/accounting/prepayments.rb +15 -7
- data/lib/xero-ruby/models/accounting/purchase.rb +15 -7
- data/lib/xero-ruby/models/accounting/purchase_order.rb +15 -7
- data/lib/xero-ruby/models/accounting/purchase_orders.rb +15 -7
- data/lib/xero-ruby/models/accounting/quote.rb +15 -7
- data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +1 -2
- data/lib/xero-ruby/models/accounting/quote_status_codes.rb +1 -2
- data/lib/xero-ruby/models/accounting/quotes.rb +15 -7
- data/lib/xero-ruby/models/accounting/receipt.rb +15 -7
- data/lib/xero-ruby/models/accounting/receipts.rb +15 -7
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +15 -7
- data/lib/xero-ruby/models/accounting/repeating_invoices.rb +15 -7
- data/lib/xero-ruby/models/accounting/report.rb +15 -7
- data/lib/xero-ruby/models/accounting/report_attribute.rb +15 -7
- data/lib/xero-ruby/models/accounting/report_cell.rb +15 -7
- data/lib/xero-ruby/models/accounting/report_fields.rb +15 -7
- data/lib/xero-ruby/models/accounting/report_row.rb +15 -7
- data/lib/xero-ruby/models/accounting/report_rows.rb +15 -7
- data/lib/xero-ruby/models/accounting/report_with_row.rb +15 -7
- data/lib/xero-ruby/models/accounting/report_with_rows.rb +15 -7
- data/lib/xero-ruby/models/accounting/reports.rb +15 -7
- data/lib/xero-ruby/models/accounting/request_empty.rb +15 -7
- data/lib/xero-ruby/models/accounting/row_type.rb +1 -2
- data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +15 -7
- data/lib/xero-ruby/models/accounting/schedule.rb +15 -7
- data/lib/xero-ruby/models/accounting/setup.rb +15 -7
- data/lib/xero-ruby/models/accounting/tax_component.rb +15 -7
- data/lib/xero-ruby/models/accounting/tax_rate.rb +15 -7
- data/lib/xero-ruby/models/accounting/tax_rates.rb +15 -7
- data/lib/xero-ruby/models/accounting/tax_type.rb +1 -2
- data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +15 -7
- data/lib/xero-ruby/models/accounting/time_zone.rb +1 -2
- data/lib/xero-ruby/models/accounting/tracking_categories.rb +15 -7
- data/lib/xero-ruby/models/accounting/tracking_category.rb +15 -7
- data/lib/xero-ruby/models/accounting/tracking_option.rb +15 -7
- data/lib/xero-ruby/models/accounting/tracking_options.rb +15 -7
- data/lib/xero-ruby/models/accounting/user.rb +15 -7
- data/lib/xero-ruby/models/accounting/users.rb +15 -7
- data/lib/xero-ruby/models/accounting/validation_error.rb +15 -7
- data/lib/xero-ruby/models/assets/asset.rb +15 -7
- data/lib/xero-ruby/models/assets/asset_status.rb +1 -2
- data/lib/xero-ruby/models/assets/asset_status_query_param.rb +1 -2
- data/lib/xero-ruby/models/assets/asset_type.rb +15 -7
- data/lib/xero-ruby/models/assets/assets.rb +15 -7
- data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +15 -7
- data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +15 -7
- data/lib/xero-ruby/models/assets/error.rb +15 -7
- data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +16 -8
- data/lib/xero-ruby/models/assets/pagination.rb +15 -7
- data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +16 -8
- data/lib/xero-ruby/models/assets/setting.rb +15 -7
- data/lib/xero-ruby/models/files/association.rb +15 -7
- data/lib/xero-ruby/models/files/file_object.rb +15 -7
- data/lib/xero-ruby/models/files/files.rb +15 -7
- data/lib/xero-ruby/models/files/folder.rb +15 -7
- data/lib/xero-ruby/models/files/folders.rb +15 -7
- data/lib/xero-ruby/models/files/inline_object.rb +15 -7
- data/lib/xero-ruby/models/files/object_group.rb +1 -2
- data/lib/xero-ruby/models/files/object_type.rb +1 -2
- data/lib/xero-ruby/models/files/user.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/account.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/account_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/allowance_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/api_exception.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/bank_account.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/calendar_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/deduction_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/deduction_type.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/deduction_type_calculation_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/earnings_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/earnings_rate_calculation_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/earnings_type.rb +2 -2
- data/lib/xero-ruby/models/payroll_au/employee.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/employee_status.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/employees.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/employment_basis.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/employment_termination_payment_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/entitlement_final_pay_payout_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/home_address.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_accrual_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_application.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_applications.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_balance.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/leave_lines.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_period.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/leave_type.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/leave_type_contribution_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/manual_tax_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/opening_balances.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/pay_item.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/pay_items.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/pay_run.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/pay_run_status.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/pay_runs.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/pay_template.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/payment_frequency_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/payroll_calendar.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/payroll_calendars.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/payslip.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/payslip_lines.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/payslip_object.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/payslip_summary.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/payslips.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/rate_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/reimbursement_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/reimbursement_lines.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/reimbursement_type.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/residency_status.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/settings.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/settings_object.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/settings_tracking_categories.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/settings_tracking_categories_employee_groups.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/settings_tracking_categories_timesheet_categories.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/state.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/super_fund.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/super_fund_product.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/super_fund_products.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/super_fund_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/super_funds.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/super_line.rb +16 -8
- data/lib/xero-ruby/models/payroll_au/super_membership.rb +16 -8
- data/lib/xero-ruby/models/payroll_au/superannuation_calculation_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/superannuation_contribution_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/superannuation_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/tax_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/tfn_exemption_type.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/timesheet.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/timesheet_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/timesheet_object.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/timesheet_status.rb +1 -2
- data/lib/xero-ruby/models/payroll_au/timesheets.rb +15 -7
- data/lib/xero-ruby/models/payroll_au/validation_error.rb +15 -7
- data/lib/xero-ruby/models/payroll_nz/account.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/accounts.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/address.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/bank_account.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/benefit.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/calendar_type.rb +0 -1
- data/lib/xero-ruby/models/payroll_nz/deduction.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/deduction_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/deduction_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/deductions.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/earnings_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_nz/earnings_order.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/earnings_order_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/earnings_orders.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/earnings_rate.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/earnings_rate_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/earnings_rates.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/earnings_template.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/earnings_template_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_earnings_templates.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave_balance.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave_balances.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave_setup_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave_type_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave_types.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leaves.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_opening_balance.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_opening_balances_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_pay_template.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_pay_template_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_pay_templates.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_summary.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leaves_summaries.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leave.rb +15 -7
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leave_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_sick_leaves.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_tax.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employee_tax_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employees.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employment.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/employment_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/gross_earnings_history.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/invalid_field.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/leave_accrual_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/leave_earnings_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_nz/leave_period.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/leave_periods.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/leave_type.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/leave_type_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/leave_types.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pagination.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pay_run.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pay_run_calendar.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pay_run_calendar_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pay_run_calendars.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pay_run_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pay_runs.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pay_slip.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pay_slip_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/pay_slips.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/payment_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/payment_method.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/payment_method_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/problem.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/reimbursement.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/reimbursement_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/reimbursement_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/reimbursements.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/salary_and_wage_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/salary_and_wages.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/settings.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/statutory_deduction.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/statutory_deduction_category.rb +0 -1
- data/lib/xero-ruby/models/payroll_nz/statutory_deduction_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/statutory_deduction_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/statutory_deductions.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/superannuation_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_nz/superannuation_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/superannuations.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/tax_code.rb +0 -1
- data/lib/xero-ruby/models/payroll_nz/tax_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/tax_settings.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/timesheet.rb +15 -7
- data/lib/xero-ruby/models/payroll_nz/timesheet_earnings_line.rb +15 -7
- data/lib/xero-ruby/models/payroll_nz/timesheet_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/timesheet_line_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/timesheet_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/timesheets.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/tracking_categories.rb +14 -6
- data/lib/xero-ruby/models/payroll_nz/tracking_category.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/account.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/accounts.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/address.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/bank_account.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/benefit.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/benefit_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/benefit_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/benefits.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/court_order_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/deduction.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/deduction_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/deduction_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/deductions.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/earnings_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/earnings_order.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/earnings_order_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/earnings_orders.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/earnings_rate_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/earnings_rates.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/earnings_template.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/earnings_template_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_leave.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_leave_balance.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_leave_balances.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_leave_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_leave_type.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_leave_type_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_leave_types.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_leaves.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_opening_balances.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_opening_balances_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_pay_template.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_pay_template_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_pay_templates.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_summary.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leaves_summaries.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leave.rb +15 -7
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leave_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_sick_leaves.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_tax.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employee_tax_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employees.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employment.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/employment_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/invalid_field.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/leave_accrual_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/leave_earnings_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/leave_period.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/leave_periods.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/leave_type.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/leave_type_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/leave_types.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/pagination.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/pay_run.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/pay_run_calendar.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/pay_run_calendar_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/pay_run_calendars.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/pay_run_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/pay_runs.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/payment_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/payment_method.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/payment_method_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/payslip.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/payslip_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/payslips.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/problem.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/reimbursement.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/reimbursement_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/reimbursement_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/reimbursements.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/salary_and_wage.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/salary_and_wage_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/salary_and_wages.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/settings.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/statutory_deduction.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/statutory_deduction_category.rb +0 -1
- data/lib/xero-ruby/models/payroll_uk/tax_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/timesheet.rb +15 -7
- data/lib/xero-ruby/models/payroll_uk/timesheet_earnings_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/timesheet_line.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/timesheet_line_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/timesheet_object.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/timesheets.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/tracking_categories.rb +14 -6
- data/lib/xero-ruby/models/payroll_uk/tracking_category.rb +14 -6
- data/lib/xero-ruby/models/projects/amount.rb +14 -6
- data/lib/xero-ruby/models/projects/charge_type.rb +0 -1
- data/lib/xero-ruby/models/projects/currency_code.rb +0 -1
- data/lib/xero-ruby/models/projects/error.rb +14 -6
- data/lib/xero-ruby/models/projects/pagination.rb +14 -6
- data/lib/xero-ruby/models/projects/project.rb +14 -6
- data/lib/xero-ruby/models/projects/project_create_or_update.rb +14 -6
- data/lib/xero-ruby/models/projects/project_patch.rb +14 -6
- data/lib/xero-ruby/models/projects/project_status.rb +0 -1
- data/lib/xero-ruby/models/projects/project_user.rb +14 -6
- data/lib/xero-ruby/models/projects/project_users.rb +14 -6
- data/lib/xero-ruby/models/projects/projects.rb +14 -6
- data/lib/xero-ruby/models/projects/task.rb +14 -6
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +14 -6
- data/lib/xero-ruby/models/projects/tasks.rb +14 -6
- data/lib/xero-ruby/models/projects/time_entries.rb +14 -6
- data/lib/xero-ruby/models/projects/time_entry.rb +14 -6
- data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +14 -6
- data/lib/xero-ruby/string_serialization.rb +52 -0
- data/lib/xero-ruby/version.rb +3 -3
- data/lib/xero-ruby/where.rb +65 -0
- data/spec/api_client_spec.rb +101 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/helper_methods_spec.rb +82 -0
- data/spec/where_spec.rb +82 -0
- metadata +12 -456
- data/CODE_OF_CONDUCT.md +0 -76
- data/CONTRIBUTING.md +0 -82
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -68
- data/LICENSE +0 -21
- data/Rakefile +0 -10
- data/build_notes.md +0 -52
- data/docs/accounting/Account.md +0 -55
- data/docs/accounting/AccountType.md +0 -16
- data/docs/accounting/AccountingApi.md +0 -15310
- data/docs/accounting/Accounts.md +0 -17
- data/docs/accounting/AccountsPayable.md +0 -19
- data/docs/accounting/AccountsReceivable.md +0 -19
- data/docs/accounting/Action.md +0 -19
- data/docs/accounting/Actions.md +0 -17
- data/docs/accounting/Address.md +0 -35
- data/docs/accounting/AddressForOrganisation.md +0 -35
- data/docs/accounting/Allocation.md +0 -31
- data/docs/accounting/Allocations.md +0 -17
- data/docs/accounting/Attachment.md +0 -27
- data/docs/accounting/Attachments.md +0 -17
- data/docs/accounting/BalanceDetails.md +0 -21
- data/docs/accounting/Balances.md +0 -19
- data/docs/accounting/BankTransaction.md +0 -59
- data/docs/accounting/BankTransactions.md +0 -17
- data/docs/accounting/BankTransfer.md +0 -37
- data/docs/accounting/BankTransfers.md +0 -17
- data/docs/accounting/BatchPayment.md +0 -47
- data/docs/accounting/BatchPaymentDetails.md +0 -25
- data/docs/accounting/BatchPayments.md +0 -17
- data/docs/accounting/Bill.md +0 -19
- data/docs/accounting/BrandingTheme.md +0 -27
- data/docs/accounting/BrandingThemes.md +0 -17
- data/docs/accounting/CISOrgSetting.md +0 -21
- data/docs/accounting/CISSetting.md +0 -19
- data/docs/accounting/CISSettings.md +0 -17
- data/docs/accounting/Contact.md +0 -93
- data/docs/accounting/ContactGroup.md +0 -23
- data/docs/accounting/ContactGroups.md +0 -17
- data/docs/accounting/ContactPerson.md +0 -23
- data/docs/accounting/Contacts.md +0 -17
- data/docs/accounting/ConversionBalances.md +0 -21
- data/docs/accounting/ConversionDate.md +0 -19
- data/docs/accounting/CountryCode.md +0 -16
- data/docs/accounting/CreditNote.md +0 -73
- data/docs/accounting/CreditNotes.md +0 -17
- data/docs/accounting/Currencies.md +0 -17
- data/docs/accounting/Currency.md +0 -19
- data/docs/accounting/CurrencyCode.md +0 -16
- data/docs/accounting/Element.md +0 -31
- data/docs/accounting/Employee.md +0 -31
- data/docs/accounting/Employees.md +0 -17
- data/docs/accounting/Error.md +0 -23
- data/docs/accounting/ExpenseClaim.md +0 -39
- data/docs/accounting/ExpenseClaims.md +0 -17
- data/docs/accounting/ExternalLink.md +0 -21
- data/docs/accounting/HistoryRecord.md +0 -23
- data/docs/accounting/HistoryRecords.md +0 -17
- data/docs/accounting/ImportSummary.md +0 -19
- data/docs/accounting/ImportSummaryAccounts.md +0 -33
- data/docs/accounting/ImportSummaryObject.md +0 -17
- data/docs/accounting/ImportSummaryOrganisation.md +0 -17
- data/docs/accounting/Invoice.md +0 -95
- data/docs/accounting/InvoiceReminder.md +0 -17
- data/docs/accounting/InvoiceReminders.md +0 -17
- data/docs/accounting/Invoices.md +0 -17
- data/docs/accounting/Item.md +0 -47
- data/docs/accounting/Items.md +0 -17
- data/docs/accounting/Journal.md +0 -31
- data/docs/accounting/JournalLine.md +0 -39
- data/docs/accounting/Journals.md +0 -17
- data/docs/accounting/LineAmountTypes.md +0 -16
- data/docs/accounting/LineItem.md +0 -41
- data/docs/accounting/LineItemTracking.md +0 -23
- data/docs/accounting/LinkedTransaction.md +0 -37
- data/docs/accounting/LinkedTransactions.md +0 -17
- data/docs/accounting/ManualJournal.md +0 -43
- data/docs/accounting/ManualJournalLine.md +0 -31
- data/docs/accounting/ManualJournals.md +0 -17
- data/docs/accounting/OnlineInvoice.md +0 -17
- data/docs/accounting/OnlineInvoices.md +0 -17
- data/docs/accounting/Organisation.md +0 -81
- data/docs/accounting/Organisations.md +0 -17
- data/docs/accounting/Overpayment.md +0 -53
- data/docs/accounting/Overpayments.md +0 -17
- data/docs/accounting/Payment.md +0 -63
- data/docs/accounting/PaymentDelete.md +0 -17
- data/docs/accounting/PaymentService.md +0 -27
- data/docs/accounting/PaymentServices.md +0 -17
- data/docs/accounting/PaymentTerm.md +0 -19
- data/docs/accounting/PaymentTermType.md +0 -16
- data/docs/accounting/Payments.md +0 -17
- data/docs/accounting/Phone.md +0 -23
- data/docs/accounting/Prepayment.md +0 -53
- data/docs/accounting/Prepayments.md +0 -17
- data/docs/accounting/Purchase.md +0 -23
- data/docs/accounting/PurchaseOrder.md +0 -71
- data/docs/accounting/PurchaseOrders.md +0 -17
- data/docs/accounting/Quote.md +0 -63
- data/docs/accounting/QuoteLineAmountTypes.md +0 -16
- data/docs/accounting/QuoteStatusCodes.md +0 -16
- data/docs/accounting/Quotes.md +0 -17
- data/docs/accounting/Receipt.md +0 -51
- data/docs/accounting/Receipts.md +0 -17
- data/docs/accounting/RepeatingInvoice.md +0 -47
- data/docs/accounting/RepeatingInvoices.md +0 -17
- data/docs/accounting/Report.md +0 -29
- data/docs/accounting/ReportAttribute.md +0 -19
- data/docs/accounting/ReportCell.md +0 -19
- data/docs/accounting/ReportFields.md +0 -21
- data/docs/accounting/ReportRow.md +0 -21
- data/docs/accounting/ReportRows.md +0 -23
- data/docs/accounting/ReportWithRow.md +0 -33
- data/docs/accounting/ReportWithRows.md +0 -17
- data/docs/accounting/Reports.md +0 -17
- data/docs/accounting/RequestEmpty.md +0 -17
- data/docs/accounting/RowType.md +0 -16
- data/docs/accounting/SalesTrackingCategory.md +0 -19
- data/docs/accounting/Schedule.md +0 -29
- data/docs/accounting/Setup.md +0 -21
- data/docs/accounting/TaxComponent.md +0 -23
- data/docs/accounting/TaxRate.md +0 -39
- data/docs/accounting/TaxRates.md +0 -17
- data/docs/accounting/TaxType.md +0 -16
- data/docs/accounting/TenNinetyNineContact.md +0 -59
- data/docs/accounting/TimeZone.md +0 -16
- data/docs/accounting/TrackingCategories.md +0 -17
- data/docs/accounting/TrackingCategory.md +0 -27
- data/docs/accounting/TrackingOption.md +0 -23
- data/docs/accounting/TrackingOptions.md +0 -17
- data/docs/accounting/User.md +0 -29
- data/docs/accounting/Users.md +0 -17
- data/docs/accounting/ValidationError.md +0 -17
- data/docs/assets/Asset.md +0 -47
- data/docs/assets/AssetApi.md +0 -426
- data/docs/assets/AssetStatus.md +0 -16
- data/docs/assets/AssetStatusQueryParam.md +0 -16
- data/docs/assets/AssetType.md +0 -29
- data/docs/assets/Assets.md +0 -19
- data/docs/assets/BookDepreciationDetail.md +0 -29
- data/docs/assets/BookDepreciationSetting.md +0 -31
- data/docs/assets/Error.md +0 -25
- data/docs/assets/FieldValidationErrorsElement.md +0 -27
- data/docs/assets/Pagination.md +0 -23
- data/docs/assets/ResourceValidationErrorsElement.md +0 -25
- data/docs/assets/Setting.md +0 -31
- data/docs/files/Association.md +0 -23
- data/docs/files/FileObject.md +0 -31
- data/docs/files/FileResponse204.md +0 -17
- data/docs/files/Files.md +0 -23
- data/docs/files/FilesApi.md +0 -1116
- data/docs/files/Folder.md +0 -25
- data/docs/files/Folders.md +0 -17
- data/docs/files/InlineObject.md +0 -23
- data/docs/files/ObjectGroup.md +0 -16
- data/docs/files/ObjectType.md +0 -16
- data/docs/files/User.md +0 -25
- data/docs/payroll_au/APIException.md +0 -21
- data/docs/payroll_au/Account.md +0 -23
- data/docs/payroll_au/AccountType.md +0 -16
- data/docs/payroll_au/AllowanceType.md +0 -16
- data/docs/payroll_au/BankAccount.md +0 -27
- data/docs/payroll_au/CalendarType.md +0 -16
- data/docs/payroll_au/DeductionLine.md +0 -25
- data/docs/payroll_au/DeductionType.md +0 -33
- data/docs/payroll_au/DeductionTypeCalculationType.md +0 -16
- data/docs/payroll_au/EarningsLine.md +0 -33
- data/docs/payroll_au/EarningsRate.md +0 -49
- data/docs/payroll_au/EarningsRateCalculationType.md +0 -16
- data/docs/payroll_au/EarningsType.md +0 -16
- data/docs/payroll_au/Employee.md +0 -77
- data/docs/payroll_au/EmployeeStatus.md +0 -16
- data/docs/payroll_au/Employees.md +0 -17
- data/docs/payroll_au/EmploymentBasis.md +0 -16
- data/docs/payroll_au/EmploymentTerminationPaymentType.md +0 -16
- data/docs/payroll_au/EntitlementFinalPayPayoutType.md +0 -16
- data/docs/payroll_au/HomeAddress.md +0 -27
- data/docs/payroll_au/LeaveAccrualLine.md +0 -21
- data/docs/payroll_au/LeaveApplication.md +0 -35
- data/docs/payroll_au/LeaveApplications.md +0 -17
- data/docs/payroll_au/LeaveBalance.md +0 -23
- data/docs/payroll_au/LeaveEarningsLine.md +0 -21
- data/docs/payroll_au/LeaveLine.md +0 -31
- data/docs/payroll_au/LeaveLineCalculationType.md +0 -16
- data/docs/payroll_au/LeaveLines.md +0 -17
- data/docs/payroll_au/LeavePeriod.md +0 -23
- data/docs/payroll_au/LeavePeriodStatus.md +0 -16
- data/docs/payroll_au/LeaveType.md +0 -33
- data/docs/payroll_au/LeaveTypeContributionType.md +0 -16
- data/docs/payroll_au/ManualTaxType.md +0 -16
- data/docs/payroll_au/OpeningBalances.md +0 -29
- data/docs/payroll_au/PayItem.md +0 -23
- data/docs/payroll_au/PayItems.md +0 -17
- data/docs/payroll_au/PayRun.md +0 -47
- data/docs/payroll_au/PayRunStatus.md +0 -16
- data/docs/payroll_au/PayRuns.md +0 -17
- data/docs/payroll_au/PayTemplate.md +0 -25
- data/docs/payroll_au/PaymentFrequencyType.md +0 -16
- data/docs/payroll_au/PayrollAuApi.md +0 -2018
- data/docs/payroll_au/PayrollCalendar.md +0 -29
- data/docs/payroll_au/PayrollCalendars.md +0 -17
- data/docs/payroll_au/Payslip.md +0 -53
- data/docs/payroll_au/PayslipLines.md +0 -31
- data/docs/payroll_au/PayslipObject.md +0 -17
- data/docs/payroll_au/PayslipSummary.md +0 -39
- data/docs/payroll_au/Payslips.md +0 -17
- data/docs/payroll_au/RateType.md +0 -16
- data/docs/payroll_au/ReimbursementLine.md +0 -23
- data/docs/payroll_au/ReimbursementLines.md +0 -17
- data/docs/payroll_au/ReimbursementType.md +0 -25
- data/docs/payroll_au/ResidencyStatus.md +0 -16
- data/docs/payroll_au/Settings.md +0 -21
- data/docs/payroll_au/SettingsObject.md +0 -17
- data/docs/payroll_au/SettingsTrackingCategories.md +0 -19
- data/docs/payroll_au/SettingsTrackingCategoriesEmployeeGroups.md +0 -19
- data/docs/payroll_au/SettingsTrackingCategoriesTimesheetCategories.md +0 -19
- data/docs/payroll_au/State.md +0 -16
- data/docs/payroll_au/SuperFund.md +0 -41
- data/docs/payroll_au/SuperFundProduct.md +0 -23
- data/docs/payroll_au/SuperFundProducts.md +0 -17
- data/docs/payroll_au/SuperFundType.md +0 -16
- data/docs/payroll_au/SuperFunds.md +0 -17
- data/docs/payroll_au/SuperLine.md +0 -31
- data/docs/payroll_au/SuperMembership.md +0 -21
- data/docs/payroll_au/SuperannuationCalculationType.md +0 -16
- data/docs/payroll_au/SuperannuationContributionType.md +0 -16
- data/docs/payroll_au/SuperannuationLine.md +0 -33
- data/docs/payroll_au/TFNExemptionType.md +0 -16
- data/docs/payroll_au/TaxDeclaration.md +0 -47
- data/docs/payroll_au/TaxLine.md +0 -27
- data/docs/payroll_au/Timesheet.md +0 -33
- data/docs/payroll_au/TimesheetLine.md +0 -23
- data/docs/payroll_au/TimesheetObject.md +0 -17
- data/docs/payroll_au/TimesheetStatus.md +0 -16
- data/docs/payroll_au/Timesheets.md +0 -17
- data/docs/payroll_au/ValidationError.md +0 -17
- data/docs/payroll_nz/Account.md +0 -23
- data/docs/payroll_nz/Accounts.md +0 -17
- data/docs/payroll_nz/Address.md +0 -27
- data/docs/payroll_nz/BankAccount.md +0 -31
- data/docs/payroll_nz/Benefit.md +0 -35
- data/docs/payroll_nz/CalendarType.md +0 -16
- data/docs/payroll_nz/Deduction.md +0 -27
- data/docs/payroll_nz/DeductionLine.md +0 -25
- data/docs/payroll_nz/DeductionObject.md +0 -21
- data/docs/payroll_nz/Deductions.md +0 -21
- data/docs/payroll_nz/EarningsLine.md +0 -35
- data/docs/payroll_nz/EarningsOrder.md +0 -25
- data/docs/payroll_nz/EarningsOrderObject.md +0 -21
- data/docs/payroll_nz/EarningsOrders.md +0 -21
- data/docs/payroll_nz/EarningsRate.md +0 -35
- data/docs/payroll_nz/EarningsRateObject.md +0 -21
- data/docs/payroll_nz/EarningsRates.md +0 -21
- data/docs/payroll_nz/EarningsTemplate.md +0 -27
- data/docs/payroll_nz/EarningsTemplateObject.md +0 -21
- data/docs/payroll_nz/Employee.md +0 -43
- data/docs/payroll_nz/EmployeeEarningsTemplates.md +0 -21
- data/docs/payroll_nz/EmployeeLeave.md +0 -29
- data/docs/payroll_nz/EmployeeLeaveBalance.md +0 -23
- data/docs/payroll_nz/EmployeeLeaveBalances.md +0 -21
- data/docs/payroll_nz/EmployeeLeaveObject.md +0 -21
- data/docs/payroll_nz/EmployeeLeaveSetup.md +0 -29
- data/docs/payroll_nz/EmployeeLeaveSetupObject.md +0 -21
- data/docs/payroll_nz/EmployeeLeaveType.md +0 -35
- data/docs/payroll_nz/EmployeeLeaveTypeObject.md +0 -21
- data/docs/payroll_nz/EmployeeLeaveTypes.md +0 -21
- data/docs/payroll_nz/EmployeeLeaves.md +0 -21
- data/docs/payroll_nz/EmployeeObject.md +0 -21
- data/docs/payroll_nz/EmployeeOpeningBalance.md +0 -23
- data/docs/payroll_nz/EmployeeOpeningBalancesObject.md +0 -21
- data/docs/payroll_nz/EmployeePayTemplate.md +0 -19
- data/docs/payroll_nz/EmployeePayTemplateObject.md +0 -21
- data/docs/payroll_nz/EmployeePayTemplates.md +0 -21
- data/docs/payroll_nz/EmployeeStatutoryLeaveBalance.md +0 -21
- data/docs/payroll_nz/EmployeeStatutoryLeaveBalanceObject.md +0 -21
- data/docs/payroll_nz/EmployeeStatutoryLeaveSummary.md +0 -29
- data/docs/payroll_nz/EmployeeStatutoryLeavesSummaries.md +0 -21
- data/docs/payroll_nz/EmployeeStatutorySickLeave.md +0 -47
- data/docs/payroll_nz/EmployeeStatutorySickLeaveObject.md +0 -21
- data/docs/payroll_nz/EmployeeStatutorySickLeaves.md +0 -21
- data/docs/payroll_nz/EmployeeTax.md +0 -47
- data/docs/payroll_nz/EmployeeTaxObject.md +0 -21
- data/docs/payroll_nz/Employees.md +0 -21
- data/docs/payroll_nz/Employment.md +0 -21
- data/docs/payroll_nz/EmploymentObject.md +0 -21
- data/docs/payroll_nz/GrossEarningsHistory.md +0 -19
- data/docs/payroll_nz/InvalidField.md +0 -19
- data/docs/payroll_nz/LeaveAccrualLine.md +0 -19
- data/docs/payroll_nz/LeaveEarningsLine.md +0 -35
- data/docs/payroll_nz/LeavePeriod.md +0 -23
- data/docs/payroll_nz/LeavePeriods.md +0 -21
- data/docs/payroll_nz/LeaveType.md +0 -27
- data/docs/payroll_nz/LeaveTypeObject.md +0 -21
- data/docs/payroll_nz/LeaveTypes.md +0 -21
- data/docs/payroll_nz/Pagination.md +0 -23
- data/docs/payroll_nz/PayRun.md +0 -39
- data/docs/payroll_nz/PayRunCalendar.md +0 -29
- data/docs/payroll_nz/PayRunCalendarObject.md +0 -21
- data/docs/payroll_nz/PayRunCalendars.md +0 -21
- data/docs/payroll_nz/PayRunObject.md +0 -21
- data/docs/payroll_nz/PayRuns.md +0 -21
- data/docs/payroll_nz/PaySlip.md +0 -75
- data/docs/payroll_nz/PaySlipObject.md +0 -21
- data/docs/payroll_nz/PaySlips.md +0 -21
- data/docs/payroll_nz/PaymentLine.md +0 -25
- data/docs/payroll_nz/PaymentMethod.md +0 -19
- data/docs/payroll_nz/PaymentMethodObject.md +0 -21
- data/docs/payroll_nz/PayrollNzApi.md +0 -4544
- data/docs/payroll_nz/Problem.md +0 -27
- data/docs/payroll_nz/Reimbursement.md +0 -33
- data/docs/payroll_nz/ReimbursementLine.md +0 -25
- data/docs/payroll_nz/ReimbursementObject.md +0 -21
- data/docs/payroll_nz/Reimbursements.md +0 -21
- data/docs/payroll_nz/SalaryAndWage.md +0 -35
- data/docs/payroll_nz/SalaryAndWageObject.md +0 -21
- data/docs/payroll_nz/SalaryAndWages.md +0 -21
- data/docs/payroll_nz/Settings.md +0 -21
- data/docs/payroll_nz/StatutoryDeduction.md +0 -25
- data/docs/payroll_nz/StatutoryDeductionCategory.md +0 -16
- data/docs/payroll_nz/StatutoryDeductionLine.md +0 -23
- data/docs/payroll_nz/StatutoryDeductionObject.md +0 -21
- data/docs/payroll_nz/StatutoryDeductions.md +0 -21
- data/docs/payroll_nz/SuperannuationLine.md +0 -27
- data/docs/payroll_nz/SuperannuationObject.md +0 -21
- data/docs/payroll_nz/Superannuations.md +0 -21
- data/docs/payroll_nz/TaxCode.md +0 -16
- data/docs/payroll_nz/TaxLine.md +0 -25
- data/docs/payroll_nz/TaxSettings.md +0 -27
- data/docs/payroll_nz/Timesheet.md +0 -33
- data/docs/payroll_nz/TimesheetEarningsLine.md +0 -35
- data/docs/payroll_nz/TimesheetLine.md +0 -25
- data/docs/payroll_nz/TimesheetLineObject.md +0 -21
- data/docs/payroll_nz/TimesheetObject.md +0 -21
- data/docs/payroll_nz/Timesheets.md +0 -21
- data/docs/payroll_nz/TrackingCategories.md +0 -21
- data/docs/payroll_nz/TrackingCategory.md +0 -19
- data/docs/payroll_uk/Account.md +0 -23
- data/docs/payroll_uk/Accounts.md +0 -17
- data/docs/payroll_uk/Address.md +0 -25
- data/docs/payroll_uk/BankAccount.md +0 -21
- data/docs/payroll_uk/Benefit.md +0 -43
- data/docs/payroll_uk/BenefitLine.md +0 -25
- data/docs/payroll_uk/BenefitObject.md +0 -21
- data/docs/payroll_uk/Benefits.md +0 -21
- data/docs/payroll_uk/CourtOrderLine.md +0 -19
- data/docs/payroll_uk/Deduction.md +0 -47
- data/docs/payroll_uk/DeductionLine.md +0 -23
- data/docs/payroll_uk/DeductionObject.md +0 -21
- data/docs/payroll_uk/Deductions.md +0 -21
- data/docs/payroll_uk/EarningsLine.md +0 -33
- data/docs/payroll_uk/EarningsOrder.md +0 -25
- data/docs/payroll_uk/EarningsOrderObject.md +0 -21
- data/docs/payroll_uk/EarningsOrders.md +0 -21
- data/docs/payroll_uk/EarningsRate.md +0 -35
- data/docs/payroll_uk/EarningsRateObject.md +0 -21
- data/docs/payroll_uk/EarningsRates.md +0 -21
- data/docs/payroll_uk/EarningsTemplate.md +0 -27
- data/docs/payroll_uk/EarningsTemplateObject.md +0 -21
- data/docs/payroll_uk/Employee.md +0 -45
- data/docs/payroll_uk/EmployeeLeave.md +0 -29
- data/docs/payroll_uk/EmployeeLeaveBalance.md +0 -23
- data/docs/payroll_uk/EmployeeLeaveBalances.md +0 -21
- data/docs/payroll_uk/EmployeeLeaveObject.md +0 -21
- data/docs/payroll_uk/EmployeeLeaveType.md +0 -27
- data/docs/payroll_uk/EmployeeLeaveTypeObject.md +0 -21
- data/docs/payroll_uk/EmployeeLeaveTypes.md +0 -21
- data/docs/payroll_uk/EmployeeLeaves.md +0 -21
- data/docs/payroll_uk/EmployeeObject.md +0 -21
- data/docs/payroll_uk/EmployeeOpeningBalances.md +0 -27
- data/docs/payroll_uk/EmployeeOpeningBalancesObject.md +0 -21
- data/docs/payroll_uk/EmployeePayTemplate.md +0 -19
- data/docs/payroll_uk/EmployeePayTemplateObject.md +0 -21
- data/docs/payroll_uk/EmployeePayTemplates.md +0 -21
- data/docs/payroll_uk/EmployeeStatutoryLeaveBalance.md +0 -21
- data/docs/payroll_uk/EmployeeStatutoryLeaveBalanceObject.md +0 -21
- data/docs/payroll_uk/EmployeeStatutoryLeaveSummary.md +0 -29
- data/docs/payroll_uk/EmployeeStatutoryLeavesSummaries.md +0 -21
- data/docs/payroll_uk/EmployeeStatutorySickLeave.md +0 -47
- data/docs/payroll_uk/EmployeeStatutorySickLeaveObject.md +0 -21
- data/docs/payroll_uk/EmployeeStatutorySickLeaves.md +0 -21
- data/docs/payroll_uk/EmployeeTax.md +0 -37
- data/docs/payroll_uk/EmployeeTaxObject.md +0 -21
- data/docs/payroll_uk/Employees.md +0 -21
- data/docs/payroll_uk/Employment.md +0 -23
- data/docs/payroll_uk/EmploymentObject.md +0 -21
- data/docs/payroll_uk/InvalidField.md +0 -19
- data/docs/payroll_uk/LeaveAccrualLine.md +0 -19
- data/docs/payroll_uk/LeaveEarningsLine.md +0 -27
- data/docs/payroll_uk/LeavePeriod.md +0 -23
- data/docs/payroll_uk/LeavePeriods.md +0 -21
- data/docs/payroll_uk/LeaveType.md +0 -31
- data/docs/payroll_uk/LeaveTypeObject.md +0 -21
- data/docs/payroll_uk/LeaveTypes.md +0 -21
- data/docs/payroll_uk/Pagination.md +0 -23
- data/docs/payroll_uk/PayRun.md +0 -39
- data/docs/payroll_uk/PayRunCalendar.md +0 -29
- data/docs/payroll_uk/PayRunCalendarObject.md +0 -21
- data/docs/payroll_uk/PayRunCalendars.md +0 -21
- data/docs/payroll_uk/PayRunObject.md +0 -21
- data/docs/payroll_uk/PayRuns.md +0 -21
- data/docs/payroll_uk/PaymentLine.md +0 -25
- data/docs/payroll_uk/PaymentMethod.md +0 -19
- data/docs/payroll_uk/PaymentMethodObject.md +0 -21
- data/docs/payroll_uk/PayrollUkApi.md +0 -4683
- data/docs/payroll_uk/Payslip.md +0 -71
- data/docs/payroll_uk/PayslipObject.md +0 -21
- data/docs/payroll_uk/Payslips.md +0 -21
- data/docs/payroll_uk/Problem.md +0 -27
- data/docs/payroll_uk/Reimbursement.md +0 -23
- data/docs/payroll_uk/ReimbursementLine.md +0 -21
- data/docs/payroll_uk/ReimbursementObject.md +0 -21
- data/docs/payroll_uk/Reimbursements.md +0 -21
- data/docs/payroll_uk/SalaryAndWage.md +0 -33
- data/docs/payroll_uk/SalaryAndWageObject.md +0 -21
- data/docs/payroll_uk/SalaryAndWages.md +0 -21
- data/docs/payroll_uk/Settings.md +0 -21
- data/docs/payroll_uk/StatutoryDeduction.md +0 -25
- data/docs/payroll_uk/StatutoryDeductionCategory.md +0 -16
- data/docs/payroll_uk/TaxLine.md +0 -27
- data/docs/payroll_uk/Timesheet.md +0 -33
- data/docs/payroll_uk/TimesheetEarningsLine.md +0 -27
- data/docs/payroll_uk/TimesheetLine.md +0 -25
- data/docs/payroll_uk/TimesheetLineObject.md +0 -21
- data/docs/payroll_uk/TimesheetObject.md +0 -21
- data/docs/payroll_uk/Timesheets.md +0 -21
- data/docs/payroll_uk/TrackingCategories.md +0 -21
- data/docs/payroll_uk/TrackingCategory.md +0 -19
- data/docs/projects/Amount.md +0 -19
- data/docs/projects/ChargeType.md +0 -16
- data/docs/projects/CurrencyCode.md +0 -16
- data/docs/projects/Error.md +0 -19
- data/docs/projects/Pagination.md +0 -23
- data/docs/projects/Project.md +0 -59
- data/docs/projects/ProjectApi.md +0 -956
- data/docs/projects/ProjectCreateOrUpdate.md +0 -23
- data/docs/projects/ProjectPatch.md +0 -17
- data/docs/projects/ProjectStatus.md +0 -16
- data/docs/projects/ProjectUser.md +0 -21
- data/docs/projects/ProjectUsers.md +0 -19
- data/docs/projects/Projects.md +0 -19
- data/docs/projects/Task.md +0 -45
- data/docs/projects/TaskCreateOrUpdate.md +0 -23
- data/docs/projects/Tasks.md +0 -19
- data/docs/projects/TimeEntries.md +0 -19
- data/docs/projects/TimeEntry.md +0 -33
- data/docs/projects/TimeEntryCreateOrUpdate.md +0 -25
- data/git_push.sh +0 -55
- data/spec/files/models/file_response204_spec.rb +0 -41
- data/xero-ruby.gemspec +0 -38
@@ -3,7 +3,6 @@
|
|
3
3
|
|
4
4
|
#This is the Xero Projects API
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.8.0
|
7
6
|
Contact: api@xero.com
|
8
7
|
Generated by: https://openapi-generator.tech
|
9
8
|
OpenAPI Generator version: 4.3.1
|
@@ -17,7 +16,7 @@ module XeroRuby
|
|
17
16
|
def initialize(api_client = ApiClient.new)
|
18
17
|
@api_client = api_client
|
19
18
|
end
|
20
|
-
#
|
19
|
+
# Create one or more new projects
|
21
20
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
22
21
|
# @param project_create_or_update [ProjectCreateOrUpdate] Create a new project with ProjectCreateOrUpdate object
|
23
22
|
# @param [Hash] opts the optional parameters
|
@@ -27,7 +26,7 @@ module XeroRuby
|
|
27
26
|
data
|
28
27
|
end
|
29
28
|
|
30
|
-
#
|
29
|
+
# Create one or more new projects
|
31
30
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
32
31
|
# @param project_create_or_update [ProjectCreateOrUpdate] Create a new project with ProjectCreateOrUpdate object
|
33
32
|
# @param [Hash] opts the optional parameters
|
@@ -45,7 +44,7 @@ module XeroRuby
|
|
45
44
|
fail ArgumentError, "Missing the required parameter 'project_create_or_update' when calling ProjectApi.create_project"
|
46
45
|
end
|
47
46
|
# resource path
|
48
|
-
local_var_path = '/
|
47
|
+
local_var_path = '/Projects'
|
49
48
|
|
50
49
|
# camelize keys of incoming `where` opts
|
51
50
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -93,7 +92,7 @@ module XeroRuby
|
|
93
92
|
return data, status_code, headers
|
94
93
|
end
|
95
94
|
|
96
|
-
#
|
95
|
+
# Creates a time entry for a specific project
|
97
96
|
# Allows you to create a specific task
|
98
97
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
99
98
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
@@ -105,7 +104,7 @@ module XeroRuby
|
|
105
104
|
data
|
106
105
|
end
|
107
106
|
|
108
|
-
#
|
107
|
+
# Creates a time entry for a specific project
|
109
108
|
# Allows you to create a specific task
|
110
109
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
111
110
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
@@ -129,7 +128,7 @@ module XeroRuby
|
|
129
128
|
fail ArgumentError, "Missing the required parameter 'time_entry_create_or_update' when calling ProjectApi.create_time_entry"
|
130
129
|
end
|
131
130
|
# resource path
|
132
|
-
local_var_path = '/
|
131
|
+
local_var_path = '/Projects/{projectId}/Time'.sub('{' + 'projectId' + '}', project_id.to_s)
|
133
132
|
|
134
133
|
# camelize keys of incoming `where` opts
|
135
134
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -177,7 +176,7 @@ module XeroRuby
|
|
177
176
|
return data, status_code, headers
|
178
177
|
end
|
179
178
|
|
180
|
-
#
|
179
|
+
# Deletes a time entry for a specific project
|
181
180
|
# Allows you to delete a specific time entry
|
182
181
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
183
182
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
@@ -189,7 +188,7 @@ module XeroRuby
|
|
189
188
|
nil
|
190
189
|
end
|
191
190
|
|
192
|
-
#
|
191
|
+
# Deletes a time entry for a specific project
|
193
192
|
# Allows you to delete a specific time entry
|
194
193
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
195
194
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
@@ -213,7 +212,7 @@ module XeroRuby
|
|
213
212
|
fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.delete_time_entry"
|
214
213
|
end
|
215
214
|
# resource path
|
216
|
-
local_var_path = '/
|
215
|
+
local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
217
216
|
|
218
217
|
# camelize keys of incoming `where` opts
|
219
218
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -257,8 +256,8 @@ module XeroRuby
|
|
257
256
|
return data, status_code, headers
|
258
257
|
end
|
259
258
|
|
260
|
-
#
|
261
|
-
# Allows you to retrieve a specific project
|
259
|
+
# Retrieves a single project
|
260
|
+
# Allows you to retrieve a specific project using the projectId
|
262
261
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
263
262
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
264
263
|
# @param [Hash] opts the optional parameters
|
@@ -268,8 +267,8 @@ module XeroRuby
|
|
268
267
|
data
|
269
268
|
end
|
270
269
|
|
271
|
-
#
|
272
|
-
# Allows you to retrieve a specific project
|
270
|
+
# Retrieves a single project
|
271
|
+
# Allows you to retrieve a specific project using the projectId
|
273
272
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
274
273
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
275
274
|
# @param [Hash] opts the optional parameters
|
@@ -287,7 +286,7 @@ module XeroRuby
|
|
287
286
|
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_project"
|
288
287
|
end
|
289
288
|
# resource path
|
290
|
-
local_var_path = '/
|
289
|
+
local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
291
290
|
|
292
291
|
# camelize keys of incoming `where` opts
|
293
292
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -333,7 +332,7 @@ module XeroRuby
|
|
333
332
|
return data, status_code, headers
|
334
333
|
end
|
335
334
|
|
336
|
-
# list all project users
|
335
|
+
# Retrieves a list of all project users
|
337
336
|
# Allows you to retrieve the users on a projects.
|
338
337
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
339
338
|
# @param [Hash] opts the optional parameters
|
@@ -345,7 +344,7 @@ module XeroRuby
|
|
345
344
|
data
|
346
345
|
end
|
347
346
|
|
348
|
-
# list all project users
|
347
|
+
# Retrieves a list of all project users
|
349
348
|
# Allows you to retrieve the users on a projects.
|
350
349
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
351
350
|
# @param [Hash] opts the optional parameters
|
@@ -369,7 +368,7 @@ module XeroRuby
|
|
369
368
|
end
|
370
369
|
|
371
370
|
# resource path
|
372
|
-
local_var_path = '/
|
371
|
+
local_var_path = '/ProjectsUsers'
|
373
372
|
|
374
373
|
# camelize keys of incoming `where` opts
|
375
374
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -417,7 +416,7 @@ module XeroRuby
|
|
417
416
|
return data, status_code, headers
|
418
417
|
end
|
419
418
|
|
420
|
-
#
|
419
|
+
# Retrieves all projects
|
421
420
|
# Allows you to retrieve, create and update projects.
|
422
421
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
423
422
|
# @param [Hash] opts the optional parameters
|
@@ -432,7 +431,7 @@ module XeroRuby
|
|
432
431
|
data
|
433
432
|
end
|
434
433
|
|
435
|
-
#
|
434
|
+
# Retrieves all projects
|
436
435
|
# Allows you to retrieve, create and update projects.
|
437
436
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
438
437
|
# @param [Hash] opts the optional parameters
|
@@ -459,7 +458,7 @@ module XeroRuby
|
|
459
458
|
end
|
460
459
|
|
461
460
|
# resource path
|
462
|
-
local_var_path = '/
|
461
|
+
local_var_path = '/Projects'
|
463
462
|
|
464
463
|
# camelize keys of incoming `where` opts
|
465
464
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -510,11 +509,11 @@ module XeroRuby
|
|
510
509
|
return data, status_code, headers
|
511
510
|
end
|
512
511
|
|
513
|
-
#
|
512
|
+
# Retrieves a single project task
|
514
513
|
# Allows you to retrieve a specific project
|
515
514
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
516
515
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
517
|
-
# @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{
|
516
|
+
# @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}
|
518
517
|
# @param [Hash] opts the optional parameters
|
519
518
|
# @return [Task]
|
520
519
|
def get_task(xero_tenant_id, project_id, task_id, opts = {})
|
@@ -522,11 +521,11 @@ module XeroRuby
|
|
522
521
|
data
|
523
522
|
end
|
524
523
|
|
525
|
-
#
|
524
|
+
# Retrieves a single project task
|
526
525
|
# Allows you to retrieve a specific project
|
527
526
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
528
527
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
529
|
-
# @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{
|
528
|
+
# @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}
|
530
529
|
# @param [Hash] opts the optional parameters
|
531
530
|
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
532
531
|
def get_task_with_http_info(xero_tenant_id, project_id, task_id, opts = {})
|
@@ -546,7 +545,7 @@ module XeroRuby
|
|
546
545
|
fail ArgumentError, "Missing the required parameter 'task_id' when calling ProjectApi.get_task"
|
547
546
|
end
|
548
547
|
# resource path
|
549
|
-
local_var_path = '/
|
548
|
+
local_var_path = '/Projects/{projectId}/Tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)
|
550
549
|
|
551
550
|
# camelize keys of incoming `where` opts
|
552
551
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -592,14 +591,14 @@ module XeroRuby
|
|
592
591
|
return data, status_code, headers
|
593
592
|
end
|
594
593
|
|
595
|
-
#
|
594
|
+
# Retrieves all project tasks
|
596
595
|
# Allows you to retrieve a specific project
|
597
596
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
598
597
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
599
598
|
# @param [Hash] opts the optional parameters
|
600
599
|
# @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.
|
601
600
|
# @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.
|
602
|
-
# @option opts [String] :task_ids taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={
|
601
|
+
# @option opts [String] :task_ids taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}
|
603
602
|
# @option opts [ChargeType] :charge_type
|
604
603
|
# @return [Tasks]
|
605
604
|
def get_tasks(xero_tenant_id, project_id, opts = {})
|
@@ -607,14 +606,14 @@ module XeroRuby
|
|
607
606
|
data
|
608
607
|
end
|
609
608
|
|
610
|
-
#
|
609
|
+
# Retrieves all project tasks
|
611
610
|
# Allows you to retrieve a specific project
|
612
611
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
613
612
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
614
613
|
# @param [Hash] opts the optional parameters
|
615
614
|
# @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.
|
616
615
|
# @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.
|
617
|
-
# @option opts [String] :task_ids taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={
|
616
|
+
# @option opts [String] :task_ids taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}
|
618
617
|
# @option opts [ChargeType] :charge_type
|
619
618
|
# @return [Array<(Tasks, Integer, Hash)>] Tasks data, response status code and response headers
|
620
619
|
def get_tasks_with_http_info(xero_tenant_id, project_id, opts = {})
|
@@ -630,7 +629,7 @@ module XeroRuby
|
|
630
629
|
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_tasks"
|
631
630
|
end
|
632
631
|
# resource path
|
633
|
-
local_var_path = '/
|
632
|
+
local_var_path = '/Projects/{projectId}/Tasks'.sub('{' + 'projectId' + '}', project_id.to_s)
|
634
633
|
|
635
634
|
# camelize keys of incoming `where` opts
|
636
635
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -680,7 +679,7 @@ module XeroRuby
|
|
680
679
|
return data, status_code, headers
|
681
680
|
end
|
682
681
|
|
683
|
-
#
|
682
|
+
# Retrieves all time entries associated with a specific project
|
684
683
|
# Allows you to retrieve the time entries associated with a specific project
|
685
684
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
686
685
|
# @param project_id [String] Identifier of the project, that the task (which the time entry is logged against) belongs to.
|
@@ -691,7 +690,7 @@ module XeroRuby
|
|
691
690
|
# @option opts [String] :contact_id Finds all time entries for this contact identifier.
|
692
691
|
# @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.
|
693
692
|
# @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.
|
694
|
-
# @option opts [Array<String>] :states Comma-separated list of states to find. Will find all time entries that are in the status of whatever
|
693
|
+
# @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.
|
695
694
|
# @option opts [Boolean] :is_chargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.
|
696
695
|
# @option opts [DateTime] :date_after_utc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.
|
697
696
|
# @option opts [DateTime] :date_before_utc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.
|
@@ -701,7 +700,7 @@ module XeroRuby
|
|
701
700
|
data
|
702
701
|
end
|
703
702
|
|
704
|
-
#
|
703
|
+
# Retrieves all time entries associated with a specific project
|
705
704
|
# Allows you to retrieve the time entries associated with a specific project
|
706
705
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
707
706
|
# @param project_id [String] Identifier of the project, that the task (which the time entry is logged against) belongs to.
|
@@ -712,7 +711,7 @@ module XeroRuby
|
|
712
711
|
# @option opts [String] :contact_id Finds all time entries for this contact identifier.
|
713
712
|
# @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.
|
714
713
|
# @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.
|
715
|
-
# @option opts [Array<String>] :states Comma-separated list of states to find. Will find all time entries that are in the status of whatever
|
714
|
+
# @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.
|
716
715
|
# @option opts [Boolean] :is_chargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.
|
717
716
|
# @option opts [DateTime] :date_after_utc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.
|
718
717
|
# @option opts [DateTime] :date_before_utc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.
|
@@ -730,7 +729,7 @@ module XeroRuby
|
|
730
729
|
fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_time_entries"
|
731
730
|
end
|
732
731
|
# resource path
|
733
|
-
local_var_path = '/
|
732
|
+
local_var_path = '/Projects/{projectId}/Time'.sub('{' + 'projectId' + '}', project_id.to_s)
|
734
733
|
|
735
734
|
# camelize keys of incoming `where` opts
|
736
735
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -786,8 +785,8 @@ module XeroRuby
|
|
786
785
|
return data, status_code, headers
|
787
786
|
end
|
788
787
|
|
788
|
+
# Retrieves a single time entry for a specific project
|
789
789
|
# Allows you to get a single time entry in a project
|
790
|
-
# Allows you to upget a single time entry in a project
|
791
790
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
792
791
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
793
792
|
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
@@ -798,8 +797,8 @@ module XeroRuby
|
|
798
797
|
data
|
799
798
|
end
|
800
799
|
|
800
|
+
# Retrieves a single time entry for a specific project
|
801
801
|
# Allows you to get a single time entry in a project
|
802
|
-
# Allows you to upget a single time entry in a project
|
803
802
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
804
803
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
805
804
|
# @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint
|
@@ -822,7 +821,7 @@ module XeroRuby
|
|
822
821
|
fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.get_time_entry"
|
823
822
|
end
|
824
823
|
# resource path
|
825
|
-
local_var_path = '/
|
824
|
+
local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
826
825
|
|
827
826
|
# camelize keys of incoming `where` opts
|
828
827
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -904,7 +903,7 @@ module XeroRuby
|
|
904
903
|
fail ArgumentError, "Missing the required parameter 'project_patch' when calling ProjectApi.patch_project"
|
905
904
|
end
|
906
905
|
# resource path
|
907
|
-
local_var_path = '/
|
906
|
+
local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
908
907
|
|
909
908
|
# camelize keys of incoming `where` opts
|
910
909
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -952,7 +951,7 @@ module XeroRuby
|
|
952
951
|
return data, status_code, headers
|
953
952
|
end
|
954
953
|
|
955
|
-
#
|
954
|
+
# Updates a specific project
|
956
955
|
# Allows you to update a specific projects.
|
957
956
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
958
957
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
@@ -964,7 +963,7 @@ module XeroRuby
|
|
964
963
|
nil
|
965
964
|
end
|
966
965
|
|
967
|
-
#
|
966
|
+
# Updates a specific project
|
968
967
|
# Allows you to update a specific projects.
|
969
968
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
970
969
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
@@ -988,7 +987,7 @@ module XeroRuby
|
|
988
987
|
fail ArgumentError, "Missing the required parameter 'project_create_or_update' when calling ProjectApi.update_project"
|
989
988
|
end
|
990
989
|
# resource path
|
991
|
-
local_var_path = '/
|
990
|
+
local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)
|
992
991
|
|
993
992
|
# camelize keys of incoming `where` opts
|
994
993
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
@@ -1036,7 +1035,7 @@ module XeroRuby
|
|
1036
1035
|
return data, status_code, headers
|
1037
1036
|
end
|
1038
1037
|
|
1039
|
-
#
|
1038
|
+
# Updates a time entry for a specific project
|
1040
1039
|
# Allows you to update time entry in a project
|
1041
1040
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1042
1041
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
@@ -1049,7 +1048,7 @@ module XeroRuby
|
|
1049
1048
|
nil
|
1050
1049
|
end
|
1051
1050
|
|
1052
|
-
#
|
1051
|
+
# Updates a time entry for a specific project
|
1053
1052
|
# Allows you to update time entry in a project
|
1054
1053
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1055
1054
|
# @param project_id [String] You can specify an individual project by appending the projectId to the endpoint
|
@@ -1078,7 +1077,7 @@ module XeroRuby
|
|
1078
1077
|
fail ArgumentError, "Missing the required parameter 'time_entry_create_or_update' when calling ProjectApi.update_time_entry"
|
1079
1078
|
end
|
1080
1079
|
# resource path
|
1081
|
-
local_var_path = '/
|
1080
|
+
local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)
|
1082
1081
|
|
1083
1082
|
# camelize keys of incoming `where` opts
|
1084
1083
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
data/lib/xero-ruby/api_client.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
=begin
|
2
|
-
#Accounting API
|
2
|
+
#Xero Accounting API
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.8.0
|
7
6
|
Contact: api@xero.com
|
8
7
|
Generated by: https://openapi-generator.tech
|
9
8
|
OpenAPI Generator version: 4.3.1
|
@@ -19,6 +18,8 @@ require 'faraday'
|
|
19
18
|
|
20
19
|
module XeroRuby
|
21
20
|
class ApiClient
|
21
|
+
include StringSerialization
|
22
|
+
|
22
23
|
# The Configuration object holding settings to be used in the API client.
|
23
24
|
attr_accessor :config
|
24
25
|
|
@@ -34,6 +35,7 @@ module XeroRuby
|
|
34
35
|
@client_secret = credentials[:client_secret]
|
35
36
|
@redirect_uri = credentials[:redirect_uri]
|
36
37
|
@scopes = credentials[:scopes]
|
38
|
+
@state = credentials[:state]
|
37
39
|
@config = config
|
38
40
|
@user_agent = "xero-ruby-#{VERSION}"
|
39
41
|
@default_headers = {
|
@@ -44,6 +46,7 @@ module XeroRuby
|
|
44
46
|
|
45
47
|
def authorization_url
|
46
48
|
url = "#{@config.login_url}?response_type=code&client_id=#{@client_id}&redirect_uri=#{@redirect_uri}&scope=#{@scopes}"
|
49
|
+
url << "&state=#{@state}" if @state
|
47
50
|
return url
|
48
51
|
end
|
49
52
|
|
@@ -92,7 +95,7 @@ module XeroRuby
|
|
92
95
|
end
|
93
96
|
|
94
97
|
def set_token_set(token_set)
|
95
|
-
# helper to set the token_set on a client once the user
|
98
|
+
# helper to set the token_set on a client once the user
|
96
99
|
# has a valid token set ( access_token & refresh_token )
|
97
100
|
XeroRuby.configure.token_set = token_set
|
98
101
|
set_access_token(token_set['access_token'])
|
@@ -108,7 +111,7 @@ module XeroRuby
|
|
108
111
|
code: params['code'],
|
109
112
|
redirect_uri: @redirect_uri
|
110
113
|
}
|
111
|
-
return token_request(data)
|
114
|
+
return token_request(data, '/token')
|
112
115
|
end
|
113
116
|
|
114
117
|
def refresh_token_set(token_set)
|
@@ -116,31 +119,44 @@ module XeroRuby
|
|
116
119
|
grant_type: 'refresh_token',
|
117
120
|
refresh_token: token_set['refresh_token']
|
118
121
|
}
|
119
|
-
return token_request(data)
|
122
|
+
return token_request(data, '/token')
|
123
|
+
end
|
124
|
+
|
125
|
+
def revoke_token(token_set)
|
126
|
+
data = {
|
127
|
+
token: token_set['refresh_token']
|
128
|
+
}
|
129
|
+
return token_request(data, '/revocation')
|
120
130
|
end
|
121
131
|
|
122
|
-
def token_request(data)
|
123
|
-
response = Faraday.post(@config.token_url) do |req|
|
132
|
+
def token_request(data, path)
|
133
|
+
response = Faraday.post("#{@config.token_url}#{path}") do |req|
|
124
134
|
req.headers['Authorization'] = "Basic " + Base64.strict_encode64("#{@client_id}:#{@client_secret}")
|
125
135
|
req.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
126
136
|
req.body = URI.encode_www_form(data)
|
127
137
|
end
|
128
138
|
return_error(response) unless response.success?
|
129
|
-
|
130
|
-
|
139
|
+
if !response.body.blank?
|
140
|
+
body = JSON.parse(response.body)
|
141
|
+
set_token_set(body)
|
142
|
+
else
|
143
|
+
body = {}
|
144
|
+
end
|
131
145
|
return body
|
132
146
|
end
|
133
147
|
|
134
148
|
# Connection heplers
|
135
149
|
def connections
|
150
|
+
@config.base_url = 'https://api.xero.com'
|
136
151
|
opts = { :header_params => {'Content-Type': 'application/json'}, :auth_names => ['OAuth2'] }
|
137
|
-
response = call_api(:GET,
|
152
|
+
response = call_api(:GET, "/connections/", nil, opts)
|
138
153
|
response[0]
|
139
154
|
end
|
140
155
|
|
141
156
|
def disconnect(connection_id)
|
157
|
+
@config.base_url = 'https://api.xero.com'
|
142
158
|
opts = { :header_params => {'Content-Type': 'application/json'}, :auth_names => ['OAuth2'] }
|
143
|
-
call_api(:DELETE, "
|
159
|
+
call_api(:DELETE, "/connections/#{connection_id}", nil, opts)
|
144
160
|
connections
|
145
161
|
end
|
146
162
|
|
@@ -496,55 +512,6 @@ module XeroRuby
|
|
496
512
|
end
|
497
513
|
end
|
498
514
|
|
499
|
-
# START - Re-serializes snake_cased params to PascalCase required by XeroAPI
|
500
|
-
def to_camel_keys(value = self)
|
501
|
-
case value
|
502
|
-
when Array
|
503
|
-
value.map { |v| to_camel_keys(v) }
|
504
|
-
when Hash
|
505
|
-
Hash[value.map { |k, v| [camelize_key(k), to_camel_keys(v)] }]
|
506
|
-
else
|
507
|
-
value
|
508
|
-
end
|
509
|
-
end
|
510
|
-
|
511
|
-
def camelize_key(key, first_upper = true)
|
512
|
-
if key.is_a? Symbol
|
513
|
-
camelize(key.to_s, first_upper).to_sym
|
514
|
-
elsif key.is_a? String
|
515
|
-
camelize(key, first_upper)
|
516
|
-
else
|
517
|
-
key # can't camelize anything except strings and symbols
|
518
|
-
end
|
519
|
-
end
|
520
|
-
|
521
|
-
def camelize(word, first_upper = true)
|
522
|
-
if first_upper
|
523
|
-
str = word.to_s
|
524
|
-
str = gsubbed(str, /(?:^|_)([^_\s]+)/)
|
525
|
-
str = gsubbed(str, %r{/([^/]*)}, "::")
|
526
|
-
str
|
527
|
-
else
|
528
|
-
parts = word.split("_", 2)
|
529
|
-
parts[0] << camelize(parts[1]) if parts.size > 1
|
530
|
-
parts[0] || ""
|
531
|
-
end
|
532
|
-
end
|
533
|
-
|
534
|
-
def gsubbed(str, pattern, extra = "")
|
535
|
-
key_map_scronyms = {}
|
536
|
-
str = str.gsub(pattern) do
|
537
|
-
extra + (key_map_scronyms[Regexp.last_match(1)] || capitalize_first(Regexp.last_match(1)))
|
538
|
-
end
|
539
|
-
str
|
540
|
-
end
|
541
|
-
|
542
|
-
def capitalize_first(word)
|
543
|
-
split = word.split('')
|
544
|
-
"#{split[0].capitalize}#{split[1..-1].join}"
|
545
|
-
end
|
546
|
-
# END - Re-serializes snake_cased params to PascalCase required by XeroAPI
|
547
|
-
|
548
515
|
# Build parameter value according to the given collection format.
|
549
516
|
# @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
|
550
517
|
def build_collection_param(param, collection_format)
|
@@ -566,36 +533,7 @@ module XeroRuby
|
|
566
533
|
end
|
567
534
|
|
568
535
|
def parameterize_where(where_opts)
|
569
|
-
where_opts.
|
570
|
-
case v
|
571
|
-
when Array
|
572
|
-
operator = v.first
|
573
|
-
query = v.last
|
574
|
-
if query.is_a?(Date)
|
575
|
-
"#{camelize_key(k)} #{operator} DateTime(#{query.strftime("%Y,%m,%d")})"
|
576
|
-
elsif [Float, Integer].member?(query.class)
|
577
|
-
%{#{camelize_key(k)} #{operator} #{query}}
|
578
|
-
elsif [true, false].member?(query)
|
579
|
-
%{#{camelize_key(k)} #{operator} #{query}}
|
580
|
-
else
|
581
|
-
if k == :contact_id
|
582
|
-
%{Contact.ContactID #{operator} guid("#{query}")}
|
583
|
-
elsif k == :contact_number
|
584
|
-
%{Contact.ContactNumber #{operator} "#{query}"}
|
585
|
-
else
|
586
|
-
%{#{camelize_key(k)} #{operator} "#{query}"}
|
587
|
-
end
|
588
|
-
end
|
589
|
-
when Range
|
590
|
-
if v.first.is_a?(DateTime) || v.first.is_a?(Date) || v.first.is_a?(Time)
|
591
|
-
"#{camelize_key(k)} >= DateTime(#{v.first.strftime("%Y,%m,%d")}) AND #{camelize_key(k)} <= DateTime(#{v.last.strftime("%Y,%m,%d")})"
|
592
|
-
else
|
593
|
-
"#{camelize_key(k)} >= #{v.first} AND #{camelize_key(k)} <= #{v.last}"
|
594
|
-
end
|
595
|
-
else
|
596
|
-
%{#{camelize_key(k)} #{v}}
|
597
|
-
end
|
598
|
-
end.join(' AND ')
|
536
|
+
Where.new(where_opts).to_param
|
599
537
|
end
|
600
538
|
end
|
601
539
|
end
|