From d46451c952dbfbf4f28d5d6dae9f826a1cf193b0 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 13:43:21 -0800 Subject: [PATCH] Update generated code for beta (#1808) * Update generated code (#1793) * Update generated code for v1399 * Update generated code for v1409 * Update generated code for v1412 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> * Bump version to 16.4.0 * Added pull request template (#1797) * Add justfile, remove coveralls, and fix AUTOLOAD in CI (#1801) * add justfile and tweak CI + readme * debug test * Debugging * further debugging * restore original composer json * add more logging * maybe fix ci * Fix typo * fix test naming and pass autoload directly to recipe as arugment * Remove unused logline and fix typo * restore composer * remove extra log line * update justfile * add comments * update ci * revert to gh action * ensure dependencies are installed for format and test recipes (#1802) * Added CONTRIBUTING.md file (#1806) * minor justfile fixes (#1807) * made v2 event class concrete, and changed convertToStripeObject to use it if we cannot find the identified event subclass (#1805) * Update generated code for v1461 * Update generated code (#1804) * Update generated code for v1441 * Update generated code for v1452 * Update generated code for v1455 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> * Bump version to 16.5.0 * Make `httpClient()` a public, static method (#1810) * Make `httpClient()` a public, static method * Make `streamingHttpClient()` a public, static method * Update generated code for v1467 * Raise a more descriptive error if null bytes are found in the path (#1811) * raise a more descriptive error if null bytes are found in the path * formatting * change error thrown for null byte issues (#1813) * Update generated code for v1472 --------- Co-authored-by: stripe-openapi[bot] <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Jesse Rosalia Co-authored-by: David Brownman <109395161+xavdid-stripe@users.noreply.github.com> Co-authored-by: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> Co-authored-by: Helen Ye Co-authored-by: Johan de Jager --- CHANGELOG.md | 18 +++++++++++++++++- OPENAPI_VERSION | 2 +- lib/Account.php | 2 +- lib/AccountSession.php | 2 +- lib/ApiRequestor.php | 18 ++++++++++++------ lib/Billing/CreditGrant.php | 4 ++-- lib/Billing/MeterEventSummary.php | 2 ++ lib/Charge.php | 2 +- lib/Checkout/Session.php | 6 +++--- lib/Service/AccountSessionService.php | 2 +- .../Billing/CreditBalanceSummaryService.php | 2 +- lib/Service/Billing/CreditGrantService.php | 2 +- lib/Service/Checkout/SessionService.php | 2 +- lib/TaxRate.php | 6 +++--- tests/Stripe/ApiRequestorTest.php | 19 +++++++++++++++++++ 15 files changed, 66 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b67792cb0..0389423cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,24 @@ # Changelog +## 16.5.0 - 2025-01-27 +* [#1804](https://github.com/stripe/stripe-php/pull/1804) Update generated code + * Add support for `close` method on resource `Treasury.FinancialAccount` + * Add support for `advice_code` on `StripeError` + * Add support for `discounts` on `Checkout.Session` + * Add support for new value `pay_by_bank` on enum `PaymentLink.payment_method_types[]` + * Add support for `pay_by_bank` on `PaymentMethodConfiguration` and `PaymentMethod` + * Add support for new value `pay_by_bank` on enum `PaymentMethod.type` + * Add support for `is_default` and `nickname` on `Treasury.FinancialAccount` +* [#1805](https://github.com/stripe/stripe-php/pull/1805) Restore testCoreEventsGet generated test +* [#1807](https://github.com/stripe/stripe-php/pull/1807) minor justfile fixes +* [#1806](https://github.com/stripe/stripe-php/pull/1806) Added CONTRIBUTING.md file +* [#1802](https://github.com/stripe/stripe-php/pull/1802) ensure dependencies are installed for format and test recipes +* [#1801](https://github.com/stripe/stripe-php/pull/1801) Add justfile, remove coveralls, and fix AUTOLOAD in CI +* [#1797](https://github.com/stripe/stripe-php/pull/1797) Added pull request template + ## 16.5.0-beta.3 - 2025-01-23 * [#1803](https://github.com/stripe/stripe-php/pull/1803) Update generated code for beta - * V2 Events now are subclass of `\Stripe\V2\Event`. + * V2 Events now are subclass of `\Stripe\V2\Event`. ## 16.5.0-beta.2 - 2025-01-09 * [#1796](https://github.com/stripe/stripe-php/pull/1796) Update generated code for beta diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5454d94e1..130232bf3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1460 \ No newline at end of file +v1472 \ No newline at end of file diff --git a/lib/Account.php b/lib/Account.php index 7b813a5fc..9e59214a5 100644 --- a/lib/Account.php +++ b/lib/Account.php @@ -38,7 +38,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|bool $payouts_enabled Whether the funds in this account can be paid out. * @property (object{alternatives: null|(object{alternative_fields_due: string[], original_fields_due: string[]}&\Stripe\StripeObject&\stdClass)[], current_deadline: null|int, currently_due: null|string[], disabled_reason: null|string, errors: null|(object{code: string, reason: string, requirement: string}&\Stripe\StripeObject&\stdClass)[], eventually_due: null|string[], past_due: null|string[], pending_verification: null|string[]}&\Stripe\StripeObject&\stdClass) $requirements - * @property null|(object{charges: (object{pause_requested: bool}&\Stripe\StripeObject&\stdClass), payouts: (object{pause_requested: bool}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass) $risk_controls + * @property null|(object{charges: (object{pause_requested: bool}&\Stripe\StripeObject&\stdClass), payouts: (object{pause_requested: bool}&\Stripe\StripeObject&\stdClass), rejected_reason?: string}&\Stripe\StripeObject&\stdClass) $risk_controls * @property null|(object{bacs_debit_payments?: (object{display_name: null|string, service_user_number: null|string}&\Stripe\StripeObject&\stdClass), bank_bca_onboarding?: (object{account_holder_name?: string, business_account_number?: string}&\Stripe\StripeObject&\stdClass), branding: (object{icon: null|string|\Stripe\File, logo: null|string|\Stripe\File, primary_color: null|string, secondary_color: null|string}&\Stripe\StripeObject&\stdClass), capital?: (object{payout_destination?: \Stripe\StripeObject, payout_destination_selector?: \Stripe\StripeObject}&\Stripe\StripeObject&\stdClass), card_issuing?: (object{tos_acceptance?: (object{date: null|int, ip: null|string, user_agent?: string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), card_payments: (object{decline_on?: (object{avs_failure: bool, cvc_failure: bool}&\Stripe\StripeObject&\stdClass), statement_descriptor_prefix: null|string, statement_descriptor_prefix_kana: null|string, statement_descriptor_prefix_kanji: null|string}&\Stripe\StripeObject&\stdClass), dashboard: (object{display_name: null|string, timezone: null|string}&\Stripe\StripeObject&\stdClass), invoices?: (object{default_account_tax_ids: null|(string|\Stripe\TaxId)[]}&\Stripe\StripeObject&\stdClass), payments: (object{statement_descriptor: null|string, statement_descriptor_kana: null|string, statement_descriptor_kanji: null|string, statement_descriptor_prefix_kana: null|string, statement_descriptor_prefix_kanji: null|string}&\Stripe\StripeObject&\stdClass), payouts?: (object{debit_negative_balances: bool, schedule: (object{delay_days: int, interval: string, monthly_anchor?: int, weekly_anchor?: string}&\Stripe\StripeObject&\stdClass), statement_descriptor: null|string}&\Stripe\StripeObject&\stdClass), sepa_debit_payments?: (object{creditor_id?: string}&\Stripe\StripeObject&\stdClass), tax_forms?: (object{consented_to_paperless_delivery: bool}&\Stripe\StripeObject&\stdClass), treasury?: (object{tos_acceptance?: (object{date: null|int, ip: null|string, user_agent?: string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass) $settings Options for customizing how the account functions within Stripe. * @property (object{date?: null|int, ip?: null|string, service_agreement?: string, user_agent?: null|string}&\Stripe\StripeObject&\stdClass) $tos_acceptance * @property null|string $type The Stripe account type. Can be standard, express, custom, or none. diff --git a/lib/AccountSession.php b/lib/AccountSession.php index 731d25e98..9a71d0b7d 100644 --- a/lib/AccountSession.php +++ b/lib/AccountSession.php @@ -28,7 +28,7 @@ class AccountSession extends ApiResource * Creates a AccountSession object that includes a single-use token that the * platform can use on their front-end to grant client-side API access. * - * @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, app_install?: array{enabled: bool, features?: array{allowed_apps?: null|string[]}}, app_viewport?: array{enabled: bool, features?: array{allowed_apps?: null|string[]}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, capital_financing?: array{enabled: bool, features?: array{}}, capital_financing_application?: array{enabled: bool, features?: array{}}, capital_financing_promotion?: array{enabled: bool, features?: array{}}, capital_overview?: array{enabled: bool, features?: array{}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_method_settings?: array{enabled: bool, features?: array{}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, recipients?: array{enabled: bool, features?: array{send_money?: bool}}, reporting_chart?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}, tax_threshold_monitoring?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params + * @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, app_install?: array{enabled: bool, features?: array{allowed_apps?: null|string[]}}, app_viewport?: array{enabled: bool, features?: array{allowed_apps?: null|string[]}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, capital_financing?: array{enabled: bool, features?: array{}}, capital_financing_application?: array{enabled: bool, features?: array{}}, capital_financing_promotion?: array{enabled: bool, features?: array{}}, capital_overview?: array{enabled: bool, features?: array{}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_method_settings?: array{enabled: bool, features?: array{}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, product_tax_code_selector?: array{enabled: bool, features?: array{}}, recipients?: array{enabled: bool, features?: array{send_money?: bool}}, reporting_chart?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}, tax_threshold_monitoring?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params * @param null|array|string $options * * @throws \Stripe\Exception\ApiErrorException if the request fails diff --git a/lib/ApiRequestor.php b/lib/ApiRequestor.php index f2bbde6ef..52edc4fbe 100644 --- a/lib/ApiRequestor.php +++ b/lib/ApiRequestor.php @@ -436,8 +436,8 @@ private function _prepareRequest($method, $url, $params, $headers, $apiMode) // X-Stripe-Client-User-Agent header via the optional getUserAgentInfo() // method $clientUAInfo = null; - if (\method_exists($this->httpClient(), 'getUserAgentInfo')) { - $clientUAInfo = $this->httpClient()->getUserAgentInfo(); + if (\method_exists(self::httpClient(), 'getUserAgentInfo')) { + $clientUAInfo = self::httpClient()->getUserAgentInfo(); } if ($params && \is_array($params)) { @@ -516,9 +516,15 @@ private function _requestRaw($method, $url, $params, $headers, $apiMode, $usage) { list($absUrl, $rawHeaders, $params, $hasFile, $myApiKey) = $this->_prepareRequest($method, $url, $params, $headers, $apiMode); + // for some reason, PHP users will sometimes include null bytes in their paths, which leads to cryptic server 400s. + // we'll be louder about this to help catch issues earlier. + if (false !== \strpos($absUrl, "\0") || false !== \strpos($absUrl, '%00')) { + throw new Exception\InvalidRequestException("URLs may not contain null bytes ('\\0'); double check any IDs you're including with the request."); + } + $requestStartMs = Util\Util::currentTimeMillis(); - list($rbody, $rcode, $rheaders) = $this->httpClient()->request( + list($rbody, $rcode, $rheaders) = self::httpClient()->request( $method, $absUrl, $rawHeaders, @@ -562,7 +568,7 @@ private function _requestRawStreaming($method, $url, $params, $headers, $apiMode $requestStartMs = Util\Util::currentTimeMillis(); - list($rbody, $rcode, $rheaders) = $this->streamingHttpClient()->requestStream( + list($rbody, $rcode, $rheaders) = self::streamingHttpClient()->requestStream( $method, $absUrl, $rawHeaders, @@ -673,7 +679,7 @@ public static function resetTelemetry() /** * @return HttpClient\ClientInterface */ - private function httpClient() + public static function httpClient() { if (!self::$_httpClient) { self::$_httpClient = HttpClient\CurlClient::instance(); @@ -685,7 +691,7 @@ private function httpClient() /** * @return HttpClient\StreamingClientInterface */ - private function streamingHttpClient() + public static function streamingHttpClient() { if (!self::$_streamingHttpClient) { self::$_streamingHttpClient = HttpClient\CurlClient::instance(); diff --git a/lib/Billing/CreditGrant.php b/lib/Billing/CreditGrant.php index 2f4c2b67c..2814d2439 100644 --- a/lib/Billing/CreditGrant.php +++ b/lib/Billing/CreditGrant.php @@ -12,7 +12,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 (object{monetary: null|(object{currency: string, value: int}&\Stripe\StripeObject&\stdClass), type: string}&\Stripe\StripeObject&\stdClass) $amount - * @property (object{scope: (object{price_type: string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass) $applicability_config + * @property (object{scope: (object{price_type?: string, prices?: ((object{id: null|string}&\Stripe\StripeObject&\stdClass))[]}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass) $applicability_config * @property string $category The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string|\Stripe\Customer $customer ID of the customer receiving the billing credits. @@ -37,7 +37,7 @@ class CreditGrant extends \Stripe\ApiResource /** * Creates a credit grant. * - * @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type: string}}, category: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: \Stripe\StripeObject, name?: string} $params + * @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type: string, prices?: array{id: string}[]}}, category: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: \Stripe\StripeObject, name?: string} $params * @param null|array|string $options * * @throws \Stripe\Exception\ApiErrorException if the request fails diff --git a/lib/Billing/MeterEventSummary.php b/lib/Billing/MeterEventSummary.php index e56ada7fd..008525a66 100644 --- a/lib/Billing/MeterEventSummary.php +++ b/lib/Billing/MeterEventSummary.php @@ -8,6 +8,8 @@ * A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much * usage was accrued by a customer for that period. * + * Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage. + * * @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 float $aggregated_value Aggregated value of all the events within start_time (inclusive) and end_time (inclusive). The aggregation strategy is defined on meter via default_aggregation. diff --git a/lib/Charge.php b/lib/Charge.php index 1a867cfc7..bd0437208 100644 --- a/lib/Charge.php +++ b/lib/Charge.php @@ -41,7 +41,7 @@ * @property bool $paid true if the charge succeeded, or was successfully authorized for later capture. * @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|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&\Stripe\StripeObject&\stdClass), ach_debit?: (object{account_holder_type: null|string, bank_name: null|string, country: null|string, fingerprint: null|string, last4: null|string, routing_number: null|string}&\Stripe\StripeObject&\stdClass), acss_debit?: (object{bank_name: null|string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&\Stripe\StripeObject&\stdClass), affirm?: (object{transaction_id: null|string}&\Stripe\StripeObject&\stdClass), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&\Stripe\StripeObject&\stdClass), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&\Stripe\StripeObject&\stdClass), alma?: (object{}&\Stripe\StripeObject&\stdClass), amazon_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&\Stripe\StripeObject&\stdClass), type: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), au_becs_debit?: (object{bsb_number: null|string, fingerprint: null|string, last4: null|string, mandate?: string}&\Stripe\StripeObject&\stdClass), bacs_debit?: (object{fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&\Stripe\StripeObject&\stdClass), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|string|\Stripe\PaymentMethod, generated_sepa_debit_mandate: null|string|\Stripe\Mandate, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), blik?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), boleto?: (object{tax_id: string}&\Stripe\StripeObject&\stdClass), card?: (object{amount_authorized: null|int, amount_requested?: null|int, authorization_code: null|string, brand: null|string, capture_before?: int, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&\Stripe\StripeObject&\stdClass), country: null|string, decremental_authorization?: (object{status: string}&\Stripe\StripeObject&\stdClass), description?: null|string, exp_month: int, exp_year: int, extended_authorization?: (object{status: string}&\Stripe\StripeObject&\stdClass), fingerprint?: null|string, funding: null|string, iin?: null|string, incremental_authorization?: (object{status: string}&\Stripe\StripeObject&\stdClass), installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), issuer?: null|string, last4: null|string, mandate: null|string, moto?: null|bool, multicapture?: (object{status: string}&\Stripe\StripeObject&\stdClass), network: null|string, network_token?: null|(object{used: bool}&\Stripe\StripeObject&\stdClass), network_transaction_id: null|string, overcapture?: (object{maximum_amount_capturable: int, status: string}&\Stripe\StripeObject&\stdClass), partial_authorization?: (object{status: string}&\Stripe\StripeObject&\stdClass), regulated_status: null|string, three_d_secure: null|(object{authentication_flow: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied?: bool, result: null|string, result_reason: null|string, transaction_id: null|string, version: null|string}&\Stripe\StripeObject&\stdClass), wallet: null|(object{amex_express_checkout?: (object{}&\Stripe\StripeObject&\stdClass), apple_pay?: (object{}&\Stripe\StripeObject&\stdClass), dynamic_last4: null|string, google_pay?: (object{}&\Stripe\StripeObject&\stdClass), link?: (object{}&\Stripe\StripeObject&\stdClass), masterpass?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), samsung_pay?: (object{}&\Stripe\StripeObject&\stdClass), type: string, visa_checkout?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&\Stripe\StripeObject&\stdClass), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&\Stripe\StripeObject&\stdClass), wallet?: (object{type: string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), cashapp?: (object{buyer_id: null|string, cashtag: null|string}&\Stripe\StripeObject&\stdClass), customer_balance?: (object{}&\Stripe\StripeObject&\stdClass), eps?: (object{bank: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&\Stripe\StripeObject&\stdClass), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), gopay?: (object{}&\Stripe\StripeObject&\stdClass), grabpay?: (object{transaction_id: null|string}&\Stripe\StripeObject&\stdClass), id_bank_transfer?: (object{account_number: string, bank: string, bank_code?: string, bank_name?: string, display_name?: string}&\Stripe\StripeObject&\stdClass), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|string|\Stripe\PaymentMethod, generated_sepa_debit_mandate: null|string|\Stripe\Mandate, iban_last4: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, issuer?: null|string, last4: null|string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), kakao_pay?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), klarna?: (object{payer_details: null|(object{address: null|(object{country: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), payment_method_category: null|string, preferred_locale: null|string}&\Stripe\StripeObject&\stdClass), konbini?: (object{store: null|(object{chain: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string}&\Stripe\StripeObject&\stdClass), link?: (object{country: null|string}&\Stripe\StripeObject&\stdClass), mb_way?: (object{}&\Stripe\StripeObject&\stdClass), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), multibanco?: (object{entity: null|string, reference: null|string}&\Stripe\StripeObject&\stdClass), naver_pay?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), oxxo?: (object{number: null|string}&\Stripe\StripeObject&\stdClass), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), pay_by_bank?: (object{}&\Stripe\StripeObject&\stdClass), payco?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), paynow?: (object{reference: null|string}&\Stripe\StripeObject&\stdClass), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string, payer_name: null|string, seller_protection: null|(object{dispute_categories: null|string[], status: string}&\Stripe\StripeObject&\stdClass), shipping?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), transaction_id: null|string, verified_address?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), verified_email?: null|string, verified_name?: null|string}&\Stripe\StripeObject&\stdClass), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&\Stripe\StripeObject&\stdClass), pix?: (object{bank_transaction_id?: null|string}&\Stripe\StripeObject&\stdClass), promptpay?: (object{reference: null|string}&\Stripe\StripeObject&\stdClass), qris?: (object{}&\Stripe\StripeObject&\stdClass), rechnung?: (object{}&\Stripe\StripeObject&\stdClass), revolut_pay?: (object{funding?: (object{card?: (object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&\Stripe\StripeObject&\stdClass), type: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), samsung_pay?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&\Stripe\StripeObject&\stdClass), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, fingerprint: null|string, last4: null|string, mandate: null|string}&\Stripe\StripeObject&\stdClass), shopeepay?: (object{}&\Stripe\StripeObject&\stdClass), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|string|\Stripe\PaymentMethod, generated_sepa_debit_mandate: null|string|\Stripe\Mandate, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), stripe_account?: (object{}&\Stripe\StripeObject&\stdClass), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&\Stripe\StripeObject&\stdClass), twint?: (object{}&\Stripe\StripeObject&\stdClass), type: string, us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, fingerprint: null|string, last4: null|string, mandate?: string|\Stripe\Mandate, payment_reference: null|string, routing_number: null|string}&\Stripe\StripeObject&\stdClass), wechat?: (object{}&\Stripe\StripeObject&\stdClass), wechat_pay?: (object{fingerprint: null|string, transaction_id: null|string}&\Stripe\StripeObject&\stdClass), zip?: (object{}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass) $payment_method_details Details about the payment method at the time of the transaction. + * @property null|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&\Stripe\StripeObject&\stdClass), ach_debit?: (object{account_holder_type: null|string, bank_name: null|string, country: null|string, fingerprint: null|string, last4: null|string, routing_number: null|string}&\Stripe\StripeObject&\stdClass), acss_debit?: (object{bank_name: null|string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&\Stripe\StripeObject&\stdClass), affirm?: (object{transaction_id: null|string}&\Stripe\StripeObject&\stdClass), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&\Stripe\StripeObject&\stdClass), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&\Stripe\StripeObject&\stdClass), alma?: (object{}&\Stripe\StripeObject&\stdClass), amazon_pay?: (object{funding?: (object{card?: (object{brand: null|string, brand_product?: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&\Stripe\StripeObject&\stdClass), type: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), au_becs_debit?: (object{bsb_number: null|string, fingerprint: null|string, last4: null|string, mandate?: string}&\Stripe\StripeObject&\stdClass), bacs_debit?: (object{fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&\Stripe\StripeObject&\stdClass), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|string|\Stripe\PaymentMethod, generated_sepa_debit_mandate: null|string|\Stripe\Mandate, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), blik?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), boleto?: (object{tax_id: string}&\Stripe\StripeObject&\stdClass), card?: (object{amount_authorized: null|int, amount_requested?: null|int, authorization_code: null|string, brand: null|string, capture_before?: int, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&\Stripe\StripeObject&\stdClass), country: null|string, decremental_authorization?: (object{status: string}&\Stripe\StripeObject&\stdClass), description?: null|string, exp_month: int, exp_year: int, extended_authorization?: (object{status: string}&\Stripe\StripeObject&\stdClass), fingerprint?: null|string, funding: null|string, iin?: null|string, incremental_authorization?: (object{status: string}&\Stripe\StripeObject&\stdClass), installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), issuer?: null|string, last4: null|string, mandate: null|string, moto?: null|bool, multicapture?: (object{status: string}&\Stripe\StripeObject&\stdClass), network: null|string, network_token?: null|(object{used: bool}&\Stripe\StripeObject&\stdClass), network_transaction_id: null|string, overcapture?: (object{maximum_amount_capturable: int, status: string}&\Stripe\StripeObject&\stdClass), partial_authorization?: (object{status: string}&\Stripe\StripeObject&\stdClass), regulated_status: null|string, three_d_secure: null|(object{authentication_flow: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied?: bool, result: null|string, result_reason: null|string, transaction_id: null|string, version: null|string}&\Stripe\StripeObject&\stdClass), wallet: null|(object{amex_express_checkout?: (object{}&\Stripe\StripeObject&\stdClass), apple_pay?: (object{}&\Stripe\StripeObject&\stdClass), dynamic_last4: null|string, google_pay?: (object{}&\Stripe\StripeObject&\stdClass), link?: (object{}&\Stripe\StripeObject&\stdClass), masterpass?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), samsung_pay?: (object{}&\Stripe\StripeObject&\stdClass), type: string, visa_checkout?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&\Stripe\StripeObject&\stdClass), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&\Stripe\StripeObject&\stdClass), wallet?: (object{type: string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), cashapp?: (object{buyer_id: null|string, cashtag: null|string}&\Stripe\StripeObject&\stdClass), customer_balance?: (object{}&\Stripe\StripeObject&\stdClass), eps?: (object{bank: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&\Stripe\StripeObject&\stdClass), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), gopay?: (object{}&\Stripe\StripeObject&\stdClass), grabpay?: (object{transaction_id: null|string}&\Stripe\StripeObject&\stdClass), id_bank_transfer?: (object{account_number: string, bank: string, bank_code?: string, bank_name?: string, display_name?: string}&\Stripe\StripeObject&\stdClass), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|string|\Stripe\PaymentMethod, generated_sepa_debit_mandate: null|string|\Stripe\Mandate, iban_last4: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, issuer?: null|string, last4: null|string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), kakao_pay?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), klarna?: (object{payer_details: null|(object{address: null|(object{country: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), payment_method_category: null|string, preferred_locale: null|string}&\Stripe\StripeObject&\stdClass), konbini?: (object{store: null|(object{chain: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string}&\Stripe\StripeObject&\stdClass), link?: (object{country: null|string}&\Stripe\StripeObject&\stdClass), mb_way?: (object{}&\Stripe\StripeObject&\stdClass), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), multibanco?: (object{entity: null|string, reference: null|string}&\Stripe\StripeObject&\stdClass), naver_pay?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), oxxo?: (object{number: null|string}&\Stripe\StripeObject&\stdClass), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), pay_by_bank?: (object{}&\Stripe\StripeObject&\stdClass), payco?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), paynow?: (object{reference: null|string}&\Stripe\StripeObject&\stdClass), paypal?: (object{country: null|string, payer_email: null|string, payer_id: null|string, payer_name: null|string, seller_protection: null|(object{dispute_categories: null|string[], status: string}&\Stripe\StripeObject&\stdClass), shipping?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), transaction_id: null|string, verified_address?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), verified_email?: null|string, verified_name?: null|string}&\Stripe\StripeObject&\stdClass), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&\Stripe\StripeObject&\stdClass), pix?: (object{bank_transaction_id?: null|string}&\Stripe\StripeObject&\stdClass), promptpay?: (object{reference: null|string}&\Stripe\StripeObject&\stdClass), qris?: (object{}&\Stripe\StripeObject&\stdClass), rechnung?: (object{}&\Stripe\StripeObject&\stdClass), revolut_pay?: (object{funding?: (object{card?: (object{brand: null|string, brand_product?: null|string, country: null|string, exp_month: null|int, exp_year: null|int, funding: null|string, last4: null|string}&\Stripe\StripeObject&\stdClass), type: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass), samsung_pay?: (object{buyer_id: null|string}&\Stripe\StripeObject&\stdClass), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&\Stripe\StripeObject&\stdClass), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, fingerprint: null|string, last4: null|string, mandate: null|string}&\Stripe\StripeObject&\stdClass), shopeepay?: (object{}&\Stripe\StripeObject&\stdClass), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|string|\Stripe\PaymentMethod, generated_sepa_debit_mandate: null|string|\Stripe\Mandate, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&\Stripe\StripeObject&\stdClass), stripe_account?: (object{}&\Stripe\StripeObject&\stdClass), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&\Stripe\StripeObject&\stdClass), twint?: (object{}&\Stripe\StripeObject&\stdClass), type: string, us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, fingerprint: null|string, last4: null|string, mandate?: string|\Stripe\Mandate, payment_reference: null|string, routing_number: null|string}&\Stripe\StripeObject&\stdClass), wechat?: (object{}&\Stripe\StripeObject&\stdClass), wechat_pay?: (object{fingerprint: null|string, transaction_id: null|string}&\Stripe\StripeObject&\stdClass), zip?: (object{}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass) $payment_method_details Details about the payment method at the time of the transaction. * @property null|(object{session?: string}&\Stripe\StripeObject&\stdClass) $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. diff --git a/lib/Checkout/Session.php b/lib/Checkout/Session.php index 1dc5cadb8..3adc00893 100644 --- a/lib/Checkout/Session.php +++ b/lib/Checkout/Session.php @@ -32,7 +32,7 @@ * @property null|string $cancel_url If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. * @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems. * @property null|string $client_secret The client secret of the Session. Use this with initCheckout on your front end. - * @property null|(object{business_name: null|string, email: null|string, phone: null|string, shipping_details: null|(object{address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), carrier?: null|string, name?: string, phone?: null|string, tracking_number?: null|string}&\Stripe\StripeObject&\stdClass), tax_ids: null|((object{type: string, value: null|string}&\Stripe\StripeObject&\stdClass))[]}&\Stripe\StripeObject&\stdClass) $collected_information Information about the customer collected within the Checkout Session. + * @property null|(object{business_name?: null|string, email?: null|string, phone?: null|string, shipping_details?: null|(object{address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject&\stdClass), carrier?: null|string, name?: string, phone?: null|string, tracking_number?: null|string}&\Stripe\StripeObject&\stdClass), tax_ids?: null|((object{type: string, value: null|string}&\Stripe\StripeObject&\stdClass))[]}&\Stripe\StripeObject&\stdClass) $collected_information Information about the customer collected within the Checkout Session. * @property null|(object{promotions: null|string, terms_of_service: null|string}&\Stripe\StripeObject&\stdClass) $consent Results of consent_collection for this session. * @property null|(object{payment_method_reuse_agreement: null|(object{position: string}&\Stripe\StripeObject&\stdClass), promotions: null|string, terms_of_service: null|string}&\Stripe\StripeObject&\stdClass) $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. @@ -57,7 +57,7 @@ * @property null|string|\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session. * @property null|string $payment_method_collection Configure whether a Checkout Session should collect a payment method. Defaults to always. * @property null|(object{id: string, parent: null|string}&\Stripe\StripeObject&\stdClass) $payment_method_configuration_details Information about the payment method configuration used for this Checkout session if using dynamic payment methods. - * @property null|(object{acss_debit?: (object{currency?: string, mandate_options?: (object{custom_mandate_url?: string, default_for?: string[], interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string, verification_method?: string}&\Stripe\StripeObject&\stdClass), affirm?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), afterpay_clearpay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), alipay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), amazon_pay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), au_becs_debit?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), bancontact?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), card?: (object{installments?: (object{enabled?: bool}&\Stripe\StripeObject&\stdClass), request_decremental_authorization?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure: string, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}&\Stripe\StripeObject&\stdClass), cashapp?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&\Stripe\StripeObject&\stdClass), requested_address_types?: string[], type: null|string}&\Stripe\StripeObject&\stdClass), funding_type: null|string, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), eps?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), fpx?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), giropay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), grabpay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), ideal?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), klarna?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), konbini?: (object{expires_after_days: null|int, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), link?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), mobilepay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), multibanco?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), naver_pay?: (object{capture_method?: string}&\Stripe\StripeObject&\stdClass), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), p24?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), payco?: (object{capture_method?: string}&\Stripe\StripeObject&\stdClass), paynow?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), paypal?: (object{capture_method?: string, preferred_locale: null|string, reference: null|string, setup_future_usage?: string, subsellers?: string[]}&\Stripe\StripeObject&\stdClass), payto?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, end_date: null|string, payment_schedule: null|string, payments_per_period: null|int, purpose: null|string, start_date: null|string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), pix?: (object{expires_after_seconds: null|int}&\Stripe\StripeObject&\stdClass), revolut_pay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), samsung_pay?: (object{capture_method?: string}&\Stripe\StripeObject&\stdClass), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), sofort?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), swish?: (object{reference: null|string}&\Stripe\StripeObject&\stdClass), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[], institution?: string}&\Stripe\StripeObject&\stdClass), manual_entry?: (object{mode?: string}&\Stripe\StripeObject&\stdClass), permissions?: string[], prefetch: null|string[], return_url?: string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string, verification_method?: string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass) $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + * @property null|(object{acss_debit?: (object{currency?: string, mandate_options?: (object{custom_mandate_url?: string, default_for?: string[], interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string, verification_method?: string}&\Stripe\StripeObject&\stdClass), affirm?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), afterpay_clearpay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), alipay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), amazon_pay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), au_becs_debit?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), bancontact?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), card?: (object{installments?: (object{enabled?: bool}&\Stripe\StripeObject&\stdClass), request_decremental_authorization?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure: string, restrictions?: (object{brands_blocked?: string[]}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}&\Stripe\StripeObject&\stdClass), cashapp?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&\Stripe\StripeObject&\stdClass), requested_address_types?: string[], type: null|string}&\Stripe\StripeObject&\stdClass), funding_type: null|string, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), eps?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), fpx?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), giropay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), grabpay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), ideal?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), klarna?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), konbini?: (object{expires_after_days: null|int, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), link?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), mobilepay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), multibanco?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), naver_pay?: (object{capture_method?: string}&\Stripe\StripeObject&\stdClass), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), p24?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), payco?: (object{capture_method?: string}&\Stripe\StripeObject&\stdClass), paynow?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), paypal?: (object{capture_method?: string, preferred_locale: null|string, reference: null|string, setup_future_usage?: string, subsellers?: string[]}&\Stripe\StripeObject&\stdClass), payto?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, end_date: null|string, payment_schedule: null|string, payments_per_period: null|int, purpose: null|string, start_date: null|string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), pix?: (object{expires_after_seconds: null|int}&\Stripe\StripeObject&\stdClass), revolut_pay?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), samsung_pay?: (object{capture_method?: string}&\Stripe\StripeObject&\stdClass), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), sofort?: (object{setup_future_usage?: string}&\Stripe\StripeObject&\stdClass), swish?: (object{reference: null|string}&\Stripe\StripeObject&\stdClass), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[], institution?: string}&\Stripe\StripeObject&\stdClass), manual_entry?: (object{mode?: string}&\Stripe\StripeObject&\stdClass), permissions?: string[], prefetch: null|string[], return_url?: string}&\Stripe\StripeObject&\stdClass), setup_future_usage?: string, verification_method?: string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass) $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 null|(object{update: null|(object{line_items?: null|string, shipping_details: null|string}&\Stripe\StripeObject&\stdClass)}&\Stripe\StripeObject&\stdClass) $permissions

This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.

For specific permissions, please refer to their dedicated subsections, such as permissions.update.shipping_details.

@@ -124,7 +124,7 @@ class Session extends \Stripe\ApiResource /** * Creates a Session object. * - * @param null|array{adaptive_pricing?: array{enabled?: bool}, after_expiration?: array{recovery?: array{allow_promotion_codes?: bool, enabled: bool}}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, cancel_url?: string, client_reference_id?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: array{coupon?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: \Stripe\StripeObject, rendering_options?: null|array{amount_tax_display?: null|string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, dynamic_tax_rates?: string[], metadata?: \Stripe\StripeObject, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: \Stripe\StripeObject, name: string, tax_code?: string}, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: string[]}[], locale?: string, metadata?: \Stripe\StripeObject, mode?: string, payment_intent_data?: array{application_fee_amount?: int, capture_method?: string, description?: string, metadata?: \Stripe\StripeObject, on_behalf_of?: string, receipt_email?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string}, payment_method_collection?: string, payment_method_configuration?: string, payment_method_data?: array{allow_redisplay?: string}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: string, verification_method?: string}, affirm?: array{setup_future_usage?: string}, afterpay_clearpay?: array{setup_future_usage?: string}, alipay?: array{setup_future_usage?: string}, amazon_pay?: array{setup_future_usage?: string}, au_becs_debit?: array{setup_future_usage?: string}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string}, bancontact?: array{setup_future_usage?: string}, boleto?: array{expires_after_days?: int, setup_future_usage?: string}, card?: array{installments?: array{enabled?: bool}, request_decremental_authorization?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}, cashapp?: array{setup_future_usage?: string}, customer_balance?: array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: array{setup_future_usage?: string}, fpx?: array{setup_future_usage?: string}, giropay?: array{setup_future_usage?: string}, grabpay?: array{setup_future_usage?: string}, ideal?: array{setup_future_usage?: string}, kakao_pay?: array{capture_method?: string, setup_future_usage?: string}, klarna?: array{setup_future_usage?: string}, konbini?: array{expires_after_days?: int, setup_future_usage?: string}, kr_card?: array{capture_method?: string, setup_future_usage?: string}, link?: array{setup_future_usage?: string}, mobilepay?: array{setup_future_usage?: string}, multibanco?: array{setup_future_usage?: string}, naver_pay?: array{capture_method?: string, setup_future_usage?: string}, oxxo?: array{expires_after_days?: int, setup_future_usage?: string}, p24?: array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: array{}, payco?: array{capture_method?: string}, paynow?: array{setup_future_usage?: string}, paypal?: array{capture_method?: null|string, preferred_locale?: string, reference?: string, reference_id?: string, risk_correlation_id?: string, setup_future_usage?: null|string, subsellers?: string[]}, payto?: array{mandate_options?: array{amount?: int, amount_type?: string, end_date?: string, payment_schedule?: string, payments_per_period?: int, purpose?: string, start_date?: string}, setup_future_usage?: string}, pix?: array{expires_after_seconds?: int}, revolut_pay?: array{setup_future_usage?: string}, samsung_pay?: array{capture_method?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string}, sofort?: array{setup_future_usage?: string}, swish?: array{reference?: string}, us_bank_account?: array{financial_connections?: array{permissions?: string[], prefetch?: string[]}, setup_future_usage?: string, verification_method?: string}, wechat_pay?: array{app_id?: string, client: string, setup_future_usage?: string}}, payment_method_types?: string[], permissions?: array{update?: array{line_items?: string, shipping_details?: string}}, phone_number_collection?: array{enabled: bool}, redirect_on_completion?: string, return_url?: string, saved_payment_method_options?: array{allow_redisplay_filters?: string[], payment_method_save?: string}, setup_intent_data?: array{description?: string, metadata?: \Stripe\StripeObject, on_behalf_of?: string}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: \Stripe\StripeObject}, metadata?: \Stripe\StripeObject, tax_behavior?: string, tax_code?: string, type?: string}}[], submit_type?: string, subscription_data?: array{application_fee_percent?: float, billing_cycle_anchor?: int, default_tax_rates?: string[], description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: \Stripe\StripeObject, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: int, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, success_url?: string, tax_id_collection?: array{enabled: bool, required?: string}, ui_mode?: string} $params + * @param null|array{adaptive_pricing?: array{enabled?: bool}, after_expiration?: array{recovery?: array{allow_promotion_codes?: bool, enabled: bool}}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, cancel_url?: string, client_reference_id?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: array{coupon?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: \Stripe\StripeObject, rendering_options?: null|array{amount_tax_display?: null|string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, dynamic_tax_rates?: string[], metadata?: \Stripe\StripeObject, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: \Stripe\StripeObject, name: string, tax_code?: string}, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: string[]}[], locale?: string, metadata?: \Stripe\StripeObject, mode?: string, payment_intent_data?: array{application_fee_amount?: int, capture_method?: string, description?: string, metadata?: \Stripe\StripeObject, on_behalf_of?: string, receipt_email?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string}, payment_method_collection?: string, payment_method_configuration?: string, payment_method_data?: array{allow_redisplay?: string}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: string, verification_method?: string}, affirm?: array{setup_future_usage?: string}, afterpay_clearpay?: array{setup_future_usage?: string}, alipay?: array{setup_future_usage?: string}, amazon_pay?: array{setup_future_usage?: string}, au_becs_debit?: array{setup_future_usage?: string}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string}, bancontact?: array{setup_future_usage?: string}, boleto?: array{expires_after_days?: int, setup_future_usage?: string}, card?: array{installments?: array{enabled?: bool}, request_decremental_authorization?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, restrictions?: array{brands_blocked?: string[]}, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}, cashapp?: array{setup_future_usage?: string}, customer_balance?: array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: array{setup_future_usage?: string}, fpx?: array{setup_future_usage?: string}, giropay?: array{setup_future_usage?: string}, grabpay?: array{setup_future_usage?: string}, ideal?: array{setup_future_usage?: string}, kakao_pay?: array{capture_method?: string, setup_future_usage?: string}, klarna?: array{setup_future_usage?: string}, konbini?: array{expires_after_days?: int, setup_future_usage?: string}, kr_card?: array{capture_method?: string, setup_future_usage?: string}, link?: array{setup_future_usage?: string}, mobilepay?: array{setup_future_usage?: string}, multibanco?: array{setup_future_usage?: string}, naver_pay?: array{capture_method?: string, setup_future_usage?: string}, oxxo?: array{expires_after_days?: int, setup_future_usage?: string}, p24?: array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: array{}, payco?: array{capture_method?: string}, paynow?: array{setup_future_usage?: string}, paypal?: array{capture_method?: null|string, preferred_locale?: string, reference?: string, reference_id?: string, risk_correlation_id?: string, setup_future_usage?: null|string, subsellers?: string[]}, payto?: array{mandate_options?: array{amount?: int, amount_type?: string, end_date?: string, payment_schedule?: string, payments_per_period?: int, purpose?: string, start_date?: string}, setup_future_usage?: string}, pix?: array{expires_after_seconds?: int}, revolut_pay?: array{setup_future_usage?: string}, samsung_pay?: array{capture_method?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string}, sofort?: array{setup_future_usage?: string}, swish?: array{reference?: string}, us_bank_account?: array{financial_connections?: array{permissions?: string[], prefetch?: string[]}, setup_future_usage?: string, verification_method?: string}, wechat_pay?: array{app_id?: string, client: string, setup_future_usage?: string}}, payment_method_types?: string[], permissions?: array{update?: array{line_items?: string, shipping_details?: string}}, phone_number_collection?: array{enabled: bool}, redirect_on_completion?: string, return_url?: string, saved_payment_method_options?: array{allow_redisplay_filters?: string[], payment_method_save?: string}, setup_intent_data?: array{description?: string, metadata?: \Stripe\StripeObject, on_behalf_of?: string}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: \Stripe\StripeObject}, metadata?: \Stripe\StripeObject, tax_behavior?: string, tax_code?: string, type?: string}}[], submit_type?: string, subscription_data?: array{application_fee_percent?: float, billing_cycle_anchor?: int, default_tax_rates?: string[], description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: \Stripe\StripeObject, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: int, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, success_url?: string, tax_id_collection?: array{enabled: bool, required?: string}, ui_mode?: string} $params * @param null|array|string $options * * @throws \Stripe\Exception\ApiErrorException if the request fails diff --git a/lib/Service/AccountSessionService.php b/lib/Service/AccountSessionService.php index a19af7670..27ba2d24b 100644 --- a/lib/Service/AccountSessionService.php +++ b/lib/Service/AccountSessionService.php @@ -14,7 +14,7 @@ class AccountSessionService extends \Stripe\Service\AbstractService * Creates a AccountSession object that includes a single-use token that the * platform can use on their front-end to grant client-side API access. * - * @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, app_install?: array{enabled: bool, features?: array{allowed_apps?: null|string[]}}, app_viewport?: array{enabled: bool, features?: array{allowed_apps?: null|string[]}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, capital_financing?: array{enabled: bool, features?: array{}}, capital_financing_application?: array{enabled: bool, features?: array{}}, capital_financing_promotion?: array{enabled: bool, features?: array{}}, capital_overview?: array{enabled: bool, features?: array{}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_method_settings?: array{enabled: bool, features?: array{}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, recipients?: array{enabled: bool, features?: array{send_money?: bool}}, reporting_chart?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}, tax_threshold_monitoring?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params + * @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, app_install?: array{enabled: bool, features?: array{allowed_apps?: null|string[]}}, app_viewport?: array{enabled: bool, features?: array{allowed_apps?: null|string[]}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, capital_financing?: array{enabled: bool, features?: array{}}, capital_financing_application?: array{enabled: bool, features?: array{}}, capital_financing_promotion?: array{enabled: bool, features?: array{}}, capital_overview?: array{enabled: bool, features?: array{}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payment_method_settings?: array{enabled: bool, features?: array{}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, product_tax_code_selector?: array{enabled: bool, features?: array{}}, recipients?: array{enabled: bool, features?: array{send_money?: bool}}, reporting_chart?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}, tax_threshold_monitoring?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails diff --git a/lib/Service/Billing/CreditBalanceSummaryService.php b/lib/Service/Billing/CreditBalanceSummaryService.php index 3d975e92d..f5a9e9bd4 100644 --- a/lib/Service/Billing/CreditBalanceSummaryService.php +++ b/lib/Service/Billing/CreditBalanceSummaryService.php @@ -13,7 +13,7 @@ class CreditBalanceSummaryService extends \Stripe\Service\AbstractService /** * Retrieves the credit balance summary for a customer. * - * @param null|array{customer: string, expand?: string[], filter: array{applicability_scope?: array{price_type: string}, credit_grant?: string, type: string}} $params + * @param null|array{customer: string, expand?: string[], filter: array{applicability_scope?: array{price_type: string, prices?: array{id: string}[]}, credit_grant?: string, type: string}} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails diff --git a/lib/Service/Billing/CreditGrantService.php b/lib/Service/Billing/CreditGrantService.php index 7a98952bf..78fa917c7 100644 --- a/lib/Service/Billing/CreditGrantService.php +++ b/lib/Service/Billing/CreditGrantService.php @@ -28,7 +28,7 @@ public function all($params = null, $opts = null) /** * Creates a credit grant. * - * @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type: string}}, category: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: \Stripe\StripeObject, name?: string} $params + * @param null|array{amount: array{monetary?: array{currency: string, value: int}, type: string}, applicability_config: array{scope: array{price_type: string, prices?: array{id: string}[]}}, category: string, customer: string, effective_at?: int, expand?: string[], expires_at?: int, metadata?: \Stripe\StripeObject, name?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails diff --git a/lib/Service/Checkout/SessionService.php b/lib/Service/Checkout/SessionService.php index ad3251216..e72751d4a 100644 --- a/lib/Service/Checkout/SessionService.php +++ b/lib/Service/Checkout/SessionService.php @@ -47,7 +47,7 @@ public function allLineItems($id, $params = null, $opts = null) /** * Creates a Session object. * - * @param null|array{adaptive_pricing?: array{enabled?: bool}, after_expiration?: array{recovery?: array{allow_promotion_codes?: bool, enabled: bool}}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, cancel_url?: string, client_reference_id?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: array{coupon?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: \Stripe\StripeObject, rendering_options?: null|array{amount_tax_display?: null|string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, dynamic_tax_rates?: string[], metadata?: \Stripe\StripeObject, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: \Stripe\StripeObject, name: string, tax_code?: string}, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: string[]}[], locale?: string, metadata?: \Stripe\StripeObject, mode?: string, payment_intent_data?: array{application_fee_amount?: int, capture_method?: string, description?: string, metadata?: \Stripe\StripeObject, on_behalf_of?: string, receipt_email?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string}, payment_method_collection?: string, payment_method_configuration?: string, payment_method_data?: array{allow_redisplay?: string}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: string, verification_method?: string}, affirm?: array{setup_future_usage?: string}, afterpay_clearpay?: array{setup_future_usage?: string}, alipay?: array{setup_future_usage?: string}, amazon_pay?: array{setup_future_usage?: string}, au_becs_debit?: array{setup_future_usage?: string}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string}, bancontact?: array{setup_future_usage?: string}, boleto?: array{expires_after_days?: int, setup_future_usage?: string}, card?: array{installments?: array{enabled?: bool}, request_decremental_authorization?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}, cashapp?: array{setup_future_usage?: string}, customer_balance?: array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: array{setup_future_usage?: string}, fpx?: array{setup_future_usage?: string}, giropay?: array{setup_future_usage?: string}, grabpay?: array{setup_future_usage?: string}, ideal?: array{setup_future_usage?: string}, kakao_pay?: array{capture_method?: string, setup_future_usage?: string}, klarna?: array{setup_future_usage?: string}, konbini?: array{expires_after_days?: int, setup_future_usage?: string}, kr_card?: array{capture_method?: string, setup_future_usage?: string}, link?: array{setup_future_usage?: string}, mobilepay?: array{setup_future_usage?: string}, multibanco?: array{setup_future_usage?: string}, naver_pay?: array{capture_method?: string, setup_future_usage?: string}, oxxo?: array{expires_after_days?: int, setup_future_usage?: string}, p24?: array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: array{}, payco?: array{capture_method?: string}, paynow?: array{setup_future_usage?: string}, paypal?: array{capture_method?: null|string, preferred_locale?: string, reference?: string, reference_id?: string, risk_correlation_id?: string, setup_future_usage?: null|string, subsellers?: string[]}, payto?: array{mandate_options?: array{amount?: int, amount_type?: string, end_date?: string, payment_schedule?: string, payments_per_period?: int, purpose?: string, start_date?: string}, setup_future_usage?: string}, pix?: array{expires_after_seconds?: int}, revolut_pay?: array{setup_future_usage?: string}, samsung_pay?: array{capture_method?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string}, sofort?: array{setup_future_usage?: string}, swish?: array{reference?: string}, us_bank_account?: array{financial_connections?: array{permissions?: string[], prefetch?: string[]}, setup_future_usage?: string, verification_method?: string}, wechat_pay?: array{app_id?: string, client: string, setup_future_usage?: string}}, payment_method_types?: string[], permissions?: array{update?: array{line_items?: string, shipping_details?: string}}, phone_number_collection?: array{enabled: bool}, redirect_on_completion?: string, return_url?: string, saved_payment_method_options?: array{allow_redisplay_filters?: string[], payment_method_save?: string}, setup_intent_data?: array{description?: string, metadata?: \Stripe\StripeObject, on_behalf_of?: string}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: \Stripe\StripeObject}, metadata?: \Stripe\StripeObject, tax_behavior?: string, tax_code?: string, type?: string}}[], submit_type?: string, subscription_data?: array{application_fee_percent?: float, billing_cycle_anchor?: int, default_tax_rates?: string[], description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: \Stripe\StripeObject, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: int, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, success_url?: string, tax_id_collection?: array{enabled: bool, required?: string}, ui_mode?: string} $params + * @param null|array{adaptive_pricing?: array{enabled?: bool}, after_expiration?: array{recovery?: array{allow_promotion_codes?: bool, enabled: bool}}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, cancel_url?: string, client_reference_id?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: array{coupon?: string, promotion_code?: string}[], expand?: string[], expires_at?: int, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: \Stripe\StripeObject, rendering_options?: null|array{amount_tax_display?: null|string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, dynamic_tax_rates?: string[], metadata?: \Stripe\StripeObject, price?: string, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: \Stripe\StripeObject, name: string, tax_code?: string}, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: string[]}[], locale?: string, metadata?: \Stripe\StripeObject, mode?: string, payment_intent_data?: array{application_fee_amount?: int, capture_method?: string, description?: string, metadata?: \Stripe\StripeObject, on_behalf_of?: string, receipt_email?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name: string, phone?: string, tracking_number?: string}, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string}, payment_method_collection?: string, payment_method_configuration?: string, payment_method_data?: array{allow_redisplay?: string}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: string, verification_method?: string}, affirm?: array{setup_future_usage?: string}, afterpay_clearpay?: array{setup_future_usage?: string}, alipay?: array{setup_future_usage?: string}, amazon_pay?: array{setup_future_usage?: string}, au_becs_debit?: array{setup_future_usage?: string}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string}, bancontact?: array{setup_future_usage?: string}, boleto?: array{expires_after_days?: int, setup_future_usage?: string}, card?: array{installments?: array{enabled?: bool}, request_decremental_authorization?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, restrictions?: array{brands_blocked?: string[]}, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}, cashapp?: array{setup_future_usage?: string}, customer_balance?: array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: array{setup_future_usage?: string}, fpx?: array{setup_future_usage?: string}, giropay?: array{setup_future_usage?: string}, grabpay?: array{setup_future_usage?: string}, ideal?: array{setup_future_usage?: string}, kakao_pay?: array{capture_method?: string, setup_future_usage?: string}, klarna?: array{setup_future_usage?: string}, konbini?: array{expires_after_days?: int, setup_future_usage?: string}, kr_card?: array{capture_method?: string, setup_future_usage?: string}, link?: array{setup_future_usage?: string}, mobilepay?: array{setup_future_usage?: string}, multibanco?: array{setup_future_usage?: string}, naver_pay?: array{capture_method?: string, setup_future_usage?: string}, oxxo?: array{expires_after_days?: int, setup_future_usage?: string}, p24?: array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: array{}, payco?: array{capture_method?: string}, paynow?: array{setup_future_usage?: string}, paypal?: array{capture_method?: null|string, preferred_locale?: string, reference?: string, reference_id?: string, risk_correlation_id?: string, setup_future_usage?: null|string, subsellers?: string[]}, payto?: array{mandate_options?: array{amount?: int, amount_type?: string, end_date?: string, payment_schedule?: string, payments_per_period?: int, purpose?: string, start_date?: string}, setup_future_usage?: string}, pix?: array{expires_after_seconds?: int}, revolut_pay?: array{setup_future_usage?: string}, samsung_pay?: array{capture_method?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: string}, sofort?: array{setup_future_usage?: string}, swish?: array{reference?: string}, us_bank_account?: array{financial_connections?: array{permissions?: string[], prefetch?: string[]}, setup_future_usage?: string, verification_method?: string}, wechat_pay?: array{app_id?: string, client: string, setup_future_usage?: string}}, payment_method_types?: string[], permissions?: array{update?: array{line_items?: string, shipping_details?: string}}, phone_number_collection?: array{enabled: bool}, redirect_on_completion?: string, return_url?: string, saved_payment_method_options?: array{allow_redisplay_filters?: string[], payment_method_save?: string}, setup_intent_data?: array{description?: string, metadata?: \Stripe\StripeObject, on_behalf_of?: string}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: \Stripe\StripeObject}, metadata?: \Stripe\StripeObject, tax_behavior?: string, tax_code?: string, type?: string}}[], submit_type?: string, subscription_data?: array{application_fee_percent?: float, billing_cycle_anchor?: int, default_tax_rates?: string[], description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: \Stripe\StripeObject, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: int, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, success_url?: string, tax_id_collection?: array{enabled: bool, required?: string}, ui_mode?: string} $params * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails diff --git a/lib/TaxRate.php b/lib/TaxRate.php index b2bcf012a..15b3a2ea7 100644 --- a/lib/TaxRate.php +++ b/lib/TaxRate.php @@ -5,9 +5,9 @@ namespace Stripe; /** - * Tax rates can be applied to invoices, subscriptions and Checkout Sessions to collect tax. + * Tax rates can be applied to invoices, subscriptions and Checkout Sessions to collect tax. * - * Related guide: Tax rates + * Related guide: Tax rates * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. @@ -25,7 +25,7 @@ * @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 float $percentage Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. * @property null|string $rate_type Indicates the type of tax rate applied to the taxable amount. This value can be null when no tax applies to the location. - * @property null|string $state ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States. + * @property null|string $state ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States. * @property null|string $tax_type The high-level tax type, such as vat or sales_tax. */ class TaxRate extends ApiResource diff --git a/tests/Stripe/ApiRequestorTest.php b/tests/Stripe/ApiRequestorTest.php index 62f406ca6..c4a2d92fc 100644 --- a/tests/Stripe/ApiRequestorTest.php +++ b/tests/Stripe/ApiRequestorTest.php @@ -726,4 +726,23 @@ public function testIsDisabled() $result = $method->invoke(null, 'procopen, php_uname, exec', 'php_uname'); static::assertTrue($result); } + + public function testRaisesForNullBytesInResourceMethod() + { + $this->expectException(\Stripe\Exception\InvalidRequestException::class); + $this->compatExpectExceptionMessageMatches('#null byte#'); + + Charge::retrieve("abc_123\0"); + } + + public function testRaisesForNullBytesInRawRequest() + { + $this->expectException(\Stripe\Exception\InvalidRequestException::class); + $this->compatExpectExceptionMessageMatches('#null byte#'); + + $client = new BaseStripeClient([ + 'api_key' => 'sk_test_client', + ]); + $client->rawRequest('get', "/v1/xyz\0"); + } }