Skip to content

Commit

Permalink
chore: update SDK from api-definitions (#650)
Browse files Browse the repository at this point in the history
Co-authored-by: rebilly-machine-user <[email protected]>
Co-authored-by: Arif Kurkchi <[email protected]>
  • Loading branch information
3 people authored Oct 18, 2023
1 parent fa64a50 commit 95687ba
Show file tree
Hide file tree
Showing 23 changed files with 824 additions and 207 deletions.
5 changes: 5 additions & 0 deletions .changeset/light-rocks-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add Restrict to exclusive application coupon restriction type Rebilly/api-definitions#1639
5 changes: 5 additions & 0 deletions .changeset/smart-stingrays-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add quote taxes Rebilly/api-definitions#1635
5 changes: 5 additions & 0 deletions .changeset/tasty-glasses-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add SecureTrading notificationPassword credential Rebilly/api-definitions#1632
21 changes: 21 additions & 0 deletions src/Api/QuotesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use GuzzleHttp\Utils;
use Psr\Http\Message\StreamInterface;
use Rebilly\Sdk\Collection;
use Rebilly\Sdk\Model\PatchQuote;
use Rebilly\Sdk\Model\Quote;
use Rebilly\Sdk\Model\QuoteTimeline;
use Rebilly\Sdk\Paginator;
Expand Down Expand Up @@ -313,6 +314,26 @@ public function issue(
return Quote::from($data);
}

/**
* @return Quote
*/
public function patch(
string $id,
PatchQuote $patchQuote,
): Quote {
$pathParams = [
'{id}' => $id,
];

$uri = str_replace(array_keys($pathParams), array_values($pathParams), '/quotes/{id}');

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

return Quote::from($data);
}

/**
* @return Quote
*/
Expand Down
Loading

0 comments on commit 95687ba

Please sign in to comment.