Total Complexity | 5 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class PaymentDrafts |
||
6 | { |
||
7 | const ENDPOINT = 'payment-drafts'; |
||
8 | |||
9 | /** |
||
10 | * @var Client |
||
11 | */ |
||
12 | private $client; |
||
13 | |||
14 | /** |
||
15 | * Payments constructor. |
||
16 | * @param Client $client |
||
17 | */ |
||
18 | public function __construct(Client $client) |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @see https://revolut-engineering.github.io/api-docs/#business-api-business-api-payment-drafts-create-a-payment-draft |
||
25 | * |
||
26 | * @param array $json |
||
27 | * @return mixed |
||
28 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
29 | */ |
||
30 | public function create(array $json) |
||
31 | { |
||
32 | return $this->client->post(self::ENDPOINT, $json); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @see https://revolut-engineering.github.io/api-docs/#business-api-get-payment-drafts |
||
37 | * |
||
38 | * @return mixed |
||
39 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
40 | */ |
||
41 | public function all() |
||
42 | { |
||
43 | return $this->client->get(self::ENDPOINT); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @see https://revolut-engineering.github.io/api-docs/#business-api-business-api-get-payment-drafts-get-payment-draft-by-id |
||
48 | * |
||
49 | * @param string $id |
||
50 | * @return mixed |
||
51 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
52 | */ |
||
53 | public function get(string $id) |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @see https://revolut-engineering.github.io/api-docs/#business-api-business-api-get-payment-drafts-delete-payment-draft |
||
60 | * |
||
61 | * @param string $id |
||
62 | * @return mixed |
||
63 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
64 | */ |
||
65 | public function delete($id) |
||
68 | } |
||
69 | } |
||
70 |