diff --git a/src/ZeroNine/Requests/RegisterSales/GetRegisterSale.php b/src/ZeroNine/Requests/RegisterSales/GetRegisterSale.php new file mode 100644 index 0000000..5996158 --- /dev/null +++ b/src/ZeroNine/Requests/RegisterSales/GetRegisterSale.php @@ -0,0 +1,21 @@ +registerSaleId}"; + } + + public function __construct( + protected string $registerSaleId, + ) { + } +} diff --git a/src/ZeroNine/Requests/RegisterSales/ListRegisterSales.php b/src/ZeroNine/Requests/RegisterSales/ListRegisterSales.php new file mode 100644 index 0000000..7b8137e --- /dev/null +++ b/src/ZeroNine/Requests/RegisterSales/ListRegisterSales.php @@ -0,0 +1,40 @@ + $this->since, + 'outlet_id' => $this->outletId, + 'status' => $this->status, + 'page' => $this->page, + 'page_size' => $this->pageSize, + ]); + } +} diff --git a/src/ZeroNine/Resources/RegisterSales.php b/src/ZeroNine/Resources/RegisterSales.php index ab77c20..103361c 100644 --- a/src/ZeroNine/Resources/RegisterSales.php +++ b/src/ZeroNine/Resources/RegisterSales.php @@ -5,6 +5,8 @@ use Saloon\Http\Response; use SimpleSquid\Vend\Common\BaseResource; use SimpleSquid\Vend\ZeroNine\Requests\RegisterSales\CreateUpdateRegisterSale; +use SimpleSquid\Vend\ZeroNine\Requests\RegisterSales\GetRegisterSale; +use SimpleSquid\Vend\ZeroNine\Requests\RegisterSales\ListRegisterSales; class RegisterSales extends BaseResource { @@ -16,4 +18,23 @@ public function createUpdateRegisterSale( ): Response { return $this->connector->send(new CreateUpdateRegisterSale($payload)); } + + public function getRegisterSale( + string $registerSaleId, + ): Response { + return $this->connector->send(new GetRegisterSale($registerSaleId)); + } + + /** + * @param null|string[] $status + */ + public function listRegisterSales( + ?string $since = null, + ?string $outletId = null, + ?array $status = null, + ?int $page = null, + ?int $pageSize = null, + ): Response { + return $this->connector->send(new ListRegisterSales($since, $outletId, $status, $page, $pageSize)); + } }