@@ -18,19 +18,19 @@ discard block |
||
| 18 | 18 | * @see https://revolut-engineering.github.io/api-docs/business-api/#counterparties-add-revolut-counterparty Official API documentation |
| 19 | 19 | */ |
| 20 | 20 | public function create(array $json) |
| 21 | - { |
|
| 21 | + { |
|
| 22 | 22 | return $this->client->post(self::ENDPOINT, ['json' => $json]); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * Get all counterparties |
|
| 26 | + * Get all counterparties |
|
| 27 | 27 | * |
| 28 | 28 | * @see https://revolut-engineering.github.io/api-docs/business-api/#counterparties-get-counterparties Official API documentation |
| 29 | - * @return array |
|
| 30 | - */ |
|
| 31 | - public function all() |
|
| 32 | - { |
|
| 33 | - return $this->client->get('/counterparties'); |
|
| 29 | + * @return array |
|
| 30 | + */ |
|
| 31 | + public function all() |
|
| 32 | + { |
|
| 33 | + return $this->client->get('/counterparties'); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | * @return array |
| 42 | 42 | */ |
| 43 | 43 | public function get(string $id) |
| 44 | - { |
|
| 45 | - return $this->client->get(self::ENDPOINT . '/' . $id); |
|
| 44 | + { |
|
| 45 | + return $this->client->get(self::ENDPOINT . '/' . $id); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | * @return void |
| 54 | 54 | */ |
| 55 | 55 | public function delete(string $id) : void |
| 56 | - { |
|
| 57 | - $this->client->delete(self::ENDPOINT . '/' . $id); |
|
| 56 | + { |
|
| 57 | + $this->client->delete(self::ENDPOINT . '/' . $id); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -15,43 +15,43 @@ |
||
| 15 | 15 | const ENDPOINT = '/pay'; |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * @see https://revolut-engineering.github.io/api-docs/business-api/#payments-create-payment Official API documentation |
|
| 19 | - */ |
|
| 20 | - public function create(array $json) |
|
| 21 | - { |
|
| 22 | - return $this->client->post(self::ENDPOINT, ['json' => $json]); |
|
| 23 | - } |
|
| 18 | + * @see https://revolut-engineering.github.io/api-docs/business-api/#payments-create-payment Official API documentation |
|
| 19 | + */ |
|
| 20 | + public function create(array $json) |
|
| 21 | + { |
|
| 22 | + return $this->client->post(self::ENDPOINT, ['json' => $json]); |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * Schedule a payment for up to 30 days |
|
| 27 | - * |
|
| 28 | - * @see https://revolut-engineering.github.io/api-docs/business-api/#payments-schedule-payment Official API documentation |
|
| 29 | - * @param array $json The request parameters |
|
| 30 | - * @param string $date a future ISO date (Up to 30 days) |
|
| 31 | - * @return array |
|
| 32 | - */ |
|
| 33 | - public function schedule(array $json, string $date) |
|
| 34 | - { |
|
| 35 | - return $this->create(array_merge($json, ['schedule_for' => $date])); |
|
| 36 | - } |
|
| 25 | + /** |
|
| 26 | + * Schedule a payment for up to 30 days |
|
| 27 | + * |
|
| 28 | + * @see https://revolut-engineering.github.io/api-docs/business-api/#payments-schedule-payment Official API documentation |
|
| 29 | + * @param array $json The request parameters |
|
| 30 | + * @param string $date a future ISO date (Up to 30 days) |
|
| 31 | + * @return array |
|
| 32 | + */ |
|
| 33 | + public function schedule(array $json, string $date) |
|
| 34 | + { |
|
| 35 | + return $this->create(array_merge($json, ['schedule_for' => $date])); |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * Cancel a scheduled payment |
|
| 40 | - * |
|
| 41 | - * @see https://revolut-engineering.github.io/api-docs/business-api/#payments-cancel-payment Official API documentation |
|
| 42 | - * @param string $id The ID of the payment in UUID format |
|
| 43 | - * @return void |
|
| 44 | - */ |
|
| 45 | - public function cancel(string $id) : void |
|
| 46 | - { |
|
| 47 | - $this->client->delete('/transaction/' . $id); |
|
| 48 | - } |
|
| 38 | + /** |
|
| 39 | + * Cancel a scheduled payment |
|
| 40 | + * |
|
| 41 | + * @see https://revolut-engineering.github.io/api-docs/business-api/#payments-cancel-payment Official API documentation |
|
| 42 | + * @param string $id The ID of the payment in UUID format |
|
| 43 | + * @return void |
|
| 44 | + */ |
|
| 45 | + public function cancel(string $id) : void |
|
| 46 | + { |
|
| 47 | + $this->client->delete('/transaction/' . $id); |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * @return \tbclla\Revolut\Builders\PaymentBuilder |
|
| 52 | - */ |
|
| 53 | - public function build() |
|
| 54 | - { |
|
| 55 | - return new PaymentBuilder($this, $this->client->generateRequestId()); |
|
| 56 | - } |
|
| 50 | + /** |
|
| 51 | + * @return \tbclla\Revolut\Builders\PaymentBuilder |
|
| 52 | + */ |
|
| 53 | + public function build() |
|
| 54 | + { |
|
| 55 | + return new PaymentBuilder($this, $this->client->generateRequestId()); |
|
| 56 | + } |
|
| 57 | 57 | } |
@@ -23,8 +23,8 @@ |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * @return \tbclla\Revolut\Builders\ExchangeBuilder |
|
| 27 | - */ |
|
| 26 | + * @return \tbclla\Revolut\Builders\ExchangeBuilder |
|
| 27 | + */ |
|
| 28 | 28 | public function build() |
| 29 | 29 | { |
| 30 | 30 | return new ExchangeBuilder($this, $this->client->generateRequestId()); |
@@ -15,18 +15,18 @@ |
||
| 15 | 15 | const ENDPOINT = '/transfer'; |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * @see https://revolut-engineering.github.io/api-docs/business-api/#transfers-create-transfer Official API documentation |
|
| 19 | - */ |
|
| 20 | - public function create(array $json) |
|
| 21 | - { |
|
| 22 | - return $this->client->post(self::ENDPOINT, ['json' => $json]); |
|
| 23 | - } |
|
| 18 | + * @see https://revolut-engineering.github.io/api-docs/business-api/#transfers-create-transfer Official API documentation |
|
| 19 | + */ |
|
| 20 | + public function create(array $json) |
|
| 21 | + { |
|
| 22 | + return $this->client->post(self::ENDPOINT, ['json' => $json]); |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * @return \tbclla\Revolut\Builders\TransferBuilder |
|
| 27 | - */ |
|
| 28 | - public function build() |
|
| 29 | - { |
|
| 30 | - return new TransferBuilder($this, $this->client->generateRequestId()); |
|
| 31 | - } |
|
| 25 | + /** |
|
| 26 | + * @return \tbclla\Revolut\Builders\TransferBuilder |
|
| 27 | + */ |
|
| 28 | + public function build() |
|
| 29 | + { |
|
| 30 | + return new TransferBuilder($this, $this->client->generateRequestId()); |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -58,8 +58,8 @@ |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | - * @return \tbclla\Revolut\Builders\PaymentDraftBuilder |
|
| 62 | - */ |
|
| 61 | + * @return \tbclla\Revolut\Builders\PaymentDraftBuilder |
|
| 62 | + */ |
|
| 63 | 63 | public function build() |
| 64 | 64 | { |
| 65 | 65 | return new PaymentDraftBuilder($this); |