forked from inspirum/balikobot-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequesterInterface.php
More file actions
39 lines (35 loc) · 930 Bytes
/
Copy pathRequesterInterface.php
File metadata and controls
39 lines (35 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace Inspirum\Balikobot\Contracts;
use Psr\Http\Message\ResponseInterface;
interface RequesterInterface
{
/**
* Call API
*
* @param string $version
* @param string $request
* @param string $shipper
* @param array<mixed,mixed> $data
* @param bool $shouldHaveStatus
*
* @return array<mixed,mixed>
*
* @throws \Inspirum\Balikobot\Contracts\ExceptionInterface
*/
public function call(
string $version,
string $shipper,
string $request,
array $data = [],
bool $shouldHaveStatus = true
): array;
/**
* Get API response
*
* @param string $url
* @param array<mixed,mixed> $data
*
* @return \Psr\Http\Message\ResponseInterface
*/
public function request(string $url, array $data = []): ResponseInterface;
}