| @@ 29-38 (lines=10) @@ | ||
| 26 | return $this->client->get(sprintf('%s/%s', self::ENDPOINT, $pipelineKey)); |
|
| 27 | } |
|
| 28 | ||
| 29 | public function create(array $pipeline) |
|
| 30 | { |
|
| 31 | if (!isset($pipeline['name']) || !isset($pipeline['description'])) { |
|
| 32 | throw new \InvalidArgumentException('Missing required fields.'); |
|
| 33 | } |
|
| 34 | ||
| 35 | return $this->client->put(self::ENDPOINT, [ |
|
| 36 | 'form_params' => $pipeline, |
|
| 37 | ]); |
|
| 38 | } |
|
| 39 | ||
| 40 | public function delete($pipelineKey) |
|
| 41 | { |
|
| @@ 44-53 (lines=10) @@ | ||
| 41 | return $paginator->getResults(); |
|
| 42 | } |
|
| 43 | ||
| 44 | public function create($pipelineKey, array $box) |
|
| 45 | { |
|
| 46 | if (!isset($box['name'])) { |
|
| 47 | throw new \InvalidArgumentException('Missing required fields.'); |
|
| 48 | } |
|
| 49 | ||
| 50 | return $this->client->put(sprintf('pipelines/%s/%s', $pipelineKey, self::ENDPOINT), [ |
|
| 51 | 'form_params' => $box, |
|
| 52 | ]); |
|
| 53 | } |
|
| 54 | ||
| 55 | public function delete($boxKey) |
|
| 56 | { |
|