From 3437cba042ee695dde71497dad2fa2c538ecae32 Mon Sep 17 00:00:00 2001 From: Anatoliy Poloz Date: Tue, 16 Jun 2026 22:25:04 +0300 Subject: [PATCH] payoff list --- .../Payouts/PayOffsListResponseData.php | 36 +++++++ .../Payouts/PayoffListItemData.php | 58 +++++++++++ src/Data/Shared/PaginationData.php | 30 ++++++ .../Payouts/GetPayoffsRequest.php | 96 +++++++++++++++++++ 4 files changed, 220 insertions(+) create mode 100644 src/Data/NominalAccounts/Payouts/PayOffsListResponseData.php create mode 100644 src/Data/NominalAccounts/Payouts/PayoffListItemData.php create mode 100644 src/Data/Shared/PaginationData.php create mode 100644 src/Requests/NominalAccounts/Payouts/GetPayoffsRequest.php diff --git a/src/Data/NominalAccounts/Payouts/PayOffsListResponseData.php b/src/Data/NominalAccounts/Payouts/PayOffsListResponseData.php new file mode 100644 index 0000000..8df2203 --- /dev/null +++ b/src/Data/NominalAccounts/Payouts/PayOffsListResponseData.php @@ -0,0 +1,36 @@ +accountNumber; + + if ($this->limit !== null) { + $params['limit'] = $this->limit; + } + + if ($this->offset !== null) { + $params['offset'] = $this->offset; + } + + if ($this->channel !== null) { + $params['channel'] = $this->channel; + } + + if ($this->status !== null) { + $params['status'] = $this->status; + } + + if ($this->createdDateFrom !== null) { + $params['createdDateFrom'] = $this->createdDateFrom; + } + + if ($this->createdDateTo !== null) { + $params['createdDateTo'] = $this->createdDateTo; + } + + if ($this->updatedDateFrom !== null) { + $params['updatedDateFrom'] = $this->updatedDateFrom; + } + + if ($this->updatedDateTo !== null) { + $params['updatedDateTo'] = $this->updatedDateTo; + } + + return '/api/na/jp/v1/payoffs?' . http_build_query($params); + } + + public function createDtoFromResponse(Response $response): PayOffsListResponseData + { + return PayOffsListResponseData::from($response->json()); + } +}