Skip to content

Commit b7d59e0

Browse files
Update generated code from sdk-codegen canary eb7204b2a41103cd2c38773657f4a8e3d703b258
1 parent 281e36a commit b7d59e0

48 files changed

Lines changed: 1297 additions & 494 deletions

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: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@
185185
require __DIR__ . '/lib/Events/V1ApplicationFeeRefundUpdatedEventNotification.php';
186186
require __DIR__ . '/lib/Events/V1ApplicationFeeRefundedEvent.php';
187187
require __DIR__ . '/lib/Events/V1ApplicationFeeRefundedEventNotification.php';
188+
require __DIR__ . '/lib/Events/V1AppsInstallCreatedEvent.php';
189+
require __DIR__ . '/lib/Events/V1AppsInstallCreatedEventNotification.php';
190+
require __DIR__ . '/lib/Events/V1AppsInstallDeletedEvent.php';
191+
require __DIR__ . '/lib/Events/V1AppsInstallDeletedEventNotification.php';
192+
require __DIR__ . '/lib/Events/V1AppsInstallUpdatedEvent.php';
193+
require __DIR__ . '/lib/Events/V1AppsInstallUpdatedEventNotification.php';
188194
require __DIR__ . '/lib/Events/V1BalanceAvailableEvent.php';
189195
require __DIR__ . '/lib/Events/V1BalanceAvailableEventNotification.php';
190196
require __DIR__ . '/lib/Events/V1BalanceSettingsUpdatedEvent.php';
@@ -471,8 +477,6 @@
471477
require __DIR__ . '/lib/Events/V1InvoiceitemDiscountRemovedEventNotification.php';
472478
require __DIR__ . '/lib/Events/V1IssuingAuthorizationCreatedEvent.php';
473479
require __DIR__ . '/lib/Events/V1IssuingAuthorizationCreatedEventNotification.php';
474-
require __DIR__ . '/lib/Events/V1IssuingAuthorizationRequestEvent.php';
475-
require __DIR__ . '/lib/Events/V1IssuingAuthorizationRequestEventNotification.php';
476480
require __DIR__ . '/lib/Events/V1IssuingAuthorizationUpdatedEvent.php';
477481
require __DIR__ . '/lib/Events/V1IssuingAuthorizationUpdatedEventNotification.php';
478482
require __DIR__ . '/lib/Events/V1IssuingCardCreatedEvent.php';
@@ -715,8 +719,12 @@
715719
require __DIR__ . '/lib/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.php';
716720
require __DIR__ . '/lib/Events/V2CoreAccountClosedEvent.php';
717721
require __DIR__ . '/lib/Events/V2CoreAccountClosedEventNotification.php';
722+
require __DIR__ . '/lib/Events/V2CoreAccountConnectedEvent.php';
723+
require __DIR__ . '/lib/Events/V2CoreAccountConnectedEventNotification.php';
718724
require __DIR__ . '/lib/Events/V2CoreAccountCreatedEvent.php';
719725
require __DIR__ . '/lib/Events/V2CoreAccountCreatedEventNotification.php';
726+
require __DIR__ . '/lib/Events/V2CoreAccountDisconnectedEvent.php';
727+
require __DIR__ . '/lib/Events/V2CoreAccountDisconnectedEventNotification.php';
720728
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.php';
721729
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.php';
722730
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.php';
@@ -837,6 +845,7 @@
837845
require __DIR__ . '/lib/Exception/FeatureNotEnabledException.php';
838846
require __DIR__ . '/lib/Exception/FinancialAccountNotOpenException.php';
839847
require __DIR__ . '/lib/Exception/FxQuoteNeedsRefreshException.php';
848+
require __DIR__ . '/lib/Exception/InactiveApiOperationConfirmationRequiredException.php';
840849
require __DIR__ . '/lib/Exception/InsufficientFundsException.php';
841850
require __DIR__ . '/lib/Exception/InvalidPaymentMethodException.php';
842851
require __DIR__ . '/lib/Exception/InvalidPayoutMethodException.php';
@@ -1060,6 +1069,7 @@
10601069
require __DIR__ . '/lib/Service/Treasury/TransactionEntryService.php';
10611070
require __DIR__ . '/lib/Service/Treasury/TransactionService.php';
10621071
require __DIR__ . '/lib/Service/Treasury/TreasuryServiceFactory.php';
1072+
require __DIR__ . '/lib/Service/V1/V1ServiceFactory.php';
10631073
require __DIR__ . '/lib/Service/V2/Billing/BillingServiceFactory.php';
10641074
require __DIR__ . '/lib/Service/V2/Billing/MeterEventAdjustmentService.php';
10651075
require __DIR__ . '/lib/Service/V2/Billing/MeterEventService.php';

‎lib/AbstractEventNotificationHandler.php‎

Lines changed: 65 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
*

‎lib/ApiRequestor.php‎

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

358+
case 'inactive_api_operation_confirmation_required':
359+
return Exception\InactiveApiOperationConfirmationRequiredException::factory(
360+
$msg,
361+
$rcode,
362+
$rbody,
363+
$resp,
364+
$rheaders,
365+
$code
366+
);
367+
358368
case 'insufficient_funds':
359369
return Exception\InsufficientFundsException::factory(
360370
$msg,

‎lib/BalanceSettings.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Options for customizing account balances and payout settings for a Stripe platform’s connected accounts.
99
*
1010
* @property string $object String representing the object's type. Objects of the same type share the same value.
11-
* @property (object{debit_negative_balances: null|bool, payouts: null|(object{automatic_transfer_rules_by_currency: null|StripeObject, minimum_balance_by_currency: null|StripeObject, schedule: null|(object{interval: null|string, monthly_payout_days?: int[], weekly_payout_days?: string[]}&StripeObject), statement_descriptor: null|string, status: string}&StripeObject), settlement_timing: (object{delay_days: int, delay_days_override?: int, start_of_day: null|(object{hour: int, minutes: int, timezone: string}&StripeObject)}&StripeObject)}&StripeObject) $payments
11+
* @property (object{debit_negative_balances: null|bool, default_settlement_currency: string, payouts: null|(object{automatic_transfer_rules_by_currency: null|StripeObject, minimum_balance_by_currency: null|StripeObject, schedule: null|(object{interval: null|string, monthly_payout_days?: int[], weekly_payout_days?: string[]}&StripeObject), statement_descriptor: null|string, status: string}&StripeObject), settlement_currencies: null|StripeObject, settlement_timing: (object{delay_days: int, delay_days_override?: int, start_of_day: null|(object{hour: int, minutes: int, timezone: string}&StripeObject)}&StripeObject)}&StripeObject) $payments
1212
*/
1313
class BalanceSettings extends SingletonApiResource
1414
{
@@ -40,7 +40,7 @@ public static function retrieve($opts = null)
4040
* href="/connect/authentication">Making API calls for connected accounts</a>.
4141
*
4242
* @param string $id the ID of the resource to update
43-
* @param null|array{expand?: string[], payments?: array{debit_negative_balances?: bool, payouts?: array{automatic_transfer_rules_by_currency?: null|array<string, null|array{payout_method: string, transfer_up_to_amount?: int, type: string}[]>, minimum_balance_by_currency?: null|array<string, null|int>, schedule?: array{interval?: string, monthly_payout_days?: int[], weekly_payout_days?: string[]}, statement_descriptor?: string}, settlement_timing?: array{delay_days_override?: null|int, start_of_day?: null|array{hour?: int, minutes?: int, timezone?: string}}}} $params
43+
* @param null|array{expand?: string[], payments?: array{debit_negative_balances?: bool, payouts?: array{automatic_transfer_rules_by_currency?: null|array<string, null|array{payout_method: string, transfer_up_to_amount?: int, type: string}[]>, minimum_balance_by_currency?: null|array<string, null|int>, schedule?: array{interval?: string, monthly_payout_days?: int[], weekly_payout_days?: string[]}, statement_descriptor?: string}, settlement_currencies?: array<string, string>, settlement_timing?: array{delay_days_override?: null|int, start_of_day?: null|array{hour?: int, minutes?: int, timezone?: string}}}} $params
4444
* @param null|array|string $opts
4545
*
4646
* @return BalanceSettings the updated resource

‎lib/CashBalance.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* A customer's <code>Cash balance</code> represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
99
*
1010
* @property string $object String representing the object's type. Objects of the same type share the same value.
11-
* @property null|StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the <a href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit</a>.
11+
* @property null|StripeObject $available A hash of all cash balances available to this customer. You can't delete a customer that has a positive cash balance in any currency. You can delete it after all of its cash balances are 0. Amounts are represented in the <a href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit</a>.
1212
* @property string $customer The ID of the customer whose cash balance this object represents.
1313
* @property null|string $customer_account The ID of an Account representing a customer whose cash balance this object represents.
1414
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.

‎lib/Checkout/Session.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public static function retrieve($id, $opts = null)
201201
/**
202202
* Updates a Checkout Session object.
203203
*
204-
* Related guide: <a href="/payments/advanced/dynamic-updates">Dynamically update a
204+
* Related guide: <a href="/payments/checkout/dynamic-updates">Dynamically update a
205205
* Checkout Session</a>
206206
*
207207
* @param string $id the ID of the resource to update

‎lib/Dispute.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
2121
* @property string[] $enhanced_eligibility_types List of eligibility types that are included in <code>enhanced_evidence</code>.
2222
* @property (object{access_activity_log: null|string, appeal: null|(object{card?: (object{reason_for_filing?: string, supporting_files?: string[]}&StripeObject)}&StripeObject), billing_address: null|string, cancellation_policy: null|File|string, cancellation_policy_disclosure: null|string, cancellation_rebuttal: null|string, customer_communication: null|File|string, customer_email_address: null|string, customer_name: null|string, customer_purchase_ip: null|string, customer_signature: null|File|string, duplicate_charge_documentation: null|File|string, duplicate_charge_explanation: null|string, duplicate_charge_id: null|string, enhanced_evidence: (object{mastercard_compliance?: (object{fee_acknowledged: bool}&StripeObject), visa_compelling_evidence_3?: (object{disputed_transaction: null|(object{customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, merchandise_or_services: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), prior_undisputed_transactions: ((object{charge: string, customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject))[]}&StripeObject), visa_compliance?: (object{fee_acknowledged: bool}&StripeObject)}&StripeObject), product_description: null|string, receipt: null|File|string, refund_policy: null|File|string, refund_policy_disclosure: null|string, refund_refusal_explanation: null|string, service_date: null|string, service_documentation: null|File|string, shipping_address: null|string, shipping_carrier: null|string, shipping_date: null|string, shipping_documentation: null|File|string, shipping_tracking_number: null|string, uncategorized_file: null|File|string, uncategorized_text: null|string}&StripeObject) $evidence
23-
* @property (object{due_by: null|int, enhanced_eligibility: (object{mastercard_compliance?: (object{status: string}&StripeObject), visa_compelling_evidence_3?: (object{required_actions: string[], status: string}&StripeObject), visa_compliance?: (object{status: string}&StripeObject)}&StripeObject), has_evidence: bool, past_due: bool, submission_count: int, submission_method: string}&StripeObject) $evidence_details
23+
* @property (object{appeal_method?: string, due_by: null|int, enhanced_eligibility: (object{mastercard_compliance?: (object{status: string}&StripeObject), visa_compelling_evidence_3?: (object{required_actions: string[], status: string}&StripeObject), visa_compliance?: (object{status: string}&StripeObject)}&StripeObject), has_evidence: bool, past_due: bool, submission_count: int, submission_method: string}&StripeObject) $evidence_details
2424
* @property null|string $intended_submission_method Intended submission method for the dispute.
2525
* @property bool $is_charge_refundable If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute.
2626
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
2727
* @property StripeObject $metadata Set of <a href="https://docs.stripe.com/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
2828
* @property null|string $network_reason_code Network-dependent reason code for the dispute.
2929
* @property null|PaymentIntent|string $payment_intent ID of the PaymentIntent that's disputed.
30-
* @property null|(object{amazon_pay?: (object{dispute_type: null|string}&StripeObject), card?: (object{brand: string, case_type: string, network: string, network_reason_code: null|string}&StripeObject), klarna?: (object{chargeback_loss_reason_code?: string, reason_code: null|string}&StripeObject), paypal?: (object{case_id: null|string, reason_code: null|string}&StripeObject), type: string}&StripeObject) $payment_method_details
30+
* @property null|(object{amazon_pay?: (object{dispute_type: null|string}&StripeObject), card?: (object{brand: string, case_type: string, network: string, network_reason_code: null|string}&StripeObject), klarna?: (object{chargeback_loss_reason_code?: string, dispute_id?: string, reason_code: null|string}&StripeObject), paypal?: (object{case_id: null|string, reason_code: null|string}&StripeObject), type: string}&StripeObject) $payment_method_details
3131
* @property string $reason Reason given by cardholder for dispute. Possible values are <code>bank_cannot_process</code>, <code>check_returned</code>, <code>credit_not_processed</code>, <code>customer_initiated</code>, <code>debit_not_authorized</code>, <code>duplicate</code>, <code>fraudulent</code>, <code>general</code>, <code>incorrect_account_details</code>, <code>insufficient_funds</code>, <code>noncompliant</code>, <code>product_not_received</code>, <code>product_unacceptable</code>, <code>subscription_canceled</code>, or <code>unrecognized</code>. Learn more about <a href="https://docs.stripe.com/disputes/categories">dispute reasons</a>.
3232
* @property string $status The current status of a dispute. Possible values include:<code>warning_needs_response</code>, <code>warning_under_review</code>, <code>warning_closed</code>, <code>needs_response</code>, <code>under_review</code>, <code>appeal_needs_response</code>, <code>appeal_under_review</code>, <code>won</code>, <code>lost</code>, or <code>prevented</code>.
3333
*/

0 commit comments

Comments
 (0)