diff --git a/.gitattributes b/.gitattributes index cea7add86..b092cec61 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,10 +2,20 @@ # A list of files and folders those will be excluded from archives and the # Composer package (for purposes of making it smaller). -/.github export-ignore +/.editorconfig export-ignore /.gitattributes export-ignore +/.github export-ignore +/.php-cs-fixer.php export-ignore /.vscode export-ignore +/build.php export-ignore +/CODE_OF_CONDUCT.md export-ignore /examples export-ignore -/phpunit.xml export-ignore +/init.php export-ignore +/Makefile export-ignore +/phpdoc.dist.xml export-ignore +/phpstan-baseline.neon export-ignore +/phpstan.neon.dist export-ignore /phpunit.no_autoload.xml export-ignore +/phpunit.xml export-ignore /tests export-ignore +/update_certs.php export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9079e60c1..cd5eea158 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - name: PHP-CS-Fixer uses: docker://oskarstark/php-cs-fixer-ga:3.4.0 @@ -42,7 +42,7 @@ jobs: - "8.1" steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -54,7 +54,7 @@ jobs: run: | echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} # Conventionally you would hash "composer.lock", but we don't commit @@ -95,9 +95,10 @@ jobs: - "7.4" - "8.0" - "8.1" + - "8.2" steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -109,7 +110,7 @@ jobs: id: composer-cache run: | echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }} diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index f58457755..28745d70d 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -49,8 +49,13 @@ // needs to be a raw `StripeObject`. 'self_accessor' => false, - // Visibility annotations are not supported by php5.6 - 'visibility_required' => false, + // Visibility for constants requires PHP 7.1, but we support PHP 5.6 + 'visibility_required' => [ + 'elements' => [ + 'method', + 'property', + ], + ], // Apparently "uninitialized" is distinct from "null" in some versions of PHP // so I am defensively disabling this rule so as to not cause breaking changes diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4e134f2a9..72a2ee91d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v223 \ No newline at end of file +v226 \ No newline at end of file diff --git a/README.md b/README.md index 5e703087d..e85892ecd 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ composer require stripe/stripe-php To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading): ```php -require_once('vendor/autoload.php'); +require_once 'vendor/autoload.php'; ``` ## Manual Installation @@ -35,7 +35,7 @@ require_once('vendor/autoload.php'); If you do not wish to use Composer, you can download the [latest release](https://github.com/stripe/stripe-php/releases). Then, to use the bindings, include the `init.php` file. ```php -require_once('/path/to/stripe-php/init.php'); +require_once '/path/to/stripe-php/init.php'; ``` ## Dependencies diff --git a/lib/Account.php b/lib/Account.php index 77f814d4e..70978409f 100644 --- a/lib/Account.php +++ b/lib/Account.php @@ -6,35 +6,40 @@ /** * This is an object representing a Stripe account. You can retrieve it to see - * properties on the account like its current e-mail address or if the account is - * enabled yet to make live charges. + * properties on the account like its current requirements or if the account is + * enabled to make live charges or receive payouts. * - * Some properties, marked below, are available only to platforms that want to create and manage Express or - * Custom accounts. + * For Custom accounts, the properties below are always returned. For other + * accounts, some properties are returned until that account has started to go + * through Connect Onboarding. Once you create an Account Link for a Standard + * or Express account, some parameters are no longer returned. These are marked as + * Custom Only or Custom and Express below. Learn + * about the differences between + * 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 null|\Stripe\StripeObject $business_profile Business information about the account. * @property null|string $business_type The business type. - * @property \Stripe\StripeObject $capabilities - * @property bool $charges_enabled Whether the account can create live charges. - * @property \Stripe\StripeObject $company - * @property \Stripe\StripeObject $controller - * @property string $country The account's country. - * @property int $created Time at which the account was connected. Measured in seconds since the Unix epoch. - * @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that Stripe supports in the account's country. - * @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. + * @property null|\Stripe\StripeObject $capabilities + * @property null|bool $charges_enabled Whether the account can create live charges. + * @property null|\Stripe\StripeObject $company + * @property null|\Stripe\StripeObject $controller + * @property null|string $country The account's country. + * @property null|int $created Time at which the account was connected. Measured in seconds since the Unix epoch. + * @property null|string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that Stripe supports in the account's country. + * @property null|bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. * @property null|string $email An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders. - * @property \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account - * @property \Stripe\StripeObject $future_requirements - * @property \Stripe\Person $individual
This is an object representing a person associated with a Stripe account.
A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.
Related guide: Handling Identity Verification with the API.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - * @property bool $payouts_enabled Whether Stripe can send payouts to this account. - * @property \Stripe\StripeObject $requirements + * @property null|\Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account + * @property null|\Stripe\StripeObject $future_requirements + * @property null|\Stripe\Person $individualThis is an object representing a person associated with a Stripe account.
A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.
Related guide: Handling Identity Verification with the API.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|bool $payouts_enabled Whether Stripe can send payouts to this account. + * @property null|\Stripe\StripeObject $requirements * @property null|\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe. - * @property \Stripe\StripeObject $tos_acceptance - * @property string $type The Stripe account type. Can bestandard
, express
, or custom
.
+ * @property null|\Stripe\StripeObject $tos_acceptance
+ * @property null|string $type The Stripe account type. Can be standard
, express
, or custom
.
*/
class Account extends ApiResource
{
diff --git a/lib/Balance.php b/lib/Balance.php
index 4c14a880f..92622c21d 100644
--- a/lib/Balance.php
+++ b/lib/Balance.php
@@ -21,9 +21,9 @@
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the Transfers API or Payouts API. The available balance for each currency and payment type can be found in the source_types
property.
- * @property \Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the source_types
property.
- * @property \Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts.
- * @property \Stripe\StripeObject $issuing
+ * @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the source_types
property.
+ * @property null|\Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts.
+ * @property null|\Stripe\StripeObject $issuing
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the source_types
property.
*/
diff --git a/lib/BillingPortal/Session.php b/lib/BillingPortal/Session.php
index 243e845bb..7ff9be943 100644
--- a/lib/BillingPortal/Session.php
+++ b/lib/BillingPortal/Session.php
@@ -27,7 +27,7 @@
* @property string|\Stripe\BillingPortal\Configuration $configuration The configuration used by this session, describing the features available.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $customer The ID of the customer for this session.
- * @property null|\Stripe\StripeObject $flow Information about a specific flow for the customer to go through.
+ * @property null|\Stripe\StripeObject $flow Information about a specific flow for the customer to go through. See the docs to learn more about using customer portal deep links and flows.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|string $locale The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s preferred_locales
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 on_behalf_of
account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of
account's branding settings, which the portal displays.
diff --git a/lib/Capability.php b/lib/Capability.php
index f675d719f..201b3be50 100644
--- a/lib/Capability.php
+++ b/lib/Capability.php
@@ -14,10 +14,10 @@
* @property string $id The identifier for the capability.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string|\Stripe\Account $account The account for which the capability enables functionality.
- * @property \Stripe\StripeObject $future_requirements
+ * @property null|\Stripe\StripeObject $future_requirements
* @property bool $requested Whether the capability has been requested.
* @property null|int $requested_at Time at which the capability was requested. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $requirements
+ * @property null|\Stripe\StripeObject $requirements
* @property string $status The status of the capability. Can be active
, inactive
, pending
, or unrequested
.
*/
class Capability extends ApiResource
diff --git a/lib/Capital/FinancingOffer.php b/lib/Capital/FinancingOffer.php
index 90ccbe464..569db7e1e 100644
--- a/lib/Capital/FinancingOffer.php
+++ b/lib/Capital/FinancingOffer.php
@@ -10,19 +10,19 @@
*
* @property string $id A unique identifier for the financing object.
* @property string $object The object type: financing_offer.
- * @property \Stripe\StripeObject $accepted_terms This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account. This resource represents the terms accepted by the Connected account, which may differ from those offered.
+ * @property null|\Stripe\StripeObject $accepted_terms This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account. This resource represents the terms accepted by the Connected account, which may differ from those offered.
* @property string $account The ID of the merchant associated with this financing object.
* @property int $created Time at which the offer was created. Given in seconds since unix epoch.
* @property float $expires_after Time at which the offer expires. Given in seconds since unix epoch.
- * @property string $financing_type The type of financing being offered.
+ * @property null|string $financing_type The type of financing being offered.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $offered_terms This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account. This resource represents both the terms offered to the Connected account.
- * @property string $product_type Financing product identifier.
- * @property string $replacement The ID of the financing offer that replaced this offer.
- * @property string $replacement_for The ID of the financing offer that this offer is a replacement for.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $offered_terms This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account. This resource represents both the terms offered to the Connected account.
+ * @property null|string $product_type Financing product identifier.
+ * @property null|string $replacement The ID of the financing offer that replaced this offer.
+ * @property null|string $replacement_for The ID of the financing offer that this offer is a replacement for.
* @property string $status The current status of the offer.
- * @property string $type See financing_type.
+ * @property null|string $type See financing_type.
*/
class FinancingOffer extends \Stripe\ApiResource
{
diff --git a/lib/Capital/FinancingTransaction.php b/lib/Capital/FinancingTransaction.php
index fd3d3502b..fc5653fc8 100644
--- a/lib/Capital/FinancingTransaction.php
+++ b/lib/Capital/FinancingTransaction.php
@@ -14,7 +14,7 @@
* @property int $created_at Time at which the financing transaction was created. Given in seconds since unix epoch.
* @property \Stripe\StripeObject $details This is an object representing a transaction on a Capital financing offer.
* @property null|string $financing_offer The Capital financing offer for this financing transaction.
- * @property string $legacy_balance_transaction_source The Capital transaction object that predates the Financing Transactions API and corresponds with the balance transaction that was created as a result of this financing transaction.
+ * @property null|string $legacy_balance_transaction_source The Capital transaction object that predates the Financing Transactions API and corresponds with the balance transaction that was created as a result of this financing transaction.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property string $type The type of the financing transaction.
* @property null|string $user_facing_description A human-friendly description of the financing transaction.
diff --git a/lib/Charge.php b/lib/Charge.php
index 428ef66e4..b7beb6d7a 100644
--- a/lib/Charge.php
+++ b/lib/Charge.php
@@ -15,14 +15,14 @@
*
* @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 \Stripe\StripeObject $alternate_statement_descriptors
+ * @property null|\Stripe\StripeObject $alternate_statement_descriptors
* @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
* @property int $amount_captured Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
* @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
* @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the charge.
* @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. See the Connect documentation for details.
* @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. See the Connect documentation for details.
- * @property string $authorization_code Authorization code on the charge.
+ * @property null|string $authorization_code Authorization code on the charge.
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
* @property \Stripe\StripeObject $billing_details
* @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.
@@ -39,7 +39,7 @@
* @property null|string $failure_message Message to user further explaining reason for charge failure if available.
* @property null|\Stripe\StripeObject $fraud_details Information on fraud assessments for the charge.
* @property null|string|\Stripe\Invoice $invoice ID of the invoice this charge is for if one exists.
- * @property \Stripe\StripeObject $level3
+ * @property null|\Stripe\StripeObject $level3
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs 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|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details.
@@ -48,7 +48,7 @@
* @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this charge, if one exists.
* @property null|string $payment_method ID of the payment method used in this charge.
* @property null|\Stripe\StripeObject $payment_method_details Details about the payment method at the time of the transaction.
- * @property \Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information.
+ * @property null|\Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information.
* @property null|string $receipt_email This is the email address that the receipt for this charge was sent to.
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be null
until a receipt has been sent.
* @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
@@ -61,7 +61,7 @@
* @property null|string $statement_descriptor For card charges, use statement_descriptor_suffix
instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.
* @property null|string $statement_descriptor_suffix Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
* @property string $status The status of the payment is either succeeded
, pending
, or failed
.
- * @property string|\Stripe\Transfer $transfer ID of the transfer to the destination
account (only applicable if the charge was created using the destination
parameter).
+ * @property null|string|\Stripe\Transfer $transfer ID of the transfer to the destination
account (only applicable if the charge was created using the destination
parameter).
* @property null|\Stripe\StripeObject $transfer_data An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.
* @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details.
*/
diff --git a/lib/Checkout/Session.php b/lib/Checkout/Session.php
index f2efa5983..d6f97ad36 100644
--- a/lib/Checkout/Session.php
+++ b/lib/Checkout/Session.php
@@ -17,13 +17,13 @@
* href="https://stripe.com/docs/api/payment_intents">PaymentIntent or an
* active Subscription.
*
- * You can create a Checkout Session on your server and pass its ID to the client
- * to begin Checkout.
+ * You can create a Checkout Session on your server and redirect to its URL to
+ * begin Checkout.
*
* Related guide: Checkout
* Quickstart.
*
- * @property string $id Unique identifier for the object. Used to pass to redirectToCheckout
in Stripe.js.
+ * @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|\Stripe\StripeObject $after_expiration When set, provides configuration for actions to take if this Checkout Session expires.
* @property null|bool $allow_promotion_codes Enables user redeemable promotion codes.
@@ -37,6 +37,8 @@
* @property null|\Stripe\StripeObject $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|\Stripe\StripeObject $currency_conversion Currency conversion details for automatic currency conversion sessions
+ * @property \Stripe\StripeObject[] $custom_fields Collect additional information from your customer using custom fields. Up to 2 fields are supported.
* @property \Stripe\StripeObject $custom_text
* @property null|string|\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in payment
or subscription
mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created.
* @property null|string $customer_creation Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
@@ -45,7 +47,7 @@
* @property int $expires_at The timestamp at which the Checkout Session will expire.
* @property null|string|\Stripe\Invoice $invoice ID of the invoice created by the Checkout Session, if it exists.
* @property null|\Stripe\StripeObject $invoice_creation Details on the state of invoice creation for the Checkout Session.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items The line items purchased by the customer.
+ * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items The line items purchased by the customer.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|string $locale The IETF language tag of the locale Checkout is displayed in. If blank or auto
, the browser's locale is used.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
@@ -56,7 +58,7 @@
* @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
* @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
* @property string $payment_status The payment status of the Checkout Session, one of paid
, unpaid
, or no_payment_required
. You can use this value to decide when to fulfill your customer's order.
- * @property \Stripe\StripeObject $phone_number_collection
+ * @property null|\Stripe\StripeObject $phone_number_collection
* @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow.
* @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in setup
mode.
* @property null|\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer.
@@ -67,7 +69,7 @@
* @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type
can only be specified on Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or setup
mode.
* @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in subscription
mode.
* @property string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
- * @property \Stripe\StripeObject $tax_id_collection
+ * @property null|\Stripe\StripeObject $tax_id_collection
* @property null|\Stripe\StripeObject $total_details Tax and discount details for the computed total amount.
* @property null|string $url The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com.
This value is only present when the session is active.
*/
diff --git a/lib/Coupon.php b/lib/Coupon.php
index ce9b611d5..52da9f1d9 100644
--- a/lib/Coupon.php
+++ b/lib/Coupon.php
@@ -18,10 +18,10 @@
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|int $amount_off Amount (in the currency
specified) that will be taken off the subtotal of any invoices for this customer.
- * @property \Stripe\StripeObject $applies_to
+ * @property null|\Stripe\StripeObject $applies_to
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency If amount_off
has been set, the three-letter ISO code for the currency of the amount to take off.
- * @property \Stripe\StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
+ * @property null|\Stripe\StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
* @property string $duration One of forever
, once
, and repeating
. Describes how long a customer who applies this coupon will get the discount.
* @property null|int $duration_in_months If duration
is repeating
, the number of months the coupon applies. Null if coupon duration
is forever
or once
.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
diff --git a/lib/CreditNoteLineItem.php b/lib/CreditNoteLineItem.php
index 6b2ca2e3e..30eb8e763 100644
--- a/lib/CreditNoteLineItem.php
+++ b/lib/CreditNoteLineItem.php
@@ -12,7 +12,7 @@
* @property null|string $description Description of the item being credited.
* @property int $discount_amount The integer amount in %s representing the discount being credited for this line item.
* @property \Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item
- * @property string $invoice_line_item ID of the invoice line item being credited
+ * @property null|string $invoice_line_item ID of the invoice line item being credited
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|int $quantity The number of units of product being credited.
* @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
diff --git a/lib/Customer.php b/lib/Customer.php
index 3c3413c0a..a33515171 100644
--- a/lib/Customer.php
+++ b/lib/Customer.php
@@ -15,7 +15,7 @@
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|\Stripe\StripeObject $address The customer's address.
- * @property int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
+ * @property null|int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
* @property null|\Stripe\CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes.
@@ -24,21 +24,21 @@
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property null|\Stripe\Discount $discount Describes the current discount active on the customer, if there is one.
* @property null|string $email The customer's email address.
- * @property \Stripe\StripeObject $invoice_credit_balance The current multi-currency balances, if any, being stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.
+ * @property null|\Stripe\StripeObject $invoice_credit_balance The current multi-currency balances, if any, being stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.
* @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers.
- * @property \Stripe\StripeObject $invoice_settings
+ * @property null|\Stripe\StripeObject $invoice_settings
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|string $name The customer's full name or business name.
- * @property int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001.
+ * @property null|int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001.
* @property null|string $phone The customer's phone number.
* @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference.
* @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
- * @property \Stripe\Collection<\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source> $sources The customer's payment sources, if any.
- * @property \Stripe\Collection<\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any.
- * @property \Stripe\StripeObject $tax
+ * @property null|\Stripe\Collection<\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source> $sources The customer's payment sources, if any.
+ * @property null|\Stripe\Collection<\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any.
+ * @property null|\Stripe\StripeObject $tax
* @property null|string $tax_exempt Describes the customer's tax exemption status. One of none
, exempt
, or reverse
. When set to reverse
, invoice and receipt PDFs include the text "Reverse charge".
- * @property \Stripe\Collection<\Stripe\TaxId> $tax_ids The customer's tax IDs.
+ * @property null|\Stripe\Collection<\Stripe\TaxId> $tax_ids The customer's tax IDs.
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this customer belongs to.
*/
class Customer extends ApiResource
diff --git a/lib/CustomerCashBalanceTransaction.php b/lib/CustomerCashBalanceTransaction.php
index f492bb623..c382522c0 100644
--- a/lib/CustomerCashBalanceTransaction.php
+++ b/lib/CustomerCashBalanceTransaction.php
@@ -13,17 +13,17 @@
*
* @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 \Stripe\StripeObject $applied_to_payment
+ * @property null|\Stripe\StripeObject $applied_to_payment
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property string|\Stripe\Customer $customer The customer whose available cash balance changed as a result of this transaction.
* @property int $ending_balance The total available cash balance for the specified currency after this transaction was applied. Represented in the smallest currency unit.
- * @property \Stripe\StripeObject $funded
+ * @property null|\Stripe\StripeObject $funded
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property int $net_amount The amount by which the cash balance changed, represented in the smallest currency unit. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
- * @property \Stripe\StripeObject $refunded_from_payment
+ * @property null|\Stripe\StripeObject $refunded_from_payment
* @property string $type The type of the cash balance transaction. One of applied_to_payment
, unapplied_from_payment
, refunded_from_payment
, funded
, return_initiated
, or return_canceled
. New types may be added in future. See Customer Balance to learn more about these types.
- * @property \Stripe\StripeObject $unapplied_from_payment
+ * @property null|\Stripe\StripeObject $unapplied_from_payment
*/
class CustomerCashBalanceTransaction extends ApiResource
{
diff --git a/lib/EphemeralKey.php b/lib/EphemeralKey.php
index ee8ecded7..45055e8ca 100644
--- a/lib/EphemeralKey.php
+++ b/lib/EphemeralKey.php
@@ -10,7 +10,7 @@
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property int $expires Time at which the key will expire. Measured in seconds since the Unix epoch.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
- * @property string $secret The key's secret. You can use this value to make authorized requests to the Stripe API.
+ * @property null|string $secret The key's secret. You can use this value to make authorized requests to the Stripe API.
*/
class EphemeralKey extends ApiResource
{
diff --git a/lib/Event.php b/lib/Event.php
index de59f23a7..fdd9d7e95 100644
--- a/lib/Event.php
+++ b/lib/Event.php
@@ -44,7 +44,7 @@
*
* @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 $account The connected account that originated the event.
+ * @property null|string $account The connected account that originated the event.
* @property null|string $api_version The Stripe API version used to render data
. Note: This property is populated only for events on or after October 31, 2014.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property \Stripe\StripeObject $data
diff --git a/lib/FinancialConnections/Session.php b/lib/FinancialConnections/Session.php
index b7fc15a48..b3ce6588a 100644
--- a/lib/FinancialConnections/Session.php
+++ b/lib/FinancialConnections/Session.php
@@ -13,14 +13,15 @@
* @property null|\Stripe\StripeObject $account_holder The account holder for whom accounts are collected in this session.
* @property \Stripe\Collection<\Stripe\FinancialConnections\Account> $accounts The accounts that were collected as part of this Session.
* @property string $client_secret A value that will be passed to the client to launch the authentication flow.
- * @property \Stripe\StripeObject $filters
+ * @property null|\Stripe\StripeObject $filters
+ * @property null|\Stripe\StripeObject $limits
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
- * @property \Stripe\StripeObject $manual_entry
+ * @property null|\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 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.
- * @property string $status The current state of the session.
- * @property \Stripe\StripeObject $status_details
+ * @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.
+ * @property null|string $status The current state of the session.
+ * @property null|\Stripe\StripeObject $status_details
*/
class Session extends \Stripe\ApiResource
{
diff --git a/lib/Identity/VerificationReport.php b/lib/Identity/VerificationReport.php
index f41007c6e..df457e026 100644
--- a/lib/Identity/VerificationReport.php
+++ b/lib/Identity/VerificationReport.php
@@ -25,11 +25,11 @@
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $document Result from a document check
- * @property \Stripe\StripeObject $id_number Result from an id_number check
+ * @property null|\Stripe\StripeObject $document Result from a document check
+ * @property null|\Stripe\StripeObject $id_number Result from an id_number check
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $options
- * @property \Stripe\StripeObject $selfie Result from a selfie check
+ * @property null|\Stripe\StripeObject $selfie Result from a selfie check
* @property string $type Type of report.
* @property null|string $verification_session ID of the VerificationSession that created this report.
*/
diff --git a/lib/Invoice.php b/lib/Invoice.php
index 510cd440c..8a953a812 100644
--- a/lib/Invoice.php
+++ b/lib/Invoice.php
@@ -41,7 +41,7 @@
* Related guide: Send
* Invoices to Customers.
*
- * @property string $id Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See Retrieve an upcoming invoice for more details.
+ * @property null|string $id Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See Retrieve an upcoming invoice for more details.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string $account_country The country of the business associated with this invoice, most often the business creating the invoice.
* @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice.
@@ -55,7 +55,7 @@
* @property null|\Stripe\StripeObject $applies_to
* @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
* @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the invoice.created
webhook, for example, so you might not want to display that invoice as unpaid to your users.
- * @property bool $auto_advance Controls whether Stripe will perform automatic collection of the invoice. When false
, the invoice's state will not automatically advance without an explicit action.
+ * @property null|bool $auto_advance Controls whether Stripe will perform automatic collection of the invoice. When false
, the invoice's state will not automatically advance without an explicit action.
* @property \Stripe\StripeObject $automatic_tax
* @property null|string $billing_reason Indicates the reason why the invoice was created. subscription_cycle
indicates an invoice created by a subscription advancing into a new period. subscription_create
indicates an invoice created due to creating a subscription. subscription_update
indicates an invoice created due to updating a subscription. subscription
is set for all old invoices to indicate either a change to a subscription or a period advancement. manual
is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The upcoming
value is reserved for simulated invoices per the upcoming invoice endpoint. subscription_threshold
indicates an invoice created due to a billing threshold being reached.
* @property null|string|\Stripe\Charge $charge ID of the latest charge generated for this invoice, if any.
@@ -85,7 +85,7 @@
* @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
* @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
* @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice
- * @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines
is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
+ * @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines
is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|int $next_payment_attempt The time at which payment will next be attempted. This value will be null
for invoices where collection_method=send_invoice
.
@@ -109,12 +109,12 @@
* @property null|string $status The status of the invoice, one of draft
, open
, paid
, uncollectible
, or void
. Learn more
* @property \Stripe\StripeObject $status_transitions
* @property null|string|\Stripe\Subscription $subscription The subscription that this invoice was prepared for, if any.
- * @property int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
+ * @property null|int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
* @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
* @property null|int $subtotal_excluding_tax The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
* @property null|int $tax The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice belongs to.
- * @property \Stripe\StripeObject $threshold_reason
+ * @property null|\Stripe\StripeObject $threshold_reason
* @property int $total Total after discounts and taxes.
* @property null|\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items.
* @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.
diff --git a/lib/InvoiceItem.php b/lib/InvoiceItem.php
index 76eae0693..6dd1e2dcd 100644
--- a/lib/InvoiceItem.php
+++ b/lib/InvoiceItem.php
@@ -5,12 +5,25 @@
namespace Stripe;
/**
- * Sometimes you want to add a charge or credit to a customer, but actually charge
- * or credit the customer's card only at the end of a regular billing cycle. This
- * is useful for combining several charges (to minimize per-transaction fees), or
- * for having Stripe tabulate your usage-based billing totals.
+ * Invoice Items represent the component lines of an invoice. An invoice item is
+ * added to an invoice by creating or updating it with an invoice
+ * field, at which point it will be included as an invoice line item
+ * within invoice.lines.
*
- * Related guide: subscription. Sometimes you
+ * want to add a charge or credit to a customer, but actually charge or credit the
+ * customer’s card only at the end of a regular billing cycle. This is useful for
+ * combining several charges (to minimize per-transaction fees), or for having
+ * Stripe tabulate your usage-based billing totals.
+ *
+ * Related guides: Integrate with the
+ * Invoicing API, Subscription
* Invoices.
*
@@ -32,7 +45,7 @@
* @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
* @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
* @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any.
- * @property string $subscription_item The subscription item that this invoice item has been created for, if any.
+ * @property null|string $subscription_item The subscription item that this invoice item has been created for, if any.
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the default_tax_rates
on the invoice do not apply to this invoice item.
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to.
* @property null|int $unit_amount Unit amount (in the currency
specified) of the invoice item.
diff --git a/lib/InvoiceLineItem.php b/lib/InvoiceLineItem.php
index 0d9aa8673..5a588c895 100644
--- a/lib/InvoiceLineItem.php
+++ b/lib/InvoiceLineItem.php
@@ -15,7 +15,7 @@
* @property null|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item.
* @property bool $discountable If true, discounts will apply to this line item. Always false for prorations.
* @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use expand[]=discounts
to expand each discount.
- * @property string $invoice_item The ID of the invoice item associated with this line item if any.
+ * @property null|string $invoice_item The ID of the invoice item associated with this line item if any.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with type=subscription
this will reflect the metadata of the subscription that caused the line item to be created.
* @property \Stripe\StripeObject $period
@@ -25,9 +25,9 @@
* @property null|\Stripe\StripeObject $proration_details Additional details for proration line items
* @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
* @property null|string $subscription The subscription that the invoice item pertains to, if any.
- * @property string $subscription_item The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
- * @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
- * @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
+ * @property null|string $subscription_item The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.
+ * @property null|\Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
+ * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
* @property string $type A string identifying the type of the source of this line item, either an invoiceitem
or a subscription
.
* @property null|string $unit_amount_excluding_tax The amount in %s representing the unit amount for this line item, excluding all tax and discounts.
*/
diff --git a/lib/Issuing/Card.php b/lib/Issuing/Card.php
index 78f1e3fc6..1a52cc5a3 100644
--- a/lib/Issuing/Card.php
+++ b/lib/Issuing/Card.php
@@ -15,14 +15,14 @@
* @property \Stripe\Issuing\Cardholder $cardholder An Issuing Cardholder
object represents an individual or business entity who is issued cards.
Related guide: How to create a Cardholder
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Supported currencies areusd
in the US, eur
in the EU, and gbp
in the UK.
- * @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand
parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
+ * @property null|string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand
parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
* @property int $exp_month The expiration month of the card.
* @property int $exp_year The expiration year of the card.
* @property null|string $financial_account The financial account this card is attached to.
* @property string $last4 The last 4 digits of the card number.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand
parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
+ * @property null|string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand
parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
* @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any.
* @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any.
* @property null|string $replacement_reason The reason why the previous card needed to be replaced.
diff --git a/lib/LineItem.php b/lib/LineItem.php
index 845ff0173..e84788c06 100644
--- a/lib/LineItem.php
+++ b/lib/LineItem.php
@@ -15,11 +15,11 @@
* @property int $amount_total Total after discounts and taxes.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
- * @property \Stripe\StripeObject[] $discounts The discounts applied to the line item.
+ * @property null|\Stripe\StripeObject[] $discounts The discounts applied to the line item.
* @property null|\Stripe\Price $price The price used to generate the line item.
- * @property string|\Stripe\Product $product The ID of the product for this line item.
This will always be the same as price.product
.
The ID of the product for this line item.
This will always be the same as price.product
.
true
if the object exists in live mode or the value false
if the object exists in test mode.
- * @property \Stripe\StripeObject $multi_use
+ * @property null|\Stripe\StripeObject $multi_use
* @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate.
* @property \Stripe\StripeObject $payment_method_details
- * @property \Stripe\StripeObject $single_use
+ * @property null|\Stripe\StripeObject $single_use
* @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment.
* @property string $type The type of the mandate.
*/
diff --git a/lib/Order.php b/lib/Order.php
index 5d75ccfac..d81ac45a6 100644
--- a/lib/Order.php
+++ b/lib/Order.php
@@ -13,28 +13,28 @@
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount_remaining
+ * @property null|int $amount_remaining
* @property int $amount_subtotal Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
* @property int $amount_total Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or equivalent in charge currency.
* @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the Order, if any.
- * @property \Stripe\StripeObject $automatic_tax
+ * @property null|\Stripe\StripeObject $automatic_tax
* @property null|\Stripe\StripeObject $billing_details Customer billing details associated with the order.
* @property null|string $client_secret The client secret of this Order. Used for client-side retrieval using a publishable key.
The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs for creating and processing an order to learn about how client_secret should be handled.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property \Stripe\StripeObject[] $credits The credits applied to the Order. At most 10 credits can be applied to an Order. + * @property null|\Stripe\StripeObject[] $credits The credits applied to the Order. At most 10 credits can be applied to an Order. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string|\Stripe\Customer $customer The customer which this orders belongs to. * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the order. Useexpand[]=discounts
to expand each discount.
* @property null|string $ip_address A recent IP address of the purchaser used for tax reporting and tax location inference.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items.
+ * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property \Stripe\StripeObject $payment
* @property null|\Stripe\StripeObject $shipping_cost The details of the customer cost of shipping, including the customer chosen ShippingRate.
* @property null|\Stripe\StripeObject $shipping_details Customer shipping information associated with the order.
* @property string $status The overall status of the order.
- * @property \Stripe\StripeObject $tax_details
+ * @property null|\Stripe\StripeObject $tax_details
* @property \Stripe\StripeObject $total_details
*/
class Order extends ApiResource
diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php
index 5fb6bca43..5b24b13ab 100644
--- a/lib/PaymentIntent.php
+++ b/lib/PaymentIntent.php
@@ -22,7 +22,7 @@
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $amount Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
* @property int $amount_capturable Amount that can be captured from this PaymentIntent.
- * @property \Stripe\StripeObject $amount_details
+ * @property null|\Stripe\StripeObject $amount_details
* @property int $amount_received Amount that was collected by this PaymentIntent.
* @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the PaymentIntent.
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts.
@@ -49,7 +49,7 @@
* @property null|\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment.
* @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If receipt_email
is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
* @property null|string|\Stripe\Review $review ID of the review associated with this PaymentIntent, if any.
- * @property string $secret_key_confirmation Indicates whether confirmation for this PaymentIntent using a secret key is required
or optional
.
+ * @property null|string $secret_key_confirmation Indicates whether confirmation for this PaymentIntent using a secret key is required
or optional
.
* @property null|string $setup_future_usage Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.
When processing card payments, Stripe also uses setup_future_usage
to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.
true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs 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|\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the Connect documentation for details.
diff --git a/lib/PaymentMethod.php b/lib/PaymentMethod.php
index cf30eafcc..71ba45759 100644
--- a/lib/PaymentMethod.php
+++ b/lib/PaymentMethod.php
@@ -18,46 +18,46 @@
*
* @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 \Stripe\StripeObject $acss_debit
- * @property \Stripe\StripeObject $affirm
- * @property \Stripe\StripeObject $afterpay_clearpay
- * @property \Stripe\StripeObject $alipay
- * @property \Stripe\StripeObject $au_becs_debit
- * @property \Stripe\StripeObject $bacs_debit
- * @property \Stripe\StripeObject $bancontact
+ * @property null|\Stripe\StripeObject $acss_debit
+ * @property null|\Stripe\StripeObject $affirm
+ * @property null|\Stripe\StripeObject $afterpay_clearpay
+ * @property null|\Stripe\StripeObject $alipay
+ * @property null|\Stripe\StripeObject $au_becs_debit
+ * @property null|\Stripe\StripeObject $bacs_debit
+ * @property null|\Stripe\StripeObject $bancontact
* @property \Stripe\StripeObject $billing_details
- * @property \Stripe\StripeObject $blik
- * @property \Stripe\StripeObject $boleto
- * @property \Stripe\StripeObject $card
- * @property \Stripe\StripeObject $card_present
- * @property \Stripe\StripeObject $cashapp
+ * @property null|\Stripe\StripeObject $blik
+ * @property null|\Stripe\StripeObject $boleto
+ * @property null|\Stripe\StripeObject $card
+ * @property null|\Stripe\StripeObject $card_present
+ * @property null|\Stripe\StripeObject $cashapp
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string|\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
- * @property \Stripe\StripeObject $customer_balance
- * @property \Stripe\StripeObject $eps
- * @property \Stripe\StripeObject $fpx
- * @property \Stripe\StripeObject $giropay
- * @property \Stripe\StripeObject $grabpay
- * @property \Stripe\StripeObject $ideal
- * @property \Stripe\StripeObject $interac_present
- * @property \Stripe\StripeObject $klarna
- * @property \Stripe\StripeObject $konbini
- * @property \Stripe\StripeObject $link
+ * @property null|\Stripe\StripeObject $customer_balance
+ * @property null|\Stripe\StripeObject $eps
+ * @property null|\Stripe\StripeObject $fpx
+ * @property null|\Stripe\StripeObject $giropay
+ * @property null|\Stripe\StripeObject $grabpay
+ * @property null|\Stripe\StripeObject $ideal
+ * @property null|\Stripe\StripeObject $interac_present
+ * @property null|\Stripe\StripeObject $klarna
+ * @property null|\Stripe\StripeObject $konbini
+ * @property null|\Stripe\StripeObject $link
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $oxxo
- * @property \Stripe\StripeObject $p24
- * @property \Stripe\StripeObject $paynow
- * @property \Stripe\StripeObject $paypal
- * @property \Stripe\StripeObject $pix
- * @property \Stripe\StripeObject $promptpay
- * @property \Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information.
- * @property \Stripe\StripeObject $sepa_debit
- * @property \Stripe\StripeObject $sofort
+ * @property null|\Stripe\StripeObject $oxxo
+ * @property null|\Stripe\StripeObject $p24
+ * @property null|\Stripe\StripeObject $paynow
+ * @property null|\Stripe\StripeObject $paypal
+ * @property null|\Stripe\StripeObject $pix
+ * @property null|\Stripe\StripeObject $promptpay
+ * @property null|\Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information.
+ * @property null|\Stripe\StripeObject $sepa_debit
+ * @property null|\Stripe\StripeObject $sofort
* @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
- * @property \Stripe\StripeObject $us_bank_account
- * @property \Stripe\StripeObject $wechat_pay
- * @property \Stripe\StripeObject $zip
+ * @property null|\Stripe\StripeObject $us_bank_account
+ * @property null|\Stripe\StripeObject $wechat_pay
+ * @property null|\Stripe\StripeObject $zip
*/
class PaymentMethod extends ApiResource
{
diff --git a/lib/Person.php b/lib/Person.php
index becd59048..1a54b2919 100644
--- a/lib/Person.php
+++ b/lib/Person.php
@@ -21,34 +21,34 @@
*
* @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 $account The account the person is associated with.
- * @property \Stripe\StripeObject $address
+ * @property null|string $account The account the person is associated with.
+ * @property null|\Stripe\StripeObject $address
* @property null|\Stripe\StripeObject $address_kana The Kana variation of the person's address (Japan only).
* @property null|\Stripe\StripeObject $address_kanji The Kanji variation of the person's address (Japan only).
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $dob
+ * @property null|\Stripe\StripeObject $dob
* @property null|string $email The person's email address.
* @property null|string $first_name The person's first name.
* @property null|string $first_name_kana The Kana variation of the person's first name (Japan only).
* @property null|string $first_name_kanji The Kanji variation of the person's first name (Japan only).
- * @property string[] $full_name_aliases A list of alternate names or aliases that the person is known by.
+ * @property null|string[] $full_name_aliases A list of alternate names or aliases that the person is known by.
* @property null|\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.
* @property null|string $gender The person's gender (International regulations require either "male" or "female").
- * @property bool $id_number_provided Whether the person's id_number
was provided.
- * @property bool $id_number_secondary_provided Whether the person's id_number_secondary
was provided.
+ * @property null|bool $id_number_provided Whether the person's id_number
was provided.
+ * @property null|bool $id_number_secondary_provided Whether the person's id_number_secondary
was provided.
* @property null|string $last_name The person's last name.
* @property null|string $last_name_kana The Kana variation of the person's last name (Japan only).
* @property null|string $last_name_kanji The Kanji variation of the person's last name (Japan only).
* @property null|string $maiden_name The person's maiden name.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs 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 $nationality The country where the person is a national.
* @property null|string $phone The person's phone number.
- * @property string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
- * @property \Stripe\StripeObject $registered_address
- * @property \Stripe\StripeObject $relationship
+ * @property null|string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ * @property null|\Stripe\StripeObject $registered_address
+ * @property null|\Stripe\StripeObject $relationship
* @property null|\Stripe\StripeObject $requirements Information about the requirements for this person, including what information needs to be collected, and by when.
- * @property bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only).
- * @property \Stripe\StripeObject $verification
+ * @property null|bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only).
+ * @property null|\Stripe\StripeObject $verification
*/
class Person extends ApiResource
{
diff --git a/lib/Plan.php b/lib/Plan.php
index c3621fa6c..59cb7662d 100644
--- a/lib/Plan.php
+++ b/lib/Plan.php
@@ -39,7 +39,7 @@
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs 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 $nickname A brief description of the plan, hidden from customers.
* @property null|string|\Stripe\Product $product The product whose pricing this plan determines.
- * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme
to be set to tiered
. See also the documentation for billing_scheme
.
+ * @property null|\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme
to be set to tiered
. See also the documentation for billing_scheme
.
* @property null|string $tiers_mode Defines if the tiering price should be graduated
or volume
based. In volume
-based tiering, the maximum quantity within a period determines the per unit price. In graduated
tiering, pricing can change as the quantity grows.
* @property null|\Stripe\StripeObject $transform_usage Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers
.
* @property null|int $trial_period_days Default number of trial days when subscribing a customer to this plan using trial_from_plan=true
.
diff --git a/lib/Price.php b/lib/Price.php
index 95639e48b..ed40a5cd9 100644
--- a/lib/Price.php
+++ b/lib/Price.php
@@ -29,7 +29,7 @@
* @property string $billing_scheme Describes how to compute the price per period. Either per_unit
or tiered
. per_unit
indicates that the fixed amount (specified in unit_amount
or unit_amount_decimal
) will be charged per unit in quantity
(for prices with usage_type=licensed
), or per unit of total usage (for prices with usage_type=metered
). tiered
indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers
and tiers_mode
attributes.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property \Stripe\StripeObject $currency_options Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
+ * @property null|\Stripe\StripeObject $currency_options Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
* @property null|\Stripe\StripeObject $custom_unit_amount When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
@@ -39,7 +39,7 @@
* @property string|\Stripe\Product $product The ID of the product this price is associated with.
* @property null|\Stripe\StripeObject $recurring The recurring components of a price such as interval
and usage_type
.
* @property null|string $tax_behavior Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive
, exclusive
, or unspecified
. Once specified as either inclusive
or exclusive
, it cannot be changed.
- * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme
to be set to tiered
. See also the documentation for billing_scheme
.
+ * @property null|\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme
to be set to tiered
. See also the documentation for billing_scheme
.
* @property null|string $tiers_mode Defines if the tiering price should be graduated
or volume
based. In volume
-based tiering, the maximum quantity within a period determines the per unit price. In graduated
tiering, pricing can change as the quantity grows.
* @property null|\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers
.
* @property string $type One of one_time
or recurring
depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
diff --git a/lib/Product.php b/lib/Product.php
index 19a54e5ff..e7f71266a 100644
--- a/lib/Product.php
+++ b/lib/Product.php
@@ -26,7 +26,7 @@
* @property null|string[] $attributes A list of up to 5 attributes that each SKU can provide values for (e.g., ["color", "size"]
).
* @property null|string $caption A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of type=good
.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string[] $deactivate_on An array of connect application identifiers that cannot purchase this product. Only applicable to products of type=good
.
+ * @property null|string[] $deactivate_on An array of connect application identifiers that cannot purchase this product. Only applicable to products of type=good
.
* @property null|string|\Stripe\Price $default_price The ID of the Price object that is the default price for this product.
* @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
* @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
diff --git a/lib/Quote.php b/lib/Quote.php
index 667ba37e3..f54e65d31 100644
--- a/lib/Quote.php
+++ b/lib/Quote.php
@@ -22,7 +22,7 @@
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property null|string|\Stripe\Customer $customer The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
- * @property (string|\Stripe\TaxRate)[] $default_tax_rates The tax rates applied to this quote.
+ * @property null|(string|\Stripe\TaxRate)[] $default_tax_rates The tax rates applied to this quote.
* @property null|string $description A description that will be displayed on the quote PDF.
* @property (string|\Stripe\Discount)[] $discounts The discounts applied to this quote.
* @property int $expires_at The date on which the quote will be canceled if in open
or draft
status. Measured in seconds since the Unix epoch.
@@ -31,7 +31,7 @@
* @property null|string $header A header that will be displayed on the quote PDF.
* @property null|string|\Stripe\Invoice $invoice The invoice that was created from this quote.
* @property null|\Stripe\StripeObject $invoice_settings All invoices will be billed using the specified settings.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
+ * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
* @property null|string[] $lines A list of lines on the quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
diff --git a/lib/QuotePhase.php b/lib/QuotePhase.php
index a518f8796..d25030ea8 100644
--- a/lib/QuotePhase.php
+++ b/lib/QuotePhase.php
@@ -14,12 +14,12 @@
* @property int $amount_total Total after discounts and taxes are applied.
* @property null|string $billing_cycle_anchor If set to reset
, the billing_cycle_anchor of the subscription is set to the start of the phase when entering the phase. If unset, then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle documentation.
* @property null|string $collection_method Either charge_automatically
, or send_invoice
. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing 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 active
.
- * @property (string|\Stripe\TaxRate)[] $default_tax_rates The default tax rates to apply to the subscription during this phase of the quote.
+ * @property null|(string|\Stripe\TaxRate)[] $default_tax_rates The default tax rates to apply to the subscription during this phase of the quote.
* @property (string|\Stripe\Discount)[] $discounts The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
* @property null|int $end_date The end of this phase of the quote
* @property null|\Stripe\StripeObject $invoice_settings The invoice settings applicable during this phase.
* @property null|int $iterations Integer representing the multiplier applied to the price interval. For example, iterations=2
applied to a price with interval=month
and interval_count=3
results in a phase of duration 2 * 3 months = 6 months
.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
+ * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
* @property string $proration_behavior If the quote will prorate when transitioning to this phase. Possible values are create_prorations
and none
.
* @property \Stripe\StripeObject $total_details
* @property null|bool $trial If set to true the entire phase is counted as a trial and the customer will not be charged for any recurring fees.
diff --git a/lib/Radar/EarlyFraudWarning.php b/lib/Radar/EarlyFraudWarning.php
index 2dfd2aca4..1a00aaf4b 100644
--- a/lib/Radar/EarlyFraudWarning.php
+++ b/lib/Radar/EarlyFraudWarning.php
@@ -19,7 +19,7 @@
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $fraud_type The type of fraud labelled by the issuer. One of card_never_received
, fraudulent_card_application
, made_with_counterfeit_card
, made_with_lost_card
, made_with_stolen_card
, misc
, unauthorized_use_of_card
.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
- * @property string|\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded.
+ * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded.
*/
class EarlyFraudWarning extends \Stripe\ApiResource
{
diff --git a/lib/Refund.php b/lib/Refund.php
index 0ddabfc4e..8692f03a4 100644
--- a/lib/Refund.php
+++ b/lib/Refund.php
@@ -18,12 +18,12 @@
* @property null|string|\Stripe\Charge $charge ID of the charge that was refunded.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)
- * @property string|\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
- * @property string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are lost_or_stolen_card
, expired_or_canceled_card
, or unknown
.
- * @property string $instructions_email Email to which refund instructions, if required, are sent to.
+ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)
+ * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
+ * @property null|string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are lost_or_stolen_card
, expired_or_canceled_card
, charge_for_pending_refund_disputed
, insufficient_funds
, declined
, merchant_request
or unknown
.
+ * @property null|string $instructions_email Email to which refund instructions, if required, are sent to.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $next_action
+ * @property null|\Stripe\StripeObject $next_action
* @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was refunded.
* @property null|string $reason Reason for the refund, either user-provided (duplicate
, fraudulent
, or requested_by_customer
) or generated by Stripe internally (expired_uncaptured_charge
).
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund.
diff --git a/lib/Review.php b/lib/Review.php
index af8f39854..8833f8108 100644
--- a/lib/Review.php
+++ b/lib/Review.php
@@ -22,7 +22,7 @@
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property bool $open If true
, the review needs action.
* @property string $opened_reason The reason the review was opened. One of rule
or manual
.
- * @property string|\Stripe\PaymentIntent $payment_intent The PaymentIntent ID associated with this review, if one exists.
+ * @property null|string|\Stripe\PaymentIntent $payment_intent The PaymentIntent ID associated with this review, if one exists.
* @property string $reason The reason the review is currently open or closed. One of rule
, manual
, approved
, refunded
, refunded_as_fraud
, disputed
, or redacted
.
* @property null|\Stripe\StripeObject $session Information related to the browsing session of the user who initiated the payment.
*/
diff --git a/lib/Service/AccountService.php b/lib/Service/AccountService.php
index 4ef217d57..aad227268 100644
--- a/lib/Service/AccountService.php
+++ b/lib/Service/AccountService.php
@@ -80,6 +80,12 @@ public function allPersons($parentId, $params = null, $opts = null)
* href="https://dashboard.stripe.com/account/applications/settings">register your
* platform.
*
+ * If you’ve already collected information for your connected accounts, you can pre-fill that information
+ * when creating the account. Connect Onboarding won’t ask for the pre-filled
+ * information during account onboarding. You can pre-fill any information on the
+ * account.
+ *
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
@@ -281,9 +287,13 @@ public function retrievePerson($parentId, $id, $params = null, $opts = null)
/**
* Updates a connected account by setting the
* values of the parameters passed. Any parameters not provided are left unchanged.
- * Most parameters can be changed only for Custom accounts. (These are marked
- * Custom Only below.) Parameters marked Custom and
- * Express are not supported for Standard accounts.
+ *
+ * For Custom accounts, you can update any information on the account. For other
+ * accounts, you can update all information until that account has started to go
+ * through Connect Onboarding. Once you create an Account Link for a Standard or Express
+ * account, some parameters can no longer be changed. These are marked as
+ * Custom Only or Custom and Express below.
*
* To update your own account, use the Dashboard. Refer to our lines property
- * containing the first handful of those items. There is also a URL where you can
- * retrieve the full (paginated) list of lines.
+ * Retrieves a paginated list of lines for a quote. These lines describe changes
+ * that will be used to create new subscription schedules or update existing
+ * subscription schedules when the quote is accepted.
*
* @param string $id
* @param null|array $params
diff --git a/lib/SetupAttempt.php b/lib/SetupAttempt.php
index b091cda26..488ce05b4 100644
--- a/lib/SetupAttempt.php
+++ b/lib/SetupAttempt.php
@@ -13,7 +13,7 @@
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string|\Stripe\StripeObject $application The value of application on the SetupIntent at the time of this confirmation.
- * @property bool $attach_to_self If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ * @property null|bool $attach_to_selfIf present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string|\Stripe\Customer $customer The value of customer on the SetupIntent at the time of this confirmation. * @property null|string[] $flow_directionsIndicates the directions of money movement for which this payment method is intended to be used.
Include inbound
if you intend to use the payment method as the origin to pull funds from. Include outbound
if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ * @property null|bool $attach_to_selfIf present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
* @property null|string $cancellation_reason Reason for cancellation of this SetupIntent, one ofabandoned
, requested_by_customer
, or duplicate
.
* @property null|string $client_secret The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/lib/ShippingRate.php b/lib/ShippingRate.php index b68b757cd..a292b8f15 100644 --- a/lib/ShippingRate.php +++ b/lib/ShippingRate.php @@ -17,7 +17,7 @@ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|\Stripe\StripeObject $delivery_estimate The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. * @property null|string $display_name The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - * @property \Stripe\StripeObject $fixed_amount + * @property null|\Stripe\StripeObject $fixed_amount * @property bool $livemode Has the valuetrue
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs 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 $tax_behavior Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive
, exclusive
, or unspecified
.
diff --git a/lib/Sigma/ScheduledQueryRun.php b/lib/Sigma/ScheduledQueryRun.php
index b109dde70..167765086 100644
--- a/lib/Sigma/ScheduledQueryRun.php
+++ b/lib/Sigma/ScheduledQueryRun.php
@@ -15,7 +15,7 @@
* @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 int $data_load_time When the query was run, Sigma contained a snapshot of your Stripe data at this time.
- * @property \Stripe\StripeObject $error
+ * @property null|\Stripe\StripeObject $error
* @property null|\Stripe\File $file The file object representing the results of the query.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property int $result_available_until Time at which the result expires and is no longer available for download.
diff --git a/lib/Source.php b/lib/Source.php
index 60f9d7427..1a3e391a8 100644
--- a/lib/Source.php
+++ b/lib/Source.php
@@ -21,43 +21,43 @@
*
* @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 \Stripe\StripeObject $ach_credit_transfer
- * @property \Stripe\StripeObject $ach_debit
- * @property \Stripe\StripeObject $acss_debit
- * @property \Stripe\StripeObject $alipay
+ * @property null|\Stripe\StripeObject $ach_credit_transfer
+ * @property null|\Stripe\StripeObject $ach_debit
+ * @property null|\Stripe\StripeObject $acss_debit
+ * @property null|\Stripe\StripeObject $alipay
* @property null|int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use
sources.
- * @property \Stripe\StripeObject $au_becs_debit
- * @property \Stripe\StripeObject $bancontact
- * @property \Stripe\StripeObject $card
- * @property \Stripe\StripeObject $card_present
+ * @property null|\Stripe\StripeObject $au_becs_debit
+ * @property null|\Stripe\StripeObject $bancontact
+ * @property null|\Stripe\StripeObject $card
+ * @property null|\Stripe\StripeObject $card_present
* @property string $client_secret The client secret of the source. Used for client-side retrieval using a publishable key.
- * @property \Stripe\StripeObject $code_verification
+ * @property null|\Stripe\StripeObject $code_verification
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use
sources.
- * @property string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
- * @property \Stripe\StripeObject $eps
+ * @property null|string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
+ * @property null|\Stripe\StripeObject $eps
* @property string $flow The authentication flow
of the source. flow
is one of redirect
, receiver
, code_verification
, none
.
- * @property \Stripe\StripeObject $giropay
- * @property \Stripe\StripeObject $ideal
- * @property \Stripe\StripeObject $klarna
+ * @property null|\Stripe\StripeObject $giropay
+ * @property null|\Stripe\StripeObject $ideal
+ * @property null|\Stripe\StripeObject $klarna
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $multibanco
+ * @property null|\Stripe\StripeObject $multibanco
* @property null|\Stripe\StripeObject $owner Information about the owner of the payment instrument that may be used or required by particular source types.
- * @property \Stripe\StripeObject $p24
- * @property \Stripe\StripeObject $paypal
- * @property \Stripe\StripeObject $receiver
- * @property \Stripe\StripeObject $redirect
- * @property \Stripe\StripeObject $sepa_credit_transfer
- * @property \Stripe\StripeObject $sepa_debit
- * @property \Stripe\StripeObject $sofort
- * @property \Stripe\StripeObject $source_order
+ * @property null|\Stripe\StripeObject $p24
+ * @property null|\Stripe\StripeObject $paypal
+ * @property null|\Stripe\StripeObject $receiver
+ * @property null|\Stripe\StripeObject $redirect
+ * @property null|\Stripe\StripeObject $sepa_credit_transfer
+ * @property null|\Stripe\StripeObject $sepa_debit
+ * @property null|\Stripe\StripeObject $sofort
+ * @property null|\Stripe\StripeObject $source_order
* @property null|string $statement_descriptor Extra information about a source. This will appear on your customer's statement every time you charge the source.
* @property string $status The status of the source, one of canceled
, chargeable
, consumed
, failed
, or pending
. Only chargeable
sources can be used to create a charge.
- * @property \Stripe\StripeObject $three_d_secure
+ * @property null|\Stripe\StripeObject $three_d_secure
* @property string $type The type
of the source. The type
is a payment method, one of ach_credit_transfer
, ach_debit
, alipay
, bancontact
, card
, card_present
, eps
, giropay
, ideal
, multibanco
, klarna
, p24
, sepa_debit
, sofort
, three_d_secure
, or wechat
. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method used.
* @property null|string $usage Either reusable
or single_use
. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
- * @property \Stripe\StripeObject $wechat
+ * @property null|\Stripe\StripeObject $wechat
*/
class Source extends ApiResource
{
diff --git a/lib/SubscriptionItem.php b/lib/SubscriptionItem.php
index 6b57588db..980c025df 100644
--- a/lib/SubscriptionItem.php
+++ b/lib/SubscriptionItem.php
@@ -16,7 +16,7 @@
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property \Stripe\Plan $plan You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.
Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
Related guides: Set up a subscription and more about products and prices.
* @property \Stripe\Price $pricePrices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
Related guides: Set up a subscription, create an invoice, and more about products and prices.
- * @property int $quantity The quantity of the plan to which the customer should be subscribed. + * @property null|int $quantity The quantity of the plan to which the customer should be subscribed. * @property string $subscription Thesubscription
this subscription_item
belongs to.
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this subscription_item
. When set, the default_tax_rates
on the subscription do not apply to this subscription_item
.
* @property null|\Stripe\StripeObject $trial Options that configure the trial on the subscription item.
diff --git a/lib/SubscriptionSchedule.php b/lib/SubscriptionSchedule.php
index 55a56748f..18a30761e 100644
--- a/lib/SubscriptionSchedule.php
+++ b/lib/SubscriptionSchedule.php
@@ -16,7 +16,7 @@
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the schedule.
* @property null|\Stripe\StripeObject $applies_to Details to identify the subscription schedule the quote line applies to.
- * @property string $billing_behavior Configures when the subscription schedule generates prorations for phase transitions. Possible values are prorate_on_next_phase
or prorate_up_front
with the default being prorate_on_next_phase
. prorate_on_next_phase
will apply phase changes and generate prorations at transition time.prorate_up_front
will bill for all phases within the current billing cycle up front.
+ * @property null|string $billing_behavior Configures when the subscription schedule generates prorations for phase transitions. Possible values are prorate_on_next_phase
or prorate_up_front
with the default being prorate_on_next_phase
. prorate_on_next_phase
will apply phase changes and generate prorations at transition time.prorate_up_front
will bill for all phases within the current billing cycle up front.
* @property null|int $canceled_at Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
* @property null|int $completed_at Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php
index 397114394..3bca5a80b 100644
--- a/lib/Tax/Calculation.php
+++ b/lib/Tax/Calculation.php
@@ -17,7 +17,6 @@
* @property null|int $expires_at Timestamp of date at which the tax calculation will expire. Empty if the calculation is an unsaved preview.
* @property null|\Stripe\Collection<\Stripe\LineItem> $line_items The list of items the customer is purchasing.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
- * @property null|string $reference A custom unique identifier, such as 'myOrder_123'.
* @property int $tax_amount_exclusive The amount of tax to be collected on top of the line item prices.
* @property int $tax_amount_inclusive The amount of tax already included in the line item prices.
* @property \Stripe\StripeObject[] $tax_breakdown Breakdown of individual tax amounts that add up to the total.
diff --git a/lib/Terminal/Configuration.php b/lib/Terminal/Configuration.php
index f34831f74..1484c2e89 100644
--- a/lib/Terminal/Configuration.php
+++ b/lib/Terminal/Configuration.php
@@ -10,11 +10,11 @@
*
* @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 \Stripe\StripeObject $bbpos_wisepos_e
+ * @property null|\Stripe\StripeObject $bbpos_wisepos_e
* @property null|bool $is_account_default Whether this Configuration is the default for your account
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
- * @property \Stripe\StripeObject $tipping
- * @property \Stripe\StripeObject $verifone_p400
+ * @property null|\Stripe\StripeObject $tipping
+ * @property null|\Stripe\StripeObject $verifone_p400
*/
class Configuration extends \Stripe\ApiResource
{
diff --git a/lib/Terminal/ConnectionToken.php b/lib/Terminal/ConnectionToken.php
index e49a0b0ec..101f2114f 100644
--- a/lib/Terminal/ConnectionToken.php
+++ b/lib/Terminal/ConnectionToken.php
@@ -11,7 +11,7 @@
* Management.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $location The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens.
+ * @property null|string $location The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens.
* @property string $secret Your application should pass this token to the Stripe Terminal SDK.
*/
class ConnectionToken extends \Stripe\ApiResource
diff --git a/lib/Terminal/Location.php b/lib/Terminal/Location.php
index 11c625d86..5c7bf4dc5 100644
--- a/lib/Terminal/Location.php
+++ b/lib/Terminal/Location.php
@@ -13,7 +13,7 @@
* @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 \Stripe\StripeObject $address
- * @property string $configuration_overrides The ID of a configuration that will be used to customize all readers in this location.
+ * @property null|string $configuration_overrides The ID of a configuration that will be used to customize all readers in this location.
* @property string $display_name The display name of the location.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
diff --git a/lib/Token.php b/lib/Token.php
index 18b33e868..e3c734a99 100644
--- a/lib/Token.php
+++ b/lib/Token.php
@@ -35,8 +35,8 @@
*
* @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 \Stripe\BankAccount $bank_account These bank accounts are payment methods on Customer
objects.
On the other hand External Accounts are transfer destinations on Account
objects for Custom accounts. They can be bank accounts or debit cards as well, and are documented in the links above.
Related guide: Bank Debits and Transfers.
- * @property \Stripe\Card $cardYou can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.
Related guide: Card Payments with Sources.
+ * @property null|\Stripe\BankAccount $bank_accountThese bank accounts are payment methods on Customer
objects.
On the other hand External Accounts are transfer destinations on Account
objects for Custom accounts. They can be bank accounts or debit cards as well, and are documented in the links above.
Related guide: Bank Debits and Transfers.
+ * @property null|\Stripe\Card $cardYou can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.
Related guide: Card Payments with Sources.
* @property null|string $client_ip IP address of the client that generated the token. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property bool $livemode Has the valuetrue
if the object exists in live mode or the value false
if the object exists in test mode.
diff --git a/lib/Transfer.php b/lib/Transfer.php
index f93e3bda4..736776643 100644
--- a/lib/Transfer.php
+++ b/lib/Transfer.php
@@ -27,13 +27,13 @@
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property null|string|\Stripe\Account $destination ID of the Stripe account the transfer was sent to.
- * @property string|\Stripe\Charge $destination_payment If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.
+ * @property null|string|\Stripe\Charge $destination_payment If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property \Stripe\Collection<\Stripe\TransferReversal> $reversals A list of reversals that have been applied to the transfer.
* @property bool $reversed Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
* @property null|string|\Stripe\Charge $source_transaction ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.
- * @property string $source_type The source balance this transfer came from. One of card
, fpx
, or bank_account
.
+ * @property null|string $source_type The source balance this transfer came from. One of card
, fpx
, or bank_account
.
* @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details.
*/
class Transfer extends ApiResource
diff --git a/lib/Treasury/FinancialAccount.php b/lib/Treasury/FinancialAccount.php
index a5c63c884..a04bf59ae 100644
--- a/lib/Treasury/FinancialAccount.php
+++ b/lib/Treasury/FinancialAccount.php
@@ -11,17 +11,17 @@
*
* @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[] $active_features The array of paths to active Features in the Features hash.
+ * @property null|string[] $active_features The array of paths to active Features in the Features hash.
* @property \Stripe\StripeObject $balance Balance information for the FinancialAccount
* @property string $country Two-letter country code (ISO 3166-1 alpha-2).
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\Treasury\FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a status
enum and associated status_details
. Stripe or the platform can control Features via the requested field.
+ * @property null|\Stripe\Treasury\FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a status
enum and associated status_details
. Stripe or the platform can control Features via the requested field.
* @property \Stripe\StripeObject[] $financial_addresses The set of credentials that resolve to a FinancialAccount.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string[] $pending_features The array of paths to pending Features in the Features hash.
+ * @property null|string[] $pending_features The array of paths to pending Features in the Features hash.
* @property null|\Stripe\StripeObject $platform_restrictions The set of functionalities that the platform can restrict on the FinancialAccount.
- * @property string[] $restricted_features The array of paths to restricted Features in the Features hash.
+ * @property null|string[] $restricted_features The array of paths to restricted Features in the Features hash.
* @property string $status The enum specifying what state the account is in.
* @property \Stripe\StripeObject $status_details
* @property string[] $supported_currencies The currencies the FinancialAccount can hold a balance in. Three-letter ISO currency code, in lowercase.
diff --git a/lib/Treasury/FinancialAccountFeatures.php b/lib/Treasury/FinancialAccountFeatures.php
index ef343a7cb..ba07e100b 100644
--- a/lib/Treasury/FinancialAccountFeatures.php
+++ b/lib/Treasury/FinancialAccountFeatures.php
@@ -10,13 +10,13 @@
* the platform can control Features via the requested field.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $card_issuing Toggle settings for enabling/disabling a feature
- * @property \Stripe\StripeObject $deposit_insurance Toggle settings for enabling/disabling a feature
- * @property \Stripe\StripeObject $financial_addresses Settings related to Financial Addresses features on a Financial Account
- * @property \Stripe\StripeObject $inbound_transfers InboundTransfers contains inbound transfers features for a FinancialAccount.
- * @property \Stripe\StripeObject $intra_stripe_flows Toggle settings for enabling/disabling a feature
- * @property \Stripe\StripeObject $outbound_payments Settings related to Outbound Payments features on a Financial Account
- * @property \Stripe\StripeObject $outbound_transfers OutboundTransfers contains outbound transfers features for a FinancialAccount.
+ * @property null|\Stripe\StripeObject $card_issuing Toggle settings for enabling/disabling a feature
+ * @property null|\Stripe\StripeObject $deposit_insurance Toggle settings for enabling/disabling a feature
+ * @property null|\Stripe\StripeObject $financial_addresses Settings related to Financial Addresses features on a Financial Account
+ * @property null|\Stripe\StripeObject $inbound_transfers InboundTransfers contains inbound transfers features for a FinancialAccount.
+ * @property null|\Stripe\StripeObject $intra_stripe_flows Toggle settings for enabling/disabling a feature
+ * @property null|\Stripe\StripeObject $outbound_payments Settings related to Outbound Payments features on a Financial Account
+ * @property null|\Stripe\StripeObject $outbound_transfers OutboundTransfers contains outbound transfers features for a FinancialAccount.
*/
class FinancialAccountFeatures extends \Stripe\ApiResource
{
diff --git a/lib/Treasury/ReceivedDebit.php b/lib/Treasury/ReceivedDebit.php
index c1e3cf7c4..172b8bb52 100644
--- a/lib/Treasury/ReceivedDebit.php
+++ b/lib/Treasury/ReceivedDebit.php
@@ -18,7 +18,7 @@
* @property null|string $failure_code Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
* @property null|string $financial_account The FinancialAccount that funds were pulled from.
* @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
- * @property \Stripe\StripeObject $initiating_payment_method_details
+ * @property null|\Stripe\StripeObject $initiating_payment_method_details
* @property \Stripe\StripeObject $linked_flows
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property string $network The network used for the ReceivedDebit.
diff --git a/lib/WebhookEndpoint.php b/lib/WebhookEndpoint.php
index 96333d132..5f0e16ad0 100644
--- a/lib/WebhookEndpoint.php
+++ b/lib/WebhookEndpoint.php
@@ -25,7 +25,7 @@
* @property string[] $enabled_events The list of events to enable for this endpoint. ['*']
indicates that all events are enabled, except those that require explicit selection.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $secret The endpoint's secret, used to generate webhook signatures. Only returned at creation.
+ * @property null|string $secret The endpoint's secret, used to generate webhook signatures. Only returned at creation.
* @property string $status The status of the webhook. It can be enabled
or disabled
.
* @property string $url The URL of the webhook endpoint.
*/
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index f07962da9..300716e83 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -725,16 +725,6 @@ public function testUpdateCapability()
static::assertInstanceOf(\Stripe\Capability::class, $result);
}
- public function testResumeSubscription()
- {
- $this->expectsRequest('post', '/v1/subscriptions/sub_xxxxxxxxxxxxx/resume');
- $result = $this->client->subscriptions->resume(
- 'sub_xxxxxxxxxxxxx',
- ['proration_date' => 1675400000, 'proration_behavior' => 'always_invoice']
- );
- static::assertInstanceOf(\Stripe\Subscription::class, $result);
- }
-
public function testCreateLoginLink()
{
$this->expectsRequest(
@@ -881,6 +871,16 @@ public function testUpdateApplicationFeeRefund()
static::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $result);
}
+ public function testListSecret2()
+ {
+ $this->expectsRequest('get', '/v1/apps/secrets');
+ $result = $this->client->apps->secrets->all(
+ ['scope' => ['type' => 'account'], 'limit' => 2]
+ );
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\Apps\Secret::class, $result->data[0]);
+ }
+
public function testCreateSecret2()
{
$this->expectsRequest('post', '/v1/apps/secrets');
@@ -979,7 +979,7 @@ public function testCreateCharge()
'amount' => 2000,
'currency' => 'usd',
'source' => 'tok_xxxx',
- 'description' => 'My First Test Charge (created for API docs)',
+ 'description' => 'My First Test Charge (created for API docs at https://www.stripe.com/docs/api)',
]
);
static::assertInstanceOf(\Stripe\Charge::class, $result);
@@ -1033,7 +1033,6 @@ public function testCreateSession4()
$result = $this->client->checkout->sessions->create(
[
'success_url' => 'https://example.com/success',
- 'cancel_url' => 'https://example.com/cancel',
'line_items' => [['price' => 'price_xxxxxxxxxxxxx', 'quantity' => 2]],
'mode' => 'payment',
]
@@ -1209,7 +1208,9 @@ public function testCreateCustomer()
{
$this->expectsRequest('post', '/v1/customers');
$result = $this->client->customers->create(
- ['description' => 'My First Test Customer (created for API docs)']
+ [
+ 'description' => 'My First Test Customer (created for API docs at https://www.stripe.com/docs/api)',
+ ]
);
static::assertInstanceOf(\Stripe\Customer::class, $result);
}
@@ -1481,6 +1482,19 @@ public function testRetrieveAccount3()
static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
}
+ public function testDisconnectAccount2()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/disconnect'
+ );
+ $result = $this->client->financialConnections->accounts->disconnect(
+ 'fca_xxxxxxxxxxxxx',
+ []
+ );
+ static::assertInstanceOf(\Stripe\FinancialConnections\Account::class, $result);
+ }
+
public function testListOwnersAccount2()
{
$this->expectsRequest(
@@ -1991,7 +2005,7 @@ public function testCreatePaymentIntent2()
[
'amount' => 2000,
'currency' => 'usd',
- 'payment_method_types' => ['card'],
+ 'automatic_payment_methods' => ['enabled' => true],
]
);
static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
@@ -2073,6 +2087,19 @@ public function testIncrementAuthorizationPaymentIntent()
static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
}
+ public function testVerifyMicrodepositsPaymentIntent2()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits'
+ );
+ $result = $this->client->paymentIntents->verifyMicrodeposits(
+ 'pi_xxxxxxxxxxxxx',
+ ['amounts' => [32, 45]]
+ );
+ static::assertInstanceOf(\Stripe\PaymentIntent::class, $result);
+ }
+
public function testSearchPaymentIntent()
{
$this->expectsRequest('get', '/v1/payment_intents/search');
@@ -2135,8 +2162,8 @@ public function testCreatePaymentMethod()
'type' => 'card',
'card' => [
'number' => '4242424242424242',
- 'exp_month' => 5,
- 'exp_year' => 2023,
+ 'exp_month' => 8,
+ 'exp_year' => 2024,
'cvc' => '314',
],
]
@@ -2755,6 +2782,19 @@ public function testConfirmSetupIntent()
static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
}
+ public function testVerifyMicrodepositsSetupIntent2()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits'
+ );
+ $result = $this->client->setupIntents->verifyMicrodeposits(
+ 'seti_xxxxxxxxxxxxx',
+ ['amounts' => [32, 45]]
+ );
+ static::assertInstanceOf(\Stripe\SetupIntent::class, $result);
+ }
+
public function testListShippingRate2()
{
$this->expectsRequest('get', '/v1/shipping_rates');
@@ -2929,7 +2969,7 @@ public function testCreateSubscriptionSchedule()
$result = $this->client->subscriptionSchedules->create(
[
'customer' => 'cus_xxxxxxxxxxxxx',
- 'start_date' => 1652909005,
+ 'start_date' => 1676070661,
'end_behavior' => 'release',
'phases' => [
[
@@ -3174,8 +3214,9 @@ public function testCreateLocation()
'address' => [
'line1' => '1234 Main Street',
'city' => 'San Francisco',
- 'country' => 'US',
'postal_code' => '94111',
+ 'state' => 'CA',
+ 'country' => 'US',
],
]
);
@@ -3286,6 +3327,22 @@ public function testProcessPaymentIntentReader()
static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
}
+ public function testProcessSetupIntentReader()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent'
+ );
+ $result = $this->client->terminal->readers->processSetupIntent(
+ 'tmr_xxxxxxxxxxxxx',
+ [
+ 'setup_intent' => 'seti_xxxxxxxxxxxxx',
+ 'customer_consent_collected' => true,
+ ]
+ );
+ static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result);
+ }
+
public function testListTestClock2()
{
$this->expectsRequest('get', '/v1/test_helpers/test_clocks');
@@ -3337,7 +3394,7 @@ public function testAdvanceTestClock2()
);
$result = $this->client->testHelpers->testClocks->advance(
'clock_xxxxxxxxxxxxx',
- ['frozen_time' => 1652390605]
+ ['frozen_time' => 1675552261]
);
static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result);
}
@@ -3666,19 +3723,6 @@ public function testRetrieveFeaturesFinancialAccount()
static::assertInstanceOf(\Stripe\Treasury\FinancialAccountFeatures::class, $result);
}
- public function testUpdateFeaturesFinancialAccount()
- {
- $this->expectsRequest(
- 'post',
- '/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features'
- );
- $result = $this->client->treasury->financialAccounts->updateFeatures(
- 'fa_xxxxxxxxxxxxx',
- ['card_issuing' => ['requested' => false]]
- );
- static::assertInstanceOf(\Stripe\Treasury\FinancialAccountFeatures::class, $result);
- }
-
public function testListInboundTransfer()
{
$this->expectsRequest('get', '/v1/treasury/inbound_transfers');
@@ -3748,7 +3792,7 @@ public function testCreateOutboundPayment()
'financial_account' => 'fa_xxxxxxxxxxxxx',
'amount' => 10000,
'currency' => 'usd',
- 'customer' => 'cu_xxxxxxxxxxxxx',
+ 'customer' => 'cus_xxxxxxxxxxxxx',
'destination_payment_method' => 'pm_xxxxxxxxxxxxx',
'description' => 'OutboundPayment to a 3rd party',
]
@@ -3760,10 +3804,10 @@ public function testRetrieveOutboundPayment()
{
$this->expectsRequest(
'get',
- '/v1/treasury/outbound_payments/obp_xxxxxxxxxxxxx'
+ '/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx'
);
$result = $this->client->treasury->outboundPayments->retrieve(
- 'obp_xxxxxxxxxxxxx',
+ 'bot_xxxxxxxxxxxxx',
[]
);
static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result);
@@ -3773,10 +3817,10 @@ public function testCancelOutboundPayment()
{
$this->expectsRequest(
'post',
- '/v1/treasury/outbound_payments/obp_xxxxxxxxxxxxx/cancel'
+ '/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel'
);
$result = $this->client->treasury->outboundPayments->cancel(
- 'obp_xxxxxxxxxxxxx',
+ 'bot_xxxxxxxxxxxxx',
[]
);
static::assertInstanceOf(\Stripe\Treasury\OutboundPayment::class, $result);