Skip to content

Commit

Permalink
Merge pull request #783 from davidwindell/allocation-patch
Browse files Browse the repository at this point in the history
Add AppliedAmount to payment types for Invoice endpoint
  • Loading branch information
calcinai authored Nov 26, 2020
2 parents df527aa + b54463f commit c69271b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/XeroPHP/Models/Accounting/CreditNote.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ public static function getProperties()
'Allocations' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\CreditNote\\Allocation', true, true],
'BrandingThemeID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
'HasAttachments' => [false, self::PROPERTY_TYPE_BOOLEAN, null, false, false],
'AppliedAmount' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false]
];
}

Expand Down Expand Up @@ -653,6 +654,14 @@ public function addAllocation(Allocation $value)

return $this;
}

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

/**
* @return string
Expand Down
9 changes: 9 additions & 0 deletions src/XeroPHP/Models/Accounting/Overpayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ public static function getProperties()
'Allocations' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Overpayment\\Allocation', true, true],
'Payments' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Payment', true, false],
'HasAttachments' => [false, self::PROPERTY_TYPE_BOOLEAN, null, false, false],
'AppliedAmount' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false]
];
}

Expand Down Expand Up @@ -603,6 +604,14 @@ public function addAllocation(Allocation $value)
return $this;
}

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

/**
* @return Payment[]|Remote\Collection
*/
Expand Down
9 changes: 9 additions & 0 deletions src/XeroPHP/Models/Accounting/Prepayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ public static function getProperties()
'RemainingCredit' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
'Allocations' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Prepayment\\Allocation', true, true],
'HasAttachments' => [false, self::PROPERTY_TYPE_BOOLEAN, null, false, false],
'AppliedAmount' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false]
];
}

Expand Down Expand Up @@ -596,6 +597,14 @@ public function addAllocation(Allocation $value)
return $this;
}

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

/**
* @return bool
*/
Expand Down

0 comments on commit c69271b

Please sign in to comment.