-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add transaction allocations to credit memo
- Loading branch information
Boyd Bueno de Mesquita
committed
Sep 18, 2022
1 parent
6cd1f9b
commit 6ec1783
Showing
4 changed files
with
256 additions
and
0 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,146 @@ | ||
<?php | ||
/** | ||
* This source file is proprietary and part of Rebilly. | ||
* | ||
* (c) Rebilly SRL | ||
* Rebilly Ltd. | ||
* Rebilly Inc. | ||
* | ||
* @see https://www.rebilly.com | ||
*/ | ||
|
||
namespace Rebilly\Entities; | ||
|
||
use Rebilly\Rest\Entity; | ||
|
||
/** | ||
* Class AllocationCollection. | ||
*/ | ||
final class AllocationCollection extends Entity | ||
{ | ||
/** | ||
* @return TransactionAllocation[] | ||
*/ | ||
public function getTransactions() | ||
{ | ||
return $this->getAttribute('transactions'); | ||
} | ||
|
||
/** | ||
* @param TransactionAllocation[] $value | ||
* | ||
* @return $this | ||
*/ | ||
public function setTransactions($value) | ||
{ | ||
return $this->setAttribute('transactions', $value); | ||
} | ||
|
||
/** | ||
* @param float $value | ||
* | ||
* @return $this | ||
*/ | ||
public function setUnitPrice($value) | ||
{ | ||
return $this->setAttribute('unitPrice', $value); | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getQuantity() | ||
{ | ||
return $this->getAttribute('quantity'); | ||
} | ||
|
||
/** | ||
* @param int $value | ||
* | ||
* @return $this | ||
*/ | ||
public function setQuantity($value) | ||
{ | ||
return $this->setAttribute('quantity', $value); | ||
} | ||
|
||
/** | ||
* @return string|null | ||
*/ | ||
public function getInvoiceItemId() | ||
{ | ||
return $this->getAttribute('invoiceItemId'); | ||
} | ||
|
||
/** | ||
* @param string|null $value | ||
* | ||
* @return $this | ||
*/ | ||
public function setInvoiceItemId($value) | ||
{ | ||
return $this->setAttribute('invoiceItemId', $value); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getDescription() | ||
{ | ||
return $this->getAttribute('description'); | ||
} | ||
|
||
/** | ||
* @param string $value | ||
* | ||
* @return $this | ||
*/ | ||
public function setDescription($value) | ||
{ | ||
return $this->setAttribute('description', $value); | ||
} | ||
|
||
/** | ||
* @return float | ||
*/ | ||
public function getPrice() | ||
{ | ||
return $this->getAttribute('price'); | ||
} | ||
|
||
/** | ||
* @return string|null | ||
*/ | ||
public function getProductId() | ||
{ | ||
return $this->getAttribute('productId'); | ||
} | ||
|
||
/** | ||
* @param string|null $value | ||
* | ||
* @return $this | ||
*/ | ||
public function setProductId($value) | ||
{ | ||
return $this->setAttribute('productId', $value); | ||
} | ||
|
||
/** | ||
* @return string|null | ||
*/ | ||
public function getPlanId() | ||
{ | ||
return $this->getAttribute('planId'); | ||
} | ||
|
||
/** | ||
* @param string|null $value | ||
* | ||
* @return $this | ||
*/ | ||
public function setPlanId($value) | ||
{ | ||
return $this->setAttribute('planId', $value); | ||
} | ||
} |
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
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,88 @@ | ||
<?php | ||
/** | ||
* This source file is proprietary and part of Rebilly. | ||
* | ||
* (c) Rebilly SRL | ||
* Rebilly Ltd. | ||
* Rebilly Inc. | ||
* | ||
* @see https://www.rebilly.com | ||
*/ | ||
|
||
namespace Rebilly\Entities; | ||
|
||
use Rebilly\Rest\Entity; | ||
|
||
/** | ||
* Class TransactionAllocation. | ||
*/ | ||
final class TransactionAllocation extends Entity | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function getCreditMemoId() | ||
{ | ||
return $this->getAttribute('creditMemoId'); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getTransactionId() | ||
{ | ||
return $this->getAttribute('transactionId'); | ||
} | ||
|
||
/** | ||
* @param string | ||
* | ||
* @return $this | ||
*/ | ||
public function setTransactionId($value) | ||
{ | ||
return $this->setAttribute('transactionId', $value); | ||
} | ||
|
||
/** | ||
* @return float | ||
*/ | ||
public function getAmount() | ||
{ | ||
return $this->getAttribute('amount'); | ||
} | ||
|
||
/** | ||
* @param float $value | ||
* | ||
* @return $this | ||
*/ | ||
public function setAmount($value) | ||
{ | ||
return $this->setAttribute('amount', $value); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getCurrency() | ||
{ | ||
return $this->getAttribute('currency'); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getCreatedTime() | ||
{ | ||
return $this->getAttribute('createdTime'); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getUpdatedTime() | ||
{ | ||
return $this->getAttribute('updatedTime'); | ||
} | ||
} |
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