1 | <?php |
||
10 | class YourMembershipClient |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Guzzle Client |
||
15 | * @var \GuzzleHttp\Client |
||
16 | */ |
||
17 | private $client; |
||
18 | /** |
||
19 | * YourMembership Request |
||
20 | * @var Request |
||
21 | */ |
||
22 | private $request; |
||
23 | |||
24 | 2 | public function __construct(Client $client, string $apiKey, string $saPasscode) |
|
32 | /** |
||
33 | * Makes API Call to YourMembership |
||
34 | * @method makeCall |
||
35 | * @author PA |
||
36 | * @author AB http://github.com/chefboyarsky |
||
37 | * @date 2017-01-10 |
||
38 | * @param string $method Your Membership API Method |
||
39 | * @param array $arguments Your Membership API Call Arguments |
||
40 | * @return Response |
||
41 | * @throws YourMembershipResponseException If the response from the API has an error |
||
42 | */ |
||
43 | 2 | public function makeCall(string $method, array $arguments = []) |
|
58 | |||
59 | /** |
||
60 | * Creates a new Session with YourMembership |
||
61 | * @method createSession |
||
62 | * @author PA |
||
63 | * @date 2017-01-10 |
||
64 | * @return string SessionID |
||
65 | */ |
||
66 | 2 | private function createSession() : string |
|
72 | |||
73 | } |
||
74 |