From 7b5fd13efbd61f19f30af3a7a60916ebfd9c3122 Mon Sep 17 00:00:00 2001
From: Rett Behrens
Date: Fri, 25 Sep 2020 17:50:17 -0600
Subject: [PATCH] generated but not ready for release until tested in sample
app
---
.npmignore | 1 -
docs/v4/accounting/index.html | 255 +-
docs/v4/assets/index.html | 122 +-
docs/v4/bankfeeds/index.html | 2 +-
docs/v4/payroll-au/index.html | 43 +-
docs/v4/payroll-nz/index.html | 39703 ++++++++++++++++
docs/v4/payroll-uk/index.html | 140 +-
docs/v4/projects/index.html | 2 +-
package-lock.json | 2 +-
package.json | 2 +-
src/XeroClient.ts | 7 +-
src/gen/api/accountingApi.ts | 11 +-
src/gen/api/apis.ts | 4 +-
src/gen/api/assetApi.ts | 16 +-
src/gen/api/bankfeedsApi.ts | 4 +-
src/gen/api/payrollAUApi.ts | 4 +-
src/gen/api/payrollNZApi.ts | 4641 ++
src/gen/api/payrollUKApi.ts | 10 +-
src/gen/api/projectApi.ts | 4 +-
src/gen/model/accounting/account.ts | 2 +-
src/gen/model/accounting/accountType.ts | 2 +-
src/gen/model/accounting/accounts.ts | 2 +-
src/gen/model/accounting/accountsPayable.ts | 2 +-
.../model/accounting/accountsReceivable.ts | 2 +-
src/gen/model/accounting/address.ts | 2 +-
src/gen/model/accounting/allocation.ts | 2 +-
src/gen/model/accounting/allocations.ts | 2 +-
src/gen/model/accounting/attachment.ts | 2 +-
src/gen/model/accounting/attachments.ts | 2 +-
src/gen/model/accounting/balances.ts | 2 +-
src/gen/model/accounting/bankTransaction.ts | 4 +-
src/gen/model/accounting/bankTransactions.ts | 2 +-
src/gen/model/accounting/bankTransfer.ts | 2 +-
src/gen/model/accounting/bankTransfers.ts | 2 +-
src/gen/model/accounting/batchPayment.ts | 2 +-
.../model/accounting/batchPaymentDetails.ts | 2 +-
src/gen/model/accounting/batchPayments.ts | 2 +-
src/gen/model/accounting/bill.ts | 2 +-
src/gen/model/accounting/brandingTheme.ts | 2 +-
src/gen/model/accounting/brandingThemes.ts | 2 +-
src/gen/model/accounting/cISOrgSetting.ts | 2 +-
src/gen/model/accounting/cISSetting.ts | 2 +-
src/gen/model/accounting/cISSettings.ts | 2 +-
src/gen/model/accounting/contact.ts | 2 +-
src/gen/model/accounting/contactGroup.ts | 2 +-
src/gen/model/accounting/contactGroups.ts | 2 +-
src/gen/model/accounting/contactPerson.ts | 2 +-
src/gen/model/accounting/contacts.ts | 2 +-
src/gen/model/accounting/countryCode.ts | 2 +-
src/gen/model/accounting/creditNote.ts | 2 +-
src/gen/model/accounting/creditNotes.ts | 2 +-
src/gen/model/accounting/currencies.ts | 2 +-
src/gen/model/accounting/currency.ts | 2 +-
src/gen/model/accounting/currencyCode.ts | 2 +-
src/gen/model/accounting/element.ts | 2 +-
src/gen/model/accounting/employee.ts | 5 +-
src/gen/model/accounting/employees.ts | 2 +-
src/gen/model/accounting/expenseClaim.ts | 2 +-
src/gen/model/accounting/expenseClaims.ts | 2 +-
src/gen/model/accounting/externalLink.ts | 2 +-
src/gen/model/accounting/historyRecord.ts | 2 +-
src/gen/model/accounting/historyRecords.ts | 2 +-
src/gen/model/accounting/invoice.ts | 11 +-
src/gen/model/accounting/invoiceReminder.ts | 2 +-
src/gen/model/accounting/invoiceReminders.ts | 2 +-
src/gen/model/accounting/invoices.ts | 2 +-
src/gen/model/accounting/item.ts | 2 +-
src/gen/model/accounting/items.ts | 2 +-
src/gen/model/accounting/journal.ts | 2 +-
src/gen/model/accounting/journalLine.ts | 2 +-
src/gen/model/accounting/journals.ts | 2 +-
src/gen/model/accounting/lineAmountTypes.ts | 2 +-
src/gen/model/accounting/lineItem.ts | 2 +-
src/gen/model/accounting/lineItemTracking.ts | 2 +-
src/gen/model/accounting/linkedTransaction.ts | 2 +-
.../model/accounting/linkedTransactions.ts | 2 +-
src/gen/model/accounting/manualJournal.ts | 2 +-
src/gen/model/accounting/manualJournalLine.ts | 2 +-
src/gen/model/accounting/manualJournals.ts | 2 +-
src/gen/model/accounting/modelError.ts | 2 +-
src/gen/model/accounting/onlineInvoice.ts | 2 +-
src/gen/model/accounting/onlineInvoices.ts | 2 +-
src/gen/model/accounting/organisation.ts | 2 +-
src/gen/model/accounting/organisations.ts | 2 +-
src/gen/model/accounting/overpayment.ts | 2 +-
src/gen/model/accounting/overpayments.ts | 2 +-
src/gen/model/accounting/payment.ts | 2 +-
src/gen/model/accounting/paymentDelete.ts | 2 +-
src/gen/model/accounting/paymentService.ts | 2 +-
src/gen/model/accounting/paymentServices.ts | 2 +-
src/gen/model/accounting/paymentTerm.ts | 2 +-
src/gen/model/accounting/paymentTermType.ts | 2 +-
src/gen/model/accounting/payments.ts | 2 +-
src/gen/model/accounting/phone.ts | 2 +-
src/gen/model/accounting/prepayment.ts | 2 +-
src/gen/model/accounting/prepayments.ts | 2 +-
src/gen/model/accounting/purchase.ts | 2 +-
src/gen/model/accounting/purchaseOrder.ts | 2 +-
src/gen/model/accounting/purchaseOrders.ts | 2 +-
src/gen/model/accounting/quote.ts | 2 +-
.../model/accounting/quoteLineAmountTypes.ts | 2 +-
src/gen/model/accounting/quoteStatusCodes.ts | 5 +-
src/gen/model/accounting/quotes.ts | 2 +-
src/gen/model/accounting/receipt.ts | 2 +-
src/gen/model/accounting/receipts.ts | 2 +-
src/gen/model/accounting/repeatingInvoice.ts | 2 +-
src/gen/model/accounting/repeatingInvoices.ts | 2 +-
src/gen/model/accounting/report.ts | 2 +-
src/gen/model/accounting/reportAttribute.ts | 2 +-
src/gen/model/accounting/reportCell.ts | 2 +-
src/gen/model/accounting/reportFields.ts | 2 +-
src/gen/model/accounting/reportRow.ts | 2 +-
src/gen/model/accounting/reportRows.ts | 2 +-
src/gen/model/accounting/reportWithRow.ts | 2 +-
src/gen/model/accounting/reportWithRows.ts | 2 +-
src/gen/model/accounting/reports.ts | 2 +-
src/gen/model/accounting/requestEmpty.ts | 2 +-
src/gen/model/accounting/rowType.ts | 2 +-
.../model/accounting/salesTrackingCategory.ts | 2 +-
src/gen/model/accounting/schedule.ts | 2 +-
src/gen/model/accounting/taxComponent.ts | 2 +-
src/gen/model/accounting/taxRate.ts | 2 +-
src/gen/model/accounting/taxRates.ts | 2 +-
src/gen/model/accounting/taxType.ts | 2 +-
.../model/accounting/tenNinetyNineContact.ts | 2 +-
src/gen/model/accounting/timeZone.ts | 3 +-
.../model/accounting/trackingCategories.ts | 2 +-
src/gen/model/accounting/trackingCategory.ts | 2 +-
src/gen/model/accounting/trackingOption.ts | 2 +-
src/gen/model/accounting/trackingOptions.ts | 2 +-
src/gen/model/accounting/user.ts | 2 +-
src/gen/model/accounting/users.ts | 2 +-
src/gen/model/accounting/validationError.ts | 2 +-
src/gen/model/assets/asset.ts | 2 +-
src/gen/model/assets/assetStatus.ts | 2 +-
src/gen/model/assets/assetStatusQueryParam.ts | 2 +-
src/gen/model/assets/assetType.ts | 2 +-
src/gen/model/assets/assets.ts | 2 +-
.../model/assets/bookDepreciationDetail.ts | 2 +-
.../model/assets/bookDepreciationSetting.ts | 2 +-
.../assets/fieldValidationErrorsElement.ts | 2 +-
src/gen/model/assets/modelError.ts | 2 +-
src/gen/model/assets/pagination.ts | 2 +-
.../assets/resourceValidationErrorsElement.ts | 2 +-
src/gen/model/assets/setting.ts | 2 +-
src/gen/model/bankfeeds/countryCode.ts | 2 +-
.../model/bankfeeds/creditDebitIndicator.ts | 2 +-
src/gen/model/bankfeeds/currencyCode.ts | 2 +-
src/gen/model/bankfeeds/endBalance.ts | 2 +-
src/gen/model/bankfeeds/feedConnection.ts | 2 +-
src/gen/model/bankfeeds/feedConnections.ts | 2 +-
src/gen/model/bankfeeds/modelError.ts | 2 +-
src/gen/model/bankfeeds/pagination.ts | 2 +-
src/gen/model/bankfeeds/startBalance.ts | 2 +-
src/gen/model/bankfeeds/statement.ts | 2 +-
src/gen/model/bankfeeds/statementLine.ts | 2 +-
src/gen/model/bankfeeds/statements.ts | 2 +-
src/gen/model/payroll-au/aPIException.ts | 2 +-
src/gen/model/payroll-au/account.ts | 2 +-
src/gen/model/payroll-au/accountType.ts | 2 +-
src/gen/model/payroll-au/allowanceType.ts | 2 +-
src/gen/model/payroll-au/bankAccount.ts | 2 +-
src/gen/model/payroll-au/calendarType.ts | 2 +-
src/gen/model/payroll-au/deductionLine.ts | 2 +-
src/gen/model/payroll-au/deductionType.ts | 2 +-
.../deductionTypeCalculationType.ts | 2 +-
src/gen/model/payroll-au/earningsLine.ts | 4 +-
src/gen/model/payroll-au/earningsRate.ts | 6 +-
.../payroll-au/earningsRateCalculationType.ts | 2 +-
src/gen/model/payroll-au/earningsType.ts | 5 +-
src/gen/model/payroll-au/employee.ts | 2 +-
src/gen/model/payroll-au/employeeStatus.ts | 2 +-
src/gen/model/payroll-au/employees.ts | 2 +-
src/gen/model/payroll-au/employmentBasis.ts | 2 +-
.../employmentTerminationPaymentType.ts | 2 +-
.../entitlementFinalPayPayoutType.ts | 2 +-
src/gen/model/payroll-au/homeAddress.ts | 2 +-
src/gen/model/payroll-au/leaveAccrualLine.ts | 2 +-
src/gen/model/payroll-au/leaveApplication.ts | 2 +-
src/gen/model/payroll-au/leaveApplications.ts | 2 +-
src/gen/model/payroll-au/leaveBalance.ts | 2 +-
src/gen/model/payroll-au/leaveEarningsLine.ts | 2 +-
src/gen/model/payroll-au/leaveLine.ts | 22 +-
.../payroll-au/leaveLineCalculationType.ts | 2 +-
src/gen/model/payroll-au/leaveLines.ts | 2 +-
src/gen/model/payroll-au/leavePeriod.ts | 2 +-
src/gen/model/payroll-au/leavePeriodStatus.ts | 2 +-
src/gen/model/payroll-au/leaveType.ts | 2 +-
.../payroll-au/leaveTypeContributionType.ts | 2 +-
src/gen/model/payroll-au/manualTaxType.ts | 6 +-
src/gen/model/payroll-au/openingBalances.ts | 2 +-
src/gen/model/payroll-au/payItem.ts | 2 +-
src/gen/model/payroll-au/payItems.ts | 2 +-
src/gen/model/payroll-au/payRun.ts | 2 +-
src/gen/model/payroll-au/payRunStatus.ts | 2 +-
src/gen/model/payroll-au/payRuns.ts | 2 +-
src/gen/model/payroll-au/payTemplate.ts | 2 +-
.../model/payroll-au/paymentFrequencyType.ts | 2 +-
src/gen/model/payroll-au/payrollCalendar.ts | 2 +-
src/gen/model/payroll-au/payrollCalendars.ts | 2 +-
src/gen/model/payroll-au/payslip.ts | 2 +-
src/gen/model/payroll-au/payslipLines.ts | 2 +-
src/gen/model/payroll-au/payslipObject.ts | 2 +-
src/gen/model/payroll-au/payslipSummary.ts | 2 +-
src/gen/model/payroll-au/payslips.ts | 2 +-
src/gen/model/payroll-au/rateType.ts | 2 +-
src/gen/model/payroll-au/reimbursementLine.ts | 2 +-
.../model/payroll-au/reimbursementLines.ts | 2 +-
src/gen/model/payroll-au/reimbursementType.ts | 2 +-
src/gen/model/payroll-au/residencyStatus.ts | 2 +-
src/gen/model/payroll-au/settings.ts | 2 +-
src/gen/model/payroll-au/settingsObject.ts | 2 +-
.../payroll-au/settingsTrackingCategories.ts | 2 +-
...ettingsTrackingCategoriesEmployeeGroups.ts | 2 +-
...gsTrackingCategoriesTimesheetCategories.ts | 2 +-
src/gen/model/payroll-au/state.ts | 2 +-
src/gen/model/payroll-au/superFund.ts | 2 +-
src/gen/model/payroll-au/superFundProduct.ts | 2 +-
src/gen/model/payroll-au/superFundProducts.ts | 2 +-
src/gen/model/payroll-au/superFundType.ts | 2 +-
src/gen/model/payroll-au/superFunds.ts | 2 +-
src/gen/model/payroll-au/superLine.ts | 2 +-
src/gen/model/payroll-au/superMembership.ts | 6 +-
.../superannuationCalculationType.ts | 2 +-
.../superannuationContributionType.ts | 2 +-
.../model/payroll-au/superannuationLine.ts | 2 +-
src/gen/model/payroll-au/tFNExemptionType.ts | 2 +-
src/gen/model/payroll-au/taxDeclaration.ts | 4 +-
src/gen/model/payroll-au/taxLine.ts | 2 +-
src/gen/model/payroll-au/timesheet.ts | 2 +-
src/gen/model/payroll-au/timesheetLine.ts | 2 +-
src/gen/model/payroll-au/timesheetObject.ts | 2 +-
src/gen/model/payroll-au/timesheetStatus.ts | 2 +-
src/gen/model/payroll-au/timesheets.ts | 2 +-
src/gen/model/payroll-au/validationError.ts | 2 +-
src/gen/model/payroll-nz/account.ts | 68 +
src/gen/model/payroll-nz/accounts.ts | 31 +
src/gen/model/payroll-nz/address.ts | 78 +
src/gen/model/payroll-nz/bankAccount.ts | 102 +
src/gen/model/payroll-nz/benefit.ts | 125 +
src/gen/model/payroll-nz/deduction.ts | 86 +
src/gen/model/payroll-nz/deductionLine.ts | 69 +
src/gen/model/payroll-nz/deductionObject.ts | 45 +
src/gen/model/payroll-nz/deductions.ts | 45 +
src/gen/model/payroll-nz/earningsLine.ts | 114 +
src/gen/model/payroll-nz/earningsOrder.ts | 67 +
.../model/payroll-nz/earningsOrderObject.ts | 45 +
src/gen/model/payroll-nz/earningsOrders.ts | 45 +
src/gen/model/payroll-nz/earningsRate.ts | 133 +
.../model/payroll-nz/earningsRateObject.ts | 45 +
src/gen/model/payroll-nz/earningsRates.ts | 45 +
src/gen/model/payroll-nz/earningsTemplate.ts | 78 +
.../payroll-nz/earningsTemplateObject.ts | 45 +
src/gen/model/payroll-nz/employee.ts | 154 +
.../payroll-nz/employeeEarningsTemplates.ts | 45 +
src/gen/model/payroll-nz/employeeLeave.ts | 88 +
.../model/payroll-nz/employeeLeaveBalance.ts | 60 +
.../model/payroll-nz/employeeLeaveBalances.ts | 45 +
.../model/payroll-nz/employeeLeaveObject.ts | 45 +
.../model/payroll-nz/employeeLeaveSetup.ts | 87 +
.../payroll-nz/employeeLeaveSetupObject.ts | 45 +
src/gen/model/payroll-nz/employeeLeaveType.ts | 122 +
.../payroll-nz/employeeLeaveTypeObject.ts | 45 +
.../model/payroll-nz/employeeLeaveTypes.ts | 45 +
src/gen/model/payroll-nz/employeeLeaves.ts | 45 +
src/gen/model/payroll-nz/employeeObject.ts | 45 +
.../payroll-nz/employeeOpeningBalance.ts | 60 +
.../employeeOpeningBalancesObject.ts | 45 +
.../model/payroll-nz/employeePayTemplate.ts | 40 +
.../payroll-nz/employeePayTemplateObject.ts | 45 +
.../model/payroll-nz/employeePayTemplates.ts | 45 +
.../employeeStatutoryLeaveBalance.ts | 63 +
.../employeeStatutoryLeaveBalanceObject.ts | 45 +
.../employeeStatutoryLeaveSummary.ts | 101 +
.../employeeStatutoryLeavesSummaries.ts | 45 +
.../payroll-nz/employeeStatutorySickLeave.ts | 178 +
.../employeeStatutorySickLeaveObject.ts | 45 +
.../payroll-nz/employeeStatutorySickLeaves.ts | 45 +
src/gen/model/payroll-nz/employeeTax.ts | 175 +
src/gen/model/payroll-nz/employeeTaxObject.ts | 45 +
src/gen/model/payroll-nz/employees.ts | 45 +
src/gen/model/payroll-nz/employment.ts | 51 +
src/gen/model/payroll-nz/employmentObject.ts | 45 +
.../model/payroll-nz/grossEarningsHistory.ts | 42 +
src/gen/model/payroll-nz/invalidField.ts | 42 +
src/gen/model/payroll-nz/leaveAccrualLine.ts | 42 +
src/gen/model/payroll-nz/leaveEarningsLine.ts | 114 +
src/gen/model/payroll-nz/leavePeriod.ts | 66 +
src/gen/model/payroll-nz/leavePeriods.ts | 45 +
src/gen/model/payroll-nz/leaveType.ts | 78 +
src/gen/model/payroll-nz/leaveTypeObject.ts | 45 +
src/gen/model/payroll-nz/leaveTypes.ts | 45 +
src/gen/model/payroll-nz/models.ts | 529 +
src/gen/model/payroll-nz/pagination.ts | 48 +
src/gen/model/payroll-nz/payRun.ts | 149 +
src/gen/model/payroll-nz/payRunCalendar.ts | 97 +
.../model/payroll-nz/payRunCalendarObject.ts | 45 +
src/gen/model/payroll-nz/payRunCalendars.ts | 45 +
src/gen/model/payroll-nz/payRunObject.ts | 45 +
src/gen/model/payroll-nz/payRuns.ts | 45 +
src/gen/model/payroll-nz/paySlip.ts | 274 +
src/gen/model/payroll-nz/paySlipObject.ts | 45 +
src/gen/model/payroll-nz/paySlips.ts | 45 +
src/gen/model/payroll-nz/paymentLine.ts | 69 +
src/gen/model/payroll-nz/paymentMethod.ts | 47 +
.../model/payroll-nz/paymentMethodObject.ts | 45 +
src/gen/model/payroll-nz/problem.ts | 76 +
src/gen/model/payroll-nz/reimbursement.ts | 121 +
src/gen/model/payroll-nz/reimbursementLine.ts | 69 +
.../model/payroll-nz/reimbursementObject.ts | 45 +
src/gen/model/payroll-nz/reimbursements.ts | 45 +
src/gen/model/payroll-nz/salaryAndWage.ts | 124 +
.../model/payroll-nz/salaryAndWageObject.ts | 45 +
src/gen/model/payroll-nz/salaryAndWages.ts | 45 +
src/gen/model/payroll-nz/settings.ts | 45 +
.../model/payroll-nz/statutoryDeduction.ts | 67 +
.../payroll-nz/statutoryDeductionCategory.ts | 29 +
.../payroll-nz/statutoryDeductionLine.ts | 60 +
.../payroll-nz/statutoryDeductionObject.ts | 45 +
.../model/payroll-nz/statutoryDeductions.ts | 45 +
.../model/payroll-nz/superannuationLine.ts | 78 +
.../model/payroll-nz/superannuationObject.ts | 45 +
src/gen/model/payroll-nz/superannuations.ts | 45 +
src/gen/model/payroll-nz/taxCode.ts | 37 +
src/gen/model/payroll-nz/taxLine.ts | 69 +
src/gen/model/payroll-nz/taxSettings.ts | 82 +
src/gen/model/payroll-nz/timesheet.ts | 110 +
.../model/payroll-nz/timesheetEarningsLine.ts | 114 +
src/gen/model/payroll-nz/timesheetLine.ts | 69 +
.../model/payroll-nz/timesheetLineObject.ts | 45 +
src/gen/model/payroll-nz/timesheetObject.ts | 45 +
src/gen/model/payroll-nz/timesheets.ts | 45 +
.../model/payroll-nz/trackingCategories.ts | 45 +
src/gen/model/payroll-nz/trackingCategory.ts | 42 +
src/gen/model/payroll-uk/account.ts | 2 +-
src/gen/model/payroll-uk/accounts.ts | 2 +-
src/gen/model/payroll-uk/address.ts | 2 +-
src/gen/model/payroll-uk/bankAccount.ts | 2 +-
src/gen/model/payroll-uk/benefit.ts | 4 +-
src/gen/model/payroll-uk/benefitLine.ts | 2 +-
src/gen/model/payroll-uk/benefitObject.ts | 2 +-
src/gen/model/payroll-uk/benefits.ts | 2 +-
src/gen/model/payroll-uk/courtOrderLine.ts | 2 +-
src/gen/model/payroll-uk/deduction.ts | 15 +-
src/gen/model/payroll-uk/deductionLine.ts | 2 +-
src/gen/model/payroll-uk/deductionObject.ts | 2 +-
src/gen/model/payroll-uk/deductions.ts | 2 +-
src/gen/model/payroll-uk/earningsLine.ts | 2 +-
src/gen/model/payroll-uk/earningsOrder.ts | 2 +-
.../model/payroll-uk/earningsOrderObject.ts | 2 +-
src/gen/model/payroll-uk/earningsOrders.ts | 2 +-
src/gen/model/payroll-uk/earningsRate.ts | 21 +-
.../model/payroll-uk/earningsRateObject.ts | 2 +-
src/gen/model/payroll-uk/earningsRates.ts | 2 +-
src/gen/model/payroll-uk/earningsTemplate.ts | 2 +-
.../payroll-uk/earningsTemplateObject.ts | 2 +-
src/gen/model/payroll-uk/employee.ts | 2 +-
src/gen/model/payroll-uk/employeeLeave.ts | 2 +-
.../model/payroll-uk/employeeLeaveBalance.ts | 2 +-
.../model/payroll-uk/employeeLeaveBalances.ts | 2 +-
.../model/payroll-uk/employeeLeaveObject.ts | 2 +-
src/gen/model/payroll-uk/employeeLeaveType.ts | 2 +-
.../payroll-uk/employeeLeaveTypeObject.ts | 2 +-
.../model/payroll-uk/employeeLeaveTypes.ts | 2 +-
src/gen/model/payroll-uk/employeeLeaves.ts | 2 +-
src/gen/model/payroll-uk/employeeObject.ts | 2 +-
.../payroll-uk/employeeOpeningBalances.ts | 2 +-
.../employeeOpeningBalancesObject.ts | 2 +-
.../model/payroll-uk/employeePayTemplate.ts | 2 +-
.../payroll-uk/employeePayTemplateObject.ts | 2 +-
.../model/payroll-uk/employeePayTemplates.ts | 2 +-
.../employeeStatutoryLeaveBalance.ts | 2 +-
.../employeeStatutoryLeaveBalanceObject.ts | 2 +-
.../employeeStatutoryLeaveSummary.ts | 2 +-
.../employeeStatutoryLeavesSummaries.ts | 2 +-
.../payroll-uk/employeeStatutorySickLeave.ts | 2 +-
.../employeeStatutorySickLeaveObject.ts | 2 +-
.../payroll-uk/employeeStatutorySickLeaves.ts | 2 +-
src/gen/model/payroll-uk/employeeTax.ts | 2 +-
src/gen/model/payroll-uk/employeeTaxObject.ts | 2 +-
src/gen/model/payroll-uk/employees.ts | 2 +-
src/gen/model/payroll-uk/employment.ts | 2 +-
src/gen/model/payroll-uk/employmentObject.ts | 2 +-
src/gen/model/payroll-uk/invalidField.ts | 2 +-
src/gen/model/payroll-uk/leaveAccrualLine.ts | 2 +-
src/gen/model/payroll-uk/leaveEarningsLine.ts | 2 +-
src/gen/model/payroll-uk/leavePeriod.ts | 2 +-
src/gen/model/payroll-uk/leavePeriods.ts | 2 +-
src/gen/model/payroll-uk/leaveType.ts | 2 +-
src/gen/model/payroll-uk/leaveTypeObject.ts | 2 +-
src/gen/model/payroll-uk/leaveTypes.ts | 2 +-
src/gen/model/payroll-uk/pagination.ts | 2 +-
src/gen/model/payroll-uk/payRun.ts | 2 +-
src/gen/model/payroll-uk/payRunCalendar.ts | 2 +-
.../model/payroll-uk/payRunCalendarObject.ts | 2 +-
src/gen/model/payroll-uk/payRunCalendars.ts | 2 +-
src/gen/model/payroll-uk/payRunObject.ts | 2 +-
src/gen/model/payroll-uk/payRuns.ts | 2 +-
src/gen/model/payroll-uk/paymentLine.ts | 2 +-
src/gen/model/payroll-uk/paymentMethod.ts | 2 +-
.../model/payroll-uk/paymentMethodObject.ts | 2 +-
src/gen/model/payroll-uk/payslip.ts | 2 +-
src/gen/model/payroll-uk/payslipObject.ts | 2 +-
src/gen/model/payroll-uk/payslips.ts | 2 +-
src/gen/model/payroll-uk/problem.ts | 2 +-
src/gen/model/payroll-uk/reimbursement.ts | 2 +-
src/gen/model/payroll-uk/reimbursementLine.ts | 2 +-
.../model/payroll-uk/reimbursementObject.ts | 2 +-
src/gen/model/payroll-uk/reimbursements.ts | 2 +-
src/gen/model/payroll-uk/salaryAndWage.ts | 9 +-
.../model/payroll-uk/salaryAndWageObject.ts | 2 +-
src/gen/model/payroll-uk/salaryAndWages.ts | 2 +-
src/gen/model/payroll-uk/settings.ts | 2 +-
.../model/payroll-uk/statutoryDeduction.ts | 2 +-
.../payroll-uk/statutoryDeductionCategory.ts | 2 +-
src/gen/model/payroll-uk/taxLine.ts | 2 +-
src/gen/model/payroll-uk/timesheet.ts | 2 +-
.../model/payroll-uk/timesheetEarningsLine.ts | 2 +-
src/gen/model/payroll-uk/timesheetLine.ts | 2 +-
.../model/payroll-uk/timesheetLineObject.ts | 2 +-
src/gen/model/payroll-uk/timesheetObject.ts | 2 +-
src/gen/model/payroll-uk/timesheets.ts | 2 +-
.../model/payroll-uk/trackingCategories.ts | 2 +-
src/gen/model/payroll-uk/trackingCategory.ts | 2 +-
src/gen/model/projects/amount.ts | 2 +-
src/gen/model/projects/chargeType.ts | 2 +-
src/gen/model/projects/currencyCode.ts | 2 +-
src/gen/model/projects/modelError.ts | 2 +-
src/gen/model/projects/pagination.ts | 2 +-
src/gen/model/projects/project.ts | 2 +-
.../model/projects/projectCreateOrUpdate.ts | 2 +-
src/gen/model/projects/projectPatch.ts | 2 +-
src/gen/model/projects/projectStatus.ts | 2 +-
src/gen/model/projects/projectUser.ts | 2 +-
src/gen/model/projects/projectUsers.ts | 2 +-
src/gen/model/projects/projects.ts | 2 +-
src/gen/model/projects/task.ts | 2 +-
src/gen/model/projects/taskCreateOrUpdate.ts | 2 +-
src/gen/model/projects/tasks.ts | 2 +-
src/gen/model/projects/timeEntries.ts | 2 +-
src/gen/model/projects/timeEntry.ts | 2 +-
.../model/projects/timeEntryCreateOrUpdate.ts | 2 +-
tsconfig.json | 6 +-
443 files changed, 52104 insertions(+), 655 deletions(-)
create mode 100644 docs/v4/payroll-nz/index.html
create mode 100644 src/gen/api/payrollNZApi.ts
create mode 100644 src/gen/model/payroll-nz/account.ts
create mode 100644 src/gen/model/payroll-nz/accounts.ts
create mode 100644 src/gen/model/payroll-nz/address.ts
create mode 100644 src/gen/model/payroll-nz/bankAccount.ts
create mode 100644 src/gen/model/payroll-nz/benefit.ts
create mode 100644 src/gen/model/payroll-nz/deduction.ts
create mode 100644 src/gen/model/payroll-nz/deductionLine.ts
create mode 100644 src/gen/model/payroll-nz/deductionObject.ts
create mode 100644 src/gen/model/payroll-nz/deductions.ts
create mode 100644 src/gen/model/payroll-nz/earningsLine.ts
create mode 100644 src/gen/model/payroll-nz/earningsOrder.ts
create mode 100644 src/gen/model/payroll-nz/earningsOrderObject.ts
create mode 100644 src/gen/model/payroll-nz/earningsOrders.ts
create mode 100644 src/gen/model/payroll-nz/earningsRate.ts
create mode 100644 src/gen/model/payroll-nz/earningsRateObject.ts
create mode 100644 src/gen/model/payroll-nz/earningsRates.ts
create mode 100644 src/gen/model/payroll-nz/earningsTemplate.ts
create mode 100644 src/gen/model/payroll-nz/earningsTemplateObject.ts
create mode 100644 src/gen/model/payroll-nz/employee.ts
create mode 100644 src/gen/model/payroll-nz/employeeEarningsTemplates.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeave.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeaveBalance.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeaveBalances.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeaveObject.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeaveSetup.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeaveSetupObject.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeaveType.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeaveTypeObject.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeaveTypes.ts
create mode 100644 src/gen/model/payroll-nz/employeeLeaves.ts
create mode 100644 src/gen/model/payroll-nz/employeeObject.ts
create mode 100644 src/gen/model/payroll-nz/employeeOpeningBalance.ts
create mode 100644 src/gen/model/payroll-nz/employeeOpeningBalancesObject.ts
create mode 100644 src/gen/model/payroll-nz/employeePayTemplate.ts
create mode 100644 src/gen/model/payroll-nz/employeePayTemplateObject.ts
create mode 100644 src/gen/model/payroll-nz/employeePayTemplates.ts
create mode 100644 src/gen/model/payroll-nz/employeeStatutoryLeaveBalance.ts
create mode 100644 src/gen/model/payroll-nz/employeeStatutoryLeaveBalanceObject.ts
create mode 100644 src/gen/model/payroll-nz/employeeStatutoryLeaveSummary.ts
create mode 100644 src/gen/model/payroll-nz/employeeStatutoryLeavesSummaries.ts
create mode 100644 src/gen/model/payroll-nz/employeeStatutorySickLeave.ts
create mode 100644 src/gen/model/payroll-nz/employeeStatutorySickLeaveObject.ts
create mode 100644 src/gen/model/payroll-nz/employeeStatutorySickLeaves.ts
create mode 100644 src/gen/model/payroll-nz/employeeTax.ts
create mode 100644 src/gen/model/payroll-nz/employeeTaxObject.ts
create mode 100644 src/gen/model/payroll-nz/employees.ts
create mode 100644 src/gen/model/payroll-nz/employment.ts
create mode 100644 src/gen/model/payroll-nz/employmentObject.ts
create mode 100644 src/gen/model/payroll-nz/grossEarningsHistory.ts
create mode 100644 src/gen/model/payroll-nz/invalidField.ts
create mode 100644 src/gen/model/payroll-nz/leaveAccrualLine.ts
create mode 100644 src/gen/model/payroll-nz/leaveEarningsLine.ts
create mode 100644 src/gen/model/payroll-nz/leavePeriod.ts
create mode 100644 src/gen/model/payroll-nz/leavePeriods.ts
create mode 100644 src/gen/model/payroll-nz/leaveType.ts
create mode 100644 src/gen/model/payroll-nz/leaveTypeObject.ts
create mode 100644 src/gen/model/payroll-nz/leaveTypes.ts
create mode 100644 src/gen/model/payroll-nz/models.ts
create mode 100644 src/gen/model/payroll-nz/pagination.ts
create mode 100644 src/gen/model/payroll-nz/payRun.ts
create mode 100644 src/gen/model/payroll-nz/payRunCalendar.ts
create mode 100644 src/gen/model/payroll-nz/payRunCalendarObject.ts
create mode 100644 src/gen/model/payroll-nz/payRunCalendars.ts
create mode 100644 src/gen/model/payroll-nz/payRunObject.ts
create mode 100644 src/gen/model/payroll-nz/payRuns.ts
create mode 100644 src/gen/model/payroll-nz/paySlip.ts
create mode 100644 src/gen/model/payroll-nz/paySlipObject.ts
create mode 100644 src/gen/model/payroll-nz/paySlips.ts
create mode 100644 src/gen/model/payroll-nz/paymentLine.ts
create mode 100644 src/gen/model/payroll-nz/paymentMethod.ts
create mode 100644 src/gen/model/payroll-nz/paymentMethodObject.ts
create mode 100644 src/gen/model/payroll-nz/problem.ts
create mode 100644 src/gen/model/payroll-nz/reimbursement.ts
create mode 100644 src/gen/model/payroll-nz/reimbursementLine.ts
create mode 100644 src/gen/model/payroll-nz/reimbursementObject.ts
create mode 100644 src/gen/model/payroll-nz/reimbursements.ts
create mode 100644 src/gen/model/payroll-nz/salaryAndWage.ts
create mode 100644 src/gen/model/payroll-nz/salaryAndWageObject.ts
create mode 100644 src/gen/model/payroll-nz/salaryAndWages.ts
create mode 100644 src/gen/model/payroll-nz/settings.ts
create mode 100644 src/gen/model/payroll-nz/statutoryDeduction.ts
create mode 100644 src/gen/model/payroll-nz/statutoryDeductionCategory.ts
create mode 100644 src/gen/model/payroll-nz/statutoryDeductionLine.ts
create mode 100644 src/gen/model/payroll-nz/statutoryDeductionObject.ts
create mode 100644 src/gen/model/payroll-nz/statutoryDeductions.ts
create mode 100644 src/gen/model/payroll-nz/superannuationLine.ts
create mode 100644 src/gen/model/payroll-nz/superannuationObject.ts
create mode 100644 src/gen/model/payroll-nz/superannuations.ts
create mode 100644 src/gen/model/payroll-nz/taxCode.ts
create mode 100644 src/gen/model/payroll-nz/taxLine.ts
create mode 100644 src/gen/model/payroll-nz/taxSettings.ts
create mode 100644 src/gen/model/payroll-nz/timesheet.ts
create mode 100644 src/gen/model/payroll-nz/timesheetEarningsLine.ts
create mode 100644 src/gen/model/payroll-nz/timesheetLine.ts
create mode 100644 src/gen/model/payroll-nz/timesheetLineObject.ts
create mode 100644 src/gen/model/payroll-nz/timesheetObject.ts
create mode 100644 src/gen/model/payroll-nz/timesheets.ts
create mode 100644 src/gen/model/payroll-nz/trackingCategories.ts
create mode 100644 src/gen/model/payroll-nz/trackingCategory.ts
diff --git a/.npmignore b/.npmignore
index 59c9b9143..0ab9aec72 100644
--- a/.npmignore
+++ b/.npmignore
@@ -6,7 +6,6 @@ docs_theme/
typedoc.json
scratch.ts
**/__tests__/**
-*.map
docs_theme
*.config.js
docs
\ No newline at end of file
diff --git a/docs/v4/accounting/index.html b/docs/v4/accounting/index.html
index 0d9e5b3f5..61b4e836d 100644
--- a/docs/v4/accounting/index.html
+++ b/docs/v4/accounting/index.html
@@ -821,7 +821,6 @@
"type" : "object",
"properties" : {
"Code" : {
- "maxLength" : 10,
"type" : "string",
"description" : "Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)",
"example" : "4400"
@@ -906,9 +905,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Last modified date UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"AddToWatchlist" : {
"type" : "boolean",
@@ -1067,8 +1066,7 @@
"Date" : {
"type" : "string",
"description" : "the date the allocation is applied YYYY-MM-DD.",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"StatusAttributeString" : {
"type" : "string",
@@ -1127,7 +1125,7 @@
"example" : "image/jpg"
},
"ContentLength" : {
- "type" : "number",
+ "type" : "integer",
"description" : "Length of the file content"
},
"IncludeOnline" : {
@@ -1169,7 +1167,7 @@
};
defs["BankTransaction"] = {
"title" : "",
- "required" : [ "BankAccount", "Contact", "LineItems", "Type" ],
+ "required" : [ "BankAccount", "LineItems", "Type" ],
"type" : "object",
"properties" : {
"Type" : {
@@ -1197,8 +1195,7 @@
"Date" : {
"type" : "string",
"description" : "Date of transaction – YYYY-MM-DD",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"Reference" : {
"type" : "string",
@@ -1266,9 +1263,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Last modified date UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"HasAttachments" : {
"type" : "boolean",
@@ -1328,8 +1325,7 @@
"Date" : {
"type" : "string",
"description" : "The date of the Transfer YYYY-MM-DD",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"BankTransferID" : {
"type" : "string",
@@ -1366,9 +1362,9 @@
"CreatedDateUTC" : {
"type" : "string",
"description" : "UTC timestamp of creation date of bank transfer",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"ValidationErrors" : {
"type" : "array",
@@ -1420,7 +1416,6 @@
"description" : "(NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero."
},
"Details" : {
- "maxLength" : 18,
"type" : "string",
"description" : "(Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18"
},
@@ -1442,8 +1437,7 @@
"Date" : {
"type" : "string",
"description" : "Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"Amount" : {
"type" : "number",
@@ -1478,9 +1472,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "UTC timestamp of last update to the payment",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"IsReconciled" : {
"type" : "string",
@@ -1590,9 +1584,9 @@
"CreatedDateUTC" : {
"type" : "string",
"description" : "UTC timestamp of creation date of branding theme",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
}
},
"description" : "",
@@ -1803,9 +1797,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "UTC timestamp of last update to contact",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"ContactGroups" : {
"type" : "array",
@@ -1977,8 +1971,7 @@
"Date" : {
"type" : "string",
"description" : "The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"Status" : {
"type" : "string",
@@ -2016,9 +2009,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "UTC timestamp of last update to the credit note",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"CurrencyCode" : {
"$ref" : "#/components/schemas/CurrencyCode"
@@ -2026,8 +2019,7 @@
"FullyPaidOnDate" : {
"type" : "string",
"description" : "Date when credit note was fully paid(UTC format)",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"CreditNoteID" : {
"type" : "string",
@@ -2223,7 +2215,7 @@
"Status" : {
"type" : "string",
"description" : "Current status of an employee – see contact status types",
- "enum" : [ "ACTIVE", "ARCHIVED", "GDPRREQUEST" ]
+ "enum" : [ "ACTIVE", "ARCHIVED", "GDPRREQUEST", "DELETED" ]
},
"FirstName" : {
"maxLength" : 255,
@@ -2240,9 +2232,9 @@
},
"UpdatedDateUTC" : {
"type" : "string",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"StatusAttributeString" : {
"type" : "string",
@@ -2338,9 +2330,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Last modified date UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"Total" : {
"type" : "number",
@@ -2366,16 +2358,14 @@
"PaymentDueDate" : {
"type" : "string",
"description" : "The date when the expense claim is due to be paid YYYY-MM-DD",
- "format" : "date",
"readOnly" : true,
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"ReportingDate" : {
"type" : "string",
"description" : "The date the expense claim will be reported in Xero YYYY-MM-DD",
- "format" : "date",
"readOnly" : true,
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"ReceiptID" : {
"type" : "string",
@@ -2443,9 +2433,9 @@
"DateUTC" : {
"type" : "string",
"description" : "UTC timestamp of creation date of branding theme",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
}
},
"description" : "",
@@ -2489,14 +2479,12 @@
"Date" : {
"type" : "string",
"description" : "Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"DueDate" : {
"type" : "string",
"description" : "Date invoice is due – YYYY-MM-DD",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"LineAmountTypes" : {
"$ref" : "#/components/schemas/LineAmountTypes"
@@ -2541,14 +2529,12 @@
"ExpectedPaymentDate" : {
"type" : "string",
"description" : "Shown on sales invoices (Accounts Receivable) when this has been set",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"PlannedPaymentDate" : {
"type" : "string",
"description" : "Shown on bills (Accounts Payable) when this has been set",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"CISDeduction" : {
"type" : "number",
@@ -2590,6 +2576,11 @@
"description" : "Xero generated unique identifier for invoice",
"format" : "uuid"
},
+ "RepeatingInvoiceID" : {
+ "type" : "string",
+ "description" : "Xero generated unique identifier for repeating invoices",
+ "format" : "uuid"
+ },
"HasAttachments" : {
"type" : "boolean",
"description" : "boolean to indicate if an invoice has an attachment",
@@ -2643,9 +2634,8 @@
"FullyPaidOnDate" : {
"type" : "string",
"description" : "The date the invoice was fully paid. Only returned on fully paid invoices",
- "format" : "date",
"readOnly" : true,
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"AmountCredited" : {
"type" : "number",
@@ -2657,9 +2647,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Last modified date UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"CreditNotes" : {
"type" : "array",
@@ -2810,9 +2800,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Last modified date in UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"ItemID" : {
"type" : "string",
@@ -2862,8 +2852,7 @@
"JournalDate" : {
"type" : "string",
"description" : "Date the journal was posted",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"JournalNumber" : {
"type" : "integer",
@@ -2872,9 +2861,9 @@
"CreatedDateUTC" : {
"type" : "string",
"description" : "Created date UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"Reference" : {
"type" : "string",
@@ -3162,9 +3151,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "The last modified date in UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"SourceTransactionTypeCode" : {
"type" : "string",
@@ -3217,8 +3206,7 @@
"Date" : {
"type" : "string",
"description" : "Date journal was posted – YYYY-MM-DD",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"LineAmountTypes" : {
"$ref" : "#/components/schemas/LineAmountTypes"
@@ -3246,9 +3234,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Last modified date UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"ManualJournalID" : {
"type" : "string",
@@ -3476,21 +3464,19 @@
"PeriodLockDate" : {
"type" : "string",
"description" : "Shown if set. See lock dates",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"EndOfYearLockDate" : {
"type" : "string",
"description" : "Shown if set. See lock dates",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"CreatedDateUTC" : {
"type" : "string",
"description" : "Timestamp when the organisation was created in Xero",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"Timezone" : {
"$ref" : "#/components/schemas/TimeZone"
@@ -3577,8 +3563,7 @@
"Date" : {
"type" : "string",
"description" : "The date the overpayment is created YYYY-MM-DD",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"Status" : {
"type" : "string",
@@ -3616,9 +3601,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "UTC timestamp of last update to the overpayment",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"CurrencyCode" : {
"$ref" : "#/components/schemas/CurrencyCode"
@@ -3728,8 +3713,7 @@
"Date" : {
"type" : "string",
"description" : "Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"CurrencyRate" : {
"type" : "number",
@@ -3765,9 +3749,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "UTC timestamp of last update to the payment",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"PaymentID" : {
"type" : "string",
@@ -3962,8 +3946,7 @@
"Date" : {
"type" : "string",
"description" : "The date the prepayment is created YYYY-MM-DD",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"Status" : {
"type" : "string",
@@ -4006,9 +3989,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "UTC timestamp of last update to the prepayment",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"CurrencyCode" : {
"$ref" : "#/components/schemas/CurrencyCode"
@@ -4122,14 +4105,12 @@
"Date" : {
"type" : "string",
"description" : "Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"DeliveryDate" : {
"type" : "string",
"description" : "Date the goods are to be delivered – YYYY-MM-DD",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"LineAmountTypes" : {
"$ref" : "#/components/schemas/LineAmountTypes"
@@ -4178,8 +4159,7 @@
"ExpectedArrivalDate" : {
"type" : "string",
"description" : "The date the goods are expected to arrive.",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"PurchaseOrderID" : {
"type" : "string",
@@ -4230,9 +4210,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Last modified date UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"StatusAttributeString" : {
"type" : "string",
@@ -4316,8 +4296,7 @@
"Date" : {
"type" : "string",
"description" : "Date quote was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"DateString" : {
"type" : "string",
@@ -4326,8 +4305,7 @@
"ExpiryDate" : {
"type" : "string",
"description" : "Date the quote expires – YYYY-MM-DD.",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"ExpiryDateString" : {
"type" : "string",
@@ -4390,9 +4368,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Last modified date UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"LineAmountTypes" : {
"$ref" : "#/components/schemas/QuoteLineAmountTypes"
@@ -4424,7 +4402,7 @@
"title" : "",
"type" : "string",
"description" : "The status of the quote.",
- "enum" : [ "DRAFT", "SENT", "DECLINED", "ACCEPTED", "INVOICED" ]
+ "enum" : [ "DRAFT", "SENT", "DECLINED", "ACCEPTED", "INVOICED", "DELETED" ]
};
defs["Quotes"] = {
"title" : "",
@@ -4447,8 +4425,7 @@
"Date" : {
"type" : "string",
"description" : "Date of receipt – YYYY-MM-DD",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"Contact" : {
"$ref" : "#/components/schemas/Contact"
@@ -4505,9 +4482,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Last modified date UTC format",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"HasAttachments" : {
"type" : "boolean",
@@ -4693,9 +4670,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Updated Date",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"Contacts" : {
"type" : "array",
@@ -4840,9 +4817,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Updated Date",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"Fields" : {
"type" : "array",
@@ -4946,20 +4923,17 @@
"StartDate" : {
"type" : "string",
"description" : "Date the first invoice of the current version of the repeating schedule was generated (changes when repeating invoice is edited)",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"NextScheduledDate" : {
"type" : "string",
"description" : "The calendar date of the next invoice in the schedule to be generated",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
},
"EndDate" : {
"type" : "string",
"description" : "Invoice end date – only returned if the template has an end date set",
- "format" : "date",
- "x-is-msdate-temp" : true
+ "x-is-msdate" : true
}
},
"description" : "",
@@ -5214,7 +5188,7 @@
"title" : "",
"type" : "string",
"description" : "Timezone specifications",
- "enum" : [ "MOROCCOSTANDARDTIME", "UTC", "GMTSTANDARDTIME", "GREENWICHSTANDARDTIME", "WEUROPESTANDARDTIME", "CENTRALEUROPESTANDARDTIME", "ROMANCESTANDARDTIME", "CENTRALEUROPEANSTANDARDTIME", "WCENTRALAFRICASTANDARDTIME", "NAMIBIASTANDARDTIME", "JORDANSTANDARDTIME", "GTBSTANDARDTIME", "MIDDLEEASTSTANDARDTIME", "EGYPTSTANDARDTIME", "SYRIASTANDARDTIME", "EEUROPESTANDARDTIME", "SOUTHAFRICASTANDARDTIME", "FLESTANDARDTIME", "TURKEYSTANDARDTIME", "ISRAELSTANDARDTIME", "KALININGRADSTANDARDTIME", "LIBYASTANDARDTIME", "ARABICSTANDARDTIME", "ARABSTANDARDTIME", "BELARUSSTANDARDTIME", "RUSSIANSTANDARDTIME", "EAFRICASTANDARDTIME", "IRANSTANDARDTIME", "ARABIANSTANDARDTIME", "AZERBAIJANSTANDARDTIME", "RUSSIATIMEZONE3", "MAURITIUSSTANDARDTIME", "GEORGIANSTANDARDTIME", "CAUCASUSSTANDARDTIME", "AFGHANISTANSTANDARDTIME", "WESTASIASTANDARDTIME", "EKATERINBURGSTANDARDTIME", "PAKISTANSTANDARDTIME", "INDIASTANDARDTIME", "SRILANKASTANDARDTIME", "NEPALSTANDARDTIME", "CENTRALASIASTANDARDTIME", "BANGLADESHSTANDARDTIME", "NCENTRALASIASTANDARDTIME", "MYANMARSTANDARDTIME", "SEASIASTANDARDTIME", "NORTHASIASTANDARDTIME", "CHINASTANDARDTIME", "NORTHASIAEASTSTANDARDTIME", "SINGAPORESTANDARDTIME", "WAUSTRALIASTANDARDTIME", "TAIPEISTANDARDTIME", "ULAANBAATARSTANDARDTIME", "TOKYOSTANDARDTIME", "KOREASTANDARDTIME", "YAKUTSKSTANDARDTIME", "CENAUSTRALIASTANDARDTIME", "AUSCENTRALSTANDARDTIME", "EAUSTRALIASTANDARDTIME", "AUSEASTERNSTANDARDTIME", "WESTPACIFICSTANDARDTIME", "TASMANIASTANDARDTIME", "MAGADANSTANDARDTIME", "VLADIVOSTOKSTANDARDTIME", "RUSSIATIMEZONE10", "CENTRALPACIFICSTANDARDTIME", "RUSSIATIMEZONE11", "NEWZEALANDSTANDARDTIME", "UTC+12", "FIJISTANDARDTIME", "KAMCHATKASTANDARDTIME", "TONGASTANDARDTIME", "SAMOASTANDARDTIME", "LINEISLANDSSTANDARDTIME", "AZORESSTANDARDTIME", "CAPEVERDESTANDARDTIME", "UTC02", "MIDATLANTICSTANDARDTIME", "ESOUTHAMERICASTANDARDTIME", "ARGENTINASTANDARDTIME", "SAEASTERNSTANDARDTIME", "GREENLANDSTANDARDTIME", "MONTEVIDEOSTANDARDTIME", "BAHIASTANDARDTIME", "NEWFOUNDLANDSTANDARDTIME", "PARAGUAYSTANDARDTIME", "ATLANTICSTANDARDTIME", "CENTRALBRAZILIANSTANDARDTIME", "SAWESTERNSTANDARDTIME", "PACIFICSASTANDARDTIME", "VENEZUELASTANDARDTIME", "SAPACIFICSTANDARDTIME", "EASTERNSTANDARDTIME", "USEASTERNSTANDARDTIME", "CENTRALAMERICASTANDARDTIME", "CENTRALSTANDARDTIME", "CENTRALSTANDARDTIME(MEXICO)", "CANADACENTRALSTANDARDTIME", "USMOUNTAINSTANDARDTIME", "MOUNTAINSTANDARDTIME(MEXICO)", "MOUNTAINSTANDARDTIME", "PACIFICSTANDARDTIME(MEXICO)", "PACIFICSTANDARDTIME", "ALASKANSTANDARDTIME", "HAWAIIANSTANDARDTIME", "UTC11", "DATELINESTANDARDTIME" ]
+ "enum" : [ "MOROCCOSTANDARDTIME", "UTC", "GMTSTANDARDTIME", "GREENWICHSTANDARDTIME", "WEUROPESTANDARDTIME", "CENTRALEUROPESTANDARDTIME", "ROMANCESTANDARDTIME", "CENTRALEUROPEANSTANDARDTIME", "WCENTRALAFRICASTANDARDTIME", "NAMIBIASTANDARDTIME", "JORDANSTANDARDTIME", "GTBSTANDARDTIME", "MIDDLEEASTSTANDARDTIME", "EGYPTSTANDARDTIME", "SYRIASTANDARDTIME", "EEUROPESTANDARDTIME", "SOUTHAFRICASTANDARDTIME", "FLESTANDARDTIME", "TURKEYSTANDARDTIME", "ISRAELSTANDARDTIME", "KALININGRADSTANDARDTIME", "LIBYASTANDARDTIME", "ARABICSTANDARDTIME", "ARABSTANDARDTIME", "BELARUSSTANDARDTIME", "RUSSIANSTANDARDTIME", "EAFRICASTANDARDTIME", "IRANSTANDARDTIME", "ARABIANSTANDARDTIME", "AZERBAIJANSTANDARDTIME", "RUSSIATIMEZONE3", "MAURITIUSSTANDARDTIME", "GEORGIANSTANDARDTIME", "CAUCASUSSTANDARDTIME", "AFGHANISTANSTANDARDTIME", "WESTASIASTANDARDTIME", "EKATERINBURGSTANDARDTIME", "PAKISTANSTANDARDTIME", "INDIASTANDARDTIME", "SRILANKASTANDARDTIME", "NEPALSTANDARDTIME", "CENTRALASIASTANDARDTIME", "BANGLADESHSTANDARDTIME", "NCENTRALASIASTANDARDTIME", "MYANMARSTANDARDTIME", "SEASIASTANDARDTIME", "NORTHASIASTANDARDTIME", "CHINASTANDARDTIME", "NORTHASIAEASTSTANDARDTIME", "SINGAPORESTANDARDTIME", "WAUSTRALIASTANDARDTIME", "TAIPEISTANDARDTIME", "ULAANBAATARSTANDARDTIME", "TOKYOSTANDARDTIME", "KOREASTANDARDTIME", "YAKUTSKSTANDARDTIME", "CENAUSTRALIASTANDARDTIME", "AUSCENTRALSTANDARDTIME", "EAUSTRALIASTANDARDTIME", "AUSEASTERNSTANDARDTIME", "WESTPACIFICSTANDARDTIME", "TASMANIASTANDARDTIME", "MAGADANSTANDARDTIME", "VLADIVOSTOKSTANDARDTIME", "RUSSIATIMEZONE10", "CENTRALPACIFICSTANDARDTIME", "RUSSIATIMEZONE11", "NEWZEALANDSTANDARDTIME", "UTC+12", "UTC+13", "FIJISTANDARDTIME", "KAMCHATKASTANDARDTIME", "TONGASTANDARDTIME", "SAMOASTANDARDTIME", "LINEISLANDSSTANDARDTIME", "AZORESSTANDARDTIME", "CAPEVERDESTANDARDTIME", "UTC02", "MIDATLANTICSTANDARDTIME", "ESOUTHAMERICASTANDARDTIME", "ARGENTINASTANDARDTIME", "SAEASTERNSTANDARDTIME", "GREENLANDSTANDARDTIME", "MONTEVIDEOSTANDARDTIME", "BAHIASTANDARDTIME", "NEWFOUNDLANDSTANDARDTIME", "PARAGUAYSTANDARDTIME", "ATLANTICSTANDARDTIME", "CENTRALBRAZILIANSTANDARDTIME", "SAWESTERNSTANDARDTIME", "PACIFICSASTANDARDTIME", "VENEZUELASTANDARDTIME", "SAPACIFICSTANDARDTIME", "EASTERNSTANDARDTIME", "USEASTERNSTANDARDTIME", "CENTRALAMERICASTANDARDTIME", "CENTRALSTANDARDTIME", "CENTRALSTANDARDTIME(MEXICO)", "CANADACENTRALSTANDARDTIME", "USMOUNTAINSTANDARDTIME", "MOUNTAINSTANDARDTIME(MEXICO)", "MOUNTAINSTANDARDTIME", "PACIFICSTANDARDTIME(MEXICO)", "PACIFICSTANDARDTIME", "ALASKANSTANDARDTIME", "HAWAIIANSTANDARDTIME", "UTC11", "DATELINESTANDARDTIME" ]
};
defs["TrackingCategories"] = {
"title" : "",
@@ -5340,9 +5314,9 @@
"UpdatedDateUTC" : {
"type" : "string",
"description" : "Timestamp of last change to user",
- "format" : "date-time",
"readOnly" : true,
- "x-is-msdate-time-temp" : true
+ "example" : "/Date(1573755038314)/",
+ "x-is-msdate-time" : true
},
"IsSubscriber" : {
"type" : "boolean",
@@ -6066,7 +6040,7 @@ Accounting API
API and SDK Documentation
Version: 1.0.0
/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+=""+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return""+(escaped?code:escape(code,true))+"\n
"}return''+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"\n"+quote+"
\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+""+type+">\n"};Renderer.prototype.listitem=function(text){return""+text+"\n"};Renderer.prototype.paragraph=function(text){return""+text+"
\n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
\n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"
\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+""+type+">\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+"
"};Renderer.prototype.br=function(){return this.options.xhtml?"
":"
"};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='"+text+"";return out};Renderer.prototype.image=function(href,title,text){var out='
":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occurred:
"+escape(e.message+"",true)+"
"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}());
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Xero Payroll NZ
+
+
+
+
+
+
+ PayrollNZ
+
+
+
+
getStatutoryDeductions
+
searches statutory deductions
+
+
+
+
+
+
+
+ /StatutoryDeductions
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/StatutoryDeductions?page=56"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNZApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNZApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNZApi apiInstance = new PayrollNZApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ StatutoryDeductions result = apiInstance.getStatutoryDeductions(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNZApi#getStatutoryDeductions");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNZApi;
+
+public class PayrollNZApiExample {
+
+ public static void main(String[] args) {
+ PayrollNZApi apiInstance = new PayrollNZApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ StatutoryDeductions result = apiInstance.getStatutoryDeductions(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNZApi#getStatutoryDeductions");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+PayrollNZApi *apiInstance = [[PayrollNZApi alloc] init];
+
+// searches statutory deductions
+[apiInstance getStatutoryDeductionsWith:xeroTenantId
+ page:page
+ completionHandler: ^(StatutoryDeductions output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+try {
+ const response: any = await xero.accountingApi.getStatutoryDeductions(xeroTenantId, page);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getStatutoryDeductionsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNZApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+ try
+ {
+ // searches statutory deductions
+ StatutoryDeductions result = apiInstance.getStatutoryDeductions(xeroTenantId, page);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNZApi.getStatutoryDeductions: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNZApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNZApi->getStatutoryDeductions: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNZApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNZApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+eval {
+ my $result = $api_instance->getStatutoryDeductions(xeroTenantId => $xeroTenantId, page => $page);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNZApi->getStatutoryDeductions: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNZApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+try:
+ # searches statutory deductions
+ api_response = api_instance.get_statutory_deductions(xeroTenantId, page=page)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNZApi->getStatutoryDeductions: %s\n" % e)
+
+
+
+
extern crate PayrollNZApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let page = 56; // Integer
+
+ let mut context = PayrollNZApi::Context::default();
+ let result = client.getStatutoryDeductions(xeroTenantId, page, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getSuperannuation
+
searches for a unique superannuation
+
+
+
+
+
+
+
+ /superannuations/{SuperannuationID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/superannuations/{SuperannuationID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNZApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNZApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNZApi apiInstance = new PayrollNZApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the superannuation
+ try {
+ SuperannuationObject result = apiInstance.getSuperannuation(xeroTenantId, superannuationID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNZApi#getSuperannuation");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNZApi;
+
+public class PayrollNZApiExample {
+
+ public static void main(String[] args) {
+ PayrollNZApi apiInstance = new PayrollNZApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the superannuation
+ try {
+ SuperannuationObject result = apiInstance.getSuperannuation(xeroTenantId, superannuationID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNZApi#getSuperannuation");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the superannuation (default to null)
+
+PayrollNZApi *apiInstance = [[PayrollNZApi alloc] init];
+
+// searches for a unique superannuation
+[apiInstance getSuperannuationWith:xeroTenantId
+ superannuationID:superannuationID
+ completionHandler: ^(SuperannuationObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const superannuationID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the superannuation
+try {
+ const response: any = await xero.accountingApi.getSuperannuation(xeroTenantId, superannuationID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getSuperannuationExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNZApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var superannuationID = new UUID(); // UUID | Identifier for the superannuation (default to null)
+
+ try
+ {
+ // searches for a unique superannuation
+ SuperannuationObject result = apiInstance.getSuperannuation(xeroTenantId, superannuationID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNZApi.getSuperannuation: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNZApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNZApi->getSuperannuation: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNZApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNZApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the superannuation
+
+eval {
+ my $result = $api_instance->getSuperannuation(xeroTenantId => $xeroTenantId, superannuationID => $superannuationID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNZApi->getSuperannuation: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNZApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the superannuation (default to null)
+
+try:
+ # searches for a unique superannuation
+ api_response = api_instance.get_superannuation(xeroTenantId, superannuationID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNZApi->getSuperannuation: %s\n" % e)
+
+
+
+
extern crate PayrollNZApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNZApi::Context::default();
+ let result = client.getSuperannuation(xeroTenantId, superannuationID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ SuperannuationID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the superannuation
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getSuperannuations
+
searches statutory deductions
+
+
+
+
+
+
+
+ /superannuations
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/superannuations?page=56"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNZApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNZApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNZApi apiInstance = new PayrollNZApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ Superannuations result = apiInstance.getSuperannuations(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNZApi#getSuperannuations");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNZApi;
+
+public class PayrollNZApiExample {
+
+ public static void main(String[] args) {
+ PayrollNZApi apiInstance = new PayrollNZApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ Superannuations result = apiInstance.getSuperannuations(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNZApi#getSuperannuations");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+PayrollNZApi *apiInstance = [[PayrollNZApi alloc] init];
+
+// searches statutory deductions
+[apiInstance getSuperannuationsWith:xeroTenantId
+ page:page
+ completionHandler: ^(Superannuations output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+try {
+ const response: any = await xero.accountingApi.getSuperannuations(xeroTenantId, page);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getSuperannuationsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNZApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+ try
+ {
+ // searches statutory deductions
+ Superannuations result = apiInstance.getSuperannuations(xeroTenantId, page);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNZApi.getSuperannuations: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNZApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNZApi->getSuperannuations: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNZApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNZApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+eval {
+ my $result = $api_instance->getSuperannuations(xeroTenantId => $xeroTenantId, page => $page);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNZApi->getSuperannuations: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNZApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+try:
+ # searches statutory deductions
+ api_response = api_instance.get_superannuations(xeroTenantId, page=page)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNZApi->getSuperannuations: %s\n" % e)
+
+
+
+
extern crate PayrollNZApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let page = 56; // Integer
+
+ let mut context = PayrollNZApi::Context::default();
+ let result = client.getSuperannuations(xeroTenantId, page, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ PayrollNz
+
+
+
+
approveTimesheet
+
approve a timesheet
+
+
+
+
+
+
+
+ /Timesheets/{TimesheetID}/Approve
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Approve"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ try {
+ TimesheetObject result = apiInstance.approveTimesheet(xeroTenantId, timesheetID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#approveTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ try {
+ TimesheetObject result = apiInstance.approveTimesheet(xeroTenantId, timesheetID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#approveTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// approve a timesheet
+[apiInstance approveTimesheetWith:xeroTenantId
+ timesheetID:timesheetID
+ completionHandler: ^(TimesheetObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet
+try {
+ const response: any = await xero.accountingApi.approveTimesheet(xeroTenantId, timesheetID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class approveTimesheetExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null)
+
+ try
+ {
+ // approve a timesheet
+ TimesheetObject result = apiInstance.approveTimesheet(xeroTenantId, timesheetID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.approveTimesheet: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->approveTimesheet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet
+
+eval {
+ my $result = $api_instance->approveTimesheet(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->approveTimesheet: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null)
+
+try:
+ # approve a timesheet
+ api_response = api_instance.approve_timesheet(xeroTenantId, timesheetID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->approveTimesheet: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.approveTimesheet(xeroTenantId, timesheetID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.timesheets |
+ Grant read-write access to payroll timesheets |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ TimesheetID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the timesheet
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
createDeduction
+
create a new deduction
+
+
+
+
+
+
+
+ /Deductions
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Deductions"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Deduction deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // Deduction |
+ try {
+ DeductionObject result = apiInstance.createDeduction(xeroTenantId, deduction);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createDeduction");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Deduction deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // Deduction |
+ try {
+ DeductionObject result = apiInstance.createDeduction(xeroTenantId, deduction);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createDeduction");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Deduction *deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// create a new deduction
+[apiInstance createDeductionWith:xeroTenantId
+ deduction:deduction
+ completionHandler: ^(DeductionObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const deduction:Deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // {Deduction}
+try {
+ const response: any = await xero.accountingApi.createDeduction(xeroTenantId, deduction);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createDeductionExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var deduction = new Deduction(); // Deduction |
+
+ try
+ {
+ // create a new deduction
+ DeductionObject result = apiInstance.createDeduction(xeroTenantId, deduction);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createDeduction: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createDeduction: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $deduction = ::Object::Deduction->new(); # Deduction |
+
+eval {
+ my $result = $api_instance->createDeduction(xeroTenantId => $xeroTenantId, deduction => $deduction);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createDeduction: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" } # Deduction |
+
+try:
+ # create a new deduction
+ api_response = api_instance.create_deduction(xeroTenantId, deduction)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createDeduction: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // Deduction
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createDeduction(xeroTenantId, deduction, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ deduction * |
+
+
+
+
+ Deduction
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEarningsRate
+
create a new earnings rate
+
+
+
+
+
+
+
+ /EarningsRates
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/EarningsRates"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ EarningsRate earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // EarningsRate |
+ try {
+ EarningsRateObject result = apiInstance.createEarningsRate(xeroTenantId, earningsRate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEarningsRate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ EarningsRate earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // EarningsRate |
+ try {
+ EarningsRateObject result = apiInstance.createEarningsRate(xeroTenantId, earningsRate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEarningsRate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+EarningsRate *earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// create a new earnings rate
+[apiInstance createEarningsRateWith:xeroTenantId
+ earningsRate:earningsRate
+ completionHandler: ^(EarningsRateObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const earningsRate:EarningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // {EarningsRate}
+try {
+ const response: any = await xero.accountingApi.createEarningsRate(xeroTenantId, earningsRate);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEarningsRateExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var earningsRate = new EarningsRate(); // EarningsRate |
+
+ try
+ {
+ // create a new earnings rate
+ EarningsRateObject result = apiInstance.createEarningsRate(xeroTenantId, earningsRate);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEarningsRate: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEarningsRate: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $earningsRate = ::Object::EarningsRate->new(); # EarningsRate |
+
+eval {
+ my $result = $api_instance->createEarningsRate(xeroTenantId => $xeroTenantId, earningsRate => $earningsRate);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEarningsRate: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" } # EarningsRate |
+
+try:
+ # create a new earnings rate
+ api_response = api_instance.create_earnings_rate(xeroTenantId, earningsRate)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEarningsRate: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // EarningsRate
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEarningsRate(xeroTenantId, earningsRate, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ earningsRate * |
+
+
+
+
+ EarningsRate
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEmployee
+
creates employees
+
+
+
+
+
+
+
+ /Employees
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Employee 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 |
+ try {
+ EmployeeObject result = apiInstance.createEmployee(xeroTenantId, employee);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployee");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Employee 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 |
+ try {
+ EmployeeObject result = apiInstance.createEmployee(xeroTenantId, employee);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployee");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Employee *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" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates employees
+[apiInstance createEmployeeWith:xeroTenantId
+ employee:employee
+ completionHandler: ^(EmployeeObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employee: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}
+try {
+ const response: any = await xero.accountingApi.createEmployee(xeroTenantId, employee);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEmployeeExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employee = new Employee(); // Employee |
+
+ try
+ {
+ // creates employees
+ EmployeeObject result = apiInstance.createEmployee(xeroTenantId, employee);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEmployee: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEmployee: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employee = ::Object::Employee->new(); # Employee |
+
+eval {
+ my $result = $api_instance->createEmployee(xeroTenantId => $xeroTenantId, employee => $employee);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEmployee: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+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 |
+
+try:
+ # creates employees
+ api_response = api_instance.create_employee(xeroTenantId, employee)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEmployee: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let 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
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEmployee(xeroTenantId, employee, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ employee * |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEmployeeEarningsTemplate
+
creates employee earnings template records
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/PayTemplates/earnings
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates/earnings"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EarningsTemplate earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // EarningsTemplate |
+ try {
+ EarningsTemplateObject result = apiInstance.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeEarningsTemplate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EarningsTemplate earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // EarningsTemplate |
+ try {
+ EarningsTemplateObject result = apiInstance.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeEarningsTemplate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+EarningsTemplate *earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates employee earnings template records
+[apiInstance createEmployeeEarningsTemplateWith:xeroTenantId
+ employeeId:employeeId
+ earningsTemplate:earningsTemplate
+ completionHandler: ^(EarningsTemplateObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const earningsTemplate:EarningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // {EarningsTemplate}
+try {
+ const response: any = await xero.accountingApi.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEmployeeEarningsTemplateExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var earningsTemplate = new EarningsTemplate(); // EarningsTemplate |
+
+ try
+ {
+ // creates employee earnings template records
+ EarningsTemplateObject result = apiInstance.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEmployeeEarningsTemplate: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $earningsTemplate = ::Object::EarningsTemplate->new(); # EarningsTemplate |
+
+eval {
+ my $result = $api_instance->createEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, earningsTemplate => $earningsTemplate);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" } # EarningsTemplate |
+
+try:
+ # creates employee earnings template records
+ api_response = api_instance.create_employee_earnings_template(xeroTenantId, employeeId, earningsTemplate)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // EarningsTemplate
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ earningsTemplate * |
+
+
+
+
+ EarningsTemplate
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEmployeeLeave
+
creates employee leave records
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/Leave
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EmployeeLeave employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // EmployeeLeave |
+ try {
+ EmployeeLeaveObject result = apiInstance.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeLeave");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EmployeeLeave employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // EmployeeLeave |
+ try {
+ EmployeeLeaveObject result = apiInstance.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeLeave");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+EmployeeLeave *employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates employee leave records
+[apiInstance createEmployeeLeaveWith:xeroTenantId
+ employeeId:employeeId
+ employeeLeave:employeeLeave
+ completionHandler: ^(EmployeeLeaveObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const employeeLeave:EmployeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // {EmployeeLeave}
+try {
+ const response: any = await xero.accountingApi.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEmployeeLeaveExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var employeeLeave = new EmployeeLeave(); // EmployeeLeave |
+
+ try
+ {
+ // creates employee leave records
+ EmployeeLeaveObject result = apiInstance.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEmployeeLeave: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEmployeeLeave: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $employeeLeave = ::Object::EmployeeLeave->new(); # EmployeeLeave |
+
+eval {
+ my $result = $api_instance->createEmployeeLeave(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeLeave => $employeeLeave);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEmployeeLeave: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" } # EmployeeLeave |
+
+try:
+ # creates employee leave records
+ api_response = api_instance.create_employee_leave(xeroTenantId, employeeId, employeeLeave)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEmployeeLeave: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // EmployeeLeave
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ employeeLeave * |
+
+
+
+
+ EmployeeLeave
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEmployeeLeaveSetup
+
Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/leaveSetup
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/leaveSetup"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EmployeeLeaveSetup employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // EmployeeLeaveSetup |
+ try {
+ EmployeeLeaveSetupObject result = apiInstance.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveSetup");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EmployeeLeaveSetup employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // EmployeeLeaveSetup |
+ try {
+ EmployeeLeaveSetupObject result = apiInstance.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveSetup");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+EmployeeLeaveSetup *employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee
+[apiInstance createEmployeeLeaveSetupWith:xeroTenantId
+ employeeId:employeeId
+ employeeLeaveSetup:employeeLeaveSetup
+ completionHandler: ^(EmployeeLeaveSetupObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const employeeLeaveSetup:EmployeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // {EmployeeLeaveSetup}
+try {
+ const response: any = await xero.accountingApi.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEmployeeLeaveSetupExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var employeeLeaveSetup = new EmployeeLeaveSetup(); // EmployeeLeaveSetup |
+
+ try
+ {
+ // Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee
+ EmployeeLeaveSetupObject result = apiInstance.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEmployeeLeaveSetup: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEmployeeLeaveSetup: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $employeeLeaveSetup = ::Object::EmployeeLeaveSetup->new(); # EmployeeLeaveSetup |
+
+eval {
+ my $result = $api_instance->createEmployeeLeaveSetup(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeLeaveSetup => $employeeLeaveSetup);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEmployeeLeaveSetup: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 } # EmployeeLeaveSetup |
+
+try:
+ # Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee
+ api_response = api_instance.create_employee_leave_setup(xeroTenantId, employeeId, employeeLeaveSetup)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEmployeeLeaveSetup: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // EmployeeLeaveSetup
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ employeeLeaveSetup * |
+
+
+
+
+ EmployeeLeaveSetup
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEmployeeLeaveType
+
creates employee leave type records
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/LeaveTypes
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeaveTypes"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EmployeeLeaveType employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // EmployeeLeaveType |
+ try {
+ EmployeeLeaveTypeObject result = apiInstance.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveType");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EmployeeLeaveType employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // EmployeeLeaveType |
+ try {
+ EmployeeLeaveTypeObject result = apiInstance.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveType");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+EmployeeLeaveType *employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates employee leave type records
+[apiInstance createEmployeeLeaveTypeWith:xeroTenantId
+ employeeId:employeeId
+ employeeLeaveType:employeeLeaveType
+ completionHandler: ^(EmployeeLeaveTypeObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const employeeLeaveType:EmployeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // {EmployeeLeaveType}
+try {
+ const response: any = await xero.accountingApi.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEmployeeLeaveTypeExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var employeeLeaveType = new EmployeeLeaveType(); // EmployeeLeaveType |
+
+ try
+ {
+ // creates employee leave type records
+ EmployeeLeaveTypeObject result = apiInstance.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEmployeeLeaveType: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEmployeeLeaveType: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $employeeLeaveType = ::Object::EmployeeLeaveType->new(); # EmployeeLeaveType |
+
+eval {
+ my $result = $api_instance->createEmployeeLeaveType(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeLeaveType => $employeeLeaveType);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEmployeeLeaveType: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 } # EmployeeLeaveType |
+
+try:
+ # creates employee leave type records
+ api_response = api_instance.create_employee_leave_type(xeroTenantId, employeeId, employeeLeaveType)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEmployeeLeaveType: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // EmployeeLeaveType
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ employeeLeaveType * |
+
+
+
+
+ EmployeeLeaveType
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEmployeeOpeningBalances
+
creates employee opening balances
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/openingBalances
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/openingBalances"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ array[EmployeeOpeningBalance] employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // array[EmployeeOpeningBalance] |
+ try {
+ EmployeeOpeningBalancesObject result = apiInstance.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeOpeningBalances");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ array[EmployeeOpeningBalance] employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // array[EmployeeOpeningBalance] |
+ try {
+ EmployeeOpeningBalancesObject result = apiInstance.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeOpeningBalances");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+array[EmployeeOpeningBalance] *employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates employee opening balances
+[apiInstance createEmployeeOpeningBalancesWith:xeroTenantId
+ employeeId:employeeId
+ employeeOpeningBalance:employeeOpeningBalance
+ completionHandler: ^(EmployeeOpeningBalancesObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // {array[EmployeeOpeningBalance]}
+try {
+ const response: any = await xero.accountingApi.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEmployeeOpeningBalancesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var employeeOpeningBalance = new array[EmployeeOpeningBalance](); // array[EmployeeOpeningBalance] |
+
+ try
+ {
+ // creates employee opening balances
+ EmployeeOpeningBalancesObject result = apiInstance.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEmployeeOpeningBalances: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEmployeeOpeningBalances: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $employeeOpeningBalance = [::Object::array[EmployeeOpeningBalance]->new()]; # array[EmployeeOpeningBalance] |
+
+eval {
+ my $result = $api_instance->createEmployeeOpeningBalances(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeOpeningBalance => $employeeOpeningBalance);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEmployeeOpeningBalances: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}] # array[EmployeeOpeningBalance] |
+
+try:
+ # creates employee opening balances
+ api_response = api_instance.create_employee_opening_balances(xeroTenantId, employeeId, employeeOpeningBalance)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEmployeeOpeningBalances: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // array[EmployeeOpeningBalance]
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ employeeOpeningBalance * |
+
+
+
+
+ array[EmployeeOpeningBalance]
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEmployeePaymentMethod
+
creates employee payment method
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/PaymentMethods
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PaymentMethods"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ PaymentMethod paymentMethod = ; // PaymentMethod |
+ try {
+ PaymentMethodObject result = apiInstance.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeePaymentMethod");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ PaymentMethod paymentMethod = ; // PaymentMethod |
+ try {
+ PaymentMethodObject result = apiInstance.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeePaymentMethod");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+PaymentMethod *paymentMethod = ; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates employee payment method
+[apiInstance createEmployeePaymentMethodWith:xeroTenantId
+ employeeId:employeeId
+ paymentMethod:paymentMethod
+ completionHandler: ^(PaymentMethodObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const paymentMethod:PaymentMethod = ; // {PaymentMethod}
+try {
+ const response: any = await xero.accountingApi.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEmployeePaymentMethodExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var paymentMethod = new PaymentMethod(); // PaymentMethod |
+
+ try
+ {
+ // creates employee payment method
+ PaymentMethodObject result = apiInstance.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEmployeePaymentMethod: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEmployeePaymentMethod: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $paymentMethod = ::Object::PaymentMethod->new(); # PaymentMethod |
+
+eval {
+ my $result = $api_instance->createEmployeePaymentMethod(xeroTenantId => $xeroTenantId, employeeId => $employeeId, paymentMethod => $paymentMethod);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEmployeePaymentMethod: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+paymentMethod = # PaymentMethod |
+
+try:
+ # creates employee payment method
+ api_response = api_instance.create_employee_payment_method(xeroTenantId, employeeId, paymentMethod)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEmployeePaymentMethod: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let paymentMethod = ; // PaymentMethod
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ paymentMethod * |
+
+
+
+
+ PaymentMethod
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEmployeeSalaryAndWage
+
creates employee salary and wage record
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/SalaryAndWages
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ SalaryAndWage salaryAndWage = { "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 |
+ try {
+ SalaryAndWageObject result = apiInstance.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeSalaryAndWage");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ SalaryAndWage salaryAndWage = { "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 |
+ try {
+ SalaryAndWageObject result = apiInstance.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployeeSalaryAndWage");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+SalaryAndWage *salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates employee salary and wage record
+[apiInstance createEmployeeSalaryAndWageWith:xeroTenantId
+ employeeId:employeeId
+ salaryAndWage:salaryAndWage
+ completionHandler: ^(SalaryAndWageObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const salaryAndWage:SalaryAndWage = { "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}
+try {
+ const response: any = await xero.accountingApi.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEmployeeSalaryAndWageExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var salaryAndWage = new SalaryAndWage(); // SalaryAndWage |
+
+ try
+ {
+ // creates employee salary and wage record
+ SalaryAndWageObject result = apiInstance.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEmployeeSalaryAndWage: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $salaryAndWage = ::Object::SalaryAndWage->new(); # SalaryAndWage |
+
+eval {
+ my $result = $api_instance->createEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWage => $salaryAndWage);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+salaryAndWage = { "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 |
+
+try:
+ # creates employee salary and wage record
+ api_response = api_instance.create_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWage)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let salaryAndWage = { "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
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ salaryAndWage * |
+
+
+
+
+ SalaryAndWage
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createEmployment
+
creates employment
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/Employment
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Employment"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ Employment employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // Employment |
+ try {
+ EmploymentObject result = apiInstance.createEmployment(xeroTenantId, employeeId, employment);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployment");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ Employment employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // Employment |
+ try {
+ EmploymentObject result = apiInstance.createEmployment(xeroTenantId, employeeId, employment);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createEmployment");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+Employment *employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates employment
+[apiInstance createEmploymentWith:xeroTenantId
+ employeeId:employeeId
+ employment:employment
+ completionHandler: ^(EmploymentObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const employment:Employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // {Employment}
+try {
+ const response: any = await xero.accountingApi.createEmployment(xeroTenantId, employeeId, employment);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createEmploymentExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var employment = new Employment(); // Employment |
+
+ try
+ {
+ // creates employment
+ EmploymentObject result = apiInstance.createEmployment(xeroTenantId, employeeId, employment);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createEmployment: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createEmployment: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $employment = ::Object::Employment->new(); # Employment |
+
+eval {
+ my $result = $api_instance->createEmployment(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employment => $employment);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createEmployment: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" } # Employment |
+
+try:
+ # creates employment
+ api_response = api_instance.create_employment(xeroTenantId, employeeId, employment)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createEmployment: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // Employment
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createEmployment(xeroTenantId, employeeId, employment, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ employment * |
+
+
+
+
+ Employment
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createLeaveType
+
create a new leave type
+
+
+
+
+
+
+
+ /LeaveTypes
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/LeaveTypes"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ LeaveType leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // LeaveType |
+ try {
+ LeaveTypeObject result = apiInstance.createLeaveType(xeroTenantId, leaveType);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createLeaveType");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ LeaveType leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // LeaveType |
+ try {
+ LeaveTypeObject result = apiInstance.createLeaveType(xeroTenantId, leaveType);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createLeaveType");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+LeaveType *leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// create a new leave type
+[apiInstance createLeaveTypeWith:xeroTenantId
+ leaveType:leaveType
+ completionHandler: ^(LeaveTypeObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const leaveType:LeaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // {LeaveType}
+try {
+ const response: any = await xero.accountingApi.createLeaveType(xeroTenantId, leaveType);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createLeaveTypeExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var leaveType = new LeaveType(); // LeaveType |
+
+ try
+ {
+ // create a new leave type
+ LeaveTypeObject result = apiInstance.createLeaveType(xeroTenantId, leaveType);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createLeaveType: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createLeaveType: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $leaveType = ::Object::LeaveType->new(); # LeaveType |
+
+eval {
+ my $result = $api_instance->createLeaveType(xeroTenantId => $xeroTenantId, leaveType => $leaveType);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createLeaveType: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true } # LeaveType |
+
+try:
+ # create a new leave type
+ api_response = api_instance.create_leave_type(xeroTenantId, leaveType)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createLeaveType: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // LeaveType
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createLeaveType(xeroTenantId, leaveType, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ leaveType * |
+
+
+
+
+ LeaveType
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createMultipleEmployeeEarningsTemplate
+
creates multiple employee earnings template records
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/paytemplateearnings
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/paytemplateearnings"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ array[EarningsTemplate] earningsTemplate = [{"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] |
+ try {
+ EmployeeEarningsTemplates result = apiInstance.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createMultipleEmployeeEarningsTemplate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ array[EarningsTemplate] earningsTemplate = [{"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] |
+ try {
+ EmployeeEarningsTemplates result = apiInstance.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createMultipleEmployeeEarningsTemplate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+array[EarningsTemplate] *earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates multiple employee earnings template records
+[apiInstance createMultipleEmployeeEarningsTemplateWith:xeroTenantId
+ employeeId:employeeId
+ earningsTemplate:earningsTemplate
+ completionHandler: ^(EmployeeEarningsTemplates output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const earningsTemplate = [{"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]}
+try {
+ const response: any = await xero.accountingApi.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createMultipleEmployeeEarningsTemplateExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var earningsTemplate = new array[EarningsTemplate](); // array[EarningsTemplate] |
+
+ try
+ {
+ // creates multiple employee earnings template records
+ EmployeeEarningsTemplates result = apiInstance.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createMultipleEmployeeEarningsTemplate: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $earningsTemplate = [::Object::array[EarningsTemplate]->new()]; # array[EarningsTemplate] |
+
+eval {
+ my $result = $api_instance->createMultipleEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, earningsTemplate => $earningsTemplate);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+earningsTemplate = [{"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] |
+
+try:
+ # creates multiple employee earnings template records
+ api_response = api_instance.create_multiple_employee_earnings_template(xeroTenantId, employeeId, earningsTemplate)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let earningsTemplate = [{"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]
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ earningsTemplate * |
+
+
+
+
+ array[EarningsTemplate]
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createPayRun
+
create a pay run
+
+
+
+
+
+
+
+ /PayRuns
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PayRuns"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ PayRun payRun = { "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 |
+ try {
+ PayRunObject result = apiInstance.createPayRun(xeroTenantId, payRun);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createPayRun");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ PayRun payRun = { "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 |
+ try {
+ PayRunObject result = apiInstance.createPayRun(xeroTenantId, payRun);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createPayRun");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+PayRun *payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// create a pay run
+[apiInstance createPayRunWith:xeroTenantId
+ payRun:payRun
+ completionHandler: ^(PayRunObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const payRun:PayRun = { "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}
+try {
+ const response: any = await xero.accountingApi.createPayRun(xeroTenantId, payRun);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createPayRunExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var payRun = new PayRun(); // PayRun |
+
+ try
+ {
+ // create a pay run
+ PayRunObject result = apiInstance.createPayRun(xeroTenantId, payRun);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createPayRun: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createPayRun: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $payRun = ::Object::PayRun->new(); # PayRun |
+
+eval {
+ my $result = $api_instance->createPayRun(xeroTenantId => $xeroTenantId, payRun => $payRun);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createPayRun: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+payRun = { "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 |
+
+try:
+ # create a pay run
+ api_response = api_instance.create_pay_run(xeroTenantId, payRun)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createPayRun: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let payRun = { "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
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createPayRun(xeroTenantId, payRun, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.payruns |
+ Grant read-write access to payroll payruns |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ payRun * |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createPayRunCalendar
+
create a new payrun calendar
+
+
+
+
+
+
+
+ /PayRunCalendars
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PayRunCalendars"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ PayRunCalendar payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // PayRunCalendar |
+ try {
+ PayRunCalendarObject result = apiInstance.createPayRunCalendar(xeroTenantId, payRunCalendar);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createPayRunCalendar");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ PayRunCalendar payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // PayRunCalendar |
+ try {
+ PayRunCalendarObject result = apiInstance.createPayRunCalendar(xeroTenantId, payRunCalendar);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createPayRunCalendar");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+PayRunCalendar *payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// create a new payrun calendar
+[apiInstance createPayRunCalendarWith:xeroTenantId
+ payRunCalendar:payRunCalendar
+ completionHandler: ^(PayRunCalendarObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const payRunCalendar:PayRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // {PayRunCalendar}
+try {
+ const response: any = await xero.accountingApi.createPayRunCalendar(xeroTenantId, payRunCalendar);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createPayRunCalendarExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var payRunCalendar = new PayRunCalendar(); // PayRunCalendar |
+
+ try
+ {
+ // create a new payrun calendar
+ PayRunCalendarObject result = apiInstance.createPayRunCalendar(xeroTenantId, payRunCalendar);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createPayRunCalendar: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createPayRunCalendar: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $payRunCalendar = ::Object::PayRunCalendar->new(); # PayRunCalendar |
+
+eval {
+ my $result = $api_instance->createPayRunCalendar(xeroTenantId => $xeroTenantId, payRunCalendar => $payRunCalendar);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createPayRunCalendar: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" } # PayRunCalendar |
+
+try:
+ # create a new payrun calendar
+ api_response = api_instance.create_pay_run_calendar(xeroTenantId, payRunCalendar)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createPayRunCalendar: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // PayRunCalendar
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createPayRunCalendar(xeroTenantId, payRunCalendar, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ payRunCalendar * |
+
+
+
+
+ PayRunCalendar
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createReimbursement
+
create a new reimbursement
+
+
+
+
+
+
+
+ /Reimbursements
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Reimbursements"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Reimbursement reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // Reimbursement |
+ try {
+ ReimbursementObject result = apiInstance.createReimbursement(xeroTenantId, reimbursement);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createReimbursement");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Reimbursement reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // Reimbursement |
+ try {
+ ReimbursementObject result = apiInstance.createReimbursement(xeroTenantId, reimbursement);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createReimbursement");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Reimbursement *reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// create a new reimbursement
+[apiInstance createReimbursementWith:xeroTenantId
+ reimbursement:reimbursement
+ completionHandler: ^(ReimbursementObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const reimbursement:Reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // {Reimbursement}
+try {
+ const response: any = await xero.accountingApi.createReimbursement(xeroTenantId, reimbursement);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createReimbursementExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var reimbursement = new Reimbursement(); // Reimbursement |
+
+ try
+ {
+ // create a new reimbursement
+ ReimbursementObject result = apiInstance.createReimbursement(xeroTenantId, reimbursement);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createReimbursement: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createReimbursement: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $reimbursement = ::Object::Reimbursement->new(); # Reimbursement |
+
+eval {
+ my $result = $api_instance->createReimbursement(xeroTenantId => $xeroTenantId, reimbursement => $reimbursement);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createReimbursement: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" } # Reimbursement |
+
+try:
+ # create a new reimbursement
+ api_response = api_instance.create_reimbursement(xeroTenantId, reimbursement)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createReimbursement: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // Reimbursement
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createReimbursement(xeroTenantId, reimbursement, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ reimbursement * |
+
+
+
+
+ Reimbursement
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createSuperannuation
+
create a new superannuation
+
+
+
+
+
+
+
+ /superannuations
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/superannuations"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Benefit benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // Benefit |
+ try {
+ SuperannuationObject result = apiInstance.createSuperannuation(xeroTenantId, benefit);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createSuperannuation");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Benefit benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // Benefit |
+ try {
+ SuperannuationObject result = apiInstance.createSuperannuation(xeroTenantId, benefit);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createSuperannuation");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Benefit *benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// create a new superannuation
+[apiInstance createSuperannuationWith:xeroTenantId
+ benefit:benefit
+ completionHandler: ^(SuperannuationObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const benefit:Benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // {Benefit}
+try {
+ const response: any = await xero.accountingApi.createSuperannuation(xeroTenantId, benefit);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createSuperannuationExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var benefit = new Benefit(); // Benefit |
+
+ try
+ {
+ // create a new superannuation
+ SuperannuationObject result = apiInstance.createSuperannuation(xeroTenantId, benefit);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createSuperannuation: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createSuperannuation: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $benefit = ::Object::Benefit->new(); # Benefit |
+
+eval {
+ my $result = $api_instance->createSuperannuation(xeroTenantId => $xeroTenantId, benefit => $benefit);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createSuperannuation: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 } # Benefit |
+
+try:
+ # create a new superannuation
+ api_response = api_instance.create_superannuation(xeroTenantId, benefit)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createSuperannuation: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // Benefit
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createSuperannuation(xeroTenantId, benefit, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ benefit * |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createTimesheet
+
create a new timesheet
+
+
+
+
+
+
+
+ /Timesheets
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Timesheets"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Timesheet 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 |
+ try {
+ TimesheetObject result = apiInstance.createTimesheet(xeroTenantId, timesheet);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Timesheet 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 |
+ try {
+ TimesheetObject result = apiInstance.createTimesheet(xeroTenantId, timesheet);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Timesheet *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 } ] }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// create a new timesheet
+[apiInstance createTimesheetWith:xeroTenantId
+ timesheet:timesheet
+ completionHandler: ^(TimesheetObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const timesheet: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}
+try {
+ const response: any = await xero.accountingApi.createTimesheet(xeroTenantId, timesheet);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createTimesheetExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var timesheet = new Timesheet(); // Timesheet |
+
+ try
+ {
+ // create a new timesheet
+ TimesheetObject result = apiInstance.createTimesheet(xeroTenantId, timesheet);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createTimesheet: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createTimesheet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $timesheet = ::Object::Timesheet->new(); # Timesheet |
+
+eval {
+ my $result = $api_instance->createTimesheet(xeroTenantId => $xeroTenantId, timesheet => $timesheet);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createTimesheet: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+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 |
+
+try:
+ # create a new timesheet
+ api_response = api_instance.create_timesheet(xeroTenantId, timesheet)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createTimesheet: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let 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
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createTimesheet(xeroTenantId, timesheet, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.timesheets |
+ Grant read-write access to payroll timesheets |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ timesheet * |
+
+
+
+
+ Timesheet
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
createTimesheetLine
+
create a new timesheet line
+
+
+
+
+
+
+
+ /Timesheets/{TimesheetID}/Lines
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Lines"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ TimesheetLine timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // TimesheetLine |
+ try {
+ TimesheetLineObject result = apiInstance.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createTimesheetLine");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ TimesheetLine timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // TimesheetLine |
+ try {
+ TimesheetLineObject result = apiInstance.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#createTimesheetLine");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
+TimesheetLine *timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// create a new timesheet line
+[apiInstance createTimesheetLineWith:xeroTenantId
+ timesheetID:timesheetID
+ timesheetLine:timesheetLine
+ completionHandler: ^(TimesheetLineObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet
+const timesheetLine:TimesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // {TimesheetLine}
+try {
+ const response: any = await xero.accountingApi.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class createTimesheetLineExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null)
+ var timesheetLine = new TimesheetLine(); // TimesheetLine |
+
+ try
+ {
+ // create a new timesheet line
+ TimesheetLineObject result = apiInstance.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.createTimesheetLine: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->createTimesheetLine: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet
+my $timesheetLine = ::Object::TimesheetLine->new(); # TimesheetLine |
+
+eval {
+ my $result = $api_instance->createTimesheetLine(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID, timesheetLine => $timesheetLine);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->createTimesheetLine: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null)
+timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 } # TimesheetLine |
+
+try:
+ # create a new timesheet line
+ api_response = api_instance.create_timesheet_line(xeroTenantId, timesheetID, timesheetLine)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->createTimesheetLine: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+ let timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // TimesheetLine
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.timesheets |
+ Grant read-write access to payroll timesheets |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ TimesheetID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the timesheet
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ timesheetLine * |
+
+
+
+
+ TimesheetLine
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
deleteEmployeeEarningsTemplate
+
deletes an employee earnings template record
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/PayTemplates/earnings/{PayTemplateEarningID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates/earnings/{PayTemplateEarningID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object
+ try {
+ EarningsTemplateObject result = apiInstance.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteEmployeeEarningsTemplate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object
+ try {
+ EarningsTemplateObject result = apiInstance.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteEmployeeEarningsTemplate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+UUID *payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single pay template earnings object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// deletes an employee earnings template record
+[apiInstance deleteEmployeeEarningsTemplateWith:xeroTenantId
+ employeeId:employeeId
+ payTemplateEarningID:payTemplateEarningID
+ completionHandler: ^(EarningsTemplateObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const payTemplateEarningID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single pay template earnings object
+try {
+ const response: any = await xero.accountingApi.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class deleteEmployeeEarningsTemplateExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var payTemplateEarningID = new UUID(); // UUID | Id for single pay template earnings object (default to null)
+
+ try
+ {
+ // deletes an employee earnings template record
+ EarningsTemplateObject result = apiInstance.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.deleteEmployeeEarningsTemplate: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->deleteEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single pay template earnings object
+
+eval {
+ my $result = $api_instance->deleteEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, payTemplateEarningID => $payTemplateEarningID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->deleteEmployeeEarningsTemplate: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single pay template earnings object (default to null)
+
+try:
+ # deletes an employee earnings template record
+ api_response = api_instance.delete_employee_earnings_template(xeroTenantId, employeeId, payTemplateEarningID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->deleteEmployeeEarningsTemplate: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+ PayTemplateEarningID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Id for single pay template earnings object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
deleteEmployeeLeave
+
deletes an employee leave record
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/Leave/{LeaveID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave/{LeaveID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID | Leave id for single object
+ try {
+ EmployeeLeaveObject result = apiInstance.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteEmployeeLeave");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID | Leave id for single object
+ try {
+ EmployeeLeaveObject result = apiInstance.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteEmployeeLeave");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+UUID *leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // Leave id for single object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// deletes an employee leave record
+[apiInstance deleteEmployeeLeaveWith:xeroTenantId
+ employeeId:employeeId
+ leaveID:leaveID
+ completionHandler: ^(EmployeeLeaveObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const leaveID = "c4be24e5-e840-4c92-9eaa-2d86cd596314"; // {UUID} Leave id for single object
+try {
+ const response: any = await xero.accountingApi.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class deleteEmployeeLeaveExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var leaveID = new UUID(); // UUID | Leave id for single object (default to null)
+
+ try
+ {
+ // deletes an employee leave record
+ EmployeeLeaveObject result = apiInstance.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.deleteEmployeeLeave: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->deleteEmployeeLeave: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; # UUID | Leave id for single object
+
+eval {
+ my $result = $api_instance->deleteEmployeeLeave(xeroTenantId => $xeroTenantId, employeeId => $employeeId, leaveID => $leaveID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->deleteEmployeeLeave: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314 # UUID | Leave id for single object (default to null)
+
+try:
+ # deletes an employee leave record
+ api_response = api_instance.delete_employee_leave(xeroTenantId, employeeId, leaveID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->deleteEmployeeLeave: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+ LeaveID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Leave id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
deleteEmployeeSalaryAndWage
+
deletes an employee salary and wages record
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single salary and wages object
+ try {
+ SalaryAndWageObject result = apiInstance.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteEmployeeSalaryAndWage");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single salary and wages object
+ try {
+ SalaryAndWageObject result = apiInstance.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteEmployeeSalaryAndWage");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+UUID *salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single salary and wages object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// deletes an employee salary and wages record
+[apiInstance deleteEmployeeSalaryAndWageWith:xeroTenantId
+ employeeId:employeeId
+ salaryAndWagesID:salaryAndWagesID
+ completionHandler: ^(SalaryAndWageObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const salaryAndWagesID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single salary and wages object
+try {
+ const response: any = await xero.accountingApi.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class deleteEmployeeSalaryAndWageExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var salaryAndWagesID = new UUID(); // UUID | Id for single salary and wages object (default to null)
+
+ try
+ {
+ // deletes an employee salary and wages record
+ SalaryAndWageObject result = apiInstance.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.deleteEmployeeSalaryAndWage: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->deleteEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single salary and wages object
+
+eval {
+ my $result = $api_instance->deleteEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWagesID => $salaryAndWagesID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->deleteEmployeeSalaryAndWage: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single salary and wages object (default to null)
+
+try:
+ # deletes an employee salary and wages record
+ api_response = api_instance.delete_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWagesID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->deleteEmployeeSalaryAndWage: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+ SalaryAndWagesID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Id for single salary and wages object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
deleteTimesheet
+
delete a timesheet
+
+
+
+
+
+
+
+ /Timesheets/{TimesheetID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ try {
+ TimesheetLine result = apiInstance.deleteTimesheet(xeroTenantId, timesheetID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ try {
+ TimesheetLine result = apiInstance.deleteTimesheet(xeroTenantId, timesheetID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// delete a timesheet
+[apiInstance deleteTimesheetWith:xeroTenantId
+ timesheetID:timesheetID
+ completionHandler: ^(TimesheetLine output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet
+try {
+ const response: any = await xero.accountingApi.deleteTimesheet(xeroTenantId, timesheetID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class deleteTimesheetExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null)
+
+ try
+ {
+ // delete a timesheet
+ TimesheetLine result = apiInstance.deleteTimesheet(xeroTenantId, timesheetID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.deleteTimesheet: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->deleteTimesheet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet
+
+eval {
+ my $result = $api_instance->deleteTimesheet(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->deleteTimesheet: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null)
+
+try:
+ # delete a timesheet
+ api_response = api_instance.delete_timesheet(xeroTenantId, timesheetID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->deleteTimesheet: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.deleteTimesheet(xeroTenantId, timesheetID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.timesheets |
+ Grant read-write access to payroll timesheets |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ TimesheetID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the timesheet
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
deleteTimesheetLine
+
delete a timesheet line
+
+
+
+
+
+
+
+ /Timesheets/{TimesheetID}/Lines/{TimesheetLineID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ UUID timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet line
+ try {
+ TimesheetLine result = apiInstance.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteTimesheetLine");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ UUID timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet line
+ try {
+ TimesheetLine result = apiInstance.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#deleteTimesheetLine");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
+UUID *timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet line (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// delete a timesheet line
+[apiInstance deleteTimesheetLineWith:xeroTenantId
+ timesheetID:timesheetID
+ timesheetLineID:timesheetLineID
+ completionHandler: ^(TimesheetLine output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet
+const timesheetLineID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet line
+try {
+ const response: any = await xero.accountingApi.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class deleteTimesheetLineExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null)
+ var timesheetLineID = new UUID(); // UUID | Identifier for the timesheet line (default to null)
+
+ try
+ {
+ // delete a timesheet line
+ TimesheetLine result = apiInstance.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.deleteTimesheetLine: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->deleteTimesheetLine: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet
+my $timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet line
+
+eval {
+ my $result = $api_instance->deleteTimesheetLine(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID, timesheetLineID => $timesheetLineID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->deleteTimesheetLine: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null)
+timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet line (default to null)
+
+try:
+ # delete a timesheet line
+ api_response = api_instance.delete_timesheet_line(xeroTenantId, timesheetID, timesheetLineID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->deleteTimesheetLine: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+ let timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.timesheets |
+ Grant read-write access to payroll timesheets |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ TimesheetID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the timesheet
+
+
+
+ Required
+
+
+
+ |
+
+
+ TimesheetLineID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the timesheet line
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getDeduction
+
retrieve a single deduction by id
+
+
+
+
+
+
+
+ /Deductions/{deductionId}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Deductions/{deductionId}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the deduction
+ try {
+ DeductionObject result = apiInstance.getDeduction(xeroTenantId, deductionId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getDeduction");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the deduction
+ try {
+ DeductionObject result = apiInstance.getDeduction(xeroTenantId, deductionId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getDeduction");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the deduction (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve a single deduction by id
+[apiInstance getDeductionWith:xeroTenantId
+ deductionId:deductionId
+ completionHandler: ^(DeductionObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const deductionId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the deduction
+try {
+ const response: any = await xero.accountingApi.getDeduction(xeroTenantId, deductionId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getDeductionExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var deductionId = new UUID(); // UUID | Identifier for the deduction (default to null)
+
+ try
+ {
+ // retrieve a single deduction by id
+ DeductionObject result = apiInstance.getDeduction(xeroTenantId, deductionId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getDeduction: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getDeduction: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the deduction
+
+eval {
+ my $result = $api_instance->getDeduction(xeroTenantId => $xeroTenantId, deductionId => $deductionId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getDeduction: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the deduction (default to null)
+
+try:
+ # retrieve a single deduction by id
+ api_response = api_instance.get_deduction(xeroTenantId, deductionId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getDeduction: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getDeduction(xeroTenantId, deductionId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ deductionId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the deduction
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getDeductions
+
searches deductions
+
+
+
+
+
+
+
+ /Deductions
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Deductions?page=56"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ Deductions result = apiInstance.getDeductions(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getDeductions");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ Deductions result = apiInstance.getDeductions(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getDeductions");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches deductions
+[apiInstance getDeductionsWith:xeroTenantId
+ page:page
+ completionHandler: ^(Deductions output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+try {
+ const response: any = await xero.accountingApi.getDeductions(xeroTenantId, page);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getDeductionsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+ try
+ {
+ // searches deductions
+ Deductions result = apiInstance.getDeductions(xeroTenantId, page);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getDeductions: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getDeductions: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+eval {
+ my $result = $api_instance->getDeductions(xeroTenantId => $xeroTenantId, page => $page);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getDeductions: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+try:
+ # searches deductions
+ api_response = api_instance.get_deductions(xeroTenantId, page=page)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getDeductions: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let page = 56; // Integer
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getDeductions(xeroTenantId, page, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getEarningsRate
+
retrieve a single earnings rates by id
+
+
+
+
+
+
+
+ /EarningsRates/{EarningsRateID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/EarningsRates/{EarningsRateID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the earnings rate
+ try {
+ EarningsRateObject result = apiInstance.getEarningsRate(xeroTenantId, earningsRateID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEarningsRate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the earnings rate
+ try {
+ EarningsRateObject result = apiInstance.getEarningsRate(xeroTenantId, earningsRateID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEarningsRate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the earnings rate (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve a single earnings rates by id
+[apiInstance getEarningsRateWith:xeroTenantId
+ earningsRateID:earningsRateID
+ completionHandler: ^(EarningsRateObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const earningsRateID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the earnings rate
+try {
+ const response: any = await xero.accountingApi.getEarningsRate(xeroTenantId, earningsRateID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEarningsRateExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var earningsRateID = new UUID(); // UUID | Identifier for the earnings rate (default to null)
+
+ try
+ {
+ // retrieve a single earnings rates by id
+ EarningsRateObject result = apiInstance.getEarningsRate(xeroTenantId, earningsRateID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEarningsRate: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEarningsRate: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the earnings rate
+
+eval {
+ my $result = $api_instance->getEarningsRate(xeroTenantId => $xeroTenantId, earningsRateID => $earningsRateID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEarningsRate: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the earnings rate (default to null)
+
+try:
+ # retrieve a single earnings rates by id
+ api_response = api_instance.get_earnings_rate(xeroTenantId, earningsRateID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEarningsRate: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEarningsRate(xeroTenantId, earningsRateID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EarningsRateID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the earnings rate
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEarningsRates
+
searches earnings rates
+
+
+
+
+
+
+
+ /EarningsRates
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/EarningsRates?page=56"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ EarningsRates result = apiInstance.getEarningsRates(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEarningsRates");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ EarningsRates result = apiInstance.getEarningsRates(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEarningsRates");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches earnings rates
+[apiInstance getEarningsRatesWith:xeroTenantId
+ page:page
+ completionHandler: ^(EarningsRates output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+try {
+ const response: any = await xero.accountingApi.getEarningsRates(xeroTenantId, page);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEarningsRatesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+ try
+ {
+ // searches earnings rates
+ EarningsRates result = apiInstance.getEarningsRates(xeroTenantId, page);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEarningsRates: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEarningsRates: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+eval {
+ my $result = $api_instance->getEarningsRates(xeroTenantId => $xeroTenantId, page => $page);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEarningsRates: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+try:
+ # searches earnings rates
+ api_response = api_instance.get_earnings_rates(xeroTenantId, page=page)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEarningsRates: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let page = 56; // Integer
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEarningsRates(xeroTenantId, page, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getEmployee
+
searches employees
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeObject result = apiInstance.getEmployee(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployee");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeObject result = apiInstance.getEmployee(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployee");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches employees
+[apiInstance getEmployeeWith:xeroTenantId
+ employeeId:employeeId
+ completionHandler: ^(EmployeeObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+try {
+ const response: any = await xero.accountingApi.getEmployee(xeroTenantId, employeeId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeeExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+
+ try
+ {
+ // searches employees
+ EmployeeObject result = apiInstance.getEmployee(xeroTenantId, employeeId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployee: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployee: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+
+eval {
+ my $result = $api_instance->getEmployee(xeroTenantId => $xeroTenantId, employeeId => $employeeId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployee: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+
+try:
+ # searches employees
+ api_response = api_instance.get_employee(xeroTenantId, employeeId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployee: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployee(xeroTenantId, employeeId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEmployeeLeaveBalances
+
search employee leave balances
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/LeaveBalances
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeaveBalances"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeLeaveBalances result = apiInstance.getEmployeeLeaveBalances(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveBalances");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeLeaveBalances result = apiInstance.getEmployeeLeaveBalances(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveBalances");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// search employee leave balances
+[apiInstance getEmployeeLeaveBalancesWith:xeroTenantId
+ employeeId:employeeId
+ completionHandler: ^(EmployeeLeaveBalances output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+try {
+ const response: any = await xero.accountingApi.getEmployeeLeaveBalances(xeroTenantId, employeeId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeeLeaveBalancesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+
+ try
+ {
+ // search employee leave balances
+ EmployeeLeaveBalances result = apiInstance.getEmployeeLeaveBalances(xeroTenantId, employeeId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeaveBalances: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeeLeaveBalances: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+
+eval {
+ my $result = $api_instance->getEmployeeLeaveBalances(xeroTenantId => $xeroTenantId, employeeId => $employeeId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeeLeaveBalances: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+
+try:
+ # search employee leave balances
+ api_response = api_instance.get_employee_leave_balances(xeroTenantId, employeeId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeeLeaveBalances: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeeLeaveBalances(xeroTenantId, employeeId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEmployeeLeavePeriods
+
searches employee leave periods
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/LeavePeriods
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeavePeriods?startDate=2013-10-20&endDate=Johnson"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ date startDate = 2013-10-20; // date | Filter by start date
+ date endDate = Johnson; // date | Filter by end date
+ try {
+ LeavePeriods result = apiInstance.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeLeavePeriods");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ date startDate = 2013-10-20; // date | Filter by start date
+ date endDate = Johnson; // date | Filter by end date
+ try {
+ LeavePeriods result = apiInstance.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeLeavePeriods");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+date *startDate = 2013-10-20; // Filter by start date (optional) (default to null)
+date *endDate = Johnson; // Filter by end date (optional) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches employee leave periods
+[apiInstance getEmployeeLeavePeriodsWith:xeroTenantId
+ employeeId:employeeId
+ startDate:startDate
+ endDate:endDate
+ completionHandler: ^(LeavePeriods output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const startDate = new Date("2013-10-20"); // {date} Filter by start date
+const endDate = new Date("Johnson"); // {date} Filter by end date
+
+try {
+ const response: any = await xero.accountingApi.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeeLeavePeriodsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var startDate = 2013-10-20; // date | Filter by start date (optional) (default to null)
+ var endDate = Johnson; // date | Filter by end date (optional) (default to null)
+
+ try
+ {
+ // searches employee leave periods
+ LeavePeriods result = apiInstance.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeavePeriods: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeeLeavePeriods: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $startDate = 2013-10-20; # date | Filter by start date
+my $endDate = Johnson; # date | Filter by end date
+
+eval {
+ my $result = $api_instance->getEmployeeLeavePeriods(xeroTenantId => $xeroTenantId, employeeId => $employeeId, startDate => $startDate, endDate => $endDate);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeeLeavePeriods: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+startDate = 2013-10-20 # date | Filter by start date (optional) (default to null)
+endDate = Johnson # date | Filter by end date (optional) (default to null)
+
+try:
+ # searches employee leave periods
+ api_response = api_instance.get_employee_leave_periods(xeroTenantId, employeeId, startDate=startDate, endDate=endDate)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeeLeavePeriods: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let startDate = 2013-10-20; // date
+ let endDate = Johnson; // date
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ startDate |
+
+
+
+
+
+
+
+ date
+
+
+ (date)
+
+
+
+Filter by start date
+
+
+
+
+ |
+
+
+ endDate |
+
+
+
+
+
+
+
+ date
+
+
+ (date)
+
+
+
+Filter by end date
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getEmployeeLeaveTypes
+
searches employee leave types
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/LeaveTypes
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeaveTypes"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeLeaveTypes result = apiInstance.getEmployeeLeaveTypes(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveTypes");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeLeaveTypes result = apiInstance.getEmployeeLeaveTypes(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveTypes");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches employee leave types
+[apiInstance getEmployeeLeaveTypesWith:xeroTenantId
+ employeeId:employeeId
+ completionHandler: ^(EmployeeLeaveTypes output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+try {
+ const response: any = await xero.accountingApi.getEmployeeLeaveTypes(xeroTenantId, employeeId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeeLeaveTypesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+
+ try
+ {
+ // searches employee leave types
+ EmployeeLeaveTypes result = apiInstance.getEmployeeLeaveTypes(xeroTenantId, employeeId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeaveTypes: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeeLeaveTypes: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+
+eval {
+ my $result = $api_instance->getEmployeeLeaveTypes(xeroTenantId => $xeroTenantId, employeeId => $employeeId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeeLeaveTypes: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+
+try:
+ # searches employee leave types
+ api_response = api_instance.get_employee_leave_types(xeroTenantId, employeeId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeeLeaveTypes: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeeLeaveTypes(xeroTenantId, employeeId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEmployeeLeaves
+
search employee leave records
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/Leave
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeLeaves result = apiInstance.getEmployeeLeaves(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaves");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeLeaves result = apiInstance.getEmployeeLeaves(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaves");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// search employee leave records
+[apiInstance getEmployeeLeavesWith:xeroTenantId
+ employeeId:employeeId
+ completionHandler: ^(EmployeeLeaves output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+try {
+ const response: any = await xero.accountingApi.getEmployeeLeaves(xeroTenantId, employeeId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeeLeavesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+
+ try
+ {
+ // search employee leave records
+ EmployeeLeaves result = apiInstance.getEmployeeLeaves(xeroTenantId, employeeId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeaves: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeeLeaves: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+
+eval {
+ my $result = $api_instance->getEmployeeLeaves(xeroTenantId => $xeroTenantId, employeeId => $employeeId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeeLeaves: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+
+try:
+ # search employee leave records
+ api_response = api_instance.get_employee_leaves(xeroTenantId, employeeId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeeLeaves: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeeLeaves(xeroTenantId, employeeId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEmployeeOpeningBalances
+
retrieve employee openingbalances
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/openingBalances
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/openingBalances"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeOpeningBalancesObject result = apiInstance.getEmployeeOpeningBalances(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeOpeningBalances");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeOpeningBalancesObject result = apiInstance.getEmployeeOpeningBalances(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeOpeningBalances");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve employee openingbalances
+[apiInstance getEmployeeOpeningBalancesWith:xeroTenantId
+ employeeId:employeeId
+ completionHandler: ^(EmployeeOpeningBalancesObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+try {
+ const response: any = await xero.accountingApi.getEmployeeOpeningBalances(xeroTenantId, employeeId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeeOpeningBalancesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+
+ try
+ {
+ // retrieve employee openingbalances
+ EmployeeOpeningBalancesObject result = apiInstance.getEmployeeOpeningBalances(xeroTenantId, employeeId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeeOpeningBalances: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeeOpeningBalances: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+
+eval {
+ my $result = $api_instance->getEmployeeOpeningBalances(xeroTenantId => $xeroTenantId, employeeId => $employeeId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeeOpeningBalances: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+
+try:
+ # retrieve employee openingbalances
+ api_response = api_instance.get_employee_opening_balances(xeroTenantId, employeeId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeeOpeningBalances: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeeOpeningBalances(xeroTenantId, employeeId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEmployeePayTemplates
+
searches employee pay templates
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/PayTemplates
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeePayTemplates result = apiInstance.getEmployeePayTemplates(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeePayTemplates");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeePayTemplates result = apiInstance.getEmployeePayTemplates(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeePayTemplates");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches employee pay templates
+[apiInstance getEmployeePayTemplatesWith:xeroTenantId
+ employeeId:employeeId
+ completionHandler: ^(EmployeePayTemplates output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+try {
+ const response: any = await xero.accountingApi.getEmployeePayTemplates(xeroTenantId, employeeId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeePayTemplatesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+
+ try
+ {
+ // searches employee pay templates
+ EmployeePayTemplates result = apiInstance.getEmployeePayTemplates(xeroTenantId, employeeId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeePayTemplates: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeePayTemplates: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+
+eval {
+ my $result = $api_instance->getEmployeePayTemplates(xeroTenantId => $xeroTenantId, employeeId => $employeeId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeePayTemplates: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+
+try:
+ # searches employee pay templates
+ api_response = api_instance.get_employee_pay_templates(xeroTenantId, employeeId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeePayTemplates: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeePayTemplates(xeroTenantId, employeeId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEmployeePaymentMethod
+
retrieves an employee's payment method
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/PaymentMethods
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PaymentMethods"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ PaymentMethodObject result = apiInstance.getEmployeePaymentMethod(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeePaymentMethod");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ PaymentMethodObject result = apiInstance.getEmployeePaymentMethod(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeePaymentMethod");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieves an employee's payment method
+[apiInstance getEmployeePaymentMethodWith:xeroTenantId
+ employeeId:employeeId
+ completionHandler: ^(PaymentMethodObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+try {
+ const response: any = await xero.accountingApi.getEmployeePaymentMethod(xeroTenantId, employeeId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeePaymentMethodExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+
+ try
+ {
+ // retrieves an employee's payment method
+ PaymentMethodObject result = apiInstance.getEmployeePaymentMethod(xeroTenantId, employeeId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeePaymentMethod: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeePaymentMethod: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+
+eval {
+ my $result = $api_instance->getEmployeePaymentMethod(xeroTenantId => $xeroTenantId, employeeId => $employeeId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeePaymentMethod: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+
+try:
+ # retrieves an employee's payment method
+ api_response = api_instance.get_employee_payment_method(xeroTenantId, employeeId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeePaymentMethod: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeePaymentMethod(xeroTenantId, employeeId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEmployeeSalaryAndWage
+
get employee salary and wages record by id
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object
+ try {
+ SalaryAndWages result = apiInstance.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWage");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object
+ try {
+ SalaryAndWages result = apiInstance.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWage");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+UUID *salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single pay template earnings object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// get employee salary and wages record by id
+[apiInstance getEmployeeSalaryAndWageWith:xeroTenantId
+ employeeId:employeeId
+ salaryAndWagesID:salaryAndWagesID
+ completionHandler: ^(SalaryAndWages output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const salaryAndWagesID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single pay template earnings object
+try {
+ const response: any = await xero.accountingApi.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeeSalaryAndWageExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var salaryAndWagesID = new UUID(); // UUID | Id for single pay template earnings object (default to null)
+
+ try
+ {
+ // get employee salary and wages record by id
+ SalaryAndWages result = apiInstance.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeeSalaryAndWage: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single pay template earnings object
+
+eval {
+ my $result = $api_instance->getEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWagesID => $salaryAndWagesID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeeSalaryAndWage: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single pay template earnings object (default to null)
+
+try:
+ # get employee salary and wages record by id
+ api_response = api_instance.get_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWagesID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeeSalaryAndWage: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+ SalaryAndWagesID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Id for single pay template earnings object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEmployeeSalaryAndWages
+
retrieves an employee's salary and wages
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/SalaryAndWages
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages?page=56"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ SalaryAndWages result = apiInstance.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWages");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ SalaryAndWages result = apiInstance.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWages");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieves an employee's salary and wages
+[apiInstance getEmployeeSalaryAndWagesWith:xeroTenantId
+ employeeId:employeeId
+ page:page
+ completionHandler: ^(SalaryAndWages output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+try {
+ const response: any = await xero.accountingApi.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeeSalaryAndWagesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+ try
+ {
+ // retrieves an employee's salary and wages
+ SalaryAndWages result = apiInstance.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeeSalaryAndWages: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeeSalaryAndWages: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+eval {
+ my $result = $api_instance->getEmployeeSalaryAndWages(xeroTenantId => $xeroTenantId, employeeId => $employeeId, page => $page);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeeSalaryAndWages: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+try:
+ # retrieves an employee's salary and wages
+ api_response = api_instance.get_employee_salary_and_wages(xeroTenantId, employeeId, page=page)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeeSalaryAndWages: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let page = 56; // Integer
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getEmployeeTax
+
searches tax records for an employee
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/Tax
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Tax"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeTaxObject result = apiInstance.getEmployeeTax(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeTax");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ try {
+ EmployeeTaxObject result = apiInstance.getEmployeeTax(xeroTenantId, employeeId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployeeTax");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches tax records for an employee
+[apiInstance getEmployeeTaxWith:xeroTenantId
+ employeeId:employeeId
+ completionHandler: ^(EmployeeTaxObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+try {
+ const response: any = await xero.accountingApi.getEmployeeTax(xeroTenantId, employeeId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeeTaxExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+
+ try
+ {
+ // searches tax records for an employee
+ EmployeeTaxObject result = apiInstance.getEmployeeTax(xeroTenantId, employeeId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployeeTax: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployeeTax: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+
+eval {
+ my $result = $api_instance->getEmployeeTax(xeroTenantId => $xeroTenantId, employeeId => $employeeId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployeeTax: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+
+try:
+ # searches tax records for an employee
+ api_response = api_instance.get_employee_tax(xeroTenantId, employeeId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployeeTax: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployeeTax(xeroTenantId, employeeId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEmployees
+
searches employees
+
+
+
+
+
+
+
+ /Employees
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees?firstName=John&lastName=Johnson&page=56"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ String firstName = John; // String | Filter by first name
+ String lastName = Johnson; // String | Filter by last name
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ Employees result = apiInstance.getEmployees(xeroTenantId, firstName, lastName, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployees");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ String firstName = John; // String | Filter by first name
+ String lastName = Johnson; // String | Filter by last name
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ Employees result = apiInstance.getEmployees(xeroTenantId, firstName, lastName, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getEmployees");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+String *firstName = John; // Filter by first name (optional) (default to null)
+String *lastName = Johnson; // Filter by last name (optional) (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches employees
+[apiInstance getEmployeesWith:xeroTenantId
+ firstName:firstName
+ lastName:lastName
+ page:page
+ completionHandler: ^(Employees output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const firstName = 'John'; // {String} Filter by first name
+const lastName = 'Johnson'; // {String} Filter by last name
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+try {
+ const response: any = await xero.accountingApi.getEmployees(xeroTenantId, firstName, lastName, page);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getEmployeesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var firstName = John; // String | Filter by first name (optional) (default to null)
+ var lastName = Johnson; // String | Filter by last name (optional) (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+ try
+ {
+ // searches employees
+ Employees result = apiInstance.getEmployees(xeroTenantId, firstName, lastName, page);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getEmployees: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getEmployees: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $firstName = John; # String | Filter by first name
+my $lastName = Johnson; # String | Filter by last name
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+eval {
+ my $result = $api_instance->getEmployees(xeroTenantId => $xeroTenantId, firstName => $firstName, lastName => $lastName, page => $page);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getEmployees: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+firstName = John # String | Filter by first name (optional) (default to null)
+lastName = Johnson # String | Filter by last name (optional) (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+try:
+ # searches employees
+ api_response = api_instance.get_employees(xeroTenantId, firstName=firstName, lastName=lastName, page=page)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getEmployees: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let firstName = John; // String
+ let lastName = Johnson; // String
+ let page = 56; // Integer
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getEmployees(xeroTenantId, firstName, lastName, page, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ firstName |
+
+
+
+
+
+
+
+ String
+
+
+
+Filter by first name
+
+
+
+
+ |
+
+
+ lastName |
+
+
+
+
+
+
+
+ String
+
+
+
+Filter by last name
+
+
+
+
+ |
+
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getLeaveType
+
retrieve a single leave type by id
+
+
+
+
+
+
+
+ /LeaveTypes/{LeaveTypeID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/LeaveTypes/{LeaveTypeID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the leave type
+ try {
+ LeaveTypeObject result = apiInstance.getLeaveType(xeroTenantId, leaveTypeID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getLeaveType");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the leave type
+ try {
+ LeaveTypeObject result = apiInstance.getLeaveType(xeroTenantId, leaveTypeID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getLeaveType");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the leave type (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve a single leave type by id
+[apiInstance getLeaveTypeWith:xeroTenantId
+ leaveTypeID:leaveTypeID
+ completionHandler: ^(LeaveTypeObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const leaveTypeID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the leave type
+try {
+ const response: any = await xero.accountingApi.getLeaveType(xeroTenantId, leaveTypeID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getLeaveTypeExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var leaveTypeID = new UUID(); // UUID | Identifier for the leave type (default to null)
+
+ try
+ {
+ // retrieve a single leave type by id
+ LeaveTypeObject result = apiInstance.getLeaveType(xeroTenantId, leaveTypeID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getLeaveType: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getLeaveType: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the leave type
+
+eval {
+ my $result = $api_instance->getLeaveType(xeroTenantId => $xeroTenantId, leaveTypeID => $leaveTypeID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getLeaveType: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the leave type (default to null)
+
+try:
+ # retrieve a single leave type by id
+ api_response = api_instance.get_leave_type(xeroTenantId, leaveTypeID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getLeaveType: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getLeaveType(xeroTenantId, leaveTypeID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ LeaveTypeID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the leave type
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getLeaveTypes
+
searches leave types
+
+
+
+
+
+
+
+ /LeaveTypes
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/LeaveTypes?page=56&ActiveOnly=true"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ Boolean activeOnly = true; // Boolean | Filters leave types by active status. By default the API returns all leave types.
+ try {
+ LeaveTypes result = apiInstance.getLeaveTypes(xeroTenantId, page, activeOnly);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getLeaveTypes");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ Boolean activeOnly = true; // Boolean | Filters leave types by active status. By default the API returns all leave types.
+ try {
+ LeaveTypes result = apiInstance.getLeaveTypes(xeroTenantId, page, activeOnly);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getLeaveTypes");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+Boolean *activeOnly = true; // Filters leave types by active status. By default the API returns all leave types. (optional) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches leave types
+[apiInstance getLeaveTypesWith:xeroTenantId
+ page:page
+ activeOnly:activeOnly
+ completionHandler: ^(LeaveTypes output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+const activeOnly = true; // {Boolean} Filters leave types by active status. By default the API returns all leave types.
+
+try {
+ const response: any = await xero.accountingApi.getLeaveTypes(xeroTenantId, page, activeOnly);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getLeaveTypesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+ var activeOnly = true; // Boolean | Filters leave types by active status. By default the API returns all leave types. (optional) (default to null)
+
+ try
+ {
+ // searches leave types
+ LeaveTypes result = apiInstance.getLeaveTypes(xeroTenantId, page, activeOnly);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getLeaveTypes: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getLeaveTypes: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+my $activeOnly = true; # Boolean | Filters leave types by active status. By default the API returns all leave types.
+
+eval {
+ my $result = $api_instance->getLeaveTypes(xeroTenantId => $xeroTenantId, page => $page, activeOnly => $activeOnly);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getLeaveTypes: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+activeOnly = true # Boolean | Filters leave types by active status. By default the API returns all leave types. (optional) (default to null)
+
+try:
+ # searches leave types
+ api_response = api_instance.get_leave_types(xeroTenantId, page=page, activeOnly=activeOnly)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getLeaveTypes: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let page = 56; // Integer
+ let activeOnly = true; // Boolean
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getLeaveTypes(xeroTenantId, page, activeOnly, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+ ActiveOnly |
+
+
+
+
+
+
+
+ Boolean
+
+
+
+Filters leave types by active status. By default the API returns all leave types.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getPayRun
+
retrieve a single pay run by id
+
+
+
+
+
+
+
+ /PayRuns/{PayRunID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PayRuns/{PayRunID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the pay run
+ try {
+ PayRunObject result = apiInstance.getPayRun(xeroTenantId, payRunID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPayRun");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the pay run
+ try {
+ PayRunObject result = apiInstance.getPayRun(xeroTenantId, payRunID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPayRun");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the pay run (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve a single pay run by id
+[apiInstance getPayRunWith:xeroTenantId
+ payRunID:payRunID
+ completionHandler: ^(PayRunObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const payRunID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the pay run
+try {
+ const response: any = await xero.accountingApi.getPayRun(xeroTenantId, payRunID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getPayRunExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var payRunID = new UUID(); // UUID | Identifier for the pay run (default to null)
+
+ try
+ {
+ // retrieve a single pay run by id
+ PayRunObject result = apiInstance.getPayRun(xeroTenantId, payRunID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getPayRun: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getPayRun: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the pay run
+
+eval {
+ my $result = $api_instance->getPayRun(xeroTenantId => $xeroTenantId, payRunID => $payRunID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getPayRun: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the pay run (default to null)
+
+try:
+ # retrieve a single pay run by id
+ api_response = api_instance.get_pay_run(xeroTenantId, payRunID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getPayRun: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getPayRun(xeroTenantId, payRunID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.payruns.read |
+ Grant read-only access to payroll payruns |
+
+
+
+ payroll.payruns |
+ Grant read-write access to payroll payruns |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ PayRunID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the pay run
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getPayRunCalendar
+
retrieve a single payrun calendar by id
+
+
+
+
+
+
+
+ /PayRunCalendars/{PayrollCalendarID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PayRunCalendars/{PayrollCalendarID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payrun calendars
+ try {
+ PayRunCalendarObject result = apiInstance.getPayRunCalendar(xeroTenantId, payrollCalendarID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPayRunCalendar");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payrun calendars
+ try {
+ PayRunCalendarObject result = apiInstance.getPayRunCalendar(xeroTenantId, payrollCalendarID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPayRunCalendar");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the payrun calendars (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve a single payrun calendar by id
+[apiInstance getPayRunCalendarWith:xeroTenantId
+ payrollCalendarID:payrollCalendarID
+ completionHandler: ^(PayRunCalendarObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const payrollCalendarID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the payrun calendars
+try {
+ const response: any = await xero.accountingApi.getPayRunCalendar(xeroTenantId, payrollCalendarID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getPayRunCalendarExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var payrollCalendarID = new UUID(); // UUID | Identifier for the payrun calendars (default to null)
+
+ try
+ {
+ // retrieve a single payrun calendar by id
+ PayRunCalendarObject result = apiInstance.getPayRunCalendar(xeroTenantId, payrollCalendarID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getPayRunCalendar: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getPayRunCalendar: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the payrun calendars
+
+eval {
+ my $result = $api_instance->getPayRunCalendar(xeroTenantId => $xeroTenantId, payrollCalendarID => $payrollCalendarID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getPayRunCalendar: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the payrun calendars (default to null)
+
+try:
+ # retrieve a single payrun calendar by id
+ api_response = api_instance.get_pay_run_calendar(xeroTenantId, payrollCalendarID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getPayRunCalendar: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getPayRunCalendar(xeroTenantId, payrollCalendarID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ PayrollCalendarID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the payrun calendars
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getPayRunCalendars
+
searches payrun calendars
+
+
+
+
+
+
+
+ /PayRunCalendars
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PayRunCalendars?page=56"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ PayRunCalendars result = apiInstance.getPayRunCalendars(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPayRunCalendars");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ PayRunCalendars result = apiInstance.getPayRunCalendars(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPayRunCalendars");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches payrun calendars
+[apiInstance getPayRunCalendarsWith:xeroTenantId
+ page:page
+ completionHandler: ^(PayRunCalendars output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+try {
+ const response: any = await xero.accountingApi.getPayRunCalendars(xeroTenantId, page);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getPayRunCalendarsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+ try
+ {
+ // searches payrun calendars
+ PayRunCalendars result = apiInstance.getPayRunCalendars(xeroTenantId, page);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getPayRunCalendars: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getPayRunCalendars: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+eval {
+ my $result = $api_instance->getPayRunCalendars(xeroTenantId => $xeroTenantId, page => $page);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getPayRunCalendars: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+try:
+ # searches payrun calendars
+ api_response = api_instance.get_pay_run_calendars(xeroTenantId, page=page)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getPayRunCalendars: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let page = 56; // Integer
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getPayRunCalendars(xeroTenantId, page, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getPayRuns
+
searches pay runs
+
+
+
+
+
+
+
+ /PayRuns
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PayRuns?page=56&status=status_example"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ String 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.
+ try {
+ PayRuns result = apiInstance.getPayRuns(xeroTenantId, page, status);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPayRuns");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ String 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.
+ try {
+ PayRuns result = apiInstance.getPayRuns(xeroTenantId, page, status);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPayRuns");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+String *status = status_example; // 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) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches pay runs
+[apiInstance getPayRunsWith:xeroTenantId
+ page:page
+ status:status
+ completionHandler: ^(PayRuns output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+const 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.
+
+try {
+ const response: any = await xero.accountingApi.getPayRuns(xeroTenantId, page, status);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getPayRunsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+ var 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. (optional) (default to null)
+
+ try
+ {
+ // searches pay runs
+ PayRuns result = apiInstance.getPayRuns(xeroTenantId, page, status);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getPayRuns: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getPayRuns: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+my $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.
+
+eval {
+ my $result = $api_instance->getPayRuns(xeroTenantId => $xeroTenantId, page => $page, status => $status);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getPayRuns: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+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. (optional) (default to null)
+
+try:
+ # searches pay runs
+ api_response = api_instance.get_pay_runs(xeroTenantId, page=page, status=status)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getPayRuns: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let page = 56; // Integer
+ let status = status_example; // String
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getPayRuns(xeroTenantId, page, status, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.payruns.read |
+ Grant read-only access to payroll payruns |
+
+
+
+ payroll.payruns |
+ Grant read-write access to payroll payruns |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+ 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.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getPaySlip
+
retrieve a single payslip by id
+
+
+
+
+
+
+
+ /PaySlips/{PaySlipID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PaySlips/{PaySlipID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payslip
+ try {
+ PaySlipObject result = apiInstance.getPaySlip(xeroTenantId, paySlipID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPaySlip");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payslip
+ try {
+ PaySlipObject result = apiInstance.getPaySlip(xeroTenantId, paySlipID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPaySlip");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the payslip (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve a single payslip by id
+[apiInstance getPaySlipWith:xeroTenantId
+ paySlipID:paySlipID
+ completionHandler: ^(PaySlipObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const paySlipID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the payslip
+try {
+ const response: any = await xero.accountingApi.getPaySlip(xeroTenantId, paySlipID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getPaySlipExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var paySlipID = new UUID(); // UUID | Identifier for the payslip (default to null)
+
+ try
+ {
+ // retrieve a single payslip by id
+ PaySlipObject result = apiInstance.getPaySlip(xeroTenantId, paySlipID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getPaySlip: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getPaySlip: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the payslip
+
+eval {
+ my $result = $api_instance->getPaySlip(xeroTenantId => $xeroTenantId, paySlipID => $paySlipID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getPaySlip: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the payslip (default to null)
+
+try:
+ # retrieve a single payslip by id
+ api_response = api_instance.get_pay_slip(xeroTenantId, paySlipID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getPaySlip: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getPaySlip(xeroTenantId, paySlipID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.payslip.read |
+ Grant read-only access to payroll payslips |
+
+
+
+ payroll.payslip |
+ Grant read-write access to payroll payslips |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ PaySlipID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the payslip
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getPaySlips
+
searches payslips
+
+
+
+
+
+
+
+ /PaySlips
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PaySlips?page=56&PayRunID=38400000-8cf0-11bd-b23e-10b96e4ef00d"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun.
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ PaySlips result = apiInstance.getPaySlips(xeroTenantId, payRunID, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPaySlips");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun.
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ PaySlips result = apiInstance.getPaySlips(xeroTenantId, payRunID, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getPaySlips");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches payslips
+[apiInstance getPaySlipsWith:xeroTenantId
+ payRunID:payRunID
+ page:page
+ completionHandler: ^(PaySlips output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const payRunID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun.
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+try {
+ const response: any = await xero.accountingApi.getPaySlips(xeroTenantId, payRunID, page);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getPaySlipsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var payRunID = new UUID(); // UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+ try
+ {
+ // searches payslips
+ PaySlips result = apiInstance.getPaySlips(xeroTenantId, payRunID, page);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getPaySlips: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getPaySlips: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun.
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+eval {
+ my $result = $api_instance->getPaySlips(xeroTenantId => $xeroTenantId, payRunID => $payRunID, page => $page);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getPaySlips: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+try:
+ # searches payslips
+ api_response = api_instance.get_pay_slips(xeroTenantId, payRunID, page=page)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getPaySlips: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+ let page = 56; // Integer
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getPaySlips(xeroTenantId, payRunID, page, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.payslip.read |
+ Grant read-only access to payroll payslips |
+
+
+
+ payroll.payslip |
+ Grant read-write access to payroll payslips |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+ PayRunID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun.
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getReimbursement
+
retrieve a single reimbursement by id
+
+
+
+
+
+
+
+ /Reimbursements/{ReimbursementID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Reimbursements/{ReimbursementID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the reimbursement
+ try {
+ ReimbursementObject result = apiInstance.getReimbursement(xeroTenantId, reimbursementID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getReimbursement");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the reimbursement
+ try {
+ ReimbursementObject result = apiInstance.getReimbursement(xeroTenantId, reimbursementID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getReimbursement");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the reimbursement (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve a single reimbursement by id
+[apiInstance getReimbursementWith:xeroTenantId
+ reimbursementID:reimbursementID
+ completionHandler: ^(ReimbursementObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const reimbursementID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the reimbursement
+try {
+ const response: any = await xero.accountingApi.getReimbursement(xeroTenantId, reimbursementID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getReimbursementExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var reimbursementID = new UUID(); // UUID | Identifier for the reimbursement (default to null)
+
+ try
+ {
+ // retrieve a single reimbursement by id
+ ReimbursementObject result = apiInstance.getReimbursement(xeroTenantId, reimbursementID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getReimbursement: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getReimbursement: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the reimbursement
+
+eval {
+ my $result = $api_instance->getReimbursement(xeroTenantId => $xeroTenantId, reimbursementID => $reimbursementID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getReimbursement: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the reimbursement (default to null)
+
+try:
+ # retrieve a single reimbursement by id
+ api_response = api_instance.get_reimbursement(xeroTenantId, reimbursementID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getReimbursement: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getReimbursement(xeroTenantId, reimbursementID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ ReimbursementID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the reimbursement
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getReimbursements
+
searches reimbursements
+
+
+
+
+
+
+
+ /Reimbursements
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Reimbursements?page=56"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ Reimbursements result = apiInstance.getReimbursements(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getReimbursements");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ try {
+ Reimbursements result = apiInstance.getReimbursements(xeroTenantId, page);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getReimbursements");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches reimbursements
+[apiInstance getReimbursementsWith:xeroTenantId
+ page:page
+ completionHandler: ^(Reimbursements output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+try {
+ const response: any = await xero.accountingApi.getReimbursements(xeroTenantId, page);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getReimbursementsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+ try
+ {
+ // searches reimbursements
+ Reimbursements result = apiInstance.getReimbursements(xeroTenantId, page);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getReimbursements: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getReimbursements: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+eval {
+ my $result = $api_instance->getReimbursements(xeroTenantId => $xeroTenantId, page => $page);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getReimbursements: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+
+try:
+ # searches reimbursements
+ api_response = api_instance.get_reimbursements(xeroTenantId, page=page)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getReimbursements: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let page = 56; // Integer
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getReimbursements(xeroTenantId, page, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getSettings
+
searches settings
+
+
+
+
+
+
+
+ /Settings
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Settings"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ try {
+ Settings result = apiInstance.getSettings(xeroTenantId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getSettings");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ try {
+ Settings result = apiInstance.getSettings(xeroTenantId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getSettings");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches settings
+[apiInstance getSettingsWith:xeroTenantId
+ completionHandler: ^(Settings output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+try {
+ const response: any = await xero.accountingApi.getSettings(xeroTenantId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getSettingsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+
+ try
+ {
+ // searches settings
+ Settings result = apiInstance.getSettings(xeroTenantId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getSettings: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getSettings: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+
+eval {
+ my $result = $api_instance->getSettings(xeroTenantId => $xeroTenantId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getSettings: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+
+try:
+ # searches settings
+ api_response = api_instance.get_settings(xeroTenantId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getSettings: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getSettings(xeroTenantId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ settings.payslip |
+ |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getStatutoryDeduction
+
retrieve a single statutory deduction by id
+
+
+
+
+
+
+
+ /StatutoryDeductions/{Id}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/StatutoryDeductions/{Id}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the statutory deduction
+ try {
+ StatutoryDeductionObject result = apiInstance.getStatutoryDeduction(xeroTenantId, id);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getStatutoryDeduction");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the statutory deduction
+ try {
+ StatutoryDeductionObject result = apiInstance.getStatutoryDeduction(xeroTenantId, id);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getStatutoryDeduction");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the statutory deduction (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve a single statutory deduction by id
+[apiInstance getStatutoryDeductionWith:xeroTenantId
+ id:id
+ completionHandler: ^(StatutoryDeductionObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the statutory deduction
+try {
+ const response: any = await xero.accountingApi.getStatutoryDeduction(xeroTenantId, id);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getStatutoryDeductionExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var id = new UUID(); // UUID | Identifier for the statutory deduction (default to null)
+
+ try
+ {
+ // retrieve a single statutory deduction by id
+ StatutoryDeductionObject result = apiInstance.getStatutoryDeduction(xeroTenantId, id);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getStatutoryDeduction: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getStatutoryDeduction: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the statutory deduction
+
+eval {
+ my $result = $api_instance->getStatutoryDeduction(xeroTenantId => $xeroTenantId, id => $id);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getStatutoryDeduction: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+id = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the statutory deduction (default to null)
+
+try:
+ # retrieve a single statutory deduction by id
+ api_response = api_instance.get_statutory_deduction(xeroTenantId, id)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getStatutoryDeduction: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getStatutoryDeduction(xeroTenantId, id, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ payroll.settings |
+ Grant read-write access to payroll settings |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ Id* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the statutory deduction
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getTimesheet
+
retrieve a single timesheet by id
+
+
+
+
+
+
+
+ /Timesheets/{TimesheetID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ try {
+ TimesheetObject result = apiInstance.getTimesheet(xeroTenantId, timesheetID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ try {
+ TimesheetObject result = apiInstance.getTimesheet(xeroTenantId, timesheetID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// retrieve a single timesheet by id
+[apiInstance getTimesheetWith:xeroTenantId
+ timesheetID:timesheetID
+ completionHandler: ^(TimesheetObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet
+try {
+ const response: any = await xero.accountingApi.getTimesheet(xeroTenantId, timesheetID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getTimesheetExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null)
+
+ try
+ {
+ // retrieve a single timesheet by id
+ TimesheetObject result = apiInstance.getTimesheet(xeroTenantId, timesheetID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getTimesheet: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getTimesheet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet
+
+eval {
+ my $result = $api_instance->getTimesheet(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getTimesheet: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null)
+
+try:
+ # retrieve a single timesheet by id
+ api_response = api_instance.get_timesheet(xeroTenantId, timesheetID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getTimesheet: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getTimesheet(xeroTenantId, timesheetID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.timesheets.read |
+ Grant read-only access to payroll timesheets |
+
+
+
+ timesheets.settings |
+ |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ TimesheetID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the timesheet
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getTimesheets
+
searches timesheets
+
+
+
+
+
+
+
+ /Timesheets
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Timesheets?page=56&employeeId=38400000-8cf0-11bd-b23e-10b96e4ef00d&payrollCalendarId=38400000-8cf0-11bd-b23e-10b96e4ef00d"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ UUID employeeId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 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.
+ UUID payrollCalendarId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 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
+ try {
+ Timesheets result = apiInstance.getTimesheets(xeroTenantId, page, employeeId, payrollCalendarId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getTimesheets");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+ UUID employeeId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 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.
+ UUID payrollCalendarId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 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
+ try {
+ Timesheets result = apiInstance.getTimesheets(xeroTenantId, page, employeeId, payrollCalendarId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getTimesheets");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+UUID *employeeId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // 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) (default to null)
+UUID *payrollCalendarId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // 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) (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches timesheets
+[apiInstance getTimesheetsWith:xeroTenantId
+ page:page
+ employeeId:employeeId
+ payrollCalendarId:payrollCalendarId
+ completionHandler: ^(Timesheets output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+const employeeId = '38400000-8cf0-11bd-b23e-10b96e4ef00d'; // {UUID} 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.
+const payrollCalendarId = '38400000-8cf0-11bd-b23e-10b96e4ef00d'; // {UUID} 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
+
+try {
+ const response: any = await xero.accountingApi.getTimesheets(xeroTenantId, page, employeeId, payrollCalendarId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getTimesheetsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+ var employeeId = new UUID(); // UUID | 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) (default to null)
+ var payrollCalendarId = new UUID(); // UUID | 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) (default to null)
+
+ try
+ {
+ // searches timesheets
+ Timesheets result = apiInstance.getTimesheets(xeroTenantId, page, employeeId, payrollCalendarId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getTimesheets: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getTimesheets: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+my $employeeId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | 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.
+my $payrollCalendarId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | 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
+
+eval {
+ my $result = $api_instance->getTimesheets(xeroTenantId => $xeroTenantId, page => $page, employeeId => $employeeId, payrollCalendarId => $payrollCalendarId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getTimesheets: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
+employeeId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | 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) (default to null)
+payrollCalendarId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | 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) (default to null)
+
+try:
+ # searches timesheets
+ api_response = api_instance.get_timesheets(xeroTenantId, page=page, employeeId=employeeId, payrollCalendarId=payrollCalendarId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getTimesheets: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let page = 56; // Integer
+ let employeeId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+ let payrollCalendarId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getTimesheets(xeroTenantId, page, employeeId, payrollCalendarId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.timesheets.read |
+ Grant read-only access to payroll timesheets |
+
+
+
+ payroll.timesheets |
+ Grant read-write access to payroll timesheets |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+ Query parameters
+
+
+ Name |
+ Description |
+
+ page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+ employeeId |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+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.
+
+
+
+
+ |
+
+
+ payrollCalendarId |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+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
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
getTrackingCategories
+
searches tracking categories
+
+
+
+
+
+
+
+ /settings/trackingCategories
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/settings/trackingCategories"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ try {
+ TrackingCategories result = apiInstance.getTrackingCategories(xeroTenantId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getTrackingCategories");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ try {
+ TrackingCategories result = apiInstance.getTrackingCategories(xeroTenantId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#getTrackingCategories");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// searches tracking categories
+[apiInstance getTrackingCategoriesWith:xeroTenantId
+ completionHandler: ^(TrackingCategories output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+try {
+ const response: any = await xero.accountingApi.getTrackingCategories(xeroTenantId);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class getTrackingCategoriesExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+
+ try
+ {
+ // searches tracking categories
+ TrackingCategories result = apiInstance.getTrackingCategories(xeroTenantId);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.getTrackingCategories: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->getTrackingCategories: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+
+eval {
+ my $result = $api_instance->getTrackingCategories(xeroTenantId => $xeroTenantId);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->getTrackingCategories: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+
+try:
+ # searches tracking categories
+ api_response = api_instance.get_tracking_categories(xeroTenantId)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->getTrackingCategories: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.getTrackingCategories(xeroTenantId, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.settings.read |
+ Grant read-only access to payroll settings |
+
+
+
+ settings.payslip |
+ |
+
+
+
+
+ Parameters
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
revertTimesheet
+
revert a timesheet to draft
+
+
+
+
+
+
+
+ /Timesheets/{TimesheetID}/RevertToDraft
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/RevertToDraft"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ try {
+ TimesheetObject result = apiInstance.revertTimesheet(xeroTenantId, timesheetID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#revertTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ try {
+ TimesheetObject result = apiInstance.revertTimesheet(xeroTenantId, timesheetID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#revertTimesheet");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// revert a timesheet to draft
+[apiInstance revertTimesheetWith:xeroTenantId
+ timesheetID:timesheetID
+ completionHandler: ^(TimesheetObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet
+try {
+ const response: any = await xero.accountingApi.revertTimesheet(xeroTenantId, timesheetID);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class revertTimesheetExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null)
+
+ try
+ {
+ // revert a timesheet to draft
+ TimesheetObject result = apiInstance.revertTimesheet(xeroTenantId, timesheetID);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.revertTimesheet: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->revertTimesheet: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet
+
+eval {
+ my $result = $api_instance->revertTimesheet(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->revertTimesheet: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null)
+
+try:
+ # revert a timesheet to draft
+ api_response = api_instance.revert_timesheet(xeroTenantId, timesheetID)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->revertTimesheet: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.revertTimesheet(xeroTenantId, timesheetID, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.timesheets |
+ Grant read-write access to payroll timesheets |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ TimesheetID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the timesheet
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
updateEmployee
+
updates employee
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ Employee 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 |
+ try {
+ EmployeeObject result = apiInstance.updateEmployee(xeroTenantId, employeeId, employee);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployee");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ Employee 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 |
+ try {
+ EmployeeObject result = apiInstance.updateEmployee(xeroTenantId, employeeId, employee);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployee");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+Employee *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" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// updates employee
+[apiInstance updateEmployeeWith:xeroTenantId
+ employeeId:employeeId
+ employee:employee
+ completionHandler: ^(EmployeeObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const employee: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}
+try {
+ const response: any = await xero.accountingApi.updateEmployee(xeroTenantId, employeeId, employee);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class updateEmployeeExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var employee = new Employee(); // Employee |
+
+ try
+ {
+ // updates employee
+ EmployeeObject result = apiInstance.updateEmployee(xeroTenantId, employeeId, employee);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.updateEmployee: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->updateEmployee: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $employee = ::Object::Employee->new(); # Employee |
+
+eval {
+ my $result = $api_instance->updateEmployee(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employee => $employee);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->updateEmployee: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+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 |
+
+try:
+ # updates employee
+ api_response = api_instance.update_employee(xeroTenantId, employeeId, employee)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->updateEmployee: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let 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
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.updateEmployee(xeroTenantId, employeeId, employee, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ employee * |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
updateEmployeeEarningsTemplate
+
updates employee earnings template records
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/PayTemplates/earnings/{PayTemplateEarningID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates/earnings/{PayTemplateEarningID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object
+ EarningsTemplate earningsTemplate = { "ratePerUnit": 25, "numberOfUnits": 4, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" }; // EarningsTemplate |
+ try {
+ EarningsTemplateObject result = apiInstance.updateEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID, earningsTemplate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployeeEarningsTemplate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object
+ EarningsTemplate earningsTemplate = { "ratePerUnit": 25, "numberOfUnits": 4, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" }; // EarningsTemplate |
+ try {
+ EarningsTemplateObject result = apiInstance.updateEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID, earningsTemplate);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployeeEarningsTemplate");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+UUID *payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single pay template earnings object (default to null)
+EarningsTemplate *earningsTemplate = { "ratePerUnit": 25, "numberOfUnits": 4, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// updates employee earnings template records
+[apiInstance updateEmployeeEarningsTemplateWith:xeroTenantId
+ employeeId:employeeId
+ payTemplateEarningID:payTemplateEarningID
+ earningsTemplate:earningsTemplate
+ completionHandler: ^(EarningsTemplateObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const payTemplateEarningID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single pay template earnings object
+const earningsTemplate:EarningsTemplate = { "ratePerUnit": 25, "numberOfUnits": 4, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" }; // {EarningsTemplate}
+try {
+ const response: any = await xero.accountingApi.updateEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID, earningsTemplate);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class updateEmployeeEarningsTemplateExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var payTemplateEarningID = new UUID(); // UUID | Id for single pay template earnings object (default to null)
+ var earningsTemplate = new EarningsTemplate(); // EarningsTemplate |
+
+ try
+ {
+ // updates employee earnings template records
+ EarningsTemplateObject result = apiInstance.updateEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID, earningsTemplate);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.updateEmployeeEarningsTemplate: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->updateEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single pay template earnings object
+my $earningsTemplate = ::Object::EarningsTemplate->new(); # EarningsTemplate |
+
+eval {
+ my $result = $api_instance->updateEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, payTemplateEarningID => $payTemplateEarningID, earningsTemplate => $earningsTemplate);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->updateEmployeeEarningsTemplate: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single pay template earnings object (default to null)
+earningsTemplate = { "ratePerUnit": 25, "numberOfUnits": 4, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" } # EarningsTemplate |
+
+try:
+ # updates employee earnings template records
+ api_response = api_instance.update_employee_earnings_template(xeroTenantId, employeeId, payTemplateEarningID, earningsTemplate)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->updateEmployeeEarningsTemplate: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
+ let earningsTemplate = { "ratePerUnit": 25, "numberOfUnits": 4, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" }; // EarningsTemplate
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.updateEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID, earningsTemplate, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+ PayTemplateEarningID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Id for single pay template earnings object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ earningsTemplate * |
+
+
+
+
+ EarningsTemplate
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
updateEmployeeLeave
+
updates employee leave records
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/Leave/{LeaveID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave/{LeaveID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID | Leave id for single object
+ EmployeeLeave employeeLeave = { "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 |
+ try {
+ EmployeeLeaveObject result = apiInstance.updateEmployeeLeave(xeroTenantId, employeeId, leaveID, employeeLeave);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployeeLeave");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID | Leave id for single object
+ EmployeeLeave employeeLeave = { "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 |
+ try {
+ EmployeeLeaveObject result = apiInstance.updateEmployeeLeave(xeroTenantId, employeeId, leaveID, employeeLeave);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployeeLeave");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+UUID *leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // Leave id for single object (default to null)
+EmployeeLeave *employeeLeave = { "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" } ] }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// updates employee leave records
+[apiInstance updateEmployeeLeaveWith:xeroTenantId
+ employeeId:employeeId
+ leaveID:leaveID
+ employeeLeave:employeeLeave
+ completionHandler: ^(EmployeeLeaveObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const leaveID = "c4be24e5-e840-4c92-9eaa-2d86cd596314"; // {UUID} Leave id for single object
+const employeeLeave:EmployeeLeave = { "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}
+try {
+ const response: any = await xero.accountingApi.updateEmployeeLeave(xeroTenantId, employeeId, leaveID, employeeLeave);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class updateEmployeeLeaveExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var leaveID = new UUID(); // UUID | Leave id for single object (default to null)
+ var employeeLeave = new EmployeeLeave(); // EmployeeLeave |
+
+ try
+ {
+ // updates employee leave records
+ EmployeeLeaveObject result = apiInstance.updateEmployeeLeave(xeroTenantId, employeeId, leaveID, employeeLeave);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.updateEmployeeLeave: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->updateEmployeeLeave: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; # UUID | Leave id for single object
+my $employeeLeave = ::Object::EmployeeLeave->new(); # EmployeeLeave |
+
+eval {
+ my $result = $api_instance->updateEmployeeLeave(xeroTenantId => $xeroTenantId, employeeId => $employeeId, leaveID => $leaveID, employeeLeave => $employeeLeave);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->updateEmployeeLeave: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314 # UUID | Leave id for single object (default to null)
+employeeLeave = { "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 |
+
+try:
+ # updates employee leave records
+ api_response = api_instance.update_employee_leave(xeroTenantId, employeeId, leaveID, employeeLeave)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->updateEmployeeLeave: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID
+ let employeeLeave = { "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
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.updateEmployeeLeave(xeroTenantId, employeeId, leaveID, employeeLeave, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+ LeaveID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Leave id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ employeeLeave * |
+
+
+
+
+ EmployeeLeave
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
updateEmployeeSalaryAndWage
+
updates employee salary and wages record
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object
+ SalaryAndWage salaryAndWage = { "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 |
+ try {
+ SalaryAndWageObject result = apiInstance.updateEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, salaryAndWage);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployeeSalaryAndWage");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object
+ SalaryAndWage salaryAndWage = { "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 |
+ try {
+ SalaryAndWageObject result = apiInstance.updateEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, salaryAndWage);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployeeSalaryAndWage");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+UUID *salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single pay template earnings object (default to null)
+SalaryAndWage *salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 3, "ratePerUnit": 11, "numberOfUnitsPerDay": 3, "daysPerWeek": 1, "effectiveFrom": "2020-05-15", "annualSalary": 101, "status": "Active", "paymentType": "Salary" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// updates employee salary and wages record
+[apiInstance updateEmployeeSalaryAndWageWith:xeroTenantId
+ employeeId:employeeId
+ salaryAndWagesID:salaryAndWagesID
+ salaryAndWage:salaryAndWage
+ completionHandler: ^(SalaryAndWageObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const salaryAndWagesID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single pay template earnings object
+const salaryAndWage:SalaryAndWage = { "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}
+try {
+ const response: any = await xero.accountingApi.updateEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, salaryAndWage);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class updateEmployeeSalaryAndWageExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var salaryAndWagesID = new UUID(); // UUID | Id for single pay template earnings object (default to null)
+ var salaryAndWage = new SalaryAndWage(); // SalaryAndWage |
+
+ try
+ {
+ // updates employee salary and wages record
+ SalaryAndWageObject result = apiInstance.updateEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, salaryAndWage);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.updateEmployeeSalaryAndWage: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->updateEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single pay template earnings object
+my $salaryAndWage = ::Object::SalaryAndWage->new(); # SalaryAndWage |
+
+eval {
+ my $result = $api_instance->updateEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWagesID => $salaryAndWagesID, salaryAndWage => $salaryAndWage);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->updateEmployeeSalaryAndWage: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single pay template earnings object (default to null)
+salaryAndWage = { "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 |
+
+try:
+ # updates employee salary and wages record
+ api_response = api_instance.update_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWagesID, salaryAndWage)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->updateEmployeeSalaryAndWage: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
+ let salaryAndWage = { "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
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.updateEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, salaryAndWage, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+ SalaryAndWagesID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Id for single pay template earnings object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ salaryAndWage * |
+
+
+
+
+ SalaryAndWage
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
updateEmployeeTax
+
updates the tax records for an employee
+
+
+
+
+
+
+
+ /Employees/{EmployeeId}/Tax
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Tax"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EmployeeTax employeeTax = ; // EmployeeTax |
+ try {
+ EmployeeTaxObject result = apiInstance.updateEmployeeTax(xeroTenantId, employeeId, employeeTax);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployeeTax");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object
+ EmployeeTax employeeTax = ; // EmployeeTax |
+ try {
+ EmployeeTaxObject result = apiInstance.updateEmployeeTax(xeroTenantId, employeeId, employeeTax);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateEmployeeTax");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
+EmployeeTax *employeeTax = ; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// updates the tax records for an employee
+[apiInstance updateEmployeeTaxWith:xeroTenantId
+ employeeId:employeeId
+ employeeTax:employeeTax
+ completionHandler: ^(EmployeeTaxObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object
+const employeeTax:EmployeeTax = ; // {EmployeeTax}
+try {
+ const response: any = await xero.accountingApi.updateEmployeeTax(xeroTenantId, employeeId, employeeTax);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class updateEmployeeTaxExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var employeeId = new UUID(); // UUID | Employee id for single object (default to null)
+ var employeeTax = new EmployeeTax(); // EmployeeTax |
+
+ try
+ {
+ // updates the tax records for an employee
+ EmployeeTaxObject result = apiInstance.updateEmployeeTax(xeroTenantId, employeeId, employeeTax);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.updateEmployeeTax: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->updateEmployeeTax: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object
+my $employeeTax = ::Object::EmployeeTax->new(); # EmployeeTax |
+
+eval {
+ my $result = $api_instance->updateEmployeeTax(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeTax => $employeeTax);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->updateEmployeeTax: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null)
+employeeTax = # EmployeeTax |
+
+try:
+ # updates the tax records for an employee
+ api_response = api_instance.update_employee_tax(xeroTenantId, employeeId, employeeTax)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->updateEmployeeTax: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
+ let employeeTax = ; // EmployeeTax
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.updateEmployeeTax(xeroTenantId, employeeId, employeeTax, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees.read |
+ Grant read-only access to payroll employees |
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ EmployeeId* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Employee id for single object
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ employeeTax * |
+
+
+
+
+ EmployeeTax
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
updatePayRun
+
update a pay run
+
+
+
+
+
+
+
+ /PayRuns/{PayRunID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PayRuns/{PayRunID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the pay run
+ PayRun payRun = { "paymentDate": "2019-07-01" }; // PayRun |
+ try {
+ PayRunObject result = apiInstance.updatePayRun(xeroTenantId, payRunID, payRun);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updatePayRun");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the pay run
+ PayRun payRun = { "paymentDate": "2019-07-01" }; // PayRun |
+ try {
+ PayRunObject result = apiInstance.updatePayRun(xeroTenantId, payRunID, payRun);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updatePayRun");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the pay run (default to null)
+PayRun *payRun = { "paymentDate": "2019-07-01" }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// update a pay run
+[apiInstance updatePayRunWith:xeroTenantId
+ payRunID:payRunID
+ payRun:payRun
+ completionHandler: ^(PayRunObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const payRunID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the pay run
+const payRun:PayRun = { "paymentDate": "2019-07-01" }; // {PayRun}
+try {
+ const response: any = await xero.accountingApi.updatePayRun(xeroTenantId, payRunID, payRun);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class updatePayRunExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var payRunID = new UUID(); // UUID | Identifier for the pay run (default to null)
+ var payRun = new PayRun(); // PayRun |
+
+ try
+ {
+ // update a pay run
+ PayRunObject result = apiInstance.updatePayRun(xeroTenantId, payRunID, payRun);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.updatePayRun: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->updatePayRun: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the pay run
+my $payRun = ::Object::PayRun->new(); # PayRun |
+
+eval {
+ my $result = $api_instance->updatePayRun(xeroTenantId => $xeroTenantId, payRunID => $payRunID, payRun => $payRun);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->updatePayRun: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the pay run (default to null)
+payRun = { "paymentDate": "2019-07-01" } # PayRun |
+
+try:
+ # update a pay run
+ api_response = api_instance.update_pay_run(xeroTenantId, payRunID, payRun)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->updatePayRun: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+ let payRun = { "paymentDate": "2019-07-01" }; // PayRun
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.updatePayRun(xeroTenantId, payRunID, payRun, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.payruns |
+ Grant read-write access to payroll payruns |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ PayRunID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the pay run
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ payRun * |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
updatePaySlipLineItems
+
creates employee pay slip
+
+
+
+
+
+
+
+ /PaySlips/{PaySlipID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/PaySlips/{PaySlipID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payslip
+ PaySlip paySlip = { "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 |
+ try {
+ PaySlipObject result = apiInstance.updatePaySlipLineItems(xeroTenantId, paySlipID, paySlip);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updatePaySlipLineItems");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payslip
+ PaySlip paySlip = { "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 |
+ try {
+ PaySlipObject result = apiInstance.updatePaySlipLineItems(xeroTenantId, paySlipID, paySlip);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updatePaySlipLineItems");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the payslip (default to null)
+PaySlip *paySlip = { "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 } }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// creates employee pay slip
+[apiInstance updatePaySlipLineItemsWith:xeroTenantId
+ paySlipID:paySlipID
+ paySlip:paySlip
+ completionHandler: ^(PaySlipObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const paySlipID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the payslip
+const paySlip:PaySlip = { "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}
+try {
+ const response: any = await xero.accountingApi.updatePaySlipLineItems(xeroTenantId, paySlipID, paySlip);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class updatePaySlipLineItemsExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var paySlipID = new UUID(); // UUID | Identifier for the payslip (default to null)
+ var paySlip = new PaySlip(); // PaySlip |
+
+ try
+ {
+ // creates employee pay slip
+ PaySlipObject result = apiInstance.updatePaySlipLineItems(xeroTenantId, paySlipID, paySlip);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.updatePaySlipLineItems: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->updatePaySlipLineItems: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the payslip
+my $paySlip = ::Object::PaySlip->new(); # PaySlip |
+
+eval {
+ my $result = $api_instance->updatePaySlipLineItems(xeroTenantId => $xeroTenantId, paySlipID => $paySlipID, paySlip => $paySlip);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->updatePaySlipLineItems: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the payslip (default to null)
+paySlip = { "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 |
+
+try:
+ # creates employee pay slip
+ api_response = api_instance.update_pay_slip_line_items(xeroTenantId, paySlipID, paySlip)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->updatePaySlipLineItems: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+ let paySlip = { "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
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.updatePaySlipLineItems(xeroTenantId, paySlipID, paySlip, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.employees |
+ Grant read-write access to payroll employees |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ PaySlipID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the payslip
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ paySlip * |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
updateTimesheetLine
+
update a timesheet line
+
+
+
+
+
+
+
+ /Timesheets/{TimesheetID}/Lines/{TimesheetLineID}
+
+
Usage and SDK Samples
+
+
+
+
+
+
+
+ - NodeJS
+
+
+
+
+
+
+
+
+
+
+
curl -X "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}"
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.PayrollNzApi;
+
+import java.io.File;
+import java.util.*;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
+ OAuth2.setAccessToken("YOUR ACCESS TOKEN");
+
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ UUID timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet line
+ TimesheetLine timesheetLine = { "date": "2020-08-04", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 2 }; // TimesheetLine |
+ try {
+ TimesheetLineObject result = apiInstance.updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateTimesheetLine");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
import org.openapitools.client.api.PayrollNzApi;
+
+public class PayrollNzApiExample {
+
+ public static void main(String[] args) {
+ PayrollNzApi apiInstance = new PayrollNzApi();
+ String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
+ UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
+ UUID timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet line
+ TimesheetLine timesheetLine = { "date": "2020-08-04", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 2 }; // TimesheetLine |
+ try {
+ TimesheetLineObject result = apiInstance.updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PayrollNzApi#updateTimesheetLine");
+ e.printStackTrace();
+ }
+ }
+}
+
+
+
+
Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
+UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
+UUID *timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet line (default to null)
+TimesheetLine *timesheetLine = { "date": "2020-08-04", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 2 }; //
+
+PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
+
+// update a timesheet line
+[apiInstance updateTimesheetLineWith:xeroTenantId
+ timesheetID:timesheetID
+ timesheetLineID:timesheetLineID
+ timesheetLine:timesheetLine
+ completionHandler: ^(TimesheetLineObject output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+ }];
+
+
+
+
+
const tokenSet: TokenSet = {
+ id_token: 'xxx',
+ access_token: 'yyy',
+ expires_at: 1582308862,
+ token_type: 'Bearer',
+ refresh_token: 'zzz',
+ session_state: 'xxx'
+}
+await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant
+const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet
+const timesheetLineID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet line
+const timesheetLine:TimesheetLine = { "date": "2020-08-04", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 2 }; // {TimesheetLine}
+try {
+ const response: any = await xero.accountingApi.updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`);
+ console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`);
+}
+
+
+
+
+
+
+
using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using .Model;
+
+namespace Example
+{
+ public class updateTimesheetLineExample
+ {
+ public void main()
+ {
+
+ // Configure OAuth2 access token for authorization: OAuth2
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PayrollNzApi();
+ var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null)
+ var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null)
+ var timesheetLineID = new UUID(); // UUID | Identifier for the timesheet line (default to null)
+ var timesheetLine = new TimesheetLine(); // TimesheetLine |
+
+ try
+ {
+ // update a timesheet line
+ TimesheetLineObject result = apiInstance.updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine);
+ Debug.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Debug.Print("Exception when calling PayrollNzApi.updateTimesheetLine: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Configure OAuth2 access token for authorization: OAuth2
+
+$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
+$config->setHost("https://api.xero.com/api.xro/2.0");
+
+$xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
+
+$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi(
+ new GuzzleHttp\Client(),
+ $config
+);
+
+try {
+} catch (Exception $e) {
+ echo 'Exception when calling PayrollNzApi->updateTimesheetLine: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+
+
+
use Data::Dumper;
+use ::Configuration;
+use ::PayrollNzApi;
+
+# Configure OAuth2 access token for authorization: OAuth2
+$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
+my $api_instance = ::PayrollNzApi->new();
+my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
+my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet
+my $timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet line
+my $timesheetLine = ::Object::TimesheetLine->new(); # TimesheetLine |
+
+eval {
+ my $result = $api_instance->updateTimesheetLine(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID, timesheetLineID => $timesheetLineID, timesheetLine => $timesheetLine);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling PayrollNzApi->updateTimesheetLine: $@\n";
+}
+
+
+
+
from __future__ import print_statement
+import time
+import
+from .rest import ApiException
+from pprint import pprint
+
+# Configure OAuth2 access token for authorization: OAuth2
+.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# create an instance of the API class
+api_instance = .PayrollNzApi()
+xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null)
+timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null)
+timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet line (default to null)
+timesheetLine = { "date": "2020-08-04", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 2 } # TimesheetLine |
+
+try:
+ # update a timesheet line
+ api_response = api_instance.update_timesheet_line(xeroTenantId, timesheetID, timesheetLineID, timesheetLine)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling PayrollNzApi->updateTimesheetLine: %s\n" % e)
+
+
+
+
extern crate PayrollNzApi;
+
+pub fn main() {
+ let xeroTenantId = xeroTenantId_example; // String
+ let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+ let timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
+ let timesheetLine = { "date": "2020-08-04", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 2 }; // TimesheetLine
+
+ let mut context = PayrollNzApi::Context::default();
+ let result = client.updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine, &context).wait();
+ println!("{:?}", result);
+
+}
+
+
+
+
+ Scopes
+
+
+
+ payroll.timesheets |
+ Grant read-write access to payroll timesheets |
+
+
+
+
+ Parameters
+
+ Path parameters
+
+
+ Name |
+ Description |
+
+ TimesheetID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the timesheet
+
+
+
+ Required
+
+
+
+ |
+
+
+ TimesheetLineID* |
+
+
+
+
+
+
+
+ UUID
+
+
+ (uuid)
+
+
+
+Identifier for the timesheet line
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Header parameters
+
+
+ Name |
+ Description |
+
+ Xero-Tenant-Id* |
+
+
+
+
+
+
+
+ String
+
+
+
+Xero identifier for Tenant
+
+
+
+ Required
+
+
+
+ |
+
+
+
+
+ Body parameters
+
+
+ Name |
+ Description |
+
+ timesheetLine * |
+
+
+
+
+ TimesheetLine
+
+
+
+
+
+
+
+ Required
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+