Skip to content

Commit

Permalink
Models @ d6a4620
Browse files Browse the repository at this point in the history
  • Loading branch information
calcinai committed Apr 11, 2016
1 parent d6a4620 commit 6902195
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 45 deletions.
55 changes: 28 additions & 27 deletions src/XeroPHP/Models/Accounting/CreditNote.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ class CreditNote extends Remote\Object
use PDFTrait;
use AttachmentTrait;

/**
* An optional field to store a reference
*
* @property string Reference
*/

/**
* See Credit Note Types
*
Expand Down Expand Up @@ -98,11 +92,18 @@ class CreditNote extends Remote\Object
*/

/**
* The user friendly unique identifier for a credit note e.g. CN 1001
* ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate
* from your Organisation Invoice Settings)
*
* @property string CreditNoteNumber
*/

/**
* ACCRECCREDIT only – additional reference number
*
* @property string Reference
*/

/**
* boolean to indicate if a credit note has been sent to a contact via the Xero app
*
Expand Down Expand Up @@ -214,7 +215,6 @@ public static function getSupportedMethods()
public static function getProperties()
{
return array(
'Reference' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'Type' => array (false, self::PROPERTY_TYPE_ENUM, null, false, false),
'Contact' => array (false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Contact', false, false),
'Date' => array (false, self::PROPERTY_TYPE_DATE, '\\DateTimeInterface', false, false),
Expand All @@ -229,6 +229,7 @@ public static function getProperties()
'FullyPaidOnDate' => array (false, self::PROPERTY_TYPE_DATE, '\\DateTimeInterface', false, false),
'CreditNoteID' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'CreditNoteNumber' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'Reference' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'SentToContact' => array (false, self::PROPERTY_TYPE_BOOLEAN, null, false, false),
'CurrencyRate' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'RemainingCredit' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
Expand All @@ -243,25 +244,6 @@ public static function isPageable()
return false;
}

/**
* @return string
*/
public function getReference()
{
return $this->_data['Reference'];
}

/**
* @param string $value
* @return CreditNote
*/
public function setReference($value)
{
$this->propertyUpdated('Reference', $value);
$this->_data['Reference'] = $value;
return $this;
}

/**
* @return string
*/
Expand Down Expand Up @@ -532,6 +514,25 @@ public function setCreditNoteNumber($value)
return $this;
}

/**
* @return string
*/
public function getReference()
{
return $this->_data['Reference'];
}

/**
* @param string $value
* @return CreditNote
*/
public function setReference($value)
{
$this->propertyUpdated('Reference', $value);
$this->_data['Reference'] = $value;
return $this;
}

/**
* @return bool
*/
Expand Down
6 changes: 3 additions & 3 deletions src/XeroPHP/Models/Accounting/Overpayment/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LineItem extends Remote\Object
* amount or quantity) can be created by specifying just a <Description> element that contains at least
* 1 character
*
* @property float Description
* @property string Description
*/

/**
Expand Down Expand Up @@ -132,7 +132,7 @@ public static function getSupportedMethods()
public static function getProperties()
{
return array(
'Description' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'Description' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'Quantity' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'UnitAmount' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'AccountCode' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
Expand All @@ -149,7 +149,7 @@ public static function isPageable()
}

/**
* @return float
* @return string
*/
public function getDescription()
{
Expand Down
6 changes: 3 additions & 3 deletions src/XeroPHP/Models/Accounting/Prepayment/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LineItem extends Remote\Object
* amount or quantity) can be created by specifying just a <Description> element that contains at least
* 1 character
*
* @property float Description
* @property string Description
*/

/**
Expand Down Expand Up @@ -132,7 +132,7 @@ public static function getSupportedMethods()
public static function getProperties()
{
return array(
'Description' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'Description' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'Quantity' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'UnitAmount' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'AccountCode' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
Expand All @@ -149,7 +149,7 @@ public static function isPageable()
}

/**
* @return float
* @return string
*/
public function getDescription()
{
Expand Down
8 changes: 4 additions & 4 deletions src/XeroPHP/Models/Accounting/PurchaseOrder/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LineItem extends Remote\Object
* The description of the line item. A line item can be created with only a description (i.e no unit
* amount or quantity)
*
* @property float Description
* @property string Description
*/

/**
Expand Down Expand Up @@ -147,7 +147,7 @@ public static function getSupportedMethods()
public static function getProperties()
{
return array(
'Description' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'Description' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'Quantity' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'UnitAmount' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'ItemCode' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
Expand All @@ -167,15 +167,15 @@ public static function isPageable()
}

/**
* @return float
* @return string
*/
public function getDescription()
{
return $this->_data['Description'];
}

/**
* @param float $value
* @param string $value
* @return LineItem
*/
public function setDescription($value)
Expand Down
8 changes: 4 additions & 4 deletions src/XeroPHP/Models/Accounting/Receipt/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LineItem extends Remote\Object
* amount or quantity) can be created by specifying just a <Description> element that contains at least
* 1 character
*
* @property float Description
* @property string Description
*/

/**
Expand Down Expand Up @@ -133,7 +133,7 @@ public static function getSupportedMethods()
public static function getProperties()
{
return array(
'Description' => array (true, self::PROPERTY_TYPE_FLOAT, null, false, false),
'Description' => array (true, self::PROPERTY_TYPE_STRING, null, false, false),
'UnitAmount' => array (true, self::PROPERTY_TYPE_FLOAT, null, false, false),
'AccountCode' => array (true, self::PROPERTY_TYPE_STRING, null, false, false),
'Quantity' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
Expand All @@ -150,15 +150,15 @@ public static function isPageable()
}

/**
* @return float
* @return string
*/
public function getDescription()
{
return $this->_data['Description'];
}

/**
* @param float $value
* @param string $value
* @return LineItem
*/
public function setDescription($value)
Expand Down
8 changes: 4 additions & 4 deletions src/XeroPHP/Models/Accounting/RepeatingInvoice/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LineItem extends Remote\Object
* amount or quantity) can be created by specifying just a <Description> element that contains at least
* 1 character
*
* @property float Description
* @property string Description
*/

/**
Expand Down Expand Up @@ -144,7 +144,7 @@ public static function getSupportedMethods()
public static function getProperties()
{
return array(
'Description' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'Description' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'Quantity' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
'UnitAmount' => array (false, self::PROPERTY_TYPE_FLOAT, null, false, false),
'ItemCode' => array (false, self::PROPERTY_TYPE_STRING, null, false, false),
Expand All @@ -163,15 +163,15 @@ public static function isPageable()
}

/**
* @return float
* @return string
*/
public function getDescription()
{
return $this->_data['Description'];
}

/**
* @param float $value
* @param string $value
* @return LineItem
*/
public function setDescription($value)
Expand Down

0 comments on commit 6902195

Please sign in to comment.