Skip to content

Commit 83076b6

Browse files
Update generated code from sdk-codegen canary 4ca93fe42cb6ae75781f43c6c57544236fd62365
1 parent 4dcf053 commit 83076b6

102 files changed

Lines changed: 2889 additions & 1798 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎init.php‎

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@
180180
require __DIR__ . '/lib/EventData/V2OrchestratedCommerceAgreementCreatedEventData.php';
181181
require __DIR__ . '/lib/EventData/V2OrchestratedCommerceAgreementPartiallyConfirmedEventData.php';
182182
require __DIR__ . '/lib/EventData/V2OrchestratedCommerceAgreementTerminatedEventData.php';
183+
require __DIR__ . '/lib/EventData/V2PaymentsOffSessionPaymentAttemptFailedEventData.php';
184+
require __DIR__ . '/lib/EventData/V2PaymentsOffSessionPaymentFailedEventData.php';
185+
require __DIR__ . '/lib/EventData/V2PaymentsOffSessionPaymentSucceededEventData.php';
183186
require __DIR__ . '/lib/Events/V1AccountApplicationAuthorizedEvent.php';
184187
require __DIR__ . '/lib/Events/V1AccountApplicationAuthorizedEventNotification.php';
185188
require __DIR__ . '/lib/Events/V1AccountApplicationDeauthorizedEvent.php';
@@ -198,6 +201,12 @@
198201
require __DIR__ . '/lib/Events/V1ApplicationFeeRefundUpdatedEventNotification.php';
199202
require __DIR__ . '/lib/Events/V1ApplicationFeeRefundedEvent.php';
200203
require __DIR__ . '/lib/Events/V1ApplicationFeeRefundedEventNotification.php';
204+
require __DIR__ . '/lib/Events/V1AppsInstallCreatedEvent.php';
205+
require __DIR__ . '/lib/Events/V1AppsInstallCreatedEventNotification.php';
206+
require __DIR__ . '/lib/Events/V1AppsInstallDeletedEvent.php';
207+
require __DIR__ . '/lib/Events/V1AppsInstallDeletedEventNotification.php';
208+
require __DIR__ . '/lib/Events/V1AppsInstallUpdatedEvent.php';
209+
require __DIR__ . '/lib/Events/V1AppsInstallUpdatedEventNotification.php';
201210
require __DIR__ . '/lib/Events/V1BalanceAvailableEvent.php';
202211
require __DIR__ . '/lib/Events/V1BalanceAvailableEventNotification.php';
203212
require __DIR__ . '/lib/Events/V1BalanceSettingsUpdatedEvent.php';
@@ -484,8 +493,6 @@
484493
require __DIR__ . '/lib/Events/V1InvoiceitemDiscountRemovedEventNotification.php';
485494
require __DIR__ . '/lib/Events/V1IssuingAuthorizationCreatedEvent.php';
486495
require __DIR__ . '/lib/Events/V1IssuingAuthorizationCreatedEventNotification.php';
487-
require __DIR__ . '/lib/Events/V1IssuingAuthorizationRequestEvent.php';
488-
require __DIR__ . '/lib/Events/V1IssuingAuthorizationRequestEventNotification.php';
489496
require __DIR__ . '/lib/Events/V1IssuingAuthorizationUpdatedEvent.php';
490497
require __DIR__ . '/lib/Events/V1IssuingAuthorizationUpdatedEventNotification.php';
491498
require __DIR__ . '/lib/Events/V1IssuingCardCreatedEvent.php';
@@ -728,8 +735,12 @@
728735
require __DIR__ . '/lib/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.php';
729736
require __DIR__ . '/lib/Events/V2CoreAccountClosedEvent.php';
730737
require __DIR__ . '/lib/Events/V2CoreAccountClosedEventNotification.php';
738+
require __DIR__ . '/lib/Events/V2CoreAccountConnectedEvent.php';
739+
require __DIR__ . '/lib/Events/V2CoreAccountConnectedEventNotification.php';
731740
require __DIR__ . '/lib/Events/V2CoreAccountCreatedEvent.php';
732741
require __DIR__ . '/lib/Events/V2CoreAccountCreatedEventNotification.php';
742+
require __DIR__ . '/lib/Events/V2CoreAccountDisconnectedEvent.php';
743+
require __DIR__ . '/lib/Events/V2CoreAccountDisconnectedEventNotification.php';
733744
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.php';
734745
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.php';
735746
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.php';
@@ -944,6 +955,22 @@
944955
require __DIR__ . '/lib/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.php';
945956
require __DIR__ . '/lib/Events/V2OrchestratedCommerceAgreementTerminatedEvent.php';
946957
require __DIR__ . '/lib/Events/V2OrchestratedCommerceAgreementTerminatedEventNotification.php';
958+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentAttemptFailedEvent.php';
959+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentAttemptFailedEventNotification.php';
960+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentAttemptStartedEvent.php';
961+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentAttemptStartedEventNotification.php';
962+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentCanceledEvent.php';
963+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentCanceledEventNotification.php';
964+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentCreatedEvent.php';
965+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentCreatedEventNotification.php';
966+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentFailedEvent.php';
967+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentFailedEventNotification.php';
968+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentPausedEvent.php';
969+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentPausedEventNotification.php';
970+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentResumedEvent.php';
971+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentResumedEventNotification.php';
972+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentSucceededEvent.php';
973+
require __DIR__ . '/lib/Events/V2PaymentsOffSessionPaymentSucceededEventNotification.php';
947974
require __DIR__ . '/lib/Events/V2SignalsAccountEvaluationCompleteEvent.php';
948975
require __DIR__ . '/lib/Events/V2SignalsAccountEvaluationCompleteEventNotification.php';
949976
require __DIR__ . '/lib/Events/V2SignalsAccountSignalFraudulentMerchantReadyEvent.php';
@@ -959,6 +986,7 @@
959986
require __DIR__ . '/lib/Exception/FeatureNotEnabledException.php';
960987
require __DIR__ . '/lib/Exception/FinancialAccountNotOpenException.php';
961988
require __DIR__ . '/lib/Exception/FxQuoteNeedsRefreshException.php';
989+
require __DIR__ . '/lib/Exception/InactiveApiOperationConfirmationRequiredException.php';
962990
require __DIR__ . '/lib/Exception/InsufficientFundsException.php';
963991
require __DIR__ . '/lib/Exception/InvalidPaymentMethodException.php';
964992
require __DIR__ . '/lib/Exception/InvalidPayoutMethodException.php';
@@ -1232,16 +1260,12 @@
12321260
require __DIR__ . '/lib/Service/Treasury/TransactionEntryService.php';
12331261
require __DIR__ . '/lib/Service/Treasury/TransactionService.php';
12341262
require __DIR__ . '/lib/Service/Treasury/TreasuryServiceFactory.php';
1235-
require __DIR__ . '/lib/Service/V2/Billing/BillSettingService.php';
1236-
require __DIR__ . '/lib/Service/V2/Billing/BillSettings/VersionService.php';
1263+
require __DIR__ . '/lib/Service/V1/V1ServiceFactory.php';
12371264
require __DIR__ . '/lib/Service/V2/Billing/BillingServiceFactory.php';
1238-
require __DIR__ . '/lib/Service/V2/Billing/CollectionSettingService.php';
1239-
require __DIR__ . '/lib/Service/V2/Billing/CollectionSettings/VersionService.php';
12401265
require __DIR__ . '/lib/Service/V2/Billing/MeterEventAdjustmentService.php';
12411266
require __DIR__ . '/lib/Service/V2/Billing/MeterEventService.php';
12421267
require __DIR__ . '/lib/Service/V2/Billing/MeterEventSessionService.php';
12431268
require __DIR__ . '/lib/Service/V2/Billing/MeterEventStreamService.php';
1244-
require __DIR__ . '/lib/Service/V2/Billing/ProfileService.php';
12451269
require __DIR__ . '/lib/Service/V2/Commerce/CommerceServiceFactory.php';
12461270
require __DIR__ . '/lib/Service/V2/Commerce/ProductCatalog/ImportService.php';
12471271
require __DIR__ . '/lib/Service/V2/Commerce/ProductCatalog/ProductCatalogServiceFactory.php';
@@ -1294,6 +1318,8 @@
12941318
require __DIR__ . '/lib/Service/V2/Network/NetworkServiceFactory.php';
12951319
require __DIR__ . '/lib/Service/V2/OrchestratedCommerce/AgreementService.php';
12961320
require __DIR__ . '/lib/Service/V2/OrchestratedCommerce/OrchestratedCommerceServiceFactory.php';
1321+
require __DIR__ . '/lib/Service/V2/Payments/OffSessionPaymentService.php';
1322+
require __DIR__ . '/lib/Service/V2/Payments/PaymentsServiceFactory.php';
12971323
require __DIR__ . '/lib/Service/V2/Signals/AccountActivityService.php';
12981324
require __DIR__ . '/lib/Service/V2/Signals/AccountEvaluationService.php';
12991325
require __DIR__ . '/lib/Service/V2/Signals/AccountSignalService.php';
@@ -1350,14 +1376,9 @@
13501376
require __DIR__ . '/lib/Treasury/ReceivedDebit.php';
13511377
require __DIR__ . '/lib/Treasury/Transaction.php';
13521378
require __DIR__ . '/lib/Treasury/TransactionEntry.php';
1353-
require __DIR__ . '/lib/V2/Billing/BillSetting.php';
1354-
require __DIR__ . '/lib/V2/Billing/BillSettingVersion.php';
1355-
require __DIR__ . '/lib/V2/Billing/CollectionSetting.php';
1356-
require __DIR__ . '/lib/V2/Billing/CollectionSettingVersion.php';
13571379
require __DIR__ . '/lib/V2/Billing/MeterEvent.php';
13581380
require __DIR__ . '/lib/V2/Billing/MeterEventAdjustment.php';
13591381
require __DIR__ . '/lib/V2/Billing/MeterEventSession.php';
1360-
require __DIR__ . '/lib/V2/Billing/Profile.php';
13611382
require __DIR__ . '/lib/V2/Commerce/ProductCatalogImport.php';
13621383
require __DIR__ . '/lib/V2/Core/Account.php';
13631384
require __DIR__ . '/lib/V2/Core/AccountLink.php';
@@ -1399,6 +1420,7 @@
13991420
require __DIR__ . '/lib/V2/MoneyManagement/TransactionEntry.php';
14001421
require __DIR__ . '/lib/V2/Network/BusinessProfile.php';
14011422
require __DIR__ . '/lib/V2/OrchestratedCommerce/Agreement.php';
1423+
require __DIR__ . '/lib/V2/Payments/OffSessionPayment.php';
14021424
require __DIR__ . '/lib/V2/Signals/AccountActivity.php';
14031425
require __DIR__ . '/lib/V2/Signals/AccountEvaluation.php';
14041426
require __DIR__ . '/lib/V2/Signals/AccountSignal.php';

‎lib/AbstractEventNotificationHandler.php‎

Lines changed: 172 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,45 @@ public function onV1ApplicationFeeRefunded($handler)
277277
$this->register('v1.application_fee.refunded', $handler);
278278
}
279279

280+
/**
281+
* Registers a handler for the "v1.apps.install.created" event.
282+
*
283+
* @param callable(Events\V1AppsInstallCreatedEventNotification, StripeClient): void $handler Handles v1.apps.install.created events
284+
*
285+
* @throws Exception\InvalidArgumentException if this event type is already registered
286+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
287+
*/
288+
public function onV1AppsInstallCreated($handler)
289+
{
290+
$this->register('v1.apps.install.created', $handler);
291+
}
292+
293+
/**
294+
* Registers a handler for the "v1.apps.install.deleted" event.
295+
*
296+
* @param callable(Events\V1AppsInstallDeletedEventNotification, StripeClient): void $handler Handles v1.apps.install.deleted events
297+
*
298+
* @throws Exception\InvalidArgumentException if this event type is already registered
299+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
300+
*/
301+
public function onV1AppsInstallDeleted($handler)
302+
{
303+
$this->register('v1.apps.install.deleted', $handler);
304+
}
305+
306+
/**
307+
* Registers a handler for the "v1.apps.install.updated" event.
308+
*
309+
* @param callable(Events\V1AppsInstallUpdatedEventNotification, StripeClient): void $handler Handles v1.apps.install.updated events
310+
*
311+
* @throws Exception\InvalidArgumentException if this event type is already registered
312+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
313+
*/
314+
public function onV1AppsInstallUpdated($handler)
315+
{
316+
$this->register('v1.apps.install.updated', $handler);
317+
}
318+
280319
/**
281320
* Registers a handler for the "v1.balance.available" event.
282321
*
@@ -2230,19 +2269,6 @@ public function onV1IssuingAuthorizationCreated($handler)
22302269
$this->register('v1.issuing_authorization.created', $handler);
22312270
}
22322271

2233-
/**
2234-
* Registers a handler for the "v1.issuing_authorization.request" event.
2235-
*
2236-
* @param callable(Events\V1IssuingAuthorizationRequestEventNotification, StripeClient): void $handler Handles v1.issuing_authorization.request events
2237-
*
2238-
* @throws Exception\InvalidArgumentException if this event type is already registered
2239-
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
2240-
*/
2241-
public function onV1IssuingAuthorizationRequest($handler)
2242-
{
2243-
$this->register('v1.issuing_authorization.request', $handler);
2244-
}
2245-
22462272
/**
22472273
* Registers a handler for the "v1.issuing_authorization.updated" event.
22482274
*
@@ -3832,6 +3858,19 @@ public function onV2CoreAccountClosed($handler)
38323858
$this->register('v2.core.account.closed', $handler);
38333859
}
38343860

3861+
/**
3862+
* Registers a handler for the "v2.core.account.connected" event.
3863+
*
3864+
* @param callable(Events\V2CoreAccountConnectedEventNotification, StripeClient): void $handler Handles v2.core.account.connected events
3865+
*
3866+
* @throws Exception\InvalidArgumentException if this event type is already registered
3867+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
3868+
*/
3869+
public function onV2CoreAccountConnected($handler)
3870+
{
3871+
$this->register('v2.core.account.connected', $handler);
3872+
}
3873+
38353874
/**
38363875
* Registers a handler for the "v2.core.account.created" event.
38373876
*
@@ -3845,6 +3884,19 @@ public function onV2CoreAccountCreated($handler)
38453884
$this->register('v2.core.account.created', $handler);
38463885
}
38473886

3887+
/**
3888+
* Registers a handler for the "v2.core.account.disconnected" event.
3889+
*
3890+
* @param callable(Events\V2CoreAccountDisconnectedEventNotification, StripeClient): void $handler Handles v2.core.account.disconnected events
3891+
*
3892+
* @throws Exception\InvalidArgumentException if this event type is already registered
3893+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
3894+
*/
3895+
public function onV2CoreAccountDisconnected($handler)
3896+
{
3897+
$this->register('v2.core.account.disconnected', $handler);
3898+
}
3899+
38483900
/**
38493901
* Registers a handler for the "v2.core.account.updated" event.
38503902
*
@@ -5309,6 +5361,113 @@ public function onV2OrchestratedCommerceAgreementTerminated($handler)
53095361
$this->register('v2.orchestrated_commerce.agreement.terminated', $handler);
53105362
}
53115363

5364+
/**
5365+
* Registers a handler for the "v2.payments.off_session_payment.attempt_failed" event.
5366+
*
5367+
* @param callable(Events\V2PaymentsOffSessionPaymentAttemptFailedEventNotification, StripeClient): void $handler Handles v2.payments.off_session_payment.attempt_failed events
5368+
*
5369+
* @throws Exception\InvalidArgumentException if this event type is already registered
5370+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
5371+
*/
5372+
public function onV2PaymentsOffSessionPaymentAttemptFailed($handler)
5373+
{
5374+
$this->register('v2.payments.off_session_payment.attempt_failed', $handler);
5375+
}
5376+
5377+
/**
5378+
* Registers a handler for the "v2.payments.off_session_payment.attempt_started" event.
5379+
*
5380+
* @param callable(Events\V2PaymentsOffSessionPaymentAttemptStartedEventNotification, StripeClient): void $handler Handles v2.payments.off_session_payment.attempt_started events
5381+
*
5382+
* @throws Exception\InvalidArgumentException if this event type is already registered
5383+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
5384+
*/
5385+
public function onV2PaymentsOffSessionPaymentAttemptStarted($handler)
5386+
{
5387+
$this->register(
5388+
'v2.payments.off_session_payment.attempt_started',
5389+
$handler
5390+
);
5391+
}
5392+
5393+
/**
5394+
* Registers a handler for the "v2.payments.off_session_payment.canceled" event.
5395+
*
5396+
* @param callable(Events\V2PaymentsOffSessionPaymentCanceledEventNotification, StripeClient): void $handler Handles v2.payments.off_session_payment.canceled events
5397+
*
5398+
* @throws Exception\InvalidArgumentException if this event type is already registered
5399+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
5400+
*/
5401+
public function onV2PaymentsOffSessionPaymentCanceled($handler)
5402+
{
5403+
$this->register('v2.payments.off_session_payment.canceled', $handler);
5404+
}
5405+
5406+
/**
5407+
* Registers a handler for the "v2.payments.off_session_payment.created" event.
5408+
*
5409+
* @param callable(Events\V2PaymentsOffSessionPaymentCreatedEventNotification, StripeClient): void $handler Handles v2.payments.off_session_payment.created events
5410+
*
5411+
* @throws Exception\InvalidArgumentException if this event type is already registered
5412+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
5413+
*/
5414+
public function onV2PaymentsOffSessionPaymentCreated($handler)
5415+
{
5416+
$this->register('v2.payments.off_session_payment.created', $handler);
5417+
}
5418+
5419+
/**
5420+
* Registers a handler for the "v2.payments.off_session_payment.failed" event.
5421+
*
5422+
* @param callable(Events\V2PaymentsOffSessionPaymentFailedEventNotification, StripeClient): void $handler Handles v2.payments.off_session_payment.failed events
5423+
*
5424+
* @throws Exception\InvalidArgumentException if this event type is already registered
5425+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
5426+
*/
5427+
public function onV2PaymentsOffSessionPaymentFailed($handler)
5428+
{
5429+
$this->register('v2.payments.off_session_payment.failed', $handler);
5430+
}
5431+
5432+
/**
5433+
* Registers a handler for the "v2.payments.off_session_payment.paused" event.
5434+
*
5435+
* @param callable(Events\V2PaymentsOffSessionPaymentPausedEventNotification, StripeClient): void $handler Handles v2.payments.off_session_payment.paused events
5436+
*
5437+
* @throws Exception\InvalidArgumentException if this event type is already registered
5438+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
5439+
*/
5440+
public function onV2PaymentsOffSessionPaymentPaused($handler)
5441+
{
5442+
$this->register('v2.payments.off_session_payment.paused', $handler);
5443+
}
5444+
5445+
/**
5446+
* Registers a handler for the "v2.payments.off_session_payment.resumed" event.
5447+
*
5448+
* @param callable(Events\V2PaymentsOffSessionPaymentResumedEventNotification, StripeClient): void $handler Handles v2.payments.off_session_payment.resumed events
5449+
*
5450+
* @throws Exception\InvalidArgumentException if this event type is already registered
5451+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
5452+
*/
5453+
public function onV2PaymentsOffSessionPaymentResumed($handler)
5454+
{
5455+
$this->register('v2.payments.off_session_payment.resumed', $handler);
5456+
}
5457+
5458+
/**
5459+
* Registers a handler for the "v2.payments.off_session_payment.succeeded" event.
5460+
*
5461+
* @param callable(Events\V2PaymentsOffSessionPaymentSucceededEventNotification, StripeClient): void $handler Handles v2.payments.off_session_payment.succeeded events
5462+
*
5463+
* @throws Exception\InvalidArgumentException if this event type is already registered
5464+
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
5465+
*/
5466+
public function onV2PaymentsOffSessionPaymentSucceeded($handler)
5467+
{
5468+
$this->register('v2.payments.off_session_payment.succeeded', $handler);
5469+
}
5470+
53125471
/**
53135472
* Registers a handler for the "v2.signals.account_evaluation.complete" event.
53145473
*

‎lib/ApiRequestor.php‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,16 @@ private static function _specificV2APIError($rbody, $rcode, $rheaders, $resp, $e
365365
$code
366366
);
367367

368+
case 'inactive_api_operation_confirmation_required':
369+
return Exception\InactiveApiOperationConfirmationRequiredException::factory(
370+
$msg,
371+
$rcode,
372+
$rbody,
373+
$resp,
374+
$rheaders,
375+
$code
376+
);
377+
368378
case 'insufficient_funds':
369379
return Exception\InsufficientFundsException::factory(
370380
$msg,

0 commit comments

Comments
 (0)