Bump stripe-php from 19.0.0 to 19.4.1

This commit is contained in:
johnnyq
2026-03-07 17:19:48 -05:00
parent 11ba077726
commit 526fa1aff5
228 changed files with 3494 additions and 1049 deletions

View File

@@ -1 +0,0 @@
e62524b587909bee231a15ce0dc618f1d04f69a4

View File

@@ -1,4 +1,102 @@
# Changelog
## 19.4.1 - 2026-03-06
* [#2024](https://github.com/stripe/stripe-php/pull/2024) Add Stripe-Request-Trigger header
* [#2022](https://github.com/stripe/stripe-php/pull/2022) Add agent information to UserAgent
## 19.4.0 - 2026-02-25
This release changes the pinned API version to `2026-02-25.clover`.
* [#2016](https://github.com/stripe/stripe-php/pull/2016) Update generated code
* Add support for new resources `Reserve.Hold`, `Reserve.Plan`, and `Reserve.Release`
* Add support for `location` and `reader` on `Charge.payment_method_details.card_present`, `Charge.payment_method_details.interac_present`, `ConfirmationToken.payment_method_preview.card.generated_from.payment_method_details.card_present`, `PaymentAttemptRecord.payment_method_details.card_present`, `PaymentAttemptRecord.payment_method_details.interac_present`, `PaymentMethod.card.generated_from.payment_method_details.card_present`, `PaymentRecord.payment_method_details.card_present`, and `PaymentRecord.payment_method_details.interac_present`
* Add support for new value `lk_vat` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, `Tax.Calculation.customer_details.tax_ids[].type`, `Tax.Transaction.customer_details.tax_ids[].type`, and `TaxId.type`
* Add support for new values `reserve.hold.created`, `reserve.hold.updated`, `reserve.plan.created`, `reserve.plan.disabled`, `reserve.plan.expired`, `reserve.plan.updated`, and `reserve.release.created` on enum `Event.type`
* Add support for new values `terminal_wifi_certificate` and `terminal_wifi_private_key` on enum `File.purpose`
* Add support for new value `pay_by_bank` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`
* Add support for `display_name` and `service_user_number` on `Mandate.payment_method_details.bacs_debit`
* Change type of `PaymentAttemptRecord.payment_method_details.boleto.tax_id` and `PaymentRecord.payment_method_details.boleto.tax_id` from `string` to `nullable(string)`
* Change type of `PaymentAttemptRecord.payment_method_details.us_bank_account.expected_debit_date` and `PaymentRecord.payment_method_details.us_bank_account.expected_debit_date` from `nullable(string)` to `string`
* Add support for `transaction_purpose` on `PaymentIntent.confirm().$params.payment_method_option.us_bank_account`, `PaymentIntent.create().$params.payment_method_option.us_bank_account`, `PaymentIntent.payment_method_options.us_bank_account`, and `PaymentIntent.update().$params.payment_method_option.us_bank_account`
* Add support for `optional_items` on `PaymentLink.update().$params`
* Remove support for unused `card_issuer_decline` on `Radar.PaymentEvaluation.insights`
* Add support for `payment_behavior` on `SubscriptionItem.delete().$params`
* Add support for `lk` on `Tax.Registration.country_options` and `Tax\Registration.create().$params.country_option`
* Add support for `cellular` and `stripe_s710` on `Terminal.Configuration`, `Terminal\Configuration.create().$params`, and `Terminal\Configuration.update().$params`
* Add support for new values `simulated_stripe_s710` and `stripe_s710` on enum `Terminal.Reader.device_type`
* Add support for snapshot events `RESERVE_HOLD_CREATED` and `RESERVE_HOLD_UPDATED` with resource `Reserve.Hold`
* Add support for snapshot events `RESERVE_PLAN_CREATED`, `RESERVE_PLAN_DISABLED`, `RESERVE_PLAN_EXPIRED`, and `RESERVE_PLAN_UPDATED` with resource `Reserve.Plan`
* Add support for snapshot event `RESERVE_RELEASE_CREATED` with resource `Reserve.Release`
* Add support for error codes `storer_capability_missing` and `storer_capability_not_active` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
## 19.3.0 - 2026-01-28
This release changes the pinned API version to `2026-01-28.clover`.
* [#2001](https://github.com/stripe/stripe-php/pull/2001) Update generated code
* Add support for new resource `Radar.PaymentEvaluation`
* Add support for `create` method on resource `Radar.PaymentEvaluation`
* Add support for `adjustable_quantity` on `LineItem`
* Add support for new value `risk_reserved` on enum `BalanceTransaction.balance_type`
* Add support for new values `reserve_hold` and `reserve_release` on enum `BalanceTransaction.type`
* Add support for new values `2.3.0` and `2.3.1` on enums `Charge.payment_method_details.card.three_d_secure.version` and `SetupAttempt.payment_method_details.card.three_d_secure.version`
* Add support for new value `adyen` on enums `Charge.payment_method_details.ideal.bank`, `ConfirmationToken.payment_method_preview.ideal.bank`, `PaymentAttemptRecord.payment_method_details.ideal.bank`, `PaymentMethod.ideal.bank`, `PaymentRecord.payment_method_details.ideal.bank`, and `SetupAttempt.payment_method_details.ideal.bank`
* Add support for new value `ADYBNL2A` on enums `Charge.payment_method_details.ideal.bic`, `ConfirmationToken.payment_method_preview.ideal.bic`, `PaymentAttemptRecord.payment_method_details.ideal.bic`, `PaymentMethod.ideal.bic`, `PaymentRecord.payment_method_details.ideal.bic`, and `SetupAttempt.payment_method_details.ideal.bic`
* Add support for new value `pl_nip` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, `Tax.Calculation.customer_details.tax_ids[].type`, `Tax.Transaction.customer_details.tax_ids[].type`, and `TaxId.type`
* Change `Invoice.payment_settings.payment_method_options.payto` and `Subscription.payment_settings.payment_method_options.payto` to be required
* Add support for `enforce_arithmetic_validation` on `PaymentIntent.capture().$params.amount_detail`, `PaymentIntent.confirm().$params.amount_detail`, `PaymentIntent.create().$params.amount_detail`, `PaymentIntent.increment_authorization().$params.amount_detail`, and `PaymentIntent.update().$params.amount_detail`
* Add support for `error` on `PaymentIntent.amount_details`
* Remove support for `bgn` on `Terminal.Configuration.tipping`, `Terminal\Configuration.create().$params.tipping`, and `Terminal\Configuration.update().$params.tipping`
* Add support for `topup` on `Treasury.ReceivedDebit.linked_flows`
* Add support for `contact_phone` on `V2.Core.Account`, `V2\Core\Account.create().$params`, `V2\Core\Account.update().$params`, and `V2\Core\AccountToken.create().$params`
* Add support for `registration_date` on `V2.Core.Account.identity.business_details`, `V2\Core\Account.create().$params.identity.business_detail`, `V2\Core\Account.update().$params.identity.business_detail`, and `V2\Core\AccountToken.create().$params.identity.business_detail`
* Add support for new value `gb_vat` on enum `V2.Core.Account.identity.business_details.id_numbers[].type`
* Add support for error code `request_blocked` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
* [#2000](https://github.com/stripe/stripe-php/pull/2000) Add guidance for undocumented API parameters
## 19.2.0 - 2026-01-16
* [#1997](https://github.com/stripe/stripe-php/pull/1997) Update generated code
* Add support for event notifications `V2CoreAccountClosedEvent`, `V2CoreAccountCreatedEvent`, `V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationCustomerUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent`, `V2CoreAccountIncludingDefaultsUpdatedEvent`, `V2CoreAccountIncludingFutureRequirementsUpdatedEvent`, `V2CoreAccountIncludingIdentityUpdatedEvent`, `V2CoreAccountIncludingRequirementsUpdatedEvent`, and `V2CoreAccountUpdatedEvent` with related object `V2.Core.Account`
* Add support for event notification `V2CoreAccountLinkReturnedEvent`
* Add support for event notifications `V2CoreAccountPersonCreatedEvent`, `V2CoreAccountPersonDeletedEvent`, and `V2CoreAccountPersonUpdatedEvent` with related object `V2.Core.AccountPerson`
* [#1984](https://github.com/stripe/stripe-php/pull/1984) Improve webhook signature validation doc block
## 19.1.0 - 2025-12-16
This release changes the pinned API version to `2025-12-15.clover`.
* [#1975](https://github.com/stripe/stripe-php/pull/1975) Update generated code
* Add support for new resources `V2.Core.AccountLink`, `V2.Core.AccountPersonToken`, `V2.Core.AccountPerson`, `V2.Core.AccountToken`, and `V2.Core.Account`
* Add support for `create` and `retrieve` methods on resources `V2.Core.AccountPersonToken` and `V2.Core.AccountToken`
* Add support for `create` method on resource `V2.Core.AccountLink`
* Add support for `all`, `close`, `create`, `retrieve`, and `update` methods on resource `V2.Core.Account`
* Add support for `all`, `create`, `delete`, `retrieve`, and `update` methods on resource `V2.Core.AccountPerson`
* Add support for `customer_account` on `Billing.CreditBalanceSummary`, `Billing.CreditGrant`, `BillingPortal.Session`, `BillingPortal\Session.create().$params`, `Billing\CreditBalanceSummary.retrieve().$params`, `Billing\CreditBalanceTransaction.all().$params`, `Billing\CreditGrant.all().$params`, `Billing\CreditGrant.create().$params`, `CashBalance`, `Checkout.Session`, `Checkout\Session.all().$params`, `Checkout\Session.create().$params`, `ConfirmationToken.payment_method_preview`, `CreditNote.all().$params`, `CreditNote`, `CustomerBalanceTransaction`, `CustomerCashBalanceTransaction`, `CustomerSession.create().$params`, `CustomerSession`, `Customer`, `Discount`, `FinancialConnections.Account.account_holder`, `FinancialConnections.Session.account_holder`, `FinancialConnections\Account.all().$params.account_holder`, `FinancialConnections\Session.create().$params.account_holder`, `Invoice.all().$params`, `Invoice.create().$params`, `Invoice.create_preview().$params`, `InvoiceItem.all().$params`, `InvoiceItem.create().$params`, `InvoiceItem`, `Invoice`, `PaymentIntent.all().$params`, `PaymentIntent.create().$params`, `PaymentIntent.update().$params`, `PaymentIntent`, `PaymentMethod.all().$params`, `PaymentMethod.attach().$params`, `PaymentMethod`, `PromotionCode.all().$params`, `PromotionCode.create().$params`, `PromotionCode`, `Quote.all().$params`, `Quote.create().$params`, `Quote.update().$params`, `Quote`, `SetupAttempt`, `SetupIntent.all().$params`, `SetupIntent.create().$params`, `SetupIntent.update().$params`, `SetupIntent`, `Subscription.all().$params`, `Subscription.create().$params`, `SubscriptionSchedule.all().$params`, `SubscriptionSchedule.create().$params`, `SubscriptionSchedule`, `Subscription`, `TaxId.all().$params.owner`, `TaxId.create().$params.owner`, `TaxId.owner`, and `TaxId`
* Add support for `metadata` on `Checkout\Session.create().$params.line_item` and `LineItem`
* Add support for `payto_payments` on `Account.capabilities`, `Account.create().$params.capability`, and `Account.update().$params.capability`
* Add support for `signer` on `Account.create().$params.document.proof_of_registration`, `Account.create().$params.document.proof_of_ultimate_beneficial_ownership`, `Account.update().$params.document.proof_of_registration`, and `Account.update().$params.document.proof_of_ultimate_beneficial_ownership`
* Change `BillingPortal\Session.create().$params.customer`, `Billing\CreditBalanceSummary.retrieve().$params.customer`, `Billing\CreditBalanceTransaction.all().$params.customer`, `Billing\CreditGrant.create().$params.customer`, `CustomerSession.create().$params.customer`, `InvoiceItem.create().$params.customer`, `PaymentMethod.attach().$params.customer`, and `Subscription.create().$params.customer` to be optional
* Add support for `billing_cycle_anchor` on `BillingPortal.Configuration.features.subscription_update`, `BillingPortal\Configuration.create().$params.feature.subscription_update`, and `BillingPortal\Configuration.update().$params.feature.subscription_update`
* Add support for `payto` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `Checkout\Session.create().$params.payment_method_option`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `Invoice.create().$params.payment_setting.payment_method_option`, `Invoice.payment_settings.payment_method_options`, `Invoice.update().$params.payment_setting.payment_method_option`, `Mandate.payment_method_details`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent.confirm().$params.payment_method_datum`, `PaymentIntent.confirm().$params.payment_method_option`, `PaymentIntent.create().$params.payment_method_datum`, `PaymentIntent.create().$params.payment_method_option`, `PaymentIntent.payment_method_options`, `PaymentIntent.update().$params.payment_method_datum`, `PaymentIntent.update().$params.payment_method_option`, `PaymentMethod.create().$params`, `PaymentMethod.update().$params`, `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.confirm().$params.payment_method_option`, `SetupIntent.create().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_option`, `SetupIntent.payment_method_options`, `SetupIntent.update().$params.payment_method_datum`, `SetupIntent.update().$params.payment_method_option`, `Subscription.create().$params.payment_setting.payment_method_option`, `Subscription.payment_settings.payment_method_options`, and `Subscription.update().$params.payment_setting.payment_method_option`
* Add support for `expected_debit_date` on `Charge.payment_method_details.acss_debit`, `Charge.payment_method_details.au_becs_debit`, `Charge.payment_method_details.bacs_debit`, `Charge.payment_method_details.nz_bank_account`, `Charge.payment_method_details.sepa_debit`, `Charge.payment_method_details.us_bank_account`, `PaymentAttemptRecord.payment_method_details.acss_debit`, `PaymentAttemptRecord.payment_method_details.au_becs_debit`, `PaymentAttemptRecord.payment_method_details.bacs_debit`, `PaymentAttemptRecord.payment_method_details.nz_bank_account`, `PaymentAttemptRecord.payment_method_details.sepa_debit`, `PaymentAttemptRecord.payment_method_details.us_bank_account`, `PaymentRecord.payment_method_details.acss_debit`, `PaymentRecord.payment_method_details.au_becs_debit`, `PaymentRecord.payment_method_details.bacs_debit`, `PaymentRecord.payment_method_details.nz_bank_account`, `PaymentRecord.payment_method_details.sepa_debit`, and `PaymentRecord.payment_method_details.us_bank_account`
* Add support for new value `mollie` on enums `Charge.payment_method_details.ideal.bank`, `ConfirmationToken.payment_method_preview.ideal.bank`, `PaymentAttemptRecord.payment_method_details.ideal.bank`, `PaymentMethod.ideal.bank`, `PaymentRecord.payment_method_details.ideal.bank`, and `SetupAttempt.payment_method_details.ideal.bank`
* Add support for new value `MLLENL2A` on enums `Charge.payment_method_details.ideal.bic`, `ConfirmationToken.payment_method_preview.ideal.bic`, `PaymentAttemptRecord.payment_method_details.ideal.bic`, `PaymentMethod.ideal.bic`, `PaymentRecord.payment_method_details.ideal.bic`, and `SetupAttempt.payment_method_details.ideal.bic`
* Add support for `line_items` on `Checkout\Session.update().$params`
* Add support for new value `payto` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`
* Add support for `invoice` on `CustomerBalanceTransaction.all().$params`
* Add support for `related_customer_account` on `Identity.VerificationSession`, `Identity\VerificationSession.all().$params`, and `Identity\VerificationSession.create().$params`
* Change type of `InvoiceItem.pricing.price_details.price` and `InvoiceLineItem.pricing.price_details.price` from `string` to `expandable($Price)`
* Add support for new value `payto` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`
* Add support for `subtotal` on `InvoiceLineItem`
* Add support for `authorization_code`, `description`, `iin`, `installments`, `issuer`, `network_advice_code`, `network_decline_code`, and `stored_credential_usage` on `PaymentAttemptRecord.payment_method_details.card` and `PaymentRecord.payment_method_details.card`
* Add support for new value `payto` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types`
* Change `PaymentIntent.transfer_data` to be optional
* Add support for new value `payto` on enum `PaymentLink.payment_method_types`
* Add support for `allow_redisplay` on `PaymentMethod.all().$params`
* Add support for `reported_by` on `PaymentRecord`
* Change `Product.tax_code` to be optional
* Add support for `changes` on `V2.Core.Event`
* Add support for error code `account_token_required_for_v2_account` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
* [#1976](https://github.com/stripe/stripe-php/pull/1976) Updated bundled CA certs
* [#1973](https://github.com/stripe/stripe-php/pull/1973) Remove deprecated usage of curl_close() for PHP versions > 8.0
## 19.0.0 - 2025-11-18
This release changes the pinned API version to `2025-11-17.clover`.

View File

@@ -0,0 +1 @@
e65e48569f6dfad2d5f1b58018017856520c3ae6

View File

@@ -1 +1 @@
v2124
v2186

View File

@@ -203,6 +203,12 @@ You can disable this behavior if you prefer:
\Stripe\Stripe::setEnableTelemetry(false);
```
### How to use undocumented parameters and properties
In some cases, you might encounter parameters on an API request or fields on an API response that arent available in the SDKs.
This might happen when theyre undocumented or when theyre in preview and you arent using a preview SDK.
See [undocumented params and properties](https://docs.stripe.com/sdks/server-side?lang=php#undocumented-params-and-fields) to send those parameters or access those fields.
### Public Preview SDKs
Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `12.2.0-beta.2`.

View File

@@ -1 +1 @@
19.0.0
19.4.1

View File

@@ -22,7 +22,7 @@
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^9.0",
"friendsofphp/php-cs-fixer": "3.72.0",
"friendsofphp/php-cs-fixer": "3.94.0",
"phpstan/phpstan": "^1.2"
},
"autoload": {
@@ -42,5 +42,12 @@
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"config": {
"audit": {
"ignore": {
"PKSA-z3gr-8qht-p93v": "PHPUnit is only a dev dependency. Temporarily ignore PHPUnit security advisory to ensure continued support for PHP 5.6 in CI."
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -141,10 +141,51 @@ require __DIR__ . '/lib/EphemeralKey.php';
require __DIR__ . '/lib/Event.php';
require __DIR__ . '/lib/EventData/V1BillingMeterErrorReportTriggeredEventData.php';
require __DIR__ . '/lib/EventData/V1BillingMeterNoMeterFoundEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountLinkReturnedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountPersonCreatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountPersonDeletedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountPersonUpdatedEventData.php';
require __DIR__ . '/lib/Events/V1BillingMeterErrorReportTriggeredEvent.php';
require __DIR__ . '/lib/Events/V1BillingMeterErrorReportTriggeredEventNotification.php';
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEvent.php';
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountClosedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountClosedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountCreatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountCreatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingDefaultsUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingIdentityUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingIdentityUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingRequirementsUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountLinkReturnedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountLinkReturnedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountPersonCreatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountPersonCreatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountPersonDeletedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountPersonDeletedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountPersonUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountPersonUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreEventDestinationPingEvent.php';
require __DIR__ . '/lib/Events/V2CoreEventDestinationPingEventNotification.php';
require __DIR__ . '/lib/Exception/TemporarySessionExpiredException.php';
@@ -193,11 +234,15 @@ require __DIR__ . '/lib/ProductFeature.php';
require __DIR__ . '/lib/PromotionCode.php';
require __DIR__ . '/lib/Quote.php';
require __DIR__ . '/lib/Radar/EarlyFraudWarning.php';
require __DIR__ . '/lib/Radar/PaymentEvaluation.php';
require __DIR__ . '/lib/Radar/ValueList.php';
require __DIR__ . '/lib/Radar/ValueListItem.php';
require __DIR__ . '/lib/Refund.php';
require __DIR__ . '/lib/Reporting/ReportRun.php';
require __DIR__ . '/lib/Reporting/ReportType.php';
require __DIR__ . '/lib/Reserve/Hold.php';
require __DIR__ . '/lib/Reserve/Plan.php';
require __DIR__ . '/lib/Reserve/Release.php';
require __DIR__ . '/lib/ReserveTransaction.php';
require __DIR__ . '/lib/Review.php';
require __DIR__ . '/lib/Service/AccountLinkService.php';
@@ -281,6 +326,7 @@ require __DIR__ . '/lib/Service/ProductService.php';
require __DIR__ . '/lib/Service/PromotionCodeService.php';
require __DIR__ . '/lib/Service/QuoteService.php';
require __DIR__ . '/lib/Service/Radar/EarlyFraudWarningService.php';
require __DIR__ . '/lib/Service/Radar/PaymentEvaluationService.php';
require __DIR__ . '/lib/Service/Radar/RadarServiceFactory.php';
require __DIR__ . '/lib/Service/Radar/ValueListItemService.php';
require __DIR__ . '/lib/Service/Radar/ValueListService.php';
@@ -350,6 +396,11 @@ require __DIR__ . '/lib/Service/V2/Billing/MeterEventAdjustmentService.php';
require __DIR__ . '/lib/Service/V2/Billing/MeterEventService.php';
require __DIR__ . '/lib/Service/V2/Billing/MeterEventSessionService.php';
require __DIR__ . '/lib/Service/V2/Billing/MeterEventStreamService.php';
require __DIR__ . '/lib/Service/V2/Core/AccountLinkService.php';
require __DIR__ . '/lib/Service/V2/Core/AccountService.php';
require __DIR__ . '/lib/Service/V2/Core/AccountTokenService.php';
require __DIR__ . '/lib/Service/V2/Core/Accounts/PersonService.php';
require __DIR__ . '/lib/Service/V2/Core/Accounts/PersonTokenService.php';
require __DIR__ . '/lib/Service/V2/Core/CoreServiceFactory.php';
require __DIR__ . '/lib/Service/V2/Core/EventDestinationService.php';
require __DIR__ . '/lib/Service/V2/Core/EventService.php';
@@ -400,6 +451,11 @@ require __DIR__ . '/lib/Treasury/TransactionEntry.php';
require __DIR__ . '/lib/V2/Billing/MeterEvent.php';
require __DIR__ . '/lib/V2/Billing/MeterEventAdjustment.php';
require __DIR__ . '/lib/V2/Billing/MeterEventSession.php';
require __DIR__ . '/lib/V2/Core/Account.php';
require __DIR__ . '/lib/V2/Core/AccountLink.php';
require __DIR__ . '/lib/V2/Core/AccountPerson.php';
require __DIR__ . '/lib/V2/Core/AccountPersonToken.php';
require __DIR__ . '/lib/V2/Core/AccountToken.php';
require __DIR__ . '/lib/V2/Core/EventDestination.php';
require __DIR__ . '/lib/V2/DeletedObject.php';
require __DIR__ . '/lib/WebhookEndpoint.php';

View File

@@ -8,6 +8,9 @@ export PATH := "vendor/bin:" + env_var('PATH')
_default:
just --list --unsorted
# ⭐ run format, lint, and tests to prepare for CI
prepare: format lint test
# install vendored dependencies
install *args:
composer install {{ if is_dependency() == "true" {"--quiet"} else {""} }} {{ args }}
@@ -24,7 +27,7 @@ ci-test autoload:
# ⭐ format all files
format *args: install
PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix -v --using-cache=no {{ args }}
php-cs-fixer fix -v --using-cache=no {{ args }}
# check formatting for, but don't modify, files
format-check: (format "--dry-run")

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,7 @@ namespace Stripe;
* Account Links are the means by which a Connect platform grants a connected account permission to access
* Stripe-hosted applications, such as Connect Onboarding.
*
* Related guide: <a href="https://stripe.com/docs/connect/custom/hosted-onboarding">Connect Onboarding</a>
* Related guide: <a href="https://docs.stripe.com/connect/custom/hosted-onboarding">Connect Onboarding</a>
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.

View File

@@ -11,11 +11,11 @@ namespace Stripe;
* to your user. Do not save AccountSessions to your database as they expire relatively
* quickly, and cannot be used more than once.
*
* Related guide: <a href="https://stripe.com/docs/connect/get-started-connect-embedded-components">Connect embedded components</a>
* Related guide: <a href="https://docs.stripe.com/connect/get-started-connect-embedded-components">Connect embedded components</a>
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string $account The ID of the account the AccountSession was created for
* @property string $client_secret <p>The client secret of this AccountSession. Used on the client to set up secure access to the given <code>account</code>.</p><p>The client secret can be used to provide access to <code>account</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.</p><p>Refer to our docs to <a href="https://stripe.com/docs/connect/get-started-connect-embedded-components">setup Connect embedded components</a> and learn about how <code>client_secret</code> should be handled.</p>
* @property string $client_secret <p>The client secret of this AccountSession. Used on the client to set up secure access to the given <code>account</code>.</p><p>The client secret can be used to provide access to <code>account</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.</p><p>Refer to our docs to <a href="https://docs.stripe.com/connect/get-started-connect-embedded-components">setup Connect embedded components</a> and learn about how <code>client_secret</code> should be handled.</p>
* @property (object{account_management: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), account_onboarding: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), balances: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, edit_payout_schedule: bool, external_account_collection: bool, instant_payouts: bool, standard_payouts: bool}&StripeObject)}&StripeObject), disputes_list: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), documents: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), financial_account: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool, send_money: bool, transfer_balance: bool}&StripeObject)}&StripeObject), financial_account_transactions: (object{enabled: bool, features: (object{card_spend_dispute_management: bool}&StripeObject)}&StripeObject), instant_payouts_promotion: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool, instant_payouts: bool}&StripeObject)}&StripeObject), issuing_card: (object{enabled: bool, features: (object{card_management: bool, card_spend_dispute_management: bool, cardholder_management: bool, spend_control_management: bool}&StripeObject)}&StripeObject), issuing_cards_list: (object{enabled: bool, features: (object{card_management: bool, card_spend_dispute_management: bool, cardholder_management: bool, disable_stripe_user_authentication: bool, spend_control_management: bool}&StripeObject)}&StripeObject), notification_banner: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), payment_details: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payment_disputes: (object{enabled: bool, features: (object{destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payments: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payout_details: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), payouts: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, edit_payout_schedule: bool, external_account_collection: bool, instant_payouts: bool, standard_payouts: bool}&StripeObject)}&StripeObject), payouts_list: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), tax_registrations: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), tax_settings: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject)}&StripeObject) $components
* @property int $expires_at The timestamp at which this AccountSession will expire.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.

View File

@@ -269,7 +269,7 @@ class ApiRequestor
case 'idempotency_error':
return Exception\IdempotencyException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
// The beginning of the section generated from our OpenAPI spec
// switchCases: The beginning of the section generated from our OpenAPI spec
case 'temporary_session_expired':
return Exception\TemporarySessionExpiredException::factory(
$msg,
@@ -280,7 +280,7 @@ class ApiRequestor
$code
);
// The end of the section generated from our OpenAPI spec
// switchCases: The end of the section generated from our OpenAPI spec
default:
return self::_specificV1APIError($rbody, $rcode, $rheaders, $resp, $errorData);
}
@@ -369,6 +369,41 @@ class ApiRequestor
return false;
}
/**
* @static
*
* @return string the detected AI agent slug, or empty string if none detected
*/
const AI_AGENTS = [
// aiAgents: The beginning of the section generated from our OpenAPI spec
['ANTIGRAVITY_CLI_ALIAS', 'antigravity'],
['CLAUDECODE', 'claude_code'],
['CLINE_ACTIVE', 'cline'],
['CODEX_SANDBOX', 'codex_cli'],
['CODEX_THREAD_ID', 'codex_cli'],
['CODEX_SANDBOX_NETWORK_DISABLED', 'codex_cli'],
['CODEX_CI', 'codex_cli'],
['CURSOR_AGENT', 'cursor'],
['GEMINI_CLI', 'gemini_cli'],
['OPENCODE', 'open_code'],
// aiAgents: The end of the section generated from our OpenAPI spec
];
private static function _detectAIAgent($getEnv = null)
{
if (null === $getEnv) {
$getEnv = '\getenv';
}
foreach (self::AI_AGENTS as $agent) {
$val = $getEnv($agent[0]);
if (false !== $val && '' !== $val) {
return $agent[1];
}
}
return '';
}
/**
* @static
*
@@ -404,6 +439,12 @@ class ApiRequestor
$ua['application'] = $appInfo;
}
$aiAgent = self::_detectAIAgent();
if ('' !== $aiAgent) {
$uaString .= ' AIAgent/' . $aiAgent;
$ua['ai_agent'] = $aiAgent;
}
return [
'X-Stripe-Client-User-Agent' => \json_encode($ua),
'User-Agent' => $uaString,

View File

@@ -9,7 +9,7 @@ namespace Stripe;
* has previously been created but not yet refunded. Funds will be refunded to
* the Stripe account from which the fee was originally collected.
*
* Related guide: <a href="https://stripe.com/docs/connect/destination-charges#refunding-app-fee">Refunding application fees</a>
* Related guide: <a href="https://docs.stripe.com/connect/destination-charges#refunding-app-fee">Refunding application fees</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -18,7 +18,7 @@ namespace Stripe;
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @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>.
* @property ApplicationFee|string $fee ID of the application fee that was refunded.
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|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.
*/
class ApplicationFeeRefund extends ApiResource
{

View File

@@ -13,7 +13,7 @@ namespace Stripe\Apps;
*
* A <code>user</code> scoped secret is accessible by the app backend and one specific Dashboard user. Use the <code>user</code> scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
*
* Related guide: <a href="https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects">Store data between page reloads</a>
* Related guide: <a href="https://docs.stripe.com/stripe-apps/store-auth-data-custom-objects">Store data between page reloads</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.

View File

@@ -10,10 +10,10 @@ namespace Stripe;
*
* The top-level <code>available</code> and <code>pending</code> comprise your &quot;payments balance.&quot;
*
* Related guide: <a href="https://stripe.com/docs/payments/balances">Balances and settlement time</a>, <a href="https://stripe.com/docs/connect/account-balances">Understanding Connect account balances</a>
* Related guide: <a href="https://docs.stripe.com/payments/balances">Balances and settlement time</a>, <a href="https://docs.stripe.com/connect/account-balances">Understanding Connect account balances</a>
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property (object{amount: int, currency: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[] $available Available funds that you can transfer or pay out automatically by Stripe or explicitly through the <a href="https://stripe.com/docs/api#transfers">Transfers API</a> or <a href="https://stripe.com/docs/api#payouts">Payouts API</a>. You can find the available balance for each currency and payment type in the <code>source_types</code> property.
* @property (object{amount: int, currency: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[] $available Available funds that you can transfer or pay out automatically by Stripe or explicitly through the <a href="https://api.stripe.com#transfers">Transfers API</a> or <a href="https://api.stripe.com#payouts">Payouts API</a>. You can find the available balance for each currency and payment type in the <code>source_types</code> property.
* @property null|(object{amount: int, currency: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[] $connect_reserved Funds held due to negative balances on connected accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">account.controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the <code>source_types</code> property.
* @property null|(object{amount: int, currency: string, net_available?: (object{amount: int, destination: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[], source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[] $instant_available Funds that you can pay out using Instant Payouts.
* @property null|(object{available: (object{amount: int, currency: string, source_types?: (object{bank_account?: int, card?: int, fpx?: int}&StripeObject)}&StripeObject)[]}&StripeObject) $issuing

View File

@@ -8,7 +8,7 @@ namespace Stripe;
* Balance transactions represent funds moving through your Stripe account.
* Stripe creates them for every type of transaction that enters or leaves your Stripe account balance.
*
* Related guide: <a href="https://stripe.com/docs/reports/balance-transaction-types">Balance transaction types</a>
* Related guide: <a href="https://docs.stripe.com/reports/balance-transaction-types">Balance transaction types</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -25,7 +25,7 @@ namespace Stripe;
* @property string $reporting_category Learn more about how <a href="https://stripe.com/docs/reports/reporting-categories">reporting categories</a> can help you understand balance transactions from an accounting perspective.
* @property null|ApplicationFee|ApplicationFeeRefund|Charge|ConnectCollectionTransfer|CustomerCashBalanceTransaction|Dispute|Issuing\Authorization|Issuing\Dispute|Issuing\Transaction|Payout|Refund|ReserveTransaction|string|TaxDeductedAtSource|Topup|Transfer|TransferReversal $source This transaction relates to the Stripe object.
* @property string $status The transaction's net funds status in the Stripe balance, which are either <code>available</code> or <code>pending</code>.
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>anticipation_repayment</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>climate_order_purchase</code>, <code>climate_order_refund</code>, <code>connect_collection_transfer</code>, <code>contribution</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>obligation_outbound</code>, <code>obligation_reversal_inbound</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_network_reserve_hold</code>, <code>payment_network_reserve_release</code>, <code>payment_refund</code>, <code>payment_reversal</code>, <code>payment_unreconciled</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>payout_minimum_balance_hold</code>, <code>payout_minimum_balance_release</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>stripe_balance_payment_debit</code>, <code>stripe_balance_payment_debit_reversal</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. Learn more about <a href="https://stripe.com/docs/reports/balance-transaction-types">balance transaction types and what they represent</a>. To classify transactions for accounting purposes, consider <code>reporting_category</code> instead.
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>anticipation_repayment</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>climate_order_purchase</code>, <code>climate_order_refund</code>, <code>connect_collection_transfer</code>, <code>contribution</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>obligation_outbound</code>, <code>obligation_reversal_inbound</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_network_reserve_hold</code>, <code>payment_network_reserve_release</code>, <code>payment_refund</code>, <code>payment_reversal</code>, <code>payment_unreconciled</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>payout_minimum_balance_hold</code>, <code>payout_minimum_balance_release</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>reserve_hold</code>, <code>reserve_release</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>stripe_balance_payment_debit</code>, <code>stripe_balance_payment_debit_reversal</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. Learn more about <a href="https://stripe.com/docs/reports/balance-transaction-types">balance transaction types and what they represent</a>. To classify transactions for accounting purposes, consider <code>reporting_category</code> instead.
*/
class BalanceTransaction extends ApiResource
{
@@ -34,6 +34,7 @@ class BalanceTransaction extends ApiResource
const BALANCE_TYPE_ISSUING = 'issuing';
const BALANCE_TYPE_PAYMENTS = 'payments';
const BALANCE_TYPE_REFUND_AND_DISPUTE_PREFUNDING = 'refund_and_dispute_prefunding';
const BALANCE_TYPE_RISK_RESERVED = 'risk_reserved';
const TYPE_ADJUSTMENT = 'adjustment';
const TYPE_ADVANCE = 'advance';
@@ -67,6 +68,8 @@ class BalanceTransaction extends ApiResource
const TYPE_REFUND = 'refund';
const TYPE_REFUND_FAILURE = 'refund_failure';
const TYPE_RESERVED_FUNDS = 'reserved_funds';
const TYPE_RESERVE_HOLD = 'reserve_hold';
const TYPE_RESERVE_RELEASE = 'reserve_release';
const TYPE_RESERVE_TRANSACTION = 'reserve_transaction';
const TYPE_STRIPE_BALANCE_PAYMENT_DEBIT = 'stripe_balance_payment_debit';
const TYPE_STRIPE_BALANCE_PAYMENT_DEBIT_REVERSAL = 'stripe_balance_payment_debit_reversal';

View File

@@ -26,9 +26,9 @@ namespace Stripe;
* @property null|Customer|string $customer The ID of the customer that the bank account is associated with.
* @property null|bool $default_for_currency Whether this bank account is the default external account for its currency.
* @property null|string $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
* @property null|(object{currently_due: null|string[], errors: null|(object{code: string, reason: string, requirement: string}&StripeObject)[], past_due: null|string[], pending_verification: null|string[]}&StripeObject) $future_requirements Information about the <a href="https://stripe.com/docs/connect/custom-accounts/future-requirements">upcoming new requirements for the bank account</a>, including what information needs to be collected, and by when.
* @property null|(object{currently_due: null|string[], errors: null|(object{code: string, reason: string, requirement: string}&StripeObject)[], past_due: null|string[], pending_verification: null|string[]}&StripeObject) $future_requirements Information about the <a href="https://docs.stripe.com/connect/custom-accounts/future-requirements">upcoming new requirements for the bank account</a>, including what information needs to be collected, and by when.
* @property string $last4 The last four digits of the bank account number.
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|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.
* @property null|(object{currently_due: null|string[], errors: null|(object{code: string, reason: string, requirement: string}&StripeObject)[], past_due: null|string[], pending_verification: null|string[]}&StripeObject) $requirements Information about the requirements for the bank account, including what information needs to be collected.
* @property null|string $routing_number The routing transit number for the bank account.
* @property string $status <p>For bank accounts, possible values are <code>new</code>, <code>validated</code>, <code>verified</code>, <code>verification_failed</code>, <code>tokenized_account_number_deactivated</code> or <code>errored</code>. A bank account that hasn't had any activity or validation performed is <code>new</code>. If Stripe can determine that the bank account exists, its status will be <code>validated</code>. Note that there often isnt enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be <code>verified</code>. If the verification failed for any reason, such as microdeposit failure, the status will be <code>verification_failed</code>. If the status is <code>tokenized_account_number_deactivated</code>, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to <code>errored</code> and will not continue to send <a href="https://stripe.com/docs/payouts#payout-schedule">scheduled payouts</a> until the bank details are updated.</p><p>For external accounts, possible values are <code>new</code>, <code>errored</code>, <code>verification_failed</code>, and <code>tokenized_account_number_deactivated</code>. If a payout fails, the status is set to <code>errored</code> and scheduled payouts are stopped until account details are updated. In the US and India, if we can't <a href="https://support.stripe.com/questions/bank-account-ownership-verification">verify the owner of the bank account</a>, we'll set the status to <code>verification_failed</code>. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.</p>

View File

@@ -13,7 +13,7 @@ namespace Stripe\Billing;
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|string $status Status of the alert. This can be active, inactive or archived.
* @property string $title Title of the alert.
* @property null|(object{filters: null|((object{customer: null|string|\Stripe\Customer, type: string}&\Stripe\StripeObject))[], gte: int, meter: Meter|string, recurrence: string}&\Stripe\StripeObject) $usage_threshold Encapsulates configuration of the alert to monitor usage on a specific <a href="https://stripe.com/docs/api/billing/meter">Billing Meter</a>.
* @property null|(object{filters: null|((object{customer: null|string|\Stripe\Customer, type: string}&\Stripe\StripeObject))[], gte: int, meter: Meter|string, recurrence: string}&\Stripe\StripeObject) $usage_threshold Encapsulates configuration of the alert to monitor usage on a specific <a href="https://docs.stripe.com/api/billing/meter">Billing Meter</a>.
*/
class Alert extends \Stripe\ApiResource
{

View File

@@ -10,6 +10,7 @@ namespace Stripe\Billing;
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property ((object{available_balance: (object{monetary: null|(object{currency: string, value: int}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), ledger_balance: (object{monetary: null|(object{currency: string, value: int}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject))[] $balances The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry.
* @property string|\Stripe\Customer $customer The customer the balance is for.
* @property null|string $customer_account The account the balance is for.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
*/
class CreditBalanceSummary extends \Stripe\SingletonApiResource

View File

@@ -28,7 +28,7 @@ class CreditBalanceTransaction extends \Stripe\ApiResource
/**
* Retrieve a list of credit balance transactions.
*
* @param null|array{credit_grant?: string, customer: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|array{credit_grant?: string, customer?: string, customer_account?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|array|string $opts
*
* @return \Stripe\Collection<CreditBalanceTransaction> of ApiResources

View File

@@ -16,10 +16,11 @@ namespace Stripe\Billing;
* @property string $category The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string|\Stripe\Customer $customer ID of the customer receiving the billing credits.
* @property null|string $customer_account ID of the account representing the customer receiving the billing credits
* @property null|int $effective_at The time when the billing credits become effective-when they're eligible for use.
* @property null|int $expires_at The time when the billing credits expire. If not present, the billing credits don't expire.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property \Stripe\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.
* @property null|string $name A descriptive name shown in dashboard.
* @property null|int $priority The priority for applying this credit grant. The highest priority is 0 and the lowest is 100.
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this credit grant belongs to.
@@ -38,7 +39,7 @@ class CreditGrant extends \Stripe\ApiResource
/**
* Creates a credit grant.
*
* @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category?: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: array<string, string>, name?: string, priority?: int} $params
* @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type?: string, prices?: array{id: string}[]}}, category?: string, customer?: string, customer_account?: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: array<string, string>, name?: string, priority?: int} $params
* @param null|array|string $options
*
* @return CreditGrant the created resource
@@ -60,7 +61,7 @@ class CreditGrant extends \Stripe\ApiResource
/**
* Retrieve a list of credit grants.
*
* @param null|array{customer?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|array{customer?: string, customer_account?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
* @param null|array|string $opts
*
* @return \Stripe\Collection<CreditGrant> of ApiResources

View File

@@ -12,7 +12,7 @@ namespace Stripe\Billing;
* @property string $event_name The name of the meter event. Corresponds with the <code>event_name</code> field on a meter.
* @property string $identifier A unique identifier for the event.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \Stripe\StripeObject $payload The payload of the event. This contains the fields corresponding to a meter's <code>customer_mapping.event_payload_key</code> (default is <code>stripe_customer_id</code>) and <code>value_settings.event_payload_key</code> (default is <code>value</code>). Read more about the <a href="https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides">payload</a>.
* @property \Stripe\StripeObject $payload The payload of the event. This contains the fields corresponding to a meter's <code>customer_mapping.event_payload_key</code> (default is <code>stripe_customer_id</code>) and <code>value_settings.event_payload_key</code> (default is <code>value</code>). Read more about the <a href="https://docs.stripe.com/billing/subscriptions/usage-based/meters/configure#meter-configuration-attributes">payload</a>.
* @property int $timestamp The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
*/
class MeterEvent extends \Stripe\ApiResource

View File

@@ -13,12 +13,12 @@ namespace Stripe\BillingPortal;
* @property null|string|\Stripe\Application $application ID of the Connect Application that created the configuration.
* @property (object{headline: null|string, privacy_policy_url: null|string, terms_of_service_url: null|string}&\Stripe\StripeObject) $business_profile
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $default_return_url The default URL to redirect customers to when they click on the portal's link to return to your website. This can be <a href="https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url">overriden</a> when creating the session.
* @property (object{customer_update: (object{allowed_updates: string[], enabled: bool}&\Stripe\StripeObject), invoice_history: (object{enabled: bool}&\Stripe\StripeObject), payment_method_update: (object{enabled: bool, payment_method_configuration: null|string}&\Stripe\StripeObject), subscription_cancel: (object{cancellation_reason: (object{enabled: bool, options: string[]}&\Stripe\StripeObject), enabled: bool, mode: string, proration_behavior: string}&\Stripe\StripeObject), subscription_update: (object{default_allowed_updates: string[], enabled: bool, products?: null|((object{adjustable_quantity: (object{enabled: bool, maximum: null|int, minimum: int}&\Stripe\StripeObject), prices: string[], product: string}&\Stripe\StripeObject))[], proration_behavior: string, schedule_at_period_end: (object{conditions: (object{type: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), trial_update_behavior: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $features
* @property null|string $default_return_url The default URL to redirect customers to when they click on the portal's link to return to your website. This can be <a href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden</a> when creating the session.
* @property (object{customer_update: (object{allowed_updates: string[], enabled: bool}&\Stripe\StripeObject), invoice_history: (object{enabled: bool}&\Stripe\StripeObject), payment_method_update: (object{enabled: bool, payment_method_configuration: null|string}&\Stripe\StripeObject), subscription_cancel: (object{cancellation_reason: (object{enabled: bool, options: string[]}&\Stripe\StripeObject), enabled: bool, mode: string, proration_behavior: string}&\Stripe\StripeObject), subscription_update: (object{billing_cycle_anchor: null|string, default_allowed_updates: string[], enabled: bool, products?: null|((object{adjustable_quantity: (object{enabled: bool, maximum: null|int, minimum: int}&\Stripe\StripeObject), prices: string[], product: string}&\Stripe\StripeObject))[], proration_behavior: string, schedule_at_period_end: (object{conditions: (object{type: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), trial_update_behavior: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $features
* @property bool $is_default Whether the configuration is the default. If <code>true</code>, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property (object{enabled: bool, url: null|string}&\Stripe\StripeObject) $login_page
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|\Stripe\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.
* @property null|string $name The name of the configuration.
* @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
*/
@@ -32,7 +32,7 @@ class Configuration extends \Stripe\ApiResource
* Creates a configuration that describes the functionality and behavior of a
* PortalSession.
*
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{billing_cycle_anchor?: string, default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
* @param null|array|string $options
*
* @return Configuration the created resource
@@ -93,7 +93,7 @@ class Configuration extends \Stripe\ApiResource
* Updates a configuration that describes the functionality of the customer portal.
*
* @param string $id the ID of the resource to update
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{billing_cycle_anchor?: string, default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
* @param null|array|string $opts
*
* @return Configuration the updated resource

View File

@@ -25,10 +25,11 @@ namespace Stripe\BillingPortal;
* @property Configuration|string $configuration The configuration used by this session, describing the features available.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $customer The ID of the customer for this session.
* @property null|(object{after_completion: (object{hosted_confirmation: null|(object{custom_message: null|string}&\Stripe\StripeObject), redirect: null|(object{return_url: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), subscription_cancel: null|(object{retention: null|(object{coupon_offer: null|(object{coupon: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), subscription: string}&\Stripe\StripeObject), subscription_update: null|(object{subscription: string}&\Stripe\StripeObject), subscription_update_confirm: null|(object{discounts: null|((object{coupon: null|string, promotion_code: null|string}&\Stripe\StripeObject))[], items: ((object{id: null|string, price: null|string, quantity?: int}&\Stripe\StripeObject))[], subscription: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject) $flow Information about a specific flow for the customer to go through. See the <a href="https://stripe.com/docs/customer-management/portal-deep-links">docs</a> to learn more about using customer portal deep links and flows.
* @property null|string $customer_account The ID of the account for this session.
* @property null|(object{after_completion: (object{hosted_confirmation: null|(object{custom_message: null|string}&\Stripe\StripeObject), redirect: null|(object{return_url: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), subscription_cancel: null|(object{retention: null|(object{coupon_offer: null|(object{coupon: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), subscription: string}&\Stripe\StripeObject), subscription_update: null|(object{subscription: string}&\Stripe\StripeObject), subscription_update_confirm: null|(object{discounts: null|((object{coupon: null|string, promotion_code: null|string}&\Stripe\StripeObject))[], items: ((object{id: null|string, price: null|string, quantity?: int}&\Stripe\StripeObject))[], subscription: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject) $flow Information about a specific flow for the customer to go through. See the <a href="https://docs.stripe.com/customer-management/portal-deep-links">docs</a> to learn more about using customer portal deep links and flows.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|string $locale The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customers <code>preferred_locales</code> or browsers locale is used.
* @property null|string $on_behalf_of The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this <code>on_behalf_of</code> account appear in the portal. For more information, see the <a href="https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant">docs</a>. Use the <a href="https://stripe.com/docs/api/accounts/object#account_object-settings-branding">Accounts API</a> to modify the <code>on_behalf_of</code> account's branding settings, which the portal displays.
* @property null|string $on_behalf_of The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this <code>on_behalf_of</code> account appear in the portal. For more information, see the <a href="https://docs.stripe.com/connect/separate-charges-and-transfers#settlement-merchant">docs</a>. Use the <a href="https://docs.stripe.com/api/accounts/object#account_object-settings-branding">Accounts API</a> to modify the <code>on_behalf_of</code> account's branding settings, which the portal displays.
* @property null|string $return_url The URL to redirect customers to when they click on the portal's link to return to your website.
* @property string $url The short-lived URL of the session that gives customers access to the customer portal.
*/
@@ -39,7 +40,7 @@ class Session extends \Stripe\ApiResource
/**
* Creates a session of the customer portal.
*
* @param null|array{configuration?: string, customer: string, expand?: string[], flow_data?: array{after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{return_url: string}, type: string}, subscription_cancel?: array{retention?: array{coupon_offer: array{coupon: string}, type: string}, subscription: string}, subscription_update?: array{subscription: string}, subscription_update_confirm?: array{discounts?: array{coupon?: string, promotion_code?: string}[], items: array{id: string, price?: string, quantity?: int}[], subscription: string}, type: string}, locale?: string, on_behalf_of?: string, return_url?: string} $params
* @param null|array{configuration?: string, customer?: string, customer_account?: string, expand?: string[], flow_data?: array{after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{return_url: string}, type: string}, subscription_cancel?: array{retention?: array{coupon_offer: array{coupon: string}, type: string}, subscription: string}, subscription_update?: array{subscription: string}, subscription_update_confirm?: array{discounts?: array{coupon?: string, promotion_code?: string}[], items: array{id: string, price?: string, quantity?: int}[], subscription: string}, type: string}, locale?: string, on_behalf_of?: string, return_url?: string} $params
* @param null|array|string $options
*
* @return Session the created resource

View File

@@ -7,7 +7,7 @@ namespace Stripe;
/**
* This is an object representing a capability for a Stripe account.
*
* Related guide: <a href="https://stripe.com/docs/connect/account-capabilities">Account capabilities</a>
* Related guide: <a href="https://docs.stripe.com/connect/account-capabilities">Account capabilities</a>
*
* @property string $id The identifier for the capability.
* @property string $object String representing the object's type. Objects of the same type share the same value.

View File

@@ -9,7 +9,7 @@ namespace Stripe;
* later. You can also store multiple debit cards on a recipient in order to
* transfer to those cards later.
*
* Related guide: <a href="https://stripe.com/docs/sources/cards">Card payments with Sources</a>
* Related guide: <a href="https://docs.stripe.com/sources/cards">Card payments with Sources</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -36,7 +36,7 @@ namespace Stripe;
* @property null|string $fingerprint <p>Uniquely identifies this particular card number. You can use this attribute to check whether two customers whove signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.</p><p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.</em></p>
* @property string $funding Card funding type. Can be <code>credit</code>, <code>debit</code>, <code>prepaid</code>, or <code>unknown</code>.
* @property string $last4 The last four digits of the card.
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|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.
* @property null|string $name Cardholder name.
* @property null|(object{preferred: null|string}&StripeObject) $networks
* @property null|string $regulated_status Status of a card based on the card issuer.

View File

@@ -8,8 +8,9 @@ namespace Stripe;
* 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.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @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://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
* @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>.
* @property string $customer The ID of the customer whose cash balance this object represents.
* @property null|string $customer_account The ID of an Account representing a customer whose cash balance this object represents.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property (object{reconciliation_mode: string, using_merchant_default: bool}&StripeObject) $settings
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -25,7 +25,7 @@ namespace Stripe\Climate;
* @property ((object{delivered_at: int, location: null|(object{city: null|string, country: string, latitude: null|float, longitude: null|float, region: null|string}&\Stripe\StripeObject), metric_tons: string, registry_url: null|string, supplier: Supplier}&\Stripe\StripeObject))[] $delivery_details Details about the delivery of carbon removal for this order.
* @property int $expected_delivery_year The year this order is expected to be delivered.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property \Stripe\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.
* @property string $metric_tons Quantity of carbon removal that is included in this order.
* @property Product|string $product Unique ID for the Climate <code>Product</code> this order is purchasing.
* @property null|int $product_substituted_at Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.

File diff suppressed because one or more lines are too long

View File

@@ -6,8 +6,8 @@ namespace Stripe;
/**
* A coupon contains information about a percent-off or amount-off discount you
* might want to apply to a customer. Coupons may be applied to <a href="https://stripe.com/docs/api#subscriptions">subscriptions</a>, <a href="https://stripe.com/docs/api#invoices">invoices</a>,
* <a href="https://stripe.com/docs/api/checkout/sessions">checkout sessions</a>, <a href="https://stripe.com/docs/api#quotes">quotes</a>, and more. Coupons do not work with conventional one-off <a href="https://stripe.com/docs/api#create_charge">charges</a> or <a href="https://stripe.com/docs/api/payment_intents">payment intents</a>.
* might want to apply to a customer. Coupons may be applied to <a href="https://api.stripe.com#subscriptions">subscriptions</a>, <a href="https://api.stripe.com#invoices">invoices</a>,
* <a href="https://docs.stripe.com/api/checkout/sessions">checkout sessions</a>, <a href="https://api.stripe.com#quotes">quotes</a>, and more. Coupons do not work with conventional one-off <a href="https://api.stripe.com#create_charge">charges</a> or <a href="https://docs.stripe.com/api/payment_intents">payment intents</a>.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -20,7 +20,7 @@ namespace Stripe;
* @property null|int $duration_in_months If <code>duration</code> is <code>repeating</code>, the number of months the coupon applies. Null if coupon <code>duration</code> is <code>forever</code> or <code>once</code>.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|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.
* @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts.
* @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
* @property null|int $redeem_by Date after which the coupon can no longer be redeemed.

View File

@@ -7,7 +7,7 @@ namespace Stripe;
/**
* Issue a credit note to adjust an invoice's amount after the invoice is finalized.
*
* Related guide: <a href="https://stripe.com/docs/billing/invoices/credit-notes">Credit notes</a>
* Related guide: <a href="https://docs.stripe.com/billing/invoices/credit-notes">Credit notes</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -16,6 +16,7 @@ namespace Stripe;
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @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>.
* @property Customer|string $customer ID of the customer.
* @property null|string $customer_account ID of the account representing the customer.
* @property null|CustomerBalanceTransaction|string $customer_balance_transaction Customer balance transaction related to this credit note.
* @property int $discount_amount The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
* @property ((object{amount: int, discount: Discount|string}&StripeObject))[] $discount_amounts The aggregate amounts calculated per discount for all line items.
@@ -24,7 +25,7 @@ namespace Stripe;
* @property Collection<CreditNoteLineItem> $lines Line items that make up the credit note
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|string $memo Customer-facing text that appears on the credit note PDF.
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|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.
* @property string $number A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
* @property null|int $out_of_band_amount Amount that was credited outside of Stripe.
* @property string $pdf The link to download the PDF of the credit note.
@@ -34,7 +35,7 @@ namespace Stripe;
* @property null|string $reason Reason for issuing this credit note, one of <code>duplicate</code>, <code>fraudulent</code>, <code>order_change</code>, or <code>product_unsatisfactory</code>
* @property ((object{amount_refunded: int, payment_record_refund: null|(object{payment_record: string, refund_group: string}&StripeObject), refund: Refund|string, type: null|string}&StripeObject))[] $refunds Refunds related to this credit note.
* @property null|(object{amount_subtotal: int, amount_tax: int, amount_total: int, shipping_rate: null|ShippingRate|string, taxes?: ((object{amount: int, rate: TaxRate, taxability_reason: null|string, taxable_amount: null|int}&StripeObject))[]}&StripeObject) $shipping_cost The details of the cost of shipping, including the ShippingRate applied to the invoice.
* @property string $status Status of this credit note, one of <code>issued</code> or <code>void</code>. Learn more about <a href="https://stripe.com/docs/billing/invoices/credit-notes#voiding">voiding credit notes</a>.
* @property string $status Status of this credit note, one of <code>issued</code> or <code>void</code>. Learn more about <a href="https://docs.stripe.com/billing/invoices/credit-notes#voiding">voiding credit notes</a>.
* @property int $subtotal The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
* @property null|int $subtotal_excluding_tax The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
* @property int $total The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
@@ -107,7 +108,7 @@ class CreditNote extends ApiResource
/**
* Returns a list of credit notes.
*
* @param null|array{created?: array|int, customer?: string, ending_before?: string, expand?: string[], invoice?: string, limit?: int, starting_after?: string} $params
* @param null|array{created?: array|int, customer?: string, customer_account?: string, ending_before?: string, expand?: string[], invoice?: string, limit?: int, starting_after?: string} $params
* @param null|array|string $opts
*
* @return Collection<CreditNote> of ApiResources

View File

@@ -5,19 +5,20 @@
namespace Stripe;
/**
* This object represents a customer of your business. Use it to <a href="https://stripe.com/docs/invoicing/customer">create recurring charges</a>, <a href="https://stripe.com/docs/payments/save-during-payment">save payment</a> and contact information,
* This object represents a customer of your business. Use it to <a href="https://docs.stripe.com/invoicing/customer">create recurring charges</a>, <a href="https://docs.stripe.com/payments/save-during-payment">save payment</a> and contact information,
* and track payments that belong to the same customer.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject) $address The customer's address.
* @property null|int $balance The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance">invoice_credit_balance</a>.
* @property null|int $balance The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see <a href="https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance">invoice_credit_balance</a>.
* @property null|string $business_name The customer's business name.
* @property null|CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is &quot;cash_balance&quot;. The <code>settings[reconciliation_mode]</code> field describes if these funds apply to these payment intents manually or automatically.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> the customer can be charged in for recurring billing purposes.
* @property null|Account|BankAccount|Card|Source|string $default_source <p>ID of the default payment source for the customer.</p><p>If you use payment methods created through the PaymentMethods API, see the <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> field instead.</p>
* @property null|bool $delinquent <p>Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the <code>invoice.due_date</code> will set this field to <code>true</code>.</p><p>If an invoice becomes uncollectible by <a href="https://stripe.com/docs/billing/automatic-collection">dunning</a>, <code>delinquent</code> doesn't reset to <code>false</code>.</p><p>If you care whether the customer has paid their most recent subscription invoice, use <code>subscription.status</code> instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to <code>false</code>.</p>
* @property null|string $customer_account The ID of an Account representing a customer. You can use this ID with any v1 API that accepts a customer_account parameter.
* @property null|Account|BankAccount|Card|Source|string $default_source <p>ID of the default payment source for the customer.</p><p>If you use payment methods created through the PaymentMethods API, see the <a href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> field instead.</p>
* @property null|bool $delinquent <p>Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the <code>invoice.due_date</code> will set this field to <code>true</code>.</p><p>If an invoice becomes uncollectible by <a href="https://docs.stripe.com/billing/automatic-collection">dunning</a>, <code>delinquent</code> doesn't reset to <code>false</code>.</p><p>If you care whether the customer has paid their most recent subscription invoice, use <code>subscription.status</code> instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to <code>false</code>.</p>
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property null|Discount $discount Describes the current discount active on the customer, if there is one.
* @property null|string $email The customer's email address.
@@ -26,7 +27,7 @@ namespace Stripe;
* @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers.
* @property null|(object{custom_fields: null|(object{name: string, value: string}&StripeObject)[], default_payment_method: null|PaymentMethod|string, footer: null|string, rendering_options: null|(object{amount_tax_display: null|string, template: null|string}&StripeObject)}&StripeObject) $invoice_settings
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|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.
* @property null|string $name The customer's full name or business name.
* @property null|int $next_invoice_sequence The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.
* @property null|string $phone The customer's phone number.
@@ -133,16 +134,16 @@ class Customer extends ApiResource
/**
* Updates the specified customer by setting the values of the parameters passed.
* Any parameters not provided will be left unchanged. For example, if you pass the
* Any parameters not provided are left unchanged. For example, if you pass the
* <strong>source</strong> parameter, that becomes the customers active source
* (e.g., a card) to be used for all charges in the future. When you update a
* (such as a card) to be used for all charges in the future. When you update a
* customer to a new valid card source by passing the <strong>source</strong>
* parameter: for each of the customers current subscriptions, if the subscription
* bills automatically and is in the <code>past_due</code> state, then the latest
* open invoice for the subscription with automatic collection enabled will be
* retried. This retry will not count as an automatic retry, and will not affect
* the next regularly scheduled payment for the invoice. Changing the
* <strong>default_source</strong> for a customer will not trigger this behavior.
* open invoice for the subscription with automatic collection enabled is retried.
* This retry doesnt count as an automatic retry, and doesnt affect the next
* regularly scheduled payment for the invoice. Changing the
* <strong>default_source</strong> for a customer doesnt trigger this behavior.
*
* This request accepts mostly the same arguments as the customer creation call.
*

View File

@@ -5,12 +5,12 @@
namespace Stripe;
/**
* Each customer has a <a href="https://stripe.com/docs/api/customers/object#customer_object-balance">Balance</a> value,
* Each customer has a <a href="https://docs.stripe.com/api/customers/object#customer_object-balance">Balance</a> value,
* which denotes a debit or credit that's automatically applied to their next invoice upon finalization.
* You may modify the value directly by using the <a href="https://stripe.com/docs/api/customers/update">update customer API</a>,
* You may modify the value directly by using the <a href="https://docs.stripe.com/api/customers/update">update customer API</a>,
* or by creating a Customer Balance Transaction, which increments or decrements the customer's <code>balance</code> by the specified <code>amount</code>.
*
* Related guide: <a href="https://stripe.com/docs/billing/customer/balance">Customer balance</a>
* Related guide: <a href="https://docs.stripe.com/billing/customer/balance">Customer balance</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -20,12 +20,13 @@ namespace Stripe;
* @property null|CreditNote|string $credit_note The ID of the credit note (if any) related to the transaction.
* @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>.
* @property Customer|string $customer The ID of the customer the transaction belongs to.
* @property null|string $customer_account The ID of an Account representing a customer that the transaction belongs to.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property int $ending_balance The customer's <code>balance</code> after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
* @property null|Invoice|string $invoice The ID of the invoice (if any) related to the transaction.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property string $type Transaction type: <code>adjustment</code>, <code>applied_to_invoice</code>, <code>credit_note</code>, <code>initial</code>, <code>invoice_overpaid</code>, <code>invoice_too_large</code>, <code>invoice_too_small</code>, <code>unspent_receiver_credit</code>, <code>unapplied_from_invoice</code>, <code>checkout_session_subscription_payment</code>, or <code>checkout_session_subscription_payment_canceled</code>. See the <a href="https://stripe.com/docs/billing/customer/balance#types">Customer Balance page</a> to learn more about transaction types.
* @property null|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.
* @property string $type Transaction type: <code>adjustment</code>, <code>applied_to_invoice</code>, <code>credit_note</code>, <code>initial</code>, <code>invoice_overpaid</code>, <code>invoice_too_large</code>, <code>invoice_too_small</code>, <code>unspent_receiver_credit</code>, <code>unapplied_from_invoice</code>, <code>checkout_session_subscription_payment</code>, or <code>checkout_session_subscription_payment_canceled</code>. See the <a href="https://docs.stripe.com/billing/customer/balance#types">Customer Balance page</a> to learn more about transaction types.
*/
class CustomerBalanceTransaction extends ApiResource
{

View File

@@ -17,13 +17,14 @@ namespace Stripe;
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @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>.
* @property Customer|string $customer The customer whose available cash balance changed as a result of this transaction.
* @property int $ending_balance The total available cash balance for the specified currency after this transaction was applied. Represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
* @property null|string $customer_account The ID of an Account representing a customer whose available cash balance changed as a result of this transaction.
* @property int $ending_balance The total available cash balance for the specified currency after this transaction was applied. Represented in the <a href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit</a>.
* @property null|(object{bank_transfer: (object{eu_bank_transfer?: (object{bic: null|string, iban_last4: null|string, sender_name: null|string}&StripeObject), gb_bank_transfer?: (object{account_number_last4: null|string, sender_name: null|string, sort_code: null|string}&StripeObject), jp_bank_transfer?: (object{sender_bank: null|string, sender_branch: null|string, sender_name: null|string}&StripeObject), reference: null|string, type: string, us_bank_transfer?: (object{network?: string, sender_name: null|string}&StripeObject)}&StripeObject)}&StripeObject) $funded
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property int $net_amount The amount by which the cash balance changed, represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
* @property int $net_amount The amount by which the cash balance changed, represented in the <a href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit</a>. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
* @property null|(object{refund: Refund|string}&StripeObject) $refunded_from_payment
* @property null|(object{balance_transaction: BalanceTransaction|string}&StripeObject) $transferred_to_balance
* @property string $type The type of the cash balance transaction. New types may be added in future. See <a href="https://stripe.com/docs/payments/customer-balance#types">Customer Balance</a> to learn more about these types.
* @property string $type The type of the cash balance transaction. New types may be added in future. See <a href="https://docs.stripe.com/payments/customer-balance#types">Customer Balance</a> to learn more about these types.
* @property null|(object{payment_intent: PaymentIntent|string}&StripeObject) $unapplied_from_payment
*/
class CustomerCashBalanceTransaction extends ApiResource

View File

@@ -17,6 +17,7 @@ namespace Stripe;
* @property null|(object{buy_button: (object{enabled: bool}&StripeObject), customer_sheet: (object{enabled: bool, features: null|(object{payment_method_allow_redisplay_filters: null|string[], payment_method_remove: null|string}&StripeObject)}&StripeObject), mobile_payment_element: (object{enabled: bool, features: null|(object{payment_method_allow_redisplay_filters: null|string[], payment_method_redisplay: null|string, payment_method_remove: null|string, payment_method_save: null|string, payment_method_save_allow_redisplay_override: null|string}&StripeObject)}&StripeObject), payment_element: (object{enabled: bool, features: null|(object{payment_method_allow_redisplay_filters: string[], payment_method_redisplay: string, payment_method_redisplay_limit: null|int, payment_method_remove: string, payment_method_save: string, payment_method_save_usage: null|string}&StripeObject)}&StripeObject), pricing_table: (object{enabled: bool}&StripeObject)}&StripeObject) $components Configuration for the components supported by this Customer Session.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property Customer|string $customer The Customer the Customer Session was created for.
* @property null|string $customer_account The Account that the Customer Session was created for.
* @property int $expires_at The timestamp at which this Customer Session will expire.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
*/
@@ -29,7 +30,7 @@ class CustomerSession extends ApiResource
* you can use on your front-end to grant client-side API access for certain
* customer resources.
*
* @param null|array{components: array{buy_button?: array{enabled: bool}, customer_sheet?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_remove?: string}}, mobile_payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_remove?: string, payment_method_save?: string, payment_method_save_allow_redisplay_override?: string}}, payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_redisplay_limit?: int, payment_method_remove?: string, payment_method_save?: string, payment_method_save_usage?: string}}, pricing_table?: array{enabled: bool}}, customer: string, expand?: string[]} $params
* @param null|array{components: array{buy_button?: array{enabled: bool}, customer_sheet?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_remove?: string}}, mobile_payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_remove?: string, payment_method_save?: string, payment_method_save_allow_redisplay_override?: string}}, payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_redisplay_limit?: int, payment_method_remove?: string, payment_method_save?: string, payment_method_save_usage?: string}}, pricing_table?: array{enabled: bool}}, customer?: string, customer_account?: string, expand?: string[]} $params
* @param null|array|string $options
*
* @return CustomerSession the created resource

View File

@@ -5,15 +5,16 @@
namespace Stripe;
/**
* A discount represents the actual application of a <a href="https://stripe.com/docs/api#coupons">coupon</a> or <a href="https://stripe.com/docs/api#promotion_codes">promotion code</a>.
* A discount represents the actual application of a <a href="https://api.stripe.com#coupons">coupon</a> or <a href="https://api.stripe.com#promotion_codes">promotion code</a>.
* It contains information about when the discount began, when it will end, and what it is applied to.
*
* Related guide: <a href="https://stripe.com/docs/billing/subscriptions/discounts">Applying discounts to subscriptions</a>
* Related guide: <a href="https://docs.stripe.com/billing/subscriptions/discounts">Applying discounts to subscriptions</a>
*
* @property string $id The ID of the discount object. Discounts cannot be fetched by ID. Use <code>expand[]=discounts</code> in API calls to expand discount IDs in an array.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string $checkout_session The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
* @property null|Customer|string $customer The ID of the customer associated with this discount.
* @property null|string $customer_account The ID of the account representing the customer associated with this discount.
* @property null|int $end If the coupon has a duration of <code>repeating</code>, the date that this discount will end. If the coupon has a duration of <code>once</code> or <code>forever</code>, this attribute will be null.
* @property null|string $invoice The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
* @property null|string $invoice_item The invoice item <code>id</code> (or invoice line item <code>id</code> for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.

View File

@@ -9,7 +9,7 @@ namespace Stripe;
* When this happens, you have the opportunity to respond to the dispute with
* evidence that shows that the charge is legitimate.
*
* Related guide: <a href="https://stripe.com/docs/disputes">Disputes and fraud</a>
* Related guide: <a href="https://docs.stripe.com/disputes">Disputes and fraud</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -23,11 +23,11 @@ namespace Stripe;
* @property (object{due_by: null|int, enhanced_eligibility: (object{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}&StripeObject) $evidence_details
* @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.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @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.
* @property null|string $network_reason_code Network-dependent reason code for the dispute.
* @property null|PaymentIntent|string $payment_intent ID of the PaymentIntent that's disputed.
* @property null|(object{amazon_pay?: (object{dispute_type: null|string}&StripeObject), card?: (object{brand: string, case_type: 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
* @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://stripe.com/docs/disputes/categories">dispute reasons</a>.
* @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>.
* @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>won</code>, <code>lost</code>, or <code>prevented</code>.
*/
class Dispute extends ApiResource

View File

@@ -9,7 +9,7 @@ namespace Stripe\Entitlements;
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property Feature|string $feature The <a href="https://stripe.com/docs/api/entitlements/feature">Feature</a> that the customer is entitled to.
* @property Feature|string $feature The <a href="https://docs.stripe.com/api/entitlements/feature">Feature</a> that the customer is entitled to.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property string $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters.
*/

View File

@@ -49,6 +49,7 @@ class ErrorObject extends StripeObject
const CODE_ACCOUNT_INFORMATION_MISMATCH = 'account_information_mismatch';
const CODE_ACCOUNT_INVALID = 'account_invalid';
const CODE_ACCOUNT_NUMBER_INVALID = 'account_number_invalid';
const CODE_ACCOUNT_TOKEN_REQUIRED_FOR_V2_ACCOUNT = 'account_token_required_for_v2_account';
const CODE_ACSS_DEBIT_SESSION_INCOMPLETE = 'acss_debit_session_incomplete';
const CODE_ALIPAY_UPGRADE_REQUIRED = 'alipay_upgrade_required';
const CODE_AMOUNT_TOO_LARGE = 'amount_too_large';
@@ -187,6 +188,7 @@ class ErrorObject extends StripeObject
const CODE_RATE_LIMIT = 'rate_limit';
const CODE_REFER_TO_CUSTOMER = 'refer_to_customer';
const CODE_REFUND_DISPUTED_PAYMENT = 'refund_disputed_payment';
const CODE_REQUEST_BLOCKED = 'request_blocked';
const CODE_RESOURCE_ALREADY_EXISTS = 'resource_already_exists';
const CODE_RESOURCE_MISSING = 'resource_missing';
const CODE_RETURN_INTENT_ALREADY_PROCESSED = 'return_intent_already_processed';
@@ -205,6 +207,8 @@ class ErrorObject extends StripeObject
const CODE_SKU_INACTIVE = 'sku_inactive';
const CODE_STATE_UNSUPPORTED = 'state_unsupported';
const CODE_STATUS_TRANSITION_INVALID = 'status_transition_invalid';
const CODE_STORER_CAPABILITY_MISSING = 'storer_capability_missing';
const CODE_STORER_CAPABILITY_NOT_ACTIVE = 'storer_capability_not_active';
const CODE_STRIPE_TAX_INACTIVE = 'stripe_tax_inactive';
const CODE_TAX_ID_INVALID = 'tax_id_invalid';
const CODE_TAX_ID_PROHIBITED = 'tax_id_prohibited';

View File

@@ -225,6 +225,13 @@ class Event extends ApiResource
const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed';
const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded';
const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated';
const RESERVE_HOLD_CREATED = 'reserve.hold.created';
const RESERVE_HOLD_UPDATED = 'reserve.hold.updated';
const RESERVE_PLAN_CREATED = 'reserve.plan.created';
const RESERVE_PLAN_DISABLED = 'reserve.plan.disabled';
const RESERVE_PLAN_EXPIRED = 'reserve.plan.expired';
const RESERVE_PLAN_UPDATED = 'reserve.plan.updated';
const RESERVE_RELEASE_CREATED = 'reserve.release.created';
const REVIEW_CLOSED = 'review.closed';
const REVIEW_OPENED = 'review.opened';
const SETUP_INTENT_CANCELED = 'setup_intent.canceled';
@@ -479,6 +486,13 @@ class Event extends ApiResource
const TYPE_REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed';
const TYPE_REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded';
const TYPE_REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated';
const TYPE_RESERVE_HOLD_CREATED = 'reserve.hold.created';
const TYPE_RESERVE_HOLD_UPDATED = 'reserve.hold.updated';
const TYPE_RESERVE_PLAN_CREATED = 'reserve.plan.created';
const TYPE_RESERVE_PLAN_DISABLED = 'reserve.plan.disabled';
const TYPE_RESERVE_PLAN_EXPIRED = 'reserve.plan.expired';
const TYPE_RESERVE_PLAN_UPDATED = 'reserve.plan.updated';
const TYPE_RESERVE_RELEASE_CREATED = 'reserve.release.created';
const TYPE_REVIEW_CLOSED = 'review.closed';
const TYPE_REVIEW_OPENED = 'review.opened';
const TYPE_SETUP_INTENT_CANCELED = 'setup_intent.canceled';

View File

@@ -0,0 +1,10 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\EventData;
/**
* @property string $updated_capability Open Enum. The capability which had its status updated.
*/
class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventData extends \Stripe\StripeObject {}

View File

@@ -0,0 +1,10 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\EventData;
/**
* @property string $updated_capability Open Enum. The capability which had its status updated.
*/
class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventData extends \Stripe\StripeObject {}

View File

@@ -0,0 +1,10 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\EventData;
/**
* @property string $updated_capability Open Enum. The capability which had its status updated.
*/
class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventData extends \Stripe\StripeObject {}

View File

@@ -0,0 +1,12 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\EventData;
/**
* @property string $account_id The ID of the v2 account.
* @property string[] $configurations Configurations on the Account that was onboarded via the account link.
* @property string $use_case Open Enum. The use case type of the account link that has been completed.
*/
class V2CoreAccountLinkReturnedEventData extends \Stripe\StripeObject {}

View File

@@ -0,0 +1,10 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\EventData;
/**
* @property string $account_id The ID of the v2 account.
*/
class V2CoreAccountPersonCreatedEventData extends \Stripe\StripeObject {}

View File

@@ -0,0 +1,10 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\EventData;
/**
* @property string $account_id The ID of the v2 account.
*/
class V2CoreAccountPersonDeletedEventData extends \Stripe\StripeObject {}

View File

@@ -0,0 +1,10 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\EventData;
/**
* @property string $account_id The ID of the v2 account.
*/
class V2CoreAccountPersonUpdatedEventData extends \Stripe\StripeObject {}

View File

@@ -24,6 +24,7 @@ class V1BillingMeterErrorReportTriggeredEvent extends \Stripe\V2\Core\Event
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountClosedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account.closed';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountClosedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account.closed';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountClosedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountCreatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account.created';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountCreatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account.created';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountCreatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,42 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
* @property \Stripe\EventData\V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventData $data data associated with the event
*/
class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[configuration.customer].capability_status_updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
public static function constructFrom($values, $opts = null, $apiMode = 'v2')
{
$evt = parent::constructFrom($values, $opts, $apiMode);
if (null !== $evt->data) {
$evt->data = \Stripe\EventData\V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventData::constructFrom($evt->data, $opts, $apiMode);
}
return $evt;
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[configuration.customer].capability_status_updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingConfigurationCustomerUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[configuration.customer].updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[configuration.customer].updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingConfigurationCustomerUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,42 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
* @property \Stripe\EventData\V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventData $data data associated with the event
*/
class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[configuration.merchant].capability_status_updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
public static function constructFrom($values, $opts = null, $apiMode = 'v2')
{
$evt = parent::constructFrom($values, $opts, $apiMode);
if (null !== $evt->data) {
$evt->data = \Stripe\EventData\V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventData::constructFrom($evt->data, $opts, $apiMode);
}
return $evt;
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[configuration.merchant].capability_status_updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingConfigurationMerchantUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[configuration.merchant].updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[configuration.merchant].updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingConfigurationMerchantUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,42 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
* @property \Stripe\EventData\V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventData $data data associated with the event
*/
class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[configuration.recipient].capability_status_updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
public static function constructFrom($values, $opts = null, $apiMode = 'v2')
{
$evt = parent::constructFrom($values, $opts, $apiMode);
if (null !== $evt->data) {
$evt->data = \Stripe\EventData\V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventData::constructFrom($evt->data, $opts, $apiMode);
}
return $evt;
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[configuration.recipient].capability_status_updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingConfigurationRecipientUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[configuration.recipient].updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[configuration.recipient].updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingConfigurationRecipientUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingDefaultsUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[defaults].updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingDefaultsUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[defaults].updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingDefaultsUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingFutureRequirementsUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[future_requirements].updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[future_requirements].updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingFutureRequirementsUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingIdentityUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[identity].updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingIdentityUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[identity].updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingIdentityUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingRequirementsUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account[requirements].updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountIncludingRequirementsUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account[requirements].updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountIncludingRequirementsUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,23 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\EventData\V2CoreAccountLinkReturnedEventData $data data associated with the event
*/
class V2CoreAccountLinkReturnedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account_link.returned';
public static function constructFrom($values, $opts = null, $apiMode = 'v2')
{
$evt = parent::constructFrom($values, $opts, $apiMode);
if (null !== $evt->data) {
$evt->data = \Stripe\EventData\V2CoreAccountLinkReturnedEventData::constructFrom($evt->data, $opts, $apiMode);
}
return $evt;
}
}

View File

@@ -0,0 +1,22 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
class V2CoreAccountLinkReturnedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account_link.returned';
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountLinkReturnedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
}

View File

@@ -0,0 +1,42 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
* @property \Stripe\EventData\V2CoreAccountPersonCreatedEventData $data data associated with the event
*/
class V2CoreAccountPersonCreatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account_person.created';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\AccountPerson
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
public static function constructFrom($values, $opts = null, $apiMode = 'v2')
{
$evt = parent::constructFrom($values, $opts, $apiMode);
if (null !== $evt->data) {
$evt->data = \Stripe\EventData\V2CoreAccountPersonCreatedEventData::constructFrom($evt->data, $opts, $apiMode);
}
return $evt;
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountPersonCreatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account_person.created';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountPersonCreatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\AccountPerson
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,42 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
* @property \Stripe\EventData\V2CoreAccountPersonDeletedEventData $data data associated with the event
*/
class V2CoreAccountPersonDeletedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account_person.deleted';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\AccountPerson
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
public static function constructFrom($values, $opts = null, $apiMode = 'v2')
{
$evt = parent::constructFrom($values, $opts, $apiMode);
if (null !== $evt->data) {
$evt->data = \Stripe\EventData\V2CoreAccountPersonDeletedEventData::constructFrom($evt->data, $opts, $apiMode);
}
return $evt;
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountPersonDeletedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account_person.deleted';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountPersonDeletedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\AccountPerson
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,42 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
* @property \Stripe\EventData\V2CoreAccountPersonUpdatedEventData $data data associated with the event
*/
class V2CoreAccountPersonUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account_person.updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\AccountPerson
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
public static function constructFrom($values, $opts = null, $apiMode = 'v2')
{
$evt = parent::constructFrom($values, $opts, $apiMode);
if (null !== $evt->data) {
$evt->data = \Stripe\EventData\V2CoreAccountPersonUpdatedEventData::constructFrom($evt->data, $opts, $apiMode);
}
return $evt;
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountPersonUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account_person.updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountPersonUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\AccountPerson
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountUpdatedEvent extends \Stripe\V2\Core\Event
{
const LOOKUP_TYPE = 'v2.core.account.updated';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreAccountUpdatedEventNotification extends \Stripe\V2\Core\EventNotification
{
const LOOKUP_TYPE = 'v2.core.account.updated';
public $related_object;
/**
* Retrieves the full event object from the API. Make an API request on every call.
*
* @return V2CoreAccountUpdatedEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchEvent()
{
return parent::fetchEvent();
}
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\Core\Account
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
return parent::fetchRelatedObject();
}
}

View File

@@ -23,6 +23,7 @@ class V2CoreEventDestinationPingEvent extends \Stripe\V2\Core\Event
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request('get', $this->related_object->url, [], [
'stripe_context' => $this->context,
'headers' => ['Stripe-Request-Trigger' => 'event=' . $this->id],
], [], $apiMode);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);

View File

@@ -13,13 +13,13 @@ namespace Stripe;
* rate (for example, to dynamically price an item for a user with a default
* payment in a foreign currency).
*
* Please refer to our <a href="https://stripe.com/docs/fx-rates">Exchange Rates API</a> guide for more details.
* Please refer to our <a href="https://docs.stripe.com/fx-rates">Exchange Rates API</a> guide for more details.
*
* <em>[Note: this integration path is supported but no longer recommended]</em> Additionally,
* you can guarantee that a charge is made with an exchange rate that you expect is
* current. To do so, you must pass in the exchange_rate to charges endpoints. If the
* value is no longer up to date, the charge won't go through. Please refer to our
* <a href="https://stripe.com/docs/exchange-rates">Using with charges</a> guide for more details.
* <a href="https://docs.stripe.com/exchange-rates">Using with charges</a> guide for more details.
*
* -----
*

View File

@@ -6,20 +6,20 @@ namespace Stripe;
/**
* This object represents files hosted on Stripe's servers. You can upload
* files with the <a href="https://stripe.com/docs/api#create_file">create file</a> request
* files with the <a href="https://api.stripe.com#create_file">create file</a> request
* (for example, when uploading dispute evidence). Stripe also
* creates files independently (for example, the results of a <a href="#scheduled_queries">Sigma scheduled
* query</a>).
*
* Related guide: <a href="https://stripe.com/docs/file-upload">File upload guide</a>
* Related guide: <a href="https://docs.stripe.com/file-upload">File upload guide</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|int $expires_at The file expires and isn't available at this time in epoch seconds.
* @property null|string $filename The suitable name for saving the file to a filesystem.
* @property null|Collection<FileLink> $links A list of <a href="https://stripe.com/docs/api#file_links">file links</a> that point at this file.
* @property string $purpose The <a href="https://stripe.com/docs/file-upload#uploading-a-file">purpose</a> of the uploaded file.
* @property null|Collection<FileLink> $links A list of <a href="https://api.stripe.com#file_links">file links</a> that point at this file.
* @property string $purpose The <a href="https://docs.stripe.com/file-upload#uploading-a-file">purpose</a> of the uploaded file.
* @property int $size The size of the file object in bytes.
* @property null|string $title A suitable title for the document.
* @property null|string $type The returned file type (for example, <code>csv</code>, <code>pdf</code>, <code>jpg</code>, or <code>png</code>).
@@ -48,6 +48,8 @@ class File extends ApiResource
const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload';
const PURPOSE_TERMINAL_ANDROID_APK = 'terminal_android_apk';
const PURPOSE_TERMINAL_READER_SPLASHSCREEN = 'terminal_reader_splashscreen';
const PURPOSE_TERMINAL_WIFI_CERTIFICATE = 'terminal_wifi_certificate';
const PURPOSE_TERMINAL_WIFI_PRIVATE_KEY = 'terminal_wifi_private_key';
/**
* Returns a list of the files that your account has access to. Stripe sorts and

View File

@@ -16,7 +16,7 @@ namespace Stripe;
* @property null|int $expires_at Time that the link expires.
* @property File|string $file The file object this link points to.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @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.
* @property null|string $url The publicly accessible URL to download the file.
*/
class FileLink extends ApiResource

View File

@@ -9,7 +9,7 @@ namespace Stripe\FinancialConnections;
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|(object{account?: string|\Stripe\Account, customer?: string|\Stripe\Customer, type: string}&\Stripe\StripeObject) $account_holder The account holder that this account belongs to.
* @property null|(object{account?: string|\Stripe\Account, customer?: string|\Stripe\Customer, customer_account?: string, type: string}&\Stripe\StripeObject) $account_holder The account holder that this account belongs to.
* @property null|((object{expected_expiry_date: null|int, identifier_type: string, status: string, supported_networks: string[]}&\Stripe\StripeObject))[] $account_numbers Details about the account numbers.
* @property null|(object{as_of: int, cash?: (object{available: null|\Stripe\StripeObject}&\Stripe\StripeObject), credit?: (object{used: null|\Stripe\StripeObject}&\Stripe\StripeObject), current: \Stripe\StripeObject, type: string}&\Stripe\StripeObject) $balance The most recent information about the account's balance.
* @property null|(object{last_attempted_at: int, next_refresh_available_at: null|int, status: string}&\Stripe\StripeObject) $balance_refresh The state of the most recent attempt to refresh the account balance.
@@ -25,7 +25,7 @@ namespace Stripe\FinancialConnections;
* @property string $status The status of the link to the account.
* @property string $subcategory <p>If <code>category</code> is <code>cash</code>, one of:</p><p>- <code>checking</code> - <code>savings</code> - <code>other</code></p><p>If <code>category</code> is <code>credit</code>, one of:</p><p>- <code>mortgage</code> - <code>line_of_credit</code> - <code>credit_card</code> - <code>other</code></p><p>If <code>category</code> is <code>investment</code> or <code>other</code>, this will be <code>other</code>.</p>
* @property null|string[] $subscriptions The list of data refresh subscriptions requested on this account.
* @property string[] $supported_payment_method_types The <a href="https://stripe.com/docs/api/payment_methods/object#payment_method_object-type">PaymentMethod type</a>(s) that can be created from this account.
* @property string[] $supported_payment_method_types The <a href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-type">PaymentMethod type</a>(s) that can be created from this account.
* @property null|(object{id: string, last_attempted_at: int, next_refresh_available_at: null|int, status: string}&\Stripe\StripeObject) $transaction_refresh The state of the most recent attempt to refresh the account transactions.
*/
class Account extends \Stripe\ApiResource
@@ -51,7 +51,7 @@ class Account extends \Stripe\ApiResource
/**
* Returns a list of Financial Connections <code>Account</code> objects.
*
* @param null|array{account_holder?: array{account?: string, customer?: string}, ending_before?: string, expand?: string[], limit?: int, session?: string, starting_after?: string} $params
* @param null|array{account_holder?: array{account?: string, customer?: string, customer_account?: string}, ending_before?: string, expand?: string[], limit?: int, session?: string, starting_after?: string} $params
* @param null|array|string $opts
*
* @return \Stripe\Collection<Account> of ApiResources

View File

@@ -9,7 +9,7 @@ namespace Stripe\FinancialConnections;
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|(object{account?: string|\Stripe\Account, customer?: string|\Stripe\Customer, type: string}&\Stripe\StripeObject) $account_holder The account holder for whom accounts are collected in this session.
* @property null|(object{account?: string|\Stripe\Account, customer?: string|\Stripe\Customer, customer_account?: string, type: string}&\Stripe\StripeObject) $account_holder The account holder for whom accounts are collected in this session.
* @property \Stripe\Collection<Account> $accounts The accounts that were collected as part of this Session.
* @property null|string $client_secret A value that will be passed to the client to launch the authentication flow.
* @property null|(object{account_subcategories: null|string[], countries: null|string[]}&\Stripe\StripeObject) $filters
@@ -27,7 +27,7 @@ class Session extends \Stripe\ApiResource
* <code>Session</code>. The sessions <code>client_secret</code> can be used to
* launch the flow using Stripe.js.
*
* @param null|array{account_holder: array{account?: string, customer?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[]}, permissions: string[], prefetch?: string[], return_url?: string} $params
* @param null|array{account_holder: array{account?: string, customer?: string, customer_account?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[]}, permissions: string[], prefetch?: string[], return_url?: string} $params
* @param null|array|string $options
*
* @return Session the created resource

View File

@@ -26,7 +26,7 @@ namespace Stripe\Forwarding;
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|\Stripe\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.
* @property string $payment_method The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
* @property string[] $replacements The field kinds to be replaced in the forwarded request.
* @property null|(object{destination_duration: int, destination_ip_address: string}&\Stripe\StripeObject) $request_context Context about the request from Stripe's servers to the destination endpoint.

View File

@@ -5,11 +5,11 @@
namespace Stripe;
/**
* Each customer has a <a href="https://stripe.com/docs/api/customers/object#customer_object-balance"><code>balance</code></a> that is
* Each customer has a <a href="https://docs.stripe.com/api/customers/object#customer_object-balance"><code>balance</code></a> that is
* automatically applied to future invoices and payments using the <code>customer_balance</code> payment method.
* Customers can fund this balance by initiating a bank transfer to any account in the
* <code>financial_addresses</code> field.
* Related guide: <a href="https://stripe.com/docs/payments/customer-balance/funding-instructions">Customer balance funding instructions</a>.
* Related guide: <a href="https://docs.stripe.com/payments/customer-balance/funding-instructions">Customer balance funding instructions</a>.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property (object{country: string, financial_addresses: ((object{aba?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, account_type: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_name: string, routing_number: string}&StripeObject), iban?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bic: string, country: string, iban: string}&StripeObject), sort_code?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), sort_code: string}&StripeObject), spei?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_code: string, bank_name: string, clabe: string}&StripeObject), supported_networks?: string[], swift?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: string, account_number: string, account_type: string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_name: string, swift_code: string}&StripeObject), type: string, zengin?: (object{account_holder_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), account_holder_name: null|string, account_number: null|string, account_type: null|string, bank_address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), bank_code: null|string, bank_name: null|string, branch_code: null|string, branch_name: null|string}&StripeObject)}&StripeObject))[], type: string}&StripeObject) $bank_transfer

View File

@@ -758,7 +758,9 @@ class CurlClient implements ClientInterface, StreamingClientInterface
private function closeCurlHandle()
{
if (null !== $this->curlHandle) {
\curl_close($this->curlHandle);
if (PHP_VERSION_ID < 80000) {
\curl_close($this->curlHandle);
}
$this->curlHandle = null;
}
}

View File

@@ -11,11 +11,11 @@ namespace Stripe\Identity;
* appropriate sub-resource: <code>document</code>, <code>id_number</code>, <code>selfie</code>.
*
* Each VerificationReport contains a copy of any data collected by the user as well as
* reference IDs which can be used to access collected images through the <a href="https://stripe.com/docs/api/files">FileUpload</a>
* reference IDs which can be used to access collected images through the <a href="https://docs.stripe.com/api/files">FileUpload</a>
* API. To configure and create VerificationReports, use the
* <a href="https://stripe.com/docs/api/identity/verification_sessions">VerificationSession</a> API.
* <a href="https://docs.stripe.com/api/identity/verification_sessions">VerificationSession</a> API.
*
* Related guide: <a href="https://stripe.com/docs/identity/verification-sessions#results">Accessing verification results</a>.
* Related guide: <a href="https://docs.stripe.com/identity/verification-sessions#results">Accessing verification results</a>.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.

View File

@@ -15,25 +15,26 @@ namespace Stripe\Identity;
* the verification flow. The VerificationSession contains the user's verified data after
* verification checks are complete.
*
* Related guide: <a href="https://stripe.com/docs/identity/verification-sessions">The Verification Sessions API</a>
* Related guide: <a href="https://docs.stripe.com/identity/verification-sessions">The Verification Sessions API</a>
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string $client_reference_id A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
* @property null|string $client_secret The short-lived client secret used by Stripe.js to <a href="https://stripe.com/docs/js/identity/modal">show a verification modal</a> inside your app. This client secret expires after 24 hours and can only be used once. Dont store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on <a href="https://stripe.com/docs/identity/verification-sessions#client-secret">passing the client secret to the frontend</a> to learn more.
* @property null|string $client_secret The short-lived client secret used by Stripe.js to <a href="https://docs.stripe.com/js/identity/modal">show a verification modal</a> inside your app. This client secret expires after 24 hours and can only be used once. Dont store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on <a href="https://docs.stripe.com/identity/verification-sessions#client-secret">passing the client secret to the frontend</a> to learn more.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|(object{code: null|string, reason: null|string}&\Stripe\StripeObject) $last_error If present, this property tells you the last error encountered when processing the verification.
* @property null|string|VerificationReport $last_verification_report ID of the most recent VerificationReport. <a href="https://stripe.com/docs/identity/verification-sessions#results">Learn more about accessing detailed verification results.</a>
* @property null|string|VerificationReport $last_verification_report ID of the most recent VerificationReport. <a href="https://docs.stripe.com/identity/verification-sessions#results">Learn more about accessing detailed verification results.</a>
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property \Stripe\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.
* @property null|(object{document?: (object{allowed_types?: string[], require_id_number?: bool, require_live_capture?: bool, require_matching_selfie?: bool}&\Stripe\StripeObject), email?: (object{require_verification?: bool}&\Stripe\StripeObject), id_number?: (object{}&\Stripe\StripeObject), matching?: (object{dob?: string, name?: string}&\Stripe\StripeObject), phone?: (object{require_verification?: bool}&\Stripe\StripeObject)}&\Stripe\StripeObject) $options A set of options for the sessions verification checks.
* @property null|(object{email?: string, phone?: string}&\Stripe\StripeObject) $provided_details Details provided about the user being verified. These details may be shown to the user.
* @property null|(object{status: string}&\Stripe\StripeObject) $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
* @property null|string $related_customer Customer ID
* @property null|string $related_customer_account The ID of the Account representing a customer.
* @property null|(object{account: string, person: string}&\Stripe\StripeObject) $related_person
* @property string $status Status of this VerificationSession. <a href="https://stripe.com/docs/identity/how-sessions-work">Learn more about the lifecycle of sessions</a>.
* @property string $type The type of <a href="https://stripe.com/docs/identity/verification-checks">verification check</a> to be performed.
* @property null|string $url The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Dont store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on <a href="https://stripe.com/docs/identity/verify-identity-documents?platform=web&amp;type=redirect">verifying identity documents</a> to learn how to redirect users to Stripe.
* @property string $status Status of this VerificationSession. <a href="https://docs.stripe.com/identity/how-sessions-work">Learn more about the lifecycle of sessions</a>.
* @property string $type The type of <a href="https://docs.stripe.com/identity/verification-checks">verification check</a> to be performed.
* @property null|string $url The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Dont store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on <a href="https://docs.stripe.com/identity/verify-identity-documents?platform=web&amp;type=redirect">verifying identity documents</a> to learn how to redirect users to Stripe.
* @property null|string $verification_flow The configuration token of a verification flow from the dashboard.
* @property null|(object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), dob?: null|(object{day: null|int, month: null|int, year: null|int}&\Stripe\StripeObject), email: null|string, first_name: null|string, id_number?: null|string, id_number_type: null|string, last_name: null|string, phone: null|string, sex?: null|string, unparsed_place_of_birth?: null|string, unparsed_sex?: null|string}&\Stripe\StripeObject) $verified_outputs The users verified data.
*/
@@ -65,7 +66,7 @@ class VerificationSession extends \Stripe\ApiResource
* Related guide: <a href="/docs/identity/verify-identity-documents">Verify your
* users identity documents</a>
*
* @param null|array{client_reference_id?: string, expand?: string[], metadata?: array<string, string>, options?: array{document?: null|array{allowed_types?: string[], require_id_number?: bool, require_live_capture?: bool, require_matching_selfie?: bool}}, provided_details?: array{email?: string, phone?: string}, related_customer?: string, related_person?: array{account: string, person: string}, return_url?: string, type?: string, verification_flow?: string} $params
* @param null|array{client_reference_id?: string, expand?: string[], metadata?: array<string, string>, options?: array{document?: null|array{allowed_types?: string[], require_id_number?: bool, require_live_capture?: bool, require_matching_selfie?: bool}}, provided_details?: array{email?: string, phone?: string}, related_customer?: string, related_customer_account?: string, related_person?: array{account: string, person: string}, return_url?: string, type?: string, verification_flow?: string} $params
* @param null|array|string $options
*
* @return VerificationSession the created resource
@@ -87,7 +88,7 @@ class VerificationSession extends \Stripe\ApiResource
/**
* Returns a list of VerificationSessions.
*
* @param null|array{client_reference_id?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, related_customer?: string, starting_after?: string, status?: string} $params
* @param null|array{client_reference_id?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, related_customer?: string, related_customer_account?: string, starting_after?: string, status?: string} $params
* @param null|array|string $opts
*
* @return \Stripe\Collection<VerificationSession> of ApiResources

View File

@@ -8,13 +8,13 @@ namespace Stripe;
* Invoices are statements of amounts owed by a customer, and are either
* generated one-off, or generated periodically from a subscription.
*
* They contain <a href="https://stripe.com/docs/api#invoiceitems">invoice items</a>, and proration adjustments
* They contain <a href="https://api.stripe.com#invoiceitems">invoice items</a>, and proration adjustments
* that may be caused by subscription upgrades/downgrades (if necessary).
*
* If your invoice is configured to be billed through automatic charges,
* Stripe automatically finalizes your invoice and attempts payment. Note
* that finalizing the invoice,
* <a href="https://stripe.com/docs/invoicing/integration/automatic-advancement-collection">when automatic</a>, does
* <a href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">when automatic</a>, does
* not happen immediately as the invoice is created. Stripe waits
* until one hour after the last webhook was successfully sent (or the last
* webhook timed out after failing). If you (and the platforms you may have
@@ -34,9 +34,9 @@ namespace Stripe;
* customer's credit balance which is applied to the next invoice.
*
* More details on the customer's credit balance are
* <a href="https://stripe.com/docs/billing/customer/balance">here</a>.
* <a href="https://docs.stripe.com/billing/customer/balance">here</a>.
*
* Related guide: <a href="https://stripe.com/docs/billing/invoices/sending">Send invoices to customers</a>
* Related guide: <a href="https://docs.stripe.com/billing/invoices/sending">Send invoices to customers</a>
*
* @property string $id Unique identifier for the object. For preview invoices created using the <a href="https://stripe.com/docs/api/invoices/create_preview">create preview</a> endpoint, this id will be prefixed with <code>upcoming_in</code>.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -51,7 +51,7 @@ namespace Stripe;
* @property null|Application|string $application ID of the Connect Application that created the invoice.
* @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
* @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the <code>invoice.created</code> webhook, for example, so you might not want to display that invoice as unpaid to your users.
* @property null|bool $auto_advance Controls whether Stripe performs <a href="https://stripe.com/docs/invoicing/integration/automatic-advancement-collection">automatic collection</a> of the invoice. If <code>false</code>, the invoice's state doesn't automatically advance without an explicit action.
* @property null|bool $auto_advance Controls whether Stripe performs <a href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">automatic collection</a> of the invoice. If <code>false</code>, the invoice's state doesn't automatically advance without an explicit action.
* @property (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject), provider: null|string, status: null|string}&StripeObject) $automatic_tax
* @property null|int $automatically_finalizes_at The time when this invoice is currently scheduled to be automatically finalized. The field will be <code>null</code> if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be <code>null</code> - see <code>finalized_at</code> for the time when an already-finalized invoice was finalized.
* @property null|string $billing_reason <p>Indicates the reason why the invoice was created.</p><p>* <code>manual</code>: Unrelated to a subscription, for example, created via the invoice editor. * <code>subscription</code>: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. * <code>subscription_create</code>: A new subscription was created. * <code>subscription_cycle</code>: A subscription advanced into a new period. * <code>subscription_threshold</code>: A subscription reached a billing threshold. * <code>subscription_update</code>: A subscription was updated. * <code>upcoming</code>: Reserved for upcoming invoices created through the Create Preview Invoice API or when an <code>invoice.upcoming</code> event is generated for an upcoming invoice on a subscription.</p>
@@ -60,7 +60,8 @@ namespace Stripe;
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @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>.
* @property null|(object{name: string, value: string}&StripeObject)[] $custom_fields Custom fields displayed on the invoice.
* @property null|Customer|string $customer The ID of the customer who will be billed.
* @property null|Customer|string $customer The ID of the customer to bill.
* @property null|string $customer_account The ID of the account representing the customer to bill.
* @property null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject) $customer_address The customer's address. Until the invoice is finalized, this field will equal <code>customer.address</code>. Once the invoice is finalized, this field will no longer be updated.
* @property null|string $customer_email The customer's email. Until the invoice is finalized, this field will equal <code>customer.email</code>. Once the invoice is finalized, this field will no longer be updated.
* @property null|string $customer_name The customer's name. Until the invoice is finalized, this field will equal <code>customer.name</code>. Once the invoice is finalized, this field will no longer be updated.
@@ -77,7 +78,7 @@ namespace Stripe;
* @property null|int $effective_at The date when this invoice is in effect. Same as <code>finalized_at</code> unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
* @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
* @property null|string $footer Footer displayed on the invoice.
* @property null|(object{action: string, invoice: Invoice|string}&StripeObject) $from_invoice Details of the invoice that was cloned. See the <a href="https://stripe.com/docs/invoicing/invoice-revisions">revision documentation</a> for more details.
* @property null|(object{action: string, invoice: Invoice|string}&StripeObject) $from_invoice Details of the invoice that was cloned. See the <a href="https://docs.stripe.com/invoicing/invoice-revisions">revision documentation</a> for more details.
* @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
* @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
* @property (object{account?: Account|string, type: string}&StripeObject) $issuer
@@ -85,13 +86,13 @@ namespace Stripe;
* @property null|Invoice|string $latest_revision The ID of the most recent non-draft revision of this invoice
* @property Collection<InvoiceLineItem> $lines The individual line items that make up the invoice. <code>lines</code> is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|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.
* @property null|int $next_payment_attempt The time at which payment will next be attempted. This value will be <code>null</code> for invoices where <code>collection_method=send_invoice</code>.
* @property null|string $number A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
* @property null|Account|string $on_behalf_of The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices with Connect</a> documentation for details.
* @property null|Account|string $on_behalf_of The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the <a href="https://docs.stripe.com/billing/invoices/connect">Invoices with Connect</a> documentation for details.
* @property null|(object{quote_details: null|(object{quote: string}&StripeObject), subscription_details: null|(object{metadata: null|StripeObject, subscription: string|Subscription, subscription_proration_date?: int}&StripeObject), type: string}&StripeObject) $parent The parent that generated this invoice
* @property (object{default_mandate: null|string, payment_method_options: null|(object{acss_debit: null|(object{mandate_options?: (object{transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), bancontact: null|(object{preferred_language: string}&StripeObject), card: null|(object{installments?: (object{enabled: null|bool}&StripeObject), request_three_d_secure: null|string}&StripeObject), customer_balance: null|(object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), type: null|string}&StripeObject), funding_type: null|string}&StripeObject), konbini: null|(object{}&StripeObject), sepa_debit: null|(object{}&StripeObject), us_bank_account: null|(object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[]}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject), payment_method_types: null|string[]}&StripeObject) $payment_settings
* @property null|Collection<InvoicePayment> $payments Payments for this invoice
* @property (object{default_mandate: null|string, payment_method_options: null|(object{acss_debit: null|(object{mandate_options?: (object{transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), bancontact: null|(object{preferred_language: string}&StripeObject), card: null|(object{installments?: (object{enabled: null|bool}&StripeObject), request_three_d_secure: null|string}&StripeObject), customer_balance: null|(object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), type: null|string}&StripeObject), funding_type: null|string}&StripeObject), konbini: null|(object{}&StripeObject), payto: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, purpose: null|string}&StripeObject)}&StripeObject), sepa_debit: null|(object{}&StripeObject), us_bank_account: null|(object{financial_connections?: (object{filters?: (object{account_subcategories?: string[]}&StripeObject), permissions?: string[], prefetch: null|string[]}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject), payment_method_types: null|string[]}&StripeObject) $payment_settings
* @property null|Collection<InvoicePayment> $payments Payments for this invoice. Use <a href="/api/invoice-payment">invoice payment</a> to get more details.
* @property int $period_end End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the <a href="/api/invoices/line_item#invoice_line_item_object-period">line item period</a> to get the service period for each price.
* @property int $period_start Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the <a href="/api/invoices/line_item#invoice_line_item_object-period">line item period</a> to get the service period for each price.
* @property int $post_payment_credit_notes_amount Total amount of all post-payment credit notes issued for this invoice.
@@ -102,7 +103,7 @@ namespace Stripe;
* @property null|(object{address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), carrier?: null|string, name?: string, phone?: null|string, tracking_number?: null|string}&StripeObject) $shipping_details Shipping details for the invoice. The Invoice PDF will use the <code>shipping_details</code> value if it is set, otherwise the PDF will render the shipping address from the customer.
* @property int $starting_balance Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
* @property null|string $statement_descriptor Extra information about an invoice for the customer's credit card statement.
* @property null|string $status The status of the invoice, one of <code>draft</code>, <code>open</code>, <code>paid</code>, <code>uncollectible</code>, or <code>void</code>. <a href="https://stripe.com/docs/billing/invoices/workflow#workflow-overview">Learn more</a>
* @property null|string $status The status of the invoice, one of <code>draft</code>, <code>open</code>, <code>paid</code>, <code>uncollectible</code>, or <code>void</code>. <a href="https://docs.stripe.com/billing/invoices/workflow#workflow-overview">Learn more</a>
* @property (object{finalized_at: null|int, marked_uncollectible_at: null|int, paid_at: null|int, voided_at: null|int}&StripeObject) $status_transitions
* @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
* @property null|int $subtotal_excluding_tax The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
@@ -113,7 +114,7 @@ namespace Stripe;
* @property null|int $total_excluding_tax The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
* @property null|((object{amount: int, credit_balance_transaction?: null|Billing\CreditBalanceTransaction|string, discount?: Discount|string, type: string}&StripeObject))[] $total_pretax_credit_amounts Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
* @property null|((object{amount: int, tax_behavior: string, tax_rate_details: null|(object{tax_rate: string}&StripeObject), taxability_reason: string, taxable_amount: null|int, type: string}&StripeObject))[] $total_taxes The aggregate tax information of all line items.
* @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have <a href="https://stripe.com/docs/billing/webhooks#understand">been exhausted</a>. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
* @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have <a href="https://docs.stripe.com/billing/webhooks#understand">been exhausted</a>. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
*/
class Invoice extends ApiResource
{
@@ -148,10 +149,10 @@ class Invoice extends ApiResource
/**
* This endpoint creates a draft invoice for a given customer. The invoice remains
* a draft until you <a href="#finalize_invoice">finalize</a> the invoice, which
* allows you to <a href="#pay_invoice">pay</a> or <a href="#send_invoice">send</a>
* the invoice to your customers.
* allows you to <a href="/api/invoices/pay">pay</a> or <a
* href="/api/invoices/send">send</a> the invoice to your customers.
*
* @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, currency?: string, custom_fields?: null|array{name: string, value: string}[], customer?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: int, expand?: string[], footer?: string, from_invoice?: array{action: string, invoice: string}, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, number?: string, on_behalf_of?: string, payment_settings?: array{default_mandate?: null|string, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[]}, pending_invoice_items_behavior?: string, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array<string, array{amount: int, tax_behavior?: string}>}, metadata?: array<string, string>, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, subscription?: string, transfer_data?: array{amount?: int, destination: string}} $params
* @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, currency?: string, custom_fields?: null|array{name: string, value: string}[], customer?: string, customer_account?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: int, expand?: string[], footer?: string, from_invoice?: array{action: string, invoice: string}, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, number?: string, on_behalf_of?: string, payment_settings?: array{default_mandate?: null|string, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[]}, pending_invoice_items_behavior?: string, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array<string, array{amount: int, tax_behavior?: string}>}, metadata?: array<string, string>, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, subscription?: string, transfer_data?: array{amount?: int, destination: string}} $params
* @param null|array|string $options
*
* @return Invoice the created resource
@@ -199,7 +200,7 @@ class Invoice extends ApiResource
* invoices are returned sorted by creation date, with the most recently created
* invoices appearing first.
*
* @param null|array{collection_method?: string, created?: array|int, customer?: string, due_date?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string, subscription?: string} $params
* @param null|array{collection_method?: string, created?: array|int, customer?: string, customer_account?: string, due_date?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string, subscription?: string} $params
* @param null|array|string $opts
*
* @return Collection<Invoice> of ApiResources
@@ -243,7 +244,7 @@ class Invoice extends ApiResource
* invoices, pass <code>auto_advance=false</code>.
*
* @param string $id the ID of the resource to update
* @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: null|int, expand?: string[], footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, number?: null|string, on_behalf_of?: null|string, payment_settings?: array{default_mandate?: null|string, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[]}, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: null|array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array<string, array{amount: int, tax_behavior?: string}>}, metadata?: array<string, string>, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, transfer_data?: null|array{amount?: int, destination: string}} $params
* @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: null|int, expand?: string[], footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, number?: null|string, on_behalf_of?: null|string, payment_settings?: array{default_mandate?: null|string, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[]}, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: null|array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array<string, array{amount: int, tax_behavior?: string}>}, metadata?: array<string, string>, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, transfer_data?: null|array{amount?: int, destination: string}} $params
* @param null|array|string $opts
*
* @return Invoice the updated resource

View File

@@ -5,31 +5,32 @@
namespace Stripe;
/**
* Invoice Items represent the component lines of an <a href="https://stripe.com/docs/api/invoices">invoice</a>. When you create an invoice item with an <code>invoice</code> field, it is attached to the specified invoice and included as <a href="https://stripe.com/docs/api/invoices/line_item">an invoice line item</a> within <a href="https://stripe.com/docs/api/invoices/object#invoice_object-lines">invoice.lines</a>.
* Invoice Items represent the component lines of an <a href="https://docs.stripe.com/api/invoices">invoice</a>. When you create an invoice item with an <code>invoice</code> field, it is attached to the specified invoice and included as <a href="https://docs.stripe.com/api/invoices/line_item">an invoice line item</a> within <a href="https://docs.stripe.com/api/invoices/object#invoice_object-lines">invoice.lines</a>.
*
* Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined
* with a <a href="https://stripe.com/docs/api/subscriptions">subscription</a>. Sometimes you want to add a charge or credit to a customer, but actually charge
* with a <a href="https://docs.stripe.com/api/subscriptions">subscription</a>. Sometimes you want to add a charge or credit to a customer, but actually charge
* or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges
* (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.
*
* Related guides: <a href="https://stripe.com/docs/invoicing/integration">Integrate with the Invoicing API</a>, <a href="https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items">Subscription Invoices</a>.
* Related guides: <a href="https://docs.stripe.com/invoicing/integration">Integrate with the Invoicing API</a>, <a href="https://docs.stripe.com/billing/invoices/subscription#adding-upcoming-invoice-items">Subscription Invoices</a>.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $amount Amount (in the <code>currency</code> specified) of the invoice item. This should always be equal to <code>unit_amount * quantity</code>.
* @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>.
* @property Customer|string $customer The ID of the customer who will be billed when this invoice item is billed.
* @property Customer|string $customer The ID of the customer to bill for this invoice item.
* @property null|string $customer_account The ID of the account to bill for this invoice item.
* @property int $date Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations.
* @property null|(Discount|string)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
* @property null|Invoice|string $invoice The ID of the invoice this invoice item belongs to.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/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.
* @property null|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.
* @property null|int $net_amount The amount after discounts, but before credits and taxes. This field is <code>null</code> for <code>discountable=true</code> items.
* @property null|(object{subscription_details: null|(object{subscription: string, subscription_item?: string}&StripeObject), type: string}&StripeObject) $parent The parent that generated this invoice item.
* @property (object{end: int, start: int}&StripeObject) $period
* @property null|(object{price_details?: (object{price: string, product: string}&StripeObject), type: string, unit_amount_decimal: null|string}&StripeObject) $pricing The pricing information of the invoice item.
* @property null|(object{price_details?: (object{price: Price|string, product: string}&StripeObject), type: string, unit_amount_decimal: null|string}&StripeObject) $pricing The pricing information of the invoice item.
* @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
* @property null|(object{discount_amounts: ((object{amount: int, discount: Discount|string}&StripeObject))[]}&StripeObject) $proration_details
* @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
@@ -47,7 +48,7 @@ class InvoiceItem extends ApiResource
* no invoice is specified, the item will be on the next invoice created for the
* customer specified.
*
* @param null|array{amount?: int, currency?: string, customer: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, subscription?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: string[], unit_amount_decimal?: string} $params
* @param null|array{amount?: int, currency?: string, customer?: string, customer_account?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, subscription?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: string[], unit_amount_decimal?: string} $params
* @param null|array|string $options
*
* @return InvoiceItem the created resource
@@ -93,7 +94,7 @@ class InvoiceItem extends ApiResource
* Returns a list of your invoice items. Invoice items are returned sorted by
* creation date, with the most recently created invoice items appearing first.
*
* @param null|array{created?: array|int, customer?: string, ending_before?: string, expand?: string[], invoice?: string, limit?: int, pending?: bool, starting_after?: string} $params
* @param null|array{created?: array|int, customer?: string, customer_account?: string, ending_before?: string, expand?: string[], invoice?: string, limit?: int, pending?: bool, starting_after?: string} $params
* @param null|array|string $opts
*
* @return Collection<InvoiceItem> of ApiResources

View File

@@ -5,9 +5,9 @@
namespace Stripe;
/**
* Invoice Line Items represent the individual lines within an <a href="https://stripe.com/docs/api/invoices">invoice</a> and only exist within the context of an invoice.
* Invoice Line Items represent the individual lines within an <a href="https://docs.stripe.com/api/invoices">invoice</a> and only exist within the context of an invoice.
*
* Each line item is backed by either an <a href="https://stripe.com/docs/api/invoiceitems">invoice item</a> or a <a href="https://stripe.com/docs/api/subscription_items">subscription item</a>.
* Each line item is backed by either an <a href="https://docs.stripe.com/api/invoiceitems">invoice item</a> or a <a href="https://docs.stripe.com/api/subscription_items">subscription item</a>.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -19,13 +19,14 @@ namespace Stripe;
* @property (Discount|string)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
* @property null|string $invoice The ID of the invoice that contains this line item.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property StripeObject $metadata Set of <a href="https://stripe.com/docs/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. Note that for line items with <code>type=subscription</code>, <code>metadata</code> reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.
* @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. Note that for line items with <code>type=subscription</code>, <code>metadata</code> reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.
* @property null|(object{invoice_item_details: null|(object{invoice_item: string, proration: bool, proration_details: null|(object{credited_items: null|(object{invoice: string, invoice_line_items: string[]}&StripeObject)}&StripeObject), subscription: null|string}&StripeObject), subscription_item_details: null|(object{invoice_item: null|string, proration: bool, proration_details: null|(object{credited_items: null|(object{invoice: string, invoice_line_items: string[]}&StripeObject)}&StripeObject), subscription: null|string, subscription_item: string}&StripeObject), type: string}&StripeObject) $parent The parent that generated this line item.
* @property (object{end: int, start: int}&StripeObject) $period
* @property null|((object{amount: int, credit_balance_transaction?: null|Billing\CreditBalanceTransaction|string, discount?: Discount|string, type: string}&StripeObject))[] $pretax_credit_amounts Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.
* @property null|(object{price_details?: (object{price: string, product: string}&StripeObject), type: string, unit_amount_decimal: null|string}&StripeObject) $pricing The pricing information of the line item.
* @property null|(object{price_details?: (object{price: Price|string, product: string}&StripeObject), type: string, unit_amount_decimal: null|string}&StripeObject) $pricing The pricing information of the line item.
* @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
* @property null|string|Subscription $subscription
* @property int $subtotal The subtotal of the line item, in cents (or local equivalent), before any discounts or taxes.
* @property null|((object{amount: int, tax_behavior: string, tax_rate_details: null|(object{tax_rate: string}&StripeObject), taxability_reason: string, taxable_amount: null|int, type: string}&StripeObject))[] $taxes The tax information of the line item.
*/
class InvoiceLineItem extends ApiResource

Some files were not shown because too many files have changed in this diff Show More