Skip to content

Commit

Permalink
update SDK from api-definitions (#706)
Browse files Browse the repository at this point in the history
Co-authored-by: rebilly-machine-user <[email protected]>
  • Loading branch information
rebilly-machine-user and rebilly-machine-user authored Jul 16, 2024
1 parent 7bd40cd commit 05f9635
Show file tree
Hide file tree
Showing 17 changed files with 738 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-singers-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be): Add device ID to Mercadopago Rebilly/rebilly#6313
5 changes: 5 additions & 0 deletions .changeset/chilled-turtles-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

build(deps): merge passing FE dependabot PRs Rebilly/rebilly#6511
5 changes: 5 additions & 0 deletions .changeset/early-pigs-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

refactor(api-definitions): Remove orderId from Subscription and OneTimeSale yaml files Rebilly/rebilly#6331
5 changes: 5 additions & 0 deletions .changeset/hip-maps-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be): Add PostPaymentInstrumentNameInquiry endpoint Rebilly/rebilly#6399
5 changes: 5 additions & 0 deletions .changeset/rude-stingrays-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(api-definitions): Fix StorefrontAccount schema Rebilly/rebilly#6476
5 changes: 5 additions & 0 deletions .changeset/smooth-rings-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(api-definitions): Add disputes resource to Data Exports Rebilly/rebilly#6175
5 changes: 5 additions & 0 deletions .changeset/two-stingrays-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(api-definitions): Fix incorrect links. Rebilly/rebilly#6415
20 changes: 20 additions & 0 deletions src/Api/PaymentInstrumentsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Rebilly\Sdk\Model\PatchPaymentInstrumentRequest;
use Rebilly\Sdk\Model\PaymentInstrument;
use Rebilly\Sdk\Model\PaymentInstrumentFactory;
use Rebilly\Sdk\Model\PaymentInstrumentNameInquiry;
use Rebilly\Sdk\Model\PostPaymentInstrumentRequest;
use Rebilly\Sdk\Paginator;

Expand Down Expand Up @@ -140,6 +141,25 @@ public function getAllPaginator(
);
}

public function nameInquiry(
string $id,
PaymentInstrumentNameInquiry $paymentInstrumentNameInquiry,
): PaymentInstrumentNameInquiry {
$pathParams = [
'{id}' => $id,
];

$uri = str_replace(array_keys($pathParams), array_values($pathParams), '/payment-instruments/{id}/name-inquiry');

$request = new Request('POST', $uri, headers: [
'Accept' => 'application/json',
], body: Utils::jsonEncode($paymentInstrumentNameInquiry));
$response = $this->client->send($request);
$data = Utils::jsonDecode((string) $response->getBody(), true);

return PaymentInstrumentNameInquiry::from($data);
}

public function update(
string $id,
PatchPaymentInstrumentRequest $patchPaymentInstrumentRequest,
Expand Down
1 change: 1 addition & 0 deletions src/Model/DataExportFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static function from(array $data = []): DataExport
return match ($data['resource']) {
'amlChecks' => AmlChecksDataExport::from($data),
'customers' => CustomersDataExport::from($data),
'disputes' => DisputesDataExport::from($data),
'invoiceItems' => InvoiceItemsDataExport::from($data),
'invoices' => InvoicesDataExport::from($data),
'revenueAudit' => RevenueAuditDataExport::from($data),
Expand Down
Loading

0 comments on commit 05f9635

Please sign in to comment.