-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from jolicode/feature/openapi-update
updated the openapi specification
- Loading branch information
Showing
60 changed files
with
2,000 additions
and
412 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
generated/Endpoint/ListAssignedTeammatesForSpecificUser.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of JoliCode's Harvest PHP API project. | ||
* | ||
* (c) JoliCode <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace JoliCode\Harvest\Api\Endpoint; | ||
|
||
class ListAssignedTeammatesForSpecificUser extends \JoliCode\Harvest\Api\Runtime\Client\BaseEndpoint implements \JoliCode\Harvest\Api\Runtime\Client\Endpoint | ||
{ | ||
use \JoliCode\Harvest\Api\Runtime\Client\EndpointTrait; | ||
protected $userId; | ||
|
||
/** | ||
* Returns a list of assigned teammates for the user identified by USER_ID. The USER_ID must belong to a user that is a Manager, if not, a 422 Unprocessable Entity status code will be returned. | ||
* | ||
* @param array $queryParameters { | ||
* | ||
* @var int $page The page number to use in pagination. For instance, if you make a list request and receive 100 records, your subsequent call can include page=2 to retrieve the next page of the list. (Default: 1) | ||
* @var int $per_page The number of records to return per page. Can range between 1 and 2000. (Default: 100) | ||
* } | ||
*/ | ||
public function __construct(string $userId, array $queryParameters = []) | ||
{ | ||
$this->userId = $userId; | ||
$this->queryParameters = $queryParameters; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'GET'; | ||
} | ||
|
||
public function getUri(): string | ||
{ | ||
return str_replace(['{userId}'], [$this->userId], '/users/{userId}/teammates'); | ||
} | ||
|
||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array | ||
{ | ||
return [[], null]; | ||
} | ||
|
||
public function getExtraHeaders(): array | ||
{ | ||
return ['Accept' => ['application/json']]; | ||
} | ||
|
||
public function getAuthenticationScopes(): array | ||
{ | ||
return ['BearerAuth', 'AccountAuth']; | ||
} | ||
|
||
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver | ||
{ | ||
$optionsResolver = parent::getQueryOptionsResolver(); | ||
$optionsResolver->setDefined(['page', 'per_page']); | ||
$optionsResolver->setRequired([]); | ||
$optionsResolver->setDefaults([]); | ||
$optionsResolver->setAllowedTypes('page', ['int']); | ||
$optionsResolver->setAllowedTypes('per_page', ['int']); | ||
|
||
return $optionsResolver; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* | ||
* @return \JoliCode\Harvest\Api\Model\Teammates|\JoliCode\Harvest\Api\Model\Error|null | ||
*/ | ||
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) | ||
{ | ||
if ((null === $contentType) === false && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) { | ||
return $serializer->deserialize($body, 'JoliCode\\Harvest\\Api\\Model\\Teammates', 'json'); | ||
} | ||
if (false !== mb_strpos($contentType, 'application/json')) { | ||
return $serializer->deserialize($body, 'JoliCode\\Harvest\\Api\\Model\\Error', 'json'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.