| Total Complexity | 5 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class EnvelopeLabelsEndpoint extends ResourceEndpoint |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @param Envelope|string $envelope |
||
| 18 | */ |
||
| 19 | public function __construct(EnvelopesEndpoint $parent, $envelope) |
||
| 20 | { |
||
| 21 | parent::__construct($parent, '/{envelope}/labels', Label::class, ['envelope' => $envelope]); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return Collection<Label> |
||
| 26 | */ |
||
| 27 | public function all(): Collection |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param array<string> $body |
||
| 34 | * @return Collection<Label> |
||
| 35 | */ |
||
| 36 | public function set(array $body): Collection |
||
| 37 | { |
||
| 38 | return $this->createCollectionResource($this->putRequest('', ['json' => $body]), $this->getResourceClass()); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param Label|string $label |
||
| 43 | */ |
||
| 44 | public function add($label): void |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param Label|string $label |
||
| 51 | */ |
||
| 52 | public function remove($label): void |
||
| 55 | } |
||
| 56 | } |
||
| 57 |