@@ -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); |
@@ -6,30 +6,30 @@ |
||
6 | 6 | |
7 | 7 | class CreateRevolutTokensTable extends Migration |
8 | 8 | { |
9 | - /** |
|
10 | - * Run the migrations. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function up() |
|
15 | - { |
|
16 | - Schema::create(config('revolut.tokens_table'), function(Blueprint $table) { |
|
9 | + /** |
|
10 | + * Run the migrations. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function up() |
|
15 | + { |
|
16 | + Schema::create(config('revolut.tokens_table'), function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->string('type'); |
19 | - $table->mediumText('value'); |
|
20 | - $table->boolean('is_encrypted')->default(false); |
|
19 | + $table->mediumText('value'); |
|
20 | + $table->boolean('is_encrypted')->default(false); |
|
21 | 21 | $table->timestamp('expires_at')->nullable(); |
22 | - $table->timestamp('created_at')->useCurrent(); |
|
23 | - }); |
|
24 | - } |
|
22 | + $table->timestamp('created_at')->useCurrent(); |
|
23 | + }); |
|
24 | + } |
|
25 | 25 | |
26 | - /** |
|
27 | - * Reverse the migrations. |
|
28 | - * |
|
29 | - * @return void |
|
30 | - */ |
|
31 | - public function down() |
|
32 | - { |
|
33 | - Schema::dropIfExists(config('revolut.tokens_table')); |
|
34 | - } |
|
26 | + /** |
|
27 | + * Reverse the migrations. |
|
28 | + * |
|
29 | + * @return void |
|
30 | + */ |
|
31 | + public function down() |
|
32 | + { |
|
33 | + Schema::dropIfExists(config('revolut.tokens_table')); |
|
34 | + } |
|
35 | 35 | } |