Skip to content

Commit

Permalink
Merge pull request #530 from XeroAPI/adde_budgets_fix_reports
Browse files Browse the repository at this point in the history
Add reports fixes, and budgets endpoints
  • Loading branch information
SerKnight authored Jun 1, 2021
2 parents db312b9 + e40aec3 commit d30105a
Show file tree
Hide file tree
Showing 27 changed files with 4,354 additions and 9,952 deletions.
1,834 changes: 1,207 additions & 627 deletions docs/accounting/index.html

Large diffs are not rendered by default.

25 changes: 23 additions & 2 deletions docs/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Asset"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>4.11.3</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>4.12.0</li>
<li class="nav-header" data-group="Asset"><a href="#api-Asset">Methods</a></li>
<li data-group="Asset" data-name="createAsset" class="">
<a href="#api-Asset-createAsset">createAsset</a>
Expand Down Expand Up @@ -1455,6 +1455,12 @@ <h3>Usage and SDK Samples</h3>

const xeroTenantId = 'YOUR_XERO_TENANT_ID';

const asset: Asset = {
assetname: "Other Computer",
assetnumber: "FA-00210",
status: Asset.StatusEnum.DRAFT
};

try {
const response = await xero.accountingApi.createAsset(xeroTenantId, asset);
console.log(response.body || response.response.statusCode)
Expand Down Expand Up @@ -1571,6 +1577,21 @@ <h3>Usage and SDK Samples</h3>

const xeroTenantId = 'YOUR_XERO_TENANT_ID';

const bookDepreciationSetting: BookDepreciationSetting = {
depreciationMethod: "DiminishingValue100",
averagingMethod: "ActualDays",
depreciationRate: 40,
depreciationCalculationMethod: "None"
};

const assetType: AssetType = {
assetTypeName: "Computer Equipment",
fixedAssetAccountId: "00000000-0000-0000-0000-000000000000",
depreciationExpenseAccountId: "00000000-0000-0000-0000-000000000000",
accumulatedDepreciationAccountId: "00000000-0000-0000-0000-000000000000",
bookDepreciationSetting: bookDepreciationSetting
};

try {
const response = await xero.accountingApi.createAssetType(xeroTenantId, assetType);
console.log(response.body || response.response.statusCode)
Expand Down Expand Up @@ -1683,7 +1704,7 @@ <h3>Usage and SDK Samples</h3>
<pre class="prettyprint"><code class="language-javascript">await xero.setTokenSet(tokenSet);

const xeroTenantId = 'YOUR_XERO_TENANT_ID';
const id = '4f7bcdcb-5ec1-4258-9558-19f662fccdfe';
const id = '00000000-0000-0000-0000-000000000000';

try {
const response = await xero.accountingApi.getAssetById(xeroTenantId, id);
Expand Down
2 changes: 1 addition & 1 deletion docs/bankfeeds/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="BankFeeds"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>4.11.3</li>
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>4.12.0</li>
<li class="nav-header" data-group="BankFeeds"><a href="#api-BankFeeds">Methods</a></li>
<li data-group="BankFeeds" data-name="createFeedConnections" class="">
<a href="#api-BankFeeds-createFeedConnections">createFeedConnections</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Files"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>4.11.3</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>4.12.0</li>
<li class="nav-header" data-group="Files"><a href="#api-Files">Methods</a></li>
<li data-group="Files" data-name="createFileAssociation" class="">
<a href="#api-Files-createFileAssociation">createFileAssociation</a>
Expand Down
155 changes: 154 additions & 1 deletion docs/payroll-au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3232,7 +3232,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollAu"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>4.11.3</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>4.12.0</li>
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
<li data-group="PayrollAu" data-name="createEmployee" class="">
<a href="#api-PayrollAu-createEmployee">createEmployee</a>
Expand Down Expand Up @@ -3365,6 +3365,21 @@ <h3>Usage and SDK Samples</h3>
<pre class="prettyprint"><code class="language-javascript">await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const dateOfBirth = '2000-10-28'

const homeAddress: HomeAddress = {
addressLine1: "123 Test st",
region: "VIC",
postalCode: 3000,
city: "Melbourne"
};

const employee: Employee = {
firstName: "Adam",
lastName: "Adamson",
dateOfBirth: dateOfBirth,
homeAddress: homeAddress
};

try {
const response = await xero.accountingApi.createEmployee(xeroTenantId, employee);
Expand Down Expand Up @@ -3483,6 +3498,16 @@ <h3>Usage and SDK Samples</h3>
<pre class="prettyprint"><code class="language-javascript">await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const startDate = '2020-10-28'
const endDate = '2020-10-30'

const leaveApplication: LeaveApplication = {
employeeId: "00000000-0000-0000-0000-000000000000",
leaveTypeId: "00000000-0000-0000-0000-000000000000",
title: "Annual Leave",
startDate: startDate,
endDate: endDate
};

try {
const response = await xero.accountingApi.createLeaveApplication(xeroTenantId, leaveApplication);
Expand Down Expand Up @@ -3602,6 +3627,48 @@ <h3>Usage and SDK Samples</h3>

const xeroTenantId = 'xeroTenantId_example';

const earningsRate: EarningsRate = {
name: "Ordinary Hours 123",
accountCode: "477",
typeOfUnits: "Hours",
isExemptFromTax: true,
isExemptFromSuper: true,
earningsType: EarningsType.OVERTIMEEARNINGS
};

const deductionType: DeductionType = {
name: "Union Fees",
accountCode: "826",
reducesTax: true,
reducesSuper: true
};

const leaveType: LeaveType = {
name: "Annual Leave",
typeOfUnits: "Hours",
isPaidLeave: true,
showOnPayslip: true
};

const reimbursementType: ReimbursementType = {
name: "Annual Leave",
accountCode: "850"
};
const earningsRates = [];
earningsRates.push(earningsRate,
const deductionTypes = [];
const leaveTypes = [];
leaveTypes.push(leaveType)
const reimbursementTypes = [];
reimbursementTypes.push(reimbursementType)

const payItem: PayItem = {
earningsRates: earningsRates,
deductionTypes: deductionTypes,
leaveTypes: leaveTypes,
reimbursementTypes: reimbursementTypes
};

try {
const response = await xero.accountingApi.createPayItem(xeroTenantId, payItem);
console.log(response.body || response.response.statusCode)
Expand Down Expand Up @@ -3717,6 +3784,10 @@ <h3>Usage and SDK Samples</h3>

const xeroTenantId = 'xeroTenantId_example';

const payRun: PayRun = {
payrollCalendarID: "00000000-0000-0000-0000-000000000000"
};

try {
const response = await xero.accountingApi.createPayRun(xeroTenantId, payRun);
console.log(response.body || response.response.statusCode)
Expand Down Expand Up @@ -3834,6 +3905,17 @@ <h3>Usage and SDK Samples</h3>
<pre class="prettyprint"><code class="language-javascript">await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const startDate = '2000-10-28'
const paymentDate = '2000-10-30'

const payrollCalendar: PayrollCalendar = {
name: "Weekly",
calendarType: CalendarType.WEEKLY,
startDate: startDate,
paymentDate: paymentDate
};
const payrollCalendars = [];
payrollCalendars.push(payrollCalendar)

try {
const response = await xero.accountingApi.createPayrollCalendar(xeroTenantId, payrollCalendar);
Expand Down Expand Up @@ -3953,6 +4035,11 @@ <h3>Usage and SDK Samples</h3>

const xeroTenantId = 'xeroTenantId_example';

const superFund: SuperFund = {
type: SuperFundType.REGULATED,
USI: "40022701955002"
};

try {
const response = await xero.accountingApi.createSuperfund(xeroTenantId, superFund);
console.log(response.body || response.response.statusCode)
Expand Down Expand Up @@ -4070,6 +4157,15 @@ <h3>Usage and SDK Samples</h3>
<pre class="prettyprint"><code class="language-javascript">await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const startDate = '2020-10-23'
const endDate = '2020-10-30'

const timesheet: Timesheet = {
employeeID: "00000000-0000-0000-0000-000000000000",
startDate: startDate,
endDate: endDate,
status: TimesheetStatus.DRAFT
};

try {
const response = await xero.accountingApi.createTimesheet(xeroTenantId, timesheet);
Expand Down Expand Up @@ -6377,6 +6473,21 @@ <h3>Usage and SDK Samples</h3>

const xeroTenantId = 'xeroTenantId_example';
const employeeID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
const dateOfBirth = '2000-10-28'

const homeAddress: HomeAddress = {
addressLine1: "123 Test st",
region: "VIC",
postalCode: 3000,
city: "Melbourne"
};

const employee: Employee = {
firstName: "Adam",
lastName: "Adamson",
dateOfBirth: dateOfBirth,
homeAddress: homeAddress
};

try {
const response = await xero.accountingApi.updateEmployee(xeroTenantId, employeeID, employee);
Expand Down Expand Up @@ -6525,6 +6636,16 @@ <h3>Usage and SDK Samples</h3>

const xeroTenantId = 'xeroTenantId_example';
const leaveApplicationID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
const startDate = '2020-10-28'
const endDate = '2020-10-30'

const leaveApplication: LeaveApplication = {
employeeId: "00000000-0000-0000-0000-000000000000",
leaveTypeId: "00000000-0000-0000-0000-000000000000",
title: "Annual Leave",
startDate: startDate,
endDate: endDate
};

try {
const response = await xero.accountingApi.updateLeaveApplication(xeroTenantId, leaveApplicationID, leaveApplication);
Expand Down Expand Up @@ -6678,6 +6799,10 @@ <h3>Usage and SDK Samples</h3>
const xeroTenantId = 'xeroTenantId_example';
const payRunID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

const payRun: PayRun = {
payrollCalendarID: "00000000-0000-0000-0000-000000000000"
};

try {
const response = await xero.accountingApi.updatePayRun(xeroTenantId, payRunID, payRun);
console.log(response.body || response.response.statusCode)
Expand Down Expand Up @@ -6826,6 +6951,20 @@ <h3>Usage and SDK Samples</h3>
const xeroTenantId = 'xeroTenantId_example';
const payslipID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

const earningsLine: EarningsLine = {
earningsRateID: "00000000-0000-0000-0000-000000000000",
ratePerUnit: 20,
numberOfUnits: 1
};
const earningsLines = [];
earningsLines.push(earningsLine)

const payslipLine: PayslipLines = {
earningsLines: earningsLines
};
const payslipLines = [];
payslipLines.push(payslipLine)

try {
const response = await xero.accountingApi.updatePayslip(xeroTenantId, payslipID, payslipLines);
console.log(response.body || response.response.statusCode)
Expand Down Expand Up @@ -6974,6 +7113,11 @@ <h3>Usage and SDK Samples</h3>
const xeroTenantId = 'xeroTenantId_example';
const superFundID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';

const superFund: SuperFund = {
type: SuperFundType.REGULATED,
USI: "40022701955002"
};

try {
const response = await xero.accountingApi.updateSuperfund(xeroTenantId, superFundID, superFund);
console.log(response.body || response.response.statusCode)
Expand Down Expand Up @@ -7121,6 +7265,15 @@ <h3>Usage and SDK Samples</h3>

const xeroTenantId = 'xeroTenantId_example';
const timesheetID = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c';
const startDate = '2020-10-23'
const endDate = '2020-10-30'

const timesheet: Timesheet = {
employeeID: "00000000-0000-0000-0000-000000000000",
startDate: startDate,
endDate: endDate,
status: TimesheetStatus.DRAFT
};

try {
const response = await xero.accountingApi.updateTimesheet(xeroTenantId, timesheetID, timesheet);
Expand Down
Loading

0 comments on commit d30105a

Please sign in to comment.