diff --git a/src/Client/SubResource/TransactionSubResource.php b/src/Client/SubResource/TransactionSubResource.php index d884234..ad7c6e2 100644 --- a/src/Client/SubResource/TransactionSubResource.php +++ b/src/Client/SubResource/TransactionSubResource.php @@ -44,6 +44,27 @@ public function create( } + /** + * Updates an existing transaction + * + * @param Attribute\Id\OrganizationId $organizationId Use reseller org id if reseller + */ + public function update( + Attribute\Id\OrganizationId $organizationId, + Attribute\Id\LocationId $locationId, + Model\Transaction $transaction + ): Model\Transaction + { + $uri = UriBuilder::build('organizations/%s/locations/%s/transactions/', [ + $organizationId->getValue(), + $locationId->getValue(), + ]); + + return $this->getHttpClient() + ->makeModelRequest('put', $uri, Model\Transaction::class, $transaction); + } + + /** * Finds a single transaction * diff --git a/src/Model/Transaction.php b/src/Model/Transaction.php index 5057bb4..68b2ceb 100644 --- a/src/Model/Transaction.php +++ b/src/Model/Transaction.php @@ -10,7 +10,7 @@ class Transaction extends AbstractModel { - + /** * @var Attribute\Id\OrganizationId */