| @@ 20-52 (lines=33) @@ | ||
| 17 | * @method Customer mapResponse(ApiResponseInterface $response) |
|
| 18 | * @method Customer mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
|
| 19 | */ |
|
| 20 | class MeDeleteRequest extends AbstractDeleteRequest |
|
| 21 | { |
|
| 22 | protected $resultClass = Customer::class; |
|
| 23 | ||
| 24 | /** |
|
| 25 | * @param int $version |
|
| 26 | * @param Context $context |
|
| 27 | */ |
|
| 28 | public function __construct($version, Context $context = null) |
|
| 29 | { |
|
| 30 | parent::__construct(MeEndpoint::endpoint(), null, $version, $context); |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param int $version |
|
| 35 | * @param Context $context |
|
| 36 | * @return static |
|
| 37 | */ |
|
| 38 | public static function ofVersion($version, Context $context = null) |
|
| 39 | { |
|
| 40 | return new static($version, $context); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @return string |
|
| 45 | * @internal |
|
| 46 | */ |
|
| 47 | protected function getPath() |
|
| 48 | { |
|
| 49 | return (string)$this->getEndpoint() . $this->getParamString(); |
|
| 50 | } |
|
| 51 | } |
|
| 52 | ||
| @@ 22-54 (lines=33) @@ | ||
| 19 | * @method Project mapResponse(ApiResponseInterface $response) |
|
| 20 | * @method Project mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
|
| 21 | */ |
|
| 22 | class ProjectUpdateRequest extends AbstractUpdateRequest |
|
| 23 | { |
|
| 24 | protected $resultClass = Project::class; |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @param string $version |
|
| 28 | * @param array $actions |
|
| 29 | * @param Context $context |
|
| 30 | */ |
|
| 31 | public function __construct($version, array $actions = [], Context $context = null) |
|
| 32 | { |
|
| 33 | parent::__construct(new JsonEndpoint(''), null, $version, $actions, $context); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @param int $version |
|
| 38 | * @param Context $context |
|
| 39 | * @return static |
|
| 40 | */ |
|
| 41 | public static function ofVersion($version, Context $context = null) |
|
| 42 | { |
|
| 43 | return new static($version, [], $context); |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * @return string |
|
| 48 | * @internal |
|
| 49 | */ |
|
| 50 | protected function getPath() |
|
| 51 | { |
|
| 52 | return (string)$this->getEndpoint() . $this->getParamString(); |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||