diff --git a/src/XeroPHP/Models/Accounting/Invoice/LineItem.php b/src/XeroPHP/Models/Accounting/Invoice/LineItem.php index 038c0ef6..1f60db11 100644 --- a/src/XeroPHP/Models/Accounting/Invoice/LineItem.php +++ b/src/XeroPHP/Models/Accounting/Invoice/LineItem.php @@ -81,6 +81,13 @@ class LineItem extends Remote\Model * @property string DiscountRate */ + /** + * Discount amount being applied to a line item (only supported on ACCREC invoices – ACC PAY + * invoices and credit notes in Xero do not support discounts. + * + * @property float DiscountAmount + */ + /** * Get the resource uri of the class (Contacts) etc. * @@ -154,6 +161,7 @@ public static function getProperties() 'LineAmount' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false], 'Tracking' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\TrackingCategory', true, false], 'DiscountRate' => [false, self::PROPERTY_TYPE_STRING, null, false, false], + 'DiscountAmount' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false], ]; } @@ -395,4 +403,25 @@ public function setDiscountRate($value) return $this; } + + /** + * @return float + */ + public function getDiscountAmount() + { + return $this->_data['DiscountAmount']; + } + + /** + * @param float $value + * + * @return LineItem + */ + public function setDiscountAmount($value) + { + $this->propertyUpdated('DiscountAmount', $value); + $this->_data['DiscountAmount'] = $value; + + return $this; + } }