xero-ruby 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/xero-ruby/api_client.rb +2 -1
- data/lib/xero-ruby/version.rb +1 -1
- data/spec/api_client_spec.rb +15 -1
- metadata +4 -452
- 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/xero-ruby.gemspec +0 -38
@@ -1,19 +0,0 @@
|
|
1
|
-
# XeroRuby::PayrollNz::PaymentMethod
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**payment_method** | **String** | The payment method code | [optional]
|
8
|
-
**bank_accounts** | [**Array<BankAccount>**](BankAccount.md) | | [optional]
|
9
|
-
|
10
|
-
## Code Sample
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'XeroRuby::PayrollNz'
|
14
|
-
|
15
|
-
instance = XeroRuby::PayrollNz::PaymentMethod.new(payment_method: null,
|
16
|
-
bank_accounts: null)
|
17
|
-
```
|
18
|
-
|
19
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# XeroRuby::PayrollNz::PaymentMethodObject
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
8
|
-
**problem** | [**Problem**](Problem.md) | | [optional]
|
9
|
-
**payment_method** | [**PaymentMethod**](PaymentMethod.md) | | [optional]
|
10
|
-
|
11
|
-
## Code Sample
|
12
|
-
|
13
|
-
```ruby
|
14
|
-
require 'XeroRuby::PayrollNz'
|
15
|
-
|
16
|
-
instance = XeroRuby::PayrollNz::PaymentMethodObject.new(pagination: null,
|
17
|
-
problem: null,
|
18
|
-
payment_method: null)
|
19
|
-
```
|
20
|
-
|
21
|
-
|
@@ -1,4544 +0,0 @@
|
|
1
|
-
# XeroRuby::PayrollNz::PayrollNzApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://api.xero.com/payroll.xro/2.0*
|
4
|
-
|
5
|
-
Method | HTTP request | Description
|
6
|
-
------------- | ------------- | -------------
|
7
|
-
[**approve_timesheet**](PayrollNzApi.md#approve_timesheet) | **POST** /Timesheets/{TimesheetID}/Approve | approve a timesheet
|
8
|
-
[**create_deduction**](PayrollNzApi.md#create_deduction) | **POST** /Deductions | create a new deduction
|
9
|
-
[**create_earnings_rate**](PayrollNzApi.md#create_earnings_rate) | **POST** /EarningsRates | create a new earnings rate
|
10
|
-
[**create_employee**](PayrollNzApi.md#create_employee) | **POST** /Employees | creates employees
|
11
|
-
[**create_employee_earnings_template**](PayrollNzApi.md#create_employee_earnings_template) | **POST** /Employees/{EmployeeId}/PayTemplates/earnings | creates employee earnings template records
|
12
|
-
[**create_employee_leave**](PayrollNzApi.md#create_employee_leave) | **POST** /Employees/{EmployeeId}/Leave | creates employee leave records
|
13
|
-
[**create_employee_leave_setup**](PayrollNzApi.md#create_employee_leave_setup) | **POST** /Employees/{EmployeeId}/leaveSetup | Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee
|
14
|
-
[**create_employee_leave_type**](PayrollNzApi.md#create_employee_leave_type) | **POST** /Employees/{EmployeeId}/LeaveTypes | creates employee leave type records
|
15
|
-
[**create_employee_opening_balances**](PayrollNzApi.md#create_employee_opening_balances) | **POST** /Employees/{EmployeeId}/openingBalances | creates employee opening balances
|
16
|
-
[**create_employee_payment_method**](PayrollNzApi.md#create_employee_payment_method) | **POST** /Employees/{EmployeeId}/PaymentMethods | creates employee payment method
|
17
|
-
[**create_employee_salary_and_wage**](PayrollNzApi.md#create_employee_salary_and_wage) | **POST** /Employees/{EmployeeId}/SalaryAndWages | creates employee salary and wage record
|
18
|
-
[**create_employment**](PayrollNzApi.md#create_employment) | **POST** /Employees/{EmployeeId}/Employment | creates employment
|
19
|
-
[**create_leave_type**](PayrollNzApi.md#create_leave_type) | **POST** /LeaveTypes | create a new leave type
|
20
|
-
[**create_multiple_employee_earnings_template**](PayrollNzApi.md#create_multiple_employee_earnings_template) | **POST** /Employees/{EmployeeId}/paytemplateearnings | creates multiple employee earnings template records
|
21
|
-
[**create_pay_run**](PayrollNzApi.md#create_pay_run) | **POST** /PayRuns | create a pay run
|
22
|
-
[**create_pay_run_calendar**](PayrollNzApi.md#create_pay_run_calendar) | **POST** /PayRunCalendars | create a new payrun calendar
|
23
|
-
[**create_reimbursement**](PayrollNzApi.md#create_reimbursement) | **POST** /Reimbursements | create a new reimbursement
|
24
|
-
[**create_superannuation**](PayrollNzApi.md#create_superannuation) | **POST** /superannuations | create a new superannuation
|
25
|
-
[**create_timesheet**](PayrollNzApi.md#create_timesheet) | **POST** /Timesheets | create a new timesheet
|
26
|
-
[**create_timesheet_line**](PayrollNzApi.md#create_timesheet_line) | **POST** /Timesheets/{TimesheetID}/Lines | create a new timesheet line
|
27
|
-
[**delete_employee_earnings_template**](PayrollNzApi.md#delete_employee_earnings_template) | **DELETE** /Employees/{EmployeeId}/PayTemplates/earnings/{PayTemplateEarningID} | deletes an employee earnings template record
|
28
|
-
[**delete_employee_leave**](PayrollNzApi.md#delete_employee_leave) | **DELETE** /Employees/{EmployeeId}/Leave/{LeaveID} | deletes an employee leave record
|
29
|
-
[**delete_employee_salary_and_wage**](PayrollNzApi.md#delete_employee_salary_and_wage) | **DELETE** /Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID} | deletes an employee salary and wages record
|
30
|
-
[**delete_timesheet**](PayrollNzApi.md#delete_timesheet) | **DELETE** /Timesheets/{TimesheetID} | delete a timesheet
|
31
|
-
[**delete_timesheet_line**](PayrollNzApi.md#delete_timesheet_line) | **DELETE** /Timesheets/{TimesheetID}/Lines/{TimesheetLineID} | delete a timesheet line
|
32
|
-
[**get_deduction**](PayrollNzApi.md#get_deduction) | **GET** /Deductions/{deductionId} | retrieve a single deduction by id
|
33
|
-
[**get_deductions**](PayrollNzApi.md#get_deductions) | **GET** /Deductions | searches deductions
|
34
|
-
[**get_earnings_rate**](PayrollNzApi.md#get_earnings_rate) | **GET** /EarningsRates/{EarningsRateID} | retrieve a single earnings rates by id
|
35
|
-
[**get_earnings_rates**](PayrollNzApi.md#get_earnings_rates) | **GET** /EarningsRates | searches earnings rates
|
36
|
-
[**get_employee**](PayrollNzApi.md#get_employee) | **GET** /Employees/{EmployeeId} | searches employees
|
37
|
-
[**get_employee_leave_balances**](PayrollNzApi.md#get_employee_leave_balances) | **GET** /Employees/{EmployeeId}/LeaveBalances | search employee leave balances
|
38
|
-
[**get_employee_leave_periods**](PayrollNzApi.md#get_employee_leave_periods) | **GET** /Employees/{EmployeeId}/LeavePeriods | searches employee leave periods
|
39
|
-
[**get_employee_leave_types**](PayrollNzApi.md#get_employee_leave_types) | **GET** /Employees/{EmployeeId}/LeaveTypes | searches employee leave types
|
40
|
-
[**get_employee_leaves**](PayrollNzApi.md#get_employee_leaves) | **GET** /Employees/{EmployeeId}/Leave | search employee leave records
|
41
|
-
[**get_employee_opening_balances**](PayrollNzApi.md#get_employee_opening_balances) | **GET** /Employees/{EmployeeId}/openingBalances | retrieve employee openingbalances
|
42
|
-
[**get_employee_pay_templates**](PayrollNzApi.md#get_employee_pay_templates) | **GET** /Employees/{EmployeeId}/PayTemplates | searches employee pay templates
|
43
|
-
[**get_employee_payment_method**](PayrollNzApi.md#get_employee_payment_method) | **GET** /Employees/{EmployeeId}/PaymentMethods | retrieves an employee's payment method
|
44
|
-
[**get_employee_salary_and_wage**](PayrollNzApi.md#get_employee_salary_and_wage) | **GET** /Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID} | get employee salary and wages record by id
|
45
|
-
[**get_employee_salary_and_wages**](PayrollNzApi.md#get_employee_salary_and_wages) | **GET** /Employees/{EmployeeId}/SalaryAndWages | retrieves an employee's salary and wages
|
46
|
-
[**get_employee_tax**](PayrollNzApi.md#get_employee_tax) | **GET** /Employees/{EmployeeId}/Tax | searches tax records for an employee
|
47
|
-
[**get_employees**](PayrollNzApi.md#get_employees) | **GET** /Employees | searches employees
|
48
|
-
[**get_leave_type**](PayrollNzApi.md#get_leave_type) | **GET** /LeaveTypes/{LeaveTypeID} | retrieve a single leave type by id
|
49
|
-
[**get_leave_types**](PayrollNzApi.md#get_leave_types) | **GET** /LeaveTypes | searches leave types
|
50
|
-
[**get_pay_run**](PayrollNzApi.md#get_pay_run) | **GET** /PayRuns/{PayRunID} | retrieve a single pay run by id
|
51
|
-
[**get_pay_run_calendar**](PayrollNzApi.md#get_pay_run_calendar) | **GET** /PayRunCalendars/{PayrollCalendarID} | retrieve a single payrun calendar by id
|
52
|
-
[**get_pay_run_calendars**](PayrollNzApi.md#get_pay_run_calendars) | **GET** /PayRunCalendars | searches payrun calendars
|
53
|
-
[**get_pay_runs**](PayrollNzApi.md#get_pay_runs) | **GET** /PayRuns | searches pay runs
|
54
|
-
[**get_pay_slip**](PayrollNzApi.md#get_pay_slip) | **GET** /PaySlips/{PaySlipID} | retrieve a single payslip by id
|
55
|
-
[**get_pay_slips**](PayrollNzApi.md#get_pay_slips) | **GET** /PaySlips | searches payslips
|
56
|
-
[**get_reimbursement**](PayrollNzApi.md#get_reimbursement) | **GET** /Reimbursements/{ReimbursementID} | retrieve a single reimbursement by id
|
57
|
-
[**get_reimbursements**](PayrollNzApi.md#get_reimbursements) | **GET** /Reimbursements | searches reimbursements
|
58
|
-
[**get_settings**](PayrollNzApi.md#get_settings) | **GET** /Settings | searches settings
|
59
|
-
[**get_statutory_deduction**](PayrollNzApi.md#get_statutory_deduction) | **GET** /StatutoryDeductions/{Id} | retrieve a single statutory deduction by id
|
60
|
-
[**get_statutory_deductions**](PayrollNzApi.md#get_statutory_deductions) | **GET** /StatutoryDeductions | searches statutory deductions
|
61
|
-
[**get_superannuation**](PayrollNzApi.md#get_superannuation) | **GET** /superannuations/{SuperannuationID} | searches for a unique superannuation
|
62
|
-
[**get_superannuations**](PayrollNzApi.md#get_superannuations) | **GET** /superannuations | searches statutory deductions
|
63
|
-
[**get_timesheet**](PayrollNzApi.md#get_timesheet) | **GET** /Timesheets/{TimesheetID} | retrieve a single timesheet by id
|
64
|
-
[**get_timesheets**](PayrollNzApi.md#get_timesheets) | **GET** /Timesheets | searches timesheets
|
65
|
-
[**get_tracking_categories**](PayrollNzApi.md#get_tracking_categories) | **GET** /settings/trackingCategories | searches tracking categories
|
66
|
-
[**revert_timesheet**](PayrollNzApi.md#revert_timesheet) | **POST** /Timesheets/{TimesheetID}/RevertToDraft | revert a timesheet to draft
|
67
|
-
[**update_employee**](PayrollNzApi.md#update_employee) | **PUT** /Employees/{EmployeeId} | updates employee
|
68
|
-
[**update_employee_earnings_template**](PayrollNzApi.md#update_employee_earnings_template) | **PUT** /Employees/{EmployeeId}/PayTemplates/earnings/{PayTemplateEarningID} | updates employee earnings template records
|
69
|
-
[**update_employee_leave**](PayrollNzApi.md#update_employee_leave) | **PUT** /Employees/{EmployeeId}/Leave/{LeaveID} | updates employee leave records
|
70
|
-
[**update_employee_salary_and_wage**](PayrollNzApi.md#update_employee_salary_and_wage) | **PUT** /Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID} | updates employee salary and wages record
|
71
|
-
[**update_employee_tax**](PayrollNzApi.md#update_employee_tax) | **POST** /Employees/{EmployeeId}/Tax | updates the tax records for an employee
|
72
|
-
[**update_pay_run**](PayrollNzApi.md#update_pay_run) | **PUT** /PayRuns/{PayRunID} | update a pay run
|
73
|
-
[**update_pay_slip_line_items**](PayrollNzApi.md#update_pay_slip_line_items) | **PUT** /PaySlips/{PaySlipID} | creates employee pay slip
|
74
|
-
[**update_timesheet_line**](PayrollNzApi.md#update_timesheet_line) | **PUT** /Timesheets/{TimesheetID}/Lines/{TimesheetLineID} | update a timesheet line
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
## approve_timesheet
|
79
|
-
|
80
|
-
> TimesheetObject approve_timesheet(xero_tenant_id, timesheet_id)
|
81
|
-
|
82
|
-
approve a timesheet
|
83
|
-
|
84
|
-
### Example
|
85
|
-
|
86
|
-
```ruby
|
87
|
-
# load the gem
|
88
|
-
require 'xero-ruby'
|
89
|
-
|
90
|
-
creds = {
|
91
|
-
client_id: ENV['CLIENT_ID'],
|
92
|
-
client_secret: ENV['CLIENT_SECRET'],
|
93
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
94
|
-
scopes: ENV['SCOPES']
|
95
|
-
}
|
96
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
97
|
-
|
98
|
-
token_set = fetch_valid_token_set(user) # example
|
99
|
-
|
100
|
-
xero_client.refresh_token_set(token_set)
|
101
|
-
|
102
|
-
# You need to namespace your api method call to one of the following api sets
|
103
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
104
|
-
|
105
|
-
api_instance = xero_client.<api_set>
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
110
|
-
timesheet_id = 'timesheet_id_example' # String | Identifier for the timesheet
|
111
|
-
begin
|
112
|
-
#approve a timesheet
|
113
|
-
result = api_instance.approve_timesheet(xero_tenant_id, timesheet_id)
|
114
|
-
p result
|
115
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
116
|
-
puts "Exception when calling PayrollNzApi->approve_timesheet: #{e}"
|
117
|
-
end
|
118
|
-
```
|
119
|
-
|
120
|
-
### Parameters
|
121
|
-
|
122
|
-
|
123
|
-
Name | Type | Description | Notes
|
124
|
-
------------- | ------------- | ------------- | -------------
|
125
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
126
|
-
**timesheet_id** | [**String**](.md)| Identifier for the timesheet |
|
127
|
-
|
128
|
-
### Return type
|
129
|
-
|
130
|
-
[**TimesheetObject**](TimesheetObject.md)
|
131
|
-
|
132
|
-
### Authorization
|
133
|
-
|
134
|
-
[OAuth2](../README.md#OAuth2)
|
135
|
-
|
136
|
-
### HTTP request headers
|
137
|
-
|
138
|
-
- **Content-Type**: Not defined
|
139
|
-
- **Accept**: application/json
|
140
|
-
|
141
|
-
|
142
|
-
## create_deduction
|
143
|
-
|
144
|
-
> DeductionObject create_deduction(xero_tenant_id, deduction)
|
145
|
-
|
146
|
-
create a new deduction
|
147
|
-
|
148
|
-
### Example
|
149
|
-
|
150
|
-
```ruby
|
151
|
-
# load the gem
|
152
|
-
require 'xero-ruby'
|
153
|
-
|
154
|
-
creds = {
|
155
|
-
client_id: ENV['CLIENT_ID'],
|
156
|
-
client_secret: ENV['CLIENT_SECRET'],
|
157
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
158
|
-
scopes: ENV['SCOPES']
|
159
|
-
}
|
160
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
161
|
-
|
162
|
-
token_set = fetch_valid_token_set(user) # example
|
163
|
-
|
164
|
-
xero_client.refresh_token_set(token_set)
|
165
|
-
|
166
|
-
# You need to namespace your api method call to one of the following api sets
|
167
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
168
|
-
|
169
|
-
api_instance = xero_client.<api_set>
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
174
|
-
deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" } # Deduction |
|
175
|
-
begin
|
176
|
-
#create a new deduction
|
177
|
-
result = api_instance.create_deduction(xero_tenant_id, deduction)
|
178
|
-
p result
|
179
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
180
|
-
puts "Exception when calling PayrollNzApi->create_deduction: #{e}"
|
181
|
-
end
|
182
|
-
```
|
183
|
-
|
184
|
-
### Parameters
|
185
|
-
|
186
|
-
|
187
|
-
Name | Type | Description | Notes
|
188
|
-
------------- | ------------- | ------------- | -------------
|
189
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
190
|
-
**deduction** | [**Deduction**](Deduction.md)| |
|
191
|
-
|
192
|
-
### Return type
|
193
|
-
|
194
|
-
[**DeductionObject**](DeductionObject.md)
|
195
|
-
|
196
|
-
### Authorization
|
197
|
-
|
198
|
-
[OAuth2](../README.md#OAuth2)
|
199
|
-
|
200
|
-
### HTTP request headers
|
201
|
-
|
202
|
-
- **Content-Type**: application/json
|
203
|
-
- **Accept**: application/json
|
204
|
-
|
205
|
-
|
206
|
-
## create_earnings_rate
|
207
|
-
|
208
|
-
> EarningsRateObject create_earnings_rate(xero_tenant_id, earnings_rate)
|
209
|
-
|
210
|
-
create a new earnings rate
|
211
|
-
|
212
|
-
### Example
|
213
|
-
|
214
|
-
```ruby
|
215
|
-
# load the gem
|
216
|
-
require 'xero-ruby'
|
217
|
-
|
218
|
-
creds = {
|
219
|
-
client_id: ENV['CLIENT_ID'],
|
220
|
-
client_secret: ENV['CLIENT_SECRET'],
|
221
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
222
|
-
scopes: ENV['SCOPES']
|
223
|
-
}
|
224
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
225
|
-
|
226
|
-
token_set = fetch_valid_token_set(user) # example
|
227
|
-
|
228
|
-
xero_client.refresh_token_set(token_set)
|
229
|
-
|
230
|
-
# You need to namespace your api method call to one of the following api sets
|
231
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
232
|
-
|
233
|
-
api_instance = xero_client.<api_set>
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
238
|
-
earnings_rate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" } # EarningsRate |
|
239
|
-
begin
|
240
|
-
#create a new earnings rate
|
241
|
-
result = api_instance.create_earnings_rate(xero_tenant_id, earnings_rate)
|
242
|
-
p result
|
243
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
244
|
-
puts "Exception when calling PayrollNzApi->create_earnings_rate: #{e}"
|
245
|
-
end
|
246
|
-
```
|
247
|
-
|
248
|
-
### Parameters
|
249
|
-
|
250
|
-
|
251
|
-
Name | Type | Description | Notes
|
252
|
-
------------- | ------------- | ------------- | -------------
|
253
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
254
|
-
**earnings_rate** | [**EarningsRate**](EarningsRate.md)| |
|
255
|
-
|
256
|
-
### Return type
|
257
|
-
|
258
|
-
[**EarningsRateObject**](EarningsRateObject.md)
|
259
|
-
|
260
|
-
### Authorization
|
261
|
-
|
262
|
-
[OAuth2](../README.md#OAuth2)
|
263
|
-
|
264
|
-
### HTTP request headers
|
265
|
-
|
266
|
-
- **Content-Type**: application/json
|
267
|
-
- **Accept**: application/json
|
268
|
-
|
269
|
-
|
270
|
-
## create_employee
|
271
|
-
|
272
|
-
> EmployeeObject create_employee(xero_tenant_id, employee)
|
273
|
-
|
274
|
-
creates employees
|
275
|
-
|
276
|
-
### Example
|
277
|
-
|
278
|
-
```ruby
|
279
|
-
# load the gem
|
280
|
-
require 'xero-ruby'
|
281
|
-
|
282
|
-
creds = {
|
283
|
-
client_id: ENV['CLIENT_ID'],
|
284
|
-
client_secret: ENV['CLIENT_SECRET'],
|
285
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
286
|
-
scopes: ENV['SCOPES']
|
287
|
-
}
|
288
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
289
|
-
|
290
|
-
token_set = fetch_valid_token_set(user) # example
|
291
|
-
|
292
|
-
xero_client.refresh_token_set(token_set)
|
293
|
-
|
294
|
-
# You need to namespace your api method call to one of the following api sets
|
295
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
296
|
-
|
297
|
-
api_instance = xero_client.<api_set>
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
302
|
-
employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" } # Employee |
|
303
|
-
begin
|
304
|
-
#creates employees
|
305
|
-
result = api_instance.create_employee(xero_tenant_id, employee)
|
306
|
-
p result
|
307
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
308
|
-
puts "Exception when calling PayrollNzApi->create_employee: #{e}"
|
309
|
-
end
|
310
|
-
```
|
311
|
-
|
312
|
-
### Parameters
|
313
|
-
|
314
|
-
|
315
|
-
Name | Type | Description | Notes
|
316
|
-
------------- | ------------- | ------------- | -------------
|
317
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
318
|
-
**employee** | [**Employee**](Employee.md)| |
|
319
|
-
|
320
|
-
### Return type
|
321
|
-
|
322
|
-
[**EmployeeObject**](EmployeeObject.md)
|
323
|
-
|
324
|
-
### Authorization
|
325
|
-
|
326
|
-
[OAuth2](../README.md#OAuth2)
|
327
|
-
|
328
|
-
### HTTP request headers
|
329
|
-
|
330
|
-
- **Content-Type**: application/json
|
331
|
-
- **Accept**: application/json
|
332
|
-
|
333
|
-
|
334
|
-
## create_employee_earnings_template
|
335
|
-
|
336
|
-
> EarningsTemplateObject create_employee_earnings_template(xero_tenant_id, employee_id, earnings_template)
|
337
|
-
|
338
|
-
creates employee earnings template records
|
339
|
-
|
340
|
-
### Example
|
341
|
-
|
342
|
-
```ruby
|
343
|
-
# load the gem
|
344
|
-
require 'xero-ruby'
|
345
|
-
|
346
|
-
creds = {
|
347
|
-
client_id: ENV['CLIENT_ID'],
|
348
|
-
client_secret: ENV['CLIENT_SECRET'],
|
349
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
350
|
-
scopes: ENV['SCOPES']
|
351
|
-
}
|
352
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
353
|
-
|
354
|
-
token_set = fetch_valid_token_set(user) # example
|
355
|
-
|
356
|
-
xero_client.refresh_token_set(token_set)
|
357
|
-
|
358
|
-
# You need to namespace your api method call to one of the following api sets
|
359
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
360
|
-
|
361
|
-
api_instance = xero_client.<api_set>
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
366
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
367
|
-
earnings_template = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" } # EarningsTemplate |
|
368
|
-
begin
|
369
|
-
#creates employee earnings template records
|
370
|
-
result = api_instance.create_employee_earnings_template(xero_tenant_id, employee_id, earnings_template)
|
371
|
-
p result
|
372
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
373
|
-
puts "Exception when calling PayrollNzApi->create_employee_earnings_template: #{e}"
|
374
|
-
end
|
375
|
-
```
|
376
|
-
|
377
|
-
### Parameters
|
378
|
-
|
379
|
-
|
380
|
-
Name | Type | Description | Notes
|
381
|
-
------------- | ------------- | ------------- | -------------
|
382
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
383
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
384
|
-
**earnings_template** | [**EarningsTemplate**](EarningsTemplate.md)| |
|
385
|
-
|
386
|
-
### Return type
|
387
|
-
|
388
|
-
[**EarningsTemplateObject**](EarningsTemplateObject.md)
|
389
|
-
|
390
|
-
### Authorization
|
391
|
-
|
392
|
-
[OAuth2](../README.md#OAuth2)
|
393
|
-
|
394
|
-
### HTTP request headers
|
395
|
-
|
396
|
-
- **Content-Type**: application/json
|
397
|
-
- **Accept**: application/json
|
398
|
-
|
399
|
-
|
400
|
-
## create_employee_leave
|
401
|
-
|
402
|
-
> EmployeeLeaveObject create_employee_leave(xero_tenant_id, employee_id, employee_leave)
|
403
|
-
|
404
|
-
creates employee leave records
|
405
|
-
|
406
|
-
### Example
|
407
|
-
|
408
|
-
```ruby
|
409
|
-
# load the gem
|
410
|
-
require 'xero-ruby'
|
411
|
-
|
412
|
-
creds = {
|
413
|
-
client_id: ENV['CLIENT_ID'],
|
414
|
-
client_secret: ENV['CLIENT_SECRET'],
|
415
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
416
|
-
scopes: ENV['SCOPES']
|
417
|
-
}
|
418
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
419
|
-
|
420
|
-
token_set = fetch_valid_token_set(user) # example
|
421
|
-
|
422
|
-
xero_client.refresh_token_set(token_set)
|
423
|
-
|
424
|
-
# You need to namespace your api method call to one of the following api sets
|
425
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
426
|
-
|
427
|
-
api_instance = xero_client.<api_set>
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
432
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
433
|
-
employee_leave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" } # EmployeeLeave |
|
434
|
-
begin
|
435
|
-
#creates employee leave records
|
436
|
-
result = api_instance.create_employee_leave(xero_tenant_id, employee_id, employee_leave)
|
437
|
-
p result
|
438
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
439
|
-
puts "Exception when calling PayrollNzApi->create_employee_leave: #{e}"
|
440
|
-
end
|
441
|
-
```
|
442
|
-
|
443
|
-
### Parameters
|
444
|
-
|
445
|
-
|
446
|
-
Name | Type | Description | Notes
|
447
|
-
------------- | ------------- | ------------- | -------------
|
448
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
449
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
450
|
-
**employee_leave** | [**EmployeeLeave**](EmployeeLeave.md)| |
|
451
|
-
|
452
|
-
### Return type
|
453
|
-
|
454
|
-
[**EmployeeLeaveObject**](EmployeeLeaveObject.md)
|
455
|
-
|
456
|
-
### Authorization
|
457
|
-
|
458
|
-
[OAuth2](../README.md#OAuth2)
|
459
|
-
|
460
|
-
### HTTP request headers
|
461
|
-
|
462
|
-
- **Content-Type**: application/json
|
463
|
-
- **Accept**: application/json
|
464
|
-
|
465
|
-
|
466
|
-
## create_employee_leave_setup
|
467
|
-
|
468
|
-
> EmployeeLeaveSetupObject create_employee_leave_setup(xero_tenant_id, employee_id, employee_leave_setup)
|
469
|
-
|
470
|
-
Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee
|
471
|
-
|
472
|
-
### Example
|
473
|
-
|
474
|
-
```ruby
|
475
|
-
# load the gem
|
476
|
-
require 'xero-ruby'
|
477
|
-
|
478
|
-
creds = {
|
479
|
-
client_id: ENV['CLIENT_ID'],
|
480
|
-
client_secret: ENV['CLIENT_SECRET'],
|
481
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
482
|
-
scopes: ENV['SCOPES']
|
483
|
-
}
|
484
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
485
|
-
|
486
|
-
token_set = fetch_valid_token_set(user) # example
|
487
|
-
|
488
|
-
xero_client.refresh_token_set(token_set)
|
489
|
-
|
490
|
-
# You need to namespace your api method call to one of the following api sets
|
491
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
492
|
-
|
493
|
-
api_instance = xero_client.<api_set>
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
498
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
499
|
-
employee_leave_setup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 } # EmployeeLeaveSetup |
|
500
|
-
begin
|
501
|
-
#Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee
|
502
|
-
result = api_instance.create_employee_leave_setup(xero_tenant_id, employee_id, employee_leave_setup)
|
503
|
-
p result
|
504
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
505
|
-
puts "Exception when calling PayrollNzApi->create_employee_leave_setup: #{e}"
|
506
|
-
end
|
507
|
-
```
|
508
|
-
|
509
|
-
### Parameters
|
510
|
-
|
511
|
-
|
512
|
-
Name | Type | Description | Notes
|
513
|
-
------------- | ------------- | ------------- | -------------
|
514
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
515
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
516
|
-
**employee_leave_setup** | [**EmployeeLeaveSetup**](EmployeeLeaveSetup.md)| |
|
517
|
-
|
518
|
-
### Return type
|
519
|
-
|
520
|
-
[**EmployeeLeaveSetupObject**](EmployeeLeaveSetupObject.md)
|
521
|
-
|
522
|
-
### Authorization
|
523
|
-
|
524
|
-
[OAuth2](../README.md#OAuth2)
|
525
|
-
|
526
|
-
### HTTP request headers
|
527
|
-
|
528
|
-
- **Content-Type**: application/json
|
529
|
-
- **Accept**: application/json
|
530
|
-
|
531
|
-
|
532
|
-
## create_employee_leave_type
|
533
|
-
|
534
|
-
> EmployeeLeaveTypeObject create_employee_leave_type(xero_tenant_id, employee_id, employee_leave_type)
|
535
|
-
|
536
|
-
creates employee leave type records
|
537
|
-
|
538
|
-
### Example
|
539
|
-
|
540
|
-
```ruby
|
541
|
-
# load the gem
|
542
|
-
require 'xero-ruby'
|
543
|
-
|
544
|
-
creds = {
|
545
|
-
client_id: ENV['CLIENT_ID'],
|
546
|
-
client_secret: ENV['CLIENT_SECRET'],
|
547
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
548
|
-
scopes: ENV['SCOPES']
|
549
|
-
}
|
550
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
551
|
-
|
552
|
-
token_set = fetch_valid_token_set(user) # example
|
553
|
-
|
554
|
-
xero_client.refresh_token_set(token_set)
|
555
|
-
|
556
|
-
# You need to namespace your api method call to one of the following api sets
|
557
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
558
|
-
|
559
|
-
api_instance = xero_client.<api_set>
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
564
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
565
|
-
employee_leave_type = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 } # EmployeeLeaveType |
|
566
|
-
begin
|
567
|
-
#creates employee leave type records
|
568
|
-
result = api_instance.create_employee_leave_type(xero_tenant_id, employee_id, employee_leave_type)
|
569
|
-
p result
|
570
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
571
|
-
puts "Exception when calling PayrollNzApi->create_employee_leave_type: #{e}"
|
572
|
-
end
|
573
|
-
```
|
574
|
-
|
575
|
-
### Parameters
|
576
|
-
|
577
|
-
|
578
|
-
Name | Type | Description | Notes
|
579
|
-
------------- | ------------- | ------------- | -------------
|
580
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
581
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
582
|
-
**employee_leave_type** | [**EmployeeLeaveType**](EmployeeLeaveType.md)| |
|
583
|
-
|
584
|
-
### Return type
|
585
|
-
|
586
|
-
[**EmployeeLeaveTypeObject**](EmployeeLeaveTypeObject.md)
|
587
|
-
|
588
|
-
### Authorization
|
589
|
-
|
590
|
-
[OAuth2](../README.md#OAuth2)
|
591
|
-
|
592
|
-
### HTTP request headers
|
593
|
-
|
594
|
-
- **Content-Type**: application/json
|
595
|
-
- **Accept**: application/json
|
596
|
-
|
597
|
-
|
598
|
-
## create_employee_opening_balances
|
599
|
-
|
600
|
-
> EmployeeOpeningBalancesObject create_employee_opening_balances(xero_tenant_id, employee_id, employee_opening_balance)
|
601
|
-
|
602
|
-
creates employee opening balances
|
603
|
-
|
604
|
-
### Example
|
605
|
-
|
606
|
-
```ruby
|
607
|
-
# load the gem
|
608
|
-
require 'xero-ruby'
|
609
|
-
|
610
|
-
creds = {
|
611
|
-
client_id: ENV['CLIENT_ID'],
|
612
|
-
client_secret: ENV['CLIENT_SECRET'],
|
613
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
614
|
-
scopes: ENV['SCOPES']
|
615
|
-
}
|
616
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
617
|
-
|
618
|
-
token_set = fetch_valid_token_set(user) # example
|
619
|
-
|
620
|
-
xero_client.refresh_token_set(token_set)
|
621
|
-
|
622
|
-
# You need to namespace your api method call to one of the following api sets
|
623
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
624
|
-
|
625
|
-
api_instance = xero_client.<api_set>
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
630
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
631
|
-
employee_opening_balance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}] # Array<EmployeeOpeningBalance> |
|
632
|
-
begin
|
633
|
-
#creates employee opening balances
|
634
|
-
result = api_instance.create_employee_opening_balances(xero_tenant_id, employee_id, employee_opening_balance)
|
635
|
-
p result
|
636
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
637
|
-
puts "Exception when calling PayrollNzApi->create_employee_opening_balances: #{e}"
|
638
|
-
end
|
639
|
-
```
|
640
|
-
|
641
|
-
### Parameters
|
642
|
-
|
643
|
-
|
644
|
-
Name | Type | Description | Notes
|
645
|
-
------------- | ------------- | ------------- | -------------
|
646
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
647
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
648
|
-
**employee_opening_balance** | [**Array<EmployeeOpeningBalance>**](EmployeeOpeningBalance.md)| |
|
649
|
-
|
650
|
-
### Return type
|
651
|
-
|
652
|
-
[**EmployeeOpeningBalancesObject**](EmployeeOpeningBalancesObject.md)
|
653
|
-
|
654
|
-
### Authorization
|
655
|
-
|
656
|
-
[OAuth2](../README.md#OAuth2)
|
657
|
-
|
658
|
-
### HTTP request headers
|
659
|
-
|
660
|
-
- **Content-Type**: application/json
|
661
|
-
- **Accept**: application/json
|
662
|
-
|
663
|
-
|
664
|
-
## create_employee_payment_method
|
665
|
-
|
666
|
-
> PaymentMethodObject create_employee_payment_method(xero_tenant_id, employee_id, payment_method)
|
667
|
-
|
668
|
-
creates employee payment method
|
669
|
-
|
670
|
-
### Example
|
671
|
-
|
672
|
-
```ruby
|
673
|
-
# load the gem
|
674
|
-
require 'xero-ruby'
|
675
|
-
|
676
|
-
creds = {
|
677
|
-
client_id: ENV['CLIENT_ID'],
|
678
|
-
client_secret: ENV['CLIENT_SECRET'],
|
679
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
680
|
-
scopes: ENV['SCOPES']
|
681
|
-
}
|
682
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
683
|
-
|
684
|
-
token_set = fetch_valid_token_set(user) # example
|
685
|
-
|
686
|
-
xero_client.refresh_token_set(token_set)
|
687
|
-
|
688
|
-
# You need to namespace your api method call to one of the following api sets
|
689
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
690
|
-
|
691
|
-
api_instance = xero_client.<api_set>
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
696
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
697
|
-
payment_method = XeroRuby::PayrollNz::PaymentMethod.new # PaymentMethod |
|
698
|
-
begin
|
699
|
-
#creates employee payment method
|
700
|
-
result = api_instance.create_employee_payment_method(xero_tenant_id, employee_id, payment_method)
|
701
|
-
p result
|
702
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
703
|
-
puts "Exception when calling PayrollNzApi->create_employee_payment_method: #{e}"
|
704
|
-
end
|
705
|
-
```
|
706
|
-
|
707
|
-
### Parameters
|
708
|
-
|
709
|
-
|
710
|
-
Name | Type | Description | Notes
|
711
|
-
------------- | ------------- | ------------- | -------------
|
712
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
713
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
714
|
-
**payment_method** | [**PaymentMethod**](PaymentMethod.md)| |
|
715
|
-
|
716
|
-
### Return type
|
717
|
-
|
718
|
-
[**PaymentMethodObject**](PaymentMethodObject.md)
|
719
|
-
|
720
|
-
### Authorization
|
721
|
-
|
722
|
-
[OAuth2](../README.md#OAuth2)
|
723
|
-
|
724
|
-
### HTTP request headers
|
725
|
-
|
726
|
-
- **Content-Type**: application/json
|
727
|
-
- **Accept**: application/json
|
728
|
-
|
729
|
-
|
730
|
-
## create_employee_salary_and_wage
|
731
|
-
|
732
|
-
> SalaryAndWageObject create_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wage)
|
733
|
-
|
734
|
-
creates employee salary and wage record
|
735
|
-
|
736
|
-
### Example
|
737
|
-
|
738
|
-
```ruby
|
739
|
-
# load the gem
|
740
|
-
require 'xero-ruby'
|
741
|
-
|
742
|
-
creds = {
|
743
|
-
client_id: ENV['CLIENT_ID'],
|
744
|
-
client_secret: ENV['CLIENT_SECRET'],
|
745
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
746
|
-
scopes: ENV['SCOPES']
|
747
|
-
}
|
748
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
749
|
-
|
750
|
-
token_set = fetch_valid_token_set(user) # example
|
751
|
-
|
752
|
-
xero_client.refresh_token_set(token_set)
|
753
|
-
|
754
|
-
# You need to namespace your api method call to one of the following api sets
|
755
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
756
|
-
|
757
|
-
api_instance = xero_client.<api_set>
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
762
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
763
|
-
salary_and_wage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" } # SalaryAndWage |
|
764
|
-
begin
|
765
|
-
#creates employee salary and wage record
|
766
|
-
result = api_instance.create_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wage)
|
767
|
-
p result
|
768
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
769
|
-
puts "Exception when calling PayrollNzApi->create_employee_salary_and_wage: #{e}"
|
770
|
-
end
|
771
|
-
```
|
772
|
-
|
773
|
-
### Parameters
|
774
|
-
|
775
|
-
|
776
|
-
Name | Type | Description | Notes
|
777
|
-
------------- | ------------- | ------------- | -------------
|
778
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
779
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
780
|
-
**salary_and_wage** | [**SalaryAndWage**](SalaryAndWage.md)| |
|
781
|
-
|
782
|
-
### Return type
|
783
|
-
|
784
|
-
[**SalaryAndWageObject**](SalaryAndWageObject.md)
|
785
|
-
|
786
|
-
### Authorization
|
787
|
-
|
788
|
-
[OAuth2](../README.md#OAuth2)
|
789
|
-
|
790
|
-
### HTTP request headers
|
791
|
-
|
792
|
-
- **Content-Type**: application/json
|
793
|
-
- **Accept**: application/json
|
794
|
-
|
795
|
-
|
796
|
-
## create_employment
|
797
|
-
|
798
|
-
> EmploymentObject create_employment(xero_tenant_id, employee_id, employment)
|
799
|
-
|
800
|
-
creates employment
|
801
|
-
|
802
|
-
### Example
|
803
|
-
|
804
|
-
```ruby
|
805
|
-
# load the gem
|
806
|
-
require 'xero-ruby'
|
807
|
-
|
808
|
-
creds = {
|
809
|
-
client_id: ENV['CLIENT_ID'],
|
810
|
-
client_secret: ENV['CLIENT_SECRET'],
|
811
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
812
|
-
scopes: ENV['SCOPES']
|
813
|
-
}
|
814
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
815
|
-
|
816
|
-
token_set = fetch_valid_token_set(user) # example
|
817
|
-
|
818
|
-
xero_client.refresh_token_set(token_set)
|
819
|
-
|
820
|
-
# You need to namespace your api method call to one of the following api sets
|
821
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
822
|
-
|
823
|
-
api_instance = xero_client.<api_set>
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
828
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
829
|
-
employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" } # Employment |
|
830
|
-
begin
|
831
|
-
#creates employment
|
832
|
-
result = api_instance.create_employment(xero_tenant_id, employee_id, employment)
|
833
|
-
p result
|
834
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
835
|
-
puts "Exception when calling PayrollNzApi->create_employment: #{e}"
|
836
|
-
end
|
837
|
-
```
|
838
|
-
|
839
|
-
### Parameters
|
840
|
-
|
841
|
-
|
842
|
-
Name | Type | Description | Notes
|
843
|
-
------------- | ------------- | ------------- | -------------
|
844
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
845
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
846
|
-
**employment** | [**Employment**](Employment.md)| |
|
847
|
-
|
848
|
-
### Return type
|
849
|
-
|
850
|
-
[**EmploymentObject**](EmploymentObject.md)
|
851
|
-
|
852
|
-
### Authorization
|
853
|
-
|
854
|
-
[OAuth2](../README.md#OAuth2)
|
855
|
-
|
856
|
-
### HTTP request headers
|
857
|
-
|
858
|
-
- **Content-Type**: application/json
|
859
|
-
- **Accept**: application/json
|
860
|
-
|
861
|
-
|
862
|
-
## create_leave_type
|
863
|
-
|
864
|
-
> LeaveTypeObject create_leave_type(xero_tenant_id, leave_type)
|
865
|
-
|
866
|
-
create a new leave type
|
867
|
-
|
868
|
-
### Example
|
869
|
-
|
870
|
-
```ruby
|
871
|
-
# load the gem
|
872
|
-
require 'xero-ruby'
|
873
|
-
|
874
|
-
creds = {
|
875
|
-
client_id: ENV['CLIENT_ID'],
|
876
|
-
client_secret: ENV['CLIENT_SECRET'],
|
877
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
878
|
-
scopes: ENV['SCOPES']
|
879
|
-
}
|
880
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
881
|
-
|
882
|
-
token_set = fetch_valid_token_set(user) # example
|
883
|
-
|
884
|
-
xero_client.refresh_token_set(token_set)
|
885
|
-
|
886
|
-
# You need to namespace your api method call to one of the following api sets
|
887
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
888
|
-
|
889
|
-
api_instance = xero_client.<api_set>
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
894
|
-
leave_type = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true } # LeaveType |
|
895
|
-
begin
|
896
|
-
#create a new leave type
|
897
|
-
result = api_instance.create_leave_type(xero_tenant_id, leave_type)
|
898
|
-
p result
|
899
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
900
|
-
puts "Exception when calling PayrollNzApi->create_leave_type: #{e}"
|
901
|
-
end
|
902
|
-
```
|
903
|
-
|
904
|
-
### Parameters
|
905
|
-
|
906
|
-
|
907
|
-
Name | Type | Description | Notes
|
908
|
-
------------- | ------------- | ------------- | -------------
|
909
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
910
|
-
**leave_type** | [**LeaveType**](LeaveType.md)| |
|
911
|
-
|
912
|
-
### Return type
|
913
|
-
|
914
|
-
[**LeaveTypeObject**](LeaveTypeObject.md)
|
915
|
-
|
916
|
-
### Authorization
|
917
|
-
|
918
|
-
[OAuth2](../README.md#OAuth2)
|
919
|
-
|
920
|
-
### HTTP request headers
|
921
|
-
|
922
|
-
- **Content-Type**: application/json
|
923
|
-
- **Accept**: application/json
|
924
|
-
|
925
|
-
|
926
|
-
## create_multiple_employee_earnings_template
|
927
|
-
|
928
|
-
> EmployeeEarningsTemplates create_multiple_employee_earnings_template(xero_tenant_id, employee_id, earnings_template)
|
929
|
-
|
930
|
-
creates multiple employee earnings template records
|
931
|
-
|
932
|
-
### Example
|
933
|
-
|
934
|
-
```ruby
|
935
|
-
# load the gem
|
936
|
-
require 'xero-ruby'
|
937
|
-
|
938
|
-
creds = {
|
939
|
-
client_id: ENV['CLIENT_ID'],
|
940
|
-
client_secret: ENV['CLIENT_SECRET'],
|
941
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
942
|
-
scopes: ENV['SCOPES']
|
943
|
-
}
|
944
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
945
|
-
|
946
|
-
token_set = fetch_valid_token_set(user) # example
|
947
|
-
|
948
|
-
xero_client.refresh_token_set(token_set)
|
949
|
-
|
950
|
-
# You need to namespace your api method call to one of the following api sets
|
951
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
952
|
-
|
953
|
-
api_instance = xero_client.<api_set>
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
958
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
959
|
-
earnings_template = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}] # Array<EarningsTemplate> |
|
960
|
-
begin
|
961
|
-
#creates multiple employee earnings template records
|
962
|
-
result = api_instance.create_multiple_employee_earnings_template(xero_tenant_id, employee_id, earnings_template)
|
963
|
-
p result
|
964
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
965
|
-
puts "Exception when calling PayrollNzApi->create_multiple_employee_earnings_template: #{e}"
|
966
|
-
end
|
967
|
-
```
|
968
|
-
|
969
|
-
### Parameters
|
970
|
-
|
971
|
-
|
972
|
-
Name | Type | Description | Notes
|
973
|
-
------------- | ------------- | ------------- | -------------
|
974
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
975
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
976
|
-
**earnings_template** | [**Array<EarningsTemplate>**](EarningsTemplate.md)| |
|
977
|
-
|
978
|
-
### Return type
|
979
|
-
|
980
|
-
[**EmployeeEarningsTemplates**](EmployeeEarningsTemplates.md)
|
981
|
-
|
982
|
-
### Authorization
|
983
|
-
|
984
|
-
[OAuth2](../README.md#OAuth2)
|
985
|
-
|
986
|
-
### HTTP request headers
|
987
|
-
|
988
|
-
- **Content-Type**: application/json
|
989
|
-
- **Accept**: application/json
|
990
|
-
|
991
|
-
|
992
|
-
## create_pay_run
|
993
|
-
|
994
|
-
> PayRunObject create_pay_run(xero_tenant_id, pay_run)
|
995
|
-
|
996
|
-
create a pay run
|
997
|
-
|
998
|
-
### Example
|
999
|
-
|
1000
|
-
```ruby
|
1001
|
-
# load the gem
|
1002
|
-
require 'xero-ruby'
|
1003
|
-
|
1004
|
-
creds = {
|
1005
|
-
client_id: ENV['CLIENT_ID'],
|
1006
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1007
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1008
|
-
scopes: ENV['SCOPES']
|
1009
|
-
}
|
1010
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1011
|
-
|
1012
|
-
token_set = fetch_valid_token_set(user) # example
|
1013
|
-
|
1014
|
-
xero_client.refresh_token_set(token_set)
|
1015
|
-
|
1016
|
-
# You need to namespace your api method call to one of the following api sets
|
1017
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1018
|
-
|
1019
|
-
api_instance = xero_client.<api_set>
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1024
|
-
pay_run = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" } # PayRun |
|
1025
|
-
begin
|
1026
|
-
#create a pay run
|
1027
|
-
result = api_instance.create_pay_run(xero_tenant_id, pay_run)
|
1028
|
-
p result
|
1029
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1030
|
-
puts "Exception when calling PayrollNzApi->create_pay_run: #{e}"
|
1031
|
-
end
|
1032
|
-
```
|
1033
|
-
|
1034
|
-
### Parameters
|
1035
|
-
|
1036
|
-
|
1037
|
-
Name | Type | Description | Notes
|
1038
|
-
------------- | ------------- | ------------- | -------------
|
1039
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1040
|
-
**pay_run** | [**PayRun**](PayRun.md)| |
|
1041
|
-
|
1042
|
-
### Return type
|
1043
|
-
|
1044
|
-
[**PayRunObject**](PayRunObject.md)
|
1045
|
-
|
1046
|
-
### Authorization
|
1047
|
-
|
1048
|
-
[OAuth2](../README.md#OAuth2)
|
1049
|
-
|
1050
|
-
### HTTP request headers
|
1051
|
-
|
1052
|
-
- **Content-Type**: application/json
|
1053
|
-
- **Accept**: application/json
|
1054
|
-
|
1055
|
-
|
1056
|
-
## create_pay_run_calendar
|
1057
|
-
|
1058
|
-
> PayRunCalendarObject create_pay_run_calendar(xero_tenant_id, pay_run_calendar)
|
1059
|
-
|
1060
|
-
create a new payrun calendar
|
1061
|
-
|
1062
|
-
### Example
|
1063
|
-
|
1064
|
-
```ruby
|
1065
|
-
# load the gem
|
1066
|
-
require 'xero-ruby'
|
1067
|
-
|
1068
|
-
creds = {
|
1069
|
-
client_id: ENV['CLIENT_ID'],
|
1070
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1071
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1072
|
-
scopes: ENV['SCOPES']
|
1073
|
-
}
|
1074
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1075
|
-
|
1076
|
-
token_set = fetch_valid_token_set(user) # example
|
1077
|
-
|
1078
|
-
xero_client.refresh_token_set(token_set)
|
1079
|
-
|
1080
|
-
# You need to namespace your api method call to one of the following api sets
|
1081
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1082
|
-
|
1083
|
-
api_instance = xero_client.<api_set>
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1088
|
-
pay_run_calendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" } # PayRunCalendar |
|
1089
|
-
begin
|
1090
|
-
#create a new payrun calendar
|
1091
|
-
result = api_instance.create_pay_run_calendar(xero_tenant_id, pay_run_calendar)
|
1092
|
-
p result
|
1093
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1094
|
-
puts "Exception when calling PayrollNzApi->create_pay_run_calendar: #{e}"
|
1095
|
-
end
|
1096
|
-
```
|
1097
|
-
|
1098
|
-
### Parameters
|
1099
|
-
|
1100
|
-
|
1101
|
-
Name | Type | Description | Notes
|
1102
|
-
------------- | ------------- | ------------- | -------------
|
1103
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1104
|
-
**pay_run_calendar** | [**PayRunCalendar**](PayRunCalendar.md)| |
|
1105
|
-
|
1106
|
-
### Return type
|
1107
|
-
|
1108
|
-
[**PayRunCalendarObject**](PayRunCalendarObject.md)
|
1109
|
-
|
1110
|
-
### Authorization
|
1111
|
-
|
1112
|
-
[OAuth2](../README.md#OAuth2)
|
1113
|
-
|
1114
|
-
### HTTP request headers
|
1115
|
-
|
1116
|
-
- **Content-Type**: application/json
|
1117
|
-
- **Accept**: application/json
|
1118
|
-
|
1119
|
-
|
1120
|
-
## create_reimbursement
|
1121
|
-
|
1122
|
-
> ReimbursementObject create_reimbursement(xero_tenant_id, reimbursement)
|
1123
|
-
|
1124
|
-
create a new reimbursement
|
1125
|
-
|
1126
|
-
### Example
|
1127
|
-
|
1128
|
-
```ruby
|
1129
|
-
# load the gem
|
1130
|
-
require 'xero-ruby'
|
1131
|
-
|
1132
|
-
creds = {
|
1133
|
-
client_id: ENV['CLIENT_ID'],
|
1134
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1135
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1136
|
-
scopes: ENV['SCOPES']
|
1137
|
-
}
|
1138
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1139
|
-
|
1140
|
-
token_set = fetch_valid_token_set(user) # example
|
1141
|
-
|
1142
|
-
xero_client.refresh_token_set(token_set)
|
1143
|
-
|
1144
|
-
# You need to namespace your api method call to one of the following api sets
|
1145
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1146
|
-
|
1147
|
-
api_instance = xero_client.<api_set>
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1152
|
-
reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" } # Reimbursement |
|
1153
|
-
begin
|
1154
|
-
#create a new reimbursement
|
1155
|
-
result = api_instance.create_reimbursement(xero_tenant_id, reimbursement)
|
1156
|
-
p result
|
1157
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1158
|
-
puts "Exception when calling PayrollNzApi->create_reimbursement: #{e}"
|
1159
|
-
end
|
1160
|
-
```
|
1161
|
-
|
1162
|
-
### Parameters
|
1163
|
-
|
1164
|
-
|
1165
|
-
Name | Type | Description | Notes
|
1166
|
-
------------- | ------------- | ------------- | -------------
|
1167
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1168
|
-
**reimbursement** | [**Reimbursement**](Reimbursement.md)| |
|
1169
|
-
|
1170
|
-
### Return type
|
1171
|
-
|
1172
|
-
[**ReimbursementObject**](ReimbursementObject.md)
|
1173
|
-
|
1174
|
-
### Authorization
|
1175
|
-
|
1176
|
-
[OAuth2](../README.md#OAuth2)
|
1177
|
-
|
1178
|
-
### HTTP request headers
|
1179
|
-
|
1180
|
-
- **Content-Type**: application/json
|
1181
|
-
- **Accept**: application/json
|
1182
|
-
|
1183
|
-
|
1184
|
-
## create_superannuation
|
1185
|
-
|
1186
|
-
> SuperannuationObject create_superannuation(xero_tenant_id, benefit)
|
1187
|
-
|
1188
|
-
create a new superannuation
|
1189
|
-
|
1190
|
-
### Example
|
1191
|
-
|
1192
|
-
```ruby
|
1193
|
-
# load the gem
|
1194
|
-
require 'xero-ruby'
|
1195
|
-
|
1196
|
-
creds = {
|
1197
|
-
client_id: ENV['CLIENT_ID'],
|
1198
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1199
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1200
|
-
scopes: ENV['SCOPES']
|
1201
|
-
}
|
1202
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1203
|
-
|
1204
|
-
token_set = fetch_valid_token_set(user) # example
|
1205
|
-
|
1206
|
-
xero_client.refresh_token_set(token_set)
|
1207
|
-
|
1208
|
-
# You need to namespace your api method call to one of the following api sets
|
1209
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1210
|
-
|
1211
|
-
api_instance = xero_client.<api_set>
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1216
|
-
benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 } # Benefit |
|
1217
|
-
begin
|
1218
|
-
#create a new superannuation
|
1219
|
-
result = api_instance.create_superannuation(xero_tenant_id, benefit)
|
1220
|
-
p result
|
1221
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1222
|
-
puts "Exception when calling PayrollNzApi->create_superannuation: #{e}"
|
1223
|
-
end
|
1224
|
-
```
|
1225
|
-
|
1226
|
-
### Parameters
|
1227
|
-
|
1228
|
-
|
1229
|
-
Name | Type | Description | Notes
|
1230
|
-
------------- | ------------- | ------------- | -------------
|
1231
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1232
|
-
**benefit** | [**Benefit**](Benefit.md)| |
|
1233
|
-
|
1234
|
-
### Return type
|
1235
|
-
|
1236
|
-
[**SuperannuationObject**](SuperannuationObject.md)
|
1237
|
-
|
1238
|
-
### Authorization
|
1239
|
-
|
1240
|
-
[OAuth2](../README.md#OAuth2)
|
1241
|
-
|
1242
|
-
### HTTP request headers
|
1243
|
-
|
1244
|
-
- **Content-Type**: application/json
|
1245
|
-
- **Accept**: application/json
|
1246
|
-
|
1247
|
-
|
1248
|
-
## create_timesheet
|
1249
|
-
|
1250
|
-
> TimesheetObject create_timesheet(xero_tenant_id, timesheet)
|
1251
|
-
|
1252
|
-
create a new timesheet
|
1253
|
-
|
1254
|
-
### Example
|
1255
|
-
|
1256
|
-
```ruby
|
1257
|
-
# load the gem
|
1258
|
-
require 'xero-ruby'
|
1259
|
-
|
1260
|
-
creds = {
|
1261
|
-
client_id: ENV['CLIENT_ID'],
|
1262
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1263
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1264
|
-
scopes: ENV['SCOPES']
|
1265
|
-
}
|
1266
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1267
|
-
|
1268
|
-
token_set = fetch_valid_token_set(user) # example
|
1269
|
-
|
1270
|
-
xero_client.refresh_token_set(token_set)
|
1271
|
-
|
1272
|
-
# You need to namespace your api method call to one of the following api sets
|
1273
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1274
|
-
|
1275
|
-
api_instance = xero_client.<api_set>
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1280
|
-
timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] } # Timesheet |
|
1281
|
-
begin
|
1282
|
-
#create a new timesheet
|
1283
|
-
result = api_instance.create_timesheet(xero_tenant_id, timesheet)
|
1284
|
-
p result
|
1285
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1286
|
-
puts "Exception when calling PayrollNzApi->create_timesheet: #{e}"
|
1287
|
-
end
|
1288
|
-
```
|
1289
|
-
|
1290
|
-
### Parameters
|
1291
|
-
|
1292
|
-
|
1293
|
-
Name | Type | Description | Notes
|
1294
|
-
------------- | ------------- | ------------- | -------------
|
1295
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1296
|
-
**timesheet** | [**Timesheet**](Timesheet.md)| |
|
1297
|
-
|
1298
|
-
### Return type
|
1299
|
-
|
1300
|
-
[**TimesheetObject**](TimesheetObject.md)
|
1301
|
-
|
1302
|
-
### Authorization
|
1303
|
-
|
1304
|
-
[OAuth2](../README.md#OAuth2)
|
1305
|
-
|
1306
|
-
### HTTP request headers
|
1307
|
-
|
1308
|
-
- **Content-Type**: application/json
|
1309
|
-
- **Accept**: application/json
|
1310
|
-
|
1311
|
-
|
1312
|
-
## create_timesheet_line
|
1313
|
-
|
1314
|
-
> TimesheetLineObject create_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line)
|
1315
|
-
|
1316
|
-
create a new timesheet line
|
1317
|
-
|
1318
|
-
### Example
|
1319
|
-
|
1320
|
-
```ruby
|
1321
|
-
# load the gem
|
1322
|
-
require 'xero-ruby'
|
1323
|
-
|
1324
|
-
creds = {
|
1325
|
-
client_id: ENV['CLIENT_ID'],
|
1326
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1327
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1328
|
-
scopes: ENV['SCOPES']
|
1329
|
-
}
|
1330
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1331
|
-
|
1332
|
-
token_set = fetch_valid_token_set(user) # example
|
1333
|
-
|
1334
|
-
xero_client.refresh_token_set(token_set)
|
1335
|
-
|
1336
|
-
# You need to namespace your api method call to one of the following api sets
|
1337
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1338
|
-
|
1339
|
-
api_instance = xero_client.<api_set>
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1344
|
-
timesheet_id = 'timesheet_id_example' # String | Identifier for the timesheet
|
1345
|
-
timesheet_line = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 } # TimesheetLine |
|
1346
|
-
begin
|
1347
|
-
#create a new timesheet line
|
1348
|
-
result = api_instance.create_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line)
|
1349
|
-
p result
|
1350
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1351
|
-
puts "Exception when calling PayrollNzApi->create_timesheet_line: #{e}"
|
1352
|
-
end
|
1353
|
-
```
|
1354
|
-
|
1355
|
-
### Parameters
|
1356
|
-
|
1357
|
-
|
1358
|
-
Name | Type | Description | Notes
|
1359
|
-
------------- | ------------- | ------------- | -------------
|
1360
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1361
|
-
**timesheet_id** | [**String**](.md)| Identifier for the timesheet |
|
1362
|
-
**timesheet_line** | [**TimesheetLine**](TimesheetLine.md)| |
|
1363
|
-
|
1364
|
-
### Return type
|
1365
|
-
|
1366
|
-
[**TimesheetLineObject**](TimesheetLineObject.md)
|
1367
|
-
|
1368
|
-
### Authorization
|
1369
|
-
|
1370
|
-
[OAuth2](../README.md#OAuth2)
|
1371
|
-
|
1372
|
-
### HTTP request headers
|
1373
|
-
|
1374
|
-
- **Content-Type**: application/json
|
1375
|
-
- **Accept**: application/json
|
1376
|
-
|
1377
|
-
|
1378
|
-
## delete_employee_earnings_template
|
1379
|
-
|
1380
|
-
> EarningsTemplateObject delete_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id)
|
1381
|
-
|
1382
|
-
deletes an employee earnings template record
|
1383
|
-
|
1384
|
-
### Example
|
1385
|
-
|
1386
|
-
```ruby
|
1387
|
-
# load the gem
|
1388
|
-
require 'xero-ruby'
|
1389
|
-
|
1390
|
-
creds = {
|
1391
|
-
client_id: ENV['CLIENT_ID'],
|
1392
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1393
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1394
|
-
scopes: ENV['SCOPES']
|
1395
|
-
}
|
1396
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1397
|
-
|
1398
|
-
token_set = fetch_valid_token_set(user) # example
|
1399
|
-
|
1400
|
-
xero_client.refresh_token_set(token_set)
|
1401
|
-
|
1402
|
-
# You need to namespace your api method call to one of the following api sets
|
1403
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1404
|
-
|
1405
|
-
api_instance = xero_client.<api_set>
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1410
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
1411
|
-
pay_template_earning_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # String | Id for single pay template earnings object
|
1412
|
-
begin
|
1413
|
-
#deletes an employee earnings template record
|
1414
|
-
result = api_instance.delete_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id)
|
1415
|
-
p result
|
1416
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1417
|
-
puts "Exception when calling PayrollNzApi->delete_employee_earnings_template: #{e}"
|
1418
|
-
end
|
1419
|
-
```
|
1420
|
-
|
1421
|
-
### Parameters
|
1422
|
-
|
1423
|
-
|
1424
|
-
Name | Type | Description | Notes
|
1425
|
-
------------- | ------------- | ------------- | -------------
|
1426
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1427
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
1428
|
-
**pay_template_earning_id** | [**String**](.md)| Id for single pay template earnings object |
|
1429
|
-
|
1430
|
-
### Return type
|
1431
|
-
|
1432
|
-
[**EarningsTemplateObject**](EarningsTemplateObject.md)
|
1433
|
-
|
1434
|
-
### Authorization
|
1435
|
-
|
1436
|
-
[OAuth2](../README.md#OAuth2)
|
1437
|
-
|
1438
|
-
### HTTP request headers
|
1439
|
-
|
1440
|
-
- **Content-Type**: Not defined
|
1441
|
-
- **Accept**: application/json
|
1442
|
-
|
1443
|
-
|
1444
|
-
## delete_employee_leave
|
1445
|
-
|
1446
|
-
> EmployeeLeaveObject delete_employee_leave(xero_tenant_id, employee_id, leave_id)
|
1447
|
-
|
1448
|
-
deletes an employee leave record
|
1449
|
-
|
1450
|
-
### Example
|
1451
|
-
|
1452
|
-
```ruby
|
1453
|
-
# load the gem
|
1454
|
-
require 'xero-ruby'
|
1455
|
-
|
1456
|
-
creds = {
|
1457
|
-
client_id: ENV['CLIENT_ID'],
|
1458
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1459
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1460
|
-
scopes: ENV['SCOPES']
|
1461
|
-
}
|
1462
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1463
|
-
|
1464
|
-
token_set = fetch_valid_token_set(user) # example
|
1465
|
-
|
1466
|
-
xero_client.refresh_token_set(token_set)
|
1467
|
-
|
1468
|
-
# You need to namespace your api method call to one of the following api sets
|
1469
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1470
|
-
|
1471
|
-
api_instance = xero_client.<api_set>
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1476
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
1477
|
-
leave_id = 'c4be24e5-e840-4c92-9eaa-2d86cd596314' # String | Leave id for single object
|
1478
|
-
begin
|
1479
|
-
#deletes an employee leave record
|
1480
|
-
result = api_instance.delete_employee_leave(xero_tenant_id, employee_id, leave_id)
|
1481
|
-
p result
|
1482
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1483
|
-
puts "Exception when calling PayrollNzApi->delete_employee_leave: #{e}"
|
1484
|
-
end
|
1485
|
-
```
|
1486
|
-
|
1487
|
-
### Parameters
|
1488
|
-
|
1489
|
-
|
1490
|
-
Name | Type | Description | Notes
|
1491
|
-
------------- | ------------- | ------------- | -------------
|
1492
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1493
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
1494
|
-
**leave_id** | [**String**](.md)| Leave id for single object |
|
1495
|
-
|
1496
|
-
### Return type
|
1497
|
-
|
1498
|
-
[**EmployeeLeaveObject**](EmployeeLeaveObject.md)
|
1499
|
-
|
1500
|
-
### Authorization
|
1501
|
-
|
1502
|
-
[OAuth2](../README.md#OAuth2)
|
1503
|
-
|
1504
|
-
### HTTP request headers
|
1505
|
-
|
1506
|
-
- **Content-Type**: Not defined
|
1507
|
-
- **Accept**: application/json
|
1508
|
-
|
1509
|
-
|
1510
|
-
## delete_employee_salary_and_wage
|
1511
|
-
|
1512
|
-
> SalaryAndWageObject delete_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id)
|
1513
|
-
|
1514
|
-
deletes an employee salary and wages record
|
1515
|
-
|
1516
|
-
### Example
|
1517
|
-
|
1518
|
-
```ruby
|
1519
|
-
# load the gem
|
1520
|
-
require 'xero-ruby'
|
1521
|
-
|
1522
|
-
creds = {
|
1523
|
-
client_id: ENV['CLIENT_ID'],
|
1524
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1525
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1526
|
-
scopes: ENV['SCOPES']
|
1527
|
-
}
|
1528
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1529
|
-
|
1530
|
-
token_set = fetch_valid_token_set(user) # example
|
1531
|
-
|
1532
|
-
xero_client.refresh_token_set(token_set)
|
1533
|
-
|
1534
|
-
# You need to namespace your api method call to one of the following api sets
|
1535
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1536
|
-
|
1537
|
-
api_instance = xero_client.<api_set>
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1542
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
1543
|
-
salary_and_wages_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # String | Id for single salary and wages object
|
1544
|
-
begin
|
1545
|
-
#deletes an employee salary and wages record
|
1546
|
-
result = api_instance.delete_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id)
|
1547
|
-
p result
|
1548
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1549
|
-
puts "Exception when calling PayrollNzApi->delete_employee_salary_and_wage: #{e}"
|
1550
|
-
end
|
1551
|
-
```
|
1552
|
-
|
1553
|
-
### Parameters
|
1554
|
-
|
1555
|
-
|
1556
|
-
Name | Type | Description | Notes
|
1557
|
-
------------- | ------------- | ------------- | -------------
|
1558
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1559
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
1560
|
-
**salary_and_wages_id** | [**String**](.md)| Id for single salary and wages object |
|
1561
|
-
|
1562
|
-
### Return type
|
1563
|
-
|
1564
|
-
[**SalaryAndWageObject**](SalaryAndWageObject.md)
|
1565
|
-
|
1566
|
-
### Authorization
|
1567
|
-
|
1568
|
-
[OAuth2](../README.md#OAuth2)
|
1569
|
-
|
1570
|
-
### HTTP request headers
|
1571
|
-
|
1572
|
-
- **Content-Type**: Not defined
|
1573
|
-
- **Accept**: application/json
|
1574
|
-
|
1575
|
-
|
1576
|
-
## delete_timesheet
|
1577
|
-
|
1578
|
-
> TimesheetLine delete_timesheet(xero_tenant_id, timesheet_id)
|
1579
|
-
|
1580
|
-
delete a timesheet
|
1581
|
-
|
1582
|
-
### Example
|
1583
|
-
|
1584
|
-
```ruby
|
1585
|
-
# load the gem
|
1586
|
-
require 'xero-ruby'
|
1587
|
-
|
1588
|
-
creds = {
|
1589
|
-
client_id: ENV['CLIENT_ID'],
|
1590
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1591
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1592
|
-
scopes: ENV['SCOPES']
|
1593
|
-
}
|
1594
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1595
|
-
|
1596
|
-
token_set = fetch_valid_token_set(user) # example
|
1597
|
-
|
1598
|
-
xero_client.refresh_token_set(token_set)
|
1599
|
-
|
1600
|
-
# You need to namespace your api method call to one of the following api sets
|
1601
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1602
|
-
|
1603
|
-
api_instance = xero_client.<api_set>
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1608
|
-
timesheet_id = 'timesheet_id_example' # String | Identifier for the timesheet
|
1609
|
-
begin
|
1610
|
-
#delete a timesheet
|
1611
|
-
result = api_instance.delete_timesheet(xero_tenant_id, timesheet_id)
|
1612
|
-
p result
|
1613
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1614
|
-
puts "Exception when calling PayrollNzApi->delete_timesheet: #{e}"
|
1615
|
-
end
|
1616
|
-
```
|
1617
|
-
|
1618
|
-
### Parameters
|
1619
|
-
|
1620
|
-
|
1621
|
-
Name | Type | Description | Notes
|
1622
|
-
------------- | ------------- | ------------- | -------------
|
1623
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1624
|
-
**timesheet_id** | [**String**](.md)| Identifier for the timesheet |
|
1625
|
-
|
1626
|
-
### Return type
|
1627
|
-
|
1628
|
-
[**TimesheetLine**](TimesheetLine.md)
|
1629
|
-
|
1630
|
-
### Authorization
|
1631
|
-
|
1632
|
-
[OAuth2](../README.md#OAuth2)
|
1633
|
-
|
1634
|
-
### HTTP request headers
|
1635
|
-
|
1636
|
-
- **Content-Type**: Not defined
|
1637
|
-
- **Accept**: application/json
|
1638
|
-
|
1639
|
-
|
1640
|
-
## delete_timesheet_line
|
1641
|
-
|
1642
|
-
> TimesheetLine delete_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id)
|
1643
|
-
|
1644
|
-
delete a timesheet line
|
1645
|
-
|
1646
|
-
### Example
|
1647
|
-
|
1648
|
-
```ruby
|
1649
|
-
# load the gem
|
1650
|
-
require 'xero-ruby'
|
1651
|
-
|
1652
|
-
creds = {
|
1653
|
-
client_id: ENV['CLIENT_ID'],
|
1654
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1655
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1656
|
-
scopes: ENV['SCOPES']
|
1657
|
-
}
|
1658
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1659
|
-
|
1660
|
-
token_set = fetch_valid_token_set(user) # example
|
1661
|
-
|
1662
|
-
xero_client.refresh_token_set(token_set)
|
1663
|
-
|
1664
|
-
# You need to namespace your api method call to one of the following api sets
|
1665
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1666
|
-
|
1667
|
-
api_instance = xero_client.<api_set>
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1672
|
-
timesheet_id = 'timesheet_id_example' # String | Identifier for the timesheet
|
1673
|
-
timesheet_line_id = 'timesheet_line_id_example' # String | Identifier for the timesheet line
|
1674
|
-
begin
|
1675
|
-
#delete a timesheet line
|
1676
|
-
result = api_instance.delete_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id)
|
1677
|
-
p result
|
1678
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1679
|
-
puts "Exception when calling PayrollNzApi->delete_timesheet_line: #{e}"
|
1680
|
-
end
|
1681
|
-
```
|
1682
|
-
|
1683
|
-
### Parameters
|
1684
|
-
|
1685
|
-
|
1686
|
-
Name | Type | Description | Notes
|
1687
|
-
------------- | ------------- | ------------- | -------------
|
1688
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1689
|
-
**timesheet_id** | [**String**](.md)| Identifier for the timesheet |
|
1690
|
-
**timesheet_line_id** | [**String**](.md)| Identifier for the timesheet line |
|
1691
|
-
|
1692
|
-
### Return type
|
1693
|
-
|
1694
|
-
[**TimesheetLine**](TimesheetLine.md)
|
1695
|
-
|
1696
|
-
### Authorization
|
1697
|
-
|
1698
|
-
[OAuth2](../README.md#OAuth2)
|
1699
|
-
|
1700
|
-
### HTTP request headers
|
1701
|
-
|
1702
|
-
- **Content-Type**: Not defined
|
1703
|
-
- **Accept**: application/json
|
1704
|
-
|
1705
|
-
|
1706
|
-
## get_deduction
|
1707
|
-
|
1708
|
-
> DeductionObject get_deduction(xero_tenant_id, deduction_id)
|
1709
|
-
|
1710
|
-
retrieve a single deduction by id
|
1711
|
-
|
1712
|
-
### Example
|
1713
|
-
|
1714
|
-
```ruby
|
1715
|
-
# load the gem
|
1716
|
-
require 'xero-ruby'
|
1717
|
-
|
1718
|
-
creds = {
|
1719
|
-
client_id: ENV['CLIENT_ID'],
|
1720
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1721
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1722
|
-
scopes: ENV['SCOPES']
|
1723
|
-
}
|
1724
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1725
|
-
|
1726
|
-
token_set = fetch_valid_token_set(user) # example
|
1727
|
-
|
1728
|
-
xero_client.refresh_token_set(token_set)
|
1729
|
-
|
1730
|
-
# You need to namespace your api method call to one of the following api sets
|
1731
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1732
|
-
|
1733
|
-
api_instance = xero_client.<api_set>
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1738
|
-
deduction_id = 'deduction_id_example' # String | Identifier for the deduction
|
1739
|
-
begin
|
1740
|
-
#retrieve a single deduction by id
|
1741
|
-
result = api_instance.get_deduction(xero_tenant_id, deduction_id)
|
1742
|
-
p result
|
1743
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1744
|
-
puts "Exception when calling PayrollNzApi->get_deduction: #{e}"
|
1745
|
-
end
|
1746
|
-
```
|
1747
|
-
|
1748
|
-
### Parameters
|
1749
|
-
|
1750
|
-
|
1751
|
-
Name | Type | Description | Notes
|
1752
|
-
------------- | ------------- | ------------- | -------------
|
1753
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1754
|
-
**deduction_id** | [**String**](.md)| Identifier for the deduction |
|
1755
|
-
|
1756
|
-
### Return type
|
1757
|
-
|
1758
|
-
[**DeductionObject**](DeductionObject.md)
|
1759
|
-
|
1760
|
-
### Authorization
|
1761
|
-
|
1762
|
-
[OAuth2](../README.md#OAuth2)
|
1763
|
-
|
1764
|
-
### HTTP request headers
|
1765
|
-
|
1766
|
-
- **Content-Type**: Not defined
|
1767
|
-
- **Accept**: application/json
|
1768
|
-
|
1769
|
-
|
1770
|
-
## get_deductions
|
1771
|
-
|
1772
|
-
> Deductions get_deductions(xero_tenant_id, opts)
|
1773
|
-
|
1774
|
-
searches deductions
|
1775
|
-
|
1776
|
-
### Example
|
1777
|
-
|
1778
|
-
```ruby
|
1779
|
-
# load the gem
|
1780
|
-
require 'xero-ruby'
|
1781
|
-
|
1782
|
-
creds = {
|
1783
|
-
client_id: ENV['CLIENT_ID'],
|
1784
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1785
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1786
|
-
scopes: ENV['SCOPES']
|
1787
|
-
}
|
1788
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1789
|
-
|
1790
|
-
token_set = fetch_valid_token_set(user) # example
|
1791
|
-
|
1792
|
-
xero_client.refresh_token_set(token_set)
|
1793
|
-
|
1794
|
-
# You need to namespace your api method call to one of the following api sets
|
1795
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1796
|
-
|
1797
|
-
api_instance = xero_client.<api_set>
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1802
|
-
opts = {
|
1803
|
-
page: 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
1804
|
-
}
|
1805
|
-
|
1806
|
-
begin
|
1807
|
-
#searches deductions
|
1808
|
-
result = api_instance.get_deductions(xero_tenant_id, opts)
|
1809
|
-
p result
|
1810
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1811
|
-
puts "Exception when calling PayrollNzApi->get_deductions: #{e}"
|
1812
|
-
end
|
1813
|
-
```
|
1814
|
-
|
1815
|
-
### Parameters
|
1816
|
-
|
1817
|
-
|
1818
|
-
Name | Type | Description | Notes
|
1819
|
-
------------- | ------------- | ------------- | -------------
|
1820
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1821
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
1822
|
-
|
1823
|
-
### Return type
|
1824
|
-
|
1825
|
-
[**Deductions**](Deductions.md)
|
1826
|
-
|
1827
|
-
### Authorization
|
1828
|
-
|
1829
|
-
[OAuth2](../README.md#OAuth2)
|
1830
|
-
|
1831
|
-
### HTTP request headers
|
1832
|
-
|
1833
|
-
- **Content-Type**: Not defined
|
1834
|
-
- **Accept**: application/json
|
1835
|
-
|
1836
|
-
|
1837
|
-
## get_earnings_rate
|
1838
|
-
|
1839
|
-
> EarningsRateObject get_earnings_rate(xero_tenant_id, earnings_rate_id)
|
1840
|
-
|
1841
|
-
retrieve a single earnings rates by id
|
1842
|
-
|
1843
|
-
### Example
|
1844
|
-
|
1845
|
-
```ruby
|
1846
|
-
# load the gem
|
1847
|
-
require 'xero-ruby'
|
1848
|
-
|
1849
|
-
creds = {
|
1850
|
-
client_id: ENV['CLIENT_ID'],
|
1851
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1852
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1853
|
-
scopes: ENV['SCOPES']
|
1854
|
-
}
|
1855
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1856
|
-
|
1857
|
-
token_set = fetch_valid_token_set(user) # example
|
1858
|
-
|
1859
|
-
xero_client.refresh_token_set(token_set)
|
1860
|
-
|
1861
|
-
# You need to namespace your api method call to one of the following api sets
|
1862
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1863
|
-
|
1864
|
-
api_instance = xero_client.<api_set>
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1869
|
-
earnings_rate_id = 'earnings_rate_id_example' # String | Identifier for the earnings rate
|
1870
|
-
begin
|
1871
|
-
#retrieve a single earnings rates by id
|
1872
|
-
result = api_instance.get_earnings_rate(xero_tenant_id, earnings_rate_id)
|
1873
|
-
p result
|
1874
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1875
|
-
puts "Exception when calling PayrollNzApi->get_earnings_rate: #{e}"
|
1876
|
-
end
|
1877
|
-
```
|
1878
|
-
|
1879
|
-
### Parameters
|
1880
|
-
|
1881
|
-
|
1882
|
-
Name | Type | Description | Notes
|
1883
|
-
------------- | ------------- | ------------- | -------------
|
1884
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1885
|
-
**earnings_rate_id** | [**String**](.md)| Identifier for the earnings rate |
|
1886
|
-
|
1887
|
-
### Return type
|
1888
|
-
|
1889
|
-
[**EarningsRateObject**](EarningsRateObject.md)
|
1890
|
-
|
1891
|
-
### Authorization
|
1892
|
-
|
1893
|
-
[OAuth2](../README.md#OAuth2)
|
1894
|
-
|
1895
|
-
### HTTP request headers
|
1896
|
-
|
1897
|
-
- **Content-Type**: Not defined
|
1898
|
-
- **Accept**: application/json
|
1899
|
-
|
1900
|
-
|
1901
|
-
## get_earnings_rates
|
1902
|
-
|
1903
|
-
> EarningsRates get_earnings_rates(xero_tenant_id, opts)
|
1904
|
-
|
1905
|
-
searches earnings rates
|
1906
|
-
|
1907
|
-
### Example
|
1908
|
-
|
1909
|
-
```ruby
|
1910
|
-
# load the gem
|
1911
|
-
require 'xero-ruby'
|
1912
|
-
|
1913
|
-
creds = {
|
1914
|
-
client_id: ENV['CLIENT_ID'],
|
1915
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1916
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1917
|
-
scopes: ENV['SCOPES']
|
1918
|
-
}
|
1919
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1920
|
-
|
1921
|
-
token_set = fetch_valid_token_set(user) # example
|
1922
|
-
|
1923
|
-
xero_client.refresh_token_set(token_set)
|
1924
|
-
|
1925
|
-
# You need to namespace your api method call to one of the following api sets
|
1926
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1927
|
-
|
1928
|
-
api_instance = xero_client.<api_set>
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1932
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
1933
|
-
opts = {
|
1934
|
-
page: 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
1935
|
-
}
|
1936
|
-
|
1937
|
-
begin
|
1938
|
-
#searches earnings rates
|
1939
|
-
result = api_instance.get_earnings_rates(xero_tenant_id, opts)
|
1940
|
-
p result
|
1941
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
1942
|
-
puts "Exception when calling PayrollNzApi->get_earnings_rates: #{e}"
|
1943
|
-
end
|
1944
|
-
```
|
1945
|
-
|
1946
|
-
### Parameters
|
1947
|
-
|
1948
|
-
|
1949
|
-
Name | Type | Description | Notes
|
1950
|
-
------------- | ------------- | ------------- | -------------
|
1951
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
1952
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
1953
|
-
|
1954
|
-
### Return type
|
1955
|
-
|
1956
|
-
[**EarningsRates**](EarningsRates.md)
|
1957
|
-
|
1958
|
-
### Authorization
|
1959
|
-
|
1960
|
-
[OAuth2](../README.md#OAuth2)
|
1961
|
-
|
1962
|
-
### HTTP request headers
|
1963
|
-
|
1964
|
-
- **Content-Type**: Not defined
|
1965
|
-
- **Accept**: application/json
|
1966
|
-
|
1967
|
-
|
1968
|
-
## get_employee
|
1969
|
-
|
1970
|
-
> EmployeeObject get_employee(xero_tenant_id, employee_id)
|
1971
|
-
|
1972
|
-
searches employees
|
1973
|
-
|
1974
|
-
### Example
|
1975
|
-
|
1976
|
-
```ruby
|
1977
|
-
# load the gem
|
1978
|
-
require 'xero-ruby'
|
1979
|
-
|
1980
|
-
creds = {
|
1981
|
-
client_id: ENV['CLIENT_ID'],
|
1982
|
-
client_secret: ENV['CLIENT_SECRET'],
|
1983
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
1984
|
-
scopes: ENV['SCOPES']
|
1985
|
-
}
|
1986
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
1987
|
-
|
1988
|
-
token_set = fetch_valid_token_set(user) # example
|
1989
|
-
|
1990
|
-
xero_client.refresh_token_set(token_set)
|
1991
|
-
|
1992
|
-
# You need to namespace your api method call to one of the following api sets
|
1993
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
1994
|
-
|
1995
|
-
api_instance = xero_client.<api_set>
|
1996
|
-
|
1997
|
-
|
1998
|
-
|
1999
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2000
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2001
|
-
begin
|
2002
|
-
#searches employees
|
2003
|
-
result = api_instance.get_employee(xero_tenant_id, employee_id)
|
2004
|
-
p result
|
2005
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2006
|
-
puts "Exception when calling PayrollNzApi->get_employee: #{e}"
|
2007
|
-
end
|
2008
|
-
```
|
2009
|
-
|
2010
|
-
### Parameters
|
2011
|
-
|
2012
|
-
|
2013
|
-
Name | Type | Description | Notes
|
2014
|
-
------------- | ------------- | ------------- | -------------
|
2015
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2016
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2017
|
-
|
2018
|
-
### Return type
|
2019
|
-
|
2020
|
-
[**EmployeeObject**](EmployeeObject.md)
|
2021
|
-
|
2022
|
-
### Authorization
|
2023
|
-
|
2024
|
-
[OAuth2](../README.md#OAuth2)
|
2025
|
-
|
2026
|
-
### HTTP request headers
|
2027
|
-
|
2028
|
-
- **Content-Type**: Not defined
|
2029
|
-
- **Accept**: application/json
|
2030
|
-
|
2031
|
-
|
2032
|
-
## get_employee_leave_balances
|
2033
|
-
|
2034
|
-
> EmployeeLeaveBalances get_employee_leave_balances(xero_tenant_id, employee_id)
|
2035
|
-
|
2036
|
-
search employee leave balances
|
2037
|
-
|
2038
|
-
### Example
|
2039
|
-
|
2040
|
-
```ruby
|
2041
|
-
# load the gem
|
2042
|
-
require 'xero-ruby'
|
2043
|
-
|
2044
|
-
creds = {
|
2045
|
-
client_id: ENV['CLIENT_ID'],
|
2046
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2047
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2048
|
-
scopes: ENV['SCOPES']
|
2049
|
-
}
|
2050
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2051
|
-
|
2052
|
-
token_set = fetch_valid_token_set(user) # example
|
2053
|
-
|
2054
|
-
xero_client.refresh_token_set(token_set)
|
2055
|
-
|
2056
|
-
# You need to namespace your api method call to one of the following api sets
|
2057
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2058
|
-
|
2059
|
-
api_instance = xero_client.<api_set>
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2064
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2065
|
-
begin
|
2066
|
-
#search employee leave balances
|
2067
|
-
result = api_instance.get_employee_leave_balances(xero_tenant_id, employee_id)
|
2068
|
-
p result
|
2069
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2070
|
-
puts "Exception when calling PayrollNzApi->get_employee_leave_balances: #{e}"
|
2071
|
-
end
|
2072
|
-
```
|
2073
|
-
|
2074
|
-
### Parameters
|
2075
|
-
|
2076
|
-
|
2077
|
-
Name | Type | Description | Notes
|
2078
|
-
------------- | ------------- | ------------- | -------------
|
2079
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2080
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2081
|
-
|
2082
|
-
### Return type
|
2083
|
-
|
2084
|
-
[**EmployeeLeaveBalances**](EmployeeLeaveBalances.md)
|
2085
|
-
|
2086
|
-
### Authorization
|
2087
|
-
|
2088
|
-
[OAuth2](../README.md#OAuth2)
|
2089
|
-
|
2090
|
-
### HTTP request headers
|
2091
|
-
|
2092
|
-
- **Content-Type**: Not defined
|
2093
|
-
- **Accept**: application/json
|
2094
|
-
|
2095
|
-
|
2096
|
-
## get_employee_leave_periods
|
2097
|
-
|
2098
|
-
> LeavePeriods get_employee_leave_periods(xero_tenant_id, employee_id, opts)
|
2099
|
-
|
2100
|
-
searches employee leave periods
|
2101
|
-
|
2102
|
-
### Example
|
2103
|
-
|
2104
|
-
```ruby
|
2105
|
-
# load the gem
|
2106
|
-
require 'xero-ruby'
|
2107
|
-
|
2108
|
-
creds = {
|
2109
|
-
client_id: ENV['CLIENT_ID'],
|
2110
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2111
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2112
|
-
scopes: ENV['SCOPES']
|
2113
|
-
}
|
2114
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2115
|
-
|
2116
|
-
token_set = fetch_valid_token_set(user) # example
|
2117
|
-
|
2118
|
-
xero_client.refresh_token_set(token_set)
|
2119
|
-
|
2120
|
-
# You need to namespace your api method call to one of the following api sets
|
2121
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2122
|
-
|
2123
|
-
api_instance = xero_client.<api_set>
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2127
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2128
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2129
|
-
opts = {
|
2130
|
-
start_date: Date.parse('2013-10-20'), # Date | Filter by start date
|
2131
|
-
|
2132
|
-
end_date: Date.parse('Johnson') # Date | Filter by end date
|
2133
|
-
}
|
2134
|
-
|
2135
|
-
begin
|
2136
|
-
#searches employee leave periods
|
2137
|
-
result = api_instance.get_employee_leave_periods(xero_tenant_id, employee_id, opts)
|
2138
|
-
p result
|
2139
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2140
|
-
puts "Exception when calling PayrollNzApi->get_employee_leave_periods: #{e}"
|
2141
|
-
end
|
2142
|
-
```
|
2143
|
-
|
2144
|
-
### Parameters
|
2145
|
-
|
2146
|
-
|
2147
|
-
Name | Type | Description | Notes
|
2148
|
-
------------- | ------------- | ------------- | -------------
|
2149
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2150
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2151
|
-
**start_date** | **Date**| Filter by start date | [optional]
|
2152
|
-
**end_date** | **Date**| Filter by end date | [optional]
|
2153
|
-
|
2154
|
-
### Return type
|
2155
|
-
|
2156
|
-
[**LeavePeriods**](LeavePeriods.md)
|
2157
|
-
|
2158
|
-
### Authorization
|
2159
|
-
|
2160
|
-
[OAuth2](../README.md#OAuth2)
|
2161
|
-
|
2162
|
-
### HTTP request headers
|
2163
|
-
|
2164
|
-
- **Content-Type**: Not defined
|
2165
|
-
- **Accept**: application/json
|
2166
|
-
|
2167
|
-
|
2168
|
-
## get_employee_leave_types
|
2169
|
-
|
2170
|
-
> EmployeeLeaveTypes get_employee_leave_types(xero_tenant_id, employee_id)
|
2171
|
-
|
2172
|
-
searches employee leave types
|
2173
|
-
|
2174
|
-
### Example
|
2175
|
-
|
2176
|
-
```ruby
|
2177
|
-
# load the gem
|
2178
|
-
require 'xero-ruby'
|
2179
|
-
|
2180
|
-
creds = {
|
2181
|
-
client_id: ENV['CLIENT_ID'],
|
2182
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2183
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2184
|
-
scopes: ENV['SCOPES']
|
2185
|
-
}
|
2186
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2187
|
-
|
2188
|
-
token_set = fetch_valid_token_set(user) # example
|
2189
|
-
|
2190
|
-
xero_client.refresh_token_set(token_set)
|
2191
|
-
|
2192
|
-
# You need to namespace your api method call to one of the following api sets
|
2193
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2194
|
-
|
2195
|
-
api_instance = xero_client.<api_set>
|
2196
|
-
|
2197
|
-
|
2198
|
-
|
2199
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2200
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2201
|
-
begin
|
2202
|
-
#searches employee leave types
|
2203
|
-
result = api_instance.get_employee_leave_types(xero_tenant_id, employee_id)
|
2204
|
-
p result
|
2205
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2206
|
-
puts "Exception when calling PayrollNzApi->get_employee_leave_types: #{e}"
|
2207
|
-
end
|
2208
|
-
```
|
2209
|
-
|
2210
|
-
### Parameters
|
2211
|
-
|
2212
|
-
|
2213
|
-
Name | Type | Description | Notes
|
2214
|
-
------------- | ------------- | ------------- | -------------
|
2215
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2216
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2217
|
-
|
2218
|
-
### Return type
|
2219
|
-
|
2220
|
-
[**EmployeeLeaveTypes**](EmployeeLeaveTypes.md)
|
2221
|
-
|
2222
|
-
### Authorization
|
2223
|
-
|
2224
|
-
[OAuth2](../README.md#OAuth2)
|
2225
|
-
|
2226
|
-
### HTTP request headers
|
2227
|
-
|
2228
|
-
- **Content-Type**: Not defined
|
2229
|
-
- **Accept**: application/json
|
2230
|
-
|
2231
|
-
|
2232
|
-
## get_employee_leaves
|
2233
|
-
|
2234
|
-
> EmployeeLeaves get_employee_leaves(xero_tenant_id, employee_id)
|
2235
|
-
|
2236
|
-
search employee leave records
|
2237
|
-
|
2238
|
-
### Example
|
2239
|
-
|
2240
|
-
```ruby
|
2241
|
-
# load the gem
|
2242
|
-
require 'xero-ruby'
|
2243
|
-
|
2244
|
-
creds = {
|
2245
|
-
client_id: ENV['CLIENT_ID'],
|
2246
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2247
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2248
|
-
scopes: ENV['SCOPES']
|
2249
|
-
}
|
2250
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2251
|
-
|
2252
|
-
token_set = fetch_valid_token_set(user) # example
|
2253
|
-
|
2254
|
-
xero_client.refresh_token_set(token_set)
|
2255
|
-
|
2256
|
-
# You need to namespace your api method call to one of the following api sets
|
2257
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2258
|
-
|
2259
|
-
api_instance = xero_client.<api_set>
|
2260
|
-
|
2261
|
-
|
2262
|
-
|
2263
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2264
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2265
|
-
begin
|
2266
|
-
#search employee leave records
|
2267
|
-
result = api_instance.get_employee_leaves(xero_tenant_id, employee_id)
|
2268
|
-
p result
|
2269
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2270
|
-
puts "Exception when calling PayrollNzApi->get_employee_leaves: #{e}"
|
2271
|
-
end
|
2272
|
-
```
|
2273
|
-
|
2274
|
-
### Parameters
|
2275
|
-
|
2276
|
-
|
2277
|
-
Name | Type | Description | Notes
|
2278
|
-
------------- | ------------- | ------------- | -------------
|
2279
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2280
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2281
|
-
|
2282
|
-
### Return type
|
2283
|
-
|
2284
|
-
[**EmployeeLeaves**](EmployeeLeaves.md)
|
2285
|
-
|
2286
|
-
### Authorization
|
2287
|
-
|
2288
|
-
[OAuth2](../README.md#OAuth2)
|
2289
|
-
|
2290
|
-
### HTTP request headers
|
2291
|
-
|
2292
|
-
- **Content-Type**: Not defined
|
2293
|
-
- **Accept**: application/json
|
2294
|
-
|
2295
|
-
|
2296
|
-
## get_employee_opening_balances
|
2297
|
-
|
2298
|
-
> EmployeeOpeningBalancesObject get_employee_opening_balances(xero_tenant_id, employee_id)
|
2299
|
-
|
2300
|
-
retrieve employee openingbalances
|
2301
|
-
|
2302
|
-
### Example
|
2303
|
-
|
2304
|
-
```ruby
|
2305
|
-
# load the gem
|
2306
|
-
require 'xero-ruby'
|
2307
|
-
|
2308
|
-
creds = {
|
2309
|
-
client_id: ENV['CLIENT_ID'],
|
2310
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2311
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2312
|
-
scopes: ENV['SCOPES']
|
2313
|
-
}
|
2314
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2315
|
-
|
2316
|
-
token_set = fetch_valid_token_set(user) # example
|
2317
|
-
|
2318
|
-
xero_client.refresh_token_set(token_set)
|
2319
|
-
|
2320
|
-
# You need to namespace your api method call to one of the following api sets
|
2321
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2322
|
-
|
2323
|
-
api_instance = xero_client.<api_set>
|
2324
|
-
|
2325
|
-
|
2326
|
-
|
2327
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2328
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2329
|
-
begin
|
2330
|
-
#retrieve employee openingbalances
|
2331
|
-
result = api_instance.get_employee_opening_balances(xero_tenant_id, employee_id)
|
2332
|
-
p result
|
2333
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2334
|
-
puts "Exception when calling PayrollNzApi->get_employee_opening_balances: #{e}"
|
2335
|
-
end
|
2336
|
-
```
|
2337
|
-
|
2338
|
-
### Parameters
|
2339
|
-
|
2340
|
-
|
2341
|
-
Name | Type | Description | Notes
|
2342
|
-
------------- | ------------- | ------------- | -------------
|
2343
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2344
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2345
|
-
|
2346
|
-
### Return type
|
2347
|
-
|
2348
|
-
[**EmployeeOpeningBalancesObject**](EmployeeOpeningBalancesObject.md)
|
2349
|
-
|
2350
|
-
### Authorization
|
2351
|
-
|
2352
|
-
[OAuth2](../README.md#OAuth2)
|
2353
|
-
|
2354
|
-
### HTTP request headers
|
2355
|
-
|
2356
|
-
- **Content-Type**: Not defined
|
2357
|
-
- **Accept**: application/json
|
2358
|
-
|
2359
|
-
|
2360
|
-
## get_employee_pay_templates
|
2361
|
-
|
2362
|
-
> EmployeePayTemplates get_employee_pay_templates(xero_tenant_id, employee_id)
|
2363
|
-
|
2364
|
-
searches employee pay templates
|
2365
|
-
|
2366
|
-
### Example
|
2367
|
-
|
2368
|
-
```ruby
|
2369
|
-
# load the gem
|
2370
|
-
require 'xero-ruby'
|
2371
|
-
|
2372
|
-
creds = {
|
2373
|
-
client_id: ENV['CLIENT_ID'],
|
2374
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2375
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2376
|
-
scopes: ENV['SCOPES']
|
2377
|
-
}
|
2378
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2379
|
-
|
2380
|
-
token_set = fetch_valid_token_set(user) # example
|
2381
|
-
|
2382
|
-
xero_client.refresh_token_set(token_set)
|
2383
|
-
|
2384
|
-
# You need to namespace your api method call to one of the following api sets
|
2385
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2386
|
-
|
2387
|
-
api_instance = xero_client.<api_set>
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2392
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2393
|
-
begin
|
2394
|
-
#searches employee pay templates
|
2395
|
-
result = api_instance.get_employee_pay_templates(xero_tenant_id, employee_id)
|
2396
|
-
p result
|
2397
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2398
|
-
puts "Exception when calling PayrollNzApi->get_employee_pay_templates: #{e}"
|
2399
|
-
end
|
2400
|
-
```
|
2401
|
-
|
2402
|
-
### Parameters
|
2403
|
-
|
2404
|
-
|
2405
|
-
Name | Type | Description | Notes
|
2406
|
-
------------- | ------------- | ------------- | -------------
|
2407
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2408
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2409
|
-
|
2410
|
-
### Return type
|
2411
|
-
|
2412
|
-
[**EmployeePayTemplates**](EmployeePayTemplates.md)
|
2413
|
-
|
2414
|
-
### Authorization
|
2415
|
-
|
2416
|
-
[OAuth2](../README.md#OAuth2)
|
2417
|
-
|
2418
|
-
### HTTP request headers
|
2419
|
-
|
2420
|
-
- **Content-Type**: Not defined
|
2421
|
-
- **Accept**: application/json
|
2422
|
-
|
2423
|
-
|
2424
|
-
## get_employee_payment_method
|
2425
|
-
|
2426
|
-
> PaymentMethodObject get_employee_payment_method(xero_tenant_id, employee_id)
|
2427
|
-
|
2428
|
-
retrieves an employee's payment method
|
2429
|
-
|
2430
|
-
### Example
|
2431
|
-
|
2432
|
-
```ruby
|
2433
|
-
# load the gem
|
2434
|
-
require 'xero-ruby'
|
2435
|
-
|
2436
|
-
creds = {
|
2437
|
-
client_id: ENV['CLIENT_ID'],
|
2438
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2439
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2440
|
-
scopes: ENV['SCOPES']
|
2441
|
-
}
|
2442
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2443
|
-
|
2444
|
-
token_set = fetch_valid_token_set(user) # example
|
2445
|
-
|
2446
|
-
xero_client.refresh_token_set(token_set)
|
2447
|
-
|
2448
|
-
# You need to namespace your api method call to one of the following api sets
|
2449
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2450
|
-
|
2451
|
-
api_instance = xero_client.<api_set>
|
2452
|
-
|
2453
|
-
|
2454
|
-
|
2455
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2456
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2457
|
-
begin
|
2458
|
-
#retrieves an employee's payment method
|
2459
|
-
result = api_instance.get_employee_payment_method(xero_tenant_id, employee_id)
|
2460
|
-
p result
|
2461
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2462
|
-
puts "Exception when calling PayrollNzApi->get_employee_payment_method: #{e}"
|
2463
|
-
end
|
2464
|
-
```
|
2465
|
-
|
2466
|
-
### Parameters
|
2467
|
-
|
2468
|
-
|
2469
|
-
Name | Type | Description | Notes
|
2470
|
-
------------- | ------------- | ------------- | -------------
|
2471
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2472
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2473
|
-
|
2474
|
-
### Return type
|
2475
|
-
|
2476
|
-
[**PaymentMethodObject**](PaymentMethodObject.md)
|
2477
|
-
|
2478
|
-
### Authorization
|
2479
|
-
|
2480
|
-
[OAuth2](../README.md#OAuth2)
|
2481
|
-
|
2482
|
-
### HTTP request headers
|
2483
|
-
|
2484
|
-
- **Content-Type**: Not defined
|
2485
|
-
- **Accept**: application/json
|
2486
|
-
|
2487
|
-
|
2488
|
-
## get_employee_salary_and_wage
|
2489
|
-
|
2490
|
-
> SalaryAndWages get_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id)
|
2491
|
-
|
2492
|
-
get employee salary and wages record by id
|
2493
|
-
|
2494
|
-
### Example
|
2495
|
-
|
2496
|
-
```ruby
|
2497
|
-
# load the gem
|
2498
|
-
require 'xero-ruby'
|
2499
|
-
|
2500
|
-
creds = {
|
2501
|
-
client_id: ENV['CLIENT_ID'],
|
2502
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2503
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2504
|
-
scopes: ENV['SCOPES']
|
2505
|
-
}
|
2506
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2507
|
-
|
2508
|
-
token_set = fetch_valid_token_set(user) # example
|
2509
|
-
|
2510
|
-
xero_client.refresh_token_set(token_set)
|
2511
|
-
|
2512
|
-
# You need to namespace your api method call to one of the following api sets
|
2513
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2514
|
-
|
2515
|
-
api_instance = xero_client.<api_set>
|
2516
|
-
|
2517
|
-
|
2518
|
-
|
2519
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2520
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2521
|
-
salary_and_wages_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # String | Id for single pay template earnings object
|
2522
|
-
begin
|
2523
|
-
#get employee salary and wages record by id
|
2524
|
-
result = api_instance.get_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id)
|
2525
|
-
p result
|
2526
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2527
|
-
puts "Exception when calling PayrollNzApi->get_employee_salary_and_wage: #{e}"
|
2528
|
-
end
|
2529
|
-
```
|
2530
|
-
|
2531
|
-
### Parameters
|
2532
|
-
|
2533
|
-
|
2534
|
-
Name | Type | Description | Notes
|
2535
|
-
------------- | ------------- | ------------- | -------------
|
2536
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2537
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2538
|
-
**salary_and_wages_id** | [**String**](.md)| Id for single pay template earnings object |
|
2539
|
-
|
2540
|
-
### Return type
|
2541
|
-
|
2542
|
-
[**SalaryAndWages**](SalaryAndWages.md)
|
2543
|
-
|
2544
|
-
### Authorization
|
2545
|
-
|
2546
|
-
[OAuth2](../README.md#OAuth2)
|
2547
|
-
|
2548
|
-
### HTTP request headers
|
2549
|
-
|
2550
|
-
- **Content-Type**: Not defined
|
2551
|
-
- **Accept**: application/json
|
2552
|
-
|
2553
|
-
|
2554
|
-
## get_employee_salary_and_wages
|
2555
|
-
|
2556
|
-
> SalaryAndWages get_employee_salary_and_wages(xero_tenant_id, employee_id, opts)
|
2557
|
-
|
2558
|
-
retrieves an employee's salary and wages
|
2559
|
-
|
2560
|
-
### Example
|
2561
|
-
|
2562
|
-
```ruby
|
2563
|
-
# load the gem
|
2564
|
-
require 'xero-ruby'
|
2565
|
-
|
2566
|
-
creds = {
|
2567
|
-
client_id: ENV['CLIENT_ID'],
|
2568
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2569
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2570
|
-
scopes: ENV['SCOPES']
|
2571
|
-
}
|
2572
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2573
|
-
|
2574
|
-
token_set = fetch_valid_token_set(user) # example
|
2575
|
-
|
2576
|
-
xero_client.refresh_token_set(token_set)
|
2577
|
-
|
2578
|
-
# You need to namespace your api method call to one of the following api sets
|
2579
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2580
|
-
|
2581
|
-
api_instance = xero_client.<api_set>
|
2582
|
-
|
2583
|
-
|
2584
|
-
|
2585
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2586
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2587
|
-
opts = {
|
2588
|
-
page: 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
2589
|
-
}
|
2590
|
-
|
2591
|
-
begin
|
2592
|
-
#retrieves an employee's salary and wages
|
2593
|
-
result = api_instance.get_employee_salary_and_wages(xero_tenant_id, employee_id, opts)
|
2594
|
-
p result
|
2595
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2596
|
-
puts "Exception when calling PayrollNzApi->get_employee_salary_and_wages: #{e}"
|
2597
|
-
end
|
2598
|
-
```
|
2599
|
-
|
2600
|
-
### Parameters
|
2601
|
-
|
2602
|
-
|
2603
|
-
Name | Type | Description | Notes
|
2604
|
-
------------- | ------------- | ------------- | -------------
|
2605
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2606
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2607
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
2608
|
-
|
2609
|
-
### Return type
|
2610
|
-
|
2611
|
-
[**SalaryAndWages**](SalaryAndWages.md)
|
2612
|
-
|
2613
|
-
### Authorization
|
2614
|
-
|
2615
|
-
[OAuth2](../README.md#OAuth2)
|
2616
|
-
|
2617
|
-
### HTTP request headers
|
2618
|
-
|
2619
|
-
- **Content-Type**: Not defined
|
2620
|
-
- **Accept**: application/json
|
2621
|
-
|
2622
|
-
|
2623
|
-
## get_employee_tax
|
2624
|
-
|
2625
|
-
> EmployeeTaxObject get_employee_tax(xero_tenant_id, employee_id)
|
2626
|
-
|
2627
|
-
searches tax records for an employee
|
2628
|
-
|
2629
|
-
### Example
|
2630
|
-
|
2631
|
-
```ruby
|
2632
|
-
# load the gem
|
2633
|
-
require 'xero-ruby'
|
2634
|
-
|
2635
|
-
creds = {
|
2636
|
-
client_id: ENV['CLIENT_ID'],
|
2637
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2638
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2639
|
-
scopes: ENV['SCOPES']
|
2640
|
-
}
|
2641
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2642
|
-
|
2643
|
-
token_set = fetch_valid_token_set(user) # example
|
2644
|
-
|
2645
|
-
xero_client.refresh_token_set(token_set)
|
2646
|
-
|
2647
|
-
# You need to namespace your api method call to one of the following api sets
|
2648
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2649
|
-
|
2650
|
-
api_instance = xero_client.<api_set>
|
2651
|
-
|
2652
|
-
|
2653
|
-
|
2654
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2655
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
2656
|
-
begin
|
2657
|
-
#searches tax records for an employee
|
2658
|
-
result = api_instance.get_employee_tax(xero_tenant_id, employee_id)
|
2659
|
-
p result
|
2660
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2661
|
-
puts "Exception when calling PayrollNzApi->get_employee_tax: #{e}"
|
2662
|
-
end
|
2663
|
-
```
|
2664
|
-
|
2665
|
-
### Parameters
|
2666
|
-
|
2667
|
-
|
2668
|
-
Name | Type | Description | Notes
|
2669
|
-
------------- | ------------- | ------------- | -------------
|
2670
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2671
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
2672
|
-
|
2673
|
-
### Return type
|
2674
|
-
|
2675
|
-
[**EmployeeTaxObject**](EmployeeTaxObject.md)
|
2676
|
-
|
2677
|
-
### Authorization
|
2678
|
-
|
2679
|
-
[OAuth2](../README.md#OAuth2)
|
2680
|
-
|
2681
|
-
### HTTP request headers
|
2682
|
-
|
2683
|
-
- **Content-Type**: Not defined
|
2684
|
-
- **Accept**: application/json
|
2685
|
-
|
2686
|
-
|
2687
|
-
## get_employees
|
2688
|
-
|
2689
|
-
> Employees get_employees(xero_tenant_id, opts)
|
2690
|
-
|
2691
|
-
searches employees
|
2692
|
-
|
2693
|
-
### Example
|
2694
|
-
|
2695
|
-
```ruby
|
2696
|
-
# load the gem
|
2697
|
-
require 'xero-ruby'
|
2698
|
-
|
2699
|
-
creds = {
|
2700
|
-
client_id: ENV['CLIENT_ID'],
|
2701
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2702
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2703
|
-
scopes: ENV['SCOPES']
|
2704
|
-
}
|
2705
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2706
|
-
|
2707
|
-
token_set = fetch_valid_token_set(user) # example
|
2708
|
-
|
2709
|
-
xero_client.refresh_token_set(token_set)
|
2710
|
-
|
2711
|
-
# You need to namespace your api method call to one of the following api sets
|
2712
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2713
|
-
|
2714
|
-
api_instance = xero_client.<api_set>
|
2715
|
-
|
2716
|
-
|
2717
|
-
|
2718
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2719
|
-
opts = {
|
2720
|
-
first_name: 'John', # String | Filter by first name
|
2721
|
-
|
2722
|
-
last_name: 'Johnson', # String | Filter by last name
|
2723
|
-
|
2724
|
-
page: 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
2725
|
-
}
|
2726
|
-
|
2727
|
-
begin
|
2728
|
-
#searches employees
|
2729
|
-
result = api_instance.get_employees(xero_tenant_id, opts)
|
2730
|
-
p result
|
2731
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2732
|
-
puts "Exception when calling PayrollNzApi->get_employees: #{e}"
|
2733
|
-
end
|
2734
|
-
```
|
2735
|
-
|
2736
|
-
### Parameters
|
2737
|
-
|
2738
|
-
|
2739
|
-
Name | Type | Description | Notes
|
2740
|
-
------------- | ------------- | ------------- | -------------
|
2741
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2742
|
-
**first_name** | **String**| Filter by first name | [optional]
|
2743
|
-
**last_name** | **String**| Filter by last name | [optional]
|
2744
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
2745
|
-
|
2746
|
-
### Return type
|
2747
|
-
|
2748
|
-
[**Employees**](Employees.md)
|
2749
|
-
|
2750
|
-
### Authorization
|
2751
|
-
|
2752
|
-
[OAuth2](../README.md#OAuth2)
|
2753
|
-
|
2754
|
-
### HTTP request headers
|
2755
|
-
|
2756
|
-
- **Content-Type**: Not defined
|
2757
|
-
- **Accept**: application/json
|
2758
|
-
|
2759
|
-
|
2760
|
-
## get_leave_type
|
2761
|
-
|
2762
|
-
> LeaveTypeObject get_leave_type(xero_tenant_id, leave_type_id)
|
2763
|
-
|
2764
|
-
retrieve a single leave type by id
|
2765
|
-
|
2766
|
-
### Example
|
2767
|
-
|
2768
|
-
```ruby
|
2769
|
-
# load the gem
|
2770
|
-
require 'xero-ruby'
|
2771
|
-
|
2772
|
-
creds = {
|
2773
|
-
client_id: ENV['CLIENT_ID'],
|
2774
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2775
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2776
|
-
scopes: ENV['SCOPES']
|
2777
|
-
}
|
2778
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2779
|
-
|
2780
|
-
token_set = fetch_valid_token_set(user) # example
|
2781
|
-
|
2782
|
-
xero_client.refresh_token_set(token_set)
|
2783
|
-
|
2784
|
-
# You need to namespace your api method call to one of the following api sets
|
2785
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2786
|
-
|
2787
|
-
api_instance = xero_client.<api_set>
|
2788
|
-
|
2789
|
-
|
2790
|
-
|
2791
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2792
|
-
leave_type_id = 'leave_type_id_example' # String | Identifier for the leave type
|
2793
|
-
begin
|
2794
|
-
#retrieve a single leave type by id
|
2795
|
-
result = api_instance.get_leave_type(xero_tenant_id, leave_type_id)
|
2796
|
-
p result
|
2797
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2798
|
-
puts "Exception when calling PayrollNzApi->get_leave_type: #{e}"
|
2799
|
-
end
|
2800
|
-
```
|
2801
|
-
|
2802
|
-
### Parameters
|
2803
|
-
|
2804
|
-
|
2805
|
-
Name | Type | Description | Notes
|
2806
|
-
------------- | ------------- | ------------- | -------------
|
2807
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2808
|
-
**leave_type_id** | [**String**](.md)| Identifier for the leave type |
|
2809
|
-
|
2810
|
-
### Return type
|
2811
|
-
|
2812
|
-
[**LeaveTypeObject**](LeaveTypeObject.md)
|
2813
|
-
|
2814
|
-
### Authorization
|
2815
|
-
|
2816
|
-
[OAuth2](../README.md#OAuth2)
|
2817
|
-
|
2818
|
-
### HTTP request headers
|
2819
|
-
|
2820
|
-
- **Content-Type**: Not defined
|
2821
|
-
- **Accept**: application/json
|
2822
|
-
|
2823
|
-
|
2824
|
-
## get_leave_types
|
2825
|
-
|
2826
|
-
> LeaveTypes get_leave_types(xero_tenant_id, opts)
|
2827
|
-
|
2828
|
-
searches leave types
|
2829
|
-
|
2830
|
-
### Example
|
2831
|
-
|
2832
|
-
```ruby
|
2833
|
-
# load the gem
|
2834
|
-
require 'xero-ruby'
|
2835
|
-
|
2836
|
-
creds = {
|
2837
|
-
client_id: ENV['CLIENT_ID'],
|
2838
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2839
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2840
|
-
scopes: ENV['SCOPES']
|
2841
|
-
}
|
2842
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2843
|
-
|
2844
|
-
token_set = fetch_valid_token_set(user) # example
|
2845
|
-
|
2846
|
-
xero_client.refresh_token_set(token_set)
|
2847
|
-
|
2848
|
-
# You need to namespace your api method call to one of the following api sets
|
2849
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2850
|
-
|
2851
|
-
api_instance = xero_client.<api_set>
|
2852
|
-
|
2853
|
-
|
2854
|
-
|
2855
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2856
|
-
opts = {
|
2857
|
-
page: 56, # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
2858
|
-
|
2859
|
-
active_only: true # Boolean | Filters leave types by active status. By default the API returns all leave types.
|
2860
|
-
}
|
2861
|
-
|
2862
|
-
begin
|
2863
|
-
#searches leave types
|
2864
|
-
result = api_instance.get_leave_types(xero_tenant_id, opts)
|
2865
|
-
p result
|
2866
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2867
|
-
puts "Exception when calling PayrollNzApi->get_leave_types: #{e}"
|
2868
|
-
end
|
2869
|
-
```
|
2870
|
-
|
2871
|
-
### Parameters
|
2872
|
-
|
2873
|
-
|
2874
|
-
Name | Type | Description | Notes
|
2875
|
-
------------- | ------------- | ------------- | -------------
|
2876
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2877
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
2878
|
-
**active_only** | **Boolean**| Filters leave types by active status. By default the API returns all leave types. | [optional]
|
2879
|
-
|
2880
|
-
### Return type
|
2881
|
-
|
2882
|
-
[**LeaveTypes**](LeaveTypes.md)
|
2883
|
-
|
2884
|
-
### Authorization
|
2885
|
-
|
2886
|
-
[OAuth2](../README.md#OAuth2)
|
2887
|
-
|
2888
|
-
### HTTP request headers
|
2889
|
-
|
2890
|
-
- **Content-Type**: Not defined
|
2891
|
-
- **Accept**: application/json
|
2892
|
-
|
2893
|
-
|
2894
|
-
## get_pay_run
|
2895
|
-
|
2896
|
-
> PayRunObject get_pay_run(xero_tenant_id, pay_run_id)
|
2897
|
-
|
2898
|
-
retrieve a single pay run by id
|
2899
|
-
|
2900
|
-
### Example
|
2901
|
-
|
2902
|
-
```ruby
|
2903
|
-
# load the gem
|
2904
|
-
require 'xero-ruby'
|
2905
|
-
|
2906
|
-
creds = {
|
2907
|
-
client_id: ENV['CLIENT_ID'],
|
2908
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2909
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2910
|
-
scopes: ENV['SCOPES']
|
2911
|
-
}
|
2912
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2913
|
-
|
2914
|
-
token_set = fetch_valid_token_set(user) # example
|
2915
|
-
|
2916
|
-
xero_client.refresh_token_set(token_set)
|
2917
|
-
|
2918
|
-
# You need to namespace your api method call to one of the following api sets
|
2919
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2920
|
-
|
2921
|
-
api_instance = xero_client.<api_set>
|
2922
|
-
|
2923
|
-
|
2924
|
-
|
2925
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2926
|
-
pay_run_id = 'pay_run_id_example' # String | Identifier for the pay run
|
2927
|
-
begin
|
2928
|
-
#retrieve a single pay run by id
|
2929
|
-
result = api_instance.get_pay_run(xero_tenant_id, pay_run_id)
|
2930
|
-
p result
|
2931
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2932
|
-
puts "Exception when calling PayrollNzApi->get_pay_run: #{e}"
|
2933
|
-
end
|
2934
|
-
```
|
2935
|
-
|
2936
|
-
### Parameters
|
2937
|
-
|
2938
|
-
|
2939
|
-
Name | Type | Description | Notes
|
2940
|
-
------------- | ------------- | ------------- | -------------
|
2941
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
2942
|
-
**pay_run_id** | [**String**](.md)| Identifier for the pay run |
|
2943
|
-
|
2944
|
-
### Return type
|
2945
|
-
|
2946
|
-
[**PayRunObject**](PayRunObject.md)
|
2947
|
-
|
2948
|
-
### Authorization
|
2949
|
-
|
2950
|
-
[OAuth2](../README.md#OAuth2)
|
2951
|
-
|
2952
|
-
### HTTP request headers
|
2953
|
-
|
2954
|
-
- **Content-Type**: Not defined
|
2955
|
-
- **Accept**: application/json
|
2956
|
-
|
2957
|
-
|
2958
|
-
## get_pay_run_calendar
|
2959
|
-
|
2960
|
-
> PayRunCalendarObject get_pay_run_calendar(xero_tenant_id, payroll_calendar_id)
|
2961
|
-
|
2962
|
-
retrieve a single payrun calendar by id
|
2963
|
-
|
2964
|
-
### Example
|
2965
|
-
|
2966
|
-
```ruby
|
2967
|
-
# load the gem
|
2968
|
-
require 'xero-ruby'
|
2969
|
-
|
2970
|
-
creds = {
|
2971
|
-
client_id: ENV['CLIENT_ID'],
|
2972
|
-
client_secret: ENV['CLIENT_SECRET'],
|
2973
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
2974
|
-
scopes: ENV['SCOPES']
|
2975
|
-
}
|
2976
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
2977
|
-
|
2978
|
-
token_set = fetch_valid_token_set(user) # example
|
2979
|
-
|
2980
|
-
xero_client.refresh_token_set(token_set)
|
2981
|
-
|
2982
|
-
# You need to namespace your api method call to one of the following api sets
|
2983
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
2984
|
-
|
2985
|
-
api_instance = xero_client.<api_set>
|
2986
|
-
|
2987
|
-
|
2988
|
-
|
2989
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
2990
|
-
payroll_calendar_id = 'payroll_calendar_id_example' # String | Identifier for the payrun calendars
|
2991
|
-
begin
|
2992
|
-
#retrieve a single payrun calendar by id
|
2993
|
-
result = api_instance.get_pay_run_calendar(xero_tenant_id, payroll_calendar_id)
|
2994
|
-
p result
|
2995
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
2996
|
-
puts "Exception when calling PayrollNzApi->get_pay_run_calendar: #{e}"
|
2997
|
-
end
|
2998
|
-
```
|
2999
|
-
|
3000
|
-
### Parameters
|
3001
|
-
|
3002
|
-
|
3003
|
-
Name | Type | Description | Notes
|
3004
|
-
------------- | ------------- | ------------- | -------------
|
3005
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3006
|
-
**payroll_calendar_id** | [**String**](.md)| Identifier for the payrun calendars |
|
3007
|
-
|
3008
|
-
### Return type
|
3009
|
-
|
3010
|
-
[**PayRunCalendarObject**](PayRunCalendarObject.md)
|
3011
|
-
|
3012
|
-
### Authorization
|
3013
|
-
|
3014
|
-
[OAuth2](../README.md#OAuth2)
|
3015
|
-
|
3016
|
-
### HTTP request headers
|
3017
|
-
|
3018
|
-
- **Content-Type**: Not defined
|
3019
|
-
- **Accept**: application/json
|
3020
|
-
|
3021
|
-
|
3022
|
-
## get_pay_run_calendars
|
3023
|
-
|
3024
|
-
> PayRunCalendars get_pay_run_calendars(xero_tenant_id, opts)
|
3025
|
-
|
3026
|
-
searches payrun calendars
|
3027
|
-
|
3028
|
-
### Example
|
3029
|
-
|
3030
|
-
```ruby
|
3031
|
-
# load the gem
|
3032
|
-
require 'xero-ruby'
|
3033
|
-
|
3034
|
-
creds = {
|
3035
|
-
client_id: ENV['CLIENT_ID'],
|
3036
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3037
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3038
|
-
scopes: ENV['SCOPES']
|
3039
|
-
}
|
3040
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3041
|
-
|
3042
|
-
token_set = fetch_valid_token_set(user) # example
|
3043
|
-
|
3044
|
-
xero_client.refresh_token_set(token_set)
|
3045
|
-
|
3046
|
-
# You need to namespace your api method call to one of the following api sets
|
3047
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3048
|
-
|
3049
|
-
api_instance = xero_client.<api_set>
|
3050
|
-
|
3051
|
-
|
3052
|
-
|
3053
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3054
|
-
opts = {
|
3055
|
-
page: 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3056
|
-
}
|
3057
|
-
|
3058
|
-
begin
|
3059
|
-
#searches payrun calendars
|
3060
|
-
result = api_instance.get_pay_run_calendars(xero_tenant_id, opts)
|
3061
|
-
p result
|
3062
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3063
|
-
puts "Exception when calling PayrollNzApi->get_pay_run_calendars: #{e}"
|
3064
|
-
end
|
3065
|
-
```
|
3066
|
-
|
3067
|
-
### Parameters
|
3068
|
-
|
3069
|
-
|
3070
|
-
Name | Type | Description | Notes
|
3071
|
-
------------- | ------------- | ------------- | -------------
|
3072
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3073
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
3074
|
-
|
3075
|
-
### Return type
|
3076
|
-
|
3077
|
-
[**PayRunCalendars**](PayRunCalendars.md)
|
3078
|
-
|
3079
|
-
### Authorization
|
3080
|
-
|
3081
|
-
[OAuth2](../README.md#OAuth2)
|
3082
|
-
|
3083
|
-
### HTTP request headers
|
3084
|
-
|
3085
|
-
- **Content-Type**: Not defined
|
3086
|
-
- **Accept**: application/json
|
3087
|
-
|
3088
|
-
|
3089
|
-
## get_pay_runs
|
3090
|
-
|
3091
|
-
> PayRuns get_pay_runs(xero_tenant_id, opts)
|
3092
|
-
|
3093
|
-
searches pay runs
|
3094
|
-
|
3095
|
-
### Example
|
3096
|
-
|
3097
|
-
```ruby
|
3098
|
-
# load the gem
|
3099
|
-
require 'xero-ruby'
|
3100
|
-
|
3101
|
-
creds = {
|
3102
|
-
client_id: ENV['CLIENT_ID'],
|
3103
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3104
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3105
|
-
scopes: ENV['SCOPES']
|
3106
|
-
}
|
3107
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3108
|
-
|
3109
|
-
token_set = fetch_valid_token_set(user) # example
|
3110
|
-
|
3111
|
-
xero_client.refresh_token_set(token_set)
|
3112
|
-
|
3113
|
-
# You need to namespace your api method call to one of the following api sets
|
3114
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3115
|
-
|
3116
|
-
api_instance = xero_client.<api_set>
|
3117
|
-
|
3118
|
-
|
3119
|
-
|
3120
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3121
|
-
opts = {
|
3122
|
-
page: 56, # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3123
|
-
|
3124
|
-
status: 'status_example' # String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status.
|
3125
|
-
}
|
3126
|
-
|
3127
|
-
begin
|
3128
|
-
#searches pay runs
|
3129
|
-
result = api_instance.get_pay_runs(xero_tenant_id, opts)
|
3130
|
-
p result
|
3131
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3132
|
-
puts "Exception when calling PayrollNzApi->get_pay_runs: #{e}"
|
3133
|
-
end
|
3134
|
-
```
|
3135
|
-
|
3136
|
-
### Parameters
|
3137
|
-
|
3138
|
-
|
3139
|
-
Name | Type | Description | Notes
|
3140
|
-
------------- | ------------- | ------------- | -------------
|
3141
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3142
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
3143
|
-
**status** | **String**| By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. | [optional]
|
3144
|
-
|
3145
|
-
### Return type
|
3146
|
-
|
3147
|
-
[**PayRuns**](PayRuns.md)
|
3148
|
-
|
3149
|
-
### Authorization
|
3150
|
-
|
3151
|
-
[OAuth2](../README.md#OAuth2)
|
3152
|
-
|
3153
|
-
### HTTP request headers
|
3154
|
-
|
3155
|
-
- **Content-Type**: Not defined
|
3156
|
-
- **Accept**: application/json
|
3157
|
-
|
3158
|
-
|
3159
|
-
## get_pay_slip
|
3160
|
-
|
3161
|
-
> PaySlipObject get_pay_slip(xero_tenant_id, pay_slip_id)
|
3162
|
-
|
3163
|
-
retrieve a single payslip by id
|
3164
|
-
|
3165
|
-
### Example
|
3166
|
-
|
3167
|
-
```ruby
|
3168
|
-
# load the gem
|
3169
|
-
require 'xero-ruby'
|
3170
|
-
|
3171
|
-
creds = {
|
3172
|
-
client_id: ENV['CLIENT_ID'],
|
3173
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3174
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3175
|
-
scopes: ENV['SCOPES']
|
3176
|
-
}
|
3177
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3178
|
-
|
3179
|
-
token_set = fetch_valid_token_set(user) # example
|
3180
|
-
|
3181
|
-
xero_client.refresh_token_set(token_set)
|
3182
|
-
|
3183
|
-
# You need to namespace your api method call to one of the following api sets
|
3184
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3185
|
-
|
3186
|
-
api_instance = xero_client.<api_set>
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3190
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3191
|
-
pay_slip_id = 'pay_slip_id_example' # String | Identifier for the payslip
|
3192
|
-
begin
|
3193
|
-
#retrieve a single payslip by id
|
3194
|
-
result = api_instance.get_pay_slip(xero_tenant_id, pay_slip_id)
|
3195
|
-
p result
|
3196
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3197
|
-
puts "Exception when calling PayrollNzApi->get_pay_slip: #{e}"
|
3198
|
-
end
|
3199
|
-
```
|
3200
|
-
|
3201
|
-
### Parameters
|
3202
|
-
|
3203
|
-
|
3204
|
-
Name | Type | Description | Notes
|
3205
|
-
------------- | ------------- | ------------- | -------------
|
3206
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3207
|
-
**pay_slip_id** | [**String**](.md)| Identifier for the payslip |
|
3208
|
-
|
3209
|
-
### Return type
|
3210
|
-
|
3211
|
-
[**PaySlipObject**](PaySlipObject.md)
|
3212
|
-
|
3213
|
-
### Authorization
|
3214
|
-
|
3215
|
-
[OAuth2](../README.md#OAuth2)
|
3216
|
-
|
3217
|
-
### HTTP request headers
|
3218
|
-
|
3219
|
-
- **Content-Type**: Not defined
|
3220
|
-
- **Accept**: application/json
|
3221
|
-
|
3222
|
-
|
3223
|
-
## get_pay_slips
|
3224
|
-
|
3225
|
-
> PaySlips get_pay_slips(xero_tenant_id, pay_run_id, opts)
|
3226
|
-
|
3227
|
-
searches payslips
|
3228
|
-
|
3229
|
-
### Example
|
3230
|
-
|
3231
|
-
```ruby
|
3232
|
-
# load the gem
|
3233
|
-
require 'xero-ruby'
|
3234
|
-
|
3235
|
-
creds = {
|
3236
|
-
client_id: ENV['CLIENT_ID'],
|
3237
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3238
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3239
|
-
scopes: ENV['SCOPES']
|
3240
|
-
}
|
3241
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3242
|
-
|
3243
|
-
token_set = fetch_valid_token_set(user) # example
|
3244
|
-
|
3245
|
-
xero_client.refresh_token_set(token_set)
|
3246
|
-
|
3247
|
-
# You need to namespace your api method call to one of the following api sets
|
3248
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3249
|
-
|
3250
|
-
api_instance = xero_client.<api_set>
|
3251
|
-
|
3252
|
-
|
3253
|
-
|
3254
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3255
|
-
pay_run_id = 'pay_run_id_example' # String | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun.
|
3256
|
-
opts = {
|
3257
|
-
page: 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3258
|
-
}
|
3259
|
-
|
3260
|
-
begin
|
3261
|
-
#searches payslips
|
3262
|
-
result = api_instance.get_pay_slips(xero_tenant_id, pay_run_id, opts)
|
3263
|
-
p result
|
3264
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3265
|
-
puts "Exception when calling PayrollNzApi->get_pay_slips: #{e}"
|
3266
|
-
end
|
3267
|
-
```
|
3268
|
-
|
3269
|
-
### Parameters
|
3270
|
-
|
3271
|
-
|
3272
|
-
Name | Type | Description | Notes
|
3273
|
-
------------- | ------------- | ------------- | -------------
|
3274
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3275
|
-
**pay_run_id** | [**String**](.md)| PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. |
|
3276
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
3277
|
-
|
3278
|
-
### Return type
|
3279
|
-
|
3280
|
-
[**PaySlips**](PaySlips.md)
|
3281
|
-
|
3282
|
-
### Authorization
|
3283
|
-
|
3284
|
-
[OAuth2](../README.md#OAuth2)
|
3285
|
-
|
3286
|
-
### HTTP request headers
|
3287
|
-
|
3288
|
-
- **Content-Type**: Not defined
|
3289
|
-
- **Accept**: application/json
|
3290
|
-
|
3291
|
-
|
3292
|
-
## get_reimbursement
|
3293
|
-
|
3294
|
-
> ReimbursementObject get_reimbursement(xero_tenant_id, reimbursement_id)
|
3295
|
-
|
3296
|
-
retrieve a single reimbursement by id
|
3297
|
-
|
3298
|
-
### Example
|
3299
|
-
|
3300
|
-
```ruby
|
3301
|
-
# load the gem
|
3302
|
-
require 'xero-ruby'
|
3303
|
-
|
3304
|
-
creds = {
|
3305
|
-
client_id: ENV['CLIENT_ID'],
|
3306
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3307
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3308
|
-
scopes: ENV['SCOPES']
|
3309
|
-
}
|
3310
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3311
|
-
|
3312
|
-
token_set = fetch_valid_token_set(user) # example
|
3313
|
-
|
3314
|
-
xero_client.refresh_token_set(token_set)
|
3315
|
-
|
3316
|
-
# You need to namespace your api method call to one of the following api sets
|
3317
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3318
|
-
|
3319
|
-
api_instance = xero_client.<api_set>
|
3320
|
-
|
3321
|
-
|
3322
|
-
|
3323
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3324
|
-
reimbursement_id = 'reimbursement_id_example' # String | Identifier for the reimbursement
|
3325
|
-
begin
|
3326
|
-
#retrieve a single reimbursement by id
|
3327
|
-
result = api_instance.get_reimbursement(xero_tenant_id, reimbursement_id)
|
3328
|
-
p result
|
3329
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3330
|
-
puts "Exception when calling PayrollNzApi->get_reimbursement: #{e}"
|
3331
|
-
end
|
3332
|
-
```
|
3333
|
-
|
3334
|
-
### Parameters
|
3335
|
-
|
3336
|
-
|
3337
|
-
Name | Type | Description | Notes
|
3338
|
-
------------- | ------------- | ------------- | -------------
|
3339
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3340
|
-
**reimbursement_id** | [**String**](.md)| Identifier for the reimbursement |
|
3341
|
-
|
3342
|
-
### Return type
|
3343
|
-
|
3344
|
-
[**ReimbursementObject**](ReimbursementObject.md)
|
3345
|
-
|
3346
|
-
### Authorization
|
3347
|
-
|
3348
|
-
[OAuth2](../README.md#OAuth2)
|
3349
|
-
|
3350
|
-
### HTTP request headers
|
3351
|
-
|
3352
|
-
- **Content-Type**: Not defined
|
3353
|
-
- **Accept**: application/json
|
3354
|
-
|
3355
|
-
|
3356
|
-
## get_reimbursements
|
3357
|
-
|
3358
|
-
> Reimbursements get_reimbursements(xero_tenant_id, opts)
|
3359
|
-
|
3360
|
-
searches reimbursements
|
3361
|
-
|
3362
|
-
### Example
|
3363
|
-
|
3364
|
-
```ruby
|
3365
|
-
# load the gem
|
3366
|
-
require 'xero-ruby'
|
3367
|
-
|
3368
|
-
creds = {
|
3369
|
-
client_id: ENV['CLIENT_ID'],
|
3370
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3371
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3372
|
-
scopes: ENV['SCOPES']
|
3373
|
-
}
|
3374
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3375
|
-
|
3376
|
-
token_set = fetch_valid_token_set(user) # example
|
3377
|
-
|
3378
|
-
xero_client.refresh_token_set(token_set)
|
3379
|
-
|
3380
|
-
# You need to namespace your api method call to one of the following api sets
|
3381
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3382
|
-
|
3383
|
-
api_instance = xero_client.<api_set>
|
3384
|
-
|
3385
|
-
|
3386
|
-
|
3387
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3388
|
-
opts = {
|
3389
|
-
page: 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3390
|
-
}
|
3391
|
-
|
3392
|
-
begin
|
3393
|
-
#searches reimbursements
|
3394
|
-
result = api_instance.get_reimbursements(xero_tenant_id, opts)
|
3395
|
-
p result
|
3396
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3397
|
-
puts "Exception when calling PayrollNzApi->get_reimbursements: #{e}"
|
3398
|
-
end
|
3399
|
-
```
|
3400
|
-
|
3401
|
-
### Parameters
|
3402
|
-
|
3403
|
-
|
3404
|
-
Name | Type | Description | Notes
|
3405
|
-
------------- | ------------- | ------------- | -------------
|
3406
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3407
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
3408
|
-
|
3409
|
-
### Return type
|
3410
|
-
|
3411
|
-
[**Reimbursements**](Reimbursements.md)
|
3412
|
-
|
3413
|
-
### Authorization
|
3414
|
-
|
3415
|
-
[OAuth2](../README.md#OAuth2)
|
3416
|
-
|
3417
|
-
### HTTP request headers
|
3418
|
-
|
3419
|
-
- **Content-Type**: Not defined
|
3420
|
-
- **Accept**: application/json
|
3421
|
-
|
3422
|
-
|
3423
|
-
## get_settings
|
3424
|
-
|
3425
|
-
> Settings get_settings(xero_tenant_id)
|
3426
|
-
|
3427
|
-
searches settings
|
3428
|
-
|
3429
|
-
### Example
|
3430
|
-
|
3431
|
-
```ruby
|
3432
|
-
# load the gem
|
3433
|
-
require 'xero-ruby'
|
3434
|
-
|
3435
|
-
creds = {
|
3436
|
-
client_id: ENV['CLIENT_ID'],
|
3437
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3438
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3439
|
-
scopes: ENV['SCOPES']
|
3440
|
-
}
|
3441
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3442
|
-
|
3443
|
-
token_set = fetch_valid_token_set(user) # example
|
3444
|
-
|
3445
|
-
xero_client.refresh_token_set(token_set)
|
3446
|
-
|
3447
|
-
# You need to namespace your api method call to one of the following api sets
|
3448
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3449
|
-
|
3450
|
-
api_instance = xero_client.<api_set>
|
3451
|
-
|
3452
|
-
|
3453
|
-
|
3454
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3455
|
-
begin
|
3456
|
-
#searches settings
|
3457
|
-
result = api_instance.get_settings(xero_tenant_id)
|
3458
|
-
p result
|
3459
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3460
|
-
puts "Exception when calling PayrollNzApi->get_settings: #{e}"
|
3461
|
-
end
|
3462
|
-
```
|
3463
|
-
|
3464
|
-
### Parameters
|
3465
|
-
|
3466
|
-
|
3467
|
-
Name | Type | Description | Notes
|
3468
|
-
------------- | ------------- | ------------- | -------------
|
3469
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3470
|
-
|
3471
|
-
### Return type
|
3472
|
-
|
3473
|
-
[**Settings**](Settings.md)
|
3474
|
-
|
3475
|
-
### Authorization
|
3476
|
-
|
3477
|
-
[OAuth2](../README.md#OAuth2)
|
3478
|
-
|
3479
|
-
### HTTP request headers
|
3480
|
-
|
3481
|
-
- **Content-Type**: Not defined
|
3482
|
-
- **Accept**: application/json
|
3483
|
-
|
3484
|
-
|
3485
|
-
## get_statutory_deduction
|
3486
|
-
|
3487
|
-
> StatutoryDeductionObject get_statutory_deduction(xero_tenant_id, id)
|
3488
|
-
|
3489
|
-
retrieve a single statutory deduction by id
|
3490
|
-
|
3491
|
-
### Example
|
3492
|
-
|
3493
|
-
```ruby
|
3494
|
-
# load the gem
|
3495
|
-
require 'xero-ruby'
|
3496
|
-
|
3497
|
-
creds = {
|
3498
|
-
client_id: ENV['CLIENT_ID'],
|
3499
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3500
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3501
|
-
scopes: ENV['SCOPES']
|
3502
|
-
}
|
3503
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3504
|
-
|
3505
|
-
token_set = fetch_valid_token_set(user) # example
|
3506
|
-
|
3507
|
-
xero_client.refresh_token_set(token_set)
|
3508
|
-
|
3509
|
-
# You need to namespace your api method call to one of the following api sets
|
3510
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3511
|
-
|
3512
|
-
api_instance = xero_client.<api_set>
|
3513
|
-
|
3514
|
-
|
3515
|
-
|
3516
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3517
|
-
id = 'id_example' # String | Identifier for the statutory deduction
|
3518
|
-
begin
|
3519
|
-
#retrieve a single statutory deduction by id
|
3520
|
-
result = api_instance.get_statutory_deduction(xero_tenant_id, id)
|
3521
|
-
p result
|
3522
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3523
|
-
puts "Exception when calling PayrollNzApi->get_statutory_deduction: #{e}"
|
3524
|
-
end
|
3525
|
-
```
|
3526
|
-
|
3527
|
-
### Parameters
|
3528
|
-
|
3529
|
-
|
3530
|
-
Name | Type | Description | Notes
|
3531
|
-
------------- | ------------- | ------------- | -------------
|
3532
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3533
|
-
**id** | [**String**](.md)| Identifier for the statutory deduction |
|
3534
|
-
|
3535
|
-
### Return type
|
3536
|
-
|
3537
|
-
[**StatutoryDeductionObject**](StatutoryDeductionObject.md)
|
3538
|
-
|
3539
|
-
### Authorization
|
3540
|
-
|
3541
|
-
[OAuth2](../README.md#OAuth2)
|
3542
|
-
|
3543
|
-
### HTTP request headers
|
3544
|
-
|
3545
|
-
- **Content-Type**: Not defined
|
3546
|
-
- **Accept**: application/json
|
3547
|
-
|
3548
|
-
|
3549
|
-
## get_statutory_deductions
|
3550
|
-
|
3551
|
-
> StatutoryDeductions get_statutory_deductions(xero_tenant_id, opts)
|
3552
|
-
|
3553
|
-
searches statutory deductions
|
3554
|
-
|
3555
|
-
### Example
|
3556
|
-
|
3557
|
-
```ruby
|
3558
|
-
# load the gem
|
3559
|
-
require 'xero-ruby'
|
3560
|
-
|
3561
|
-
creds = {
|
3562
|
-
client_id: ENV['CLIENT_ID'],
|
3563
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3564
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3565
|
-
scopes: ENV['SCOPES']
|
3566
|
-
}
|
3567
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3568
|
-
|
3569
|
-
token_set = fetch_valid_token_set(user) # example
|
3570
|
-
|
3571
|
-
xero_client.refresh_token_set(token_set)
|
3572
|
-
|
3573
|
-
# You need to namespace your api method call to one of the following api sets
|
3574
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3575
|
-
|
3576
|
-
api_instance = xero_client.<api_set>
|
3577
|
-
|
3578
|
-
|
3579
|
-
|
3580
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3581
|
-
opts = {
|
3582
|
-
page: 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3583
|
-
}
|
3584
|
-
|
3585
|
-
begin
|
3586
|
-
#searches statutory deductions
|
3587
|
-
result = api_instance.get_statutory_deductions(xero_tenant_id, opts)
|
3588
|
-
p result
|
3589
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3590
|
-
puts "Exception when calling PayrollNzApi->get_statutory_deductions: #{e}"
|
3591
|
-
end
|
3592
|
-
```
|
3593
|
-
|
3594
|
-
### Parameters
|
3595
|
-
|
3596
|
-
|
3597
|
-
Name | Type | Description | Notes
|
3598
|
-
------------- | ------------- | ------------- | -------------
|
3599
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3600
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
3601
|
-
|
3602
|
-
### Return type
|
3603
|
-
|
3604
|
-
[**StatutoryDeductions**](StatutoryDeductions.md)
|
3605
|
-
|
3606
|
-
### Authorization
|
3607
|
-
|
3608
|
-
[OAuth2](../README.md#OAuth2)
|
3609
|
-
|
3610
|
-
### HTTP request headers
|
3611
|
-
|
3612
|
-
- **Content-Type**: Not defined
|
3613
|
-
- **Accept**: application/json
|
3614
|
-
|
3615
|
-
|
3616
|
-
## get_superannuation
|
3617
|
-
|
3618
|
-
> SuperannuationObject get_superannuation(xero_tenant_id, superannuation_id)
|
3619
|
-
|
3620
|
-
searches for a unique superannuation
|
3621
|
-
|
3622
|
-
### Example
|
3623
|
-
|
3624
|
-
```ruby
|
3625
|
-
# load the gem
|
3626
|
-
require 'xero-ruby'
|
3627
|
-
|
3628
|
-
creds = {
|
3629
|
-
client_id: ENV['CLIENT_ID'],
|
3630
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3631
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3632
|
-
scopes: ENV['SCOPES']
|
3633
|
-
}
|
3634
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3635
|
-
|
3636
|
-
token_set = fetch_valid_token_set(user) # example
|
3637
|
-
|
3638
|
-
xero_client.refresh_token_set(token_set)
|
3639
|
-
|
3640
|
-
# You need to namespace your api method call to one of the following api sets
|
3641
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3642
|
-
|
3643
|
-
api_instance = xero_client.<api_set>
|
3644
|
-
|
3645
|
-
|
3646
|
-
|
3647
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3648
|
-
superannuation_id = 'superannuation_id_example' # String | Identifier for the superannuation
|
3649
|
-
begin
|
3650
|
-
#searches for a unique superannuation
|
3651
|
-
result = api_instance.get_superannuation(xero_tenant_id, superannuation_id)
|
3652
|
-
p result
|
3653
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3654
|
-
puts "Exception when calling PayrollNzApi->get_superannuation: #{e}"
|
3655
|
-
end
|
3656
|
-
```
|
3657
|
-
|
3658
|
-
### Parameters
|
3659
|
-
|
3660
|
-
|
3661
|
-
Name | Type | Description | Notes
|
3662
|
-
------------- | ------------- | ------------- | -------------
|
3663
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3664
|
-
**superannuation_id** | [**String**](.md)| Identifier for the superannuation |
|
3665
|
-
|
3666
|
-
### Return type
|
3667
|
-
|
3668
|
-
[**SuperannuationObject**](SuperannuationObject.md)
|
3669
|
-
|
3670
|
-
### Authorization
|
3671
|
-
|
3672
|
-
[OAuth2](../README.md#OAuth2)
|
3673
|
-
|
3674
|
-
### HTTP request headers
|
3675
|
-
|
3676
|
-
- **Content-Type**: Not defined
|
3677
|
-
- **Accept**: application/json
|
3678
|
-
|
3679
|
-
|
3680
|
-
## get_superannuations
|
3681
|
-
|
3682
|
-
> Superannuations get_superannuations(xero_tenant_id, opts)
|
3683
|
-
|
3684
|
-
searches statutory deductions
|
3685
|
-
|
3686
|
-
### Example
|
3687
|
-
|
3688
|
-
```ruby
|
3689
|
-
# load the gem
|
3690
|
-
require 'xero-ruby'
|
3691
|
-
|
3692
|
-
creds = {
|
3693
|
-
client_id: ENV['CLIENT_ID'],
|
3694
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3695
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3696
|
-
scopes: ENV['SCOPES']
|
3697
|
-
}
|
3698
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3699
|
-
|
3700
|
-
token_set = fetch_valid_token_set(user) # example
|
3701
|
-
|
3702
|
-
xero_client.refresh_token_set(token_set)
|
3703
|
-
|
3704
|
-
# You need to namespace your api method call to one of the following api sets
|
3705
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3706
|
-
|
3707
|
-
api_instance = xero_client.<api_set>
|
3708
|
-
|
3709
|
-
|
3710
|
-
|
3711
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3712
|
-
opts = {
|
3713
|
-
page: 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3714
|
-
}
|
3715
|
-
|
3716
|
-
begin
|
3717
|
-
#searches statutory deductions
|
3718
|
-
result = api_instance.get_superannuations(xero_tenant_id, opts)
|
3719
|
-
p result
|
3720
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3721
|
-
puts "Exception when calling PayrollNzApi->get_superannuations: #{e}"
|
3722
|
-
end
|
3723
|
-
```
|
3724
|
-
|
3725
|
-
### Parameters
|
3726
|
-
|
3727
|
-
|
3728
|
-
Name | Type | Description | Notes
|
3729
|
-
------------- | ------------- | ------------- | -------------
|
3730
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3731
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
3732
|
-
|
3733
|
-
### Return type
|
3734
|
-
|
3735
|
-
[**Superannuations**](Superannuations.md)
|
3736
|
-
|
3737
|
-
### Authorization
|
3738
|
-
|
3739
|
-
[OAuth2](../README.md#OAuth2)
|
3740
|
-
|
3741
|
-
### HTTP request headers
|
3742
|
-
|
3743
|
-
- **Content-Type**: Not defined
|
3744
|
-
- **Accept**: application/json
|
3745
|
-
|
3746
|
-
|
3747
|
-
## get_timesheet
|
3748
|
-
|
3749
|
-
> TimesheetObject get_timesheet(xero_tenant_id, timesheet_id)
|
3750
|
-
|
3751
|
-
retrieve a single timesheet by id
|
3752
|
-
|
3753
|
-
### Example
|
3754
|
-
|
3755
|
-
```ruby
|
3756
|
-
# load the gem
|
3757
|
-
require 'xero-ruby'
|
3758
|
-
|
3759
|
-
creds = {
|
3760
|
-
client_id: ENV['CLIENT_ID'],
|
3761
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3762
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3763
|
-
scopes: ENV['SCOPES']
|
3764
|
-
}
|
3765
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3766
|
-
|
3767
|
-
token_set = fetch_valid_token_set(user) # example
|
3768
|
-
|
3769
|
-
xero_client.refresh_token_set(token_set)
|
3770
|
-
|
3771
|
-
# You need to namespace your api method call to one of the following api sets
|
3772
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3773
|
-
|
3774
|
-
api_instance = xero_client.<api_set>
|
3775
|
-
|
3776
|
-
|
3777
|
-
|
3778
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3779
|
-
timesheet_id = 'timesheet_id_example' # String | Identifier for the timesheet
|
3780
|
-
begin
|
3781
|
-
#retrieve a single timesheet by id
|
3782
|
-
result = api_instance.get_timesheet(xero_tenant_id, timesheet_id)
|
3783
|
-
p result
|
3784
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3785
|
-
puts "Exception when calling PayrollNzApi->get_timesheet: #{e}"
|
3786
|
-
end
|
3787
|
-
```
|
3788
|
-
|
3789
|
-
### Parameters
|
3790
|
-
|
3791
|
-
|
3792
|
-
Name | Type | Description | Notes
|
3793
|
-
------------- | ------------- | ------------- | -------------
|
3794
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3795
|
-
**timesheet_id** | [**String**](.md)| Identifier for the timesheet |
|
3796
|
-
|
3797
|
-
### Return type
|
3798
|
-
|
3799
|
-
[**TimesheetObject**](TimesheetObject.md)
|
3800
|
-
|
3801
|
-
### Authorization
|
3802
|
-
|
3803
|
-
[OAuth2](../README.md#OAuth2)
|
3804
|
-
|
3805
|
-
### HTTP request headers
|
3806
|
-
|
3807
|
-
- **Content-Type**: Not defined
|
3808
|
-
- **Accept**: application/json
|
3809
|
-
|
3810
|
-
|
3811
|
-
## get_timesheets
|
3812
|
-
|
3813
|
-
> Timesheets get_timesheets(xero_tenant_id, opts)
|
3814
|
-
|
3815
|
-
searches timesheets
|
3816
|
-
|
3817
|
-
### Example
|
3818
|
-
|
3819
|
-
```ruby
|
3820
|
-
# load the gem
|
3821
|
-
require 'xero-ruby'
|
3822
|
-
|
3823
|
-
creds = {
|
3824
|
-
client_id: ENV['CLIENT_ID'],
|
3825
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3826
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3827
|
-
scopes: ENV['SCOPES']
|
3828
|
-
}
|
3829
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3830
|
-
|
3831
|
-
token_set = fetch_valid_token_set(user) # example
|
3832
|
-
|
3833
|
-
xero_client.refresh_token_set(token_set)
|
3834
|
-
|
3835
|
-
# You need to namespace your api method call to one of the following api sets
|
3836
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3837
|
-
|
3838
|
-
api_instance = xero_client.<api_set>
|
3839
|
-
|
3840
|
-
|
3841
|
-
|
3842
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3843
|
-
opts = {
|
3844
|
-
page: 56, # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3845
|
-
|
3846
|
-
employee_id: 'employee_id_example', # String | By default get Timesheets will return the timesheets for all employees in an organization. You can add GET https://…/timesheets?filter=employeeId=={EmployeeId} to get only the timesheets of a particular employee.
|
3847
|
-
|
3848
|
-
payroll_calendar_id: 'payroll_calendar_id_example' # String | By default get Timesheets will return all the timesheets for an organization. You can add GET https://…/timesheets?filter=payrollCalendarId=={PayrollCalendarID} to filter the timesheets by payroll calendar id
|
3849
|
-
}
|
3850
|
-
|
3851
|
-
begin
|
3852
|
-
#searches timesheets
|
3853
|
-
result = api_instance.get_timesheets(xero_tenant_id, opts)
|
3854
|
-
p result
|
3855
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3856
|
-
puts "Exception when calling PayrollNzApi->get_timesheets: #{e}"
|
3857
|
-
end
|
3858
|
-
```
|
3859
|
-
|
3860
|
-
### Parameters
|
3861
|
-
|
3862
|
-
|
3863
|
-
Name | Type | Description | Notes
|
3864
|
-
------------- | ------------- | ------------- | -------------
|
3865
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3866
|
-
**page** | **Integer**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
|
3867
|
-
**employee_id** | [**String**](.md)| By default get Timesheets will return the timesheets for all employees in an organization. You can add GET https://…/timesheets?filter=employeeId=={EmployeeId} to get only the timesheets of a particular employee. | [optional]
|
3868
|
-
**payroll_calendar_id** | [**String**](.md)| By default get Timesheets will return all the timesheets for an organization. You can add GET https://…/timesheets?filter=payrollCalendarId=={PayrollCalendarID} to filter the timesheets by payroll calendar id | [optional]
|
3869
|
-
|
3870
|
-
### Return type
|
3871
|
-
|
3872
|
-
[**Timesheets**](Timesheets.md)
|
3873
|
-
|
3874
|
-
### Authorization
|
3875
|
-
|
3876
|
-
[OAuth2](../README.md#OAuth2)
|
3877
|
-
|
3878
|
-
### HTTP request headers
|
3879
|
-
|
3880
|
-
- **Content-Type**: Not defined
|
3881
|
-
- **Accept**: application/json
|
3882
|
-
|
3883
|
-
|
3884
|
-
## get_tracking_categories
|
3885
|
-
|
3886
|
-
> TrackingCategories get_tracking_categories(xero_tenant_id)
|
3887
|
-
|
3888
|
-
searches tracking categories
|
3889
|
-
|
3890
|
-
### Example
|
3891
|
-
|
3892
|
-
```ruby
|
3893
|
-
# load the gem
|
3894
|
-
require 'xero-ruby'
|
3895
|
-
|
3896
|
-
creds = {
|
3897
|
-
client_id: ENV['CLIENT_ID'],
|
3898
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3899
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3900
|
-
scopes: ENV['SCOPES']
|
3901
|
-
}
|
3902
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3903
|
-
|
3904
|
-
token_set = fetch_valid_token_set(user) # example
|
3905
|
-
|
3906
|
-
xero_client.refresh_token_set(token_set)
|
3907
|
-
|
3908
|
-
# You need to namespace your api method call to one of the following api sets
|
3909
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3910
|
-
|
3911
|
-
api_instance = xero_client.<api_set>
|
3912
|
-
|
3913
|
-
|
3914
|
-
|
3915
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3916
|
-
begin
|
3917
|
-
#searches tracking categories
|
3918
|
-
result = api_instance.get_tracking_categories(xero_tenant_id)
|
3919
|
-
p result
|
3920
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3921
|
-
puts "Exception when calling PayrollNzApi->get_tracking_categories: #{e}"
|
3922
|
-
end
|
3923
|
-
```
|
3924
|
-
|
3925
|
-
### Parameters
|
3926
|
-
|
3927
|
-
|
3928
|
-
Name | Type | Description | Notes
|
3929
|
-
------------- | ------------- | ------------- | -------------
|
3930
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3931
|
-
|
3932
|
-
### Return type
|
3933
|
-
|
3934
|
-
[**TrackingCategories**](TrackingCategories.md)
|
3935
|
-
|
3936
|
-
### Authorization
|
3937
|
-
|
3938
|
-
[OAuth2](../README.md#OAuth2)
|
3939
|
-
|
3940
|
-
### HTTP request headers
|
3941
|
-
|
3942
|
-
- **Content-Type**: Not defined
|
3943
|
-
- **Accept**: application/json
|
3944
|
-
|
3945
|
-
|
3946
|
-
## revert_timesheet
|
3947
|
-
|
3948
|
-
> TimesheetObject revert_timesheet(xero_tenant_id, timesheet_id)
|
3949
|
-
|
3950
|
-
revert a timesheet to draft
|
3951
|
-
|
3952
|
-
### Example
|
3953
|
-
|
3954
|
-
```ruby
|
3955
|
-
# load the gem
|
3956
|
-
require 'xero-ruby'
|
3957
|
-
|
3958
|
-
creds = {
|
3959
|
-
client_id: ENV['CLIENT_ID'],
|
3960
|
-
client_secret: ENV['CLIENT_SECRET'],
|
3961
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
3962
|
-
scopes: ENV['SCOPES']
|
3963
|
-
}
|
3964
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
3965
|
-
|
3966
|
-
token_set = fetch_valid_token_set(user) # example
|
3967
|
-
|
3968
|
-
xero_client.refresh_token_set(token_set)
|
3969
|
-
|
3970
|
-
# You need to namespace your api method call to one of the following api sets
|
3971
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
3972
|
-
|
3973
|
-
api_instance = xero_client.<api_set>
|
3974
|
-
|
3975
|
-
|
3976
|
-
|
3977
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
3978
|
-
timesheet_id = 'timesheet_id_example' # String | Identifier for the timesheet
|
3979
|
-
begin
|
3980
|
-
#revert a timesheet to draft
|
3981
|
-
result = api_instance.revert_timesheet(xero_tenant_id, timesheet_id)
|
3982
|
-
p result
|
3983
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
3984
|
-
puts "Exception when calling PayrollNzApi->revert_timesheet: #{e}"
|
3985
|
-
end
|
3986
|
-
```
|
3987
|
-
|
3988
|
-
### Parameters
|
3989
|
-
|
3990
|
-
|
3991
|
-
Name | Type | Description | Notes
|
3992
|
-
------------- | ------------- | ------------- | -------------
|
3993
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
3994
|
-
**timesheet_id** | [**String**](.md)| Identifier for the timesheet |
|
3995
|
-
|
3996
|
-
### Return type
|
3997
|
-
|
3998
|
-
[**TimesheetObject**](TimesheetObject.md)
|
3999
|
-
|
4000
|
-
### Authorization
|
4001
|
-
|
4002
|
-
[OAuth2](../README.md#OAuth2)
|
4003
|
-
|
4004
|
-
### HTTP request headers
|
4005
|
-
|
4006
|
-
- **Content-Type**: Not defined
|
4007
|
-
- **Accept**: application/json
|
4008
|
-
|
4009
|
-
|
4010
|
-
## update_employee
|
4011
|
-
|
4012
|
-
> EmployeeObject update_employee(xero_tenant_id, employee_id, employee)
|
4013
|
-
|
4014
|
-
updates employee
|
4015
|
-
|
4016
|
-
### Example
|
4017
|
-
|
4018
|
-
```ruby
|
4019
|
-
# load the gem
|
4020
|
-
require 'xero-ruby'
|
4021
|
-
|
4022
|
-
creds = {
|
4023
|
-
client_id: ENV['CLIENT_ID'],
|
4024
|
-
client_secret: ENV['CLIENT_SECRET'],
|
4025
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
4026
|
-
scopes: ENV['SCOPES']
|
4027
|
-
}
|
4028
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
4029
|
-
|
4030
|
-
token_set = fetch_valid_token_set(user) # example
|
4031
|
-
|
4032
|
-
xero_client.refresh_token_set(token_set)
|
4033
|
-
|
4034
|
-
# You need to namespace your api method call to one of the following api sets
|
4035
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
4036
|
-
|
4037
|
-
api_instance = xero_client.<api_set>
|
4038
|
-
|
4039
|
-
|
4040
|
-
|
4041
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
4042
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
4043
|
-
employee = { "title": "Mr", "firstName": "Tony", "lastName": "Starkgtrzgquusrson", "dateOfBirth": "1999-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4432", "countryName": "United Kingdom" }, "email": "58315@starkindustries.com", "gender": "M" } # Employee |
|
4044
|
-
begin
|
4045
|
-
#updates employee
|
4046
|
-
result = api_instance.update_employee(xero_tenant_id, employee_id, employee)
|
4047
|
-
p result
|
4048
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
4049
|
-
puts "Exception when calling PayrollNzApi->update_employee: #{e}"
|
4050
|
-
end
|
4051
|
-
```
|
4052
|
-
|
4053
|
-
### Parameters
|
4054
|
-
|
4055
|
-
|
4056
|
-
Name | Type | Description | Notes
|
4057
|
-
------------- | ------------- | ------------- | -------------
|
4058
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
4059
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
4060
|
-
**employee** | [**Employee**](Employee.md)| |
|
4061
|
-
|
4062
|
-
### Return type
|
4063
|
-
|
4064
|
-
[**EmployeeObject**](EmployeeObject.md)
|
4065
|
-
|
4066
|
-
### Authorization
|
4067
|
-
|
4068
|
-
[OAuth2](../README.md#OAuth2)
|
4069
|
-
|
4070
|
-
### HTTP request headers
|
4071
|
-
|
4072
|
-
- **Content-Type**: application/json
|
4073
|
-
- **Accept**: application/json
|
4074
|
-
|
4075
|
-
|
4076
|
-
## update_employee_earnings_template
|
4077
|
-
|
4078
|
-
> EarningsTemplateObject update_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template)
|
4079
|
-
|
4080
|
-
updates employee earnings template records
|
4081
|
-
|
4082
|
-
### Example
|
4083
|
-
|
4084
|
-
```ruby
|
4085
|
-
# load the gem
|
4086
|
-
require 'xero-ruby'
|
4087
|
-
|
4088
|
-
creds = {
|
4089
|
-
client_id: ENV['CLIENT_ID'],
|
4090
|
-
client_secret: ENV['CLIENT_SECRET'],
|
4091
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
4092
|
-
scopes: ENV['SCOPES']
|
4093
|
-
}
|
4094
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
4095
|
-
|
4096
|
-
token_set = fetch_valid_token_set(user) # example
|
4097
|
-
|
4098
|
-
xero_client.refresh_token_set(token_set)
|
4099
|
-
|
4100
|
-
# You need to namespace your api method call to one of the following api sets
|
4101
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
4102
|
-
|
4103
|
-
api_instance = xero_client.<api_set>
|
4104
|
-
|
4105
|
-
|
4106
|
-
|
4107
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
4108
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
4109
|
-
pay_template_earning_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # String | Id for single pay template earnings object
|
4110
|
-
earnings_template = { "ratePerUnit": 25, "numberOfUnits": 4, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" } # EarningsTemplate |
|
4111
|
-
begin
|
4112
|
-
#updates employee earnings template records
|
4113
|
-
result = api_instance.update_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template)
|
4114
|
-
p result
|
4115
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
4116
|
-
puts "Exception when calling PayrollNzApi->update_employee_earnings_template: #{e}"
|
4117
|
-
end
|
4118
|
-
```
|
4119
|
-
|
4120
|
-
### Parameters
|
4121
|
-
|
4122
|
-
|
4123
|
-
Name | Type | Description | Notes
|
4124
|
-
------------- | ------------- | ------------- | -------------
|
4125
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
4126
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
4127
|
-
**pay_template_earning_id** | [**String**](.md)| Id for single pay template earnings object |
|
4128
|
-
**earnings_template** | [**EarningsTemplate**](EarningsTemplate.md)| |
|
4129
|
-
|
4130
|
-
### Return type
|
4131
|
-
|
4132
|
-
[**EarningsTemplateObject**](EarningsTemplateObject.md)
|
4133
|
-
|
4134
|
-
### Authorization
|
4135
|
-
|
4136
|
-
[OAuth2](../README.md#OAuth2)
|
4137
|
-
|
4138
|
-
### HTTP request headers
|
4139
|
-
|
4140
|
-
- **Content-Type**: application/json
|
4141
|
-
- **Accept**: application/json
|
4142
|
-
|
4143
|
-
|
4144
|
-
## update_employee_leave
|
4145
|
-
|
4146
|
-
> EmployeeLeaveObject update_employee_leave(xero_tenant_id, employee_id, leave_id, employee_leave)
|
4147
|
-
|
4148
|
-
updates employee leave records
|
4149
|
-
|
4150
|
-
### Example
|
4151
|
-
|
4152
|
-
```ruby
|
4153
|
-
# load the gem
|
4154
|
-
require 'xero-ruby'
|
4155
|
-
|
4156
|
-
creds = {
|
4157
|
-
client_id: ENV['CLIENT_ID'],
|
4158
|
-
client_secret: ENV['CLIENT_SECRET'],
|
4159
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
4160
|
-
scopes: ENV['SCOPES']
|
4161
|
-
}
|
4162
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
4163
|
-
|
4164
|
-
token_set = fetch_valid_token_set(user) # example
|
4165
|
-
|
4166
|
-
xero_client.refresh_token_set(token_set)
|
4167
|
-
|
4168
|
-
# You need to namespace your api method call to one of the following api sets
|
4169
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
4170
|
-
|
4171
|
-
api_instance = xero_client.<api_set>
|
4172
|
-
|
4173
|
-
|
4174
|
-
|
4175
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
4176
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
4177
|
-
leave_id = 'c4be24e5-e840-4c92-9eaa-2d86cd596314' # String | Leave id for single object
|
4178
|
-
employee_leave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26", "periods": [ { "periodStartDate": "2020-04-20", "periodEndDate": "2020-04-26", "numberOfUnits": 1, "periodStatus": "Approved" } ] } # EmployeeLeave |
|
4179
|
-
begin
|
4180
|
-
#updates employee leave records
|
4181
|
-
result = api_instance.update_employee_leave(xero_tenant_id, employee_id, leave_id, employee_leave)
|
4182
|
-
p result
|
4183
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
4184
|
-
puts "Exception when calling PayrollNzApi->update_employee_leave: #{e}"
|
4185
|
-
end
|
4186
|
-
```
|
4187
|
-
|
4188
|
-
### Parameters
|
4189
|
-
|
4190
|
-
|
4191
|
-
Name | Type | Description | Notes
|
4192
|
-
------------- | ------------- | ------------- | -------------
|
4193
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
4194
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
4195
|
-
**leave_id** | [**String**](.md)| Leave id for single object |
|
4196
|
-
**employee_leave** | [**EmployeeLeave**](EmployeeLeave.md)| |
|
4197
|
-
|
4198
|
-
### Return type
|
4199
|
-
|
4200
|
-
[**EmployeeLeaveObject**](EmployeeLeaveObject.md)
|
4201
|
-
|
4202
|
-
### Authorization
|
4203
|
-
|
4204
|
-
[OAuth2](../README.md#OAuth2)
|
4205
|
-
|
4206
|
-
### HTTP request headers
|
4207
|
-
|
4208
|
-
- **Content-Type**: application/json
|
4209
|
-
- **Accept**: application/json
|
4210
|
-
|
4211
|
-
|
4212
|
-
## update_employee_salary_and_wage
|
4213
|
-
|
4214
|
-
> SalaryAndWageObject update_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage)
|
4215
|
-
|
4216
|
-
updates employee salary and wages record
|
4217
|
-
|
4218
|
-
### Example
|
4219
|
-
|
4220
|
-
```ruby
|
4221
|
-
# load the gem
|
4222
|
-
require 'xero-ruby'
|
4223
|
-
|
4224
|
-
creds = {
|
4225
|
-
client_id: ENV['CLIENT_ID'],
|
4226
|
-
client_secret: ENV['CLIENT_SECRET'],
|
4227
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
4228
|
-
scopes: ENV['SCOPES']
|
4229
|
-
}
|
4230
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
4231
|
-
|
4232
|
-
token_set = fetch_valid_token_set(user) # example
|
4233
|
-
|
4234
|
-
xero_client.refresh_token_set(token_set)
|
4235
|
-
|
4236
|
-
# You need to namespace your api method call to one of the following api sets
|
4237
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
4238
|
-
|
4239
|
-
api_instance = xero_client.<api_set>
|
4240
|
-
|
4241
|
-
|
4242
|
-
|
4243
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
4244
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
4245
|
-
salary_and_wages_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6' # String | Id for single pay template earnings object
|
4246
|
-
salary_and_wage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 3, "ratePerUnit": 11, "numberOfUnitsPerDay": 3, "daysPerWeek": 1, "effectiveFrom": "2020-05-15", "annualSalary": 101, "status": "Active", "paymentType": "Salary" } # SalaryAndWage |
|
4247
|
-
begin
|
4248
|
-
#updates employee salary and wages record
|
4249
|
-
result = api_instance.update_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage)
|
4250
|
-
p result
|
4251
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
4252
|
-
puts "Exception when calling PayrollNzApi->update_employee_salary_and_wage: #{e}"
|
4253
|
-
end
|
4254
|
-
```
|
4255
|
-
|
4256
|
-
### Parameters
|
4257
|
-
|
4258
|
-
|
4259
|
-
Name | Type | Description | Notes
|
4260
|
-
------------- | ------------- | ------------- | -------------
|
4261
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
4262
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
4263
|
-
**salary_and_wages_id** | [**String**](.md)| Id for single pay template earnings object |
|
4264
|
-
**salary_and_wage** | [**SalaryAndWage**](SalaryAndWage.md)| |
|
4265
|
-
|
4266
|
-
### Return type
|
4267
|
-
|
4268
|
-
[**SalaryAndWageObject**](SalaryAndWageObject.md)
|
4269
|
-
|
4270
|
-
### Authorization
|
4271
|
-
|
4272
|
-
[OAuth2](../README.md#OAuth2)
|
4273
|
-
|
4274
|
-
### HTTP request headers
|
4275
|
-
|
4276
|
-
- **Content-Type**: application/json
|
4277
|
-
- **Accept**: application/json
|
4278
|
-
|
4279
|
-
|
4280
|
-
## update_employee_tax
|
4281
|
-
|
4282
|
-
> EmployeeTaxObject update_employee_tax(xero_tenant_id, employee_id, employee_tax)
|
4283
|
-
|
4284
|
-
updates the tax records for an employee
|
4285
|
-
|
4286
|
-
### Example
|
4287
|
-
|
4288
|
-
```ruby
|
4289
|
-
# load the gem
|
4290
|
-
require 'xero-ruby'
|
4291
|
-
|
4292
|
-
creds = {
|
4293
|
-
client_id: ENV['CLIENT_ID'],
|
4294
|
-
client_secret: ENV['CLIENT_SECRET'],
|
4295
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
4296
|
-
scopes: ENV['SCOPES']
|
4297
|
-
}
|
4298
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
4299
|
-
|
4300
|
-
token_set = fetch_valid_token_set(user) # example
|
4301
|
-
|
4302
|
-
xero_client.refresh_token_set(token_set)
|
4303
|
-
|
4304
|
-
# You need to namespace your api method call to one of the following api sets
|
4305
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
4306
|
-
|
4307
|
-
api_instance = xero_client.<api_set>
|
4308
|
-
|
4309
|
-
|
4310
|
-
|
4311
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
4312
|
-
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
|
4313
|
-
employee_tax = XeroRuby::PayrollNz::EmployeeTax.new # EmployeeTax |
|
4314
|
-
begin
|
4315
|
-
#updates the tax records for an employee
|
4316
|
-
result = api_instance.update_employee_tax(xero_tenant_id, employee_id, employee_tax)
|
4317
|
-
p result
|
4318
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
4319
|
-
puts "Exception when calling PayrollNzApi->update_employee_tax: #{e}"
|
4320
|
-
end
|
4321
|
-
```
|
4322
|
-
|
4323
|
-
### Parameters
|
4324
|
-
|
4325
|
-
|
4326
|
-
Name | Type | Description | Notes
|
4327
|
-
------------- | ------------- | ------------- | -------------
|
4328
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
4329
|
-
**employee_id** | [**String**](.md)| Employee id for single object |
|
4330
|
-
**employee_tax** | [**EmployeeTax**](EmployeeTax.md)| |
|
4331
|
-
|
4332
|
-
### Return type
|
4333
|
-
|
4334
|
-
[**EmployeeTaxObject**](EmployeeTaxObject.md)
|
4335
|
-
|
4336
|
-
### Authorization
|
4337
|
-
|
4338
|
-
[OAuth2](../README.md#OAuth2)
|
4339
|
-
|
4340
|
-
### HTTP request headers
|
4341
|
-
|
4342
|
-
- **Content-Type**: application/json
|
4343
|
-
- **Accept**: application/json
|
4344
|
-
|
4345
|
-
|
4346
|
-
## update_pay_run
|
4347
|
-
|
4348
|
-
> PayRunObject update_pay_run(xero_tenant_id, pay_run_id, pay_run)
|
4349
|
-
|
4350
|
-
update a pay run
|
4351
|
-
|
4352
|
-
### Example
|
4353
|
-
|
4354
|
-
```ruby
|
4355
|
-
# load the gem
|
4356
|
-
require 'xero-ruby'
|
4357
|
-
|
4358
|
-
creds = {
|
4359
|
-
client_id: ENV['CLIENT_ID'],
|
4360
|
-
client_secret: ENV['CLIENT_SECRET'],
|
4361
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
4362
|
-
scopes: ENV['SCOPES']
|
4363
|
-
}
|
4364
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
4365
|
-
|
4366
|
-
token_set = fetch_valid_token_set(user) # example
|
4367
|
-
|
4368
|
-
xero_client.refresh_token_set(token_set)
|
4369
|
-
|
4370
|
-
# You need to namespace your api method call to one of the following api sets
|
4371
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
4372
|
-
|
4373
|
-
api_instance = xero_client.<api_set>
|
4374
|
-
|
4375
|
-
|
4376
|
-
|
4377
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
4378
|
-
pay_run_id = 'pay_run_id_example' # String | Identifier for the pay run
|
4379
|
-
pay_run = { "paymentDate": "2019-07-01" } # PayRun |
|
4380
|
-
begin
|
4381
|
-
#update a pay run
|
4382
|
-
result = api_instance.update_pay_run(xero_tenant_id, pay_run_id, pay_run)
|
4383
|
-
p result
|
4384
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
4385
|
-
puts "Exception when calling PayrollNzApi->update_pay_run: #{e}"
|
4386
|
-
end
|
4387
|
-
```
|
4388
|
-
|
4389
|
-
### Parameters
|
4390
|
-
|
4391
|
-
|
4392
|
-
Name | Type | Description | Notes
|
4393
|
-
------------- | ------------- | ------------- | -------------
|
4394
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
4395
|
-
**pay_run_id** | [**String**](.md)| Identifier for the pay run |
|
4396
|
-
**pay_run** | [**PayRun**](PayRun.md)| |
|
4397
|
-
|
4398
|
-
### Return type
|
4399
|
-
|
4400
|
-
[**PayRunObject**](PayRunObject.md)
|
4401
|
-
|
4402
|
-
### Authorization
|
4403
|
-
|
4404
|
-
[OAuth2](../README.md#OAuth2)
|
4405
|
-
|
4406
|
-
### HTTP request headers
|
4407
|
-
|
4408
|
-
- **Content-Type**: application/json
|
4409
|
-
- **Accept**: application/json
|
4410
|
-
|
4411
|
-
|
4412
|
-
## update_pay_slip_line_items
|
4413
|
-
|
4414
|
-
> PaySlipObject update_pay_slip_line_items(xero_tenant_id, pay_slip_id, pay_slip)
|
4415
|
-
|
4416
|
-
creates employee pay slip
|
4417
|
-
|
4418
|
-
### Example
|
4419
|
-
|
4420
|
-
```ruby
|
4421
|
-
# load the gem
|
4422
|
-
require 'xero-ruby'
|
4423
|
-
|
4424
|
-
creds = {
|
4425
|
-
client_id: ENV['CLIENT_ID'],
|
4426
|
-
client_secret: ENV['CLIENT_SECRET'],
|
4427
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
4428
|
-
scopes: ENV['SCOPES']
|
4429
|
-
}
|
4430
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
4431
|
-
|
4432
|
-
token_set = fetch_valid_token_set(user) # example
|
4433
|
-
|
4434
|
-
xero_client.refresh_token_set(token_set)
|
4435
|
-
|
4436
|
-
# You need to namespace your api method call to one of the following api sets
|
4437
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
4438
|
-
|
4439
|
-
api_instance = xero_client.<api_set>
|
4440
|
-
|
4441
|
-
|
4442
|
-
|
4443
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
4444
|
-
pay_slip_id = 'pay_slip_id_example' # String | Identifier for the payslip
|
4445
|
-
pay_slip = { "earningsLines": [ { "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "displayName": "Ordinary Time", "ratePerUnit": 25, "numberOfUnits": 0, "amount": 0, "isLinkedToTimesheet": false, "isSystemGenerated": true }, { "earningsLineID": "65b83d94-f20f-45e1-85ae-387fcf460c26", "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26", "displayName": "Salary", "ratePerUnit": 0, "numberOfUnits": 8, "amount": 0, "isLinkedToTimesheet": false, "isSystemGenerated": false } ], "leaveEarningsLines": [ { "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e", "displayName": "Holiday Pay", "fixedAmount": 268.8, "amount": 268.8, "isLinkedToTimesheet": false, "isSystemGenerated": true } ], "deductionLines": [ { "deductionTypeID": "a3760fe4-68a4-4e38-8326-fe616af7dc74", "amount": 100 } ], "leaveAccrualLines": [ { "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", "numberOfUnits": 268.8 }, { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "numberOfUnits": 0 }, { "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", "numberOfUnits": 0 }, { "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", "numberOfUnits": 0 } ], "superannuationLines": [ { "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea", "displayName": "KiwiSaver", "amount": 108.86, "fixedAmount": 3, "percentage": 3, "manualAdjustment": false } ], "employeeTaxLines": [ { "taxLineID": "1084146b-e890-489c-aed3-06de80f63d84", "amount": 1057.22, "globalTaxTypeID": "11", "manualAdjustment": false } ], "employerTaxLines": [ { "taxLineID": "6f9eb8cd-0f4a-440b-939c-bdb0f6ad694c", "amount": 18.9, "globalTaxTypeID": "10", "manualAdjustment": false } ], "statutoryDeductionLines": [ { "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", "amount": 108.86 } ], "grossEarningsHistory": { "daysPaid": 3, "unpaidWeeks": 0 } } # PaySlip |
|
4446
|
-
begin
|
4447
|
-
#creates employee pay slip
|
4448
|
-
result = api_instance.update_pay_slip_line_items(xero_tenant_id, pay_slip_id, pay_slip)
|
4449
|
-
p result
|
4450
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
4451
|
-
puts "Exception when calling PayrollNzApi->update_pay_slip_line_items: #{e}"
|
4452
|
-
end
|
4453
|
-
```
|
4454
|
-
|
4455
|
-
### Parameters
|
4456
|
-
|
4457
|
-
|
4458
|
-
Name | Type | Description | Notes
|
4459
|
-
------------- | ------------- | ------------- | -------------
|
4460
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
4461
|
-
**pay_slip_id** | [**String**](.md)| Identifier for the payslip |
|
4462
|
-
**pay_slip** | [**PaySlip**](PaySlip.md)| |
|
4463
|
-
|
4464
|
-
### Return type
|
4465
|
-
|
4466
|
-
[**PaySlipObject**](PaySlipObject.md)
|
4467
|
-
|
4468
|
-
### Authorization
|
4469
|
-
|
4470
|
-
[OAuth2](../README.md#OAuth2)
|
4471
|
-
|
4472
|
-
### HTTP request headers
|
4473
|
-
|
4474
|
-
- **Content-Type**: application/json
|
4475
|
-
- **Accept**: application/json
|
4476
|
-
|
4477
|
-
|
4478
|
-
## update_timesheet_line
|
4479
|
-
|
4480
|
-
> TimesheetLineObject update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line)
|
4481
|
-
|
4482
|
-
update a timesheet line
|
4483
|
-
|
4484
|
-
### Example
|
4485
|
-
|
4486
|
-
```ruby
|
4487
|
-
# load the gem
|
4488
|
-
require 'xero-ruby'
|
4489
|
-
|
4490
|
-
creds = {
|
4491
|
-
client_id: ENV['CLIENT_ID'],
|
4492
|
-
client_secret: ENV['CLIENT_SECRET'],
|
4493
|
-
redirect_uri: ENV['REDIRECT_URI'],
|
4494
|
-
scopes: ENV['SCOPES']
|
4495
|
-
}
|
4496
|
-
xero_client = XeroRuby::ApiClient.new(credentials: creds)
|
4497
|
-
|
4498
|
-
token_set = fetch_valid_token_set(user) # example
|
4499
|
-
|
4500
|
-
xero_client.refresh_token_set(token_set)
|
4501
|
-
|
4502
|
-
# You need to namespace your api method call to one of the following api sets
|
4503
|
-
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
|
4504
|
-
|
4505
|
-
api_instance = xero_client.<api_set>
|
4506
|
-
|
4507
|
-
|
4508
|
-
|
4509
|
-
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
|
4510
|
-
timesheet_id = 'timesheet_id_example' # String | Identifier for the timesheet
|
4511
|
-
timesheet_line_id = 'timesheet_line_id_example' # String | Identifier for the timesheet line
|
4512
|
-
timesheet_line = { "date": "2020-08-04", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 2 } # TimesheetLine |
|
4513
|
-
begin
|
4514
|
-
#update a timesheet line
|
4515
|
-
result = api_instance.update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line)
|
4516
|
-
p result
|
4517
|
-
rescue XeroRuby::PayrollNz::ApiError => e
|
4518
|
-
puts "Exception when calling PayrollNzApi->update_timesheet_line: #{e}"
|
4519
|
-
end
|
4520
|
-
```
|
4521
|
-
|
4522
|
-
### Parameters
|
4523
|
-
|
4524
|
-
|
4525
|
-
Name | Type | Description | Notes
|
4526
|
-
------------- | ------------- | ------------- | -------------
|
4527
|
-
**xero_tenant_id** | **String**| Xero identifier for Tenant |
|
4528
|
-
**timesheet_id** | [**String**](.md)| Identifier for the timesheet |
|
4529
|
-
**timesheet_line_id** | [**String**](.md)| Identifier for the timesheet line |
|
4530
|
-
**timesheet_line** | [**TimesheetLine**](TimesheetLine.md)| |
|
4531
|
-
|
4532
|
-
### Return type
|
4533
|
-
|
4534
|
-
[**TimesheetLineObject**](TimesheetLineObject.md)
|
4535
|
-
|
4536
|
-
### Authorization
|
4537
|
-
|
4538
|
-
[OAuth2](../README.md#OAuth2)
|
4539
|
-
|
4540
|
-
### HTTP request headers
|
4541
|
-
|
4542
|
-
- **Content-Type**: application/json
|
4543
|
-
- **Accept**: application/json
|
4544
|
-
|