Skip to content

Commit

Permalink
update SDK from api-definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
rebilly-machine-user authored Mar 18, 2024
1 parent eafe237 commit bcf927d
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 717 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-cows-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add interimOnly for ChangeQuote Rebilly/api-definitions#1819
5 changes: 5 additions & 0 deletions .changeset/popular-trains-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Simplify service credential Rebilly/api-definitions#1831
5 changes: 2 additions & 3 deletions src/Api/ServiceCredentialsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Rebilly\Sdk\Collection;
use Rebilly\Sdk\Model\GoogleSpreadsheet;
use Rebilly\Sdk\Model\PatchServiceCredentialRequest;
use Rebilly\Sdk\Model\PostServiceCredentialRequest;
use Rebilly\Sdk\Model\ServiceCredential;
use Rebilly\Sdk\Model\ServiceCredentialFactory;
use Rebilly\Sdk\Paginator;
Expand All @@ -35,15 +34,15 @@ public function __construct(protected ?ClientInterface $client)
*/
public function create(
string $type,
PostServiceCredentialRequest $postServiceCredentialRequest,
ServiceCredential $serviceCredential,
): ServiceCredential {
$pathParams = [
'{type}' => $type,
];

$uri = str_replace(array_keys($pathParams), array_values($pathParams), '/service-credentials/{type}');

$request = new Request('POST', $uri, body: Utils::jsonEncode($postServiceCredentialRequest));
$request = new Request('POST', $uri, body: Utils::jsonEncode($serviceCredential));
$response = $this->client->send($request);
$data = Utils::jsonDecode((string) $response->getBody(), true);

Expand Down
Loading

0 comments on commit bcf927d

Please sign in to comment.