-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #767 from Healyhatman/AU-tracking-cat-settings
Fix for Tracking Category in settings
- Loading branch information
Showing
3 changed files
with
282 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<?php | ||
|
||
namespace XeroPHP\Models\PayrollAU\Setting; | ||
|
||
use XeroPHP\Remote; | ||
|
||
class EmployeeGroup extends Remote\Model | ||
{ | ||
/** | ||
* Xero tracking category identifier. e.g c56b19ef-75bf-45e8-98a4-e699a96609f7. | ||
* | ||
* @property string TrackingCategoryID | ||
*/ | ||
|
||
/** | ||
* Name of tracking category. | ||
* | ||
* @property string TrackingCategoryName | ||
*/ | ||
|
||
/** | ||
* Get the resource uri of the class (Contacts) etc. | ||
* | ||
* @return string | ||
*/ | ||
public static function getResourceURI() | ||
{ | ||
return 'TrackingCategories'; | ||
} | ||
|
||
/** | ||
* Get the root node name. Just the unqualified classname. | ||
* | ||
* @return string | ||
*/ | ||
public static function getRootNodeName() | ||
{ | ||
return 'TrackingCategory'; | ||
} | ||
|
||
/** | ||
* Get the guid property. | ||
* | ||
* @return string | ||
*/ | ||
public static function getGUIDProperty() | ||
{ | ||
return 'TrackingCategoryID'; | ||
} | ||
|
||
/** | ||
* Get the stem of the API (core.xro) etc. | ||
* | ||
* @return string|null | ||
*/ | ||
public static function getAPIStem() | ||
{ | ||
return Remote\URL::API_PAYROLL; | ||
} | ||
|
||
/** | ||
* Get the supported methods. | ||
*/ | ||
public static function getSupportedMethods() | ||
{ | ||
return [ | ||
]; | ||
} | ||
|
||
/** | ||
* Get the properties of the object. Indexed by constants | ||
* [0] - Mandatory | ||
* [1] - Type | ||
* [2] - PHP type | ||
* [3] - Is an Array | ||
* [4] - Saves directly. | ||
* | ||
* @return array | ||
*/ | ||
public static function getProperties() | ||
{ | ||
return [ | ||
'TrackingCategoryID' => [false, self::PROPERTY_TYPE_STRING, null, false, false], | ||
'TrackingCategoryName' => [false, self::PROPERTY_TYPE_STRING, null, false, false], | ||
]; | ||
} | ||
|
||
public static function isPageable() | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getTrackingCategoryID() | ||
{ | ||
return $this->_data['TrackingCategoryID']; | ||
} | ||
|
||
/** | ||
* @param string $value | ||
* | ||
* @return TrackingCategory | ||
*/ | ||
public function setTrackingCategoryID($value) | ||
{ | ||
$this->propertyUpdated('TrackingCategoryID', $value); | ||
$this->_data['TrackingCategoryID'] = $value; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getTrackingCategoryName() | ||
{ | ||
return $this->_data['TrackingCategoryName']; | ||
} | ||
|
||
/** | ||
* @param string $value | ||
* | ||
* @return TrackingCategory | ||
*/ | ||
public function setTrackingCategoryName($value) | ||
{ | ||
$this->propertyUpdated('TrackingCategoryName', $value); | ||
$this->_data['TrackingCategoryName'] = $value; | ||
|
||
return $this; | ||
} | ||
} |
134 changes: 134 additions & 0 deletions
134
src/XeroPHP/Models/PayrollAU/Setting/TimesheetCategory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<?php | ||
|
||
namespace XeroPHP\Models\PayrollAU\Setting; | ||
|
||
use XeroPHP\Remote; | ||
|
||
class TimesheetCategory extends Remote\Model | ||
{ | ||
/** | ||
* Xero tracking category identifier. e.g c56b19ef-75bf-45e8-98a4-e699a96609f7. | ||
* | ||
* @property string TrackingCategoryID | ||
*/ | ||
|
||
/** | ||
* Name of tracking category. | ||
* | ||
* @property string TrackingCategoryName | ||
*/ | ||
|
||
/** | ||
* Get the resource uri of the class (Contacts) etc. | ||
* | ||
* @return string | ||
*/ | ||
public static function getResourceURI() | ||
{ | ||
return 'TrackingCategories'; | ||
} | ||
|
||
/** | ||
* Get the root node name. Just the unqualified classname. | ||
* | ||
* @return string | ||
*/ | ||
public static function getRootNodeName() | ||
{ | ||
return 'TrackingCategory'; | ||
} | ||
|
||
/** | ||
* Get the guid property. | ||
* | ||
* @return string | ||
*/ | ||
public static function getGUIDProperty() | ||
{ | ||
return 'TrackingCategoryID'; | ||
} | ||
|
||
/** | ||
* Get the stem of the API (core.xro) etc. | ||
* | ||
* @return string|null | ||
*/ | ||
public static function getAPIStem() | ||
{ | ||
return Remote\URL::API_PAYROLL; | ||
} | ||
|
||
/** | ||
* Get the supported methods. | ||
*/ | ||
public static function getSupportedMethods() | ||
{ | ||
return [ | ||
]; | ||
} | ||
|
||
/** | ||
* Get the properties of the object. Indexed by constants | ||
* [0] - Mandatory | ||
* [1] - Type | ||
* [2] - PHP type | ||
* [3] - Is an Array | ||
* [4] - Saves directly. | ||
* | ||
* @return array | ||
*/ | ||
public static function getProperties() | ||
{ | ||
return [ | ||
'TrackingCategoryID' => [false, self::PROPERTY_TYPE_STRING, null, false, false], | ||
'TrackingCategoryName' => [false, self::PROPERTY_TYPE_STRING, null, false, false], | ||
]; | ||
} | ||
|
||
public static function isPageable() | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getTrackingCategoryID() | ||
{ | ||
return $this->_data['TrackingCategoryID']; | ||
} | ||
|
||
/** | ||
* @param string $value | ||
* | ||
* @return TrackingCategory | ||
*/ | ||
public function setTrackingCategoryID($value) | ||
{ | ||
$this->propertyUpdated('TrackingCategoryID', $value); | ||
$this->_data['TrackingCategoryID'] = $value; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getTrackingCategoryName() | ||
{ | ||
return $this->_data['TrackingCategoryName']; | ||
} | ||
|
||
/** | ||
* @param string $value | ||
* | ||
* @return TrackingCategory | ||
*/ | ||
public function setTrackingCategoryName($value) | ||
{ | ||
$this->propertyUpdated('TrackingCategoryName', $value); | ||
$this->_data['TrackingCategoryName'] = $value; | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters