-
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.
updated the sdk according to the last specs (#10)
- Loading branch information
1 parent
26cd4eb
commit 08bb697
Showing
23 changed files
with
434 additions
and
102 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file has been auto generated by Jane, | ||
* | ||
* Do no edit it directly. | ||
*/ | ||
|
||
namespace JoliCode\Harvest\Api\Endpoint; | ||
|
||
class UpdateCompany extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint | ||
{ | ||
/** | ||
* Updates the company setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns a company object and a 200 OK response code if the call succeeded. | ||
* | ||
* @param \JoliCode\Harvest\Api\Model\CompanyPatchBody $payload json payload | ||
*/ | ||
public function __construct(\JoliCode\Harvest\Api\Model\CompanyPatchBody $payload) | ||
{ | ||
$this->body = $payload; | ||
} | ||
|
||
use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'PATCH'; | ||
} | ||
|
||
public function getUri(): string | ||
{ | ||
return '/company'; | ||
} | ||
|
||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array | ||
{ | ||
return $this->getSerializedBody($serializer); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* | ||
* | ||
* @return \JoliCode\Harvest\Api\Model\Company|\JoliCode\Harvest\Api\Model\Error|null | ||
*/ | ||
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType) | ||
{ | ||
if (200 === $status) { | ||
return $serializer->deserialize($body, 'JoliCode\\Harvest\\Api\\Model\\Company', 'json'); | ||
} | ||
|
||
return $serializer->deserialize($body, 'JoliCode\\Harvest\\Api\\Model\\Error', 'json'); | ||
} | ||
} |
Oops, something went wrong.