@@ -223,7 +223,7 @@ $request = new Components\WebhookCheckoutCreatedPayload(
223
223
],
224
224
slug: '<value >',
225
225
name: '<value >',
226
- organizationId: '< value > ',
226
+ organizationId: '1dbfc517-0bbf-4301-9ba8-555ca42b9737 ',
227
227
properties: new Components\CustomFieldDateProperties(),
228
228
modifiedAt: Utils\Utils::parseDateTime('2023-05-31T07:21:27.686Z'),
229
229
),
@@ -247,9 +247,10 @@ $request = new Components\WebhookCheckoutCreatedPayload(
247
247
customerEmail: '<value >',
248
248
customerIpAddress: '<value >',
249
249
customerBillingAddress: new Components\Address(
250
- country: 'Guatemala ',
250
+ country: 'SE ',
251
251
),
252
252
customerTaxId: '<id >',
253
+ customerExternalId: '<id >',
253
254
discount: new Components\CheckoutDiscountPercentageOnceForeverDuration(
254
255
duration: Components\DiscountDuration::Repeating,
255
256
type: Components\DiscountType::Percentage,
@@ -298,7 +299,11 @@ $sdk = Polar\Polar::builder()
298
299
)
299
300
->build();
300
301
301
- $request = new Operations\ExternalOrganizationsListRequest();
302
+ $request = new Operations\ExternalOrganizationsListRequest(
303
+ organizationId: [
304
+ '1dbfc517-0bbf-4301-9ba8-555ca42b9737',
305
+ ],
306
+ );
302
307
303
308
$responses = $sdk->externalOrganizations->list(
304
309
request: $request
@@ -311,6 +316,35 @@ foreach ($responses as $response) {
311
316
}
312
317
}
313
318
```
319
+
320
+ ### Per-Operation Security Schemes
321
+
322
+ Some operations in this SDK require the security scheme to be specified at the request level. For example:
323
+ ``` php
324
+ declare(strict_types=1);
325
+
326
+ require 'vendor/autoload.php';
327
+
328
+ use Polar;
329
+ use Polar\Models\Operations;
330
+
331
+ $sdk = Polar\Polar::builder()->build();
332
+
333
+
334
+ $requestSecurity = new Operations\CustomerPortalBenefitGrantsGetSecurity(
335
+ customerSession: '<YOUR _BEARER_TOKEN_HERE >',
336
+ );
337
+
338
+ $response = $sdk->customerPortal->benefitGrants->get(
339
+ security: $requestSecurity,
340
+ id: '<value >'
341
+
342
+ );
343
+
344
+ if ($response->customerBenefitGrant !== null) {
345
+ // handle response
346
+ }
347
+ ```
314
348
<!-- End Authentication [security] -->
315
349
316
350
<!-- Start Available Resources and Operations [operations] -->
@@ -319,11 +353,6 @@ foreach ($responses as $response) {
319
353
<details open >
320
354
<summary >Available methods</summary >
321
355
322
- ### [ advertisements] ( docs/sdks/advertisements/README.md )
323
-
324
- * [ get] ( docs/sdks/advertisements/README.md#get ) - Get Campaign
325
- * [ list] ( docs/sdks/advertisements/README.md#list ) - List Campaigns
326
-
327
356
### [ benefits] ( docs/sdks/benefits/README.md )
328
357
329
358
* [ create] ( docs/sdks/benefits/README.md#create ) - Create Benefit
@@ -359,7 +388,11 @@ foreach ($responses as $response) {
359
388
360
389
#### [ customerPortal->customers] ( docs/sdks/polarcustomers/README.md )
361
390
391
+ * [ addPaymentMethod] ( docs/sdks/polarcustomers/README.md#addpaymentmethod ) - Add Customer Payment Method
392
+ * [ deletePaymentMethod] ( docs/sdks/polarcustomers/README.md#deletepaymentmethod ) - Delete Customer Payment Method
362
393
* [ get] ( docs/sdks/polarcustomers/README.md#get ) - Get Customer
394
+ * [ getPaymentMethods] ( docs/sdks/polarcustomers/README.md#getpaymentmethods ) - Get Customer Payment Methods
395
+ * [ update] ( docs/sdks/polarcustomers/README.md#update ) - Update Customer
363
396
364
397
#### [ customerPortal->downloadables] ( docs/sdks/downloadables/README.md )
365
398
@@ -395,9 +428,14 @@ foreach ($responses as $response) {
395
428
396
429
* [ create] ( docs/sdks/customers/README.md#create ) - Create Customer
397
430
* [ delete] ( docs/sdks/customers/README.md#delete ) - Delete Customer
431
+ * [ deleteExternal] ( docs/sdks/customers/README.md#deleteexternal ) - Delete Customer by External ID
398
432
* [ get] ( docs/sdks/customers/README.md#get ) - Get Customer
433
+ * [ getExternal] ( docs/sdks/customers/README.md#getexternal ) - Get Customer by External ID
434
+ * [ getState] ( docs/sdks/customers/README.md#getstate ) - Get Customer State
435
+ * [ getStateExternal] ( docs/sdks/customers/README.md#getstateexternal ) - Get Customer State by External ID
399
436
* [ list] ( docs/sdks/customers/README.md#list ) - List Customers
400
437
* [ update] ( docs/sdks/customers/README.md#update ) - Update Customer
438
+ * [ updateExternal] ( docs/sdks/customers/README.md#updateexternal ) - Update Customer by External ID
401
439
402
440
### [ customerSessions] ( docs/sdks/customersessions/README.md )
403
441
@@ -539,7 +577,11 @@ $sdk = Polar\Polar::builder()
539
577
)
540
578
->build();
541
579
542
- $request = new Operations\ExternalOrganizationsListRequest();
580
+ $request = new Operations\ExternalOrganizationsListRequest(
581
+ organizationId: [
582
+ '1dbfc517-0bbf-4301-9ba8-555ca42b9737',
583
+ ],
584
+ );
543
585
544
586
$responses = $sdk->externalOrganizations->list(
545
587
request: $request
@@ -593,7 +635,11 @@ $sdk = Polar\Polar::builder()
593
635
->build();
594
636
595
637
try {
596
- $request = new Operations\ExternalOrganizationsListRequest();
638
+ $request = new Operations\ExternalOrganizationsListRequest(
639
+ organizationId: [
640
+ '1dbfc517-0bbf-4301-9ba8-555ca42b9737',
641
+ ],
642
+ );
597
643
598
644
$responses = $sdk->externalOrganizations->list(
599
645
request: $request
@@ -637,13 +683,17 @@ use Polar;
637
683
use Polar\Models\Operations;
638
684
639
685
$sdk = Polar\Polar::builder()
640
- ->setServer('sandbox'
686
+ ->setServer('sandbox')
641
687
->setSecurity(
642
688
'<YOUR _BEARER_TOKEN_HERE >'
643
689
)
644
690
->build();
645
691
646
- $request = new Operations\ExternalOrganizationsListRequest();
692
+ $request = new Operations\ExternalOrganizationsListRequest(
693
+ organizationId: [
694
+ '1dbfc517-0bbf-4301-9ba8-555ca42b9737',
695
+ ],
696
+ );
647
697
648
698
$responses = $sdk->externalOrganizations->list(
649
699
request: $request
@@ -675,7 +725,11 @@ $sdk = Polar\Polar::builder()
675
725
)
676
726
->build();
677
727
678
- $request = new Operations\ExternalOrganizationsListRequest();
728
+ $request = new Operations\ExternalOrganizationsListRequest(
729
+ organizationId: [
730
+ '1dbfc517-0bbf-4301-9ba8-555ca42b9737',
731
+ ],
732
+ );
679
733
680
734
$responses = $sdk->externalOrganizations->list(
681
735
request: $request
0 commit comments