Skip to content

Commit 9b35ac2

Browse files
authored
Merge pull request #180 from XeroAPI/sid-development
Build from OAS 2.4.1
2 parents 0c73fe5 + 5b32da9 commit 9b35ac2

File tree

351 files changed

+3354
-338
lines changed

Some content is hidden

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

351 files changed

+3354
-338
lines changed

docs/accounting/Api/AccountingApi.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ Method | HTTP request | Description
191191
[**getTrackingCategory**](AccountingApi.md#getTrackingCategory) | **GET** /TrackingCategories/{TrackingCategoryID} | Allows you to retrieve tracking categories and options for specified category
192192
[**getUser**](AccountingApi.md#getUser) | **GET** /Users/{UserID} | Allows you to retrieve a specified user
193193
[**getUsers**](AccountingApi.md#getUsers) | **GET** /Users | Allows you to retrieve users
194+
[**postSetup**](AccountingApi.md#postSetup) | **POST** /Setup | Allows you to set the chart of accounts, the conversion date and conversion balances
194195
[**updateAccount**](AccountingApi.md#updateAccount) | **POST** /Accounts/{AccountID} | Allows you to update a chart of accounts
195196
[**updateAccountAttachmentByFileName**](AccountingApi.md#updateAccountAttachmentByFileName) | **POST** /Accounts/{AccountID}/Attachments/{FileName} | Allows you to update Attachment on Account by Filename
196197
[**updateBankTransaction**](AccountingApi.md#updateBankTransaction) | **POST** /BankTransactions/{BankTransactionID} | Allows you to update a single spend or receive money transaction
@@ -10575,6 +10576,59 @@ Name | Type | Description | Notes
1057510576

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

10579+
# **postSetup**
10580+
> \XeroAPI\XeroPHP\Models\Accounting\ImportSummary postSetup($xero_tenant_id, $setup)
10581+
10582+
Allows you to set the chart of accounts, the conversion date and conversion balances
10583+
10584+
### Example
10585+
```php
10586+
<?php
10587+
require_once(__DIR__ . '/vendor/autoload.php');
10588+
10589+
// Configure OAuth2 access token for authorization: OAuth2
10590+
$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
10591+
10592+
$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
10593+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
10594+
// This is optional, `GuzzleHttp\Client` will be used as default.
10595+
new GuzzleHttp\Client(),
10596+
$config
10597+
);
10598+
$xero_tenant_id = YOUR_XERO_TENANT_ID; // string | Xero identifier for Tenant
10599+
$setup = { "ConversionDate": {}, "ConversionBalances": [], "Accounts": [ { "Code": "200", "Name": "Sales", "Type": "SALES", "ReportingCode": "REV.TRA.GOO" }, { "Code": "400", "Name": "Advertising", "Type": "OVERHEADS", "ReportingCode": "EXP" }, { "Code": "610", "Name": "Accounts Receivable", "Type": "CURRENT", "SystemAccount": "DEBTORS", "ReportingCode": "ASS.CUR.REC.TRA" }, { "Code": "800", "Name": "Accounts Payable", "Type": "CURRLIAB", "SystemAccount": "CREDITORS", "ReportingCode": "LIA.CUR.PAY" } ] }; // \XeroAPI\XeroPHP\Models\Accounting\Setup | Object including an accounts array, a conversion balances array and a conversion date object in body of request
10600+
10601+
try {
10602+
$result = $apiInstance->postSetup($xero_tenant_id, $setup);
10603+
print_r($result);
10604+
} catch (Exception $e) {
10605+
echo 'Exception when calling AccountingApi->postSetup: ', $e->getMessage(), PHP_EOL;
10606+
}
10607+
?>
10608+
```
10609+
10610+
### Parameters
10611+
10612+
Name | Type | Description | Notes
10613+
------------- | ------------- | ------------- | -------------
10614+
**xero_tenant_id** | **string**| Xero identifier for Tenant |
10615+
**setup** | [**\XeroAPI\XeroPHP\Models\Accounting\Setup**](../Model/Setup.md)| Object including an accounts array, a conversion balances array and a conversion date object in body of request |
10616+
10617+
### Return type
10618+
10619+
[**\XeroAPI\XeroPHP\Models\Accounting\ImportSummary**](../Model/ImportSummary.md)
10620+
10621+
### Authorization
10622+
10623+
[OAuth2](../../README.md#OAuth2)
10624+
10625+
### HTTP request headers
10626+
10627+
- **Content-Type**: application/json
10628+
- **Accept**: application/json
10629+
10630+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
10631+
1057810632
# **updateAccount**
1057910633
> \XeroAPI\XeroPHP\Models\Accounting\Accounts updateAccount($xero_tenant_id, $account_id, $accounts)
1058010634

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ImportSummary
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**accounts** | [**\XeroAPI\XeroPHP\Models\Accounting\ImportSummaryAccounts**](ImportSummaryAccounts.md) | | [optional]
7+
**organisation** | [**\XeroAPI\XeroPHP\Models\Accounting\ImportSummaryOrganisation**](ImportSummaryOrganisation.md) | | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ImportSummaryAccounts
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**total** | **float** | The total number of accounts in the org | [optional]
7+
**new** | **float** | The number of new accounts created | [optional]
8+
**updated** | **float** | The number of accounts updated | [optional]
9+
**deleted** | **float** | The number of accounts deleted | [optional]
10+
**locked** | **float** | The number of locked accounts | [optional]
11+
**system** | **float** | The number of system accounts | [optional]
12+
**errored** | **float** | The number of accounts that had an error | [optional]
13+
**present** | **bool** | | [optional]
14+
**new_or_updated** | **float** | The number of new or updated accounts | [optional]
15+
16+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17+
18+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ImportSummaryOrganisation
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**present** | **bool** | | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

docs/accounting/Model/Setup.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Setup
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**accounts** | [**\XeroAPI\XeroPHP\Models\Accounting\Accounts[]**](Accounts.md) | See Accounts | [optional]
7+
**conversion_date** | [**\XeroAPI\XeroPHP\Models\Accounting\SetupConversionDate**](SetupConversionDate.md) | | [optional]
8+
**conversion_balances** | [**\XeroAPI\XeroPHP\Models\Accounting\SetupConversionBalances[]**](SetupConversionBalances.md) | Balance supplied for each account that has a value as at the conversion date. | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SetupBalanceDetails
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**balance** | **double** | The opening balances of the account. Debits are positive, credits are negative values | [optional]
7+
**currency_code** | **string** | The currency of the balance (Not required for base currency) | [optional]
8+
**currency_rate** | **double** | (Optional) Exchange rate to base currency when money is spent or received. If not specified, XE rate for the day is applied | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SetupConversionBalances
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**account_code** | **string** | The account code for a account | [optional]
7+
**balance** | **double** | The opening balances of the account. Debits are positive, credits are negative values | [optional]
8+
**balance_details** | [**\XeroAPI\XeroPHP\Models\Accounting\SetupBalanceDetails[]**](SetupBalanceDetails.md) | An array to specify multiple currency balances of an account | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SetupConversionDate
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**month** | **float** | The month the organisation starts using Xero. Value is an integer between 1 and 12 | [optional]
7+
**year** | **float** | The year the organisation starts using Xero. Value is an integer greater than 2006 | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

lib/AccountingObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1717
*
18-
* OpenAPI spec version: 2.4.0
18+
* OpenAPI spec version: 2.4.1
1919
* Contact: api@xero.com
2020
* Generated by: https://openapi-generator.tech
2121
* OpenAPI Generator version: 4.2.3

0 commit comments

Comments
 (0)