@@ 27-36 (lines=10) @@ | ||
24 | * |
|
25 | * @return $this |
|
26 | */ |
|
27 | public function search(MatchingSlotsSearchParameters $search): self |
|
28 | { |
|
29 | // Set HTTP params |
|
30 | $this->type = 'post'; |
|
31 | $this->endpoint = '/availability/matchingslots' . '?' . $this->getQuery(); |
|
32 | $this->params = $search; |
|
33 | $this->response = MatchingSlotList::class; |
|
34 | ||
35 | return $this; |
|
36 | } |
|
37 | ||
38 | /** |
|
39 | * Navigate results of a matching slots search |
@@ 48-57 (lines=10) @@ | ||
45 | * |
|
46 | * @return $this |
|
47 | */ |
|
48 | public function create(Webhook $webhook): self |
|
49 | { |
|
50 | // Set HTTP params |
|
51 | $this->type = 'post'; |
|
52 | $this->endpoint = '/webhooks' . '?' . $this->getQuery(); |
|
53 | $this->params = $webhook; |
|
54 | $this->response = Webhook::class; |
|
55 | ||
56 | return $this; |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * Retrieve a webhook |
|
@@ 66-76 (lines=11) @@ | ||
63 | * |
|
64 | * @return $this |
|
65 | */ |
|
66 | public function __invoke(string $webhook_id) |
|
67 | { |
|
68 | $this->webhook_id = $webhook_id; |
|
69 | ||
70 | // Set HTTP params |
|
71 | $this->type = 'get'; |
|
72 | $this->endpoint = '/webhooks/' . $webhook_id . '?' . $this->getQuery(); |
|
73 | $this->response = Webhook::class; |
|
74 | ||
75 | return $this; |
|
76 | } |
|
77 | ||
78 | /** |
|
79 | * Delete a webhook |
@@ 42-51 (lines=10) @@ | ||
39 | * @param Customer $customer |
|
40 | * @return Customers |
|
41 | */ |
|
42 | public function create(Customer $customer): self |
|
43 | { |
|
44 | // Set HTTP params |
|
45 | $this->type = 'post'; |
|
46 | $this->endpoint = '/customers' . '?' . $this->getQuery(); |
|
47 | $this->params = $customer; |
|
48 | $this->response = Customer::class; |
|
49 | ||
50 | return $this; |
|
51 | } |
|
52 | } |
|
53 |