Skip to content

Commit

Permalink
Merge pull request #352 from XeroAPI/xero-php-5.0.0
Browse files Browse the repository at this point in the history
Build from OAS 4.0.0
  • Loading branch information
manishT72 committed Jun 18, 2024
2 parents d4db4ce + 649b761 commit b382f78
Show file tree
Hide file tree
Showing 22 changed files with 143 additions and 23 deletions.
4 changes: 2 additions & 2 deletions docs/v2/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4062,7 +4062,7 @@
"Class" : {
"type" : "string",
"description" : "Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)",
"enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE" ]
"enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "IGNITE", "GROW", "COMPREHENSIVE" ]
},
"Edition" : {
"type" : "string",
Expand Down Expand Up @@ -6099,7 +6099,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>4.0.0</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
<li data-group="Accounting" data-name="createAccount" class="">
<a href="#api-Accounting-createAccount">createAccount</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/appstore/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="AppStore"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>4.0.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="AppStore"><a href="#api-AppStore">Methods</a></li>
<li data-group="AppStore" data-name="getSubscription" class="">
<a href="#api-AppStore-getSubscription">getSubscription</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,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.0.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>5.0.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
17 changes: 16 additions & 1 deletion docs/v2/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,21 @@
"title" : "",
"type" : "object",
"properties" : {
"SendWithObject" : {
"type" : "boolean",
"description" : "Boolean flag to determines whether the file is sent with the document it is attached to on client facing communications. Note- The SendWithObject element is only returned when using /Associations/{ObjectId} endpoint.",
"example" : true
},
"Name" : {
"type" : "string",
"description" : "The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint.",
"example" : "Test.pdf"
},
"Size" : {
"type" : "integer",
"description" : "The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint.",
"example" : 12357
},
"FileId" : {
"type" : "string",
"description" : "The unique identifier of the file",
Expand Down Expand Up @@ -1154,7 +1169,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.0.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>5.0.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
2 changes: 1 addition & 1 deletion docs/v2/finance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2733,7 +2733,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Finance"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>4.0.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="Finance"><a href="#api-Finance">Methods</a></li>
<li data-group="Finance" data-name="getAccountingActivityAccountUsage" class="">
<a href="#api-Finance-getAccountingActivityAccountUsage">getAccountingActivityAccountUsage</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/payroll_au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3411,7 +3411,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.0.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
<li data-group="PayrollAu" data-name="approveLeaveApplication" class="">
<a href="#api-PayrollAu-approveLeaveApplication">approveLeaveApplication</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/payroll_nz/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3842,7 +3842,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollNz"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>4.0.0</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="PayrollNz"><a href="#api-PayrollNz">Methods</a></li>
<li data-group="PayrollNz" data-name="approveTimesheet" class="">
<a href="#api-PayrollNz-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/payroll_uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3509,7 +3509,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollUk"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>4.0.0</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="PayrollUk"><a href="#api-PayrollUk">Methods</a></li>
<li data-group="PayrollUk" data-name="approveTimesheet" class="">
<a href="#api-PayrollUk-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Project"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>4.0.0</li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>5.0.0</li>
<li class="nav-header" data-group="Project"><a href="#api-Project">Methods</a></li>
<li data-group="Project" data-name="createProject" class="">
<a href="#api-Project-createProject">createProject</a>
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/AccountingApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/AppStoreApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* These endpoints are for Xero Partners to interact with the App Store Billing platform
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/AssetApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/FilesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* These endpoints are specific to Xero Files API
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/FinanceApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital.
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/IdentityApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* These endpoints are related to managing authentication tokens and identity for Xero API
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/PayrollAuApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* This is the Xero Payroll API for orgs in Australia region.
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/PayrollNzApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* This is the Xero Payroll API for orgs in the NZ region.
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/PayrollUkApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* This is the Xero Payroll API for orgs in the UK region.
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/ProjectApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* This is the Xero Projects API
*
* OpenAPI spec version: 3.0.3
* OpenAPI spec version: 4.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.4.0
Expand Down
6 changes: 3 additions & 3 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = '[xero-php-oauth2 (4.0.0)]';
protected $userAgent = '[xero-php-oauth2 (5.0.0)]';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -696,8 +696,8 @@ public static function toDebugReport()
$report = 'PHP SDK (XeroAPI\XeroPHP) Debug Report:' . PHP_EOL;
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' OpenAPI Spec Version: 3.0.3' . PHP_EOL;
$report .= ' SDK Package Version: 4.0.0' . PHP_EOL;
$report .= ' OpenAPI Spec Version: 4.0.0' . PHP_EOL;
$report .= ' SDK Package Version: 5.0.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
6 changes: 6 additions & 0 deletions lib/Models/Accounting/Organisation.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ public function getModelName()
const MODEL_CLASS_NON_GST_CASHBOOK = 'NON_GST_CASHBOOK';
const MODEL_CLASS_ULTIMATE = 'ULTIMATE';
const MODEL_CLASS_LITE = 'LITE';
const MODEL_CLASS_IGNITE = 'IGNITE';
const MODEL_CLASS_GROW = 'GROW';
const MODEL_CLASS_COMPREHENSIVE = 'COMPREHENSIVE';
const EDITION_BUSINESS = 'BUSINESS';
const EDITION_PARTNER = 'PARTNER';

Expand Down Expand Up @@ -531,6 +534,9 @@ public function getClassAllowableValues()
self::MODEL_CLASS_NON_GST_CASHBOOK,
self::MODEL_CLASS_ULTIMATE,
self::MODEL_CLASS_LITE,
self::MODEL_CLASS_IGNITE,
self::MODEL_CLASS_GROW,
self::MODEL_CLASS_COMPREHENSIVE,
];
}

Expand Down
99 changes: 99 additions & 0 deletions lib/Models/File/Association.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class Association implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $openAPITypes = [
'send_with_object' => 'bool',
'name' => 'string',
'size' => 'int',
'file_id' => 'string',
'object_id' => 'string',
'object_group' => '\XeroAPI\XeroPHP\Models\File\ObjectGroup',
Expand All @@ -70,6 +73,9 @@ class Association implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $openAPIFormats = [
'send_with_object' => null,
'name' => null,
'size' => null,
'file_id' => 'uuid',
'object_id' => 'uuid',
'object_group' => null,
Expand Down Expand Up @@ -103,6 +109,9 @@ public static function openAPIFormats()
* @var string[]
*/
protected static $attributeMap = [
'send_with_object' => 'SendWithObject',
'name' => 'Name',
'size' => 'Size',
'file_id' => 'FileId',
'object_id' => 'ObjectId',
'object_group' => 'ObjectGroup',
Expand All @@ -115,6 +124,9 @@ public static function openAPIFormats()
* @var string[]
*/
protected static $setters = [
'send_with_object' => 'setSendWithObject',
'name' => 'setName',
'size' => 'setSize',
'file_id' => 'setFileId',
'object_id' => 'setObjectId',
'object_group' => 'setObjectGroup',
Expand All @@ -127,6 +139,9 @@ public static function openAPIFormats()
* @var string[]
*/
protected static $getters = [
'send_with_object' => 'getSendWithObject',
'name' => 'getName',
'size' => 'getSize',
'file_id' => 'getFileId',
'object_id' => 'getObjectId',
'object_group' => 'getObjectGroup',
Expand Down Expand Up @@ -193,6 +208,9 @@ public function getModelName()
*/
public function __construct(array $data = null)
{
$this->container['send_with_object'] = isset($data['send_with_object']) ? $data['send_with_object'] : null;
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['size'] = isset($data['size']) ? $data['size'] : null;
$this->container['file_id'] = isset($data['file_id']) ? $data['file_id'] : null;
$this->container['object_id'] = isset($data['object_id']) ? $data['object_id'] : null;
$this->container['object_group'] = isset($data['object_group']) ? $data['object_group'] : null;
Expand Down Expand Up @@ -223,6 +241,87 @@ public function valid()
}


/**
* Gets send_with_object
*
* @return bool|null
*/
public function getSendWithObject()
{
return $this->container['send_with_object'];
}

/**
* Sets send_with_object
*
* @param bool|null $send_with_object Boolean flag to determines whether the file is sent with the document it is attached to on client facing communications. Note- The SendWithObject element is only returned when using /Associations/{ObjectId} endpoint.
*
* @return $this
*/
public function setSendWithObject($send_with_object)
{

$this->container['send_with_object'] = $send_with_object;

return $this;
}



/**
* Gets name
*
* @return string|null
*/
public function getName()
{
return $this->container['name'];
}

/**
* Sets name
*
* @param string|null $name The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint.
*
* @return $this
*/
public function setName($name)
{

$this->container['name'] = $name;

return $this;
}



/**
* Gets size
*
* @return int|null
*/
public function getSize()
{
return $this->container['size'];
}

/**
* Sets size
*
* @param int|null $size The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint.
*
* @return $this
*/
public function setSize($size)
{

$this->container['size'] = $size;

return $this;
}



/**
* Gets file_id
*
Expand Down

0 comments on commit b382f78

Please sign in to comment.