Skip to content

Commit cca577c

Browse files
authored
Merge pull request #1 from XeroAPI/master
merge latest
2 parents 2542dbe + b0358fc commit cca577c

File tree

441 files changed

+65275
-361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

441 files changed

+65275
-361
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ This release only supports oAuth2 authentication and the following API sets.
77
* fixed asset
88
* projects
99
* payroll AU
10+
* payroll UK
1011

1112
Coming soon
12-
* payroll UK
1313
* payroll NZ
1414
* bank feeds
1515
* files
@@ -260,7 +260,7 @@ class StorageClass
260260
public function getToken()
261261
{
262262
//If it doesn't exist or is expired, return null
263-
if (!empty($this->getSession())
263+
if (empty($this->getSession())
264264
|| ($_SESSION['oauth2']['expires'] !== null
265265
&& $_SESSION['oauth2']['expires'] <= time())
266266
) {
@@ -506,6 +506,8 @@ Looking to implement [Signup with Xero](https://developer.xero.com/documentation
506506
// Decode JWT
507507
$jwt = new XeroAPI\XeroPHP\JWTClaims();
508508
$jwt->setTokenId($accessToken->getValues()["id_token"]);
509+
// Set access token in order to get authentication event id
510+
$jwt->setTokenAccess($accessToken->getToken());
509511
$jwt->decode();
510512

511513
$sub​ = $jwt->getSub();
@@ -517,6 +519,7 @@ Looking to implement [Signup with Xero](https://developer.xero.com/documentation
517519
$user_id = $jwt->getXeroUserId();
518520
$username = $jwt->getPreferredUsername();
519521
$session_id = $jwt->getGlobalSessionId();
522+
$authentication_event_id = $jwt->getAuthenticationEventId();
520523
```
521524

522525

docs/accounting/Api/AccountingApi.md

+58-58
Large diffs are not rendered by default.

docs/accounting/Model/Attachment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**file_name** | **string** | Name of the file | [optional]
88
**url** | **string** | URL to the file on xero.com | [optional]
99
**mime_type** | **string** | Type of file | [optional]
10-
**content_length** | **float** | Length of the file content | [optional]
10+
**content_length** | **int** | Length of the file content | [optional]
1111
**include_online** | **bool** | Include the file with the online invoice | [optional]
1212

1313
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/accounting/Model/BankTransaction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**type** | **string** | See Bank Transaction Types |
7-
**contact** | [**\XeroAPI\XeroPHP\Models\Accounting\Contact**](Contact.md) | |
7+
**contact** | [**\XeroAPI\XeroPHP\Models\Accounting\Contact**](Contact.md) | | [optional]
88
**line_items** | [**\XeroAPI\XeroPHP\Models\Accounting\LineItem[]**](LineItem.md) | See LineItems |
99
**bank_account** | [**\XeroAPI\XeroPHP\Models\Accounting\Account**](Account.md) | |
1010
**is_reconciled** | **bool** | Boolean to show if transaction is reconciled | [optional]

docs/accounting/Model/BatchPayment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
1313
**date_string** | **string** | Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06 | [optional]
1414
**date** | **string** | Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06 | [optional]
1515
**amount** | **double** | The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00 | [optional]
16-
**payments** | [**\XeroAPI\XeroPHP\Models\Accounting\Payment[]**](Payment.md) | | [optional]
16+
**payments** | [**\XeroAPI\XeroPHP\Models\Accounting\Payment[]**](Payment.md) | An array of payments | [optional]
1717
**type** | **string** | PAYBATCH for bill payments or RECBATCH for sales invoice payments (read-only) | [optional]
1818
**status** | **string** | AUTHORISED or DELETED (read-only). New batch payments will have a status of AUTHORISED. It is not possible to delete batch payments via the API. | [optional]
1919
**total_amount** | **string** | The total of the payments that make up the batch (read-only) | [optional]

docs/accounting/Model/ManualJournalLine.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**line_amount** | **double** | total for line. Debits are positive, credits are negative value | [optional]
77
**account_code** | **string** | See Accounts | [optional]
8+
**account_id** | **string** | See Accounts | [optional]
89
**description** | **string** | Description for journal line | [optional]
910
**tax_type** | **string** | The tax type from TaxRates | [optional]
1011
**tracking** | [**\XeroAPI\XeroPHP\Models\Accounting\TrackingCategory[]**](TrackingCategory.md) | Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 &lt;TrackingCategory&gt; elements. | [optional]

docs/accounting/Model/Organisation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Name | Type | Description | Notes
2727
**end_of_year_lock_date** | **string** | Shown if set. See lock dates | [optional]
2828
**created_date_utc** | **string** | Timestamp when the organisation was created in Xero | [optional]
2929
**timezone** | [**\XeroAPI\XeroPHP\Models\Accounting\TimeZone**](TimeZone.md) | | [optional]
30-
**organisation_entity_type** | **string** | Organisation Type | [optional]
30+
**organisation_entity_type** | **string** | Organisation Entity Type | [optional]
3131
**short_code** | **string** | A unique identifier for the organisation. Potential uses. | [optional]
3232
**class** | **string** | Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM) | [optional]
3333
**edition** | **string** | BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing) | [optional]

docs/accounting/Model/Report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
99
**report_title** | **string** | See Prepayment Types | [optional]
1010
**report_date** | **string** | Date of report | [optional]
1111
**updated_date_utc** | **string** | Updated Date | [optional]
12-
**contacts** | [**\XeroAPI\XeroPHP\Models\Accounting\TenNinteyNineContact[]**](TenNinteyNineContact.md) | | [optional]
12+
**contacts** | [**\XeroAPI\XeroPHP\Models\Accounting\TenNinetyNineContact[]**](TenNinetyNineContact.md) | | [optional]
1313

1414
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1515

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# TenNinetyNineContact
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**box1** | **double** | Box 1 on 1099 Form | [optional]
7+
**box2** | **double** | Box 2 on 1099 Form | [optional]
8+
**box3** | **double** | Box 3 on 1099 Form | [optional]
9+
**box4** | **double** | Box 4 on 1099 Form | [optional]
10+
**box5** | **double** | Box 5 on 1099 Form | [optional]
11+
**box6** | **double** | Box 6 on 1099 Form | [optional]
12+
**box7** | **double** | Box 7 on 1099 Form | [optional]
13+
**box8** | **double** | Box 8 on 1099 Form | [optional]
14+
**box9** | **double** | Box 9 on 1099 Form | [optional]
15+
**box10** | **double** | Box 10 on 1099 Form | [optional]
16+
**box11** | **double** | Box 11 on 1099 Form | [optional]
17+
**box13** | **double** | Box 13 on 1099 Form | [optional]
18+
**box14** | **double** | Box 14 on 1099 Form | [optional]
19+
**name** | **string** | Contact name on 1099 Form | [optional]
20+
**federal_tax_id_type** | **string** | Contact Fed Tax ID type | [optional]
21+
**city** | **string** | Contact city on 1099 Form | [optional]
22+
**zip** | **string** | Contact zip on 1099 Form | [optional]
23+
**state** | **string** | Contact State on 1099 Form | [optional]
24+
**email** | **string** | Contact email on 1099 Form | [optional]
25+
**street_address** | **string** | Contact address on 1099 Form | [optional]
26+
**tax_id** | **string** | Contact tax id on 1099 Form | [optional]
27+
**contact_id** | **string** | Contact contact id | [optional]
28+
29+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30+
31+

docs/assets/Model/AssetType.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**asset_type_id** | **string** | Xero generated unique identifier for asset types |
6+
**asset_type_id** | **string** | Xero generated unique identifier for asset types | [optional]
77
**asset_type_name** | **string** | The name of the asset type |
88
**fixed_asset_account_id** | **string** | The asset account for fixed assets of this type | [optional]
99
**depreciation_expense_account_id** | **string** | The expense account for the depreciation of fixed assets of this type | [optional]

docs/payrollau/Api/PayrollAUApi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ $apiInstance = new XeroAPI\XeroPHP\Api\PayrollAuApi(
161161
$config
162162
);
163163
$xero_tenant_id = 'xero_tenant_id_example'; // string | Xero identifier for Tenant
164-
$pay_item = { "EarningsRates": [ { "Name": "MyRate", "AccountCode": "400", "TypeOfUnits": "4.00", "IsExemptFromTax": true, "IsExemptFromSuper": true, "IsReportableAsW1": false, "EarningsType": "FIXED", "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", "RateType": "FIXEDAMOUNT", "RatePerUnit": "10.0", "Multiplier": 1.5, "AccrueLeave": 1, "Amount": 5, "EmploymentTerminationPaymentType": "O" } ], "DeductionTypes": [ { "Name": "My Deduction", "AccountCode": "400" } ] } ; // \XeroAPI\XeroPHP\Models\PayrollAu\PayItem |
164+
$pay_item = { "EarningsRates": [ { "Name": "MyRate", "AccountCode": "400", "TypeOfUnits": "4.00", "IsExemptFromTax": true, "IsExemptFromSuper": true, "IsReportableAsW1": false, "EarningsType": "ORDINARYTIMEEARNINGS", "EarningsRateID": "1fa4e226-b711-46ba-a8a7-4344c9c5fb87", "RateType": "MULTIPLE", "RatePerUnit": "10.0", "Multiplier": 1.5, "Amount": 5, "EmploymentTerminationPaymentType": "O" } ] }; // \XeroAPI\XeroPHP\Models\PayrollAu\PayItem |
165165

166166
try {
167167
$result = $apiInstance->createPayItem($xero_tenant_id, $pay_item);

docs/payrollau/Model/EarningsLine.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**earnings_rate_id** | **string** | Xero unique id for earnings rate |
7-
**calculation_type** | [**\XeroAPI\XeroPHP\Models\PayrollAu\EarningsRateCalculationType**](EarningsRateCalculationType.md) | |
7+
**calculation_type** | [**\XeroAPI\XeroPHP\Models\PayrollAu\EarningsRateCalculationType**](EarningsRateCalculationType.md) | | [optional]
88
**annual_salary** | **double** | Annual salary for earnings line | [optional]
99
**number_of_units_per_week** | **double** | number of units for earning line | [optional]
1010
**rate_per_unit** | **double** | Rate per unit of the EarningsLine. | [optional]

docs/payrollau/Model/EarningsRate.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
1414
**rate_type** | [**\XeroAPI\XeroPHP\Models\PayrollAu\RateType**](RateType.md) | | [optional]
1515
**rate_per_unit** | **string** | Default rate per unit (optional). Only applicable if RateType is RATEPERUNIT. | [optional]
1616
**multiplier** | **double** | This is the multiplier used to calculate the rate per unit, based on the employee’s ordinary earnings rate. For example, for time and a half enter 1.5. Only applicable if RateType is MULTIPLE | [optional]
17-
**accrue_leave** | **double** | Indicates that this earnings rate should accrue leave. Only applicable if RateType is MULTIPLE | [optional]
17+
**accrue_leave** | **bool** | Indicates that this earnings rate should accrue leave. Only applicable if RateType is MULTIPLE | [optional]
1818
**amount** | **double** | Optional Amount for FIXEDAMOUNT RateType EarningsRate | [optional]
1919
**employment_termination_payment_type** | [**\XeroAPI\XeroPHP\Models\PayrollAu\EmploymentTerminationPaymentType**](EmploymentTerminationPaymentType.md) | | [optional]
2020
**updated_date_utc** | **string** | Last modified timestamp | [optional]

docs/payrollau/Model/Employee.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**first_name** | **string** | First name of employee |
77
**last_name** | **string** | Last name of employee |
88
**date_of_birth** | **string** | Date of birth of the employee (YYYY-MM-DD) |
9-
**home_address** | [**\XeroAPI\XeroPHP\Models\PayrollAu\HomeAddress**](HomeAddress.md) | |
9+
**home_address** | [**\XeroAPI\XeroPHP\Models\PayrollAu\HomeAddress**](HomeAddress.md) | | [optional]
1010
**start_date** | **string** | Start date for an employee (YYYY-MM-DD) | [optional]
1111
**title** | **string** | Title of the employee | [optional]
1212
**middle_names** | **string** | Middle name(s) of the employee | [optional]

docs/payrollau/Model/LeaveType.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Name | Type | Description | Notes
66
**name** | **string** | Name of the earnings rate (max length &#x3D; 100) | [optional]
77
**type_of_units** | **string** | The type of units by which leave entitlements are normally tracked. These are typically the same as the type of units used for the employee’s ordinary earnings rate | [optional]
88
**leave_type_id** | **string** | Xero identifier | [optional]
9-
**normal_entitlement** | **int** | The number of units the employee is entitled to each year | [optional]
10-
**leave_loading_rate** | **int** | Enter an amount here if your organisation pays an additional percentage on top of ordinary earnings when your employees take leave (typically 17.5%) | [optional]
9+
**normal_entitlement** | **double** | The number of units the employee is entitled to each year | [optional]
10+
**leave_loading_rate** | **double** | Enter an amount here if your organisation pays an additional percentage on top of ordinary earnings when your employees take leave (typically 17.5%) | [optional]
1111
**updated_date_utc** | **string** | Last modified timestamp | [optional]
1212
**is_paid_leave** | **bool** | Set this to indicate that an employee will be paid when taking this type of leave | [optional]
1313
**show_on_payslip** | **bool** | Set this if you want a balance for this leave type to be shown on your employee’s payslips | [optional]

0 commit comments

Comments
 (0)