mirror of
https://github.com/itflow-org/itflow
synced 2026-11-11 07:01:16 +00:00
Bump stripe-php from 21.0.0 to 21.3.2
This commit is contained in:
@@ -1,5 +1,110 @@
|
||||
# Changelog
|
||||
|
||||
## 21.3.2 - 2026-09-09
|
||||
* [#2142](https://github.com/stripe/stripe-php/pull/2142) Validate that webhook secrets are non-empty
|
||||
|
||||
## 21.3.1 - 2026-09-01
|
||||
* [#2138](https://github.com/stripe/stripe-php/pull/2138) Harden API requestor code against malicious URLs
|
||||
|
||||
## 21.3.0 - 2026-08-26
|
||||
This release changes the pinned API version to 2026-08-26.dahlia.
|
||||
|
||||
* [#2113](https://github.com/stripe/stripe-php/pull/2113) Support discriminated unions in the V2 runtime and fix array coercion
|
||||
|
||||
- Adds support for `nullable` and `discriminatedUnion` field encodings in the V2 coercion runtime, so `int64` and `decimal` fields wrapped in those schema kinds convert correctly.
|
||||
- Encoding a V2 request throws `\Stripe\Exception\InvalidArgumentException` when a polymorphic (discriminated union) parameter is missing its discriminator field, or that field is not a string.
|
||||
- Fixes `int64_string` and `decimal_string` fields inside arrays not being coerced in either direction.
|
||||
* [#2124](https://github.com/stripe/stripe-php/pull/2124) Add new `EventNotificationHandler` class for better thin event management
|
||||
|
||||
- We've been putting a lot of time into rethinking the event handling experience in the SDKs. This new class is the culmination [of that effort](https://stripe.dev/blog/event-notification-handlers-thin-events).
|
||||
- They're designed for a tight coupling with both `StripeClient` and the fully-typed nature of [thin events](https://docs.stripe.com/event-destinations#thin-events). This delivers painless event destination upgrades, in-editor checks for common mistakes, and better code modularity.
|
||||
- Now that we've released [thin event notifications for v1 objects](https://docs.stripe.com/changelog#2026-08-26.dahlia), these new handlers are our recommended path for all integrations using thin event notifications.
|
||||
- See more detailed docs here: https://docs.stripe.com/webhooks/event-notification-handlers
|
||||
* [#2118](https://github.com/stripe/stripe-php/pull/2118) Update generated code
|
||||
* Add support for new resource `Billing.FeedbackOption`
|
||||
* Add support for `all`, `create`, `deactivate`, `retrieve`, and `update` methods on resource `Billing.FeedbackOption`
|
||||
* Add support for `payment_method_settings` on `AccountSession.components` and `AccountSession.create().$params.component`
|
||||
* Add support for `feedback_options` on `BillingPortal.Configuration.features.subscription_cancel.cancellation_reason`, `BillingPortal\Configuration.create().$params.feature.subscription_cancel.cancellation_reason`, and `BillingPortal\Configuration.update().$params.feature.subscription_cancel.cancellation_reason`
|
||||
* Add support for `customer_update` on `BillingPortal.Session.flow`
|
||||
* Add support for new value `customer_update` on enum `BillingPortal.Session.flow.type`
|
||||
* Add support for `funding_source_group` on `Charge.payment_method_details.card.wallet.link` and `Charge.payment_method_details.link`
|
||||
* Add support for `funding_types_blocked` on `Checkout.Session.payment_method_options.card.restrictions` and `Checkout\Session.create().$params.payment_method_option.card.restriction`
|
||||
* Add support for `metadata` on `ConfirmationToken`
|
||||
* Add support for `active_entitlements` and `customer_portal` on `CustomerSession.components` and `CustomerSession.create().$params.component`
|
||||
* Add support for `country` on `FinancialConnections.Session.filters`
|
||||
* Add support for `frozen_fields` on `InvoiceItem`
|
||||
* Add support for `billie` on `Invoice.create().$params.payment_setting.payment_method_option`, `Invoice.payment_settings.payment_method_options`, `Invoice.update().$params.payment_setting.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 new value `billie` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`
|
||||
* ⚠️ Remove support for `cryptogram` on `PaymentAttemptRecord.payment_method_details.card.three_d_secure` and `PaymentRecord.payment_method_details.card.three_d_secure`
|
||||
* Add support for new value `touch_n_go` on enums `PaymentIntent.allowed_payment_method_types` and `SetupIntent.allowed_payment_method_types`
|
||||
* Change `PaymentIntent.allowed_payment_method_types` and `SetupIntent.allowed_payment_method_types` to be required
|
||||
* Add support for `application_fee_amount`, `application_fee_percent`, `on_behalf_of`, and `transfer_data` on `PaymentLink.update().$params`
|
||||
* Add support for `feedback_option` on `Subscription.cancel().$params.cancellation_detail`, `Subscription.cancellation_details`, and `Subscription.update().$params.cancellation_detail`
|
||||
* Add support for `igic` on `Tax.Registration.country_options.at`, `Tax.Registration.country_options.be`, `Tax.Registration.country_options.bg`, `Tax.Registration.country_options.cy`, `Tax.Registration.country_options.cz`, `Tax.Registration.country_options.de`, `Tax.Registration.country_options.dk`, `Tax.Registration.country_options.ee`, `Tax.Registration.country_options.es`, `Tax.Registration.country_options.fi`, `Tax.Registration.country_options.fr`, `Tax.Registration.country_options.gr`, `Tax.Registration.country_options.hr`, `Tax.Registration.country_options.hu`, `Tax.Registration.country_options.ie`, `Tax.Registration.country_options.it`, `Tax.Registration.country_options.lt`, `Tax.Registration.country_options.lu`, `Tax.Registration.country_options.lv`, `Tax.Registration.country_options.mt`, `Tax.Registration.country_options.nl`, `Tax.Registration.country_options.pl`, `Tax.Registration.country_options.pt`, `Tax.Registration.country_options.ro`, `Tax.Registration.country_options.se`, `Tax.Registration.country_options.si`, `Tax.Registration.country_options.sk`, `Tax\Registration.create().$params.country_option.at`, `Tax\Registration.create().$params.country_option.be`, `Tax\Registration.create().$params.country_option.bg`, `Tax\Registration.create().$params.country_option.cy`, `Tax\Registration.create().$params.country_option.cz`, `Tax\Registration.create().$params.country_option.de`, `Tax\Registration.create().$params.country_option.dk`, `Tax\Registration.create().$params.country_option.e`, `Tax\Registration.create().$params.country_option.ee`, `Tax\Registration.create().$params.country_option.fi`, `Tax\Registration.create().$params.country_option.fr`, `Tax\Registration.create().$params.country_option.gr`, `Tax\Registration.create().$params.country_option.hr`, `Tax\Registration.create().$params.country_option.hu`, `Tax\Registration.create().$params.country_option.ie`, `Tax\Registration.create().$params.country_option.it`, `Tax\Registration.create().$params.country_option.lt`, `Tax\Registration.create().$params.country_option.lu`, `Tax\Registration.create().$params.country_option.lv`, `Tax\Registration.create().$params.country_option.mt`, `Tax\Registration.create().$params.country_option.nl`, `Tax\Registration.create().$params.country_option.pl`, `Tax\Registration.create().$params.country_option.pt`, `Tax\Registration.create().$params.country_option.ro`, `Tax\Registration.create().$params.country_option.se`, `Tax\Registration.create().$params.country_option.si`, and `Tax\Registration.create().$params.country_option.sk`
|
||||
* Add support for error codes `authentication_failure`, `capability_not_active`, `expired_payment_method`, `incorrect_postal_code`, `invalid_canceled_subscription_fields`, and `payment_method_restricted` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, `StripeError`, and `Terminal.Reader.action.api_error`
|
||||
|
||||
## 21.2.1 - 2026-08-20
|
||||
* [#2126](https://github.com/stripe/stripe-php/pull/2126) Don't emit agent hint during tests. Fixes [#2125](https://github.com/stripe/stripe-php/issues/2125)
|
||||
|
||||
## 21.2.0 - 2026-08-10
|
||||
* [#2119](https://github.com/stripe/stripe-php/pull/2119) Surface `object` property on `EventNotification`
|
||||
* [#2117](https://github.com/stripe/stripe-php/pull/2117) Emit Claude Code plugin hint at module load time
|
||||
* [#2115](https://github.com/stripe/stripe-php/pull/2115) Fix v2 timestamp phpdoc type annotations ([#2114](https://github.com/stripe/stripe-php/issues/2114))
|
||||
* [#2105](https://github.com/stripe/stripe-php/pull/2105) add/adjust event parsing helpers
|
||||
|
||||
- Added methods that return their respective `Event`/`EventNotification` class instances without verifying authenticity. Use them when you've previously verified an event (e.g. you verified, put the event in a queue, and are now processing). Supports events from [AWS EventBridge](https://docs.stripe.com/event-destinations/eventbridge) and [Azure Event Grid](https://docs.stripe.com/event-destinations/eventgrid) natively.
|
||||
- `Webhook::constructEventWithoutVerification($payload)`
|
||||
- `BaseStripeClient::constructEventWithoutVerification($payload)`
|
||||
- `BaseStripeClient::parseEventNotificationWithoutVerification($payload)`
|
||||
- Added `WebhookSignature::generateSignatureHeader($payload, $secret, $timestamp = null)`, which computes a full `Stripe-Signature` header for the given payload. Useful for unit tests!
|
||||
* [#2112](https://github.com/stripe/stripe-php/pull/2112) Add `stripe.major_api_version` constant
|
||||
|
||||
## 21.1.1 - 2026-07-30
|
||||
* [#2110](https://github.com/stripe/stripe-php/pull/2110) suppress warnings when we can't access a directory
|
||||
|
||||
## 21.1.0 - 2026-07-29
|
||||
This release changes the pinned API version to 2026-07-29.dahlia.
|
||||
|
||||
* [#2106](https://github.com/stripe/stripe-php/pull/2106) Update generated code
|
||||
* Add support for new resource `FinancialConnections.Authorization`
|
||||
* Add support for `unreject` method on resource `Account`
|
||||
* Add support for `all` method on resource `PaymentRecord`
|
||||
* Add support for new values `mass_transit_parking_tax` and `parking_tax` on enums `Tax.Calculation.shipping_cost.tax_breakdown[].tax_rate_details.tax_type`, `Tax.Calculation.tax_breakdown[].tax_rate_details.tax_type`, `Tax.CalculationLineItem.tax_breakdown[].tax_rate_details.tax_type`, `Tax.Transaction.shipping_cost.tax_breakdown[].tax_rate_details.tax_type`, and `TaxRate.tax_type`
|
||||
* Add support for new value `chaps` on enums `FundingInstructions.bank_transfer.financial_addresses[].supported_networks` and `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[].supported_networks`
|
||||
* Add support for `smart_disputes_management` on `AccountSession.components.disputes_list.features`, `AccountSession.components.payment_details.features`, `AccountSession.components.payment_disputes.features`, `AccountSession.components.payments.features`, `AccountSession.create().$params.component.disputes_list.feature`, `AccountSession.create().$params.component.payment.feature`, `AccountSession.create().$params.component.payment_detail.feature`, and `AccountSession.create().$params.component.payment_dispute.feature`
|
||||
* Add support for `administrative_address` and `principal_place_of_business` on `Account.company`, `Account.create().$params.company`, `Account.update().$params.company`, and `Token.create().$params.account.company`
|
||||
* Add support for `sepa_debit_payments` on `Account.update().$params.setting`
|
||||
* Remove support for `proof_of_registration` on `Account.create().$params.document`. This field was limited-use and is being deprecated.
|
||||
* Add support for `payouts_action` on `Account.reject().$params`
|
||||
* Add support for new value `data_share_only` on enums `Charge.payment_method_details.card.three_d_secure.result`, `PaymentAttemptRecord.payment_method_details.card.three_d_secure.result`, `PaymentRecord.payment_method_details.card.three_d_secure.result`, and `SetupAttempt.payment_method_details.card.three_d_secure.result`
|
||||
* Add support for new values `bnp_paribas`, `citibank`, and `mbsb_bank` on enums `Charge.payment_method_details.fpx.bank`, `ConfirmationToken.payment_method_preview.fpx.bank`, `PaymentAttemptRecord.payment_method_details.fpx.bank`, `PaymentMethod.fpx.bank`, and `PaymentRecord.payment_method_details.fpx.bank`
|
||||
* Remove support for `dynamic_tax_rates` on `Checkout\Session.create().$params.line_item`. This field was limited-use and is being deprecated.
|
||||
* Add support for `setup_future_usage` on `Checkout.Session.payment_method_options.payco`, `Checkout.Session.payment_method_options.samsung_pay`, `Checkout\Session.create().$params.payment_method_option.payco`, `Checkout\Session.create().$params.payment_method_option.samsung_pay`, `PaymentIntent.confirm().$params.payment_method_option.payco`, `PaymentIntent.confirm().$params.payment_method_option.samsung_pay`, `PaymentIntent.create().$params.payment_method_option.payco`, `PaymentIntent.create().$params.payment_method_option.samsung_pay`, `PaymentIntent.payment_method_options.payco`, `PaymentIntent.payment_method_options.samsung_pay`, `PaymentIntent.update().$params.payment_method_option.payco`, `PaymentIntent.update().$params.payment_method_option.samsung_pay`, and `PaymentLink.update().$params.payment_intent_datum`
|
||||
* Add support for new value `ic_nif` 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 `network` on `Dispute.payment_method_details.card`
|
||||
* Add support for new values `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, `financial_connections.account.upcoming_deactivation`, `financial_connections.authorization.expected_deactivation_date_updated`, and `financial_connections.authorization.upcoming_deactivation` on enum `Event.type`
|
||||
* Add support for `limits` and `manual_entry` on `FinancialConnections.Session` and `FinancialConnections\Session.create().$params`
|
||||
* Add support for `require_payment_method_support` on `FinancialConnections.Session.filters` and `FinancialConnections\Session.create().$params.filter`
|
||||
* Add support for `bank_account_token` on `FinancialConnections.Session`
|
||||
* Add support for `metadata` on `Invoice.create_preview().$params.subscription_detail`
|
||||
* Add support for new values `alipay` and `mb_way` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`
|
||||
* Add support for new value `stripe_internal_error` on enum `Issuing.Authorization.request_history[].reason`
|
||||
* Add support for `business_name` on `Issuing.Card.shipping`, `Issuing\Card.create().$params.shipping`, and `Issuing\Card.update().$params.shipping`
|
||||
* Add support for new value `correos` on enum `Issuing.Card.shipping.carrier`
|
||||
* Add support for `allowed_payment_method_types` on `PaymentIntent.confirm().$params`, `PaymentIntent.create().$params`, `PaymentIntent.update().$params`, `PaymentIntent`, `SetupIntent.confirm().$params`, `SetupIntent.create().$params`, `SetupIntent.update().$params`, and `SetupIntent`
|
||||
* Add support for `referrer` on `PaymentIntent.confirm().$params.radar_option` and `PaymentIntent.create().$params.radar_option`
|
||||
* Add support for `consent_collection` and `shipping_options` on `PaymentLink.update().$params`
|
||||
* Add support for `custom_fields`, `description`, and `footer` on `Quote.create().$params.invoice_setting`, `Quote.invoice_settings`, `Quote.update().$params.invoice_setting`, `SubscriptionSchedule.create().$params.default_setting.invoice_setting`, `SubscriptionSchedule.create().$params.phase.invoice_setting`, `SubscriptionSchedule.default_settings.invoice_settings`, `SubscriptionSchedule.phases[].invoice_settings`, `SubscriptionSchedule.update().$params.default_setting.invoice_setting`, and `SubscriptionSchedule.update().$params.phase.invoice_setting`
|
||||
* Add support for `customer_account` and `customer` on `Refund`
|
||||
* Add support for `payment_method` on `Refund` and `Topup`
|
||||
* Add support for `trial` on `SubscriptionSchedule.phases[]`
|
||||
* Add support for `mass_transit_parking_tax` and `parking_tax` on `Tax.Registration.country_options.us` and `Tax\Registration.create().$params.country_option.me`
|
||||
* Add support for new values `mass_transit_parking_tax` and `parking_tax` on enum `Tax.Registration.country_options.us.type`
|
||||
* Add support for `initiated_by` and `payment_method_options` on `Topup`
|
||||
* Add support for `additional_addresses` 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 snapshot events `FINANCIAL_CONNECTIONS_ACCOUNT_EXPECTED_DEACTIVATION_DATE_UPDATED`, `FINANCIAL_CONNECTIONS_ACCOUNT_SUPPORTED_PAYMENT_METHOD_TYPES_UPDATED`, and `FINANCIAL_CONNECTIONS_ACCOUNT_UPCOMING_DEACTIVATION` with resource `FinancialConnections.Account`
|
||||
* Add support for snapshot events `FINANCIAL_CONNECTIONS_AUTHORIZATION_EXPECTED_DEACTIVATION_DATE_UPDATED` and `FINANCIAL_CONNECTIONS_AUTHORIZATION_UPCOMING_DEACTIVATION` with resource `FinancialConnections.Authorization`
|
||||
|
||||
## 21.0.0 - 2026-07-15
|
||||
This release **does not** change the pinned API version. It's still `2026-06-24.dahlia`.
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
6012b623b1c09ad54d466947da04511a042ee45a
|
||||
baff58c9d515cdd5f5c3231d101989d588788c6f
|
||||
@@ -1 +1 @@
|
||||
v2324
|
||||
v2442
|
||||
@@ -1 +1 @@
|
||||
21.0.0
|
||||
21.3.2
|
||||
|
||||
@@ -11,6 +11,7 @@ require __DIR__ . '/lib/Stripe.php';
|
||||
require __DIR__ . '/lib/StripeContext.php';
|
||||
|
||||
// Utilities
|
||||
require __DIR__ . '/lib/Util/AgentPluginHint.php';
|
||||
require __DIR__ . '/lib/Util/CaseInsensitiveArray.php';
|
||||
require __DIR__ . '/lib/Util/LoggerInterface.php';
|
||||
require __DIR__ . '/lib/Util/DefaultLogger.php';
|
||||
@@ -93,6 +94,12 @@ require __DIR__ . '/lib/StripeStreamingClientInterface.php';
|
||||
require __DIR__ . '/lib/BaseStripeClient.php';
|
||||
require __DIR__ . '/lib/StripeClient.php';
|
||||
|
||||
// EventRouter
|
||||
require __DIR__ . '/lib/UnhandledNotificationDetails.php';
|
||||
require __DIR__ . '/lib/AbstractEventNotificationHandler.php';
|
||||
require __DIR__ . '/lib/StripeEventNotificationHandler.php';
|
||||
require __DIR__ . '/lib/StripeEventNotificationHandlerWithoutVerification.php';
|
||||
|
||||
// The beginning of the section generated from our OpenAPI spec
|
||||
require __DIR__ . '/lib/Account.php';
|
||||
require __DIR__ . '/lib/AccountLink.php';
|
||||
@@ -111,6 +118,7 @@ require __DIR__ . '/lib/Billing/AlertTriggered.php';
|
||||
require __DIR__ . '/lib/Billing/CreditBalanceSummary.php';
|
||||
require __DIR__ . '/lib/Billing/CreditBalanceTransaction.php';
|
||||
require __DIR__ . '/lib/Billing/CreditGrant.php';
|
||||
require __DIR__ . '/lib/Billing/FeedbackOption.php';
|
||||
require __DIR__ . '/lib/Billing/Meter.php';
|
||||
require __DIR__ . '/lib/Billing/MeterEvent.php';
|
||||
require __DIR__ . '/lib/Billing/MeterEventAdjustment.php';
|
||||
@@ -207,6 +215,7 @@ require __DIR__ . '/lib/FileLink.php';
|
||||
require __DIR__ . '/lib/FinancialConnections/Account.php';
|
||||
require __DIR__ . '/lib/FinancialConnections/AccountOwner.php';
|
||||
require __DIR__ . '/lib/FinancialConnections/AccountOwnership.php';
|
||||
require __DIR__ . '/lib/FinancialConnections/Authorization.php';
|
||||
require __DIR__ . '/lib/FinancialConnections/Session.php';
|
||||
require __DIR__ . '/lib/FinancialConnections/Transaction.php';
|
||||
require __DIR__ . '/lib/Forwarding/Request.php';
|
||||
@@ -272,6 +281,7 @@ require __DIR__ . '/lib/Service/Billing/BillingServiceFactory.php';
|
||||
require __DIR__ . '/lib/Service/Billing/CreditBalanceSummaryService.php';
|
||||
require __DIR__ . '/lib/Service/Billing/CreditBalanceTransactionService.php';
|
||||
require __DIR__ . '/lib/Service/Billing/CreditGrantService.php';
|
||||
require __DIR__ . '/lib/Service/Billing/FeedbackOptionService.php';
|
||||
require __DIR__ . '/lib/Service/Billing/MeterEventAdjustmentService.php';
|
||||
require __DIR__ . '/lib/Service/Billing/MeterEventService.php';
|
||||
require __DIR__ . '/lib/Service/Billing/MeterService.php';
|
||||
|
||||
502
libs/stripe-php/lib/AbstractEventNotificationHandler.php
Normal file
502
libs/stripe-php/lib/AbstractEventNotificationHandler.php
Normal file
@@ -0,0 +1,502 @@
|
||||
<?php
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* Shared registration and dispatch machinery for StripeEventNotificationHandler and
|
||||
* StripeEventNotificationHandlerWithoutVerification.
|
||||
*
|
||||
* Deliberately declares no handle(). PHP requires an override to stay compatible with
|
||||
* the parent's parameter list, so neither handler can subclass the other without
|
||||
* carrying a parameter it doesn't want; as siblings, each declares its own signature.
|
||||
*
|
||||
* @internal implementation detail; do not depend on this class directly
|
||||
*/
|
||||
abstract class AbstractEventNotificationHandler
|
||||
{
|
||||
/** @var array<string, callable> */
|
||||
protected $registeredHandlers = [];
|
||||
/** @var StripeClient */
|
||||
protected $client;
|
||||
protected $hasHandledEvents = false;
|
||||
/** @var callable(V2\Core\EventNotification, StripeClient, UnhandledNotificationDetails): void */
|
||||
protected $fallbackCallback;
|
||||
/** @var array<string, mixed> everything we need to duplicate a client */
|
||||
protected $clientConfig;
|
||||
/** @var null|callable(V2\Core\EventNotification, StripeClient): bool */
|
||||
protected $preHandleCallback = null;
|
||||
|
||||
/**
|
||||
* @param StripeClient $client The Stripe client to use for API interactions
|
||||
* @param callable(V2\Core\EventNotification, StripeClient, UnhandledNotificationDetails): void $fallbackCallback A callback that's invoked for unhandled events. It receives the notification as parsed, so it's a specific subclass for event types this SDK knows about and an Events\UnknownEventNotification otherwise; check UnhandledNotificationDetails::$isKnownEventType or use instanceof to narrow
|
||||
*/
|
||||
public function __construct($client, $fallbackCallback)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->fallbackCallback = $fallbackCallback;
|
||||
|
||||
// Extract configuration from the client for creating new instances
|
||||
$this->clientConfig = [
|
||||
'api_key' => $client->getApiKey(),
|
||||
'client_id' => $client->getClientId(),
|
||||
'stripe_account' => $client->getStripeAccount(),
|
||||
'stripe_version' => $client->getStripeVersion(),
|
||||
'api_base' => $client->getApiBase(),
|
||||
'connect_base' => $client->getConnectBase(),
|
||||
'files_base' => $client->getFilesBase(),
|
||||
'meter_events_base' => $client->getMeterEventsBase(),
|
||||
'max_network_retries' => $client->getMaxNetworkRetries(),
|
||||
'app_info' => $client->getAppInfo(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sorted list of registered event types.
|
||||
*
|
||||
* @return string[] List of registered event type strings
|
||||
*/
|
||||
public function getRegisteredHandlers()
|
||||
{
|
||||
$eventTypes = array_keys($this->registeredHandlers);
|
||||
\sort($eventTypes);
|
||||
|
||||
return $eventTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatches a parsed event notification to the appropriate handler.
|
||||
*
|
||||
* @param V2\Core\EventNotification $notif The parsed event notification
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function dispatch($notif)
|
||||
{
|
||||
$eventType = $notif->type;
|
||||
|
||||
// Create a new client instance with the event's context instead of modifying the shared client
|
||||
$eventClient = $this->createClientWithContext($notif->context);
|
||||
|
||||
if (null !== $this->preHandleCallback && !\call_user_func($this->preHandleCallback, $notif, $eventClient)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isset($this->registeredHandlers[$eventType])) {
|
||||
\call_user_func($this->registeredHandlers[$eventType], $notif, $eventClient);
|
||||
} else {
|
||||
\call_user_func($this->fallbackCallback, $notif, $eventClient, new UnhandledNotificationDetails(!$notif instanceof Events\UnknownEventNotification));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new StripeClient instance with the specified stripe_context.
|
||||
*
|
||||
* @param null|string $context The stripe_context to use for the new client
|
||||
*
|
||||
* @return StripeClient A new StripeClient instance with the specified context
|
||||
*/
|
||||
protected function createClientWithContext($context)
|
||||
{
|
||||
$config = $this->clientConfig;
|
||||
$config['stripe_context'] = $context;
|
||||
|
||||
return new StripeClient($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callbacks are expected to be registered on startup, so registering anything
|
||||
* after handling an event indicates a bug.
|
||||
*
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
private function assertHasntHandledYet()
|
||||
{
|
||||
if ($this->hasHandledEvents) {
|
||||
throw new Exception\BadMethodCallException('Cannot register new callbacks after an event has been handled. This is indicative of a bug.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for a specific event type.
|
||||
*
|
||||
* @param string $eventType The event type to register the handler for
|
||||
* @param callable $handler The handler function to call when the event is received
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
protected function register($eventType, $handler)
|
||||
{
|
||||
$this->assertHasntHandledYet();
|
||||
if (isset($this->registeredHandlers[$eventType])) {
|
||||
throw new Exception\InvalidArgumentException("Callback for event type \"{$eventType}\" is already registered");
|
||||
}
|
||||
|
||||
$this->registeredHandlers[$eventType] = $handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a function that will be run before any event-specific callbacks. A useful place to
|
||||
* store event-agnostic logic, such as logging or checking for
|
||||
* [duplicate event deliveries](https://docs.stripe.com/webhooks#handle-duplicate-events).
|
||||
*
|
||||
* Returning `true` causes handling to continue as normal; returning `false` returns from
|
||||
* `.handle()` immediately, so neither the registered callback nor the fallback callback are called.
|
||||
*
|
||||
* @param callable(V2\Core\EventNotification, StripeClient): bool $handler Return false to stop handling before any callback runs
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if a pre-handle hook is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function preHandle($handler)
|
||||
{
|
||||
$this->assertHasntHandledYet();
|
||||
if (null !== $this->preHandleCallback) {
|
||||
throw new Exception\InvalidArgumentException('A preHandle callback is already registered');
|
||||
}
|
||||
|
||||
$this->preHandleCallback = $handler;
|
||||
}
|
||||
|
||||
// event-handler-methods: The beginning of the section generated from our OpenAPI spec
|
||||
/**
|
||||
* Registers a handler for the "v1.billing.meter.error_report_triggered" event.
|
||||
*
|
||||
* @param callable(Events\V1BillingMeterErrorReportTriggeredEventNotification, StripeClient): void $handler Handles v1.billing.meter.error_report_triggered events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV1BillingMeterErrorReportTriggered($handler)
|
||||
{
|
||||
$this->register('v1.billing.meter.error_report_triggered', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v1.billing.meter.no_meter_found" event.
|
||||
*
|
||||
* @param callable(Events\V1BillingMeterNoMeterFoundEventNotification, StripeClient): void $handler Handles v1.billing.meter.no_meter_found events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV1BillingMeterNoMeterFound($handler)
|
||||
{
|
||||
$this->register('v1.billing.meter.no_meter_found', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.commerce.product_catalog.imports.failed" event.
|
||||
*
|
||||
* @param callable(Events\V2CommerceProductCatalogImportsFailedEventNotification, StripeClient): void $handler Handles v2.commerce.product_catalog.imports.failed events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CommerceProductCatalogImportsFailed($handler)
|
||||
{
|
||||
$this->register('v2.commerce.product_catalog.imports.failed', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.commerce.product_catalog.imports.processing" event.
|
||||
*
|
||||
* @param callable(Events\V2CommerceProductCatalogImportsProcessingEventNotification, StripeClient): void $handler Handles v2.commerce.product_catalog.imports.processing events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CommerceProductCatalogImportsProcessing($handler)
|
||||
{
|
||||
$this->register('v2.commerce.product_catalog.imports.processing', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.commerce.product_catalog.imports.succeeded" event.
|
||||
*
|
||||
* @param callable(Events\V2CommerceProductCatalogImportsSucceededEventNotification, StripeClient): void $handler Handles v2.commerce.product_catalog.imports.succeeded events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CommerceProductCatalogImportsSucceeded($handler)
|
||||
{
|
||||
$this->register('v2.commerce.product_catalog.imports.succeeded', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.commerce.product_catalog.imports.succeeded_with_errors" event.
|
||||
*
|
||||
* @param callable(Events\V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification, StripeClient): void $handler Handles v2.commerce.product_catalog.imports.succeeded_with_errors events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CommerceProductCatalogImportsSucceededWithErrors(
|
||||
$handler
|
||||
) {
|
||||
$this->register(
|
||||
'v2.commerce.product_catalog.imports.succeeded_with_errors',
|
||||
$handler
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account.closed" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountClosedEventNotification, StripeClient): void $handler Handles v2.core.account.closed events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountClosed($handler)
|
||||
{
|
||||
$this->register('v2.core.account.closed', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account.created" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountCreatedEventNotification, StripeClient): void $handler Handles v2.core.account.created events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountCreated($handler)
|
||||
{
|
||||
$this->register('v2.core.account.created', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account.updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account.updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountUpdated($handler)
|
||||
{
|
||||
$this->register('v2.core.account.updated', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[configuration.customer].capability_status_updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[configuration.customer].capability_status_updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdated(
|
||||
$handler
|
||||
) {
|
||||
$this->register(
|
||||
'v2.core.account[configuration.customer].capability_status_updated',
|
||||
$handler
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[configuration.customer].updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[configuration.customer].updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingConfigurationCustomerUpdated(
|
||||
$handler
|
||||
) {
|
||||
$this->register(
|
||||
'v2.core.account[configuration.customer].updated',
|
||||
$handler
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[configuration.merchant].capability_status_updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[configuration.merchant].capability_status_updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdated(
|
||||
$handler
|
||||
) {
|
||||
$this->register(
|
||||
'v2.core.account[configuration.merchant].capability_status_updated',
|
||||
$handler
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[configuration.merchant].updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[configuration.merchant].updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingConfigurationMerchantUpdated(
|
||||
$handler
|
||||
) {
|
||||
$this->register(
|
||||
'v2.core.account[configuration.merchant].updated',
|
||||
$handler
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[configuration.recipient].capability_status_updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[configuration.recipient].capability_status_updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdated(
|
||||
$handler
|
||||
) {
|
||||
$this->register(
|
||||
'v2.core.account[configuration.recipient].capability_status_updated',
|
||||
$handler
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[configuration.recipient].updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[configuration.recipient].updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingConfigurationRecipientUpdated(
|
||||
$handler
|
||||
) {
|
||||
$this->register(
|
||||
'v2.core.account[configuration.recipient].updated',
|
||||
$handler
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[defaults].updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingDefaultsUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[defaults].updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingDefaultsUpdated($handler)
|
||||
{
|
||||
$this->register('v2.core.account[defaults].updated', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[future_requirements].updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[future_requirements].updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingFutureRequirementsUpdated($handler)
|
||||
{
|
||||
$this->register('v2.core.account[future_requirements].updated', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[identity].updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingIdentityUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[identity].updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingIdentityUpdated($handler)
|
||||
{
|
||||
$this->register('v2.core.account[identity].updated', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account[requirements].updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountIncludingRequirementsUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account[requirements].updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountIncludingRequirementsUpdated($handler)
|
||||
{
|
||||
$this->register('v2.core.account[requirements].updated', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account_link.returned" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountLinkReturnedEventNotification, StripeClient): void $handler Handles v2.core.account_link.returned events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountLinkReturned($handler)
|
||||
{
|
||||
$this->register('v2.core.account_link.returned', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account_person.created" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountPersonCreatedEventNotification, StripeClient): void $handler Handles v2.core.account_person.created events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountPersonCreated($handler)
|
||||
{
|
||||
$this->register('v2.core.account_person.created', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account_person.deleted" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountPersonDeletedEventNotification, StripeClient): void $handler Handles v2.core.account_person.deleted events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountPersonDeleted($handler)
|
||||
{
|
||||
$this->register('v2.core.account_person.deleted', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.account_person.updated" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreAccountPersonUpdatedEventNotification, StripeClient): void $handler Handles v2.core.account_person.updated events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreAccountPersonUpdated($handler)
|
||||
{
|
||||
$this->register('v2.core.account_person.updated', $handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a handler for the "v2.core.event_destination.ping" event.
|
||||
*
|
||||
* @param callable(Events\V2CoreEventDestinationPingEventNotification, StripeClient): void $handler Handles v2.core.event_destination.ping events
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException if this event type is already registered
|
||||
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
|
||||
*/
|
||||
public function onV2CoreEventDestinationPing($handler)
|
||||
{
|
||||
$this->register('v2.core.event_destination.ping', $handler);
|
||||
}
|
||||
// event-handler-methods: The end of the section generated from our OpenAPI spec
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -16,7 +16,7 @@ namespace Stripe;
|
||||
* @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://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), balance_report: (object{enabled: bool, features: (object{}&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), payout_reconciliation_report: (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 (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), balance_report: (object{enabled: bool, features: (object{}&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, smart_disputes_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, smart_disputes_management: bool}&StripeObject)}&StripeObject), payment_disputes: (object{enabled: bool, features: (object{destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool, smart_disputes_management: bool}&StripeObject)}&StripeObject), payment_method_settings: (object{enabled: bool, features: (object{disable_stripe_user_authentication: 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, smart_disputes_management: bool}&StripeObject)}&StripeObject), payout_details: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), payout_reconciliation_report: (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 If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ class AccountSession extends ApiResource
|
||||
* Creates a AccountSession object that includes a single-use token that the
|
||||
* platform can use on their front-end to grant client-side API access.
|
||||
*
|
||||
* @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balance_report?: array{enabled: bool, features?: array{}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, disputes_list?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, instant_payouts_promotion?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, instant_payouts?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_disputes?: array{enabled: bool, features?: array{destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payout_details?: array{enabled: bool, features?: array{}}, payout_reconciliation_report?: array{enabled: bool, features?: array{}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params
|
||||
* @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balance_report?: array{enabled: bool, features?: array{}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, disputes_list?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool, smart_disputes_management?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, instant_payouts_promotion?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, instant_payouts?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool, smart_disputes_management?: bool}}, payment_disputes?: array{enabled: bool, features?: array{destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool, smart_disputes_management?: bool}}, payment_method_settings?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool, smart_disputes_management?: bool}}, payout_details?: array{enabled: bool, features?: array{}}, payout_reconciliation_report?: array{enabled: bool, features?: array{}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @return AccountSession the created resource
|
||||
|
||||
@@ -474,6 +474,71 @@ class ApiRequestor
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that a request path is origin-relative: that it begins with a
|
||||
* single "/" and carries no scheme, authority or userinfo.
|
||||
*
|
||||
* The absolute URL is built by concatenating the API base onto this path,
|
||||
* and no base URL ends in a slash. A path like "@evil.example/v1/x" or
|
||||
* ".evil.example/v1/x" would modify the resulting host and direct the
|
||||
* request (including the API key) to a non-Stripe host.
|
||||
*
|
||||
* Because some relative urls arrive from potentially untrusted sources (like
|
||||
* webhook bodies), we have to be a little defensive.
|
||||
*
|
||||
* So, we require that a path starts with a leading slash and that
|
||||
* parse_url() finds no scheme or authority in it.
|
||||
*
|
||||
* @param string $url
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException
|
||||
*/
|
||||
private static function validatePath($url)
|
||||
{
|
||||
if (!\is_string($url) || '/' !== \substr($url, 0, 1) || '//' === \substr($url, 0, 2)) {
|
||||
throw new Exception\InvalidArgumentException(
|
||||
'Request path must be a string beginning with a single "/".'
|
||||
);
|
||||
}
|
||||
|
||||
$parts = \parse_url($url);
|
||||
if (false === $parts || isset($parts['scheme']) || isset($parts['host']) || isset($parts['user'])) {
|
||||
throw new Exception\InvalidArgumentException(
|
||||
'Request path may not contain a scheme or authority.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rejects CR, LF and NUL in a header name or value.
|
||||
*
|
||||
* Header lines are assembled by concatenation, so a newline in either half
|
||||
* would let the remainder be parsed as additional headers. Some of these
|
||||
* values originate in remote data - fetchRelatedObject() sets Stripe-Context
|
||||
* and Stripe-Request-Trigger from the webhook body - and a per-request
|
||||
* api_key reaches the Authorization value without the whitespace check that
|
||||
* Stripe::setApiKey() applies.
|
||||
*
|
||||
* @param string $header
|
||||
* @param mixed $value
|
||||
*
|
||||
* @throws Exception\InvalidArgumentException
|
||||
*/
|
||||
private static function assertNoHeaderInjection($header, $value)
|
||||
{
|
||||
foreach ([$header, $value] as $part) {
|
||||
if (!\is_string($part)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (false !== \strpbrk($part, "\r\n") || false !== \strpos($part, "\0")) {
|
||||
throw new Exception\InvalidArgumentException(
|
||||
'Header names and values may not contain CR, LF or NUL characters.'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param 'delete'|'get'|'post' $method
|
||||
* @param string $url
|
||||
@@ -483,6 +548,8 @@ class ApiRequestor
|
||||
*/
|
||||
private function _prepareRequest($method, $url, $params, $headers, $apiMode)
|
||||
{
|
||||
Util\AgentPluginHint::maybeEmit();
|
||||
|
||||
$myApiKey = $this->_apiKey;
|
||||
if (!$myApiKey) {
|
||||
$myApiKey = Stripe::$apiKey;
|
||||
@@ -520,6 +587,7 @@ class ApiRequestor
|
||||
}
|
||||
}
|
||||
|
||||
self::validatePath($url);
|
||||
$absUrl = $this->_apiBase . $url;
|
||||
if ('v1' === $apiMode) {
|
||||
$params = self::_encodeObjects($params);
|
||||
@@ -558,6 +626,7 @@ class ApiRequestor
|
||||
$rawHeaders = [];
|
||||
|
||||
foreach ($combinedHeaders as $header => $value) {
|
||||
self::assertNoHeaderInjection($header, $value);
|
||||
$rawHeaders[] = $header . ': ' . $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 null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property null|float $exchange_rate If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the <code>amount</code> in currency A, multipled by the <code>exchange_rate</code>, equals the <code>amount</code> in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's <code>amount</code> is <code>1000</code> and <code>currency</code> is <code>eur</code>. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's <code>amount</code> is <code>1234</code>, its <code>currency</code> is <code>usd</code>, and the <code>exchange_rate</code> is <code>1.234</code>.
|
||||
* @property null|float $exchange_rate If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the <code>amount</code> in currency A, multiplied by the <code>exchange_rate</code>, equals the <code>amount</code> in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's <code>amount</code> is <code>1000</code> and <code>currency</code> is <code>eur</code>. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's <code>amount</code> is <code>1234</code>, its <code>currency</code> is <code>usd</code>, and the <code>exchange_rate</code> is <code>1.234</code>.
|
||||
* @property int $fee Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
|
||||
* @property ((object{amount: int, application: null|string, currency: string, description: null|string, type: string}&StripeObject))[] $fee_details Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
|
||||
* @property int $net Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by <code>amount</code> - <code>fee</code>
|
||||
|
||||
@@ -100,6 +100,8 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||
'stripe_version' => $config['stripe_version'],
|
||||
'max_network_retries' => $config['max_network_retries'],
|
||||
]);
|
||||
|
||||
\Stripe\Util\AgentPluginHint::maybeEmit();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,6 +144,21 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||
return $this->config['stripe_context'];
|
||||
}
|
||||
|
||||
/**
|
||||
* FOR INTERNAL USE ONLY. MAY CHANGE WITHOUT WARNING. Gets the Stripe Context used by the client to send requests.
|
||||
*
|
||||
* @return null|string the Stripe Context used by the client to send requests
|
||||
*/
|
||||
public function getStripeContextHeader()
|
||||
{
|
||||
// use opts instead of config because we modify the default opts and want to make sure we get fresh reads
|
||||
if (!isset($this->defaultOpts->headers['Stripe-Context'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->defaultOpts->headers['Stripe-Context'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Stripe Version used by the client to send requests.
|
||||
*
|
||||
@@ -489,28 +506,82 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a \Stripe\V2\Core\Events instance using the provided JSON payload. Throws an
|
||||
* Exception\UnexpectedValueException if the payload is not valid JSON, and
|
||||
* an Exception\SignatureVerificationException if the signature
|
||||
* verification fails for any reason.
|
||||
* Constructs a {@link https://docs.stripe.com/event-destinations#snapshot-payload snapshot event} from an incoming webhook without first verifying its authenticity.
|
||||
* Should be used after calling {@see WebhookSignature::verifyHeader()} or with input from a trusted source (such as {@link https://docs.stripe.com/event-destinations/eventbridge AWS EventBridge}, or {@link https://docs.stripe.com/event-destinations/eventgrid Azure Event Grid} payload).
|
||||
* Or, to verify & construct in a single call, use {@see Webhook::constructEvent()} instead.
|
||||
*
|
||||
* @param string $payload the JSON payload
|
||||
*
|
||||
* @return Event
|
||||
*
|
||||
* @throws Exception\UnexpectedValueException if the payload is not valid JSON or is a v2 thin event
|
||||
*/
|
||||
public function constructEventWithoutVerification($payload)
|
||||
{
|
||||
return Webhook::constructEventWithoutVerification($payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@link https://docs.stripe.com/event-destinations#thin-payload thin event notification} from an incoming webhook after verifying its authenticity.
|
||||
* To work with a webhook that has already been verified (i.e. one from a cloud provider, an asynchronous queue, or during testing), see {@see BaseStripeClient::parseEventNotificationWithoutVerification()}.
|
||||
*
|
||||
* @param string $payload the payload sent by Stripe
|
||||
* @param string $sigHeader the contents of the signature header sent by
|
||||
* Stripe
|
||||
* @param string $sigHeader the contents of the signature header sent by Stripe
|
||||
* @param string $secret secret used to generate the signature
|
||||
* @param int $tolerance maximum difference allowed between the header's
|
||||
* timestamp and the current time. Defaults to 300 seconds (5 min)
|
||||
*
|
||||
* @return EventNotification
|
||||
*
|
||||
* @throws Exception\SignatureVerificationException if the verification fails
|
||||
* @throws Exception\UnexpectedValueException if the payload is not valid JSON,
|
||||
* @throws Exception\SignatureVerificationException if the verification fails for any reason
|
||||
* @throws Exception\UnexpectedValueException if the payload is not valid JSON or is a v1 event
|
||||
*/
|
||||
public function parseEventNotification($payload, $sigHeader, $secret, $tolerance = Webhook::DEFAULT_TOLERANCE)
|
||||
{
|
||||
$eventData = Util::utf8($payload);
|
||||
WebhookSignature::verifyHeader($payload, $sigHeader, $secret, $tolerance);
|
||||
|
||||
return EventNotification::fromJson($eventData, $this);
|
||||
return EventNotification::fromJson(Util::utf8($payload), $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@link https://docs.stripe.com/event-destinations#thin-payload thin event notification} from an incoming webhook without first verifying its authenticity.
|
||||
* Should be used after calling {@see WebhookSignature::verifyHeader()} or with input from a trusted source (such as {@link https://docs.stripe.com/event-destinations/eventbridge AWS EventBridge}, or {@link https://docs.stripe.com/event-destinations/eventgrid Azure Event Grid} payload).
|
||||
* Or, to verify & parse in a single call, use {@see BaseStripeClient::parseEventNotification()} instead.
|
||||
*
|
||||
* @param string $payload the JSON payload
|
||||
*
|
||||
* @return EventNotification
|
||||
*
|
||||
* @throws Exception\UnexpectedValueException if the payload is not valid JSON or is a v1 event
|
||||
*/
|
||||
public function parseEventNotificationWithoutVerification($payload)
|
||||
{
|
||||
return EventNotification::fromJson(Webhook::maybeExtractFromCloudProviderEnvelope($payload), $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new StripeEventNotificationHandler associated with this client.
|
||||
*
|
||||
* @param string $webhookSecret The webhook secret to use for verifying incoming webhook signatures
|
||||
* @param callable(EventNotification, StripeClient, UnhandledNotificationDetails): void $fallbackCallback a function to call if no other handler processes an event notification
|
||||
*
|
||||
* @return StripeEventNotificationHandler A new StripeEventNotificationHandler instance
|
||||
*/
|
||||
public function notificationHandler($webhookSecret, $fallbackCallback)
|
||||
{
|
||||
return new StripeEventNotificationHandler($this, $webhookSecret, $fallbackCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a handler that processes events without webhook signature verification.
|
||||
* Intended for pre-authenticated channels like AWS EventBridge or Azure Event Grid.
|
||||
*
|
||||
* @param callable(EventNotification, StripeClient, UnhandledNotificationDetails): void $fallbackCallback A callback that's invoked for unhandled events
|
||||
*
|
||||
* @return StripeEventNotificationHandlerWithoutVerification
|
||||
*/
|
||||
public function notificationHandlerWithoutVerification($fallbackCallback)
|
||||
{
|
||||
return StripeEventNotificationHandler::withoutVerification($this, $fallbackCallback);
|
||||
}
|
||||
}
|
||||
|
||||
123
libs/stripe-php/lib/Billing/FeedbackOption.php
Normal file
123
libs/stripe-php/lib/Billing/FeedbackOption.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Billing;
|
||||
|
||||
/**
|
||||
* A resource for the feedback options model (for custom cancellation reasons).
|
||||
*
|
||||
* @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 string $description An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @property string $status The feedback option's status.
|
||||
* @property (object{deactivated_at: null|int}&\Stripe\StripeObject) $status_transitions
|
||||
*/
|
||||
class FeedbackOption extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'billing.feedback_option';
|
||||
|
||||
use \Stripe\ApiOperations\Update;
|
||||
|
||||
const STATUS_ACTIVE = 'active';
|
||||
const STATUS_INACTIVE = 'inactive';
|
||||
|
||||
/**
|
||||
* Creates a new feedback option.
|
||||
*
|
||||
* @param null|array{description: string, expand?: string[]} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @return FeedbackOption the created resource
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function create($params = null, $options = null)
|
||||
{
|
||||
self::_validateParams($params);
|
||||
$url = static::classUrl();
|
||||
|
||||
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* An API method for listing the feedback options model.
|
||||
*
|
||||
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return \Stripe\Collection<FeedbackOption> of ApiResources
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function all($params = null, $opts = null)
|
||||
{
|
||||
$url = static::classUrl();
|
||||
|
||||
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a feedback options object given an ID.
|
||||
*
|
||||
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return FeedbackOption
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function retrieve($id, $opts = null)
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
$instance = new static($id, $opts);
|
||||
$instance->refresh();
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the description of an existing feedback option.
|
||||
*
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array{description?: string, expand?: string[]} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return FeedbackOption the updated resource
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function update($id, $params = null, $opts = null)
|
||||
{
|
||||
self::_validateParams($params);
|
||||
$url = static::resourceUrl($id);
|
||||
|
||||
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return FeedbackOption the deactivated feedback option
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function deactivate($params = null, $opts = null)
|
||||
{
|
||||
$url = $this->instanceUrl() . '/deactivate';
|
||||
list($response, $opts) = $this->_request('post', $url, $params, $opts);
|
||||
$this->refreshFrom($response, $opts);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -13,8 +13,8 @@ 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://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 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">overridden</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, feedback_options: null|(string|\Stripe\Billing\FeedbackOption)[], 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 If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @property (object{enabled: bool, url: null|string}&\Stripe\StripeObject) $login_page
|
||||
@@ -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{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{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, feedback_options?: null|string[], 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{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{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, feedback_options?: null|string[], 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
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Stripe\BillingPortal;
|
||||
* @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|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 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), customer_update: null|(object{}&\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 If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @property null|string $locale The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s <code>preferred_locales</code> or browser’s 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://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.
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -23,7 +23,7 @@ namespace Stripe\Climate;
|
||||
* @property null|int $delayed_at Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.
|
||||
* @property null|int $delivered_at Time at which the order was delivered. Measured in seconds since the Unix epoch.
|
||||
* @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 int $expected_delivery_year The year this order is expected to be delivered. If the year is in the past, the order is a spot purchase and will be delivered within 30 days of purchase.
|
||||
* @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://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.
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Stripe\Climate;
|
||||
* @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 \Stripe\StripeObject $current_prices_per_metric_ton Current prices for a metric ton of carbon removal in a currency's smallest unit.
|
||||
* @property null|int $delivery_year The year in which the carbon removal is expected to be delivered.
|
||||
* @property null|int $delivery_year The year in which the carbon removal is expected to be delivered. If the year is in the past, this represents spot inventory with guaranteed delivery.
|
||||
* @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 $metric_tons_available The quantity of metric tons available for reservation.
|
||||
* @property string $name The Climate product's name.
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -14,7 +14,7 @@ namespace Stripe;
|
||||
*
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $client_secret <p>The client secret of this Customer Session. Used on the client to set up secure access to the given <code>customer</code>.</p><p>The client secret can be used to provide access to <code>customer</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.</p>
|
||||
* @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 null|(object{active_entitlements: (object{enabled: bool}&StripeObject), buy_button: (object{enabled: bool}&StripeObject), customer_portal: (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.
|
||||
@@ -30,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, customer_account?: string, expand?: string[]} $params
|
||||
* @param null|array{components: array{active_entitlements?: array{enabled: bool}, buy_button?: array{enabled: bool}, customer_portal?: 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
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Stripe;
|
||||
* @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 null|(object{amazon_pay?: (object{dispute_type: null|string}&StripeObject), card?: (object{brand: string, case_type: string, network: string, network_reason_code: null|string}&StripeObject), klarna?: (object{chargeback_loss_reason_code?: string, reason_code: null|string}&StripeObject), paypal?: (object{case_id: null|string, reason_code: null|string}&StripeObject), type: string}&StripeObject) $payment_method_details
|
||||
* @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>.
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* Ephemeral keys give the SDKs (like Stripe's mobile SDKs and Issuing Elements) temporary, scoped access to a specific
|
||||
* resource, such as a Customer, Issuing Card, or Identity VerificationSession, without exposing your secret API key.
|
||||
*
|
||||
* Related guides: <a href="https://docs.stripe.com/issuing/elements">Using Issuing Elements</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.
|
||||
|
||||
@@ -50,6 +50,7 @@ class ErrorObject extends StripeObject
|
||||
const CODE_API_KEY_EXPIRED = 'api_key_expired';
|
||||
const CODE_APPLICATION_FEES_NOT_ALLOWED = 'application_fees_not_allowed';
|
||||
const CODE_APPROVAL_REQUIRED = 'approval_required';
|
||||
const CODE_AUTHENTICATION_FAILURE = 'authentication_failure';
|
||||
const CODE_AUTHENTICATION_REQUIRED = 'authentication_required';
|
||||
const CODE_BALANCE_INSUFFICIENT = 'balance_insufficient';
|
||||
const CODE_BALANCE_INVALID_PARAMETER = 'balance_invalid_parameter';
|
||||
@@ -62,6 +63,7 @@ class ErrorObject extends StripeObject
|
||||
const CODE_BANK_ACCOUNT_VERIFICATION_FAILED = 'bank_account_verification_failed';
|
||||
const CODE_BILLING_INVALID_MANDATE = 'billing_invalid_mandate';
|
||||
const CODE_BITCOIN_UPGRADE_REQUIRED = 'bitcoin_upgrade_required';
|
||||
const CODE_CAPABILITY_NOT_ACTIVE = 'capability_not_active';
|
||||
const CODE_CAPTURE_CHARGE_AUTHORIZATION_EXPIRED = 'capture_charge_authorization_expired';
|
||||
const CODE_CAPTURE_UNAUTHORIZED_PAYMENT = 'capture_unauthorized_payment';
|
||||
const CODE_CARD_DECLINE_RATE_LIMIT_EXCEEDED = 'card_decline_rate_limit_exceeded';
|
||||
@@ -86,6 +88,7 @@ class ErrorObject extends StripeObject
|
||||
const CODE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
|
||||
const CODE_EMAIL_INVALID = 'email_invalid';
|
||||
const CODE_EXPIRED_CARD = 'expired_card';
|
||||
const CODE_EXPIRED_PAYMENT_METHOD = 'expired_payment_method';
|
||||
const CODE_FAILED_TAX_CALCULATION = 'failed_tax_calculation';
|
||||
const CODE_FINANCIAL_ACCOUNT_BALANCE_DOES_NOT_SUPPORT_CURRENCY = 'financial_account_balance_does_not_support_currency';
|
||||
const CODE_FINANCIAL_ACCOUNT_CAPABILITY_NOT_ENABLED = 'financial_account_capability_not_enabled';
|
||||
@@ -104,6 +107,7 @@ class ErrorObject extends StripeObject
|
||||
const CODE_INCORRECT_ADDRESS = 'incorrect_address';
|
||||
const CODE_INCORRECT_CVC = 'incorrect_cvc';
|
||||
const CODE_INCORRECT_NUMBER = 'incorrect_number';
|
||||
const CODE_INCORRECT_POSTAL_CODE = 'incorrect_postal_code';
|
||||
const CODE_INCORRECT_ZIP = 'incorrect_zip';
|
||||
const CODE_INDIA_RECURRING_PAYMENT_MANDATE_CANCELED = 'india_recurring_payment_mandate_canceled';
|
||||
const CODE_INSTANT_PAYOUTS_CONFIG_DISABLED = 'instant_payouts_config_disabled';
|
||||
@@ -113,6 +117,7 @@ class ErrorObject extends StripeObject
|
||||
const CODE_INSUFFICIENT_FUNDS = 'insufficient_funds';
|
||||
const CODE_INTENT_INVALID_STATE = 'intent_invalid_state';
|
||||
const CODE_INTENT_VERIFICATION_METHOD_MISSING = 'intent_verification_method_missing';
|
||||
const CODE_INVALID_CANCELED_SUBSCRIPTION_FIELDS = 'invalid_canceled_subscription_fields';
|
||||
const CODE_INVALID_CARD_TYPE = 'invalid_card_type';
|
||||
const CODE_INVALID_CHARACTERS = 'invalid_characters';
|
||||
const CODE_INVALID_CHARGE_AMOUNT = 'invalid_charge_amount';
|
||||
@@ -172,6 +177,7 @@ class ErrorObject extends StripeObject
|
||||
const CODE_PAYMENT_METHOD_NOT_AVAILABLE = 'payment_method_not_available';
|
||||
const CODE_PAYMENT_METHOD_PROVIDER_DECLINE = 'payment_method_provider_decline';
|
||||
const CODE_PAYMENT_METHOD_PROVIDER_TIMEOUT = 'payment_method_provider_timeout';
|
||||
const CODE_PAYMENT_METHOD_RESTRICTED = 'payment_method_restricted';
|
||||
const CODE_PAYMENT_METHOD_UNACTIVATED = 'payment_method_unactivated';
|
||||
const CODE_PAYMENT_METHOD_UNEXPECTED_STATE = 'payment_method_unexpected_state';
|
||||
const CODE_PAYMENT_METHOD_UNSUPPORTED_TYPE = 'payment_method_unsupported_type';
|
||||
|
||||
@@ -125,11 +125,16 @@ class Event extends ApiResource
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_EXPECTED_DEACTIVATION_DATE_UPDATED = 'financial_connections.account.expected_deactivation_date_updated';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_OWNERSHIP = 'financial_connections.account.refreshed_ownership';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_TRANSACTIONS = 'financial_connections.account.refreshed_transactions';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_SUPPORTED_PAYMENT_METHOD_TYPES_UPDATED = 'financial_connections.account.supported_payment_method_types_updated';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_UPCOMING_ACCOUNT_NUMBER_EXPIRY = 'financial_connections.account.upcoming_account_number_expiry';
|
||||
const FINANCIAL_CONNECTIONS_ACCOUNT_UPCOMING_DEACTIVATION = 'financial_connections.account.upcoming_deactivation';
|
||||
const FINANCIAL_CONNECTIONS_AUTHORIZATION_EXPECTED_DEACTIVATION_DATE_UPDATED = 'financial_connections.authorization.expected_deactivation_date_updated';
|
||||
const FINANCIAL_CONNECTIONS_AUTHORIZATION_UPCOMING_DEACTIVATION = 'financial_connections.authorization.upcoming_deactivation';
|
||||
const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
|
||||
const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
|
||||
const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
|
||||
@@ -386,11 +391,16 @@ class Event extends ApiResource
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_EXPECTED_DEACTIVATION_DATE_UPDATED = 'financial_connections.account.expected_deactivation_date_updated';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_OWNERSHIP = 'financial_connections.account.refreshed_ownership';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_TRANSACTIONS = 'financial_connections.account.refreshed_transactions';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_SUPPORTED_PAYMENT_METHOD_TYPES_UPDATED = 'financial_connections.account.supported_payment_method_types_updated';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_UPCOMING_ACCOUNT_NUMBER_EXPIRY = 'financial_connections.account.upcoming_account_number_expiry';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_UPCOMING_DEACTIVATION = 'financial_connections.account.upcoming_deactivation';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_AUTHORIZATION_EXPECTED_DEACTIVATION_DATE_UPDATED = 'financial_connections.authorization.expected_deactivation_date_updated';
|
||||
const TYPE_FINANCIAL_CONNECTIONS_AUTHORIZATION_UPCOMING_DEACTIVATION = 'financial_connections.authorization.upcoming_deactivation';
|
||||
const TYPE_IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
|
||||
const TYPE_IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
|
||||
const TYPE_IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
|
||||
|
||||
23
libs/stripe-php/lib/FinancialConnections/Authorization.php
Normal file
23
libs/stripe-php/lib/FinancialConnections/Authorization.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\FinancialConnections;
|
||||
|
||||
/**
|
||||
* An Authorization represents the set of credentials used to connect a group of Financial Connections Accounts.
|
||||
*
|
||||
* @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 string $institution_name The name of the institution that this authorization belongs to.
|
||||
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @property string $status The status of the connection to the Authorization.
|
||||
* @property (object{active?: (object{action: string, expected_deactivation_date: int}&\Stripe\StripeObject), inactive?: (object{action: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details
|
||||
*/
|
||||
class Authorization extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'financial_connections.authorization';
|
||||
|
||||
const STATUS_ACTIVE = 'active';
|
||||
const STATUS_INACTIVE = 'inactive';
|
||||
}
|
||||
@@ -11,9 +11,12 @@ namespace Stripe\FinancialConnections;
|
||||
* @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, 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|\Stripe\Token $bank_account_token <p>Tokenization is the process Stripe uses to collect sensitive card or bank account details, or personally identifiable information (PII), directly from your customers in a secure manner. A token representing this information is returned to your server to use. Use our <a href="https://docs.stripe.com/payments">recommended payments integrations</a> to perform this process on the client-side. This guarantees that no sensitive card data touches your server, and allows your integration to operate in a PCI-compliant way.</p><p>If you can't use client-side tokenization, you can also create tokens using the API with either your publishable or secret API key. If your integration uses this method, you're responsible for any PCI compliance that it might require, and you must keep your secret API key safe. Unlike with client-side tokenization, your customer's information isn't sent directly to Stripe, so we can't determine how it's handled or stored.</p><p>You can't store or use tokens more than once. To store card or bank account information for later use, create <a href="https://docs.stripe.com/api#customers">Customer</a> objects or <a href="/api#external_accounts">External accounts</a>. <a href="https://docs.stripe.com/radar">Radar</a>, our integrated solution for automatic fraud protection, performs best with integrations that use client-side tokenization.</p>
|
||||
* @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
|
||||
* @property null|(object{account_subcategories: null|string[], countries: null|string[], country: null|string, require_payment_method_support?: string}&\Stripe\StripeObject) $filters
|
||||
* @property null|(object{accounts: int}&\Stripe\StripeObject) $limits
|
||||
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @property null|(object{mode?: string}&\Stripe\StripeObject) $manual_entry
|
||||
* @property string[] $permissions Permissions requested for accounts collected during this session.
|
||||
* @property null|string[] $prefetch Data features requested to be retrieved upon account creation.
|
||||
* @property null|string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
|
||||
@@ -27,7 +30,7 @@ class Session extends \Stripe\ApiResource
|
||||
* <code>Session</code>. The session’s <code>client_secret</code> can be used to
|
||||
* launch the flow using Stripe.js.
|
||||
*
|
||||
* @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{account_holder: array{account?: string, customer?: string, customer_account?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[], require_payment_method_support?: string}, limits?: array{accounts: null|int}, manual_entry?: array{mode?: string}, permissions: string[], prefetch?: string[], return_url?: string} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @return Session the created resource
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Stripe;
|
||||
* @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://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), payto: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, purpose: null|string}&StripeObject)}&StripeObject), pix: null|(object{amount_includes_iof: null|string, expires_after_seconds?: int}&StripeObject), sepa_debit: null|(object{}&StripeObject), upi: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&StripeObject)}&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 (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), billie?: null|(object{}&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), pix: null|(object{amount_includes_iof: null|string, expires_after_seconds?: int}&StripeObject), sepa_debit: null|(object{}&StripeObject), upi: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&StripeObject)}&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 The latest timestamp at which invoice items can be associated with this 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 The earliest timestamp at which invoice items can be associated with this 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.
|
||||
@@ -153,7 +153,7 @@ class Invoice extends ApiResource
|
||||
* which 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, 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}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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}, billie?: null|array{}, 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}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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
|
||||
@@ -245,7 +245,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{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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}, billie?: null|array{}, 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}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace Stripe;
|
||||
* @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|string[] $frozen_fields Array of field names that can't be modified. Attempting to update a frozen field returns an error.
|
||||
* @property null|Invoice|string $invoice The ID of the invoice this invoice item belongs to.
|
||||
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @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.
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Stripe\Issuing;
|
||||
* @property null|Card|string $replacement_for The card this card replaces, if any.
|
||||
* @property null|string $replacement_reason The reason why the previous card needed to be replaced.
|
||||
* @property null|string $second_line Text separate from cardholder name, printed on the card.
|
||||
* @property null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), address_validation: null|(object{mode: string, normalized_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), result: null|string}&\Stripe\StripeObject), carrier: null|string, customs: null|(object{eori_number: null|string}&\Stripe\StripeObject), eta: null|int, name: string, phone_number: null|string, require_signature: null|bool, service: string, status: null|string, tracking_number: null|string, tracking_url: null|string, type: string}&\Stripe\StripeObject) $shipping Where and how the card will be shipped.
|
||||
* @property null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), address_validation: null|(object{mode: string, normalized_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), result: null|string}&\Stripe\StripeObject), business_name: null|string, carrier: null|string, customs: null|(object{eori_number: null|string}&\Stripe\StripeObject), eta: null|int, name: string, phone_number: null|string, require_signature: null|bool, service: string, status: null|string, tracking_number: null|string, tracking_url: null|string, type: string}&\Stripe\StripeObject) $shipping Where and how the card will be shipped.
|
||||
* @property (object{allowed_card_presences: null|string[], allowed_categories: null|string[], allowed_merchant_countries: null|string[], blocked_card_presences: null|string[], blocked_categories: null|string[], blocked_merchant_countries: null|string[], spending_limits: null|((object{amount: int, categories: null|string[], interval: string}&\Stripe\StripeObject))[], spending_limits_currency: null|string}&\Stripe\StripeObject) $spending_controls
|
||||
* @property string $status Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to <code>inactive</code>.
|
||||
* @property string $type The type of the card.
|
||||
@@ -62,7 +62,7 @@ class Card extends \Stripe\ApiResource
|
||||
/**
|
||||
* Creates an Issuing <code>Card</code> object.
|
||||
*
|
||||
* @param null|array{cardholder?: string, currency: string, exp_month?: int, exp_year?: int, expand?: string[], financial_account?: string, lifecycle_controls?: array{cancel_after: array{payment_count: int}}, metadata?: array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, replacement_for?: string, replacement_reason?: string, second_line?: null|string, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string, type: string} $params
|
||||
* @param null|array{cardholder?: string, currency: string, exp_month?: int, exp_year?: int, expand?: string[], financial_account?: string, lifecycle_controls?: array{cancel_after: array{payment_count: int}}, metadata?: array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, replacement_for?: string, replacement_reason?: string, second_line?: null|string, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, business_name?: string, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string, type: string} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @return Card the created resource
|
||||
@@ -124,7 +124,7 @@ class Card extends \Stripe\ApiResource
|
||||
* the parameters passed. Any parameters not provided will be left unchanged.
|
||||
*
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array{cancellation_reason?: string, expand?: string[], metadata?: null|array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string} $params
|
||||
* @param null|array{cancellation_reason?: string, expand?: string[], metadata?: null|array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, business_name?: string, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return Card the updated resource
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Stripe\Issuing;
|
||||
* @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 $name The cardholder's name. This will be printed on cards issued to them.
|
||||
* @property null|string $phone_number The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the <a href="https://docs.stripe.com/issuing/3d-secure#when-is-3d-secure-applied">3D Secure documentation</a> for more details.
|
||||
* @property null|string[] $preferred_locales The cardholder’s preferred locales (languages), ordered by preference. Locales can be <code>da</code>, <code>de</code>, <code>en</code>, <code>es</code>, <code>fr</code>, <code>it</code>, <code>pl</code>, or <code>sv</code>. This changes the language of the <a href="https://docs.stripe.com/issuing/3d-secure">3D Secure flow</a> and one-time password messages sent to the cardholder.
|
||||
* @property null|string[] $preferred_locales The cardholder’s preferred locales (languages), ordered by preference. Locales can be <code>de</code>, <code>en</code>, <code>es</code>, <code>fr</code>, or <code>it</code>. This changes the language of the <a href="https://docs.stripe.com/issuing/3d-secure">3D Secure flow</a> and one-time password messages sent to the cardholder.
|
||||
* @property (object{disabled_reason: null|string, past_due: null|string[]}&\Stripe\StripeObject) $requirements
|
||||
* @property null|(object{allowed_card_presences: null|string[], allowed_categories: null|string[], allowed_merchant_countries: null|string[], blocked_card_presences: null|string[], blocked_categories: null|string[], blocked_merchant_countries: null|string[], spending_limits: null|((object{amount: int, categories: null|string[], interval: string}&\Stripe\StripeObject))[], spending_limits_currency: null|string}&\Stripe\StripeObject) $spending_controls Rules that control spending across this cardholder's cards. Refer to our <a href="https://docs.stripe.com/issuing/controls/spending-controls">documentation</a> for more details.
|
||||
* @property string $status Specifies whether to permit authorizations on this cardholder's cards.
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -132,7 +132,7 @@ class PaymentLink extends ApiResource
|
||||
* Updates a payment link.
|
||||
*
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: array<string, string>, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{description?: null|string, metadata?: null|array<string, string>, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_options?: null|array{card?: null|array{restrictions?: null|array{brands_blocked?: null|string[]}}}, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|array<string, string>, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}} $params
|
||||
* @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: array<string, string>, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, on_behalf_of?: null|string, optional_items?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{description?: null|string, metadata?: null|array<string, string>, setup_future_usage?: null|string, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_options?: null|array{card?: null|array{restrictions?: null|array{brands_blocked?: null|string[]}}}, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, shipping_options?: null|array{shipping_rate?: string}[], submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|array<string, string>, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}, transfer_data?: null|array{amount?: null|int, destination: string}} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return PaymentLink the updated resource
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -30,7 +30,7 @@ namespace Stripe;
|
||||
* @property null|(object{is_revision: bool, quote: Quote|string}&StripeObject) $from_quote Details of the quote that was cloned. See the <a href="https://docs.stripe.com/quotes/clone">cloning documentation</a> for more details.
|
||||
* @property null|string $header A header that will be displayed on the quote PDF.
|
||||
* @property null|Invoice|string $invoice The invoice that was created from this quote.
|
||||
* @property (object{days_until_due: null|int, issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject) $invoice_settings
|
||||
* @property (object{custom_fields: null|(object{name: string, value: string}&StripeObject)[], days_until_due: null|int, description: null|string, footer: null|string, issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject) $invoice_settings
|
||||
* @property null|Collection<LineItem> $line_items A list of items the customer is being quoted for.
|
||||
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @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.
|
||||
@@ -65,7 +65,7 @@ class Quote extends ApiResource
|
||||
* <code>expires_at</code> can be set in the dashboard via the <a
|
||||
* href="https://dashboard.stripe.com/settings/billing/quote">quote template</a>.
|
||||
*
|
||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, customer_account?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, from_quote?: array{is_revision?: bool, quote: string}, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, description?: string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, test_clock?: string, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, customer_account?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, from_quote?: array{is_revision?: bool, quote: string}, header?: null|string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, description?: string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, test_clock?: string, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @return Quote the created resource
|
||||
@@ -124,7 +124,7 @@ class Quote extends ApiResource
|
||||
* A quote models prices and services for a customer.
|
||||
*
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, customer_account?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{description?: null|string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, customer_account?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, header?: null|string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{description?: null|string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return Quote the updated resource
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace Stripe;
|
||||
* @property null|Charge|string $charge ID of the charge that's refunded.
|
||||
* @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|Customer|string $customer ID of the customer of this refund.
|
||||
* @property null|string $customer_account ID of the account of this refund.
|
||||
* @property null|string $description An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
|
||||
* @property null|(object{affirm?: (object{}&StripeObject), afterpay_clearpay?: (object{}&StripeObject), alipay?: (object{}&StripeObject), alma?: (object{}&StripeObject), amazon_pay?: (object{}&StripeObject), au_bank_transfer?: (object{}&StripeObject), blik?: (object{network_decline_code: null|string, reference: null|string, reference_status: null|string}&StripeObject), br_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), card?: (object{reference?: string, reference_status?: string, reference_type?: string, type: string}&StripeObject), cashapp?: (object{}&StripeObject), crypto?: (object{reference: null|string}&StripeObject), customer_cash_balance?: (object{}&StripeObject), eps?: (object{}&StripeObject), eu_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), gb_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), giropay?: (object{}&StripeObject), grabpay?: (object{}&StripeObject), jp_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), klarna?: (object{}&StripeObject), mb_way?: (object{reference: null|string, reference_status: null|string}&StripeObject), multibanco?: (object{reference: null|string, reference_status: null|string}&StripeObject), mx_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), nz_bank_transfer?: (object{}&StripeObject), p24?: (object{reference: null|string, reference_status: null|string}&StripeObject), paynow?: (object{}&StripeObject), paypal?: (object{network_decline_code: null|string}&StripeObject), pix?: (object{}&StripeObject), revolut?: (object{}&StripeObject), scalapay?: (object{}&StripeObject), sofort?: (object{}&StripeObject), swish?: (object{network_decline_code: null|string, reference: null|string, reference_status: null|string}&StripeObject), th_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), twint?: (object{}&StripeObject), type: string, us_bank_transfer?: (object{reference: null|string, reference_status: null|string}&StripeObject), wechat_pay?: (object{}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $destination_details
|
||||
* @property null|BalanceTransaction|string $failure_balance_transaction After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
|
||||
@@ -26,6 +28,7 @@ namespace Stripe;
|
||||
* @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{display_details?: (object{email_sent: (object{email_sent_at: int, email_sent_to: string}&StripeObject), expires_at: int}&StripeObject), type: string}&StripeObject) $next_action
|
||||
* @property null|PaymentIntent|string $payment_intent ID of the PaymentIntent that's refunded.
|
||||
* @property null|PaymentMethod|string $payment_method ID of the payment method associated with this refund.
|
||||
* @property null|string $pending_reason Provides the reason for why the refund is pending. Possible values are: <code>processing</code>, <code>insufficient_funds</code>, or <code>charge_pending</code>.
|
||||
* @property null|(object{presentment_amount: int, presentment_currency: string}&StripeObject) $presentment_details
|
||||
* @property null|string $reason Reason for the refund, which is either user-provided (<code>duplicate</code>, <code>fraudulent</code>, or <code>requested_by_customer</code>) or generated by Stripe internally (<code>expired_uncaptured_charge</code>).
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -15,7 +15,7 @@ class AccountSessionService extends AbstractService
|
||||
* Creates a AccountSession object that includes a single-use token that the
|
||||
* platform can use on their front-end to grant client-side API access.
|
||||
*
|
||||
* @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balance_report?: array{enabled: bool, features?: array{}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, disputes_list?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, instant_payouts_promotion?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, instant_payouts?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_disputes?: array{enabled: bool, features?: array{destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payout_details?: array{enabled: bool, features?: array{}}, payout_reconciliation_report?: array{enabled: bool, features?: array{}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params
|
||||
* @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balance_report?: array{enabled: bool, features?: array{}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, disputes_list?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool, smart_disputes_management?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, instant_payouts_promotion?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, instant_payouts?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool, smart_disputes_management?: bool}}, payment_disputes?: array{enabled: bool, features?: array{destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool, smart_disputes_management?: bool}}, payment_method_settings?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool, smart_disputes_management?: bool}}, payout_details?: array{enabled: bool, features?: array{}}, payout_reconciliation_report?: array{enabled: bool, features?: array{}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\AccountSession
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Stripe\Service\Billing;
|
||||
* @property CreditBalanceSummaryService $creditBalanceSummary
|
||||
* @property CreditBalanceTransactionService $creditBalanceTransactions
|
||||
* @property CreditGrantService $creditGrants
|
||||
* @property FeedbackOptionService $feedbackOptions
|
||||
* @property MeterEventAdjustmentService $meterEventAdjustments
|
||||
* @property MeterEventService $meterEvents
|
||||
* @property MeterService $meters
|
||||
@@ -25,6 +26,7 @@ class BillingServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
'creditBalanceSummary' => CreditBalanceSummaryService::class,
|
||||
'creditBalanceTransactions' => CreditBalanceTransactionService::class,
|
||||
'creditGrants' => CreditGrantService::class,
|
||||
'feedbackOptions' => FeedbackOptionService::class,
|
||||
'meterEventAdjustments' => MeterEventAdjustmentService::class,
|
||||
'meterEvents' => MeterEventService::class,
|
||||
'meters' => MeterService::class,
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Billing;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class FeedbackOptionService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* An API method for listing the feedback options model.
|
||||
*
|
||||
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Billing\FeedbackOption>
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/billing/feedback_options', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new feedback option.
|
||||
*
|
||||
* @param null|array{description: string, expand?: string[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Billing\FeedbackOption
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/billing/feedback_options', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deactivates a feedback option. Deactivated feedback options cannot be used in
|
||||
* portal configurations.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{expand?: string[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Billing\FeedbackOption
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function deactivate($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/billing/feedback_options/%s/deactivate', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a feedback options object given an ID.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{expand?: string[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Billing\FeedbackOption
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/billing/feedback_options/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the description of an existing feedback option.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{description?: string, expand?: string[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Billing\FeedbackOption
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/billing/feedback_options/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
|
||||
* 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{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{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, feedback_options?: null|string[], 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|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\BillingPortal\Configuration
|
||||
@@ -64,7 +64,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
|
||||
* Updates a configuration that describes the functionality of the customer portal.
|
||||
*
|
||||
* @param string $id
|
||||
* @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{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, feedback_options?: null|string[], 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|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\BillingPortal\Configuration
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -16,7 +16,7 @@ class CustomerSessionService extends AbstractService
|
||||
* 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, customer_account?: string, expand?: string[]} $params
|
||||
* @param null|array{components: array{active_entitlements?: array{enabled: bool}, buy_button?: array{enabled: bool}, customer_portal?: 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|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\CustomerSession
|
||||
|
||||
@@ -28,7 +28,8 @@ class DisputeService extends AbstractService
|
||||
|
||||
/**
|
||||
* Closing the dispute for a charge indicates that you do not have any evidence to
|
||||
* submit and are essentially dismissing the dispute, acknowledging it as lost.
|
||||
* submit and are essentially dismissing the dispute (accepting it), acknowledging
|
||||
* it as lost.
|
||||
*
|
||||
* The status of the dispute will change from <code>needs_response</code> to
|
||||
* <code>lost</code>. <em>Closing a dispute is irreversible</em>.
|
||||
|
||||
@@ -16,7 +16,7 @@ class SessionService extends \Stripe\Service\AbstractService
|
||||
* <code>Session</code>. The session’s <code>client_secret</code> can be used to
|
||||
* launch the flow using Stripe.js.
|
||||
*
|
||||
* @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{account_holder: array{account?: string, customer?: string, customer_account?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[], require_payment_method_support?: string}, limits?: array{accounts: null|int}, manual_entry?: array{mode?: string}, permissions: string[], prefetch?: string[], return_url?: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\FinancialConnections\Session
|
||||
|
||||
@@ -98,7 +98,7 @@ class InvoiceService extends AbstractService
|
||||
* which 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, 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}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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}, billie?: null|array{}, 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}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Invoice
|
||||
@@ -139,7 +139,7 @@ class InvoiceService extends AbstractService
|
||||
* invoice creation. <a href="https://docs.stripe.com/currencies/conversions">Learn
|
||||
* more</a>
|
||||
*
|
||||
* @param null|array{automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, currency?: string, customer?: string, customer_account?: string, customer_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, tax?: array{ip_address?: null|string}, tax_exempt?: null|string, tax_ids?: array{type: string, value: string}[]}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_items?: (array{amount?: int, currency?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoiceitem?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, quantity_decimal?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount?: int, unit_amount_decimal?: string})[], issuer?: array{account?: string, type: string}, on_behalf_of?: null|string, preview_mode?: string, schedule?: string, schedule_details?: array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, end_behavior?: string, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string}, subscription?: string, subscription_details?: array{billing_cycle_anchor?: array|int|string, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, billing_schedules?: null|array{applies_to?: array{price?: string, type: string}[], bill_until?: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancel_now?: bool, default_tax_rates?: null|string[], items?: (array{billing_thresholds?: null|array{usage_gte: int}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], proration_behavior?: string, proration_date?: int, resume_at?: string, start_date?: int, trial_end?: array|int|string}} $params
|
||||
* @param null|array{automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, currency?: string, customer?: string, customer_account?: string, customer_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, tax?: array{ip_address?: null|string}, tax_exempt?: null|string, tax_ids?: array{type: string, value: string}[]}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_items?: (array{amount?: int, currency?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], invoiceitem?: string, metadata?: null|array<string, string>, period?: array{end: int, start: int}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, quantity_decimal?: string, tax_behavior?: string, tax_code?: null|string, tax_rates?: null|string[], unit_amount?: int, unit_amount_decimal?: string})[], issuer?: array{account?: string, type: string}, on_behalf_of?: null|string, preview_mode?: string, schedule?: string, schedule_details?: array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, end_behavior?: string, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string}, subscription?: string, subscription_details?: array{billing_cycle_anchor?: array|int|string, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, billing_schedules?: null|array{applies_to?: array{price?: string, type: string}[], bill_until?: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancel_now?: bool, default_tax_rates?: null|string[], items?: (array{billing_thresholds?: null|array{usage_gte: int}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, proration_behavior?: string, proration_date?: int, resume_at?: string, start_date?: int, trial_end?: array|int|string}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Invoice
|
||||
@@ -312,7 +312,7 @@ class InvoiceService extends AbstractService
|
||||
* invoices, pass <code>auto_advance=false</code>.
|
||||
*
|
||||
* @param string $id
|
||||
* @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}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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}, billie?: null|array{}, 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}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Invoice
|
||||
|
||||
@@ -31,7 +31,7 @@ class CardService extends \Stripe\Service\AbstractService
|
||||
/**
|
||||
* Creates an Issuing <code>Card</code> object.
|
||||
*
|
||||
* @param null|array{cardholder?: string, currency: string, exp_month?: int, exp_year?: int, expand?: string[], financial_account?: string, lifecycle_controls?: array{cancel_after: array{payment_count: int}}, metadata?: array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, replacement_for?: string, replacement_reason?: string, second_line?: null|string, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string, type: string} $params
|
||||
* @param null|array{cardholder?: string, currency: string, exp_month?: int, exp_year?: int, expand?: string[], financial_account?: string, lifecycle_controls?: array{cancel_after: array{payment_count: int}}, metadata?: array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, replacement_for?: string, replacement_reason?: string, second_line?: null|string, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, business_name?: string, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string, type: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Issuing\Card
|
||||
@@ -64,7 +64,7 @@ class CardService extends \Stripe\Service\AbstractService
|
||||
* the parameters passed. Any parameters not provided will be left unchanged.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{cancellation_reason?: string, expand?: string[], metadata?: null|array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string} $params
|
||||
* @param null|array{cancellation_reason?: string, expand?: string[], metadata?: null|array<string, string>, personalization_design?: string, pin?: array{encrypted_number?: string}, shipping?: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, address_validation?: array{mode: string}, business_name?: string, customs?: array{eori_number?: string}, name: string, phone_number?: string, require_signature?: bool, service?: string, type?: string}, spending_controls?: array{allowed_card_presences?: string[], allowed_categories?: string[], allowed_merchant_countries?: string[], blocked_card_presences?: string[], blocked_categories?: string[], blocked_merchant_countries?: string[], spending_limits?: array{amount: int, categories?: string[], interval: string}[]}, status?: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Issuing\Card
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -80,7 +80,7 @@ class PaymentLinkService extends AbstractService
|
||||
* Updates a payment link.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: array<string, string>, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, optional_items?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{description?: null|string, metadata?: null|array<string, string>, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_options?: null|array{card?: null|array{restrictions?: null|array{brands_blocked?: null|string[]}}}, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|array<string, string>, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}} $params
|
||||
* @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: array<string, string>, name_collection?: null|array{business?: array{enabled: bool, optional?: bool}, individual?: array{enabled: bool, optional?: bool}}, on_behalf_of?: null|string, optional_items?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{description?: null|string, metadata?: null|array<string, string>, setup_future_usage?: null|string, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_options?: null|array{card?: null|array{restrictions?: null|array{brands_blocked?: null|string[]}}}, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, shipping_options?: null|array{shipping_rate?: string}[], submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|array<string, string>, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}, transfer_data?: null|array{amount?: null|int, destination: string}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\PaymentLink
|
||||
|
||||
@@ -83,8 +83,9 @@ class PaymentMethodService extends AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches a PaymentMethod object from a Customer. After a PaymentMethod is
|
||||
* detached, it can no longer be used for a payment or re-attached to a Customer.
|
||||
* Detaches a PaymentMethod object from a Customer. Detachment is permanent and
|
||||
* irreversible — once detached, a PaymentMethod can no longer be used for payments
|
||||
* or re-attached to a Customer.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{expand?: string[]} $params
|
||||
|
||||
@@ -11,6 +11,21 @@ namespace Stripe\Service;
|
||||
*/
|
||||
class PaymentRecordService extends AbstractService
|
||||
{
|
||||
/**
|
||||
* List all the Payment Records for a given merchant.
|
||||
*
|
||||
* @param null|array{created_after?: int, created_before?: int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\PaymentRecord>
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v1/payment_records', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Report a new Payment Record. You may report a Payment Record as it is
|
||||
* initialized and later report updates through the other report_* methods, or
|
||||
|
||||
@@ -101,7 +101,7 @@ class QuoteService extends AbstractService
|
||||
* <code>expires_at</code> can be set in the dashboard via the <a
|
||||
* href="https://dashboard.stripe.com/settings/billing/quote">quote template</a>.
|
||||
*
|
||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, customer_account?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, from_quote?: array{is_revision?: bool, quote: string}, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, description?: string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, test_clock?: string, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, customer_account?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, from_quote?: array{is_revision?: bool, quote: string}, header?: null|string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, description?: string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, test_clock?: string, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Quote
|
||||
@@ -172,7 +172,7 @@ class QuoteService extends AbstractService
|
||||
* A quote models prices and services for a customer.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, customer_account?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, header?: null|string, invoice_settings?: array{days_until_due?: int, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{description?: null|string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||
* @param null|array{application_fee_amount?: null|int, application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, collection_method?: string, customer?: string, customer_account?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, footer?: null|string, header?: null|string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, line_items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, price?: string, price_data?: array{currency: string, product: string, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: null|string, subscription_data?: array{description?: null|string, effective_date?: null|array|int|string, metadata?: array<string, string>, trial_period_days?: null|int}, transfer_data?: null|array{amount?: int, amount_percent?: float, destination: string}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Quote
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -49,7 +49,7 @@ class SubscriptionScheduleService extends AbstractService
|
||||
* Creates a new subscription schedule object. Each customer can have up to 500
|
||||
* active or scheduled subscriptions.
|
||||
*
|
||||
* @param null|array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, customer?: string, customer_account?: string, default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], from_subscription?: string, metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: int, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: int})[], start_date?: array|int|string} $params
|
||||
* @param null|array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, customer?: string, customer_account?: string, default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], from_subscription?: string, metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: int, invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: int})[], start_date?: array|int|string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\SubscriptionSchedule
|
||||
@@ -104,7 +104,7 @@ class SubscriptionScheduleService extends AbstractService
|
||||
* Updates an existing subscription schedule.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string} $params
|
||||
* @param null|array{default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\SubscriptionSchedule
|
||||
|
||||
@@ -48,7 +48,7 @@ class SubscriptionService extends AbstractService
|
||||
* allowing the customer to cancel the subscription at all.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{cancellation_details?: array{comment?: null|string, feedback?: null|string}, expand?: string[], invoice_now?: bool, prorate?: bool} $params
|
||||
* @param null|array{cancellation_details?: array{comment?: null|string, feedback?: null|string, feedback_option?: string}, expand?: string[], invoice_now?: bool, prorate?: bool} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Subscription
|
||||
@@ -75,7 +75,7 @@ class SubscriptionService extends AbstractService
|
||||
* schedules</a> instead. Schedules provide the flexibility to model more complex
|
||||
* billing configurations that change over time.
|
||||
*
|
||||
* @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, backdate_start_date?: int, billing_cycle_anchor?: int, billing_cycle_anchor_config?: array{day_of_month: int, hour?: int, minute?: int, month?: int, second?: int}, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, billing_schedules?: array{applies_to?: array{price?: string, type: string}[], bill_until: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: array|int|string, cancel_at_period_end?: bool, collection_method?: string, currency?: string, customer?: string, customer_account?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, payment_behavior?: string, payment_settings?: array{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{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: 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}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, backdate_start_date?: int, billing_cycle_anchor?: int, billing_cycle_anchor_config?: array{day_of_month: int, hour?: int, minute?: int, month?: int, second?: int}, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, billing_schedules?: array{applies_to?: array{price?: string, type: string}[], bill_until: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: array|int|string, cancel_at_period_end?: bool, collection_method?: string, currency?: string, customer?: string, customer_account?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, billie?: null|array{}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: 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}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Subscription
|
||||
@@ -197,7 +197,10 @@ class SubscriptionService extends AbstractService
|
||||
* subscription, plus a <currency>50</currency> prorating adjustment for half of
|
||||
* the previous month’s <currency>100</currency> difference). Similarly, a
|
||||
* downgrade generates a credit that is applied to the next invoice. We also
|
||||
* prorate when you make quantity changes.
|
||||
* prorate when you make quantity changes. You can also <a
|
||||
* href="/billing/scripts/stripe-authored/proration">use scripts to prorate your
|
||||
* billing</a>. To learn more, see <a
|
||||
* href="/billing/subscriptions/prorations">Prorations</a>.
|
||||
*
|
||||
* Switching prices does not normally change the billing date or generate an
|
||||
* immediate charge unless:
|
||||
@@ -234,7 +237,7 @@ class SubscriptionService extends AbstractService
|
||||
* href="/docs/billing/subscriptions/usage-based">usage-based billing</a> instead.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_schedules?: null|array{applies_to?: array{price?: string, type: string}[], bill_until?: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, payment_behavior?: string, payment_settings?: array{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{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: 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}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_schedules?: null|array{applies_to?: array{price?: string, type: string}[], bill_until?: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string, feedback_option?: string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, billie?: null|array{}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: 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}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Subscription
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@ class TokenService extends AbstractService
|
||||
* href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
|
||||
* is <code>application</code>, which includes Custom accounts.
|
||||
*
|
||||
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, representative_declaration?: array{date?: int, ip?: string, user_agent?: string}, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
|
||||
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, administrative_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, principal_place_of_business?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, representative_declaration?: array{date?: int, ip?: string, user_agent?: string}, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Token
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@ class AccountTokenService extends \Stripe\Service\AbstractService
|
||||
* publishable key. In test mode, you can create account tokens with your secret
|
||||
* key or publishable key.
|
||||
*
|
||||
* @param null|array{contact_email?: string, contact_phone?: string, display_name?: string, identity?: array{attestations?: array{directorship_declaration?: array{attested?: bool}, ownership_declaration?: array{attested?: bool}, persons_provided?: array{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}, representative_declaration?: array{attested?: bool}, terms_of_service?: array{account?: array{shown_and_accepted?: bool}}}, business_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, annual_revenue?: array{amount?: \Stripe\StripeObject, fiscal_year_end?: string}, documents?: array{bank_account_ownership_verification?: array{files: string[], type: string}, company_license?: array{files: string[], type: string}, company_memorandum_of_association?: array{files: string[], type: string}, company_ministerial_decree?: array{files: string[], type: string}, company_registration_verification?: array{files: string[], type: string}, company_tax_id_verification?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, proof_of_address?: array{files: string[], type: string}, proof_of_registration?: array{files: string[], signer?: array{person: string}, type: string}, proof_of_ultimate_beneficial_ownership?: array{files: string[], signer?: array{person: string}, type: string}}, estimated_worker_count?: int, id_numbers?: array{registrar?: string, type: string, value: string}[], monthly_estimated_revenue?: array{amount?: \Stripe\StripeObject}, phone?: string, registered_name?: string, registration_date?: array{day: int, month: int, year: int}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{registered_name?: string}, kanji?: array{registered_name?: string}}, structure?: string}, entity_type?: string, individual?: array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array<string, null|string>, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: string, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string}}} $params
|
||||
* @param null|array{contact_email?: string, contact_phone?: string, display_name?: string, identity?: array{attestations?: array{directorship_declaration?: array{attested?: bool}, ownership_declaration?: array{attested?: bool}, persons_provided?: array{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}, representative_declaration?: array{attested?: bool}, terms_of_service?: array{account?: array{shown_and_accepted?: bool}}}, business_details?: array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, annual_revenue?: array{amount?: \Stripe\StripeObject, fiscal_year_end?: string}, documents?: array{bank_account_ownership_verification?: array{files: string[], type: string}, company_license?: array{files: string[], type: string}, company_memorandum_of_association?: array{files: string[], type: string}, company_ministerial_decree?: array{files: string[], type: string}, company_registration_verification?: array{files: string[], type: string}, company_tax_id_verification?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, proof_of_address?: array{files: string[], type: string}, proof_of_registration?: array{files: string[], signer?: array{person: string}, type: string}, proof_of_ultimate_beneficial_ownership?: array{files: string[], signer?: array{person: string}, type: string}}, estimated_worker_count?: int, id_numbers?: array{registrar?: string, type: string, value: string}[], monthly_estimated_revenue?: array{amount?: \Stripe\StripeObject}, phone?: string, registered_name?: string, registration_date?: array{day: int, month: int, year: int}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{registered_name?: string}, kanji?: array{registered_name?: string}}, structure?: string}, entity_type?: string, individual?: array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array<string, null|string>, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: string, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string}}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\Core\AccountToken
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -25,6 +25,9 @@ class Stripe
|
||||
/** @var string The version of the Stripe API to use for requests. */
|
||||
public static $apiVersion = Util\ApiVersion::CURRENT;
|
||||
|
||||
/** @var string The major API version (release train). */
|
||||
public static $majorApiVersion = Util\ApiVersion::CURRENT_MAJOR;
|
||||
|
||||
/** @var null|string The account ID for connected accounts requests. */
|
||||
public static $accountId = null;
|
||||
|
||||
@@ -61,7 +64,7 @@ class Stripe
|
||||
/** @var float Initial delay between retries, in seconds */
|
||||
private static $initialNetworkRetryDelay = 0.5;
|
||||
|
||||
const VERSION = '21.0.0';
|
||||
const VERSION = '21.3.2';
|
||||
|
||||
/**
|
||||
* @return string the API key used for requests
|
||||
|
||||
65
libs/stripe-php/lib/StripeEventNotificationHandler.php
Normal file
65
libs/stripe-php/lib/StripeEventNotificationHandler.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
class StripeEventNotificationHandler extends AbstractEventNotificationHandler
|
||||
{
|
||||
/** @var string */
|
||||
private $webhookSecret;
|
||||
|
||||
/**
|
||||
* Constructor for StripeEventNotificationHandler.
|
||||
*
|
||||
* @param StripeClient $client The Stripe client to use for API interactions
|
||||
* @param string $webhookSecret The webhook secret for verifying signatures
|
||||
* @param callable(V2\Core\EventNotification, StripeClient, UnhandledNotificationDetails): void $fallbackCallback A callback that's invoked for unhandled events
|
||||
*/
|
||||
public function __construct($client, $webhookSecret, $fallbackCallback)
|
||||
{
|
||||
if (empty($webhookSecret)) {
|
||||
throw new Exception\InvalidArgumentException('webhookSecret must be a non-empty string');
|
||||
}
|
||||
|
||||
parent::__construct($client, $fallbackCallback);
|
||||
$this->webhookSecret = $webhookSecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a handler that processes events without webhook signature verification.
|
||||
* Intended for pre-authenticated channels like AWS EventBridge or Azure Event Grid.
|
||||
*
|
||||
* @param StripeClient $client The Stripe client to use for API interactions
|
||||
* @param callable(V2\Core\EventNotification, StripeClient, UnhandledNotificationDetails): void $fallbackCallback A callback that's invoked for unhandled events
|
||||
*
|
||||
* @return StripeEventNotificationHandlerWithoutVerification
|
||||
*/
|
||||
public static function withoutVerification($client, $fallbackCallback)
|
||||
{
|
||||
return new StripeEventNotificationHandlerWithoutVerification($client, $fallbackCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles an incoming webhook payload by dispatching to the appropriate registered handler, if available.
|
||||
*
|
||||
* @param string $payload The raw webhook payload
|
||||
* @param string $sigHeader The value of the Stripe-Signature header
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception\UnexpectedValueException if no handler is registered for the event type
|
||||
* @throws \Exception any exception that may be thrown by a registered function
|
||||
*/
|
||||
public function handle($payload, $sigHeader)
|
||||
{
|
||||
// we're ok with this write being naiive because the expectation is that users register functions
|
||||
$this->hasHandledEvents = true;
|
||||
|
||||
$notif = $this->client->parseEventNotification(
|
||||
$payload,
|
||||
$sigHeader,
|
||||
$this->webhookSecret
|
||||
);
|
||||
|
||||
$this->dispatch($notif);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
/**
|
||||
* A variant of StripeEventNotificationHandler that parses events without
|
||||
* verifying webhook signatures. Intended for pre-authenticated channels
|
||||
* like AWS EventBridge or Azure Event Grid.
|
||||
*
|
||||
* Because this is a sibling of StripeEventNotificationHandler rather than a subclass,
|
||||
* handle() takes only the payload; there is no vestigial signature parameter.
|
||||
*
|
||||
* Prefer StripeEventNotificationHandler::withoutVerification() or
|
||||
* $client->notificationHandlerWithoutVerification() to construct one.
|
||||
*/
|
||||
class StripeEventNotificationHandlerWithoutVerification extends AbstractEventNotificationHandler
|
||||
{
|
||||
/**
|
||||
* Handles an incoming webhook payload without signature verification.
|
||||
*
|
||||
* @param string $payload The raw webhook payload
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle($payload)
|
||||
{
|
||||
$this->hasHandledEvents = true;
|
||||
|
||||
$notif = $this->client->parseEventNotificationWithoutVerification($payload);
|
||||
|
||||
$this->dispatch($notif);
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace Stripe;
|
||||
* @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled
|
||||
* @property bool $cancel_at_period_end Whether this subscription will (if <code>status=active</code>) or did (if <code>status=canceled</code>) cancel at the end of the current billing period.
|
||||
* @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with <code>cancel_at_period_end</code>, <code>canceled_at</code> will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
|
||||
* @property null|(object{comment: null|string, feedback: null|string, reason: null|string}&StripeObject) $cancellation_details Details about why this subscription was cancelled
|
||||
* @property null|(object{comment: null|string, feedback: null|string, feedback_option: null|Billing\FeedbackOption|string, reason: null|string}&StripeObject) $cancellation_details Details about why this subscription was cancelled
|
||||
* @property string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as <code>active</code>.
|
||||
* @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>.
|
||||
@@ -44,7 +44,7 @@ namespace Stripe;
|
||||
* @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at <code>pending_invoice_item_interval</code>.
|
||||
* @property null|Account|string $on_behalf_of The account (if any) the charge was made on behalf of for charges associated with this subscription. See the <a href="https://docs.stripe.com/connect/subscriptions#on-behalf-of">Connect documentation</a> for details.
|
||||
* @property null|(object{behavior: string, resumes_at: null|int}&StripeObject) $pause_collection If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to <code>paused</code>. Learn more about <a href="https://docs.stripe.com/billing/subscriptions/pause-payment">pausing collection</a>.
|
||||
* @property null|(object{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{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string}&StripeObject), network: null|string, 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), pix: null|(object{expires_after_seconds?: int, mandate_options?: (object{amount: null|int, amount_includes_iof: null|string, end_date: null|string, payment_schedule: null|string}&StripeObject)}&StripeObject), sepa_debit: null|(object{}&StripeObject), upi: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&StripeObject)}&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[], save_default_payment_method: null|string}&StripeObject) $payment_settings Payment settings passed on to invoices created by the subscription.
|
||||
* @property null|(object{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), billie?: null|(object{}&StripeObject), card: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string}&StripeObject), network: null|string, 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), pix: null|(object{expires_after_seconds?: int, mandate_options?: (object{amount: null|int, amount_includes_iof: null|string, end_date: null|string, payment_schedule: null|string}&StripeObject)}&StripeObject), sepa_debit: null|(object{}&StripeObject), upi: null|(object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&StripeObject)}&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[], save_default_payment_method: null|string}&StripeObject) $payment_settings Payment settings passed on to invoices created by the subscription.
|
||||
* @property null|(object{interval: string, interval_count: int}&StripeObject) $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling <a href="/api/invoices/create">Create an invoice</a> for the given subscription at the specified interval.
|
||||
* @property null|SetupIntent|string $pending_setup_intent You can use this <a href="https://docs.stripe.com/api/setup_intents">SetupIntent</a> to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the <a href="https://docs.stripe.com/billing/migration/strong-customer-authentication#scenario-2">SCA Migration Guide</a>.
|
||||
* @property null|(object{billing_cycle_anchor: null|int, discount: null|Discount, discounts: null|(Discount|string)[], expires_at: int, metadata: null|StripeObject, subscription_items: null|SubscriptionItem[], trial_end: null|int, trial_from_plan: null|bool}&StripeObject) $pending_update If specified, <a href="https://docs.stripe.com/billing/subscriptions/pending-updates">pending updates</a> that will be applied to the subscription once the <code>latest_invoice</code> has been paid.
|
||||
@@ -91,7 +91,7 @@ class Subscription extends ApiResource
|
||||
* schedules</a> instead. Schedules provide the flexibility to model more complex
|
||||
* billing configurations that change over time.
|
||||
*
|
||||
* @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, backdate_start_date?: int, billing_cycle_anchor?: int, billing_cycle_anchor_config?: array{day_of_month: int, hour?: int, minute?: int, month?: int, second?: int}, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, billing_schedules?: array{applies_to?: array{price?: string, type: string}[], bill_until: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: array|int|string, cancel_at_period_end?: bool, collection_method?: string, currency?: string, customer?: string, customer_account?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, payment_behavior?: string, payment_settings?: array{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{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: 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}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, backdate_start_date?: int, billing_cycle_anchor?: int, billing_cycle_anchor_config?: array{day_of_month: int, hour?: int, minute?: int, month?: int, second?: int}, billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, billing_schedules?: array{applies_to?: array{price?: string, type: string}[], bill_until: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: array|int|string, cancel_at_period_end?: bool, collection_method?: string, currency?: string, customer?: string, customer_account?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, billie?: null|array{}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: 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}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @return Subscription the created resource
|
||||
@@ -162,7 +162,10 @@ class Subscription extends ApiResource
|
||||
* subscription, plus a <currency>50</currency> prorating adjustment for half of
|
||||
* the previous month’s <currency>100</currency> difference). Similarly, a
|
||||
* downgrade generates a credit that is applied to the next invoice. We also
|
||||
* prorate when you make quantity changes.
|
||||
* prorate when you make quantity changes. You can also <a
|
||||
* href="/billing/scripts/stripe-authored/proration">use scripts to prorate your
|
||||
* billing</a>. To learn more, see <a
|
||||
* href="/billing/subscriptions/prorations">Prorations</a>.
|
||||
*
|
||||
* Switching prices does not normally change the billing date or generate an
|
||||
* immediate charge unless:
|
||||
@@ -199,7 +202,7 @@ class Subscription extends ApiResource
|
||||
* href="/docs/billing/subscriptions/usage-based">usage-based billing</a> instead.
|
||||
*
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_schedules?: null|array{applies_to?: array{price?: string, type: string}[], bill_until?: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, payment_behavior?: string, payment_settings?: array{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{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: 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}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_schedules?: null|array{applies_to?: array{price?: string, type: string}[], bill_until?: array{duration?: array{interval: string, interval_count?: int}, timestamp?: int, type: string}, key?: string}[], billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, cancel_at?: null|array|int|string, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string, feedback_option?: string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, items?: (array{billing_thresholds?: null|array{usage_gte: int}, clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|array<string, string>, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, billie?: null|array{}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: 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}}, pix?: null|array{expires_after_seconds?: int, mandate_options?: array{amount?: int, amount_includes_iof?: string, end_date?: string, payment_schedule?: string}}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, 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[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return Subscription the updated resource
|
||||
|
||||
@@ -19,11 +19,11 @@ namespace Stripe;
|
||||
* @property null|(object{end_date: int, start_date: int}&StripeObject) $current_phase Object representing the start and end dates for the current phase of the subscription schedule, if it is <code>active</code>.
|
||||
* @property Customer|string $customer ID of the customer who owns the subscription schedule.
|
||||
* @property null|string $customer_account ID of the account who owns the subscription schedule.
|
||||
* @property (object{application_fee_percent: null|float, automatic_tax?: (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), billing_cycle_anchor: string, billing_thresholds: null|(object{amount_gte: null|int, reset_billing_cycle_anchor: null|bool}&StripeObject), collection_method: null|string, default_payment_method: null|PaymentMethod|string, description: null|string, invoice_settings: (object{account_tax_ids: null|(string|TaxId)[], days_until_due: null|int, issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject), on_behalf_of: null|Account|string, transfer_data: null|(object{amount_percent: null|float, destination: Account|string}&StripeObject)}&StripeObject) $default_settings
|
||||
* @property (object{application_fee_percent: null|float, automatic_tax?: (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), billing_cycle_anchor: string, billing_thresholds: null|(object{amount_gte: null|int, reset_billing_cycle_anchor: null|bool}&StripeObject), collection_method: null|string, default_payment_method: null|PaymentMethod|string, description: null|string, invoice_settings: (object{account_tax_ids: null|(string|TaxId)[], custom_fields: null|(object{name: string, value: string}&StripeObject)[], days_until_due: null|int, description: null|string, footer: null|string, issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject), on_behalf_of: null|Account|string, transfer_data: null|(object{amount_percent: null|float, destination: Account|string}&StripeObject)}&StripeObject) $default_settings
|
||||
* @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends. Possible values are <code>release</code> or <code>cancel</code> with the default being <code>release</code>. <code>release</code> will end the subscription schedule and keep the underlying subscription running. <code>cancel</code> will end the subscription schedule and cancel the underlying subscription.
|
||||
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @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 ((object{add_invoice_items: ((object{discountable: null|bool, discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], metadata: null|StripeObject, period: (object{end: (object{timestamp?: int, type: string}&StripeObject), start: (object{timestamp?: int, type: string}&StripeObject)}&StripeObject), price: Price|string, quantity: null|int, tax_rates?: null|TaxRate[]}&StripeObject))[], application_fee_percent: null|float, automatic_tax?: (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), billing_cycle_anchor: null|string, billing_thresholds: null|(object{amount_gte: null|int, reset_billing_cycle_anchor: null|bool}&StripeObject), collection_method: null|string, currency: string, default_payment_method: null|PaymentMethod|string, default_tax_rates?: null|TaxRate[], description: null|string, discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], end_date: int, invoice_settings: null|(object{account_tax_ids: null|(string|TaxId)[], days_until_due: null|int, issuer: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), items: ((object{billing_thresholds: null|(object{usage_gte: null|int}&StripeObject), discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], metadata: null|StripeObject, plan: Plan|string, price: Price|string, quantity?: int, tax_rates?: null|TaxRate[]}&StripeObject))[], metadata: null|StripeObject, on_behalf_of: null|Account|string, proration_behavior: string, start_date: int, transfer_data: null|(object{amount_percent: null|float, destination: Account|string}&StripeObject), trial_end: null|int}&StripeObject))[] $phases Configuration for the subscription schedule's phases.
|
||||
* @property ((object{add_invoice_items: ((object{discountable: null|bool, discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], metadata: null|StripeObject, period: (object{end: (object{timestamp?: int, type: string}&StripeObject), start: (object{timestamp?: int, type: string}&StripeObject)}&StripeObject), price: Price|string, quantity: null|int, tax_rates?: null|TaxRate[]}&StripeObject))[], application_fee_percent: null|float, automatic_tax?: (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), billing_cycle_anchor: null|string, billing_thresholds: null|(object{amount_gte: null|int, reset_billing_cycle_anchor: null|bool}&StripeObject), collection_method: null|string, currency: string, default_payment_method: null|PaymentMethod|string, default_tax_rates?: null|TaxRate[], description: null|string, discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], end_date: int, invoice_settings: null|(object{account_tax_ids: null|(string|TaxId)[], custom_fields: null|(object{name: string, value: string}&StripeObject)[], days_until_due: null|int, description: null|string, footer: null|string, issuer: null|(object{account?: Account|string, type: string}&StripeObject)}&StripeObject), items: ((object{billing_thresholds: null|(object{usage_gte: null|int}&StripeObject), discounts: ((object{coupon: null|Coupon|string, discount: null|Discount|string, promotion_code: null|PromotionCode|string}&StripeObject))[], metadata: null|StripeObject, plan: Plan|string, price: Price|string, quantity?: int, tax_rates?: null|TaxRate[]}&StripeObject))[], metadata: null|StripeObject, on_behalf_of: null|Account|string, proration_behavior: string, start_date: int, transfer_data: null|(object{amount_percent: null|float, destination: Account|string}&StripeObject), trial?: bool, trial_end: null|int}&StripeObject))[] $phases Configuration for the subscription schedule's phases.
|
||||
* @property null|int $released_at Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $released_subscription ID of the subscription once managed by the subscription schedule (if it is released).
|
||||
* @property string $status The present status of the subscription schedule. Possible values are <code>not_started</code>, <code>active</code>, <code>completed</code>, <code>released</code>, and <code>canceled</code>. You can read more about the different states in our <a href="https://docs.stripe.com/billing/subscriptions/subscription-schedules">behavior guide</a>.
|
||||
@@ -51,7 +51,7 @@ class SubscriptionSchedule extends ApiResource
|
||||
* Creates a new subscription schedule object. Each customer can have up to 500
|
||||
* active or scheduled subscriptions.
|
||||
*
|
||||
* @param null|array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, customer?: string, customer_account?: string, default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], from_subscription?: string, metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: int, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: int})[], start_date?: array|int|string} $params
|
||||
* @param null|array{billing_mode?: array{flexible?: array{proration_discounts?: string}, type: string}, customer?: string, customer_account?: string, default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], from_subscription?: string, metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: int, invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: int})[], start_date?: array|int|string} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @return SubscriptionSchedule the created resource
|
||||
@@ -112,7 +112,7 @@ class SubscriptionSchedule extends ApiResource
|
||||
* Updates an existing subscription schedule.
|
||||
*
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array{default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string} $params
|
||||
* @param null|array{default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], metadata?: null|array<string, string>, phases?: (array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, period?: array{end: array{timestamp?: int, type: string}, start: array{timestamp?: int, type: string}}, price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, billing_thresholds?: null|array{amount_gte?: int, reset_billing_cycle_anchor?: bool}, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], duration?: array{interval: string, interval_count?: int}, end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, description?: null|string, footer?: null|string, issuer?: array{account?: string, type: string}}, items: (array{billing_thresholds?: null|array{usage_gte: int}, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: array<string, string>, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: array<string, string>, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @return SubscriptionSchedule the updated resource
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -18,7 +18,7 @@ namespace Stripe;
|
||||
* @property null|string $customer_account ID of the Account representing the customer.
|
||||
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @property null|(object{account?: Account|string, application?: Application|string, customer?: Customer|string, customer_account: null|string, type: string}&StripeObject) $owner The account or customer the tax ID belongs to.
|
||||
* @property string $type Type of the tax ID, one of <code>ad_nrt</code>, <code>ae_trn</code>, <code>al_tin</code>, <code>am_tin</code>, <code>ao_tin</code>, <code>ar_cuit</code>, <code>au_abn</code>, <code>au_arn</code>, <code>aw_tin</code>, <code>az_tin</code>, <code>ba_tin</code>, <code>bb_tin</code>, <code>bd_bin</code>, <code>bf_ifu</code>, <code>bg_uic</code>, <code>bh_vat</code>, <code>bj_ifu</code>, <code>bo_tin</code>, <code>br_cnpj</code>, <code>br_cpf</code>, <code>bs_tin</code>, <code>by_tin</code>, <code>ca_bn</code>, <code>ca_gst_hst</code>, <code>ca_pst_bc</code>, <code>ca_pst_mb</code>, <code>ca_pst_sk</code>, <code>ca_qst</code>, <code>cd_nif</code>, <code>ch_uid</code>, <code>ch_vat</code>, <code>cl_tin</code>, <code>cm_niu</code>, <code>cn_tin</code>, <code>co_nit</code>, <code>cr_tin</code>, <code>cv_nif</code>, <code>de_stn</code>, <code>do_rcn</code>, <code>ec_ruc</code>, <code>eg_tin</code>, <code>es_cif</code>, <code>et_tin</code>, <code>eu_oss_vat</code>, <code>eu_vat</code>, <code>fo_vat</code>, <code>gb_vat</code>, <code>ge_vat</code>, <code>gi_tin</code>, <code>gn_nif</code>, <code>hk_br</code>, <code>hr_oib</code>, <code>hu_tin</code>, <code>id_npwp</code>, <code>il_vat</code>, <code>in_gst</code>, <code>is_vat</code>, <code>it_cf</code>, <code>jp_cn</code>, <code>jp_rn</code>, <code>jp_trn</code>, <code>ke_pin</code>, <code>kg_tin</code>, <code>kh_tin</code>, <code>kr_brn</code>, <code>kz_bin</code>, <code>la_tin</code>, <code>li_uid</code>, <code>li_vat</code>, <code>lk_vat</code>, <code>ma_vat</code>, <code>md_vat</code>, <code>me_pib</code>, <code>mk_vat</code>, <code>mr_nif</code>, <code>mx_rfc</code>, <code>my_frp</code>, <code>my_itn</code>, <code>my_sst</code>, <code>ng_tin</code>, <code>no_vat</code>, <code>no_voec</code>, <code>np_pan</code>, <code>nz_gst</code>, <code>om_vat</code>, <code>pe_ruc</code>, <code>ph_tin</code>, <code>pl_nip</code>, <code>py_ruc</code>, <code>ro_tin</code>, <code>rs_pib</code>, <code>ru_inn</code>, <code>ru_kpp</code>, <code>sa_vat</code>, <code>sg_gst</code>, <code>sg_uen</code>, <code>si_tin</code>, <code>sn_ninea</code>, <code>sr_fin</code>, <code>sv_nit</code>, <code>th_vat</code>, <code>tj_tin</code>, <code>tr_tin</code>, <code>tw_vat</code>, <code>tz_vat</code>, <code>ua_vat</code>, <code>ug_tin</code>, <code>us_ein</code>, <code>uy_ruc</code>, <code>uz_tin</code>, <code>uz_vat</code>, <code>ve_rif</code>, <code>vn_tin</code>, <code>za_vat</code>, <code>zm_tin</code>, or <code>zw_tin</code>. Note that some legacy tax IDs have type <code>unknown</code>
|
||||
* @property string $type Type of the tax ID, one of <code>ad_nrt</code>, <code>ae_trn</code>, <code>al_tin</code>, <code>am_tin</code>, <code>ao_tin</code>, <code>ar_cuit</code>, <code>au_abn</code>, <code>au_arn</code>, <code>aw_tin</code>, <code>az_tin</code>, <code>ba_tin</code>, <code>bb_tin</code>, <code>bd_bin</code>, <code>bf_ifu</code>, <code>bg_uic</code>, <code>bh_vat</code>, <code>bj_ifu</code>, <code>bo_tin</code>, <code>br_cnpj</code>, <code>br_cpf</code>, <code>bs_tin</code>, <code>by_tin</code>, <code>ca_bn</code>, <code>ca_gst_hst</code>, <code>ca_pst_bc</code>, <code>ca_pst_mb</code>, <code>ca_pst_sk</code>, <code>ca_qst</code>, <code>cd_nif</code>, <code>ch_uid</code>, <code>ch_vat</code>, <code>cl_tin</code>, <code>cm_niu</code>, <code>cn_tin</code>, <code>co_nit</code>, <code>cr_tin</code>, <code>cv_nif</code>, <code>de_stn</code>, <code>do_rcn</code>, <code>ec_ruc</code>, <code>eg_tin</code>, <code>es_cif</code>, <code>et_tin</code>, <code>eu_oss_vat</code>, <code>eu_vat</code>, <code>fo_vat</code>, <code>gb_vat</code>, <code>ge_vat</code>, <code>gi_tin</code>, <code>gn_nif</code>, <code>hk_br</code>, <code>hr_oib</code>, <code>hu_tin</code>, <code>ic_nif</code>, <code>id_npwp</code>, <code>il_vat</code>, <code>in_gst</code>, <code>is_vat</code>, <code>it_cf</code>, <code>jp_cn</code>, <code>jp_rn</code>, <code>jp_trn</code>, <code>ke_pin</code>, <code>kg_tin</code>, <code>kh_tin</code>, <code>kr_brn</code>, <code>kz_bin</code>, <code>la_tin</code>, <code>li_uid</code>, <code>li_vat</code>, <code>lk_vat</code>, <code>ma_vat</code>, <code>md_vat</code>, <code>me_pib</code>, <code>mk_vat</code>, <code>mr_nif</code>, <code>mx_rfc</code>, <code>my_frp</code>, <code>my_itn</code>, <code>my_sst</code>, <code>ng_tin</code>, <code>no_vat</code>, <code>no_voec</code>, <code>np_pan</code>, <code>nz_gst</code>, <code>om_vat</code>, <code>pe_ruc</code>, <code>ph_tin</code>, <code>pl_nip</code>, <code>py_ruc</code>, <code>ro_tin</code>, <code>rs_pib</code>, <code>ru_inn</code>, <code>ru_kpp</code>, <code>sa_vat</code>, <code>sg_gst</code>, <code>sg_uen</code>, <code>si_tin</code>, <code>sn_ninea</code>, <code>sr_fin</code>, <code>sv_nit</code>, <code>th_vat</code>, <code>tj_tin</code>, <code>tr_tin</code>, <code>tw_vat</code>, <code>tz_vat</code>, <code>ua_vat</code>, <code>ug_tin</code>, <code>us_ein</code>, <code>uy_ruc</code>, <code>uz_tin</code>, <code>uz_vat</code>, <code>ve_rif</code>, <code>vn_tin</code>, <code>za_vat</code>, <code>zm_tin</code>, or <code>zw_tin</code>. Note that some legacy tax IDs have type <code>unknown</code>
|
||||
* @property string $value Value of the tax ID.
|
||||
* @property null|(object{status: string, verified_address: null|string, verified_name: null|string}&StripeObject) $verification Tax ID verification information.
|
||||
*/
|
||||
@@ -79,6 +79,7 @@ class TaxId extends ApiResource
|
||||
const TYPE_HK_BR = 'hk_br';
|
||||
const TYPE_HR_OIB = 'hr_oib';
|
||||
const TYPE_HU_TIN = 'hu_tin';
|
||||
const TYPE_IC_NIF = 'ic_nif';
|
||||
const TYPE_ID_NPWP = 'id_npwp';
|
||||
const TYPE_IL_VAT = 'il_vat';
|
||||
const TYPE_IN_GST = 'in_gst';
|
||||
|
||||
@@ -51,6 +51,8 @@ class TaxRate extends ApiResource
|
||||
const TAX_TYPE_IGST = 'igst';
|
||||
const TAX_TYPE_JCT = 'jct';
|
||||
const TAX_TYPE_LEASE_TAX = 'lease_tax';
|
||||
const TAX_TYPE_MASS_TRANSIT_PARKING_TAX = 'mass_transit_parking_tax';
|
||||
const TAX_TYPE_PARKING_TAX = 'parking_tax';
|
||||
const TAX_TYPE_PST = 'pst';
|
||||
const TAX_TYPE_QST = 'qst';
|
||||
const TAX_TYPE_RETAIL_DELIVERY_FEE = 'retail_delivery_fee';
|
||||
|
||||
@@ -27,7 +27,7 @@ class TelemetryId
|
||||
|
||||
$filePath = self::joinPath($configDir, 'telemetry_id');
|
||||
|
||||
if (\file_exists($filePath)) {
|
||||
if (@\file_exists($filePath)) {
|
||||
$content = @\file_get_contents($filePath);
|
||||
if (false !== $content) {
|
||||
$content = \trim($content);
|
||||
@@ -41,7 +41,7 @@ class TelemetryId
|
||||
|
||||
self::$cachedId = \bin2hex(\random_bytes(16));
|
||||
|
||||
if (!\is_dir($configDir)) {
|
||||
if (!@\is_dir($configDir)) {
|
||||
if (!@\mkdir($configDir, 0700, true)) {
|
||||
self::$cachedId = null;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class Token extends ApiResource
|
||||
* href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
|
||||
* is <code>application</code>, which includes Custom accounts.
|
||||
*
|
||||
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, representative_declaration?: array{date?: int, ip?: string, user_agent?: string}, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
|
||||
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, administrative_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, principal_place_of_business?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, representative_declaration?: array{date?: int, ip?: string, user_agent?: string}, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @return Token the created resource
|
||||
|
||||
@@ -21,8 +21,11 @@ namespace Stripe;
|
||||
* @property null|int $expected_availability_date Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.
|
||||
* @property null|string $failure_code Error code explaining reason for top-up failure if available (see <a href="/api/errors">the errors section</a> for a list of codes).
|
||||
* @property null|string $failure_message Message to user further explaining reason for top-up failure if available.
|
||||
* @property null|string $initiated_by Indicates whether the top-up was initiated by Stripe or by the user.
|
||||
* @property bool $livemode If the object exists in live mode, the value is <code>true</code>. If the object exists in test mode, the value is <code>false</code>.
|
||||
* @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|PaymentMethod|string $payment_method The ID of a PaymentMethod representing the payment method used for the top-up. A PaymentMethod of type <code>us_bank_account</code> can be used.
|
||||
* @property null|(object{us_bank_account: null|(object{network: string}&StripeObject)}&StripeObject) $payment_method_options Payment-method-specific configuration for this top-up.
|
||||
* @property null|Source $source The source field is deprecated. It might not always be present in the API response.
|
||||
* @property null|string $statement_descriptor Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.
|
||||
* @property string $status The status of the top-up is either <code>canceled</code>, <code>failed</code>, <code>pending</code>, <code>reversed</code>, or <code>succeeded</code>.
|
||||
@@ -34,6 +37,9 @@ class Topup extends ApiResource
|
||||
|
||||
use ApiOperations\Update;
|
||||
|
||||
const INITIATED_BY_STRIPE = 'stripe';
|
||||
const INITIATED_BY_USER = 'user';
|
||||
|
||||
const STATUS_CANCELED = 'canceled';
|
||||
const STATUS_FAILED = 'failed';
|
||||
const STATUS_PENDING = 'pending';
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
namespace Stripe\Treasury;
|
||||
|
||||
/**
|
||||
* Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.
|
||||
* FinancialAccounts serve as the source and destination of Treasury’s money movement APIs.
|
||||
* Stripe Treasury for Platforms provides users with a container for money called a FinancialAccount that is separate from their Payments balance.
|
||||
* FinancialAccounts serve as the source and destination of Treasury for Platform’s money movement APIs.
|
||||
*
|
||||
* @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.
|
||||
|
||||
14
libs/stripe-php/lib/UnhandledNotificationDetails.php
Normal file
14
libs/stripe-php/lib/UnhandledNotificationDetails.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Stripe;
|
||||
|
||||
class UnhandledNotificationDetails
|
||||
{
|
||||
/** @var bool whether the SDK has types for this event */
|
||||
public $isKnownEventType;
|
||||
|
||||
public function __construct($isKnownEventType)
|
||||
{
|
||||
$this->isKnownEventType = $isKnownEventType;
|
||||
}
|
||||
}
|
||||
63
libs/stripe-php/lib/Util/AgentPluginHint.php
Normal file
63
libs/stripe-php/lib/Util/AgentPluginHint.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Stripe\Util;
|
||||
|
||||
/**
|
||||
* Emits a Claude Code plugin hint: https://code.claude.com/docs/en/plugin-hints.
|
||||
*
|
||||
* The hint goes to stderr, so it must never be emitted while the SDK is being loaded. Harnesses
|
||||
* that parse a child process's output break on unexpected stderr; PHPUnit's process isolation,
|
||||
* for instance, turns any stderr from the child into a test error.
|
||||
*/
|
||||
class AgentPluginHint
|
||||
{
|
||||
const HINT = '<claude-code-hint v="1" type="plugin" value="stripe@claude-plugins-official" />';
|
||||
|
||||
/** @var bool */
|
||||
private static $emitted = false;
|
||||
|
||||
/**
|
||||
* Writes the hint to stderr the first time it's called in a process, if the environment
|
||||
* looks like a coding agent that can act on it.
|
||||
*/
|
||||
public static function maybeEmit()
|
||||
{
|
||||
if (self::$emitted) {
|
||||
return;
|
||||
}
|
||||
self::$emitted = true;
|
||||
|
||||
try {
|
||||
if (!self::shouldEmit()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$stderr = \defined('STDERR') ? \STDERR : \fopen('php://stderr', 'wb');
|
||||
\fwrite($stderr, self::HINT . "\n");
|
||||
} catch (\Throwable $e) {
|
||||
// never let hint emission crash the SDK
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
private static function shouldEmit()
|
||||
{
|
||||
// Claude Code sets this to "1" in every subprocess it spawns; treat an empty value as
|
||||
// unset, so `CLAUDECODE= <command>` suppresses the hint.
|
||||
if ('' === (string) \getenv('CLAUDECODE')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Under a test runner, stderr is parsed rather than displayed. This covers Pest,
|
||||
// ParaTest, and Codeception too, since they all run on PHPUnit.
|
||||
if (\class_exists('PHPUnit\Framework\TestCase', false)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Under fpm and other web SAPIs, stderr is the server's error log; nothing reads hints
|
||||
// there, and writing would add a line per request.
|
||||
return 'cli' === \PHP_SAPI;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,6 @@ namespace Stripe\Util;
|
||||
|
||||
class ApiVersion
|
||||
{
|
||||
const CURRENT = '2026-06-24.dahlia';
|
||||
const CURRENT = '2026-08-26.dahlia';
|
||||
const CURRENT_MAJOR = 'dahlia';
|
||||
}
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
namespace Stripe\Util;
|
||||
|
||||
/**
|
||||
* Handles coercion between PHP int and JSON string for int64_string fields.
|
||||
* Handles coercion for V2 API fields with special wire encoding.
|
||||
*
|
||||
* V2 API fields marked as int64_string are transmitted as JSON strings on
|
||||
* the wire but exposed as PHP ints in the SDK.
|
||||
* V2 API fields may require coercion between PHP native types and their
|
||||
* wire representations (e.g. int64_string, decimal_string), and may be
|
||||
* wrapped in nullable or discriminatedUnion schemas.
|
||||
*/
|
||||
class Int64
|
||||
{
|
||||
/**
|
||||
* Coerce outbound request params: convert PHP ints to strings where
|
||||
* the request schema indicates an int64_string field.
|
||||
* Coerce outbound request params according to the field's wire schema.
|
||||
*
|
||||
* @param mixed $params
|
||||
* @param array $schema e.g. ['kind' => 'object', 'fields' => ['amount' => ['kind' => 'int64_string']]]
|
||||
@@ -37,11 +37,54 @@ class Int64
|
||||
return $params;
|
||||
}
|
||||
|
||||
if ('array' === $schema['kind'] && isset($schema['items'])) {
|
||||
if ('decimal_string' === $schema['kind']) {
|
||||
if (\is_float($params) || \is_int($params)) {
|
||||
return (string) $params;
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
if ('nullable' === $schema['kind'] && isset($schema['inner'])) {
|
||||
return self::coerceRequestParams($params, $schema['inner']);
|
||||
}
|
||||
|
||||
if ('discriminatedUnion' === $schema['kind'] && isset($schema['discriminator'], $schema['variants'])) {
|
||||
if (!\is_array($params)) {
|
||||
return $params;
|
||||
}
|
||||
|
||||
$discriminatorValue = $params[$schema['discriminator']] ?? null;
|
||||
|
||||
// A discriminator that is absent, or present but not a string, is
|
||||
// equally unusable: either way there is no way to pick a variant
|
||||
// schema. Skipping coercion silently sends int64_string fields as
|
||||
// raw JSON numbers, which the API rejects or truncates, so fail
|
||||
// here rather than send a wrong amount.
|
||||
if (!\is_string($discriminatorValue)) {
|
||||
throw new \Stripe\Exception\InvalidArgumentException(
|
||||
"Missing or invalid discriminator `{$schema['discriminator']}` for a polymorphic "
|
||||
. 'parameter. Stripe uses this field to determine the shape of the value, so we '
|
||||
. "cannot encode the request without it. Provide `{$schema['discriminator']}` with "
|
||||
. 'one of: ' . \implode(', ', \array_keys($schema['variants'])) . '.'
|
||||
);
|
||||
}
|
||||
|
||||
// An unrecognized discriminator passes through untouched: we
|
||||
// support sending undocumented params when the caller uses the
|
||||
// right shape.
|
||||
if (\array_key_exists($discriminatorValue, $schema['variants'])) {
|
||||
return self::coerceRequestParams($params, $schema['variants'][$discriminatorValue]);
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
if ('array' === $schema['kind'] && isset($schema['element'])) {
|
||||
if (\is_array($params)) {
|
||||
$result = [];
|
||||
foreach ($params as $key => $value) {
|
||||
$result[$key] = self::coerceRequestParams($value, $schema['items']);
|
||||
$result[$key] = self::coerceRequestParams($value, $schema['element']);
|
||||
}
|
||||
|
||||
return $result;
|
||||
@@ -98,20 +141,31 @@ class Int64
|
||||
if (\is_string($value) && \is_numeric($value)) {
|
||||
$values[$field] = (int) $value;
|
||||
}
|
||||
} elseif ('array' === $encoding['kind'] && isset($encoding['items'])) {
|
||||
} elseif ('nullable' === $encoding['kind'] && isset($encoding['inner'])) {
|
||||
if (null !== $value) {
|
||||
$values = self::coerceResponseValues($values, [$field => $encoding['inner']]);
|
||||
}
|
||||
} elseif ('discriminatedUnion' === $encoding['kind'] && isset($encoding['discriminator'], $encoding['variants'])) {
|
||||
if (\is_array($value) && \array_key_exists($encoding['discriminator'], $value)) {
|
||||
$discriminatorValue = $value[$encoding['discriminator']];
|
||||
if (\is_string($discriminatorValue) && \array_key_exists($discriminatorValue, $encoding['variants'])) {
|
||||
$values = self::coerceResponseValues($values, [$field => $encoding['variants'][$discriminatorValue]]);
|
||||
}
|
||||
}
|
||||
} elseif ('array' === $encoding['kind'] && isset($encoding['element'])) {
|
||||
if (\is_array($value)) {
|
||||
foreach ($value as $i => $item) {
|
||||
if (!isset($encoding['items']['kind'])) {
|
||||
if (!isset($encoding['element']['kind'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ('int64_string' === $encoding['items']['kind']) {
|
||||
if ('int64_string' === $encoding['element']['kind']) {
|
||||
if (\is_string($item) && \is_numeric($item)) {
|
||||
$values[$field][$i] = (int) $item;
|
||||
}
|
||||
} elseif ('object' === $encoding['items']['kind'] && isset($encoding['items']['fields'])) {
|
||||
} elseif ('object' === $encoding['element']['kind'] && isset($encoding['element']['fields'])) {
|
||||
if (\is_array($item)) {
|
||||
$values[$field][$i] = self::coerceResponseValues($item, $encoding['items']['fields']);
|
||||
$values[$field][$i] = self::coerceResponseValues($item, $encoding['element']['fields']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ class ObjectTypes
|
||||
\Stripe\Billing\CreditBalanceSummary::OBJECT_NAME => \Stripe\Billing\CreditBalanceSummary::class,
|
||||
\Stripe\Billing\CreditBalanceTransaction::OBJECT_NAME => \Stripe\Billing\CreditBalanceTransaction::class,
|
||||
\Stripe\Billing\CreditGrant::OBJECT_NAME => \Stripe\Billing\CreditGrant::class,
|
||||
\Stripe\Billing\FeedbackOption::OBJECT_NAME => \Stripe\Billing\FeedbackOption::class,
|
||||
\Stripe\Billing\Meter::OBJECT_NAME => \Stripe\Billing\Meter::class,
|
||||
\Stripe\Billing\MeterEvent::OBJECT_NAME => \Stripe\Billing\MeterEvent::class,
|
||||
\Stripe\Billing\MeterEventAdjustment::OBJECT_NAME => \Stripe\Billing\MeterEventAdjustment::class,
|
||||
@@ -68,6 +69,7 @@ class ObjectTypes
|
||||
\Stripe\FinancialConnections\Account::OBJECT_NAME => \Stripe\FinancialConnections\Account::class,
|
||||
\Stripe\FinancialConnections\AccountOwner::OBJECT_NAME => \Stripe\FinancialConnections\AccountOwner::class,
|
||||
\Stripe\FinancialConnections\AccountOwnership::OBJECT_NAME => \Stripe\FinancialConnections\AccountOwnership::class,
|
||||
\Stripe\FinancialConnections\Authorization::OBJECT_NAME => \Stripe\FinancialConnections\Authorization::class,
|
||||
\Stripe\FinancialConnections\Session::OBJECT_NAME => \Stripe\FinancialConnections\Session::class,
|
||||
\Stripe\FinancialConnections\Transaction::OBJECT_NAME => \Stripe\FinancialConnections\Transaction::class,
|
||||
\Stripe\Forwarding\Request::OBJECT_NAME => \Stripe\Forwarding\Request::class,
|
||||
|
||||
@@ -8,12 +8,12 @@ namespace Stripe\V2\Billing;
|
||||
* A Meter Event is a usage record that captures billable activity for usage-based billing. Meter Events contain an event name, timestamp, and payload with customer mapping and usage value, enabling accurate usage tracking and billing.
|
||||
*
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property int $created The creation time of this meter event.
|
||||
* @property string $created The creation time of this meter event.
|
||||
* @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. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period.
|
||||
* @property string $identifier A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period.
|
||||
* @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 must contain 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/recording-usage#payload-key-overrides">payload</a>..
|
||||
* @property int $timestamp The time of the event. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
|
||||
* @property \Stripe\StripeObject $payload The payload of the event. This must contain 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/recording-usage#payload-key-overrides">payload</a>..
|
||||
* @property string $timestamp The time of the event. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
|
||||
*/
|
||||
class MeterEvent extends \Stripe\ApiResource
|
||||
{
|
||||
|
||||
@@ -10,10 +10,10 @@ namespace Stripe\V2\Billing;
|
||||
* @property string $id The unique ID of this meter event adjustment.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property (object{identifier: string}&\Stripe\StripeObject) $cancel Specifies which event to cancel.
|
||||
* @property int $created The time the adjustment was created.
|
||||
* @property string $created The time the adjustment was created.
|
||||
* @property string $event_name The name of the meter event. Corresponds with the <code>event_name</code> field on a meter.
|
||||
* @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 $status Open Enum. The meter event adjustment’s status.
|
||||
* @property string $status Open Enum. The meter event adjustment's status.
|
||||
* @property string $type Open Enum. Specifies the type of cancellation. Currently supports canceling a single event.
|
||||
*/
|
||||
class MeterEventAdjustment extends \Stripe\ApiResource
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace Stripe\V2\Billing;
|
||||
* @property string $id The unique ID of this auth session.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property string $authentication_token The authentication token for this session. Use this token when calling the high-throughput meter event API.
|
||||
* @property int $created The creation time of this session.
|
||||
* @property int $expires_at The time at which this session expires.
|
||||
* @property string $created The creation time of this session.
|
||||
* @property string $expires_at The time at which this session expires.
|
||||
* @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 MeterEventSession extends \Stripe\ApiResource
|
||||
|
||||
@@ -9,13 +9,13 @@ namespace Stripe\V2\Commerce;
|
||||
*
|
||||
* @property string $id The unique identifier for this ProductCatalogImport.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property int $created The time this ProductCatalogImport was created.
|
||||
* @property string $created The time this ProductCatalogImport was created.
|
||||
* @property string $feed_type The type of feed data being imported into the product catalog.
|
||||
* @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 Additional information about the object in a structured format.
|
||||
* @property string $mode The import strategy for handling existing catalog data.
|
||||
* @property string $status The current status of this ProductCatalogImport.
|
||||
* @property null|(object{awaiting_upload?: (object{upload_url: (object{expires_at: int, url: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), failed?: (object{code: string, failure_message: string, type: string}&\Stripe\StripeObject), processing?: (object{error_count: int, success_count: int}&\Stripe\StripeObject), succeeded?: (object{success_count: int}&\Stripe\StripeObject), succeeded_with_errors?: (object{error_count: int, error_file: (object{content_type: string, download_url: (object{expires_at: int, url: string}&\Stripe\StripeObject), size: int}&\Stripe\StripeObject), samples: (object{error_message: string, field: string, id: string, row: int}&\Stripe\StripeObject)[], success_count: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Details about the current import status.
|
||||
* @property null|(object{awaiting_upload?: (object{upload_url: (object{expires_at: string, url: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), failed?: (object{code: string, failure_message: string, type: string}&\Stripe\StripeObject), processing?: (object{error_count: int, success_count: int}&\Stripe\StripeObject), succeeded?: (object{success_count: int}&\Stripe\StripeObject), succeeded_with_errors?: (object{error_count: int, error_file: (object{content_type: string, download_url: (object{expires_at: string, url: string}&\Stripe\StripeObject), size: int}&\Stripe\StripeObject), samples: (object{error_message: string, field: string, id: string, row: int}&\Stripe\StripeObject)[], success_count: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Details about the current import status.
|
||||
*/
|
||||
class ProductCatalogImport extends \Stripe\ApiResource
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -9,8 +9,8 @@ namespace Stripe\V2\Core;
|
||||
*
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property string $account The ID of the connected account this Account Link applies to.
|
||||
* @property int $created The timestamp at which this Account Link was created.
|
||||
* @property int $expires_at The timestamp at which this Account Link will expire.
|
||||
* @property string $created The timestamp at which this Account Link was created.
|
||||
* @property string $expires_at The timestamp at which this Account Link 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.
|
||||
* @property string $url The URL at which the account can access the Stripe-hosted flow.
|
||||
* @property (object{account_onboarding?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject), account_update?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject) $use_case Hash containing usage options.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace Stripe\V2\Core;
|
||||
* @property string $account The account ID which the individual belongs to.
|
||||
* @property null|(object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}&\Stripe\StripeObject)[] $additional_addresses Additional addresses associated with the person.
|
||||
* @property null|(object{full_name?: string, given_name?: string, purpose: string, surname?: string}&\Stripe\StripeObject)[] $additional_names Additional names (e.g. aliases) associated with the person.
|
||||
* @property null|(object{account?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $additional_terms_of_service Attestations of accepted terms of service agreements.
|
||||
* @property null|(object{account?: (object{date?: string, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $additional_terms_of_service Attestations of accepted terms of service agreements.
|
||||
* @property null|(object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject) $address The person's residential address.
|
||||
* @property int $created Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
||||
* @property string $created Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
||||
* @property null|(object{day: int, month: int, year: int}&\Stripe\StripeObject) $date_of_birth The person's date of birth.
|
||||
* @property null|(object{company_authorization?: (object{files: string[], type: string}&\Stripe\StripeObject), passport?: (object{files: string[], type: string}&\Stripe\StripeObject), primary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), secondary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), visa?: (object{files: string[], type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $documents Documents that may be submitted to satisfy various informational requests.
|
||||
* @property null|string $email The person's email address.
|
||||
@@ -30,7 +30,7 @@ namespace Stripe\V2\Core;
|
||||
* @property null|(object{kana?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), kanji?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $script_addresses The script addresses (e.g., non-Latin characters) associated with the person.
|
||||
* @property null|(object{kana?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject), kanji?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $script_names The script names (e.g. non-Latin characters) associated with the person.
|
||||
* @property null|string $surname The person's last name.
|
||||
* @property int $updated Time at which the object was last updated. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
||||
* @property string $updated Time at which the object was last updated. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
||||
*/
|
||||
class AccountPerson extends \Stripe\ApiResource
|
||||
{
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace Stripe\V2\Core;
|
||||
*
|
||||
* @property string $id Unique identifier for the token.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property int $created Time at which the token was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
||||
* @property int $expires_at Time at which the token will expire.
|
||||
* @property string $created Time at which the token was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
||||
* @property string $expires_at Time at which the token will expire.
|
||||
* @property bool $livemode Has the value <code>true</code> if the token exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property bool $used Determines if the token has already been used (tokens can only be used once).
|
||||
*/
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace Stripe\V2\Core;
|
||||
*
|
||||
* @property string $id Unique identifier for the token.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property int $created Time at which the token was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
||||
* @property int $expires_at Time at which the token will expire.
|
||||
* @property string $created Time at which the token was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
||||
* @property string $expires_at Time at which the token will expire.
|
||||
* @property bool $livemode Has the value <code>true</code> if the token exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property bool $used Determines if the token has already been used (tokens can only be used once).
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Stripe\V2\Core;
|
||||
*
|
||||
* @property string $id Unique identifier for the event.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property int $created Time at which the object was created.
|
||||
* @property string $created Time at which the object was created.
|
||||
* @property \Stripe\StripeObject $reason Reason for the event.
|
||||
* @property string $type The type of the event.
|
||||
* @property null|string $context The Stripe account of the event
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Stripe\V2\Core;
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property null|(object{aws_account_id: string, aws_event_source_arn: string, aws_event_source_status: string}&\Stripe\StripeObject) $amazon_eventbridge Amazon EventBridge configuration.
|
||||
* @property null|(object{azure_partner_topic_name: string, azure_partner_topic_status: string, azure_region: string, azure_resource_group_name: string, azure_subscription_id: string}&\Stripe\StripeObject) $azure_event_grid Azure Event Grid configuration.
|
||||
* @property int $created Time at which the object was created.
|
||||
* @property string $created Time at which the object was created.
|
||||
* @property string $description An optional description of what the event destination is used for.
|
||||
* @property string[] $enabled_events The list of events to enable for this endpoint.
|
||||
* @property string $event_payload Payload type of events being subscribed to.
|
||||
@@ -23,7 +23,7 @@ namespace Stripe\V2\Core;
|
||||
* @property string $status Status. It can be set to either enabled or disabled.
|
||||
* @property null|(object{disabled?: (object{reason: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Additional information about event destination status.
|
||||
* @property string $type Event destination type.
|
||||
* @property int $updated Time at which the object was last updated.
|
||||
* @property string $updated Time at which the object was last updated.
|
||||
* @property null|(object{signing_secret?: string, url?: string}&\Stripe\StripeObject) $webhook_endpoint Webhook endpoint configuration.
|
||||
*/
|
||||
class EventDestination extends \Stripe\ApiResource
|
||||
|
||||
@@ -13,6 +13,7 @@ use Stripe\Util\EventNotificationTypes;
|
||||
* If you want more details, use `$stripeClient->v2->core->events->retrieve(thin_event.id)` to fetch the full event object.
|
||||
*
|
||||
* @property string $id Unique identifier for the event.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property string $type The type of the event.
|
||||
* @property string $created Time at which the object was created.
|
||||
* @property null|\Stripe\StripeContext $context Authentication context needed to fetch the event or related object.
|
||||
@@ -22,6 +23,7 @@ use Stripe\Util\EventNotificationTypes;
|
||||
abstract class EventNotification
|
||||
{
|
||||
public $id;
|
||||
public $object;
|
||||
public $type;
|
||||
public $created;
|
||||
public $context;
|
||||
@@ -43,6 +45,9 @@ abstract class EventNotification
|
||||
if (\array_key_exists('id', $json)) {
|
||||
$this->id = $json['id'];
|
||||
}
|
||||
if (\array_key_exists('object', $json)) {
|
||||
$this->object = $json['object'];
|
||||
}
|
||||
if (\array_key_exists('type', $json)) {
|
||||
$this->type = $json['type'];
|
||||
}
|
||||
@@ -67,21 +72,30 @@ abstract class EventNotification
|
||||
* Helper for constructing an Event Notification. Doesn't perform signature validation, so you
|
||||
* should use \Stripe\BaseStripeClient::parseEventNotification instead for
|
||||
* initial handling. This is useful in unit tests and working with EventNotifications that you've
|
||||
* already validated the authenticity of.
|
||||
* whose authenticity you've already validated.
|
||||
*
|
||||
* @param string $jsonStr the raw json payload
|
||||
* @param array<string, mixed>|string $payload the raw JSON string or already-parsed array
|
||||
* @param \Stripe\StripeClient $client a StripeClient instance that this can use to make requests
|
||||
*
|
||||
* @return EventNotification
|
||||
*
|
||||
* @throws \Stripe\Exception\UnexpectedValueException if the payload is a v1 event
|
||||
*/
|
||||
public static function fromJson($jsonStr, $client)
|
||||
public static function fromJson($payload, $client)
|
||||
{
|
||||
$json = json_decode($jsonStr, true);
|
||||
$json = \Stripe\Webhook::parsePayload($payload);
|
||||
|
||||
if (isset($json['object']) && 'event' === $json['object']) {
|
||||
throw new \Stripe\Exception\UnexpectedValueException(
|
||||
'You passed a webhook payload to StripeClient::parseEventNotification, which expects an event notification. Use Webhook::constructEvent instead.'
|
||||
);
|
||||
if (isset($json['object'])) {
|
||||
if ('event' === $json['object']) {
|
||||
throw new \Stripe\Exception\UnexpectedValueException(
|
||||
'You passed a v1 Event to a method that expects a thin event notification. Use the corresponding constructEvent* method instead.'
|
||||
);
|
||||
}
|
||||
if ('v2.core.event' !== $json['object']) {
|
||||
throw new \Stripe\Exception\UnexpectedValueException(
|
||||
"Unexpected object type '" . $json['object'] . "'. Expected 'v2.core.event' for an event notification."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$class = UnknownEventNotification::class;
|
||||
@@ -102,7 +116,10 @@ abstract class EventNotification
|
||||
{
|
||||
$response = $this->client->rawRequest(
|
||||
'get',
|
||||
"/v2/core/events/{$this->id}",
|
||||
// `id` comes from the notification body, so encode it the way
|
||||
// buildPath() does for generated services -- otherwise it can inject
|
||||
// extra path or query segments.
|
||||
'/v2/core/events/' . \urlencode($this->id),
|
||||
null,
|
||||
[
|
||||
'stripe_context' => $this->context,
|
||||
|
||||
@@ -7,10 +7,12 @@ abstract class Webhook
|
||||
const DEFAULT_TOLERANCE = 300;
|
||||
|
||||
/**
|
||||
* Returns an Events instance using the provided JSON payload. Throws an
|
||||
* Returns a {@link https://docs.stripe.com/event-destinations#snapshot-payload snapshot Event} instance using the provided JSON payload. Throws an
|
||||
* Exception\UnexpectedValueException if the payload is not valid JSON, and
|
||||
* an Exception\SignatureVerificationException if the signature
|
||||
* verification fails for any reason.
|
||||
* verification fails for any reason. To work with a webhook that has already been
|
||||
* verified (i.e. one from a cloud provider, an asynchronous queue, or during testing),
|
||||
* see {@see Webhook::constructEventWithoutVerification()}.
|
||||
*
|
||||
* @param string $payload the payload sent by Stripe
|
||||
* @param string $sigHeader the contents of the signature header sent by
|
||||
@@ -28,21 +30,102 @@ abstract class Webhook
|
||||
{
|
||||
WebhookSignature::verifyHeader($payload, $sigHeader, $secret, $tolerance);
|
||||
|
||||
$data = \json_decode($payload, true);
|
||||
$jsonError = \json_last_error();
|
||||
if (null === $data && \JSON_ERROR_NONE !== $jsonError) {
|
||||
$msg = "Invalid payload: {$payload} "
|
||||
. "(json_last_error() was {$jsonError})";
|
||||
return self::buildV1Event($payload);
|
||||
}
|
||||
|
||||
throw new Exception\UnexpectedValueException($msg);
|
||||
}
|
||||
/**
|
||||
* Constructs a {@link https://docs.stripe.com/event-destinations#snapshot-payload snapshot event} from an incoming webhook without first verifying its authenticity.
|
||||
* Should be used after calling {@see WebhookSignature::verifyHeader()} or with input from a trusted source (such as {@link https://docs.stripe.com/event-destinations/eventbridge AWS EventBridge}, or {@link https://docs.stripe.com/event-destinations/eventgrid Azure Event Grid} payload).
|
||||
* Or, to verify & construct in a single call, use {@see Webhook::constructEvent()} instead.
|
||||
*
|
||||
* @param string $payload the JSON payload
|
||||
*
|
||||
* @return Event
|
||||
*
|
||||
* @throws Exception\UnexpectedValueException if the payload is not valid JSON or is a v2 thin event
|
||||
*/
|
||||
public static function constructEventWithoutVerification($payload)
|
||||
{
|
||||
return self::buildV1Event(self::maybeExtractFromCloudProviderEnvelope($payload));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed>|string $payload raw JSON string or already-parsed array
|
||||
*
|
||||
* @return Event
|
||||
*
|
||||
* @throws Exception\UnexpectedValueException if the payload is not valid JSON or is a v2 thin event
|
||||
*/
|
||||
private static function buildV1Event($payload)
|
||||
{
|
||||
$data = self::parsePayload($payload);
|
||||
|
||||
if (isset($data['object']) && 'v2.core.event' === $data['object']) {
|
||||
throw new Exception\UnexpectedValueException(
|
||||
'You passed an event notification to Webhook::constructEvent, which expects a webhook payload. Use StripeClient::parseEventNotification instead.'
|
||||
'You passed a thin event notification to a method that expects a webhook body. Use the corresponding parseEventNotification* method instead.'
|
||||
);
|
||||
}
|
||||
|
||||
return Event::constructFrom($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal helper for parsing a JSON string into an associative array, or returns the input as-is if already an array.
|
||||
*
|
||||
* @param array<string, mixed>|string $payload raw JSON string or already-parsed array
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*
|
||||
* @throws Exception\UnexpectedValueException if the payload is a string and not valid JSON
|
||||
*/
|
||||
public static function parsePayload($payload)
|
||||
{
|
||||
if (\is_array($payload)) {
|
||||
return $payload;
|
||||
}
|
||||
|
||||
$data = \json_decode($payload, true);
|
||||
if (\JSON_ERROR_NONE !== \json_last_error()) {
|
||||
throw new Exception\UnexpectedValueException(
|
||||
'Invalid JSON payload: ' . \json_last_error_msg()
|
||||
);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal helper to extract the inner event data from an AWS EventBridge or Azure Event Grid envelope,
|
||||
* or returns the parsed payload as-is if it is already a raw Stripe event.
|
||||
*
|
||||
* @param string $payload the JSON payload
|
||||
*
|
||||
* @return array the Stripe event, if available
|
||||
*
|
||||
* @throws Exception\UnexpectedValueException if the payload is not valid JSON or not recognized
|
||||
*/
|
||||
public static function maybeExtractFromCloudProviderEnvelope($payload)
|
||||
{
|
||||
$data = self::parsePayload($payload);
|
||||
|
||||
// Could add as many checks as we want here, but we'll start simple
|
||||
if (\array_key_exists('detail', $data)) {
|
||||
// AWS
|
||||
// https://docs.stripe.com/event-destinations/eventbridge#event-structure
|
||||
return $data['detail'];
|
||||
}
|
||||
if (\array_key_exists('specversion', $data) && \array_key_exists('data', $data)) {
|
||||
// Azure
|
||||
// https://docs.stripe.com/event-destinations/eventgrid#event-structure
|
||||
return $data['data'];
|
||||
}
|
||||
if (isset($data['object']) && ('event' === $data['object'] || 'v2.core.event' === $data['object'])) {
|
||||
// Raw Stripe event: return as-is
|
||||
return $data;
|
||||
}
|
||||
|
||||
throw new Exception\UnexpectedValueException(
|
||||
'Unrecognized event format. The payload must be an AWS EventBridge/Azure Event Grid event envelope or a Stripe webhook (thin event notification or snapshot).'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,13 @@ abstract class WebhookSignature
|
||||
$header
|
||||
);
|
||||
}
|
||||
if (empty($secret)) {
|
||||
throw Exception\SignatureVerificationException::factory(
|
||||
'No webhook secret value was provided. It should start with `whsec_`',
|
||||
$payload,
|
||||
$header
|
||||
);
|
||||
}
|
||||
|
||||
// Check if expected signature is found in list of signatures from
|
||||
// header
|
||||
@@ -124,6 +131,27 @@ abstract class WebhookSignature
|
||||
return $signatures;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the `Stripe-Signature` header for a given webhook body & secret. Useful for signing payloads in unit tests.
|
||||
*
|
||||
* @param string $payload the webhook body to sign
|
||||
* @param string $secret the webhook endpoint's signing secret
|
||||
* @param null|int $timestamp unix timestamp to use (defaults to current time)
|
||||
*
|
||||
* @return string the full `Stripe-Signature` header value
|
||||
*/
|
||||
public static function generateSignatureHeader($payload, $secret, $timestamp = null)
|
||||
{
|
||||
if (null === $timestamp) {
|
||||
$timestamp = \time();
|
||||
}
|
||||
$scheme = self::EXPECTED_SCHEME;
|
||||
$signedPayload = "{$timestamp}.{$payload}";
|
||||
$signature = self::computeSignature($signedPayload, $secret);
|
||||
|
||||
return "t={$timestamp},{$scheme}={$signature}";
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the signature for a given payload and secret.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user