| @@ 157-164 (lines=8) @@ | ||
| 154 | * @param int $ordercode |
|
| 155 | * @return array |
|
| 156 | */ |
|
| 157 | public function getByOrder($ordercode) |
|
| 158 | { |
|
| 159 | $response = $this->client->get(self::ENDPOINT, [ |
|
| 160 | \GuzzleHttp\RequestOptions::QUERY => compact('ordercode'), |
|
| 161 | ]); |
|
| 162 | ||
| 163 | return $response->Transactions; |
|
| 164 | } |
|
| 165 | ||
| 166 | /** |
|
| 167 | * Get the transactions that occured on a given date. |
|
| @@ 172-181 (lines=10) @@ | ||
| 169 | * @param \DateTimeInterface|string $date |
|
| 170 | * @return array |
|
| 171 | */ |
|
| 172 | public function getByDate($date) |
|
| 173 | { |
|
| 174 | $date = $this->formatDate($date); |
|
| 175 | ||
| 176 | $response = $this->client->get(self::ENDPOINT, [ |
|
| 177 | \GuzzleHttp\RequestOptions::QUERY => compact('date'), |
|
| 178 | ]); |
|
| 179 | ||
| 180 | return $response->Transactions; |
|
| 181 | } |
|
| 182 | ||
| 183 | /** |
|
| 184 | * Get the transactions that were cleared on a given date. |
|
| @@ 189-198 (lines=10) @@ | ||
| 186 | * @param \DateTimeInterface|string $date |
|
| 187 | * @return array |
|
| 188 | */ |
|
| 189 | public function getByClearanceDate($clearancedate) |
|
| 190 | { |
|
| 191 | $clearancedate = $this->formatDate($clearancedate); |
|
| 192 | ||
| 193 | $response = $this->client->get(self::ENDPOINT, [ |
|
| 194 | \GuzzleHttp\RequestOptions::QUERY => compact('clearancedate'), |
|
| 195 | ]); |
|
| 196 | ||
| 197 | return $response->Transactions; |
|
| 198 | } |
|
| 199 | ||
| 200 | /** |
|
| 201 | * Format a date object to string. |
|