diff --git a/.editorconfig b/.editorconfig
index 2d0fec721..aed6b2b13 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -18,3 +18,6 @@ indent_style = tab
[Makefile]
indent_style = tab
+
+[CHANGELOG.md]
+trim_trailing_whitespace = false
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 312540b61..4e1cbb2de 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -9,3 +9,15 @@ List out the key changes made in this PR, e.g.
### See Also
+
+## Changelog
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60515d197..7c10b1432 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,54 @@ This release changes the pinned API version to 2026-05-27.private.
* ⚠️ Change type of `V2.MoneyManagement.ReceivedCredit.bank_transfer.gb_bank_account.network` from `literal('fps')` to `enum('chaps'|'fps')`
* Add support for error codes `payment_method_microdeposit_processing_error` and `siret_invalid` on `QuotePreviewInvoice.last_finalization_error`
+## 20.2.1 - 2026-06-12
+* [#2079](https://github.com/stripe/stripe-php/pull/2079) Add "source" field to user-agent header
+
+## 20.2.0 - 2026-05-27
+This release changes the pinned API version to 2026-05-27.dahlia.
+
+* [#2072](https://github.com/stripe/stripe-php/pull/2072) Update generated code
+ * Add support for new resource `V2.Commerce.ProductCatalogImport`
+ * Add support for `create` and `retrieve` methods on resource `V2.Commerce.ProductCatalogImport`
+ * Add support for `bizum_payments` and `scalapay_payments` on `Account.capabilities`, `Account.create().$params.capability`, and `Account.update().$params.capability`
+ * Add support for `automatic_transfer_rules_by_currency` on `BalanceSettings.payments.payouts` and `BalanceSettings.update().$params.payment.payout`
+ * Add support for `start_of_day` on `BalanceSettings.payments.settlement_timing` and `BalanceSettings.update().$params.payment.settlement_timing`
+ * Add support for `description` on `Charge.create().$params.transfer_datum`, `PaymentIntent.create().$params.transfer_datum`, `PaymentIntent.transfer_data`, and `PaymentIntent.update().$params.transfer_datum`
+ * Add support for `bizum` on `Charge.payment_method_details`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent.confirm().$params.payment_method_datum`, `PaymentIntent.confirm().$params.payment_method_option`, `PaymentIntent.create().$params.payment_method_datum`, `PaymentIntent.create().$params.payment_method_option`, `PaymentIntent.payment_method_options`, `PaymentIntent.update().$params.payment_method_datum`, `PaymentIntent.update().$params.payment_method_option`, `PaymentMethod.create().$params`, `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.confirm().$params.payment_method_option`, `SetupIntent.create().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_option`, `SetupIntent.payment_method_options`, `SetupIntent.update().$params.payment_method_datum`, and `SetupIntent.update().$params.payment_method_option`
+ * Add support for `scalapay` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `Checkout\Session.create().$params.payment_method_option`, `ConfirmationToken.create().$params.payment_method_datum`, `ConfirmationToken.payment_method_preview`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent.confirm().$params.payment_method_datum`, `PaymentIntent.confirm().$params.payment_method_option`, `PaymentIntent.create().$params.payment_method_datum`, `PaymentIntent.create().$params.payment_method_option`, `PaymentIntent.payment_method_options`, `PaymentIntent.update().$params.payment_method_datum`, `PaymentIntent.update().$params.payment_method_option`, `PaymentMethod.create().$params`, `PaymentMethodConfiguration.create().$params`, `PaymentMethodConfiguration.update().$params`, `PaymentMethodConfiguration`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `Refund.destination_details`, `SetupIntent.confirm().$params.payment_method_datum`, `SetupIntent.create().$params.payment_method_datum`, and `SetupIntent.update().$params.payment_method_datum`
+ * Add support for `mandate` on `Charge.payment_method_details.twint`, `PaymentAttemptRecord.payment_method_details.twint`, and `PaymentRecord.payment_method_details.twint`
+ * Change type of `Checkout\Session.create().$params.payment_method_option.twint.setup_future_usage`, `PaymentIntent.confirm().$params.payment_method_option.twint.setup_future_usage`, `PaymentIntent.create().$params.payment_method_option.twint.setup_future_usage`, and `PaymentIntent.update().$params.payment_method_option.twint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`
+ * ⚠️ Change type of `Checkout.Session.payment_method_options.twint.setup_future_usage` and `PaymentIntent.payment_method_options.twint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`
+ * Add support for new values `bizum` and `scalapay` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`
+ * Add support for `credited_items` on `InvoiceItem.proration_details`
+ * Add support for `discountable` on `Invoice.create_preview().$params.schedule_detail.phase.add_invoice_item`, `Subscription.create().$params.add_invoice_item`, `Subscription.update().$params.add_invoice_item`, `SubscriptionSchedule.create().$params.phase.add_invoice_item`, `SubscriptionSchedule.phases[].add_invoice_items[]`, and `SubscriptionSchedule.update().$params.phase.add_invoice_item`
+ * Add support for `billing_schedules` on `Invoice.create_preview().$params.subscription_detail`, `Subscription.create().$params`, `Subscription.update().$params`, and `Subscription`
+ * Add support for `amount_paid_off_stripe` on `Invoice`
+ * Add support for new value `twint` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`
+ * Add support for `twint` on `Mandate.payment_method_details` and `SetupAttempt.payment_method_details`
+ * Add support for `metadata` on `PaymentIntent.create().$params.transfer_datum`, `PaymentIntent.transfer_data`, `PaymentIntent.update().$params.transfer_datum`, and `Subscription.pending_update`
+ * Add support for `payment_data` on `PaymentIntent.create().$params.transfer_datum`, `PaymentIntent.transfer_data`, and `PaymentIntent.update().$params.transfer_datum`
+ * Add support for new values `bizum` and `scalapay` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types`
+ * Add support for `blik_authorize` on `PaymentIntent.next_action` and `SetupIntent.next_action`
+ * Add support for `payment_method_options` on `PaymentLink.create().$params`, `PaymentLink.update().$params`, and `PaymentLink`
+ * Add support for new value `bizum` on enum `PaymentLink.payment_method_types`
+ * Add support for `active` on `PaymentMethodConfiguration.all().$params`
+ * Add support for `billed_until` on `SubscriptionItem`
+ * Add support for `discount` and `discounts` on `Subscription.pending_update`
+ * Add support for `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on `Terminal.Configuration`, `Terminal\Configuration.create().$params`, and `Terminal\Configuration.update().$params`
+ * Add support for `api_error` and `print_content` on `Terminal.Reader.action`
+ * Add support for new value `print_content` on enum `Terminal.Reader.action.type`
+ * Add support for new values `simulated_verifone_m425`, `simulated_verifone_p630`, `simulated_verifone_ux700`, `simulated_verifone_v660p`, `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on enum `Terminal.Reader.device_type`
+ * Add support for `customer` on `TestHelpers\TestClock.create().$params`
+ * Add support for `signer` on `V2.Core.Account.identity.business_details.documents.proof_of_registration`, `V2.Core.Account.identity.business_details.documents.proof_of_ultimate_beneficial_ownership`, `V2\Core\Account.create().$params.identity.business_detail.document.proof_of_registration`, `V2\Core\Account.create().$params.identity.business_detail.document.proof_of_ultimate_beneficial_ownership`, `V2\Core\Account.update().$params.identity.business_detail.document.proof_of_registration`, `V2\Core\Account.update().$params.identity.business_detail.document.proof_of_ultimate_beneficial_ownership`, `V2\Core\AccountToken.create().$params.identity.business_detail.document.proof_of_registration`, and `V2\Core\AccountToken.create().$params.identity.business_detail.document.proof_of_ultimate_beneficial_ownership`
+ * Add support for `azure_event_grid` on `V2.Core.EventDestination` and `V2\Core\EventDestination.create().$params`
+ * Add support for new value `no_azure_partner_topic_exists` on enum `V2.Core.EventDestination.status_details.disabled.reason`
+ * Add support for new value `azure_event_grid` on enum `V2.Core.EventDestination.type`
+ * Add support for new value `meter_event_value_too_many_digits` on enums `EventsV1BillingMeterErrorReportTriggeredEvent.reason.error_types[].code` and `EventsV1BillingMeterNoMeterFoundEvent.reason.error_types[].code`
+ * Add support for event notifications `V2CommerceProductCatalogImportsFailedEvent`, `V2CommerceProductCatalogImportsProcessingEvent`, `V2CommerceProductCatalogImportsSucceededEvent`, and `V2CommerceProductCatalogImportsSucceededWithErrorsEvent` with related object `V2.Commerce.ProductCatalogImport`
+ * Add support for error codes `payment_method_microdeposit_processing_error` and `siret_invalid` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
+* [#2071](https://github.com/stripe/stripe-php/pull/2071) Emit warning when `stripe-notify` header is present in response
+
## 20.2.0-beta.2 - 2026-04-24
* [#2060](https://github.com/stripe/stripe-php/pull/2060) Update generated code for beta
* Add support for new resources `V2.Commerce.ProductCatalogImport`, `V2.Data.Reporting.QueryRun`, `V2.Extend.WorkflowRun`, `V2.Extend.Workflow`, `V2.Iam.ActivityLog`, `V2.Network.BusinessProfile`, and `V2.OrchestratedCommerce.Agreement`
diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION
index 6fae6735a..983636f7b 100644
--- a/CODEGEN_VERSION
+++ b/CODEGEN_VERSION
@@ -1 +1 @@
-d59a1f4bdea3032b8e282d40badc032cb021fc60
\ No newline at end of file
+6012b623b1c09ad54d466947da04511a042ee45a
\ No newline at end of file
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 30723023b..83c68c9d1 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v2277
\ No newline at end of file
+v2324
\ No newline at end of file
diff --git a/README.md b/README.md
index 0c37a4eed..ca1d3c552 100644
--- a/README.md
+++ b/README.md
@@ -234,7 +234,7 @@ Stripe::addBetaVersion("feature_beta", "v3");
### Private Preview SDKs
-Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `12.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-php?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.
+Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `12.2.0-alpha.2`. You can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-php?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`. Note that access to specific private preview API features may require separate approval.
### Custom requests
@@ -264,6 +264,9 @@ New features and bug fixes are released on the latest major version of the Strip
## Development
+> [!WARNING]
+> External contributions to this repo from first-time contributors are currently on hiatus. If you'd like to see a change made to the package, please open an issue.
+
[Contribution guidelines for this project](CONTRIBUTING.md)
We use [just](https://github.com/casey/just) for conveniently running development tasks. You can use them directly, or copy the commands out of the `justfile`. To our help docs, run `just`.
diff --git a/init.php b/init.php
index 1233251fb..3f574e032 100644
--- a/init.php
+++ b/init.php
@@ -154,8 +154,8 @@
require __DIR__ . '/lib/EventData/V1BillingMeterNoMeterFoundEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventData.php';
+require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventData.php';
-require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountLinkReturnedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountPersonCreatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountPersonDeletedEventData.php';
@@ -193,14 +193,14 @@
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.php';
+require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent.php';
+require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification.php';
+require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent.php';
+require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.php';
-require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.php';
-require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification.php';
-require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEvent.php';
-require __DIR__ . '/lib/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingDefaultsUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.php';
@@ -289,6 +289,8 @@
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentPostedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentReturnedEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentReturnedEventNotification.php';
+require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentUnderReviewEvent.php';
+require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentUnderReviewEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferCanceledEvent.php';
@@ -301,6 +303,8 @@
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferPostedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferReturnedEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferReturnedEventNotification.php';
+require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferUnderReviewEvent.php';
+require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferUnderReviewEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2MoneyManagementOutboundTransferUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2MoneyManagementPayoutMethodCreatedEvent.php';
diff --git a/lib/ApiRequestor.php b/lib/ApiRequestor.php
index d59c0ae80..5a6b981a1 100644
--- a/lib/ApiRequestor.php
+++ b/lib/ApiRequestor.php
@@ -591,11 +591,30 @@ private static function _defaultHeaders($apiKey, $clientInfo = null, $appInfo =
// Fallback to global configuration to maintain backwards compatibility.
$appInfo = $appInfo ?: Stripe::getAppInfo();
+ // `static` here means it persists for the lifetime of the process
+ static $cachedSource = null;
+ if (null === $cachedSource) {
+ $uname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'php_uname');
+ if ($uname_disabled) {
+ $cachedSource = false;
+ } else {
+ $parts = [\php_uname()];
+ $hostname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'gethostname');
+ if (!$hostname_disabled) {
+ $parts[] = \gethostname();
+ }
+ $cachedSource = \md5(\implode(' ', $parts));
+ }
+ }
+
$ua = [
'bindings_version' => Stripe::VERSION,
'lang' => 'php',
'lang_version' => $langVersion,
];
+ if ($cachedSource) {
+ $ua['source'] = $cachedSource;
+ }
if (Stripe::getEnableTelemetry()) {
$uname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'php_uname');
$ua['platform'] = $uname_disabled
diff --git a/lib/BalanceTransaction.php b/lib/BalanceTransaction.php
index 1d717e7bc..4d550c2e2 100644
--- a/lib/BalanceTransaction.php
+++ b/lib/BalanceTransaction.php
@@ -25,7 +25,7 @@
* @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.
* @property null|ApplicationFee|ApplicationFeeRefund|Charge|ConnectCollectionTransfer|CustomerCashBalanceTransaction|Dispute|Issuing\Authorization|Issuing\Dispute|Issuing\Transaction|Payout|Refund|ReserveTransaction|string|TaxDeductedAtSource|Topup|Transfer|TransferReversal $source This transaction relates to the Stripe object.
* @property string $status The transaction's net funds status in the Stripe balance, which are either available or pending.
- * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, climate_order_purchase, climate_order_refund, connect_collection_transfer, contribution, inbound_transfer, inbound_transfer_reversal, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_outbound, obligation_reversal_inbound, payment, payment_failure_refund, payment_network_reserve_hold, payment_network_reserve_release, payment_refund, payment_reversal, payment_unreconciled, payout, payout_cancel, payout_failure, payout_minimum_balance_hold, payout_minimum_balance_release, refund, refund_failure, reserve_transaction, reserved_funds, reserve_hold, reserve_release, stripe_fee, stripe_fx_fee, stripe_balance_payment_debit, stripe_balance_payment_debit_reversal, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, transfer_refund, or fee_credit_funding. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category instead.
+ * @property string $type Transaction type: tax_fund, adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, climate_order_purchase, climate_order_refund, connect_collection_transfer, contribution, inbound_transfer, inbound_transfer_reversal, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_outbound, obligation_reversal_inbound, payment, payment_failure_refund, payment_network_reserve_hold, payment_network_reserve_release, payment_refund, payment_reversal, payment_unreconciled, payout, payout_cancel, payout_failure, payout_minimum_balance_hold, payout_minimum_balance_release, refund, refund_failure, reserve_transaction, reserved_funds, reserve_hold, reserve_release, stripe_fee, stripe_fx_fee, stripe_balance_payment_debit, stripe_balance_payment_debit_reversal, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, transfer_refund, or fee_credit_funding. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category instead.
*/
class BalanceTransaction extends ApiResource
{
@@ -79,6 +79,7 @@ class BalanceTransaction extends ApiResource
const TYPE_STRIPE_FEE = 'stripe_fee';
const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee';
const TYPE_TAX_FEE = 'tax_fee';
+ const TYPE_TAX_FUND = 'tax_fund';
const TYPE_TOPUP = 'topup';
const TYPE_TOPUP_REVERSAL = 'topup_reversal';
const TYPE_TRANSFER = 'transfer';
@@ -88,11 +89,11 @@ class BalanceTransaction extends ApiResource
/**
* Returns a list of transactions that have contributed to the Stripe account
- * balance (e.g., charges, transfers, and so forth). The transactions are returned
- * in sorted order, with the most recent transactions appearing first.
+ * balance (for example, charges, transfers, and so on). The transactions return in
+ * sorted order, with the most recent transactions appearing first.
*
- * Note that this endpoint was previously called “Balance history” and used the
- * path /v1/balance/history.
+ * The previous name of this endpoint was “Balance history,” and it used the path
+ * /v1/balance/history.
*
* @param null|array{created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, payout?: string, source?: string, starting_after?: string, type?: string} $params
* @param null|array|string $opts
diff --git a/lib/Capital/FinancingOffer.php b/lib/Capital/FinancingOffer.php
index 56c9d1193..f748ece49 100644
--- a/lib/Capital/FinancingOffer.php
+++ b/lib/Capital/FinancingOffer.php
@@ -14,6 +14,7 @@
* @property string $account The ID of the merchant associated with this financing object.
* @property null|int $charged_off_at The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch.
* @property int $created Time at which the offer was created. Given in seconds since unix epoch.
+ * @property null|string $disclaimer_variant The type of disclaimer to use for a financing offer in user-facing surfaces. The corresponding disclaimer text to use for each disclaimer_variant value can be found in the marketing docs.
* @property float $expires_after Time at which the offer expires. Given in seconds since unix epoch.
* @property null|string $financing_type The type of financing being offered.
* @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
@@ -29,6 +30,13 @@ class FinancingOffer extends \Stripe\ApiResource
{
const OBJECT_NAME = 'capital.financing_offer';
+ const DISCLAIMER_VARIANT_CELTIC_US_LOAN = 'celtic_us_loan';
+ const DISCLAIMER_VARIANT_FUNDBOX_AU_FINANCING = 'fundbox_au_financing';
+ const DISCLAIMER_VARIANT_YOULEND_DE_FINANCING = 'youlend_de_financing';
+ const DISCLAIMER_VARIANT_YOULEND_FR_FINANCING = 'youlend_fr_financing';
+ const DISCLAIMER_VARIANT_YOULEND_UK_MCA = 'youlend_uk_mca';
+ const DISCLAIMER_VARIANT_YOULEND_US_MCA = 'youlend_us_mca';
+
const FINANCING_TYPE_CASH_ADVANCE = 'cash_advance';
const FINANCING_TYPE_FLEX_LOAN = 'flex_loan';
diff --git a/lib/Capital/FinancingSummary.php b/lib/Capital/FinancingSummary.php
index d4102c2bc..6f5799330 100644
--- a/lib/Capital/FinancingSummary.php
+++ b/lib/Capital/FinancingSummary.php
@@ -10,7 +10,7 @@
* You can read the status of your connected accounts.
*
* @property string $object The object type: financing_summary
- * @property null|(object{advance_amount: int, advance_paid_out_at: null|float, currency: string, current_repayment_interval: null|(object{due_at: float, paid_amount: null|int, remaining_amount: int}&\Stripe\StripeObject), fee_amount: int, paid_amount: int, remaining_amount: int, repayments_begin_at: null|float, withhold_rate: float}&\Stripe\StripeObject) $details
Additional information about the financing summary. Describes currency, advance amount, fee amount, withhold rate, remaining amount, paid amount, current repayment interval, repayment start date, and advance payout date.
Only present for financing offers with the paid_out status.
Additional information about the financing summary. Describes currency, advance amount, fee amount, withhold rate, remaining amount, paid amount, current repayment interval, repayment start date, and advance payout date.
Only present for financing offers with the paid_out status.
new and errored. If a payout fails, the status is set to errored and scheduled payouts are stopped until account details are updated.
* @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be android_pay (includes Google Pay), apple_pay, masterpass, visa_checkout, or null.
diff --git a/lib/Charge.php b/lib/Charge.php
index 5e2ad7952..07600f9f5 100644
--- a/lib/Charge.php
+++ b/lib/Charge.php
@@ -39,12 +39,13 @@
* @property bool $paid true if the charge succeeded, or was successfully authorized for later capture.
* @property null|PaymentIntent|string $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}&StripeObject), 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}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), bizum?: (object{transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: string}&StripeObject), 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}&StripeObject), country: null|string, decremental_authorization?: (object{status: string}&StripeObject), description?: null|string, exp_month: int, exp_year: int, extended_authorization?: (object{status: string}&StripeObject), fingerprint?: null|string, funding: null|string, iin?: null|string, incremental_authorization?: (object{status: string}&StripeObject), installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer?: null|string, last4: null|string, mandate: null|string, moto?: null|bool, multicapture?: (object{status: string}&StripeObject), network: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, overcapture?: (object{maximum_amount_capturable: int, status: string}&StripeObject), partial_authorization?: (object{status: string}&StripeObject), 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}&StripeObject), wallet: null|(object{amex_express_checkout?: (object{}&StripeObject), apple_pay?: (object{}&StripeObject), dynamic_last4: null|string, google_pay?: (object{}&StripeObject), link?: (object{}&StripeObject), 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}&StripeObject), 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}&StripeObject)}&StripeObject), samsung_pay?: (object{}&StripeObject), 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}&StripeObject), 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}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), gopay?: (object{}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), id_bank_transfer?: (object{account_number: string, bank: string, bank_code?: string, bank_name?: string, display_name?: string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{location?: string, payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string, reader?: string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), 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}&StripeObject), shipping?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), 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}&StripeObject), verified_email?: null|string, verified_name?: null|string}&StripeObject), paypay?: (object{}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string, mandate?: string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), qris?: (object{}&StripeObject), rechnung?: (object{payment_portal_url: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), scalapay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), shopeepay?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), stripe_balance?: (object{account?: null|string}&StripeObject), sunbit?: (object{transaction_id: null|string}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{mandate?: string}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $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}&StripeObject), 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}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), bizum?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: string}&StripeObject), 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}&StripeObject), country: null|string, decremental_authorization?: (object{status: string}&StripeObject), description?: null|string, exp_month: int, exp_year: int, extended_authorization?: (object{status: string}&StripeObject), fingerprint?: null|string, funding: null|string, iin?: null|string, incremental_authorization?: (object{status: string}&StripeObject), installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer?: null|string, last4: null|string, mandate: null|string, moto?: null|bool, multicapture?: (object{status: string}&StripeObject), network: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, overcapture?: (object{maximum_amount_capturable: int, status: string}&StripeObject), partial_authorization?: (object{status: string}&StripeObject), 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}&StripeObject), transaction_link_id: null|string, wallet: null|(object{amex_express_checkout?: (object{}&StripeObject), apple_pay?: (object{}&StripeObject), dynamic_last4: null|string, google_pay?: (object{}&StripeObject), link?: (object{}&StripeObject), 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}&StripeObject), 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}&StripeObject)}&StripeObject), samsung_pay?: (object{}&StripeObject), 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}&StripeObject), 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}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), gopay?: (object{}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), id_bank_transfer?: (object{account_number: string, bank: string, bank_code?: string, bank_name?: string, display_name?: string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{location?: string, payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string, reader?: string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), 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}&StripeObject), shipping?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), 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}&StripeObject), verified_email?: null|string, verified_name?: null|string}&StripeObject), paypay?: (object{}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string, fingerprint?: null|string, mandate?: string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), qris?: (object{}&StripeObject), rechnung?: (object{payment_portal_url: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), scalapay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), shopeepay?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), stripe_balance?: (object{account?: null|string}&StripeObject), sunbit?: (object{transaction_id: null|string}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{mandate?: string}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Details about the payment method at the time of the transaction.
* @property null|(object{presentment_amount: int, presentment_currency: string}&StripeObject) $presentment_details
* @property null|(object{session?: string}&StripeObject) $radar_options Options to configure Radar. See Radar Session for more information.
* @property null|string $receipt_email This is the email address that the receipt for this charge was sent to.
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent.
* @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
+ * @property null|(object{status: string}&StripeObject) $redaction Redaction status of this charge. If not null, this charge is associated to a redaction job.
* @property bool $refunded Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
* @property null|Collectionalways.
* @property null|(object{id: string, parent: null|string}&\Stripe\StripeObject) $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), setup_future_usage?: string, target_date?: string, verification_method?: string}&\Stripe\StripeObject), affirm?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), afterpay_clearpay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), alipay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), alma?: (object{capture_method?: string}&\Stripe\StripeObject), amazon_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), au_becs_debit?: (object{setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), bancontact?: (object{setup_future_usage?: string}&\Stripe\StripeObject), billie?: (object{capture_method?: string}&\Stripe\StripeObject), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject), card?: (object{capture_method?: string, installments?: (object{enabled?: bool}&\Stripe\StripeObject), 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), setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}&\Stripe\StripeObject), cashapp?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&\Stripe\StripeObject), requested_address_types?: string[], type: null|string}&\Stripe\StripeObject), funding_type: null|string, setup_future_usage?: string}&\Stripe\StripeObject), eps?: (object{setup_future_usage?: string}&\Stripe\StripeObject), fpx?: (object{setup_future_usage?: string}&\Stripe\StripeObject), giropay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), grabpay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), ideal?: (object{setup_future_usage?: string}&\Stripe\StripeObject), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), klarna?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), konbini?: (object{expires_after_days: null|int, setup_future_usage?: string}&\Stripe\StripeObject), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), link?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), mobilepay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), multibanco?: (object{setup_future_usage?: string}&\Stripe\StripeObject), naver_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject), p24?: (object{setup_future_usage?: string}&\Stripe\StripeObject), payco?: (object{capture_method?: string}&\Stripe\StripeObject), paynow?: (object{setup_future_usage?: string}&\Stripe\StripeObject), paypal?: (object{capture_method?: string, preferred_locale: null|string, reference: null|string, setup_future_usage?: string, subsellers?: string[]}&\Stripe\StripeObject), 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), setup_future_usage?: string}&\Stripe\StripeObject), pix?: (object{amount_includes_iof?: string, expires_after_seconds: null|int, mandate_options?: (object{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}&\Stripe\StripeObject), setup_future_usage?: string}&\Stripe\StripeObject), revolut_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), samsung_pay?: (object{capture_method?: string}&\Stripe\StripeObject), satispay?: (object{capture_method?: string}&\Stripe\StripeObject), scalapay?: (object{capture_method?: string}&\Stripe\StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), sofort?: (object{setup_future_usage?: string}&\Stripe\StripeObject), swish?: (object{reference: null|string}&\Stripe\StripeObject), twint?: (object{setup_future_usage?: string}&\Stripe\StripeObject), upi?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&\Stripe\StripeObject), setup_future_usage?: string}&\Stripe\StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[], institution?: string}&\Stripe\StripeObject), manual_entry?: (object{mode?: string}&\Stripe\StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $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), setup_future_usage?: string, target_date?: string, verification_method?: string}&\Stripe\StripeObject), affirm?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), afterpay_clearpay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), alipay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), alma?: (object{capture_method?: string}&\Stripe\StripeObject), amazon_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), au_becs_debit?: (object{setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), bancontact?: (object{setup_future_usage?: string}&\Stripe\StripeObject), billie?: (object{capture_method?: string}&\Stripe\StripeObject), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject), card?: (object{capture_method?: string, installments?: (object{enabled?: bool}&\Stripe\StripeObject), 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), setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string}&\Stripe\StripeObject), cashapp?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&\Stripe\StripeObject), requested_address_types?: string[], type: null|string}&\Stripe\StripeObject), funding_type: null|string, setup_future_usage?: string}&\Stripe\StripeObject), eps?: (object{setup_future_usage?: string}&\Stripe\StripeObject), fpx?: (object{setup_future_usage?: string}&\Stripe\StripeObject), giropay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), grabpay?: (object{setup_future_usage?: string}&\Stripe\StripeObject), ideal?: (object{setup_future_usage?: string}&\Stripe\StripeObject), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), klarna?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), konbini?: (object{expires_after_days: null|int, setup_future_usage?: string}&\Stripe\StripeObject), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), link?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), mobilepay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), multibanco?: (object{setup_future_usage?: string}&\Stripe\StripeObject), naver_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&\Stripe\StripeObject), p24?: (object{setup_future_usage?: string}&\Stripe\StripeObject), payco?: (object{capture_method?: string}&\Stripe\StripeObject), paynow?: (object{setup_future_usage?: string}&\Stripe\StripeObject), paypal?: (object{capture_method?: string, preferred_locale: null|string, reference: null|string, setup_future_usage?: string, subsellers?: string[]}&\Stripe\StripeObject), 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), setup_future_usage?: string}&\Stripe\StripeObject), pix?: (object{amount_includes_iof?: string, expires_after_seconds: null|int, mandate_options?: (object{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}&\Stripe\StripeObject), setup_future_usage?: string}&\Stripe\StripeObject), revolut_pay?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), samsung_pay?: (object{capture_method?: string}&\Stripe\StripeObject), satispay?: (object{capture_method?: string}&\Stripe\StripeObject), scalapay?: (object{capture_method?: string}&\Stripe\StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string}&\Stripe\StripeObject), sofort?: (object{setup_future_usage?: string}&\Stripe\StripeObject), sunbit?: (object{capture_method?: string, setup_future_usage?: string}&\Stripe\StripeObject), swish?: (object{reference: null|string}&\Stripe\StripeObject), twint?: (object{setup_future_usage?: string}&\Stripe\StripeObject), upi?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&\Stripe\StripeObject), setup_future_usage?: string}&\Stripe\StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[], institution?: string}&\Stripe\StripeObject), manual_entry?: (object{mode?: string}&\Stripe\StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&\Stripe\StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&\Stripe\StripeObject), wechat_pay?: (object{app_id: null|string, client: null|string, setup_future_usage?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
* @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
* @property string $payment_status The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer's order.
* @property null|(object{update?: null|(object{line_items?: null|string, shipping_details: null|string}&\Stripe\StripeObject), update_line_items?: null|string, update_shipping_details: null|string}&\Stripe\StripeObject) $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.
ui_mode: embedded_page. Learn more about the redirect behavior of embedded sessions. Defaults to always.
* @property null|string $return_url Applies to Checkout Sessions with ui_mode: embedded_page or ui_mode: elements. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
* @property null|(object{allow_redisplay_filters: null|string[], payment_method_remove: null|string, payment_method_save: null|string}&\Stripe\StripeObject) $saved_payment_method_options Controls saved payment method settings for the session. Only available in payment and subscription mode.
@@ -137,7 +138,7 @@ class Session extends \Stripe\ApiResource
/**
* Creates a Checkout 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, branding_settings?: array{background_color?: null|string, border_style?: null|string, button_color?: null|string, display_name?: string, font_family?: null|string, icon?: array{file?: string, type: string, url?: string}, logo?: array{file?: string, type: string, url?: 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_account?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: (array{coupon?: string, coupon_data?: array{amount_off?: int, currency?: string, duration?: string, metadata?: null|arrayIndicates that you intend to make future payments with this ConfirmationToken's payment method.
The presence of this property will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
* @property null|string $setup_intent ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. diff --git a/lib/CreditNote.php b/lib/CreditNote.php index 2a08fcd8c..5f33604f0 100644 --- a/lib/CreditNote.php +++ b/lib/CreditNote.php @@ -86,6 +86,12 @@ class CreditNote extends ApiResource *post_payment_credit_notes_amount, or both, depending on the
* invoice’s amount_remaining at the time of credit note creation.
*
+ * For invoices that also have refunds created through the Refund API, the credit note API subtracts those
+ * refund amounts from the maximum creditable amount. This prevents the combined
+ * credit notes and refunds from exceeding the invoice amount. If you use both,
+ * ensure the combined total does not exceed the invoice’s paid amount.
+ *
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, metadata?: arrayenhanced_evidence.
- * @property (object{access_activity_log: null|string, billing_address: null|string, cancellation_policy: null|File|string, cancellation_policy_disclosure: null|string, cancellation_rebuttal: null|string, customer_communication: null|File|string, customer_email_address: null|string, customer_name: null|string, customer_purchase_ip: null|string, customer_signature: null|File|string, duplicate_charge_documentation: null|File|string, duplicate_charge_explanation: null|string, duplicate_charge_id: null|string, enhanced_evidence: (object{visa_compelling_evidence_3?: (object{disputed_transaction: null|(object{customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, merchandise_or_services: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), prior_undisputed_transactions: ((object{charge: string, customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject))[]}&StripeObject), visa_compliance?: (object{fee_acknowledged: bool}&StripeObject)}&StripeObject), product_description: null|string, receipt: null|File|string, refund_policy: null|File|string, refund_policy_disclosure: null|string, refund_refusal_explanation: null|string, service_date: null|string, service_documentation: null|File|string, shipping_address: null|string, shipping_carrier: null|string, shipping_date: null|string, shipping_documentation: null|File|string, shipping_tracking_number: null|string, uncategorized_file: null|File|string, uncategorized_text: null|string}&StripeObject) $evidence
- * @property (object{due_by: null|int, enhanced_eligibility: (object{visa_compelling_evidence_3?: (object{required_actions: string[], status: string}&StripeObject), visa_compliance?: (object{status: string}&StripeObject)}&StripeObject), has_evidence: bool, past_due: bool, submission_count: int, submission_method?: string}&StripeObject) $evidence_details
+ * @property (object{access_activity_log: null|string, billing_address: null|string, cancellation_policy: null|File|string, cancellation_policy_disclosure: null|string, cancellation_rebuttal: null|string, customer_communication: null|File|string, customer_email_address: null|string, customer_name: null|string, customer_purchase_ip: null|string, customer_signature: null|File|string, duplicate_charge_documentation: null|File|string, duplicate_charge_explanation: null|string, duplicate_charge_id: null|string, enhanced_evidence: (object{mastercard_compliance?: (object{fee_acknowledged: bool}&StripeObject), visa_compelling_evidence_3?: (object{disputed_transaction: null|(object{customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, merchandise_or_services: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), prior_undisputed_transactions: ((object{charge: string, customer_account_id: null|string, customer_device_fingerprint: null|string, customer_device_id: null|string, customer_email_address: null|string, customer_purchase_ip: null|string, product_description: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject))[]}&StripeObject), visa_compliance?: (object{fee_acknowledged: bool}&StripeObject)}&StripeObject), product_description: null|string, receipt: null|File|string, refund_policy: null|File|string, refund_policy_disclosure: null|string, refund_refusal_explanation: null|string, service_date: null|string, service_documentation: null|File|string, shipping_address: null|string, shipping_carrier: null|string, shipping_date: null|string, shipping_documentation: null|File|string, shipping_tracking_number: null|string, uncategorized_file: null|File|string, uncategorized_text: null|string}&StripeObject) $evidence
+ * @property (object{due_by: null|int, enhanced_eligibility: (object{mastercard_compliance?: (object{status: string}&StripeObject), visa_compelling_evidence_3?: (object{required_actions: string[], status: string}&StripeObject), visa_compliance?: (object{status: string}&StripeObject)}&StripeObject), has_evidence: bool, past_due: bool, submission_count: int, submission_method?: string}&StripeObject) $evidence_details
* @property null|string $intended_submission_method Intended submission method for the dispute.
* @property bool $is_charge_refundable If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute.
* @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
@@ -115,7 +115,7 @@ public static function retrieve($id, $opts = null)
* see our guide to dispute types.
*
* @param string $id the ID of the resource to update
- * @param null|array{evidence?: array{access_activity_log?: string, billing_address?: string, cancellation_policy?: string, cancellation_policy_disclosure?: string, cancellation_rebuttal?: string, customer_communication?: string, customer_email_address?: string, customer_name?: string, customer_purchase_ip?: string, customer_signature?: string, duplicate_charge_documentation?: string, duplicate_charge_explanation?: string, duplicate_charge_id?: string, enhanced_evidence?: null|array{visa_compelling_evidence_3?: array{disputed_transaction?: array{customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, merchandise_or_services?: string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}}, prior_undisputed_transactions?: (array{charge: string, customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}})[]}, visa_compliance?: array{fee_acknowledged?: bool}}, product_description?: string, receipt?: string, refund_policy?: string, refund_policy_disclosure?: string, refund_refusal_explanation?: string, service_date?: string, service_documentation?: string, shipping_address?: string, shipping_carrier?: string, shipping_date?: string, shipping_documentation?: string, shipping_tracking_number?: string, uncategorized_file?: string, uncategorized_text?: string}, expand?: string[], intended_submission_method?: string, metadata?: null|arraycategory is cash, one of:- checking - savings - other
If category is credit, one of:
- mortgage - line_of_credit - credit_card - other
If category is investment or other, this will be other.
true. If the object exists in test mode, the value is false.
* @property string $status The status of the connection to the Authorization.
- * @property (object{inactive?: (object{action: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details
+ * @property (object{active?: (object{action: string, expected_deactivation_date: int}&\Stripe\StripeObject), inactive?: (object{action: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details
*/
class Authorization extends \Stripe\ApiResource
{
diff --git a/lib/FinancialConnections/Session.php b/lib/FinancialConnections/Session.php
index 6685410d0..630e34009 100644
--- a/lib/FinancialConnections/Session.php
+++ b/lib/FinancialConnections/Session.php
@@ -44,7 +44,7 @@ class Session extends \Stripe\ApiResource
* Session. The session’s client_secret can be used to
* launch the flow using Stripe.js.
*
- * @param null|array{account_holder?: array{account?: string, customer?: string, customer_account?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[], institution?: string}, hosted?: array{delivery_method?: string}, limits?: array{accounts: int}, manual_entry?: array{mode?: string}, permissions: string[], prefetch?: string[], relink_options?: array{account?: string, authorization: string}, return_url?: string, ui_mode?: string} $params
+ * @param null|array{account_holder?: array{account?: string, customer?: string, customer_account?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[], institution?: string}, hosted?: array{delivery_method?: string}, limits?: array{accounts: null|int}, manual_entry?: array{mode?: string}, permissions: string[], prefetch?: string[], relink_options?: array{account?: string, authorization: string}, return_url?: string, ui_mode?: string} $params
* @param null|array|string $options
*
* @return Session the created resource
diff --git a/lib/Issuing/Authorization.php b/lib/Issuing/Authorization.php
index d2f2d2986..2b53131c5 100644
--- a/lib/Issuing/Authorization.php
+++ b/lib/Issuing/Authorization.php
@@ -33,6 +33,7 @@
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|(object{acquiring_institution_id: null|string, system_trace_audit_number: null|string, transaction_id: null|string}&\Stripe\StripeObject) $network_data Details about the authorization, such as identifiers, set by the card network.
* @property null|(object{amount: int, amount_details: null|(object{atm_fee: null|int, cashback_amount: null|int}&\Stripe\StripeObject), currency: string, is_amount_controllable: bool, merchant_amount: int, merchant_currency: string, network_risk_score: null|int}&\Stripe\StripeObject) $pending_request The pending authorization request. This field will only be non-null during an issuing_authorization.request webhook.
+ * @property null|(object{status: string}&\Stripe\StripeObject) $redaction Redaction status of this authorization. If the authorization is not redacted, this field will be null.
* @property ((object{amount: int, amount_details: null|(object{atm_fee: null|int, cashback_amount: null|int}&\Stripe\StripeObject), approved: bool, authorization_code: null|string, created: int, currency: string, merchant_amount: int, merchant_currency: string, network_risk_score: null|int, reason: string, reason_message: null|string, requested_at: null|int}&\Stripe\StripeObject))[] $request_history History of every time a pending_request authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
* @property string $status The current status of the authorization in its lifecycle.
* @property null|string|Token $token Token object used for this authorization. If a network token was not used for this authorization, this field will be null.
diff --git a/lib/Issuing/Card.php b/lib/Issuing/Card.php
index 724ea533d..fdf5c87ea 100644
--- a/lib/Issuing/Card.php
+++ b/lib/Issuing/Card.php
@@ -25,6 +25,7 @@
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
* @property null|PersonalizationDesign|string $personalization_design The personalization design object belonging to this card.
+ * @property null|(object{status: string}&\Stripe\StripeObject) $redaction Redaction status of this card. If not null, this card is associated to a redaction job.
* @property null|Card|string $replaced_by The latest card that replaces this card, if any.
* @property null|Card|string $replacement_for The card this card replaces, if any.
* @property null|string $replacement_reason The reason why the previous card needed to be replaced.
diff --git a/lib/Issuing/Cardholder.php b/lib/Issuing/Cardholder.php
index 536cd071f..c698eeb16 100644
--- a/lib/Issuing/Cardholder.php
+++ b/lib/Issuing/Cardholder.php
@@ -21,6 +21,7 @@
* @property string $name The cardholder's name. This will be printed on cards issued to them.
* @property null|string $phone_number The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the 3D Secure documentation for more details.
* @property null|string[] $preferred_locales The cardholder’s preferred locales (languages), ordered by preference. Locales can be da, de, en, es, fr, it, pl, or sv. This changes the language of the 3D Secure flow and one-time password messages sent to the cardholder.
+ * @property null|(object{status: string}&\Stripe\StripeObject) $redaction Redaction status of this cardholder. If the cardholder is not redacted, this field will be null.
* @property (object{disabled_reason: null|string, past_due: null|string[]}&\Stripe\StripeObject) $requirements
* @property null|(object{allowed_card_presences: null|string[], allowed_categories: null|string[], allowed_merchant_countries: null|string[], blocked_card_presences: null|string[], blocked_categories: null|string[], blocked_merchant_countries: null|string[], spending_limits: null|((object{amount: int, categories: null|string[], interval: string}&\Stripe\StripeObject))[], spending_limits_currency: null|string}&\Stripe\StripeObject) $spending_controls Rules that control spending across this cardholder's cards. Refer to our documentation for more details.
* @property string $status Specifies whether to permit authorizations on this cardholder's cards.
diff --git a/lib/Issuing/Dispute.php b/lib/Issuing/Dispute.php
index fc1d2de88..5dda0d093 100644
--- a/lib/Issuing/Dispute.php
+++ b/lib/Issuing/Dispute.php
@@ -19,6 +19,7 @@
* @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
* @property null|string $loss_reason The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|(object{status: string}&\Stripe\StripeObject) $redaction Redaction status of this dispute. If the dispute is not redacted, this field will be null.
* @property string $status Current status of the dispute.
* @property string|Transaction $transaction The transaction being disputed.
* @property null|(object{debit_reversal: null|string, received_debit: string}&\Stripe\StripeObject) $treasury Treasury details related to this dispute if it was created on a FinancialAccount
diff --git a/lib/Issuing/Transaction.php b/lib/Issuing/Transaction.php
index 3849840be..f4286ff68 100644
--- a/lib/Issuing/Transaction.php
+++ b/lib/Issuing/Transaction.php
@@ -29,6 +29,7 @@
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|(object{authorization_code: null|string, processing_date: null|string, transaction_id: null|string}&\Stripe\StripeObject) $network_data Details about the transaction, such as processing dates, set by the card network.
* @property null|(object{fleet: null|(object{cardholder_prompt_data: null|(object{driver_id: null|string, odometer: null|int, unspecified_id: null|string, user_id: null|string, vehicle_number: null|string}&\Stripe\StripeObject), purchase_type: null|string, reported_breakdown: null|(object{fuel: null|(object{gross_amount_decimal: null|string}&\Stripe\StripeObject), non_fuel: null|(object{gross_amount_decimal: null|string}&\Stripe\StripeObject), tax: null|(object{local_amount_decimal: null|string, national_amount_decimal: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject), service_type: null|string}&\Stripe\StripeObject), flight: null|(object{departure_at: null|int, passenger_name: null|string, refundable: null|bool, segments: null|((object{arrival_airport_code: null|string, carrier: null|string, departure_airport_code: null|string, flight_number: null|string, service_class: null|string, stopover_allowed: null|bool}&\Stripe\StripeObject))[], travel_agency: null|string}&\Stripe\StripeObject), fuel: null|(object{industry_product_code: null|string, quantity_decimal: null|string, type: string, unit: string, unit_cost_decimal: string}&\Stripe\StripeObject), lodging: null|(object{check_in_at: null|int, nights: null|int}&\Stripe\StripeObject), receipt: null|((object{description: null|string, quantity: null|float, total: null|int, unit_cost: null|int}&\Stripe\StripeObject))[], reference: null|string}&\Stripe\StripeObject) $purchase_details Additional purchase information that is optionally provided by the merchant.
+ * @property null|(object{status: string}&\Stripe\StripeObject) $redaction Redaction status of this transaction. If the transaction is not redacted, this field will be null.
* @property null|Settlement|string $settlement The ID of the settlement to which this transaction belongs.
* @property null|string|Token $token Token object used for this transaction. If a network token was not used for this transaction, this field will be null.
* @property null|(object{received_credit: null|string, received_debit: null|string}&\Stripe\StripeObject) $treasury Treasury details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
diff --git a/lib/PaymentAttemptRecord.php b/lib/PaymentAttemptRecord.php
index bb081281e..01c9604ec 100644
--- a/lib/PaymentAttemptRecord.php
+++ b/lib/PaymentAttemptRecord.php
@@ -26,7 +26,7 @@
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
* @property 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|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), 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}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), billing_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject), bizum?: (object{transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: null|string}&StripeObject), card?: (object{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}&StripeObject), country: null|string, description: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin: null|string, installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer: null|string, last4: null|string, moto?: null|bool, network: null|string, network_advice_code: null|string, network_decline_code: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, stored_credential_usage: null|string, three_d_secure: null|(object{authentication_flow: null|string, cryptogram: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied: null|bool, result: null|string, result_reason: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{type: string}&StripeObject), dynamic_last4?: string, google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), custom?: (object{display_name: string, type: null|string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), gopay?: (object{}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), id_bank_transfer?: (object{account_number: string, bank: string, bank_code?: string, bank_name?: string, display_name?: string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{location?: string, payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string, reader?: string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), payment_method: null|string, paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), 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}&StripeObject), shipping?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), 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}&StripeObject), verified_email?: null|string, verified_name?: null|string}&StripeObject), paypay?: (object{}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string, mandate?: string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), qris?: (object{}&StripeObject), rechnung?: (object{payment_portal_url: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), scalapay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), shopeepay?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), stripe_balance?: (object{account?: null|string}&StripeObject), sunbit?: (object{transaction_id: null|string}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{mandate?: string}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Information about the Payment Method debited for this payment.
+ * @property null|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), 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}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), billing_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject), bizum?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: null|string}&StripeObject), card?: (object{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}&StripeObject), country: null|string, description?: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin?: null|string, installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer?: null|string, last4: null|string, moto?: null|bool, network: null|string, network_advice_code: null|string, network_decline_code: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, three_d_secure: null|(object{authentication_flow: null|string, cryptogram: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied: null|bool, result: null|string, result_reason: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{type: string}&StripeObject), dynamic_last4?: string, google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), custom?: (object{display_name: string, type: null|string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), gopay?: (object{}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), id_bank_transfer?: (object{account_number: string, bank: string, bank_code?: string, bank_name?: string, display_name?: string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{location?: string, payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string, reader?: string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), payment_method: null|string, paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), 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}&StripeObject), shipping?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), 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}&StripeObject), verified_email?: null|string, verified_name?: null|string}&StripeObject), paypay?: (object{}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string, mandate?: string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), qris?: (object{}&StripeObject), rechnung?: (object{payment_portal_url: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), scalapay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), shopeepay?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), stripe_balance?: (object{account?: null|string}&StripeObject), sunbit?: (object{transaction_id: null|string}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{mandate?: string}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Information about the Payment Method debited for this payment.
* @property null|string $payment_record ID of the Payment Record this Payment Attempt Record belongs to.
* @property (object{custom?: (object{payment_reference: null|string}&StripeObject), type: string}&StripeObject) $processor_details Processor information associated with this payment.
* @property string $reported_by Indicates who reported the payment.
diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php
index 8b12ef6da..f3b347964 100644
--- a/lib/PaymentIntent.php
+++ b/lib/PaymentIntent.php
@@ -50,11 +50,12 @@
* @property null|(object{car_rental?: (object{affiliate?: (object{name?: string}&StripeObject), booking_number: string, car_class_code?: string, car_make?: string, car_model?: string, company?: string, customer_service_phone_number?: string, days_rented: int, delivery?: (object{mode?: string, recipient?: (object{email?: string, name?: string, phone?: string}&StripeObject)}&StripeObject), distance?: (object{amount?: int, unit?: string}&StripeObject), drivers?: (object{driver_identification_number?: string, driver_tax_number?: string, name?: string}&StripeObject)[], extra_charges?: string[], no_show?: bool, pickup_address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), pickup_at: int, pickup_location_name?: string, rate_amount?: int, rate_interval?: string, renter_name?: string, return_address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), return_at: int, return_location_name?: string, tax_exempt?: bool, vehicle_identification_number?: string}&StripeObject), car_rental_data?: ((object{affiliate?: (object{code?: string, name?: string}&StripeObject), booking_number?: string, carrier_name?: string, customer_service_phone_number?: string, days_rented?: int, distance?: (object{amount?: int, unit?: string}&StripeObject), drivers?: (object{date_of_birth?: (object{day?: int, month?: int, year?: int}&StripeObject), driver_identification_number?: string, driver_tax_number?: string, name?: string}&StripeObject)[], drop_off?: (object{address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), location_name?: string, time?: int}&StripeObject), insurances?: (object{amount?: int, currency?: string, insurance_company_name?: string, insurance_type?: string}&StripeObject)[], no_show_indicator?: bool, pickup?: (object{address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), location_name?: string, time?: int}&StripeObject), renter_name?: string, total?: (object{amount?: int, currency?: string, discounts?: (object{corporate_client_code?: string, coupon?: string, maximum_free_miles_or_kilometers?: int}&StripeObject), extra_charges?: (object{amount?: int, type?: string}&StripeObject)[], rate_per_unit?: int, rate_unit?: string, tax?: (object{tax_exempt_indicator?: bool, taxes?: (object{amount?: int, rate?: int, type?: string}&StripeObject)[]}&StripeObject)}&StripeObject), vehicle?: (object{make?: string, model?: string, odometer?: int, type?: string, vehicle_class?: string, vehicle_identification_number?: string}&StripeObject)}&StripeObject))[], customer_reference: null|string, event_details?: (object{access_controlled_venue?: bool, address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), affiliate?: (object{name?: string}&StripeObject), company?: string, delivery?: (object{mode?: string, recipient?: (object{email?: string, name?: string, phone?: string}&StripeObject)}&StripeObject), ends_at?: int, genre?: string, name?: string, starts_at?: int}&StripeObject), flight_data?: (object{affiliate?: (object{code?: string, name?: string, travel_authorization_code?: string}&StripeObject), booking_number?: string, computerized_reservation_system?: string, endorsements_and_restrictions?: string, insurances?: (object{amount?: int, currency?: string, insurance_company_name?: string, insurance_type?: string}&StripeObject)[], passengers?: (object{name?: string}&StripeObject)[], segments?: (object{amount?: int, arrival?: (object{airport?: string, arrives_at?: int, city?: string, country?: string}&StripeObject), carrier_code?: string, carrier_name?: string, currency?: string, departure?: (object{airport?: string, city?: string, country?: string, departs_at?: int}&StripeObject), exchange_ticket_number?: string, fare_basis_code?: string, fees?: int, flight_number?: string, is_stop_over_indicator?: bool, refundable?: bool, service_class?: string, tax_amount?: int, ticket_number?: string}&StripeObject)[], ticket_electronically_issued_indicator?: bool, total?: (object{amount?: int, credit_reason?: string, currency?: string, discounts?: (object{corporate_client_code?: string}&StripeObject), extra_charges?: (object{amount?: int, type?: string}&StripeObject)[], tax?: (object{taxes?: (object{amount?: int, rate?: int, type?: string}&StripeObject)[]}&StripeObject)}&StripeObject), transaction_type?: string}&StripeObject)[], lodging_data?: ((object{accommodation?: (object{accommodation_type: null|string, bed_type?: string, daily_rate_amount?: int, nights?: int, number_of_rooms?: int, rate_type?: string, smoking_indicator?: bool}&StripeObject), affiliate?: (object{code?: string, name?: string}&StripeObject), booking_number?: string, checkin_at?: int, checkout_at?: int, customer_service_phone_number?: string, fire_safety_act_compliance_indicator?: bool, guests?: (object{name?: string}&StripeObject)[], host?: (object{address?: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), country_of_domicile?: string, host_reference?: string, host_type?: string, name?: string, number_of_reservations?: int, property_phone_number?: string, registered_at?: int}&StripeObject), insurances?: (object{amount?: int, currency?: string, insurance_company_name?: string, insurance_type?: string}&StripeObject)[], no_show_indicator?: bool, renter_id_number?: string, renter_name?: string, total?: (object{amount?: int, cash_advances?: int, currency?: string, discounts?: (object{corporate_client_code?: string, coupon?: string}&StripeObject), extra_charges?: (object{amount?: int, type?: string}&StripeObject)[], prepaid_amount?: int, tax?: (object{tax_exempt_indicator?: bool, taxes?: (object{amount?: int, rate?: int, type?: string}&StripeObject)[]}&StripeObject)}&StripeObject)}&StripeObject))[], order_reference: null|string, subscription?: (object{affiliate?: (object{name?: string}&StripeObject), auto_renewal?: bool, billing_interval?: (object{count?: int, interval?: string}&StripeObject), ends_at?: int, name?: string, starts_at?: int}&StripeObject)}&StripeObject) $payment_details
* @property null|PaymentMethod|string $payment_method ID of the payment method used in this PaymentIntent.
* @property null|(object{id: string, parent: null|string}&StripeObject) $payment_method_configuration_details Information about the payment method configuration used for this PaymentIntent.
- * @property null|(object{acss_debit?: (object{mandate_options?: (object{custom_mandate_url?: string, interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&StripeObject), affirm?: (object{capture_method?: string, preferred_locale?: string, setup_future_usage?: string}&StripeObject), afterpay_clearpay?: (object{capture_method?: string, reference: null|string, setup_future_usage?: string}&StripeObject), alipay?: (object{setup_future_usage?: string}&StripeObject), alma?: (object{capture_method?: string}&StripeObject), amazon_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), au_becs_debit?: (object{setup_future_usage?: string, target_date?: string}&StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject), setup_future_usage?: string, target_date?: string}&StripeObject), bancontact?: (object{preferred_language: string, setup_future_usage?: string}&StripeObject), billie?: (object{capture_method?: string}&StripeObject), bizum?: (object{}&StripeObject), blik?: (object{setup_future_usage?: string}&StripeObject), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&StripeObject), card?: (object{capture_method?: string, installments: null|(object{available_plans: null|((object{count: null|int, interval: null|string, type: string}&StripeObject))[], enabled: bool, plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), mandate_options: null|(object{amount: int, amount_type: string, description: null|string, end_date: null|int, interval: string, interval_count: null|int, reference: string, start_date: int, supported_types: null|string[]}&StripeObject), network: null|string, request_decremental_authorization?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_partial_authorization?: string, request_three_d_secure: null|string, require_cvc_recollection?: bool, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string, statement_details?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}&StripeObject), phone?: string}&StripeObject)}&StripeObject), card_present?: (object{capture_method?: string, request_extended_authorization: null|bool, request_incremental_authorization_support: null|bool, routing?: (object{requested_priority: null|string}&StripeObject)}&StripeObject), cashapp?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), crypto?: (object{setup_future_usage?: string}&StripeObject), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), requested_address_types?: string[], type: null|string}&StripeObject), funding_type: null|string, setup_future_usage?: string}&StripeObject), eps?: (object{setup_future_usage?: string}&StripeObject), fpx?: (object{setup_future_usage?: string}&StripeObject), giropay?: (object{setup_future_usage?: string}&StripeObject), gopay?: (object{setup_future_usage?: string}&StripeObject), grabpay?: (object{setup_future_usage?: string}&StripeObject), id_bank_transfer?: (object{expires_after?: null|int, expires_at: null|int, setup_future_usage?: string}&StripeObject), ideal?: (object{setup_future_usage?: string}&StripeObject), interac_present?: (object{}&StripeObject), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), klarna?: (object{capture_method?: string, preferred_locale: null|string, setup_future_usage?: string}&StripeObject), konbini?: (object{confirmation_number: null|string, expires_after_days: null|int, expires_at: null|int, product_description: null|string, setup_future_usage?: string}&StripeObject), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), link?: (object{capture_method?: string, persistent_token: null|string, setup_future_usage?: string}&StripeObject), mb_way?: (object{setup_future_usage?: string}&StripeObject), mobilepay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), multibanco?: (object{setup_future_usage?: string}&StripeObject), naver_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), nz_bank_account?: (object{setup_future_usage?: string, target_date?: string}&StripeObject), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&StripeObject), p24?: (object{setup_future_usage?: string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{capture_method?: string}&StripeObject), paynow?: (object{setup_future_usage?: string}&StripeObject), paypal?: (object{capture_method?: string, line_items?: (object{category?: string, description?: string, name: string, quantity: int, sku?: string, sold_by?: string, tax?: (object{amount: int, behavior: string}&StripeObject), unit_amount: int}&StripeObject)[], preferred_locale: null|string, reference: null|string, reference_id?: null|string, setup_future_usage?: string, subsellers?: string[]}&StripeObject), paypay?: (object{}&StripeObject), 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}&StripeObject), setup_future_usage?: string}&StripeObject), pix?: (object{amount_includes_iof?: string, expires_after_seconds: null|int, expires_at: null|int, mandate_options?: (object{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}&StripeObject), setup_future_usage?: string}&StripeObject), promptpay?: (object{setup_future_usage?: string}&StripeObject), qris?: (object{setup_future_usage?: string}&StripeObject), rechnung?: (object{}&StripeObject), revolut_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), samsung_pay?: (object{capture_method?: string}&StripeObject), satispay?: (object{capture_method?: string}&StripeObject), scalapay?: (object{capture_method?: string}&StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject), setup_future_usage?: string, target_date?: string}&StripeObject), shopeepay?: (object{setup_future_usage?: string}&StripeObject), sofort?: (object{preferred_language: null|string, setup_future_usage?: string}&StripeObject), stripe_balance?: (object{setup_future_usage?: string}&StripeObject), swish?: (object{reference: null|string, setup_future_usage?: string}&StripeObject), twint?: (object{setup_future_usage?: string}&StripeObject), upi?: (object{setup_future_usage?: string}&StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[], institution?: string}&StripeObject), manual_entry?: (object{mode?: string}&StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&StripeObject), mandate_options?: (object{collection_method?: string}&StripeObject), setup_future_usage?: string, target_date?: string, transaction_purpose?: string, verification_method?: string}&StripeObject), wechat_pay?: (object{app_id: null|string, client: null|string, setup_future_usage?: string}&StripeObject), zip?: (object{setup_future_usage?: string}&StripeObject)}&StripeObject) $payment_method_options Payment-method-specific configuration for this PaymentIntent.
+ * @property null|(object{acss_debit?: (object{mandate_options?: (object{custom_mandate_url?: string, interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&StripeObject), setup_future_usage?: string, target_date?: string, verification_method?: string}&StripeObject), affirm?: (object{capture_method?: string, preferred_locale?: string, setup_future_usage?: string}&StripeObject), afterpay_clearpay?: (object{capture_method?: string, reference: null|string, setup_future_usage?: string}&StripeObject), alipay?: (object{setup_future_usage?: string}&StripeObject), alma?: (object{capture_method?: string}&StripeObject), amazon_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), au_becs_debit?: (object{setup_future_usage?: string, target_date?: string}&StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject), setup_future_usage?: string, target_date?: string}&StripeObject), bancontact?: (object{preferred_language: string, setup_future_usage?: string}&StripeObject), billie?: (object{capture_method?: string}&StripeObject), bizum?: (object{}&StripeObject), blik?: (object{setup_future_usage?: string}&StripeObject), boleto?: (object{expires_after_days: int, setup_future_usage?: string}&StripeObject), card?: (object{capture_method?: string, installments: null|(object{available_plans: null|((object{count: null|int, interval: null|string, type: string}&StripeObject))[], enabled: bool, plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), mandate_options: null|(object{amount: int, amount_type: string, description: null|string, end_date: null|int, interval: string, interval_count: null|int, reference: string, start_date: int, supported_types: null|string[]}&StripeObject), network: null|string, request_decremental_authorization?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_partial_authorization?: string, request_three_d_secure: null|string, require_cvc_recollection?: bool, setup_future_usage?: string, statement_descriptor_suffix_kana?: string, statement_descriptor_suffix_kanji?: string, statement_details?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}&StripeObject), phone?: string}&StripeObject)}&StripeObject), card_present?: (object{capture_method?: string, request_extended_authorization: null|bool, request_incremental_authorization_support: null|bool, routing?: (object{requested_priority: null|string}&StripeObject)}&StripeObject), cashapp?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), crypto?: (object{setup_future_usage?: string}&StripeObject), customer_balance?: (object{bank_transfer?: (object{eu_bank_transfer?: (object{country: string}&StripeObject), requested_address_types?: string[], type: null|string}&StripeObject), funding_type: null|string, setup_future_usage?: string}&StripeObject), eps?: (object{setup_future_usage?: string}&StripeObject), fpx?: (object{setup_future_usage?: string}&StripeObject), giropay?: (object{setup_future_usage?: string}&StripeObject), gopay?: (object{setup_future_usage?: string}&StripeObject), grabpay?: (object{setup_future_usage?: string}&StripeObject), id_bank_transfer?: (object{expires_after?: null|int, expires_at: null|int, setup_future_usage?: string}&StripeObject), ideal?: (object{setup_future_usage?: string}&StripeObject), interac_present?: (object{}&StripeObject), kakao_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), klarna?: (object{capture_method?: string, preferred_locale: null|string, setup_future_usage?: string}&StripeObject), konbini?: (object{confirmation_number: null|string, expires_after_days: null|int, expires_at: null|int, product_description: null|string, setup_future_usage?: string}&StripeObject), kr_card?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), link?: (object{capture_method?: string, persistent_token: null|string, setup_future_usage?: string}&StripeObject), mb_way?: (object{setup_future_usage?: string}&StripeObject), mobilepay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), multibanco?: (object{setup_future_usage?: string}&StripeObject), naver_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), nz_bank_account?: (object{setup_future_usage?: string, target_date?: string}&StripeObject), oxxo?: (object{expires_after_days: int, setup_future_usage?: string}&StripeObject), p24?: (object{setup_future_usage?: string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{capture_method?: string}&StripeObject), paynow?: (object{setup_future_usage?: string}&StripeObject), paypal?: (object{capture_method?: string, line_items?: (object{category?: string, description?: string, name: string, quantity: int, sku?: string, sold_by?: string, tax?: (object{amount: int, behavior: string}&StripeObject), unit_amount: int}&StripeObject)[], preferred_locale: null|string, reference: null|string, reference_id?: null|string, setup_future_usage?: string, subsellers?: string[]}&StripeObject), paypay?: (object{}&StripeObject), 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}&StripeObject), setup_future_usage?: string}&StripeObject), pix?: (object{amount_includes_iof?: string, expires_after_seconds: null|int, expires_at: null|int, mandate_options?: (object{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}&StripeObject), setup_future_usage?: string}&StripeObject), promptpay?: (object{setup_future_usage?: string}&StripeObject), qris?: (object{setup_future_usage?: string}&StripeObject), rechnung?: (object{}&StripeObject), revolut_pay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), samsung_pay?: (object{capture_method?: string}&StripeObject), satispay?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), scalapay?: (object{capture_method?: string}&StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject), setup_future_usage?: string, target_date?: string}&StripeObject), shopeepay?: (object{setup_future_usage?: string}&StripeObject), sofort?: (object{preferred_language: null|string, setup_future_usage?: string}&StripeObject), stripe_balance?: (object{setup_future_usage?: string}&StripeObject), sunbit?: (object{capture_method?: string, setup_future_usage?: string}&StripeObject), swish?: (object{reference: null|string, setup_future_usage?: string}&StripeObject), twint?: (object{setup_future_usage?: string}&StripeObject), upi?: (object{setup_future_usage?: string}&StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[], institution?: string}&StripeObject), manual_entry?: (object{mode?: string}&StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&StripeObject), mandate_options?: (object{collection_method?: string}&StripeObject), setup_future_usage?: string, target_date?: string, transaction_purpose?: string, verification_method?: string}&StripeObject), wechat_pay?: (object{app_id: null|string, client: null|string, setup_future_usage?: string}&StripeObject), zip?: (object{setup_future_usage?: string}&StripeObject)}&StripeObject) $payment_method_options Payment-method-specific configuration for this PaymentIntent.
* @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found here.
* @property null|(object{presentment_amount: int, presentment_currency: string}&StripeObject) $presentment_details
* @property null|(object{card?: (object{customer_notification?: (object{approval_requested: null|bool, completes_at: null|int}&StripeObject)}&StripeObject), type: string}&StripeObject) $processing If present, this property tells you about the processing state of the payment.
* @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
+ * @property null|(object{status: string}&StripeObject) $redaction Redaction status of this PaymentIntent. If the PaymentIntent isn't redacted, this field is null.
* @property null|Review|string $review ID of the review associated with this PaymentIntent, if any.
* @property null|string $secret_key_confirmation Indicates whether confirmation for this PaymentIntent using a secret key is required or optional.
* @property null|string $setup_future_usage Indicates that you intend to make future payments with this PaymentIntent's payment method.
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still attach the payment method to a Customer after the transaction completes.
If the payment method is card_present and isn't a digital wallet, Stripe creates and attaches a generated_card payment method representing the card to the Customer instead.
When processing card payments, Stripe uses setup_future_usage to help you comply with regional legislation and network rules, such as SCA.
confirm=true.
*
- * @param null|array{amount: int, amount_details?: array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, surcharge?: null|array{amount?: null|int, enforce_validation?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: int, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, capture_method?: string, confirm?: bool, confirmation_method?: string, confirmation_token?: string, currency: string, customer?: string, customer_account?: string, description?: string, error_on_requires_action?: bool, excluded_payment_method_types?: string[], expand?: string[], fx_quote?: string, hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, mandate?: string, mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: arraytrue. If the object exists in test mode, the value is false.
* @property 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|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), 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}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), billing_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject), bizum?: (object{transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: null|string}&StripeObject), card?: (object{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}&StripeObject), country: null|string, description: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin: null|string, installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer: null|string, last4: null|string, moto?: null|bool, network: null|string, network_advice_code: null|string, network_decline_code: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, stored_credential_usage: null|string, three_d_secure: null|(object{authentication_flow: null|string, cryptogram: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied: null|bool, result: null|string, result_reason: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{type: string}&StripeObject), dynamic_last4?: string, google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), custom?: (object{display_name: string, type: null|string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), gopay?: (object{}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), id_bank_transfer?: (object{account_number: string, bank: string, bank_code?: string, bank_name?: string, display_name?: string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{location?: string, payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string, reader?: string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), payment_method: null|string, paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), 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}&StripeObject), shipping?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), 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}&StripeObject), verified_email?: null|string, verified_name?: null|string}&StripeObject), paypay?: (object{}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string, mandate?: string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), qris?: (object{}&StripeObject), rechnung?: (object{payment_portal_url: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), scalapay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), shopeepay?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), stripe_balance?: (object{account?: null|string}&StripeObject), sunbit?: (object{transaction_id: null|string}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{mandate?: string}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Information about the Payment Method debited for this payment.
+ * @property null|(object{ach_credit_transfer?: (object{account_number: null|string, bank_name: null|string, routing_number: null|string, swift_code: null|string}&StripeObject), 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}&StripeObject), acss_debit?: (object{bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, institution_number: null|string, last4: null|string, mandate?: string, transit_number: null|string}&StripeObject), affirm?: (object{location?: string, reader?: string, transaction_id: null|string}&StripeObject), afterpay_clearpay?: (object{order_id: null|string, reference: null|string}&StripeObject), alipay?: (object{buyer_id?: string, fingerprint: null|string, transaction_id: null|string}&StripeObject), alma?: (object{installments?: (object{count: int}&StripeObject), transaction_id: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), au_becs_debit?: (object{bsb_number: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: string}&StripeObject), bacs_debit?: (object{expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string, sort_code: null|string}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), billie?: (object{transaction_id: null|string}&StripeObject), billing_details: null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject), bizum?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), blik?: (object{buyer_id: null|string}&StripeObject), boleto?: (object{tax_id: null|string}&StripeObject), card?: (object{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}&StripeObject), country: null|string, description?: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin?: null|string, installments: null|(object{plan: null|(object{count: null|int, interval: null|string, type: string}&StripeObject)}&StripeObject), issuer?: null|string, last4: null|string, moto?: null|bool, network: null|string, network_advice_code: null|string, network_decline_code: null|string, network_token?: null|(object{used: bool}&StripeObject), network_transaction_id: null|string, three_d_secure: null|(object{authentication_flow: null|string, cryptogram: null|string, electronic_commerce_indicator: null|string, exemption_indicator: null|string, exemption_indicator_applied: null|bool, result: null|string, result_reason: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{type: string}&StripeObject), dynamic_last4?: string, google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string, transaction_id: null|string}&StripeObject), crypto?: (object{buyer_address?: string, network?: string, token_currency?: string, transaction_hash?: string}&StripeObject), custom?: (object{display_name: string, type: null|string}&StripeObject), customer_balance?: (object{}&StripeObject), eps?: (object{bank: null|string, verified_name: null|string}&StripeObject), fpx?: (object{account_holder_type: null|string, bank: string, transaction_id: null|string}&StripeObject), giropay?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, verified_name: null|string}&StripeObject), gopay?: (object{}&StripeObject), grabpay?: (object{transaction_id: null|string}&StripeObject), id_bank_transfer?: (object{account_number: string, bank: string, bank_code?: string, bank_name?: string, display_name?: string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, transaction_id: null|string, verified_name: null|string}&StripeObject), 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, location?: string, network: null|string, network_transaction_id: null|string, preferred_locales: null|string[], read_method: null|string, reader?: 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}&StripeObject)}&StripeObject), kakao_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), klarna?: (object{location?: string, payer_details: null|(object{address: null|(object{country: null|string}&StripeObject)}&StripeObject), payment_method_category: null|string, preferred_locale: null|string, reader?: string}&StripeObject), konbini?: (object{store: null|(object{chain: null|string}&StripeObject)}&StripeObject), kr_card?: (object{brand: null|string, buyer_id: null|string, last4: null|string, transaction_id: null|string}&StripeObject), link?: (object{country: null|string}&StripeObject), mb_way?: (object{}&StripeObject), mobilepay?: (object{card: null|(object{brand: null|string, country: null|string, exp_month: null|int, exp_year: null|int, last4: null|string}&StripeObject)}&StripeObject), multibanco?: (object{entity: null|string, reference: null|string}&StripeObject), naver_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, expected_debit_date?: string, last4: string, suffix: null|string}&StripeObject), oxxo?: (object{number: null|string}&StripeObject), p24?: (object{bank: null|string, reference: null|string, verified_name: null|string}&StripeObject), pay_by_bank?: (object{}&StripeObject), payco?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), payment_method: null|string, paynow?: (object{location?: string, reader?: string, reference: null|string}&StripeObject), 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}&StripeObject), shipping?: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), 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}&StripeObject), verified_email?: null|string, verified_name?: null|string}&StripeObject), paypay?: (object{}&StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, mandate?: string, pay_id: null|string}&StripeObject), pix?: (object{bank_transaction_id?: null|string, mandate?: string}&StripeObject), promptpay?: (object{reference: null|string}&StripeObject), qris?: (object{}&StripeObject), rechnung?: (object{payment_portal_url: null|string}&StripeObject), 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}&StripeObject), type: null|string}&StripeObject), transaction_id: null|string}&StripeObject), samsung_pay?: (object{buyer_id: null|string, transaction_id: null|string}&StripeObject), satispay?: (object{transaction_id: null|string}&StripeObject), scalapay?: (object{transaction_id: null|string}&StripeObject), sepa_credit_transfer?: (object{bank_name: null|string, bic: null|string, iban: null|string}&StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate: null|string}&StripeObject), shopeepay?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, country: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_account?: (object{}&StripeObject), stripe_balance?: (object{account?: null|string}&StripeObject), sunbit?: (object{transaction_id: null|string}&StripeObject), swish?: (object{fingerprint: null|string, payment_reference: null|string, verified_phone_last4: null|string}&StripeObject), twint?: (object{mandate?: string}&StripeObject), type: string, upi?: (object{vpa: null|string}&StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_type: null|string, bank_name: null|string, expected_debit_date?: string, fingerprint: null|string, last4: null|string, mandate?: Mandate|string, payment_reference: null|string, routing_number: null|string}&StripeObject), wechat?: (object{}&StripeObject), wechat_pay?: (object{fingerprint: null|string, location?: string, reader?: string, transaction_id: null|string}&StripeObject), zip?: (object{}&StripeObject)}&StripeObject) $payment_method_details Information about the Payment Method debited for this payment.
* @property (object{custom?: (object{payment_reference: null|string}&StripeObject), type: string}&StripeObject) $processor_details Processor information associated with this payment.
* @property string $reported_by Indicates who reported the payment.
* @property null|(object{address: (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), name: null|string, phone: null|string}&StripeObject) $shipping_details Shipping information for this payment.
diff --git a/lib/Reserve/Hold.php b/lib/Reserve/Hold.php
index 33aee93cb..fb4950ecf 100644
--- a/lib/Reserve/Hold.php
+++ b/lib/Reserve/Hold.php
@@ -18,6 +18,7 @@
* @property bool $livemode If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property string $reason The reason for the ReserveHold.
+ * @property null|(object{amount: int, reserve_release: string}&\Stripe\StripeObject)[] $release_details List of ReserveReleases and the amounts released from this ReserveHold.
* @property (object{release_after: null|int, scheduled_release: null|int}&\Stripe\StripeObject) $release_schedule
* @property null|Plan|string $reserve_plan The ReservePlan which produced this ReserveHold (i.e., resplan_123)
* @property null|string|\Stripe\Charge $source_charge The Charge which funded this ReserveHold (e.g., ch_123)
diff --git a/lib/Service/BalanceTransactionService.php b/lib/Service/BalanceTransactionService.php
index d00ea6c6a..1877d61f2 100644
--- a/lib/Service/BalanceTransactionService.php
+++ b/lib/Service/BalanceTransactionService.php
@@ -13,11 +13,11 @@ class BalanceTransactionService extends AbstractService
{
/**
* Returns a list of transactions that have contributed to the Stripe account
- * balance (e.g., charges, transfers, and so forth). The transactions are returned
- * in sorted order, with the most recent transactions appearing first.
+ * balance (for example, charges, transfers, and so on). The transactions return in
+ * sorted order, with the most recent transactions appearing first.
*
- * Note that this endpoint was previously called “Balance history” and used the
- * path /v1/balance/history.
+ * The previous name of this endpoint was “Balance history,” and it used the path
+ * /v1/balance/history.
*
* @param null|array{created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, payout?: string, source?: string, starting_after?: string, type?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
diff --git a/lib/Service/Checkout/SessionService.php b/lib/Service/Checkout/SessionService.php
index 73ebde192..8f3ce9d6b 100644
--- a/lib/Service/Checkout/SessionService.php
+++ b/lib/Service/Checkout/SessionService.php
@@ -48,7 +48,7 @@ public function allLineItems($id, $params = null, $opts = null)
/**
* Creates a Checkout 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, branding_settings?: array{background_color?: null|string, border_style?: null|string, button_color?: null|string, display_name?: string, font_family?: null|string, icon?: array{file?: string, type: string, url?: string}, logo?: array{file?: string, type: string, url?: 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_account?: string, customer_creation?: string, customer_email?: string, customer_update?: array{address?: string, name?: string, shipping?: string}, discounts?: (array{coupon?: string, coupon_data?: array{amount_off?: int, currency?: string, duration?: string, metadata?: null|arraypost_payment_credit_notes_amount, or both, depending on the
* invoice’s amount_remaining at the time of credit note creation.
*
+ * For invoices that also have refunds created through the Refund API, the credit note API subtracts those
+ * refund amounts from the maximum creditable amount. This prevents the combined
+ * credit notes and refunds from exceeding the invoice amount. If you use both,
+ * ensure the combined total does not exceed the invoice’s paid amount.
+ *
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, metadata?: arraySession. The session’s client_secret can be used to
* launch the flow using Stripe.js.
*
- * @param null|array{account_holder?: array{account?: string, customer?: string, customer_account?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[], institution?: string}, hosted?: array{delivery_method?: string}, limits?: array{accounts: int}, manual_entry?: array{mode?: string}, permissions: string[], prefetch?: string[], relink_options?: array{account?: string, authorization: string}, return_url?: string, ui_mode?: string} $params
+ * @param null|array{account_holder?: array{account?: string, customer?: string, customer_account?: string, type: string}, expand?: string[], filters?: array{account_subcategories?: string[], countries?: string[], institution?: string}, hosted?: array{delivery_method?: string}, limits?: array{accounts: null|int}, manual_entry?: array{mode?: string}, permissions: string[], prefetch?: string[], relink_options?: array{account?: string, authorization: string}, return_url?: string, ui_mode?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\FinancialConnections\Session
diff --git a/lib/Service/InvoiceService.php b/lib/Service/InvoiceService.php
index 1c27a2ab5..df4e5a858 100644
--- a/lib/Service/InvoiceService.php
+++ b/lib/Service/InvoiceService.php
@@ -139,7 +139,7 @@ public function create($params = null, $opts = null)
* invoice creation. Learn
* more
*
- * @param null|array{automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, currency?: string, customer?: string, customer_account?: string, customer_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, tax?: array{ip_address?: null|string}, tax_exempt?: null|string, tax_ids?: array{type: string, value: string}[]}, discounts?: null|array{coupon?: string, discount?: string, discount_end?: array{duration?: array{interval: string, interval_count: int}, timestamp?: int, type: string}, promotion_code?: string}[], expand?: string[], invoice_items?: (array{amount?: int, currency?: string, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, discount_end?: array{duration?: array{interval: string, interval_count: int}, timestamp?: int, type: string}, promotion_code?: string}[], invoiceitem?: string, metadata?: null|arraycanceled state.
*
* @param string $id
- * @param null|array{amount_details?: null|array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, surcharge?: null|array{amount?: null|int, enforce_validation?: null|string}, tax?: null|array{total_tax_amount: int}}, amount_to_confirm?: int, application_fee_amount?: null|int, capture_method?: string, confirmation_token?: string, error_on_requires_action?: bool, excluded_payment_method_types?: null|string[], expand?: string[], fx_quote?: string, hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, mandate?: string, mandate_data?: null|array{customer_acceptance?: array{accepted_at?: int, offline?: array{}, online?: array{ip_address?: string, user_agent?: string}, type: string}}, off_session?: array|bool|string, payment_details?: null|array{car_rental?: array{affiliate?: array{name: string}, booking_number: string, car_class_code?: string, car_make?: string, car_model?: string, company?: string, customer_service_phone_number?: string, days_rented: int, delivery?: array{mode?: string, recipient?: array{email?: string, name?: string, phone?: string}}, distance?: array{amount?: int, unit?: string}, drivers?: array{driver_identification_number?: string, driver_tax_number?: string, name: string}[], extra_charges?: string[], no_show?: bool, pickup_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, pickup_at: int, pickup_location_name?: string, rate_amount?: int, rate_interval?: string, renter_name?: string, return_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, return_at: int, return_location_name?: string, tax_exempt?: bool, vehicle_identification_number?: string}, car_rental_data?: null|array{affiliate?: array{code?: string, name?: string}, booking_number?: string, carrier_name?: string, customer_service_phone_number?: string, days_rented?: int, distance?: array{amount: int, unit: string}, drivers?: array{date_of_birth?: array{day: int, month: int, year: int}, driver_identification_number?: string, driver_tax_number?: string, name: string}[], drop_off: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, location_name?: string, time: int}, insurances?: array{amount: int, currency?: string, insurance_company_name?: string, insurance_type: string}[], no_show_indicator?: bool, pickup: array{address: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, location_name?: string, time: int}, renter_name?: string, total: array{amount: int, currency?: string, discounts?: array{corporate_client_code?: string, coupon?: string, maximum_free_miles_or_kilometers?: int}, extra_charges?: array{amount: int, type: string}[], rate_per_unit?: int, rate_unit?: string, tax?: array{tax_exempt_indicator?: bool, taxes?: array{amount?: int, rate?: int, type?: string}[]}}, vehicle?: array{make?: string, model?: string, odometer?: int, type?: string, vehicle_class?: string, vehicle_identification_number?: string}}[], customer_reference?: null|string, event_details?: array{access_controlled_venue?: bool, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, affiliate?: array{name: string}, company?: string, delivery?: array{mode?: string, recipient?: array{email?: string, name?: string, phone?: string}}, ends_at?: int, genre?: string, name: string, starts_at?: int}, flight?: array{affiliate?: array{name: string}, agency_number?: string, carrier?: string, delivery?: array{mode?: string, recipient?: array{email?: string, name?: string, phone?: string}}, passenger_name?: string, passengers?: array{name: string}[], segments: array{amount?: int, arrival_airport?: string, arrives_at?: int, carrier?: string, departs_at: int, departure_airport?: string, flight_number?: string, service_class?: string}[], ticket_number?: string}, flight_data?: null|array{affiliate?: array{code?: string, name?: string, travel_authorization_code?: string}, booking_number?: string, computerized_reservation_system?: string, endorsements_and_restrictions?: string, insurances?: array{amount: int, currency?: string, insurance_company_name?: string, insurance_type: string}[], passengers?: array{name: string}[], segments: array{amount?: int, arrival: array{airport: string, arrives_at?: int, city?: string, country?: string}, carrier_code: string, carrier_name?: string, currency?: string, departure: array{airport: string, city?: string, country?: string, departs_at: int}, exchange_ticket_number?: string, fare_basis_code?: string, fees?: int, flight_number?: string, is_stop_over_indicator?: bool, refundable?: bool, service_class: string, tax_amount?: int, ticket_number?: string}[], ticket_electronically_issued_indicator?: bool, total: array{amount: int, credit_reason?: string, currency?: string, discounts?: array{corporate_client_code?: string}, extra_charges?: array{amount?: int, type?: string}[], tax?: array{taxes?: array{amount?: int, rate?: int, type?: string}[]}}, transaction_type?: string}[], lodging?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, adults?: int, affiliate?: array{name: string}, booking_number?: string, category?: string, checkin_at: int, checkout_at: int, customer_service_phone_number?: string, daily_room_rate_amount?: int, delivery?: array{mode?: string, recipient?: array{email?: string, name?: string, phone?: string}}, extra_charges?: string[], fire_safety_act_compliance?: bool, name?: string, no_show?: bool, number_of_rooms?: int, passengers?: array{name: string}[], property_phone_number?: string, room_class?: string, room_nights?: int, total_room_tax_amount?: int, total_tax_amount?: int}, lodging_data?: null|array{accommodation?: array{accommodation_type?: string, bed_type?: string, daily_rate_amount?: int, nights?: int, number_of_rooms?: int, rate_type?: string, smoking_indicator?: bool}, affiliate?: array{code?: string, name?: string}, booking_number?: string, checkin_at: int, checkout_at: int, customer_service_phone_number?: string, fire_safety_act_compliance_indicator?: bool, guests?: array{name: string}[], host?: array{address?: array{city: string, country: string, line1: string, line2?: string, postal_code: string, state?: string}, country_of_domicile?: string, host_reference?: string, host_type?: string, name?: string, number_of_reservations?: int, property_phone_number?: string, registered_at?: int}, insurances?: array{amount: int, currency?: string, insurance_company_name?: string, insurance_type: string}[], no_show_indicator?: bool, renter_id_number?: string, renter_name?: string, total: array{amount: int, cash_advances?: int, currency?: string, discounts?: array{corporate_client_code?: string, coupon?: string}, extra_charges?: array{amount?: int, type?: string}[], prepaid_amount?: int, tax?: array{tax_exempt_indicator?: bool, taxes?: array{amount?: int, rate?: int, type?: string}[]}}}[], order_reference?: null|string, subscription?: array{affiliate?: array{name: string}, auto_renewal?: bool, billing_interval?: array{count: int, interval: string}, ends_at?: int, name: string, starts_at?: int}}, payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, bizum?: array{}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, crypto?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, gopay?: array{}, grabpay?: array{}, id_bank_transfer?: array{bank?: string}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, mb_way?: array{}, metadata?: arrayconfirm=true.
*
- * @param null|array{amount: int, amount_details?: array{discount_amount?: null|int, enforce_arithmetic_validation?: bool, line_items?: null|array{discount_amount?: int, payment_method_options?: array{card?: array{commodity_code?: string}, card_present?: array{commodity_code?: string}, klarna?: array{image_url?: string, product_url?: string, reference?: string, subscription_reference?: string}, paypal?: array{category?: string, description?: string, sold_by?: string}}, product_code?: string, product_name: string, quantity: int, tax?: array{total_tax_amount: int}, unit_cost: int, unit_of_measure?: string}[], shipping?: null|array{amount?: null|int, from_postal_code?: null|string, to_postal_code?: null|string}, surcharge?: null|array{amount?: null|int, enforce_validation?: null|string}, tax?: null|array{total_tax_amount: int}}, application_fee_amount?: int, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, capture_method?: string, confirm?: bool, confirmation_method?: string, confirmation_token?: string, currency: string, customer?: string, customer_account?: string, description?: string, error_on_requires_action?: bool, excluded_payment_method_types?: string[], expand?: string[], fx_quote?: string, hooks?: array{inputs?: array{tax?: array{calculation: null|string}}}, mandate?: string, mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: arrayinvoice_now and prorate are both set to true.
+ * invoice_now and prorate are both set to false.
*
* By default, upon subscription cancellation, Stripe stops automatic collection of
* all finalized invoices for the customer. This is intended to prevent unexpected
@@ -75,7 +75,7 @@ public function cancel($id, $params = null, $opts = null)
* schedules instead. Schedules provide the flexibility to model more complex
* billing configurations that change over time.
*
- * @param null|array{add_invoice_items?: (array{discountable?: bool, discounts?: array{coupon?: string, discount?: string, discount_end?: array{duration?: array{interval: string, interval_count: int}, timestamp?: int, type: string}, promotion_code?: string}[], metadata?: arraytrue. If the object exists in test mode, the value is false.
* @property null|Account|string $on_behalf_of The value of on_behalf_of on the SetupIntent at the time of this confirmation.
* @property PaymentMethod|string $payment_method ID of the payment method used with this SetupAttempt.
- * @property (object{acss_debit?: (object{}&StripeObject), amazon_pay?: (object{}&StripeObject), au_becs_debit?: (object{}&StripeObject), bacs_debit?: (object{}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), boleto?: (object{}&StripeObject), card?: (object{brand: null|string, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, moto?: bool, network: null|string, three_d_secure: null|(object{authentication_flow: null|string, electronic_commerce_indicator: null|string, result: null|string, result_reason: null|string, transaction_id: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{}&StripeObject), google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), card_present?: (object{generated_card: null|PaymentMethod|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject)}&StripeObject), cashapp?: (object{}&StripeObject), id_bank_transfer?: (object{bank: null|string, bank_code: null|string, bank_name: null|string, display_name: null|string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, verified_name: null|string}&StripeObject), kakao_pay?: (object{}&StripeObject), klarna?: (object{}&StripeObject), kr_card?: (object{}&StripeObject), link?: (object{}&StripeObject), naver_pay?: (object{buyer_id?: string}&StripeObject), nz_bank_account?: (object{}&StripeObject), paypal?: (object{}&StripeObject), payto?: (object{}&StripeObject), pix?: (object{}&StripeObject), revolut_pay?: (object{}&StripeObject), sepa_debit?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_balance?: (object{}&StripeObject), twint?: (object{}&StripeObject), type: string, upi?: (object{}&StripeObject), us_bank_account?: (object{}&StripeObject)}&StripeObject) $payment_method_details
+ * @property (object{acss_debit?: (object{}&StripeObject), amazon_pay?: (object{}&StripeObject), au_becs_debit?: (object{}&StripeObject), bacs_debit?: (object{}&StripeObject), bancontact?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), boleto?: (object{}&StripeObject), card?: (object{brand: null|string, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, exp_month: null|int, exp_year: null|int, fingerprint?: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, moto?: bool, network: null|string, three_d_secure: null|(object{authentication_flow: null|string, electronic_commerce_indicator: null|string, result: null|string, result_reason: null|string, transaction_id: null|string, version: null|string}&StripeObject), wallet: null|(object{apple_pay?: (object{}&StripeObject), google_pay?: (object{}&StripeObject), type: string}&StripeObject)}&StripeObject), card_present?: (object{generated_card: null|PaymentMethod|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject)}&StripeObject), cashapp?: (object{}&StripeObject), id_bank_transfer?: (object{bank: null|string, bank_code: null|string, bank_name: null|string, display_name: null|string}&StripeObject), ideal?: (object{bank: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, verified_name: null|string}&StripeObject), kakao_pay?: (object{}&StripeObject), klarna?: (object{}&StripeObject), kr_card?: (object{}&StripeObject), link?: (object{}&StripeObject), naver_pay?: (object{buyer_id?: string}&StripeObject), nz_bank_account?: (object{}&StripeObject), paypal?: (object{}&StripeObject), payto?: (object{}&StripeObject), pix?: (object{fingerprint?: null|string}&StripeObject), revolut_pay?: (object{}&StripeObject), satispay?: (object{}&StripeObject), sepa_debit?: (object{}&StripeObject), sofort?: (object{bank_code: null|string, bank_name: null|string, bic: null|string, generated_sepa_debit: null|PaymentMethod|string, generated_sepa_debit_mandate: null|Mandate|string, iban_last4: null|string, preferred_language: null|string, verified_name: null|string}&StripeObject), stripe_balance?: (object{}&StripeObject), twint?: (object{}&StripeObject), type: string, upi?: (object{}&StripeObject), us_bank_account?: (object{}&StripeObject)}&StripeObject) $payment_method_details
* @property null|(object{advice_code?: string, charge?: string, code?: string, decline_code?: string, doc_url?: string, message?: string, network_advice_code?: string, network_decline_code?: string, param?: string, payment_intent?: PaymentIntent, payment_method?: PaymentMethod, payment_method_type?: string, request_log_url?: string, setup_intent?: SetupIntent, source?: Account|BankAccount|Card|Source, type: string}&StripeObject) $setup_error The error encountered during this attempt to confirm the SetupIntent, if any.
* @property SetupIntent|string $setup_intent ID of the SetupIntent that this attempt belongs to.
* @property string $status Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned.
diff --git a/lib/SetupIntent.php b/lib/SetupIntent.php
index b89fe7a6d..3347be6e3 100644
--- a/lib/SetupIntent.php
+++ b/lib/SetupIntent.php
@@ -52,6 +52,7 @@
* @property null|(object{id: string, parent: null|string}&StripeObject) $payment_method_configuration_details Information about the payment method configuration used for this Setup Intent.
* @property null|(object{acss_debit?: (object{currency: null|string, mandate_options?: (object{custom_mandate_url?: string, default_for?: string[], interval_description: null|string, payment_schedule: null|string, transaction_type: null|string}&StripeObject), verification_method?: string}&StripeObject), amazon_pay?: (object{}&StripeObject), bacs_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject)}&StripeObject), bizum?: (object{}&StripeObject), card?: (object{mandate_options: null|(object{amount: int, amount_type: string, currency: string, description: null|string, end_date: null|int, interval: string, interval_count: null|int, reference: string, start_date: int, supported_types: null|string[]}&StripeObject), network: null|string, request_three_d_secure: null|string}&StripeObject), card_present?: (object{}&StripeObject), klarna?: (object{currency: null|string, preferred_locale: null|string}&StripeObject), link?: (object{persistent_token: null|string}&StripeObject), paypal?: (object{billing_agreement_id: null|string, currency?: null|string, subsellers?: string[]}&StripeObject), 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}&StripeObject)}&StripeObject), pix?: (object{mandate_options?: (object{amount?: int, amount_includes_iof?: string, amount_type?: string, currency?: string, end_date?: string, payment_schedule?: string, reference?: string, start_date?: string}&StripeObject)}&StripeObject), sepa_debit?: (object{mandate_options?: (object{reference_prefix?: string}&StripeObject)}&StripeObject), upi?: (object{mandate_options?: (object{amount: null|int, amount_type: null|string, description: null|string, end_date: null|int}&StripeObject)}&StripeObject), us_bank_account?: (object{financial_connections?: (object{filters?: (object{account_subcategories?: string[], institution?: string}&StripeObject), manual_entry?: (object{mode?: string}&StripeObject), permissions?: string[], prefetch: null|string[], return_url?: string}&StripeObject), mandate_options?: (object{collection_method?: string}&StripeObject), verification_method?: string}&StripeObject)}&StripeObject) $payment_method_options Payment method-specific configuration for this SetupIntent.
* @property string[] $payment_method_types The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found here.
+ * @property null|(object{status: string}&StripeObject) $redaction Redaction status of this SetupIntent. If the SetupIntent isn't redacted, this field is null.
* @property null|Mandate|string $single_use_mandate ID of the single_use Mandate generated by the SetupIntent.
* @property string $status Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.
* @property string $usage Indicates how the payment method is intended to be used in the future.
Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.
true. If the object exists in test mode, the value is false.
- * @property null|(object{acss_debit?: (object{account_number?: null|string, bank_name: null|string, fingerprint: null|string, institution_number: null|string, last4: null|string, transit_number: null|string}&\Stripe\StripeObject), affirm?: (object{}&\Stripe\StripeObject), afterpay_clearpay?: (object{}&\Stripe\StripeObject), alipay?: (object{}&\Stripe\StripeObject), alma?: (object{}&\Stripe\StripeObject), amazon_pay?: (object{}&\Stripe\StripeObject), au_becs_debit?: (object{bsb_number: null|string, fingerprint: null|string, last4: null|string}&\Stripe\StripeObject), bacs_debit?: (object{fingerprint: null|string, last4: null|string, sort_code: null|string}&\Stripe\StripeObject), bancontact?: (object{}&\Stripe\StripeObject), billie?: (object{}&\Stripe\StripeObject), billing_details: null|(object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), email: null|string, name: null|string, phone: null|string, tax_id: null|string}&\Stripe\StripeObject), bizum?: (object{}&\Stripe\StripeObject), blik?: (object{}&\Stripe\StripeObject), boleto?: (object{tax_id: string}&\Stripe\StripeObject), card?: (object{brand: string, checks?: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&\Stripe\StripeObject), country: null|string, description?: null|string, display_brand: null|string, exp_month: int, exp_year: int, fingerprint?: null|string, funding: string, iin?: null|string, issuer?: null|string, last4: string, networks: null|(object{available: string[], preferred: null|string}&\Stripe\StripeObject), wallet: null|(object{amex_express_checkout?: (object{}&\Stripe\StripeObject), apple_pay?: (object{}&\Stripe\StripeObject), dynamic_last4: null|string, google_pay?: (object{}&\Stripe\StripeObject), link?: (object{}&\Stripe\StripeObject), 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), 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)}&\Stripe\StripeObject), samsung_pay?: (object{}&\Stripe\StripeObject), 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), 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)}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), card_present?: (object{brand: null|string, brand_product: null|string, cardholder_name: null|string, country: null|string, description?: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, networks: null|(object{available: string[], preferred: null|string}&\Stripe\StripeObject), offline: null|(object{stored_at: null|int, type: null|string}&\Stripe\StripeObject), preferred_locales: null|string[], read_method: null|string, wallet?: (object{type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string}&\Stripe\StripeObject), crypto?: (object{}&\Stripe\StripeObject), customer_balance?: (object{}&\Stripe\StripeObject), eps?: (object{bank: null|string}&\Stripe\StripeObject), fpx?: (object{account_holder_type: null|string, bank: string}&\Stripe\StripeObject), giropay?: (object{}&\Stripe\StripeObject), gopay?: (object{}&\Stripe\StripeObject), grabpay?: (object{}&\Stripe\StripeObject), id_bank_transfer?: (object{bank: null|string, bank_code: null|string, bank_name: null|string, display_name: null|string}&\Stripe\StripeObject), ideal?: (object{bank: null|string, bic: null|string}&\Stripe\StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, networks: null|(object{available: string[], preferred: null|string}&\Stripe\StripeObject), preferred_locales: null|string[], read_method: null|string}&\Stripe\StripeObject), kakao_pay?: (object{}&\Stripe\StripeObject), klarna?: (object{dob?: null|(object{day: null|int, month: null|int, year: null|int}&\Stripe\StripeObject)}&\Stripe\StripeObject), konbini?: (object{}&\Stripe\StripeObject), kr_card?: (object{brand: null|string, last4: null|string}&\Stripe\StripeObject), link?: (object{email: null|string, persistent_token?: string}&\Stripe\StripeObject), mb_way?: (object{}&\Stripe\StripeObject), mobilepay?: (object{}&\Stripe\StripeObject), multibanco?: (object{}&\Stripe\StripeObject), naver_pay?: (object{buyer_id: null|string, funding: string}&\Stripe\StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, last4: string, suffix: null|string}&\Stripe\StripeObject), oxxo?: (object{}&\Stripe\StripeObject), p24?: (object{bank: null|string}&\Stripe\StripeObject), pay_by_bank?: (object{}&\Stripe\StripeObject), payco?: (object{}&\Stripe\StripeObject), paynow?: (object{}&\Stripe\StripeObject), paypal?: (object{country: null|string, fingerprint?: null|string, payer_email: null|string, payer_id: null|string, verified_email?: null|string}&\Stripe\StripeObject), paypay?: (object{}&\Stripe\StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, pay_id: null|string}&\Stripe\StripeObject), pix?: (object{}&\Stripe\StripeObject), promptpay?: (object{}&\Stripe\StripeObject), qris?: (object{}&\Stripe\StripeObject), rechnung?: (object{dob?: (object{day: int, month: int, year: int}&\Stripe\StripeObject)}&\Stripe\StripeObject), revolut_pay?: (object{}&\Stripe\StripeObject), samsung_pay?: (object{}&\Stripe\StripeObject), satispay?: (object{}&\Stripe\StripeObject), scalapay?: (object{}&\Stripe\StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, fingerprint: null|string, generated_from: null|(object{charge: null|string|\Stripe\Charge, setup_attempt: null|string|\Stripe\SetupAttempt}&\Stripe\StripeObject), last4: null|string}&\Stripe\StripeObject), shopeepay?: (object{}&\Stripe\StripeObject), sofort?: (object{country: null|string}&\Stripe\StripeObject), stripe_balance?: (object{account?: null|string}&\Stripe\StripeObject), sunbit?: (object{}&\Stripe\StripeObject), swish?: (object{}&\Stripe\StripeObject), twint?: (object{}&\Stripe\StripeObject), type: string, upi?: (object{vpa: null|string}&\Stripe\StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_number?: null|string, account_type: null|string, bank_name: null|string, financial_connections_account: null|string, fingerprint: null|string, last4: null|string, networks: null|(object{preferred: null|string, supported: string[]}&\Stripe\StripeObject), routing_number: null|string, status_details: null|(object{blocked?: (object{network_code: null|string, reason: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), wechat_pay?: (object{}&\Stripe\StripeObject), zip?: (object{}&\Stripe\StripeObject)}&\Stripe\StripeObject) $payment_method_details Details of the PaymentMethod that was shared via this token.
+ * @property null|(object{acss_debit?: (object{account_number?: null|string, bank_name: null|string, fingerprint: null|string, institution_number: null|string, last4: null|string, transit_number: null|string}&\Stripe\StripeObject), affirm?: (object{}&\Stripe\StripeObject), afterpay_clearpay?: (object{}&\Stripe\StripeObject), alipay?: (object{}&\Stripe\StripeObject), alma?: (object{}&\Stripe\StripeObject), amazon_pay?: (object{}&\Stripe\StripeObject), au_becs_debit?: (object{bsb_number: null|string, fingerprint: null|string, last4: null|string}&\Stripe\StripeObject), bacs_debit?: (object{fingerprint: null|string, last4: null|string, sort_code: null|string}&\Stripe\StripeObject), bancontact?: (object{}&\Stripe\StripeObject), billie?: (object{}&\Stripe\StripeObject), billing_details: null|(object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\Stripe\StripeObject), email: null|string, name: null|string, phone: null|string, tax_id: null|string}&\Stripe\StripeObject), bizum?: (object{buyer_id?: null|string}&\Stripe\StripeObject), blik?: (object{buyer_id?: null|string}&\Stripe\StripeObject), boleto?: (object{tax_id: string}&\Stripe\StripeObject), card?: (object{brand: string, checks?: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&\Stripe\StripeObject), country: null|string, description?: null|string, display_brand: null|string, exp_month: int, exp_year: int, fingerprint?: null|string, funding: string, iin?: null|string, issuer?: null|string, last4: string, networks: null|(object{available: string[], preferred: null|string}&\Stripe\StripeObject), wallet: null|(object{amex_express_checkout?: (object{}&\Stripe\StripeObject), apple_pay?: (object{}&\Stripe\StripeObject), dynamic_last4: null|string, google_pay?: (object{}&\Stripe\StripeObject), link?: (object{}&\Stripe\StripeObject), 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), 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)}&\Stripe\StripeObject), samsung_pay?: (object{}&\Stripe\StripeObject), 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), 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)}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), card_present?: (object{brand: null|string, brand_product: null|string, cardholder_name: null|string, country: null|string, description?: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, networks: null|(object{available: string[], preferred: null|string}&\Stripe\StripeObject), offline: null|(object{stored_at: null|int, type: null|string}&\Stripe\StripeObject), preferred_locales: null|string[], read_method: null|string, wallet?: (object{type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), cashapp?: (object{buyer_id: null|string, cashtag: null|string}&\Stripe\StripeObject), crypto?: (object{}&\Stripe\StripeObject), customer_balance?: (object{}&\Stripe\StripeObject), eps?: (object{bank: null|string}&\Stripe\StripeObject), fpx?: (object{account_holder_type: null|string, bank: string}&\Stripe\StripeObject), giropay?: (object{}&\Stripe\StripeObject), gopay?: (object{}&\Stripe\StripeObject), grabpay?: (object{}&\Stripe\StripeObject), id_bank_transfer?: (object{bank: null|string, bank_code: null|string, bank_name: null|string, display_name: null|string}&\Stripe\StripeObject), ideal?: (object{bank: null|string, bic: null|string}&\Stripe\StripeObject), interac_present?: (object{brand: null|string, cardholder_name: null|string, country: null|string, description?: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, iin?: null|string, issuer?: null|string, last4: null|string, networks: null|(object{available: string[], preferred: null|string}&\Stripe\StripeObject), preferred_locales: null|string[], read_method: null|string}&\Stripe\StripeObject), kakao_pay?: (object{}&\Stripe\StripeObject), klarna?: (object{dob?: null|(object{day: null|int, month: null|int, year: null|int}&\Stripe\StripeObject)}&\Stripe\StripeObject), konbini?: (object{}&\Stripe\StripeObject), kr_card?: (object{brand: null|string, last4: null|string}&\Stripe\StripeObject), link?: (object{email: null|string, persistent_token?: string}&\Stripe\StripeObject), mb_way?: (object{}&\Stripe\StripeObject), mobilepay?: (object{}&\Stripe\StripeObject), multibanco?: (object{}&\Stripe\StripeObject), naver_pay?: (object{buyer_id: null|string, funding: string}&\Stripe\StripeObject), nz_bank_account?: (object{account_holder_name: null|string, bank_code: string, bank_name: string, branch_code: string, last4: string, suffix: null|string}&\Stripe\StripeObject), oxxo?: (object{}&\Stripe\StripeObject), p24?: (object{bank: null|string}&\Stripe\StripeObject), pay_by_bank?: (object{}&\Stripe\StripeObject), payco?: (object{}&\Stripe\StripeObject), paynow?: (object{}&\Stripe\StripeObject), paypal?: (object{country: null|string, fingerprint?: null|string, payer_email: null|string, payer_id: null|string, verified_email?: null|string}&\Stripe\StripeObject), paypay?: (object{}&\Stripe\StripeObject), payto?: (object{bsb_number: null|string, last4: null|string, pay_id: null|string}&\Stripe\StripeObject), pix?: (object{fingerprint?: null|string}&\Stripe\StripeObject), promptpay?: (object{}&\Stripe\StripeObject), qris?: (object{}&\Stripe\StripeObject), rechnung?: (object{dob?: (object{day: int, month: int, year: int}&\Stripe\StripeObject)}&\Stripe\StripeObject), revolut_pay?: (object{}&\Stripe\StripeObject), samsung_pay?: (object{}&\Stripe\StripeObject), satispay?: (object{}&\Stripe\StripeObject), scalapay?: (object{}&\Stripe\StripeObject), sepa_debit?: (object{bank_code: null|string, branch_code: null|string, country: null|string, fingerprint: null|string, generated_from: null|(object{charge: null|string|\Stripe\Charge, setup_attempt: null|string|\Stripe\SetupAttempt}&\Stripe\StripeObject), last4: null|string}&\Stripe\StripeObject), shopeepay?: (object{}&\Stripe\StripeObject), sofort?: (object{country: null|string}&\Stripe\StripeObject), stripe_balance?: (object{account?: null|string}&\Stripe\StripeObject), sunbit?: (object{}&\Stripe\StripeObject), swish?: (object{}&\Stripe\StripeObject), twint?: (object{}&\Stripe\StripeObject), type: string, upi?: (object{vpa: null|string}&\Stripe\StripeObject), us_bank_account?: (object{account_holder_type: null|string, account_number?: null|string, account_type: null|string, bank_name: null|string, financial_connections_account: null|string, fingerprint: null|string, last4: null|string, networks: null|(object{preferred: null|string, supported: string[]}&\Stripe\StripeObject), routing_number: null|string, status_details: null|(object{blocked?: (object{network_code: null|string, reason: null|string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), wechat_pay?: (object{}&\Stripe\StripeObject), zip?: (object{}&\Stripe\StripeObject)}&\Stripe\StripeObject) $payment_method_details Details of the PaymentMethod that was shared via this token.
* @property null|(object{insights: (object{bot?: null|(object{recommended_action: string, score: float}&\Stripe\StripeObject), card_issuer_decline?: null|(object{recommended_action: string, score: float}&\Stripe\StripeObject), card_testing?: null|(object{recommended_action: string, score: float}&\Stripe\StripeObject), fraudulent_dispute: null|(object{recommended_action: string, score: int}&\Stripe\StripeObject), stolen_card?: null|(object{recommended_action: string, score: int}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $risk_details Risk details of the SharedPaymentGrantedToken.
* @property null|\Stripe\StripeObject $shared_metadata Metadata about the SharedPaymentGrantedToken.
* @property null|(object{amount_captured: null|(object{currency: string, value: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $usage_details Some details about how the SharedPaymentGrantedToken has been used already.
diff --git a/lib/Source.php b/lib/Source.php
index 31a80e2f5..bb07c87fc 100644
--- a/lib/Source.php
+++ b/lib/Source.php
@@ -45,6 +45,7 @@
* @property null|(object{reference?: null|string}&StripeObject) $p24
* @property null|(object{billing_agreement?: null|string, fingerprint?: null|string, payer_id?: null|string, reference_id?: string, reference_transaction_amount?: string, reference_transaction_charged?: bool, statement_descriptor?: null|string, transaction_id?: string, verified_email?: null|string}&StripeObject) $paypal
* @property null|(object{address: null|string, amount_charged: int, amount_received: int, amount_returned: int, refund_attributes_method: string, refund_attributes_status: string}&StripeObject) $receiver
+ * @property null|(object{status: string}&StripeObject) $redaction Redaction status of this source. If not null, this source is associated to a redaction job.
* @property null|(object{failure_reason: null|string, return_url: string, status: string, url: string}&StripeObject) $redirect
* @property null|(object{bank_name?: null|string, bic?: null|string, iban?: null|string, refund_account_holder_address_city?: null|string, refund_account_holder_address_country?: null|string, refund_account_holder_address_line1?: null|string, refund_account_holder_address_line2?: null|string, refund_account_holder_address_postal_code?: null|string, refund_account_holder_address_state?: null|string, refund_account_holder_name?: null|string, refund_iban?: null|string}&StripeObject) $sepa_credit_transfer
* @property null|(object{bank_code?: null|string, branch_code?: null|string, country?: null|string, fingerprint?: null|string, last4?: null|string, mandate_reference?: null|string, mandate_url?: null|string}&StripeObject) $sepa_debit
diff --git a/lib/StripeEventNotificationHandler.php b/lib/StripeEventNotificationHandler.php
index d67aa61bd..5bc48be20 100644
--- a/lib/StripeEventNotificationHandler.php
+++ b/lib/StripeEventNotificationHandler.php
@@ -330,67 +330,71 @@ public function onV2CoreAccountIncludingConfigurationMerchantUpdated(
}
/**
- * Registers a handler for the "v2.core.account[configuration.recipient].capability_status_updated" event.
+ * Registers a handler for the "v2.core.account[configuration.money_manager].capability_status_updated" event.
*
- * @param callable(Events\V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent, StripeClient): void $handler Handles v2.core.account[configuration.recipient].capability_status_updated events
+ * @param callable(Events\V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent, StripeClient): void $handler Handles v2.core.account[configuration.money_manager].capability_status_updated events
*
* @throws Exception\InvalidArgumentException if this event type is already registered
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
*/
- public function onV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdated(
+ public function onV2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdated(
$handler
) {
$this->register(
- 'v2.core.account[configuration.recipient].capability_status_updated',
+ 'v2.core.account[configuration.money_manager].capability_status_updated',
$handler
);
}
/**
- * Registers a handler for the "v2.core.account[configuration.recipient].updated" event.
+ * Registers a handler for the "v2.core.account[configuration.money_manager].updated" event.
*
- * @param callable(Events\V2CoreAccountIncludingConfigurationRecipientUpdatedEvent, StripeClient): void $handler Handles v2.core.account[configuration.recipient].updated events
+ * @param callable(Events\V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent, StripeClient): void $handler Handles v2.core.account[configuration.money_manager].updated events
*
* @throws Exception\InvalidArgumentException if this event type is already registered
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
*/
- public function onV2CoreAccountIncludingConfigurationRecipientUpdated(
+ public function onV2CoreAccountIncludingConfigurationMoneyManagerUpdated(
$handler
) {
$this->register(
- 'v2.core.account[configuration.recipient].updated',
+ 'v2.core.account[configuration.money_manager].updated',
$handler
);
}
/**
- * Registers a handler for the "v2.core.account[configuration.storer].capability_status_updated" event.
+ * Registers a handler for the "v2.core.account[configuration.recipient].capability_status_updated" event.
*
- * @param callable(Events\V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent, StripeClient): void $handler Handles v2.core.account[configuration.storer].capability_status_updated events
+ * @param callable(Events\V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent, StripeClient): void $handler Handles v2.core.account[configuration.recipient].capability_status_updated events
*
* @throws Exception\InvalidArgumentException if this event type is already registered
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
*/
- public function onV2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdated(
+ public function onV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdated(
$handler
) {
$this->register(
- 'v2.core.account[configuration.storer].capability_status_updated',
+ 'v2.core.account[configuration.recipient].capability_status_updated',
$handler
);
}
/**
- * Registers a handler for the "v2.core.account[configuration.storer].updated" event.
+ * Registers a handler for the "v2.core.account[configuration.recipient].updated" event.
*
- * @param callable(Events\V2CoreAccountIncludingConfigurationStorerUpdatedEvent, StripeClient): void $handler Handles v2.core.account[configuration.storer].updated events
+ * @param callable(Events\V2CoreAccountIncludingConfigurationRecipientUpdatedEvent, StripeClient): void $handler Handles v2.core.account[configuration.recipient].updated events
*
* @throws Exception\InvalidArgumentException if this event type is already registered
* @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
*/
- public function onV2CoreAccountIncludingConfigurationStorerUpdated($handler)
- {
- $this->register('v2.core.account[configuration.storer].updated', $handler);
+ public function onV2CoreAccountIncludingConfigurationRecipientUpdated(
+ $handler
+ ) {
+ $this->register(
+ 'v2.core.account[configuration.recipient].updated',
+ $handler
+ );
}
/**
@@ -975,6 +979,22 @@ public function onV2MoneyManagementOutboundPaymentReturned($handler)
$this->register('v2.money_management.outbound_payment.returned', $handler);
}
+ /**
+ * Registers a handler for the "v2.money_management.outbound_payment.under_review" event.
+ *
+ * @param callable(Events\V2MoneyManagementOutboundPaymentUnderReviewEvent, StripeClient): void $handler Handles v2.money_management.outbound_payment.under_review events
+ *
+ * @throws Exception\InvalidArgumentException if this event type is already registered
+ * @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
+ */
+ public function onV2MoneyManagementOutboundPaymentUnderReview($handler)
+ {
+ $this->register(
+ 'v2.money_management.outbound_payment.under_review',
+ $handler
+ );
+ }
+
/**
* Registers a handler for the "v2.money_management.outbound_payment.updated" event.
*
@@ -1053,6 +1073,22 @@ public function onV2MoneyManagementOutboundTransferReturned($handler)
$this->register('v2.money_management.outbound_transfer.returned', $handler);
}
+ /**
+ * Registers a handler for the "v2.money_management.outbound_transfer.under_review" event.
+ *
+ * @param callable(Events\V2MoneyManagementOutboundTransferUnderReviewEvent, StripeClient): void $handler Handles v2.money_management.outbound_transfer.under_review events
+ *
+ * @throws Exception\InvalidArgumentException if this event type is already registered
+ * @throws Exception\BadMethodCallException if the `.handle()` method has already been called on this handler.
+ */
+ public function onV2MoneyManagementOutboundTransferUnderReview($handler)
+ {
+ $this->register(
+ 'v2.money_management.outbound_transfer.under_review',
+ $handler
+ );
+ }
+
/**
* Registers a handler for the "v2.money_management.outbound_transfer.updated" event.
*
diff --git a/lib/Subscription.php b/lib/Subscription.php
index 99a9e7819..a4777b9e8 100644
--- a/lib/Subscription.php
+++ b/lib/Subscription.php
@@ -35,7 +35,7 @@
* @property null|string $description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
* @property (Discount|string)[] $discounts The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use expand[]=discounts to expand each discount.
* @property null|int $ended_at If the subscription has ended, the date the subscription ended.
- * @property (object{account_tax_ids: null|(string|TaxId)[], issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject) $invoice_settings
+ * @property (object{account_tax_ids: null|(string|TaxId)[], custom_fields: null|(object{name: string, value: string}&StripeObject)[], description: null|string, footer: null|string, issuer: (object{account?: Account|string, type: string}&StripeObject)}&StripeObject) $invoice_settings
* @property Collectiontrue. If the object exists in test mode, the value is false.
+ * @property null|(object{status: string}&StripeObject) $redaction Redaction status of this token. If not null, this token is associated to a redaction job.
* @property string $type Type of the token: account, bank_account, card, or pii.
* @property bool $used Determines if you have already used this token (you can only use tokens once).
*/
diff --git a/lib/Topup.php b/lib/Topup.php
index 8bf9fad0c..bacfb5044 100644
--- a/lib/Topup.php
+++ b/lib/Topup.php
@@ -43,7 +43,7 @@ class Topup extends ApiResource
/**
* Top up the balance of an account.
*
- * @param null|array{amount: int, currency: string, description?: string, expand?: string[], metadata?: null|arraytrue if the object exists in live mode or the value false if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Additional information about the object in a structured format.
+ * @property string $mode The import strategy for handling existing catalog data.
* @property string $status The current status of this ProductCatalogImport.
* @property null|(object{awaiting_upload?: (object{upload_url: (object{expires_at: int, url: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), failed?: (object{code: string, failure_message: string, type: string}&\Stripe\StripeObject), processing?: (object{error_count: int, success_count: int}&\Stripe\StripeObject), succeeded?: (object{success_count: int}&\Stripe\StripeObject), succeeded_with_errors?: (object{error_count: int, error_file: (object{content_type: string, download_url: (object{expires_at: int, url: string}&\Stripe\StripeObject), size: int}&\Stripe\StripeObject), samples: (object{error_message: string, field: string, id: string, row: int}&\Stripe\StripeObject)[], success_count: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Details about the current import status.
*/
@@ -69,6 +70,10 @@ public static function fieldEncodings()
const FEED_TYPE_INVENTORY = 'inventory';
const FEED_TYPE_PRICING = 'pricing';
const FEED_TYPE_PRODUCT = 'product';
+ const FEED_TYPE_PROMOTION = 'promotion';
+
+ const MODE_REPLACE = 'replace';
+ const MODE_UPSERT = 'upsert';
const STATUS_AWAITING_UPLOAD = 'awaiting_upload';
const STATUS_FAILED = 'failed';
diff --git a/lib/V2/Core/Account.php b/lib/V2/Core/Account.php
index 054eb1181..3e3bb75f6 100644
--- a/lib/V2/Core/Account.php
+++ b/lib/V2/Core/Account.php
@@ -12,7 +12,7 @@
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
* @property string[] $applied_configurations The configurations that have been applied to this account.
* @property null|bool $closed Indicates whether the account has been closed.
- * @property null|(object{customer?: (object{applied: bool, automatic_indirect_tax?: (object{exempt?: string, ip_address?: string, location?: (object{country?: string, state?: string}&\Stripe\StripeObject), location_source?: string}&\Stripe\StripeObject), billing?: (object{default_payment_method?: string, invoice?: (object{custom_fields: (object{name: string, value: string}&\Stripe\StripeObject)[], footer?: string, next_sequence?: int, prefix?: string, rendering?: (object{amount_tax_display?: string, template?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), capabilities?: (object{automatic_indirect_tax?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), shipping?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}&\Stripe\StripeObject), name?: string, phone?: string}&\Stripe\StripeObject), test_clock?: string}&\Stripe\StripeObject), merchant?: (object{applied: bool, bacs_debit_payments?: (object{display_name?: string, service_user_number?: string}&\Stripe\StripeObject), branding?: (object{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}&\Stripe\StripeObject), capabilities?: (object{ach_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), acss_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), affirm_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), afterpay_clearpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), alma_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), amazon_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), au_becs_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), bacs_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), bancontact_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), blik_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), boleto_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), card_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cartes_bancaires_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cashapp_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), eps_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), fpx_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), gb_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), grabpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), ideal_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), jcb_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), jp_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), kakao_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), klarna_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), konbini_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), kr_card_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), link_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), mobilepay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), multibanco_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), mx_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), naver_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), oxxo_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), p24_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), pay_by_bank_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), payco_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), paynow_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), promptpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), revolut_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), samsung_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), sepa_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), sepa_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_balance?: (object{payouts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), swish_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), twint_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), us_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), zip_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), card_payments?: (object{decline_on?: (object{avs_failure?: bool, cvc_failure?: bool}&\Stripe\StripeObject)}&\Stripe\StripeObject), konbini_payments?: (object{support?: (object{email?: string, hours?: (object{end_time?: string, start_time?: string}&\Stripe\StripeObject), phone?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), mcc?: string, script_statement_descriptor?: (object{kana?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject), kanji?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), sepa_debit_payments?: (object{creditor_id?: string}&\Stripe\StripeObject), smart_disputes?: (object{auto_respond?: (object{preference?: string, value?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), statement_descriptor?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject), support?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), email?: string, phone?: string, url?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), recipient?: (object{applied: bool, capabilities?: (object{bank_accounts?: (object{local?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), wire?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), cards?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_balance?: (object{payouts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_transfers?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), default_outbound_destination?: (object{id: string, type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), storer?: (object{applied: bool, capabilities?: (object{financial_addresses?: (object{bank_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), holds_currencies?: (object{eur?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), gbp?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), usd?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), inbound_transfers?: (object{bank_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), outbound_payments?: (object{bank_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cards?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), financial_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), outbound_transfers?: (object{bank_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), financial_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $configuration An Account represents a company, individual, or other entity that a user interacts with. Accounts store identity information and one or more configurations that enable product-specific capabilities. You can assign configurations at creation or add them later.
+ * @property null|(object{customer?: (object{applied: bool, automatic_indirect_tax?: (object{exempt?: string, ip_address?: string, location?: (object{country?: string, state?: string}&\Stripe\StripeObject), location_source?: string}&\Stripe\StripeObject), billing?: (object{default_payment_method?: string, invoice?: (object{custom_fields: (object{name: string, value: string}&\Stripe\StripeObject)[], footer?: string, next_sequence?: int, prefix?: string, rendering?: (object{amount_tax_display?: string, template?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), capabilities?: (object{automatic_indirect_tax?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), shipping?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}&\Stripe\StripeObject), name?: string, phone?: string}&\Stripe\StripeObject), test_clock?: string}&\Stripe\StripeObject), merchant?: (object{applied: bool, bacs_debit_payments?: (object{display_name?: string, service_user_number?: string}&\Stripe\StripeObject), branding?: (object{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}&\Stripe\StripeObject), capabilities?: (object{ach_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), acss_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), affirm_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), afterpay_clearpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), alma_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), amazon_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), au_becs_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), bacs_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), bancontact_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), blik_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), boleto_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), card_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cartes_bancaires_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cashapp_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), eps_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), fpx_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), gb_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), grabpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), ideal_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), jcb_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), jp_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), kakao_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), klarna_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), konbini_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), kr_card_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), link_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), mobilepay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), multibanco_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), mx_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), naver_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), oxxo_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), p24_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), pay_by_bank_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), payco_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), paynow_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), promptpay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), revolut_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), samsung_pay_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), sepa_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), sepa_debit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_balance?: (object{payouts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), sunbit_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), swish_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), twint_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), us_bank_transfer_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), zip_payments?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), card_payments?: (object{decline_on?: (object{avs_failure?: bool, cvc_failure?: bool}&\Stripe\StripeObject)}&\Stripe\StripeObject), konbini_payments?: (object{support?: (object{email?: string, hours?: (object{end_time?: string, start_time?: string}&\Stripe\StripeObject), phone?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), mcc?: string, script_statement_descriptor?: (object{kana?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject), kanji?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), sepa_debit_payments?: (object{creditor_id?: string}&\Stripe\StripeObject), smart_disputes?: (object{auto_respond?: (object{preference?: string, value?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), statement_descriptor?: (object{descriptor?: string, prefix?: string}&\Stripe\StripeObject), support?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), email?: string, phone?: string, url?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), money_manager?: (object{applied: bool, capabilities?: (object{business_storage?: (object{inbound?: (object{aud?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cad?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), eur?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), gbp?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), usd?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), outbound?: (object{aud?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cad?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), eur?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), gbp?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), usd?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), inbound_transfers?: (object{bank_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), outbound_payments?: (object{bank_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), cards?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), financial_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), outbound_transfers?: (object{bank_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), financial_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), received_credits?: (object{bank_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), received_debits?: (object{bank_accounts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), recipient?: (object{applied: bool, capabilities?: (object{bank_accounts?: (object{local?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), wire?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject), cards?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_balance?: (object{payouts?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), stripe_transfers?: (object{status: string, status_details: (object{code: string, resolution: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), default_outbound_destination?: (object{id: string, type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $configuration An Account represents a company, individual, or other entity that a user interacts with. Accounts store identity information and one or more configurations that enable product-specific capabilities. You can assign configurations at creation or add them later.
* @property null|string $contact_email The primary contact email address for the Account.
* @property null|string $contact_phone The default contact phone for the Account.
* @property int $created Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
@@ -20,7 +20,7 @@
* @property null|(object{currency?: string, locales?: string[], profile?: (object{business_url?: string, doing_business_as?: string, product_description?: string}&\Stripe\StripeObject), responsibilities: (object{fees_collector?: string, losses_collector?: string, requirements_collector: string}&\Stripe\StripeObject), timezone?: string}&\Stripe\StripeObject) $defaults Default values for settings shared across Account configurations.
* @property null|string $display_name A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account.
* @property null|(object{entries?: (object{awaiting_action_from: string, description: string, errors: (object{code: string, description: string}&\Stripe\StripeObject)[], impact: (object{restricts_capabilities?: (object{capability: string, configuration: string, deadline: (object{status: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), minimum_deadline: (object{status: string}&\Stripe\StripeObject), reference?: (object{inquiry?: string, resource?: string, type: string}&\Stripe\StripeObject), requested_reasons: (object{code: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)[], minimum_transition_date?: int, summary?: (object{minimum_deadline?: (object{status: string, time?: int}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $future_requirements Information about the future requirements for the Account that will eventually come into effect, including what information needs to be collected, and by when.
- * @property null|(object{attestations?: (object{directorship_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), ownership_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), persons_provided?: (object{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}&\Stripe\StripeObject), representative_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), terms_of_service?: (object{account?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), storer?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), business_details?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), annual_revenue?: (object{amount?: \Stripe\StripeObject, fiscal_year_end?: string}&\Stripe\StripeObject), documents?: (object{bank_account_ownership_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), company_license?: (object{files: string[], type: string}&\Stripe\StripeObject), company_memorandum_of_association?: (object{files: string[], type: string}&\Stripe\StripeObject), company_ministerial_decree?: (object{files: string[], type: string}&\Stripe\StripeObject), company_registration_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), company_tax_id_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), primary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), proof_of_address?: (object{files: string[], type: string}&\Stripe\StripeObject), proof_of_registration?: (object{files: string[], signer?: (object{person: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), proof_of_ultimate_beneficial_ownership?: (object{files: string[], signer?: (object{person: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), estimated_worker_count?: int, id_numbers?: (object{registrar?: string, type: string}&\Stripe\StripeObject)[], monthly_estimated_revenue?: (object{amount?: \Stripe\StripeObject}&\Stripe\StripeObject), phone?: string, registered_name?: string, registration_date?: (object{day: int, month: int, year: int}&\Stripe\StripeObject), script_addresses?: (object{kana?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), kanji?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), script_names?: (object{kana?: (object{registered_name?: string}&\Stripe\StripeObject), kanji?: (object{registered_name?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), structure?: string}&\Stripe\StripeObject), country?: string, entity_type?: string, individual?: (object{account: string, additional_addresses?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}&\Stripe\StripeObject)[], additional_names?: (object{full_name?: string, given_name?: string, purpose: string, surname?: string}&\Stripe\StripeObject)[], additional_terms_of_service?: (object{account?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), created: int, date_of_birth?: (object{day: int, month: int, year: int}&\Stripe\StripeObject), documents?: (object{company_authorization?: (object{files: string[], type: string}&\Stripe\StripeObject), passport?: (object{files: string[], type: string}&\Stripe\StripeObject), primary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), secondary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), visa?: (object{files: string[], type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), email?: string, given_name?: string, id: string, id_numbers?: (object{type: string}&\Stripe\StripeObject)[], legal_gender?: string, metadata?: \Stripe\StripeObject, nationalities?: string[], object: string, phone?: string, political_exposure?: string, relationship?: (object{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: string, representative?: bool, title?: string}&\Stripe\StripeObject), script_addresses?: (object{kana?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), kanji?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), script_names?: (object{kana?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject), kanji?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), surname?: string, updated: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $identity Information about the company, individual, and business represented by the Account.
+ * @property null|(object{attestations?: (object{directorship_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), ownership_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), persons_provided?: (object{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}&\Stripe\StripeObject), representative_declaration?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), terms_of_service?: (object{account?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject), money_manager?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject), business_details?: (object{address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), annual_revenue?: (object{amount?: \Stripe\StripeObject, fiscal_year_end?: string}&\Stripe\StripeObject), documents?: (object{bank_account_ownership_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), company_license?: (object{files: string[], type: string}&\Stripe\StripeObject), company_memorandum_of_association?: (object{files: string[], type: string}&\Stripe\StripeObject), company_ministerial_decree?: (object{files: string[], type: string}&\Stripe\StripeObject), company_registration_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), company_tax_id_verification?: (object{files: string[], type: string}&\Stripe\StripeObject), primary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), proof_of_address?: (object{files: string[], type: string}&\Stripe\StripeObject), proof_of_registration?: (object{files: string[], signer?: (object{person: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), proof_of_ultimate_beneficial_ownership?: (object{files: string[], signer?: (object{person: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), estimated_worker_count?: int, id_numbers?: (object{registrar?: string, type: string}&\Stripe\StripeObject)[], monthly_estimated_revenue?: (object{amount?: \Stripe\StripeObject}&\Stripe\StripeObject), phone?: string, registered_name?: string, registration_date?: (object{day: int, month: int, year: int}&\Stripe\StripeObject), script_addresses?: (object{kana?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), kanji?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), script_names?: (object{kana?: (object{registered_name?: string}&\Stripe\StripeObject), kanji?: (object{registered_name?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), structure?: string}&\Stripe\StripeObject), country?: string, entity_type?: string, individual?: (object{account: string, additional_addresses?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}&\Stripe\StripeObject)[], additional_names?: (object{full_name?: string, given_name?: string, purpose: string, surname?: string}&\Stripe\StripeObject)[], additional_terms_of_service?: (object{account?: (object{date?: int, ip?: string, user_agent?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), address?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), created: int, date_of_birth?: (object{day: int, month: int, year: int}&\Stripe\StripeObject), documents?: (object{company_authorization?: (object{files: string[], type: string}&\Stripe\StripeObject), passport?: (object{files: string[], type: string}&\Stripe\StripeObject), primary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), secondary_verification?: (object{front_back: (object{back?: string, front: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject), visa?: (object{files: string[], type: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), email?: string, given_name?: string, id: string, id_numbers?: (object{type: string}&\Stripe\StripeObject)[], legal_gender?: string, metadata?: \Stripe\StripeObject, nationalities?: string[], object: string, phone?: string, political_exposure?: string, relationship?: (object{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: string, representative?: bool, title?: string}&\Stripe\StripeObject), script_addresses?: (object{kana?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject), kanji?: (object{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), script_names?: (object{kana?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject), kanji?: (object{given_name?: string, surname?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), surname?: string, updated: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $identity Information about the company, individual, and business represented by the Account.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property 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|(object{entries?: (object{awaiting_action_from: string, description: string, errors: (object{code: string, description: string}&\Stripe\StripeObject)[], impact: (object{restricts_capabilities?: (object{capability: string, configuration: string, deadline: (object{status: string}&\Stripe\StripeObject)}&\Stripe\StripeObject)[]}&\Stripe\StripeObject), minimum_deadline: (object{status: string}&\Stripe\StripeObject), reference?: (object{inquiry?: string, resource?: string, type: string}&\Stripe\StripeObject), requested_reasons: (object{code: string}&\Stripe\StripeObject)[]}&\Stripe\StripeObject)[], summary?: (object{minimum_deadline?: (object{status: string, time?: int}&\Stripe\StripeObject)}&\Stripe\StripeObject)}&\Stripe\StripeObject) $requirements Information about the active requirements for the Account, including what information needs to be collected, and by when.
diff --git a/lib/V2/Core/BatchJob.php b/lib/V2/Core/BatchJob.php
index 30c06fbf1..341256a94 100644
--- a/lib/V2/Core/BatchJob.php
+++ b/lib/V2/Core/BatchJob.php
@@ -11,7 +11,6 @@
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
* @property int $created Timestamp at which the batch_job was created.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property int $maximum_rps The maximum requests per second defined for the batch_job.
* @property \Stripe\StripeObject $metadata The metadata of the batch_job.
* @property bool $skip_validation Whether validation runs before executing the batch_job.
* @property string $status The current status of the batch_job.
diff --git a/lib/V2/MoneyManagement/FinancialAddress.php b/lib/V2/MoneyManagement/FinancialAddress.php
index 0a34df419..63a8ad60d 100644
--- a/lib/V2/MoneyManagement/FinancialAddress.php
+++ b/lib/V2/MoneyManagement/FinancialAddress.php
@@ -10,7 +10,7 @@
* @property string $id The ID of a FinancialAddress.
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
* @property int $created The creation timestamp of the FinancialAddress.
- * @property null|(object{gb_bank_account?: (object{account_holder_name: string, account_number?: string, last4: string, sort_code: string}&\Stripe\StripeObject), sepa_bank_account?: (object{account_holder_name: string, bank_name: string, bic: string, country: string, iban: string, last4: string}&\Stripe\StripeObject), type: string, us_bank_account?: (object{account_holder_address?: (object{city: string, country: string, line1: string, line2: string, postal_code: string, state: string, town: string}&\Stripe\StripeObject), account_holder_name?: string, account_number?: string, bank_name?: string, last4: string, routing_number: string, swift_code?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $credentials Object indicates the type of credentials that have been allocated and attached to the FinancialAddress. It contains all necessary banking details with which to perform money movements with the FinancialAddress. This field is only available for FinancialAddresses with an active status.
+ * @property null|(object{gb_bank_account?: (object{account_holder_name: string, account_number?: string, last4: string, sort_code: string}&\Stripe\StripeObject), sepa_bank_account?: (object{account_holder_name: string, bank_name: string, bic: string, country: string, iban: string, last4: string}&\Stripe\StripeObject), type: string, us_bank_account?: (object{account_holder_address?: (object{city: string, country: string, line1: string, line2: string, postal_code: string, state: string, town: string}&\Stripe\StripeObject), account_holder_name?: string, account_number?: string, bank_name?: string, bic?: string, last4: string, routing_number: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $credentials Object indicates the type of credentials that have been allocated and attached to the FinancialAddress. It contains all necessary banking details with which to perform money movements with the FinancialAddress. This field is only available for FinancialAddresses with an active status.
* @property string $currency Open Enum. The currency the FinancialAddress supports.
* @property string $financial_account A ID of the FinancialAccount this FinancialAddress corresponds to.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
diff --git a/lib/V2/MoneyManagement/InboundTransfer.php b/lib/V2/MoneyManagement/InboundTransfer.php
index 98b9737a2..d064f23ee 100644
--- a/lib/V2/MoneyManagement/InboundTransfer.php
+++ b/lib/V2/MoneyManagement/InboundTransfer.php
@@ -15,7 +15,7 @@
* @property string $description A freeform text field provided by user, containing metadata.
* @property (object{debited: \Stripe\StripeObject, payment_method: (object{type: string, us_bank_account?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $from A nested object containing information about the origin of the InboundTransfer.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string $receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe’s money transmission licenses.
+ * @property null|string $receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
* @property (object{credited: \Stripe\StripeObject, financial_account: string}&\Stripe\StripeObject) $to A nested object containing information about the destination of the InboundTransfer.
* @property (object{bank_debit_failed?: (object{failure_reason: string}&\Stripe\StripeObject), bank_debit_processing?: (object{}&\Stripe\StripeObject), bank_debit_queued?: (object{}&\Stripe\StripeObject), bank_debit_returned?: (object{return_reason: string}&\Stripe\StripeObject), bank_debit_succeeded?: (object{}&\Stripe\StripeObject), created: int, effective_at: int, id: string, level: string, type: string}&\Stripe\StripeObject)[] $transfer_history A list of history objects, representing changes in the state of the InboundTransfer.
*/
diff --git a/lib/V2/MoneyManagement/OutboundPayment.php b/lib/V2/MoneyManagement/OutboundPayment.php
index 5bae76ddd..334066f96 100644
--- a/lib/V2/MoneyManagement/OutboundPayment.php
+++ b/lib/V2/MoneyManagement/OutboundPayment.php
@@ -24,7 +24,7 @@
* @property (object{setting: string}&\Stripe\StripeObject) $recipient_notification Details about the OutboundPayment notification settings for recipient.
* @property string $statement_descriptor The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). It will default to STRIPE if not set on the account settings.
* @property string $status Closed Enum. Current status of the OutboundPayment: processing, failed, posted, returned, canceled. An OutboundPayment is processing if it has been created and is processing. The status changes to posted once the OutboundPayment has been "confirmed" and funds have left the account, or to failed or canceled. If an OutboundPayment fails to arrive at its payout method, its status will change to returned.
- * @property null|(object{failed?: (object{reason: string}&\Stripe\StripeObject), returned?: (object{reason: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Status details for an OutboundPayment in a failed or returned state.
+ * @property null|(object{failed?: (object{reason: string}&\Stripe\StripeObject), processing?: (object{reason: string}&\Stripe\StripeObject), returned?: (object{reason: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Status details for an OutboundPayment in a processing, failed, or returned state.
* @property null|(object{canceled_at?: int, failed_at?: int, posted_at?: int, returned_at?: int}&\Stripe\StripeObject) $status_transitions Hash containing timestamps of when the object transitioned to a particular status.
* @property (object{credited: \Stripe\StripeObject, payout_method: string, recipient: string}&\Stripe\StripeObject) $to To which payout method the OutboundPayment was sent.
* @property (object{status: string, value?: string}&\Stripe\StripeObject) $trace_id A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks might call this a "reference number" or something similar.
diff --git a/lib/V2/MoneyManagement/OutboundTransfer.php b/lib/V2/MoneyManagement/OutboundTransfer.php
index 865942d19..686e5def2 100644
--- a/lib/V2/MoneyManagement/OutboundTransfer.php
+++ b/lib/V2/MoneyManagement/OutboundTransfer.php
@@ -21,7 +21,7 @@
* @property null|string $receipt_url A link to the Stripe-hosted receipt for this OutboundTransfer. The receipt link remains active for 60 days from the OutboundTransfer creation date. After this period, the link will expire and the receipt url value will be null.
* @property string $statement_descriptor The description that appears on the receiving end for an OutboundTransfer (for example, bank statement for external bank transfer). It will default to STRIPE if not set on the account settings.
* @property string $status Closed Enum. Current status of the OutboundTransfer: processing, failed, posted, returned, canceled. An OutboundTransfer is processing if it has been created and is processing. The status changes to posted once the OutboundTransfer has been "confirmed" and funds have left the account, or to failed or canceled. If an OutboundTransfer fails to arrive at its payout method, its status will change to returned.
- * @property null|(object{failed?: (object{reason: string}&\Stripe\StripeObject), returned?: (object{reason: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Status details for an OutboundTransfer in a failed or returned state.
+ * @property null|(object{failed?: (object{reason: string}&\Stripe\StripeObject), processing?: (object{reason: string}&\Stripe\StripeObject), returned?: (object{reason: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Status details for an OutboundTransfer in a processing, failed, or returned state.
* @property null|(object{canceled_at?: int, failed_at?: int, posted_at?: int, returned_at?: int}&\Stripe\StripeObject) $status_transitions Hash containing timestamps of when the object transitioned to a particular status.
* @property (object{credited: \Stripe\StripeObject, payout_method: string}&\Stripe\StripeObject) $to To which payout method the OutboundTransfer was sent.
* @property (object{status: string, value?: string}&\Stripe\StripeObject) $trace_id A unique identifier that can be used to track this OutboundTransfer with recipient bank. Banks might call this a "reference number" or something similar.
diff --git a/lib/V2/MoneyManagement/ReceivedCredit.php b/lib/V2/MoneyManagement/ReceivedCredit.php
index cbd03e5fd..00f77849a 100644
--- a/lib/V2/MoneyManagement/ReceivedCredit.php
+++ b/lib/V2/MoneyManagement/ReceivedCredit.php
@@ -11,7 +11,7 @@
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
* @property \Stripe\StripeObject $amount The amount and currency of the ReceivedCredit.
* @property null|(object{from_account?: string, outbound_payment?: string, outbound_transfer?: string, payout_v1?: string, transfer?: string, type: string}&\Stripe\StripeObject) $balance_transfer This object stores details about the originating Stripe transaction that resulted in the ReceivedCredit. Present if type field value is balance_transfer.
- * @property null|(object{financial_address: string, gb_bank_account?: (object{account_holder_name?: string, bank_name?: string, last4?: string, network: string, sort_code?: string}&\Stripe\StripeObject), origin_type: string, sepa_bank_account?: (object{account_holder_name?: string, bank_name?: string, bic?: string, country?: string, iban?: string, network: string}&\Stripe\StripeObject), statement_descriptor?: string, us_bank_account?: (object{bank_name?: string, last4?: string, network: string, routing_number?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $bank_transfer This object stores details about the originating banking transaction that resulted in the ReceivedCredit. Present if type field value is bank_transfer.
+ * @property null|(object{financial_address: string, gb_bank_account?: (object{account_holder_name?: string, bank_name?: string, last4?: string, network: string, sort_code?: string}&\Stripe\StripeObject), origin_type: string, sepa_bank_account?: (object{account_holder_name?: string, bank_name?: string, bic?: string, country?: string, iban?: string, network: string}&\Stripe\StripeObject), statement_descriptor?: string, us_bank_account?: (object{account_holder_name?: string, bank_name?: string, last4?: string, network: string, routing_number?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $bank_transfer This object stores details about the originating banking transaction that resulted in the ReceivedCredit. Present if type field value is bank_transfer.
* @property int $created Time at which the ReceivedCredit was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
* @property null|string $description Freeform string set by originator of the ReceivedCredit.
* @property string $financial_account Financial Account ID on which funds for ReceivedCredit were received.
diff --git a/tests/Stripe/AccountLinkTest.php b/tests/Stripe/AccountLinkTest.php
deleted file mode 100644
index bf82e33ff..000000000
--- a/tests/Stripe/AccountLinkTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-expectsRequest(
- 'post',
- '/v1/account_links'
- );
- $resource = AccountLink::create([
- 'account' => 'acct_123',
- 'refresh_url' => 'https://stripe.com/refresh_url',
- 'return_url' => 'https://stripe.com/return_url',
- 'type' => 'account_onboarding',
- ]);
- self::assertInstanceOf(AccountLink::class, $resource);
- }
-}
diff --git a/tests/Stripe/ApiRequestorTest.php b/tests/Stripe/ApiRequestorTest.php
index 921a08c8b..ff7e7e887 100644
--- a/tests/Stripe/ApiRequestorTest.php
+++ b/tests/Stripe/ApiRequestorTest.php
@@ -101,6 +101,93 @@ public function testDefaultHeaders()
self::assertSame($headers['Authorization'], 'Bearer ' . $apiKey);
}
+ public function testDefaultHeadersIncludeSource()
+ {
+ $this->clearAgentEnvVars();
+
+ $reflector = new \ReflectionClass(ApiRequestor::class);
+ $method = $reflector->getMethod('_defaultHeaders');
+ $method->setAccessible(true);
+
+ $headers = $method->invoke(null, 'sk_test_notarealkey');
+
+ $ua = \json_decode($headers['X-Stripe-Client-User-Agent'], true);
+ // source is either absent (when php_uname is disabled) or a 32-char hex MD5
+ if (\array_key_exists('source', $ua)) {
+ $source = $ua['source'];
+ self::assertTrue(
+ (bool) \preg_match('/^[0-9a-f]{32}$/', $source),
+ "Expected source to be a 32-char hex MD5, got: {$source}"
+ );
+ }
+ }
+
+ public function testDefaultHeadersSourceIndependentOfTelemetrySetting()
+ {
+ $this->clearAgentEnvVars();
+
+ $reflector = new \ReflectionClass(ApiRequestor::class);
+ $method = $reflector->getMethod('_defaultHeaders');
+ $method->setAccessible(true);
+
+ $originalTelemetry = Stripe::getEnableTelemetry();
+
+ try {
+ Stripe::setEnableTelemetry(true);
+ $headersEnabled = $method->invoke(null, 'sk_test_notarealkey');
+ $uaEnabled = \json_decode($headersEnabled['X-Stripe-Client-User-Agent'], true);
+
+ Stripe::setEnableTelemetry(false);
+ $headersDisabled = $method->invoke(null, 'sk_test_notarealkey');
+ $uaDisabled = \json_decode($headersDisabled['X-Stripe-Client-User-Agent'], true);
+
+ // source presence is independent of the telemetry flag:
+ // both calls should agree on whether source is present
+ self::assertSame(
+ \array_key_exists('source', $uaEnabled),
+ \array_key_exists('source', $uaDisabled),
+ 'source presence should not depend on the telemetry flag'
+ );
+ } finally {
+ Stripe::setEnableTelemetry($originalTelemetry);
+ }
+ }
+
+ public function testDefaultHeadersOmitSourceWhenPhpUnameDisabled()
+ {
+ $this->clearAgentEnvVars();
+
+ // Verify that _isDisabled correctly identifies php_uname as disabled,
+ // and that when it is, _defaultHeaders does not set source to a sentinel
+ // string — it either omits source or sets it to a valid MD5 hash.
+ //
+ // We cannot force php_uname into disable_functions at runtime (it is a
+ // PHP ini setting), and the static $cachedSource variable inside
+ // _defaultHeaders is initialised once per process, so we verify the
+ // contract indirectly: source must never be the old sentinel '(disabled)'.
+ $reflector = new \ReflectionClass(ApiRequestor::class);
+ $method = $reflector->getMethod('_defaultHeaders');
+ $method->setAccessible(true);
+
+ $headers = $method->invoke(null, 'sk_test_notarealkey');
+
+ $ua = \json_decode($headers['X-Stripe-Client-User-Agent'], true);
+ if (\array_key_exists('source', $ua)) {
+ self::assertNotSame(
+ '(disabled)',
+ $ua['source'],
+ 'source must not be set to the sentinel string "(disabled)"; it should be omitted when php_uname is disabled'
+ );
+ self::assertTrue(
+ (bool) \preg_match('/^[0-9a-f]{32}$/', $ua['source']),
+ 'When source is present it must be a 32-char lowercase hex MD5, got: ' . $ua['source']
+ );
+ } else {
+ // source is absent — this is the correct behaviour when php_uname is disabled
+ self::assertArrayNotHasKey('source', $ua);
+ }
+ }
+
public function testDefaultHeadersOmitPlatformWhenTelemetryDisabled()
{
$this->clearAgentEnvVars();
diff --git a/tests/Stripe/ApplicationFeeTest.php b/tests/Stripe/ApplicationFeeTest.php
deleted file mode 100644
index 181a5e702..000000000
--- a/tests/Stripe/ApplicationFeeTest.php
+++ /dev/null
@@ -1,78 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/application_fees'
- );
- $resources = ApplicationFee::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(ApplicationFee::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID
- );
- $resource = ApplicationFee::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(ApplicationFee::class, $resource);
- }
-
- public function testCanCreateRefund()
- {
- $this->expectsRequest(
- 'post',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID . '/refunds'
- );
- $resource = ApplicationFee::createRefund(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(ApplicationFeeRefund::class, $resource);
- }
-
- public function testCanRetrieveRefund()
- {
- $this->expectsRequest(
- 'get',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID . '/refunds/' . self::TEST_FEEREFUND_ID
- );
- $resource = ApplicationFee::retrieveRefund(self::TEST_RESOURCE_ID, self::TEST_FEEREFUND_ID);
- self::assertInstanceOf(ApplicationFeeRefund::class, $resource);
- }
-
- public function testCanUpdateRefund()
- {
- $this->expectsRequest(
- 'post',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID . '/refunds/' . self::TEST_FEEREFUND_ID
- );
- $resource = ApplicationFee::updateRefund(self::TEST_RESOURCE_ID, self::TEST_FEEREFUND_ID);
- self::assertInstanceOf(ApplicationFeeRefund::class, $resource);
- }
-
- public function testCanListRefunds()
- {
- $this->expectsRequest(
- 'get',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID . '/refunds'
- );
- $resources = ApplicationFee::allRefunds(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(ApplicationFeeRefund::class, $resources->data[0]);
- }
-}
diff --git a/tests/Stripe/BalanceTransactionTest.php b/tests/Stripe/BalanceTransactionTest.php
deleted file mode 100644
index 237ba94eb..000000000
--- a/tests/Stripe/BalanceTransactionTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/balance_transactions'
- );
- $resources = BalanceTransaction::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(BalanceTransaction::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/balance_transactions/' . self::TEST_RESOURCE_ID
- );
- $resource = BalanceTransaction::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(BalanceTransaction::class, $resource);
- }
-}
diff --git a/tests/Stripe/BillingPortal/SessionTest.php b/tests/Stripe/BillingPortal/SessionTest.php
deleted file mode 100644
index 7ac33651e..000000000
--- a/tests/Stripe/BillingPortal/SessionTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-expectsRequest(
- 'post',
- '/v1/billing_portal/sessions'
- );
- $resource = Session::create([
- 'customer' => 'cus_123',
- 'return_url' => 'https://stripe.com/return',
- ]);
- self::assertInstanceOf(Session::class, $resource);
- }
-}
diff --git a/tests/Stripe/ChargeTest.php b/tests/Stripe/ChargeTest.php
deleted file mode 100644
index 3b3a66bdc..000000000
--- a/tests/Stripe/ChargeTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/charges'
- );
- $resources = Charge::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Charge::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/charges/' . self::TEST_RESOURCE_ID
- );
- $resource = Charge::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Charge::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/charges'
- );
- $resource = Charge::create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'source' => 'tok_123',
- ]);
- self::assertInstanceOf(Charge::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Charge::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/charges/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Charge::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/charges/' . self::TEST_RESOURCE_ID
- );
- $resource = Charge::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Charge::class, $resource);
- }
-
- public function testCanCapture()
- {
- $charge = Charge::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/charges/' . $charge->id . '/capture'
- );
- $resource = $charge->capture();
- self::assertInstanceOf(Charge::class, $resource);
- self::assertSame($resource, $charge);
- }
-}
diff --git a/tests/Stripe/Checkout/SessionTest.php b/tests/Stripe/Checkout/SessionTest.php
deleted file mode 100644
index eb467417a..000000000
--- a/tests/Stripe/Checkout/SessionTest.php
+++ /dev/null
@@ -1,66 +0,0 @@
-expectsRequest(
- 'post',
- '/v1/checkout/sessions'
- );
- $resource = Session::create([
- 'cancel_url' => 'https://stripe.com/cancel',
- 'client_reference_id' => '1234',
- 'line_items' => [
- [
- 'amount' => 123,
- 'currency' => 'usd',
- 'description' => 'item 1',
- 'images' => [
- 'https://stripe.com/img1',
- ],
- 'name' => 'name',
- 'quantity' => 2,
- ],
- ],
- 'payment_intent_data' => [
- 'receipt_email' => 'test@stripe.com',
- ],
- 'payment_method_types' => ['card'],
- 'success_url' => 'https://stripe.com/success',
- ]);
- self::assertInstanceOf(Session::class, $resource);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/checkout/sessions/' . self::TEST_RESOURCE_ID
- );
- $resource = Session::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Session::class, $resource);
- }
-
- public function testCanListLineItems()
- {
- $this->expectsRequest(
- 'get',
- '/v1/checkout/sessions/' . self::TEST_RESOURCE_ID . '/line_items'
- );
- $resources = Session::allLineItems(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\LineItem::class, $resources->data[0]);
- }
-}
diff --git a/tests/Stripe/CountrySpecTest.php b/tests/Stripe/CountrySpecTest.php
deleted file mode 100644
index 0fb569cc4..000000000
--- a/tests/Stripe/CountrySpecTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/country_specs'
- );
- $resources = CountrySpec::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(CountrySpec::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/country_specs/' . self::TEST_RESOURCE_ID
- );
- $resource = CountrySpec::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(CountrySpec::class, $resource);
- }
-}
diff --git a/tests/Stripe/CouponTest.php b/tests/Stripe/CouponTest.php
deleted file mode 100644
index 6ea5332c4..000000000
--- a/tests/Stripe/CouponTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/coupons'
- );
- $resources = Coupon::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Coupon::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/coupons/' . self::TEST_RESOURCE_ID
- );
- $resource = Coupon::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Coupon::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/coupons'
- );
- $resource = Coupon::create([
- 'percent_off' => 25,
- 'duration' => 'repeating',
- 'duration_in_months' => 3,
- 'id' => self::TEST_RESOURCE_ID,
- ]);
- self::assertInstanceOf(Coupon::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Coupon::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/coupons/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(Coupon::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/coupons/' . self::TEST_RESOURCE_ID
- );
- $resource = Coupon::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Coupon::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = Coupon::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/coupons/' . self::TEST_RESOURCE_ID
- );
- $resource->delete();
- self::assertInstanceOf(Coupon::class, $resource);
- }
-}
diff --git a/tests/Stripe/CreditNoteTest.php b/tests/Stripe/CreditNoteTest.php
deleted file mode 100644
index b47045083..000000000
--- a/tests/Stripe/CreditNoteTest.php
+++ /dev/null
@@ -1,109 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/credit_notes'
- );
- $resources = CreditNote::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(CreditNote::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/credit_notes/' . self::TEST_RESOURCE_ID
- );
- $resource = CreditNote::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(CreditNote::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/credit_notes'
- );
- $resource = CreditNote::create([
- 'amount' => 100,
- 'invoice' => 'in_132',
- 'reason' => 'duplicate',
- ]);
- self::assertInstanceOf(CreditNote::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = CreditNote::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/credit_notes/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(CreditNote::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/credit_notes/' . self::TEST_RESOURCE_ID
- );
- $resource = CreditNote::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(CreditNote::class, $resource);
- }
-
- public function testCanPreview()
- {
- $this->expectsRequest(
- 'get',
- '/v1/credit_notes/preview'
- );
- $resource = CreditNote::preview([
- 'amount' => 100,
- 'invoice' => 'in_123',
- ]);
- self::assertInstanceOf(CreditNote::class, $resource);
- }
-
- public function testCanVoidCreditNote()
- {
- $creditNote = CreditNote::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/credit_notes/' . $creditNote->id . '/void'
- );
- $resource = $creditNote->voidCreditNote();
- self::assertInstanceOf(CreditNote::class, $resource);
- self::assertSame($resource, $creditNote);
- }
-
- public function testCanListLines()
- {
- $this->expectsRequest(
- 'get',
- '/v1/credit_notes/' . self::TEST_RESOURCE_ID . '/lines'
- );
- $resources = CreditNote::allLines(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- }
-}
diff --git a/tests/Stripe/CustomerBalanceTransactionTest.php b/tests/Stripe/CustomerBalanceTransactionTest.php
deleted file mode 100644
index b32d213e5..000000000
--- a/tests/Stripe/CustomerBalanceTransactionTest.php
+++ /dev/null
@@ -1,25 +0,0 @@
-instanceUrl()
- );
- }
-}
diff --git a/tests/Stripe/DisputeTest.php b/tests/Stripe/DisputeTest.php
deleted file mode 100644
index 3a52d7bd2..000000000
--- a/tests/Stripe/DisputeTest.php
+++ /dev/null
@@ -1,72 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/disputes'
- );
- $resources = Dispute::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Dispute::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/disputes/' . self::TEST_RESOURCE_ID
- );
- $resource = Dispute::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Dispute::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Dispute::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/disputes/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Dispute::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/disputes/' . self::TEST_RESOURCE_ID
- );
- $resource = Dispute::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Dispute::class, $resource);
- }
-
- public function testIsClosable()
- {
- $dispute = Dispute::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/disputes/' . $dispute->id . '/close'
- );
- $resource = $dispute->close();
- self::assertInstanceOf(Dispute::class, $resource);
- self::assertSame($resource, $dispute);
- }
-}
diff --git a/tests/Stripe/EventTest.php b/tests/Stripe/EventTest.php
deleted file mode 100644
index 73a0fd5a6..000000000
--- a/tests/Stripe/EventTest.php
+++ /dev/null
@@ -1,259 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/events'
- );
- $resources = Event::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Event::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/events/' . self::TEST_RESOURCE_ID
- );
- $resource = Event::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Event::class, $resource);
- }
-
- public function testV2EventDataDeserializesIntoType()
- {
- $jsonEvent = [
- 'id' => 'evt_123',
- 'object' => 'v2.core.event',
- 'type' => 'v1.billing.meter.error_report_triggered',
- 'created' => '2022-02-15T00:27:45.330Z',
- 'related_object' => [
- 'id' => 'mtr_123',
- 'type' => 'billing.meter',
- 'url' => '/v1/billing/meters/mtr_123',
- ],
- 'data' => [
- 'reason' => [
- 'error_count' => 1,
- ],
- ],
- ];
-
- $this->stubRequest(
- 'GET',
- '/v2/core/events/evt_123',
- [],
- null,
- false,
- $jsonEvent,
- 200,
- BaseStripeClient::DEFAULT_API_BASE
- );
- $client = new StripeClient(['api_key' => 'sk_test_client']);
-
- $event = $client->v2->core->events->retrieve('evt_123');
-
- self::assertInstanceOf(Events\V1BillingMeterErrorReportTriggeredEvent::class, $event);
- self::assertInstanceOf(EventData\V1BillingMeterErrorReportTriggeredEventData::class, $event->data);
- }
-
- public function testV2EventFetchRelatedObject()
- {
- $jsonEvent = [
- 'id' => 'evt_123',
- 'object' => 'v2.core.event',
- 'type' => 'v1.billing.meter.error_report_triggered',
- 'created' => '2022-02-15T00:27:45.330Z',
- 'context' => 'acct_123',
- 'related_object' => [
- 'id' => 'mtr_123',
- 'type' => 'billing.meter',
- 'url' => '/v1/billing/meters/mtr_123',
- ],
- 'data' => [],
- ];
-
- // right now PHP only supports one request per unit test
- $fullEvent = Util\Util::convertToStripeObject($jsonEvent, [], 'v2');
- self::assertInstanceOf(Events\V1BillingMeterErrorReportTriggeredEvent::class, $fullEvent);
- $this->stubRequest(
- 'GET',
- '/v1/billing/meters/mtr_123',
- [],
- ['Stripe-Request-Trigger: event=evt_123'],
- false,
- ['object' => 'billing.meter', 'id' => 'mtr_123'],
- 200,
- MOCK_URL
- );
- /** @var V1BillingMeterErrorReportTriggeredEventNotification $fullEvent */
- $meter = $fullEvent->fetchRelatedObject();
- self::assertInstanceOf(Billing\Meter::class, $meter);
- self::assertSame('mtr_123', $meter->id);
- }
-
- public function testV2EventNotificationFetchRelatedObject()
- {
- $jsonEvent = json_encode([
- 'id' => 'evt_123',
- 'object' => 'v2.core.event',
- 'type' => 'v1.billing.meter.error_report_triggered',
- 'created' => '2022-02-15T00:27:45.330Z',
- 'context' => 'acct_123',
- 'related_object' => [
- 'id' => 'mtr_123',
- 'type' => 'billing.meter',
- 'url' => '/v1/billing/meters/mtr_123',
- ],
- ]);
-
- $this->stubRequest(
- 'GET',
- '/v1/billing/meters/mtr_123',
- [],
- ['Stripe-Request-Trigger: event=evt_123'],
- false,
- ['object' => 'billing.meter', 'id' => 'mtr_123'],
- 200,
- BaseStripeClient::DEFAULT_API_BASE
- );
- $client = new StripeClient('sk_test_123');
- $event = EventNotification::fromJson($jsonEvent, $client);
- self::assertInstanceOf(StripeContext::class, $event->context);
- self::assertInstanceOf(V1BillingMeterErrorReportTriggeredEventNotification::class, $event);
- /** @var V1BillingMeterErrorReportTriggeredEventNotification $event */
- $meter = $event->fetchRelatedObject();
- self::assertInstanceOf(Billing\Meter::class, $meter);
- self::assertSame('mtr_123', $meter->id);
- }
-
- public function testV2EventNotificationFetchEvent()
- {
- $jsonEvent = json_encode([
- 'id' => 'evt_123',
- 'object' => 'v2.core.event',
- 'type' => 'v1.billing.meter.error_report_triggered',
- 'created' => '2022-02-15T00:27:45.330Z',
- 'context' => 'acct_123',
- 'related_object' => [
- 'id' => 'mtr_123',
- 'type' => 'billing.meter',
- 'url' => '/v1/billing/meters/mtr_123',
- ],
- ]);
-
- $message = 'there was an error';
- $this->stubRequest(
- 'GET',
- '/v2/core/events/evt_123',
- [],
- ['Stripe-Context: acct_123', 'Stripe-Request-Trigger: event=evt_123'],
- false,
- ['object' => 'v2.core.event', 'type' => 'v1.billing.meter.error_report_triggered', 'id' => 'mtr_123', 'data' => ['developer_message_summary' => $message]],
- 200,
- BaseStripeClient::DEFAULT_API_BASE
- );
- $client = new StripeClient('sk_test_123');
- $eventNotif = EventNotification::fromJson($jsonEvent, $client);
- self::assertInstanceOf(StripeContext::class, $eventNotif->context);
- self::assertInstanceOf(V1BillingMeterErrorReportTriggeredEventNotification::class, $eventNotif);
- /** @var V1BillingMeterErrorReportTriggeredEventNotification $eventNotif */
- $fullEvent = $eventNotif->fetchEvent();
- self::assertInstanceOf(Events\V1BillingMeterErrorReportTriggeredEvent::class, $fullEvent);
- self::assertSame($message, $fullEvent->data->developer_message_summary);
- }
-
- public function testJsonDecodeEventNotificationObject()
- {
- $eventData = json_encode([
- 'id' => 'evt_234',
- 'object' => 'v2.core.event',
- 'type' => 'v1.billing.meter.error_report_triggered',
- 'created' => '2022-02-15T00:27:45.330Z',
- 'related_object' => [
- 'id' => 'fa_123',
- 'type' => 'financial_account',
- 'url' => '/v2/financial_accounts/fa_123',
- ],
- 'reason' => [
- 'type' => 'request',
- 'request' => [
- 'id' => 'id_123',
- 'idempotency_key' => 'key_123',
- ],
- ],
- ]);
-
- $event = EventNotification::fromJson($eventData, new StripeClient());
- self::assertNull($event->context);
- self::assertInstanceOf(V1BillingMeterErrorReportTriggeredEventNotification::class, $event);
-
- // @var V1BillingMeterErrorReportTriggeredEventNotification $event
- self::assertSame('evt_234', $event->id);
- self::assertSame('v1.billing.meter.error_report_triggered', $event->type);
- self::assertSame('2022-02-15T00:27:45.330Z', $event->created);
- self::assertSame('fa_123', $event->related_object->id);
- self::assertSame('financial_account', $event->related_object->type);
- self::assertSame('/v2/financial_accounts/fa_123', $event->related_object->url);
- self::assertInstanceOf(Reason::class, $event->reason);
- self::assertInstanceOf(ReasonRequest::class, $event->reason->request);
- self::assertInstanceOf(RelatedObject::class, $event->related_object);
- self::assertSame('id_123', $event->reason->request->id);
- self::assertSame('key_123', $event->reason->request->idempotency_key);
- }
-
- public function testJsonDecodeEventNotificationObjectWithNoRelatedObject()
- {
- $eventData = json_encode([
- 'id' => 'evt_234',
- 'object' => 'v2.core.event',
- 'type' => 'v1.billing.meter.no_meter_found',
- 'created' => '2022-02-15T00:27:45.330Z',
- ]);
-
- $event = EventNotification::fromJson($eventData, new StripeClient());
- self::assertInstanceOf(V1BillingMeterNoMeterFoundEventNotification::class, $event);
-
- // @var V1BillingMeterNoMeterFoundEventNotification $event
- self::assertSame('evt_234', $event->id);
- self::assertSame('v1.billing.meter.no_meter_found', $event->type);
- self::assertSame('2022-02-15T00:27:45.330Z', $event->created);
- }
-
- public function testJsonDecodeEventNotificationObjectWithNoReasonObject()
- {
- $eventData = json_encode([
- 'id' => 'evt_234',
- 'object' => 'v2.core.event',
- 'type' => 'imaginary',
- 'created' => '2022-02-15T00:27:45.330Z',
- ]);
-
- $event = EventNotification::fromJson($eventData, new StripeClient());
- self::assertInstanceOf(UnknownEventNotification::class, $event);
- self::assertSame('evt_234', $event->id);
- self::assertSame('imaginary', $event->type);
- self::assertSame('2022-02-15T00:27:45.330Z', $event->created);
- self::assertNull($event->reason);
- }
-}
diff --git a/tests/Stripe/FileLinkTest.php b/tests/Stripe/FileLinkTest.php
deleted file mode 100644
index 6a74a9c89..000000000
--- a/tests/Stripe/FileLinkTest.php
+++ /dev/null
@@ -1,72 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/file_links'
- );
- $resources = FileLink::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(FileLink::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/file_links/' . self::TEST_RESOURCE_ID
- );
- $resource = FileLink::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(FileLink::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/file_links'
- );
- $resource = FileLink::create([
- 'file' => 'file_123',
- ]);
- self::assertInstanceOf(FileLink::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = FileLink::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/file_links/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(FileLink::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/file_links/' . self::TEST_RESOURCE_ID
- );
- $resource = FileLink::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(FileLink::class, $resource);
- }
-}
diff --git a/tests/Stripe/FileTest.php b/tests/Stripe/FileTest.php
deleted file mode 100644
index 58707e437..000000000
--- a/tests/Stripe/FileTest.php
+++ /dev/null
@@ -1,52 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/files'
- );
- $resources = File::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(File::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/files/' . self::TEST_RESOURCE_ID
- );
- $resource = File::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(File::class, $resource);
- }
-
- public function testDeserializesFromFile()
- {
- $obj = Util\Util::convertToStripeObject([
- 'object' => 'file',
- ], null);
- self::assertInstanceOf(File::class, $obj);
- }
-
- public function testDeserializesFromFileUpload()
- {
- $obj = Util\Util::convertToStripeObject([
- 'object' => 'file_upload',
- ], null);
- self::assertInstanceOf(File::class, $obj);
- }
-}
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index 62b6a32ee..906d582d5 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -5662,6 +5662,7 @@ public function testV2CommerceProductCatalogImportGet()
'id' => 'obj_123',
'livemode' => [],
'metadata' => ['key' => 'metadata'],
+ 'mode' => 'upsert',
'status' => 'awaiting_upload',
],
],
@@ -5695,6 +5696,7 @@ public function testV2CommerceProductCatalogImportPost()
'id' => 'obj_123',
'livemode' => [],
'metadata' => ['key' => 'metadata'],
+ 'mode' => 'upsert',
'status' => 'awaiting_upload',
],
200,
@@ -5723,6 +5725,7 @@ public function testV2CommerceProductCatalogImportGet2()
'id' => 'obj_123',
'livemode' => [],
'metadata' => ['key' => 'metadata'],
+ 'mode' => 'upsert',
'status' => 'awaiting_upload',
],
200,
@@ -5747,7 +5750,7 @@ public function testV2CoreAccountGet()
'data' => [
'0' => [
'object' => 'v2.core.account',
- 'applied_configurations' => ['0' => 'storer'],
+ 'applied_configurations' => ['0' => 'money_manager'],
'created' => '1970-01-12T21:42:34.472Z',
'id' => 'obj_123',
'livemode' => [],
@@ -5774,7 +5777,7 @@ public function testV2CoreAccountPost()
false,
[
'object' => 'v2.core.account',
- 'applied_configurations' => ['0' => 'storer'],
+ 'applied_configurations' => ['0' => 'money_manager'],
'created' => '1970-01-12T21:42:34.472Z',
'id' => 'obj_123',
'livemode' => [],
@@ -5796,7 +5799,7 @@ public function testV2CoreAccountGet2()
false,
[
'object' => 'v2.core.account',
- 'applied_configurations' => ['0' => 'storer'],
+ 'applied_configurations' => ['0' => 'money_manager'],
'created' => '1970-01-12T21:42:34.472Z',
'id' => 'obj_123',
'livemode' => [],
@@ -5818,7 +5821,7 @@ public function testV2CoreAccountPost2()
false,
[
'object' => 'v2.core.account',
- 'applied_configurations' => ['0' => 'storer'],
+ 'applied_configurations' => ['0' => 'money_manager'],
'created' => '1970-01-12T21:42:34.472Z',
'id' => 'obj_123',
'livemode' => [],
@@ -5840,7 +5843,7 @@ public function testV2CoreAccountPost3()
false,
[
'object' => 'v2.core.account',
- 'applied_configurations' => ['0' => 'storer'],
+ 'applied_configurations' => ['0' => 'money_manager'],
'created' => '1970-01-12T21:42:34.472Z',
'id' => 'obj_123',
'livemode' => [],
@@ -6054,7 +6057,7 @@ public function testV2CoreAccountLinkPost()
'fields' => 'eventually_due',
'future_requirements' => 'include',
],
- 'configurations' => ['storer'],
+ 'configurations' => ['merchant'],
'refresh_url' => 'refresh_url',
'return_url' => 'return_url',
],
@@ -6063,7 +6066,7 @@ public function testV2CoreAccountLinkPost()
'fields' => 'eventually_due',
'future_requirements' => 'include',
],
- 'configurations' => ['storer'],
+ 'configurations' => ['merchant'],
'refresh_url' => 'refresh_url',
'return_url' => 'return_url',
],
@@ -6092,7 +6095,7 @@ public function testV2CoreAccountLinkPost()
'fields' => 'eventually_due',
'future_requirements' => 'include',
],
- 'configurations' => ['storer'],
+ 'configurations' => ['merchant'],
'refresh_url' => 'refresh_url',
'return_url' => 'return_url',
],
@@ -6101,7 +6104,7 @@ public function testV2CoreAccountLinkPost()
'fields' => 'eventually_due',
'future_requirements' => 'include',
],
- 'configurations' => ['storer'],
+ 'configurations' => ['merchant'],
'refresh_url' => 'refresh_url',
'return_url' => 'return_url',
],
@@ -6170,7 +6173,6 @@ public function testV2CoreBatchJobPost()
'http_method' => 'delete',
'path' => '/v1/subscriptions/:subscription_exposed_id',
],
- 'metadata' => ['key' => 'metadata'],
'skip_validation' => true,
],
[],
@@ -6180,7 +6182,6 @@ public function testV2CoreBatchJobPost()
'created' => '1970-01-12T21:42:34.472Z',
'id' => 'obj_123',
'livemode' => [],
- 'maximum_rps' => [],
'metadata' => ['key' => 'metadata'],
'skip_validation' => [],
'status' => 'batch_failed',
@@ -6193,7 +6194,6 @@ public function testV2CoreBatchJobPost()
'http_method' => 'delete',
'path' => '/v1/subscriptions/:subscription_exposed_id',
],
- 'metadata' => ['key' => 'metadata'],
'skip_validation' => true,
]);
self::assertInstanceOf(V2\Core\BatchJob::class, $result);
@@ -6212,7 +6212,6 @@ public function testV2CoreBatchJobGet()
'created' => '1970-01-12T21:42:34.472Z',
'id' => 'obj_123',
'livemode' => [],
- 'maximum_rps' => [],
'metadata' => ['key' => 'metadata'],
'skip_validation' => [],
'status' => 'batch_failed',
@@ -6237,7 +6236,6 @@ public function testV2CoreBatchJobPost2()
'created' => '1970-01-12T21:42:34.472Z',
'id' => 'obj_123',
'livemode' => [],
- 'maximum_rps' => [],
'metadata' => ['key' => 'metadata'],
'skip_validation' => [],
'status' => 'batch_failed',
@@ -9493,20 +9491,8 @@ public function testCannotProceedError()
{
$this->stubRequest(
'post',
- '/v2/extend/workflows/id_123/invoke',
- [
- 'input_parameters' => [
- 'int_key' => 123,
- 'string_key' => 'value',
- 'boolean_key' => true,
- 'object_key' => [
- 'object_int_key' => 123,
- 'object_string_key' => 'value',
- 'object_boolean_key' => true,
- ],
- 'array_key' => [1, 2, 3],
- ],
- ],
+ '/v2/core/vault/us_bank_accounts/id_123/archive',
+ [],
[],
false,
[
@@ -9520,22 +9506,7 @@ public function testCannotProceedError()
);
try {
- $this->v2Client->v2->extend->workflows->invoke(
- 'id_123',
- [
- 'input_parameters' => [
- 'int_key' => 123,
- 'string_key' => 'value',
- 'boolean_key' => true,
- 'object_key' => [
- 'object_int_key' => 123,
- 'object_string_key' => 'value',
- 'object_boolean_key' => true,
- ],
- 'array_key' => [1, 2, 3],
- ],
- ]
- );
+ $this->v2Client->v2->core->vault->usBankAccounts->archive('id_123', []);
} catch (Exception\CannotProceedException $e) {
}
}
diff --git a/tests/Stripe/Identity/VerificationReportTest.php b/tests/Stripe/Identity/VerificationReportTest.php
deleted file mode 100644
index 7b43b99b3..000000000
--- a/tests/Stripe/Identity/VerificationReportTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/identity/verification_reports'
- );
- $resources = VerificationReport::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(VerificationReport::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/identity/verification_reports/' . self::TEST_RESOURCE_ID
- );
- $resource = VerificationReport::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(VerificationReport::class, $resource);
- }
-}
diff --git a/tests/Stripe/Identity/VerificationSessionTest.php b/tests/Stripe/Identity/VerificationSessionTest.php
deleted file mode 100644
index 4b282d0e0..000000000
--- a/tests/Stripe/Identity/VerificationSessionTest.php
+++ /dev/null
@@ -1,81 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/identity/verification_sessions'
- );
- $resources = VerificationSession::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(VerificationSession::class, $resources->data[0]);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions'
- );
- $resource = VerificationSession::create([
- 'type' => 'id_number',
- ]);
- self::assertInstanceOf(VerificationSession::class, $resource);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/identity/verification_sessions/' . self::TEST_RESOURCE_ID
- );
- $resource = VerificationSession::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(VerificationSession::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions/' . self::TEST_RESOURCE_ID
- );
- $resource = VerificationSession::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(VerificationSession::class, $resource);
- }
-
- public function testIsCancelable()
- {
- $resource = VerificationSession::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource->cancel();
- self::assertInstanceOf(VerificationSession::class, $resource);
- }
-
- public function testIsRedactable()
- {
- $resource = VerificationSession::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions/' . self::TEST_RESOURCE_ID . '/redact'
- );
- $resource->redact();
- self::assertInstanceOf(VerificationSession::class, $resource);
- }
-}
diff --git a/tests/Stripe/InvoiceItemTest.php b/tests/Stripe/InvoiceItemTest.php
deleted file mode 100644
index e44bd43cb..000000000
--- a/tests/Stripe/InvoiceItemTest.php
+++ /dev/null
@@ -1,85 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/invoiceitems'
- );
- $resources = InvoiceItem::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(InvoiceItem::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/invoiceitems/' . self::TEST_RESOURCE_ID
- );
- $resource = InvoiceItem::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(InvoiceItem::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoiceitems'
- );
- $resource = InvoiceItem::create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'customer' => 'cus_123',
- ]);
- self::assertInstanceOf(InvoiceItem::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = InvoiceItem::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/invoiceitems/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(InvoiceItem::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoiceitems/' . self::TEST_RESOURCE_ID
- );
- $resource = InvoiceItem::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(InvoiceItem::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $invoiceItem = InvoiceItem::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/invoiceitems/' . $invoiceItem->id
- );
- $resource = $invoiceItem->delete();
- self::assertInstanceOf(InvoiceItem::class, $resource);
- }
-}
diff --git a/tests/Stripe/InvoiceTest.php b/tests/Stripe/InvoiceTest.php
deleted file mode 100644
index 405397a34..000000000
--- a/tests/Stripe/InvoiceTest.php
+++ /dev/null
@@ -1,154 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/invoices'
- );
- $resources = Invoice::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Invoice::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/invoices/' . self::TEST_RESOURCE_ID
- );
- $resource = Invoice::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Invoice::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoices'
- );
- $resource = Invoice::create([
- 'customer' => 'cus_123',
- ]);
- self::assertInstanceOf(Invoice::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Invoice::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Invoice::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . self::TEST_RESOURCE_ID
- );
- $resource = Invoice::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Invoice::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = Invoice::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/invoices/' . self::TEST_RESOURCE_ID
- );
- $resource->delete();
- self::assertInstanceOf(Invoice::class, $resource);
- }
-
- public function testCanFinalizeInvoice()
- {
- $invoice = Invoice::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . $invoice->id . '/finalize'
- );
- $resource = $invoice->finalizeInvoice();
- self::assertInstanceOf(Invoice::class, $resource);
- self::assertSame($resource, $invoice);
- }
-
- public function testCanMarkUncollectible()
- {
- $invoice = Invoice::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . $invoice->id . '/mark_uncollectible'
- );
- $resource = $invoice->markUncollectible();
- self::assertInstanceOf(Invoice::class, $resource);
- self::assertSame($resource, $invoice);
- }
-
- public function testCanPay()
- {
- $invoice = Invoice::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . $invoice->id . '/pay'
- );
- $resource = $invoice->pay();
- self::assertInstanceOf(Invoice::class, $resource);
- self::assertSame($resource, $invoice);
- }
-
- public function testCanSendInvoice()
- {
- $invoice = Invoice::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . $invoice->id . '/send'
- );
- $resource = $invoice->sendInvoice();
- self::assertInstanceOf(Invoice::class, $resource);
- self::assertSame($resource, $invoice);
- }
-
- public function testCanVoidInvoice()
- {
- $invoice = Invoice::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . $invoice->id . '/void'
- );
- $resource = $invoice->voidInvoice();
- self::assertInstanceOf(Invoice::class, $resource);
- self::assertSame($resource, $invoice);
- }
-
- public function testCanListLines()
- {
- $this->expectsRequest(
- 'get',
- '/v1/invoices/' . self::TEST_RESOURCE_ID . '/lines'
- );
- $resources = Invoice::allLines(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- }
-}
diff --git a/tests/Stripe/Issuing/AuthorizationTest.php b/tests/Stripe/Issuing/AuthorizationTest.php
deleted file mode 100644
index f42c21750..000000000
--- a/tests/Stripe/Issuing/AuthorizationTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/issuing/authorizations'
- );
- $resources = Authorization::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Authorization::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/authorizations/' . self::TEST_RESOURCE_ID
- );
- $resource = Authorization::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Authorization::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Authorization::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/authorizations/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(Authorization::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/authorizations/' . self::TEST_RESOURCE_ID,
- ['metadata' => ['key' => 'value']]
- );
- $resource = Authorization::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Authorization::class, $resource);
- }
-
- public function testIsApprovable()
- {
- $resource = Authorization::retrieve(self::TEST_RESOURCE_ID);
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/authorizations/' . self::TEST_RESOURCE_ID . '/approve'
- );
- $resource = $resource->approve();
- self::assertInstanceOf(Authorization::class, $resource);
- }
-
- public function testIsDeclinable()
- {
- $resource = Authorization::retrieve(self::TEST_RESOURCE_ID);
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/authorizations/' . self::TEST_RESOURCE_ID . '/decline'
- );
- $resource = $resource->decline();
- self::assertInstanceOf(Authorization::class, $resource);
- }
-}
diff --git a/tests/Stripe/Issuing/CardTest.php b/tests/Stripe/Issuing/CardTest.php
deleted file mode 100644
index 0da9598d9..000000000
--- a/tests/Stripe/Issuing/CardTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/issuing/cards'
- );
- $resources = Card::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Card::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/cards/' . self::TEST_RESOURCE_ID
- );
- $resource = Card::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Card::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Card::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/cards/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(Card::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/cards/' . self::TEST_RESOURCE_ID,
- ['metadata' => ['key' => 'value']]
- );
- $resource = Card::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Card::class, $resource);
- }
-}
diff --git a/tests/Stripe/Issuing/CardholderTest.php b/tests/Stripe/Issuing/CardholderTest.php
deleted file mode 100644
index 066f34bb9..000000000
--- a/tests/Stripe/Issuing/CardholderTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
- [
- 'address' => [
- 'city' => 'city',
- 'country' => 'US',
- 'line1' => 'line1',
- 'postal_code' => 'postal_code',
- ],
- ],
- 'name' => 'Cardholder Name',
- 'type' => 'individual',
- ];
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/cardholders',
- $params
- );
- $resource = Cardholder::create($params);
- self::assertInstanceOf(Cardholder::class, $resource);
- }
-
- public function testIsListable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/cardholders'
- );
- $resources = Cardholder::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Cardholder::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/cardholders/' . self::TEST_RESOURCE_ID
- );
- $resource = Cardholder::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Cardholder::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Cardholder::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/cardholders/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(Cardholder::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/cardholders/' . self::TEST_RESOURCE_ID,
- ['metadata' => ['key' => 'value']]
- );
- $resource = Cardholder::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Cardholder::class, $resource);
- }
-}
diff --git a/tests/Stripe/Issuing/DisputeTest.php b/tests/Stripe/Issuing/DisputeTest.php
deleted file mode 100644
index 357bc0862..000000000
--- a/tests/Stripe/Issuing/DisputeTest.php
+++ /dev/null
@@ -1,73 +0,0 @@
- 'ipi_123',
- ];
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/disputes',
- $params
- );
- $resource = Dispute::create($params);
- self::assertInstanceOf(Dispute::class, $resource);
- }
-
- public function testIsListable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/disputes'
- );
- $resources = Dispute::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Dispute::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/disputes/' . self::TEST_RESOURCE_ID
- );
- $resource = Dispute::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Dispute::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/disputes/' . self::TEST_RESOURCE_ID,
- []
- );
- $resource = Dispute::update(self::TEST_RESOURCE_ID, []);
- self::assertInstanceOf(Dispute::class, $resource);
- }
-
- public function testIsSubmittable()
- {
- $resource = Dispute::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/issuing/disputes/' . self::TEST_RESOURCE_ID . '/submit'
- );
- $resource->submit();
- self::assertInstanceOf(Dispute::class, $resource);
- }
-}
diff --git a/tests/Stripe/Issuing/TransactionTest.php b/tests/Stripe/Issuing/TransactionTest.php
deleted file mode 100644
index 5f4c378e4..000000000
--- a/tests/Stripe/Issuing/TransactionTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/issuing/transactions'
- );
- $resources = Transaction::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Transaction::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/transactions/' . self::TEST_RESOURCE_ID
- );
- $resource = Transaction::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Transaction::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Transaction::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/transactions/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(Transaction::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/transactions/' . self::TEST_RESOURCE_ID,
- ['metadata' => ['key' => 'value']]
- );
- $resource = Transaction::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Transaction::class, $resource);
- }
-}
diff --git a/tests/Stripe/MandateTest.php b/tests/Stripe/MandateTest.php
deleted file mode 100644
index aa0d62a91..000000000
--- a/tests/Stripe/MandateTest.php
+++ /dev/null
@@ -1,25 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/mandates/' . self::TEST_RESOURCE_ID
- );
- $resource = Mandate::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Mandate::class, $resource);
- }
-}
diff --git a/tests/Stripe/PaymentIntentTest.php b/tests/Stripe/PaymentIntentTest.php
deleted file mode 100644
index 1892a4716..000000000
--- a/tests/Stripe/PaymentIntentTest.php
+++ /dev/null
@@ -1,110 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/payment_intents'
- );
- $resources = PaymentIntent::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(PaymentIntent::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID
- );
- $resource = PaymentIntent::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(PaymentIntent::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents'
- );
- $resource = PaymentIntent::create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'payment_method_types' => ['card'],
- ]);
- self::assertInstanceOf(PaymentIntent::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = PaymentIntent::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(PaymentIntent::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID
- );
- $resource = PaymentIntent::update(
- self::TEST_RESOURCE_ID,
- [
- 'metadata' => ['key' => 'value'],
- ]
- );
- self::assertInstanceOf(PaymentIntent::class, $resource);
- }
-
- public function testIsCancelable()
- {
- $resource = PaymentIntent::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource->cancel();
- self::assertInstanceOf(PaymentIntent::class, $resource);
- }
-
- public function testIsCapturable()
- {
- $resource = PaymentIntent::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID . '/capture'
- );
- $resource->capture();
- self::assertInstanceOf(PaymentIntent::class, $resource);
- }
-
- public function testIsConfirmable()
- {
- $resource = PaymentIntent::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID . '/confirm'
- );
- $resource->confirm();
- self::assertInstanceOf(PaymentIntent::class, $resource);
- }
-}
diff --git a/tests/Stripe/PaymentMethodTest.php b/tests/Stripe/PaymentMethodTest.php
deleted file mode 100644
index e44af1e32..000000000
--- a/tests/Stripe/PaymentMethodTest.php
+++ /dev/null
@@ -1,101 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/payment_methods'
- );
- $resources = PaymentMethod::all([
- 'customer' => 'cus_123',
- 'type' => 'card',
- ]);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(PaymentMethod::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/payment_methods/' . self::TEST_RESOURCE_ID
- );
- $resource = PaymentMethod::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(PaymentMethod::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_methods'
- );
- $resource = PaymentMethod::create([
- 'type' => 'card',
- ]);
- self::assertInstanceOf(PaymentMethod::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = PaymentMethod::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/payment_methods/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(PaymentMethod::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_methods/' . self::TEST_RESOURCE_ID
- );
- $resource = PaymentMethod::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(PaymentMethod::class, $resource);
- }
-
- public function testCanAttach()
- {
- $resource = PaymentMethod::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/payment_methods/' . $resource->id . '/attach'
- );
- $resource = $resource->attach([
- 'customer' => 'cus_123',
- ]);
- self::assertInstanceOf(PaymentMethod::class, $resource);
- self::assertSame($resource, $resource);
- }
-
- public function testCanDetach()
- {
- $resource = PaymentMethod::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/payment_methods/' . $resource->id . '/detach'
- );
- $resource = $resource->detach();
- self::assertInstanceOf(PaymentMethod::class, $resource);
- self::assertSame($resource, $resource);
- }
-}
diff --git a/tests/Stripe/PayoutTest.php b/tests/Stripe/PayoutTest.php
deleted file mode 100644
index c8d64c1c1..000000000
--- a/tests/Stripe/PayoutTest.php
+++ /dev/null
@@ -1,95 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/payouts'
- );
- $resources = Payout::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Payout::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/payouts/' . self::TEST_RESOURCE_ID
- );
- $resource = Payout::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Payout::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payouts'
- );
- $resource = Payout::create([
- 'amount' => 100,
- 'currency' => 'usd',
- ]);
- self::assertInstanceOf(Payout::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Payout::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/payouts/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Payout::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payouts/' . self::TEST_RESOURCE_ID
- );
- $resource = Payout::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Payout::class, $resource);
- }
-
- public function testIsCancelable()
- {
- $resource = Payout::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/payouts/' . $resource->id . '/cancel'
- );
- $resource->cancel();
- self::assertInstanceOf(Payout::class, $resource);
- }
-
- public function testIsReverseable()
- {
- $resource = Payout::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/payouts/' . $resource->id . '/reverse'
- );
- $resource->reverse();
- self::assertInstanceOf(Payout::class, $resource);
- }
-}
diff --git a/tests/Stripe/PlanTest.php b/tests/Stripe/PlanTest.php
deleted file mode 100644
index 5a27de5e7..000000000
--- a/tests/Stripe/PlanTest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/plans'
- );
- $resources = Plan::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Plan::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/plans/' . self::TEST_RESOURCE_ID
- );
- $resource = Plan::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Plan::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/plans'
- );
- $resource = Plan::create([
- 'amount' => 100,
- 'interval' => 'month',
- 'currency' => 'usd',
- 'nickname' => self::TEST_RESOURCE_ID,
- 'id' => self::TEST_RESOURCE_ID,
- ]);
- self::assertInstanceOf(Plan::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Plan::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/plans/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Plan::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/plans/' . self::TEST_RESOURCE_ID
- );
- $resource = Plan::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Plan::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = Plan::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/plans/' . $resource->id
- );
- $resource->delete();
- self::assertInstanceOf(Plan::class, $resource);
- }
-}
diff --git a/tests/Stripe/PriceTest.php b/tests/Stripe/PriceTest.php
deleted file mode 100644
index 328788735..000000000
--- a/tests/Stripe/PriceTest.php
+++ /dev/null
@@ -1,79 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/prices'
- );
- $resources = Price::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Price::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/prices/' . self::TEST_RESOURCE_ID
- );
- $resource = Price::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Price::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/prices'
- );
- $resource = Price::create([
- 'unit_amount' => 2000,
- 'currency' => 'usd',
- 'recurring' => [
- 'interval' => 'month',
- ],
- 'product_data' => [
- 'name' => 'Product Name',
- ],
- ]);
- self::assertInstanceOf(Price::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Price::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/prices/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Price::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/prices/' . self::TEST_RESOURCE_ID
- );
- $resource = Price::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Price::class, $resource);
- }
-}
diff --git a/tests/Stripe/ProductTest.php b/tests/Stripe/ProductTest.php
deleted file mode 100644
index d650d9413..000000000
--- a/tests/Stripe/ProductTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/products'
- );
- $resources = Product::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Product::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/products/' . self::TEST_RESOURCE_ID
- );
- $resource = Product::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Product::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/products'
- );
- $resource = Product::create([
- 'name' => 'name',
- ]);
- self::assertInstanceOf(Product::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Product::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/products/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Product::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/products/' . self::TEST_RESOURCE_ID
- );
- $resource = Product::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Product::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = Product::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/products/' . $resource->id
- );
- $resource->delete();
- self::assertInstanceOf(Product::class, $resource);
- }
-}
diff --git a/tests/Stripe/QuoteTest.php b/tests/Stripe/QuoteTest.php
deleted file mode 100644
index 92b818441..000000000
--- a/tests/Stripe/QuoteTest.php
+++ /dev/null
@@ -1,137 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/quotes'
- );
- $resources = Quote::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Quote::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/quotes/' . self::TEST_RESOURCE_ID
- );
- $resource = Quote::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Quote::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/quotes'
- );
- $resource = Quote::create([
- 'customer' => 'cus_xyz',
- 'line_items' => [
- ['price' => 'price_abc', 'quantity' => 5],
- ['price' => 'price_xyz'],
- ],
- ]);
- self::assertInstanceOf(Quote::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Quote::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/quotes/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(Quote::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/quotes/' . self::TEST_RESOURCE_ID
- );
- $resource = Quote::update(
- self::TEST_RESOURCE_ID,
- [
- 'metadata' => ['key' => 'value'],
- ]
- );
- self::assertInstanceOf(Quote::class, $resource);
- }
-
- public function testIsAcceptable()
- {
- $resource = Quote::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/accept'
- );
- $resource->accept();
- self::assertInstanceOf(Quote::class, $resource);
- }
-
- public function testIsCancelable()
- {
- $resource = Quote::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource->cancel();
- self::assertInstanceOf(Quote::class, $resource);
- }
-
- public function testIsFinalizable()
- {
- $resource = Quote::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/finalize'
- );
- $resource->finalizeQuote();
- self::assertInstanceOf(Quote::class, $resource);
- }
-
- public function testCanListLineItems()
- {
- $this->expectsRequest(
- 'get',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/line_items'
- );
- $resources = Quote::allLineItems(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- }
-
- public function testCanPdf()
- {
- $resource = Quote::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequestStream(
- 'get',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/pdf',
- null
- );
- $output = '';
- $resource->pdf(static function ($chunk) use (&$output) {
- $output .= $chunk;
- });
- self::assertSame('Stripe binary response', $output);
- }
-}
diff --git a/tests/Stripe/Radar/EarlyFraudWarningTest.php b/tests/Stripe/Radar/EarlyFraudWarningTest.php
deleted file mode 100644
index 9ac9a5aae..000000000
--- a/tests/Stripe/Radar/EarlyFraudWarningTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/radar/early_fraud_warnings'
- );
- $resources = EarlyFraudWarning::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(EarlyFraudWarning::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/early_fraud_warnings/' . self::TEST_RESOURCE_ID
- );
- $resource = EarlyFraudWarning::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(EarlyFraudWarning::class, $resource);
- }
-}
diff --git a/tests/Stripe/Radar/ValueListItemTest.php b/tests/Stripe/Radar/ValueListItemTest.php
deleted file mode 100644
index f391cbfb1..000000000
--- a/tests/Stripe/Radar/ValueListItemTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/radar/value_list_items'
- );
- $resources = ValueListItem::all([
- 'value_list' => 'rsl_123',
- ]);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(ValueListItem::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/value_list_items/' . self::TEST_RESOURCE_ID
- );
- $resource = ValueListItem::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(ValueListItem::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/radar/value_list_items'
- );
- $resource = ValueListItem::create([
- 'value_list' => 'rsl_123',
- 'value' => 'value',
- ]);
- self::assertInstanceOf(ValueListItem::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = ValueListItem::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/radar/value_list_items/' . self::TEST_RESOURCE_ID
- );
- $resource->delete();
- self::assertInstanceOf(ValueListItem::class, $resource);
- }
-}
diff --git a/tests/Stripe/Radar/ValueListTest.php b/tests/Stripe/Radar/ValueListTest.php
deleted file mode 100644
index 9ebc48774..000000000
--- a/tests/Stripe/Radar/ValueListTest.php
+++ /dev/null
@@ -1,84 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/radar/value_lists'
- );
- $resources = ValueList::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(ValueList::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/value_lists/' . self::TEST_RESOURCE_ID
- );
- $resource = ValueList::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(ValueList::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/radar/value_lists'
- );
- $resource = ValueList::create([
- 'alias' => 'alias',
- 'name' => 'name',
- ]);
- self::assertInstanceOf(ValueList::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = ValueList::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/radar/value_lists/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(ValueList::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/radar/value_lists/' . self::TEST_RESOURCE_ID
- );
- $resource = ValueList::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(ValueList::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = ValueList::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/radar/value_lists/' . self::TEST_RESOURCE_ID
- );
- $resource->delete();
- self::assertInstanceOf(ValueList::class, $resource);
- }
-}
diff --git a/tests/Stripe/RefundTest.php b/tests/Stripe/RefundTest.php
deleted file mode 100644
index 2f02b9a81..000000000
--- a/tests/Stripe/RefundTest.php
+++ /dev/null
@@ -1,72 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/refunds'
- );
- $resources = Refund::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Refund::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/refunds/' . self::TEST_RESOURCE_ID
- );
- $resource = Refund::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Refund::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/refunds'
- );
- $resource = Refund::create([
- 'charge' => 'ch_123',
- ]);
- self::assertInstanceOf(Refund::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Refund::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/refunds/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Refund::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/refunds/' . self::TEST_RESOURCE_ID
- );
- $resource = Refund::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Refund::class, $resource);
- }
-}
diff --git a/tests/Stripe/Reporting/ReportRunTest.php b/tests/Stripe/Reporting/ReportRunTest.php
deleted file mode 100644
index 641726070..000000000
--- a/tests/Stripe/Reporting/ReportRunTest.php
+++ /dev/null
@@ -1,54 +0,0 @@
- [
- 'connected_account' => 'acct_123',
- ],
- 'report_type' => 'activity.summary.1',
- ];
-
- $this->expectsRequest(
- 'post',
- '/v1/reporting/report_runs',
- $params
- );
- $resource = ReportRun::create($params);
- self::assertInstanceOf(ReportRun::class, $resource);
- }
-
- public function testIsListable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reporting/report_runs'
- );
- $resources = ReportRun::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(ReportRun::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reporting/report_runs/' . self::TEST_RESOURCE_ID
- );
- $resource = ReportRun::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(ReportRun::class, $resource);
- }
-}
diff --git a/tests/Stripe/Reporting/ReportTypeTest.php b/tests/Stripe/Reporting/ReportTypeTest.php
deleted file mode 100644
index d47d8093f..000000000
--- a/tests/Stripe/Reporting/ReportTypeTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/reporting/report_types'
- );
- $resources = ReportType::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(ReportType::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reporting/report_types/' . self::TEST_RESOURCE_ID
- );
- $resource = ReportType::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(ReportType::class, $resource);
- }
-}
diff --git a/tests/Stripe/ReviewTest.php b/tests/Stripe/ReviewTest.php
deleted file mode 100644
index e72ce99b5..000000000
--- a/tests/Stripe/ReviewTest.php
+++ /dev/null
@@ -1,47 +0,0 @@
-expectsRequest(
- 'post',
- '/v1/reviews/' . self::TEST_RESOURCE_ID . '/approve'
- );
- $resource->approve();
- self::assertInstanceOf(Review::class, $resource);
- }
-
- public function testIsListable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reviews'
- );
- $resources = Review::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Review::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reviews/' . self::TEST_RESOURCE_ID
- );
- $resource = Review::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Review::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/AccountLinkServiceTest.php b/tests/Stripe/Service/AccountLinkServiceTest.php
deleted file mode 100644
index 31bb54957..000000000
--- a/tests/Stripe/Service/AccountLinkServiceTest.php
+++ /dev/null
@@ -1,43 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new AccountLinkService($this->client);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/account_links'
- );
- $resource = $this->service->create([
- 'account' => 'acct_123',
- 'refresh_url' => 'https://stripe.com/refresh_url',
- 'return_url' => 'https://stripe.com/return_url',
- 'type' => 'account_onboarding',
- ]);
- self::assertInstanceOf(\Stripe\AccountLink::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/AccountServiceTest.php b/tests/Stripe/Service/AccountServiceTest.php
deleted file mode 100644
index 7630dc044..000000000
--- a/tests/Stripe/Service/AccountServiceTest.php
+++ /dev/null
@@ -1,266 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new AccountService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/accounts'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Account::class, $resources->data[0]);
- }
-
- public function testAllCapabilities()
- {
- $this->expectsRequest(
- 'get',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/capabilities'
- );
- $resources = $this->service->allCapabilities(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Capability::class, $resources->data[0]);
- }
-
- public function testAllExternalAccounts()
- {
- $this->expectsRequest(
- 'get',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/external_accounts'
- );
- $resources = $this->service->allExternalAccounts(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\BankAccount::class, $resources->data[0]);
- }
-
- public function testAllPersons()
- {
- $this->expectsRequest(
- 'get',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/persons'
- );
- $resources = $this->service->allPersons(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Person::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/accounts'
- );
- $resource = $this->service->create(['type' => 'custom']);
- self::assertInstanceOf(\Stripe\Account::class, $resource);
- }
-
- public function testCreateExternalAccount()
- {
- $this->expectsRequest(
- 'post',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/external_accounts'
- );
- $resource = $this->service->createExternalAccount(self::TEST_RESOURCE_ID, [
- 'external_account' => 'btok_123',
- ]);
- self::assertInstanceOf(\Stripe\BankAccount::class, $resource);
- }
-
- public function testCreateLoginLink()
- {
- $this->expectsRequest(
- 'post',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/login_links'
- );
- $resource = $this->service->createLoginLink(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\LoginLink::class, $resource);
- }
-
- public function testCreatePerson()
- {
- $this->expectsRequest(
- 'post',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/persons'
- );
- $resource = $this->service->createPerson(self::TEST_RESOURCE_ID, [
- 'dob' => [
- 'day' => 1,
- 'month' => 1,
- 'year' => 1980,
- ],
- ]);
- self::assertInstanceOf(\Stripe\Person::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/accounts/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Account::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-
- public function testDeleteExternalAccount()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/external_accounts/' . self::TEST_EXTERNALACCOUNT_ID
- );
- $resource = $this->service->deleteExternalAccount(self::TEST_RESOURCE_ID, self::TEST_EXTERNALACCOUNT_ID);
- self::assertInstanceOf(\Stripe\BankAccount::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-
- public function testDeletePerson()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/persons/' . self::TEST_PERSON_ID
- );
- $resource = $this->service->deletePerson(self::TEST_RESOURCE_ID, self::TEST_PERSON_ID);
- self::assertInstanceOf(\Stripe\Person::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-
- public function testReject()
- {
- $this->expectsRequest(
- 'post',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/reject'
- );
- $resource = $this->service->reject(self::TEST_RESOURCE_ID, ['reason' => 'fraud']);
- self::assertInstanceOf(\Stripe\Account::class, $resource);
- }
-
- public function testRetrieveCapability()
- {
- $this->expectsRequest(
- 'get',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/capabilities/' . self::TEST_CAPABILITY_ID
- );
- $resource = $this->service->retrieveCapability(self::TEST_RESOURCE_ID, self::TEST_CAPABILITY_ID);
- self::assertInstanceOf(\Stripe\Capability::class, $resource);
- }
-
- public function testRetrieveExternalAccount()
- {
- $this->expectsRequest(
- 'get',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/external_accounts/' . self::TEST_EXTERNALACCOUNT_ID
- );
- $resource = $this->service->retrieveExternalAccount(self::TEST_RESOURCE_ID, self::TEST_EXTERNALACCOUNT_ID);
- self::assertInstanceOf(\Stripe\BankAccount::class, $resource);
- }
-
- public function testRetrievePerson()
- {
- $this->expectsRequest(
- 'get',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/persons/' . self::TEST_PERSON_ID
- );
- $resource = $this->service->retrievePerson(self::TEST_RESOURCE_ID, self::TEST_PERSON_ID);
- self::assertInstanceOf(\Stripe\Person::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/accounts/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Account::class, $resource);
- }
-
- public function testUpdateCapability()
- {
- $this->expectsRequest(
- 'post',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/capabilities/' . self::TEST_CAPABILITY_ID
- );
- $resource = $this->service->updateCapability(self::TEST_RESOURCE_ID, self::TEST_CAPABILITY_ID, [
- 'requested' => true,
- ]);
- self::assertInstanceOf(\Stripe\Capability::class, $resource);
- }
-
- public function testUpdateExternalAccount()
- {
- $this->expectsRequest(
- 'post',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/external_accounts/' . self::TEST_EXTERNALACCOUNT_ID
- );
- $resource = $this->service->updateExternalAccount(self::TEST_RESOURCE_ID, self::TEST_EXTERNALACCOUNT_ID, [
- 'name' => 'name',
- ]);
- self::assertInstanceOf(\Stripe\BankAccount::class, $resource);
- }
-
- public function testUpdatePerson()
- {
- $this->expectsRequest(
- 'post',
- '/v1/accounts/' . self::TEST_RESOURCE_ID . '/persons/' . self::TEST_PERSON_ID
- );
- $resource = $this->service->updatePerson(self::TEST_RESOURCE_ID, self::TEST_PERSON_ID, [
- 'first_name' => 'First name',
- ]);
- self::assertInstanceOf(\Stripe\Person::class, $resource);
- }
-
- public function testRetrieveWithId()
- {
- $this->expectsRequest(
- 'get',
- '/v1/accounts/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Account::class, $resource);
- }
-
- public function testRetrieveWithoutId()
- {
- $this->expectsRequest(
- 'get',
- '/v1/account'
- );
- $resource = $this->service->retrieve();
- self::assertInstanceOf(\Stripe\Account::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/ApplePayDomainServiceTest.php b/tests/Stripe/Service/ApplePayDomainServiceTest.php
deleted file mode 100644
index 1f279177f..000000000
--- a/tests/Stripe/Service/ApplePayDomainServiceTest.php
+++ /dev/null
@@ -1,73 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ApplePayDomainService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/apple_pay/domains'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\ApplePayDomain::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/apple_pay/domains'
- );
- $resource = $this->service->create([
- 'domain_name' => 'domain',
- ]);
- self::assertInstanceOf(\Stripe\ApplePayDomain::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/apple_pay/domains/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\ApplePayDomain::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/apple_pay/domains/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\ApplePayDomain::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/ApplicationFeeServiceTest.php b/tests/Stripe/Service/ApplicationFeeServiceTest.php
deleted file mode 100644
index f85f9eafa..000000000
--- a/tests/Stripe/Service/ApplicationFeeServiceTest.php
+++ /dev/null
@@ -1,93 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ApplicationFeeService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/application_fees'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\ApplicationFee::class, $resources->data[0]);
- }
-
- public function testAllRefunds()
- {
- $this->expectsRequest(
- 'get',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID . '/refunds'
- );
- $resources = $this->service->allRefunds(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $resources->data[0]);
- }
-
- public function testCreateRefund()
- {
- $this->expectsRequest(
- 'post',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID . '/refunds'
- );
- $resource = $this->service->createRefund(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\ApplicationFee::class, $resource);
- }
-
- public function testRetrieveRefund()
- {
- $this->expectsRequest(
- 'get',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID . '/refunds/' . self::TEST_FEEREFUND_ID
- );
- $resource = $this->service->retrieveRefund(self::TEST_RESOURCE_ID, self::TEST_FEEREFUND_ID);
- self::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $resource);
- }
-
- public function testUpdateRefund()
- {
- $this->expectsRequest(
- 'post',
- '/v1/application_fees/' . self::TEST_RESOURCE_ID . '/refunds/' . self::TEST_FEEREFUND_ID
- );
- $resource = $this->service->updateRefund(self::TEST_RESOURCE_ID, self::TEST_FEEREFUND_ID);
- self::assertInstanceOf(\Stripe\ApplicationFeeRefund::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/BalanceServiceTest.php b/tests/Stripe/Service/BalanceServiceTest.php
deleted file mode 100644
index e29be0087..000000000
--- a/tests/Stripe/Service/BalanceServiceTest.php
+++ /dev/null
@@ -1,38 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new BalanceService($this->client);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/balance'
- );
- $resource = $this->service->retrieve();
- self::assertInstanceOf(\Stripe\Balance::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/BalanceTransactionServiceTest.php b/tests/Stripe/Service/BalanceTransactionServiceTest.php
deleted file mode 100644
index 84198cee6..000000000
--- a/tests/Stripe/Service/BalanceTransactionServiceTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new BalanceTransactionService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/balance_transactions'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\BalanceTransaction::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/balance_transactions/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\BalanceTransaction::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/BillingPortal/ConfigurationServiceTest.php b/tests/Stripe/Service/BillingPortal/ConfigurationServiceTest.php
deleted file mode 100644
index 8ef3d1bf3..000000000
--- a/tests/Stripe/Service/BillingPortal/ConfigurationServiceTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ConfigurationService($this->client);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/billing_portal/configurations'
- );
- $resource = $this->service->create([
- 'business_profile' => [
- 'terms_of_service_url' => 'https://example.com/tos',
- 'privacy_policy_url' => 'https://example.com/privacy',
- ],
- 'features' => [
- 'customer_update' => [
- 'allowed_updates' => ['address'],
- 'enabled' => true,
- ],
- ],
- ]);
- self::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/billing_portal/configurations/bpc_xyz'
- );
- $resource = $this->service->update('bpc_xyz', [
- 'active' => false,
- ]);
- self::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/billing_portal/configurations/bpc_xyz'
- );
- $resource = $this->service->retrieve('bpc_xyz');
- self::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $resource);
- }
-
- public function testList()
- {
- $this->expectsRequest(
- 'get',
- '/v1/billing_portal/configurations'
- );
- $resource = $this->service->all();
- self::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $resource->data[0]);
- }
-}
diff --git a/tests/Stripe/Service/BillingPortal/SessionServiceTest.php b/tests/Stripe/Service/BillingPortal/SessionServiceTest.php
deleted file mode 100644
index 69867b188..000000000
--- a/tests/Stripe/Service/BillingPortal/SessionServiceTest.php
+++ /dev/null
@@ -1,43 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new SessionService($this->client);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/billing_portal/sessions'
- );
- $resource = $this->service->create([
- 'customer' => 'cus_123',
- 'return_url' => 'https://stripe.com/return',
- ]);
- self::assertInstanceOf(\Stripe\BillingPortal\Session::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/ChargeServiceTest.php b/tests/Stripe/Service/ChargeServiceTest.php
deleted file mode 100644
index 30551f51f..000000000
--- a/tests/Stripe/Service/ChargeServiceTest.php
+++ /dev/null
@@ -1,99 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ChargeService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/charges'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Charge::class, $resources->data[0]);
- }
-
- public function testSearch()
- {
- $this->expectsRequest(
- 'get',
- '/v1/charges/search'
- );
- $resources = $this->service->search(['query' => 'currency:"USD"']);
- self::compatAssertIsArray($resources->data);
- self::assertSame(1, $resources->total_count);
- self::assertInstanceOf(\Stripe\Charge::class, $resources->data[0]);
- }
-
- public function testCapture()
- {
- $this->expectsRequest(
- 'post',
- '/v1/charges/' . self::TEST_RESOURCE_ID . '/capture'
- );
- $resource = $this->service->capture(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Charge::class, $resource);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/charges'
- );
- $resource = $this->service->create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'source' => 'tok_123',
- ]);
- self::assertInstanceOf(\Stripe\Charge::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/charges/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Charge::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/charges/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Charge::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Checkout/SessionServiceTest.php b/tests/Stripe/Service/Checkout/SessionServiceTest.php
deleted file mode 100644
index b677d781f..000000000
--- a/tests/Stripe/Service/Checkout/SessionServiceTest.php
+++ /dev/null
@@ -1,81 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new SessionService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/checkout/sessions'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Checkout\Session::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/checkout/sessions'
- );
- $resource = $this->service->create([
- 'cancel_url' => 'https://stripe.com/cancel',
- 'client_reference_id' => '1234',
- 'line_items' => [
- [
- 'amount' => 123,
- 'currency' => 'usd',
- 'description' => 'item 1',
- 'images' => [
- 'https://stripe.com/img1',
- ],
- 'name' => 'name',
- 'quantity' => 2,
- ],
- ],
- 'payment_intent_data' => [
- 'receipt_email' => 'test@stripe.com',
- ],
- 'payment_method_types' => ['card'],
- 'success_url' => 'https://stripe.com/success',
- ]);
- self::assertInstanceOf(\Stripe\Checkout\Session::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/checkout/sessions/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Checkout\Session::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/CountrySpecServiceTest.php b/tests/Stripe/Service/CountrySpecServiceTest.php
deleted file mode 100644
index 37e41a2a4..000000000
--- a/tests/Stripe/Service/CountrySpecServiceTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new CountrySpecService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/country_specs'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\CountrySpec::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/country_specs/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\CountrySpec::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/CouponServiceTest.php b/tests/Stripe/Service/CouponServiceTest.php
deleted file mode 100644
index ac7f4d909..000000000
--- a/tests/Stripe/Service/CouponServiceTest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new CouponService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/coupons'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Coupon::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/coupons'
- );
- $resource = $this->service->create([
- 'percent_off' => 25,
- 'duration' => 'repeating',
- 'duration_in_months' => 3,
- ]);
- self::assertInstanceOf(\Stripe\Coupon::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/coupons/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Coupon::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/coupons/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Coupon::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/coupons/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Coupon::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/CreditNoteServiceTest.php b/tests/Stripe/Service/CreditNoteServiceTest.php
deleted file mode 100644
index 4eadeb448..000000000
--- a/tests/Stripe/Service/CreditNoteServiceTest.php
+++ /dev/null
@@ -1,125 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new CreditNoteService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/credit_notes'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\CreditNote::class, $resources->data[0]);
- }
-
- public function testAllLines()
- {
- $this->expectsRequest(
- 'get',
- '/v1/credit_notes/' . self::TEST_RESOURCE_ID . '/lines'
- );
- $resources = $this->service->allLines(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\CreditNoteLineItem::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/credit_notes'
- );
- $resource = $this->service->create([
- 'amount' => 100,
- 'invoice' => 'in_132',
- 'reason' => 'duplicate',
- ]);
- self::assertInstanceOf(\Stripe\CreditNote::class, $resource);
- }
-
- public function testPreview()
- {
- $this->expectsRequest(
- 'get',
- '/v1/credit_notes/preview'
- );
- $resource = $this->service->preview([
- 'amount' => 100,
- 'invoice' => 'in_123',
- ]);
- self::assertInstanceOf(\Stripe\CreditNote::class, $resource);
- }
-
- public function testPreviewLines()
- {
- $this->expectsRequest(
- 'get',
- '/v1/credit_notes/preview/lines'
- );
- $resources = $this->service->previewLines([
- 'amount' => 100,
- 'invoice' => 'in_123',
- ]);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\CreditNoteLineItem::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/credit_notes/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\CreditNote::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/credit_notes/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\CreditNote::class, $resource);
- }
-
- public function testVoidCreditNote()
- {
- $this->expectsRequest(
- 'post',
- '/v1/credit_notes/' . self::TEST_RESOURCE_ID . '/void'
- );
- $resource = $this->service->voidCreditNote(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\CreditNote::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/CustomerServiceTest.php b/tests/Stripe/Service/CustomerServiceTest.php
deleted file mode 100644
index 115de7355..000000000
--- a/tests/Stripe/Service/CustomerServiceTest.php
+++ /dev/null
@@ -1,253 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new CustomerService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/customers'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Customer::class, $resources->data[0]);
- }
-
- public function testAllBalanceTransactions()
- {
- $this->expectsRequest(
- 'get',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/balance_transactions'
- );
- $resources = $this->service->allBalanceTransactions(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $resources->data[0]);
- }
-
- public function testAllSources()
- {
- $this->expectsRequest(
- 'get',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/sources'
- );
- $resources = $this->service->allSources(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\StripeObject::class, $resources->data[0]);
- }
-
- public function testAllTaxIds()
- {
- $this->expectsRequest(
- 'get',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/tax_ids'
- );
- $resources = $this->service->allTaxIds(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\TaxId::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/customers'
- );
- $resource = $this->service->create();
- self::assertInstanceOf(\Stripe\Customer::class, $resource);
- }
-
- public function testCreateBalanceTransaction()
- {
- $this->expectsRequest(
- 'post',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/balance_transactions'
- );
- $resource = $this->service->createBalanceTransaction(self::TEST_RESOURCE_ID, [
- 'amount' => 1234,
- 'currency' => 'usd',
- ]);
- self::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $resource);
- }
-
- public function testCreateSource()
- {
- $this->expectsRequest(
- 'post',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/sources'
- );
- $resource = $this->service->createSource(self::TEST_RESOURCE_ID, ['source' => 'tok_123']);
- }
-
- public function testCreateTaxId()
- {
- $this->expectsRequest(
- 'post',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/tax_ids'
- );
- $resource = $this->service->createTaxId(self::TEST_RESOURCE_ID, [
- 'type' => \Stripe\TaxId::TYPE_EU_VAT,
- 'value' => '11111',
- ]);
- self::assertInstanceOf(\Stripe\TaxId::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/customers/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Customer::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-
- public function testDeleteDiscount()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/discount'
- );
- $resource = $this->service->deleteDiscount(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Discount::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-
- public function testDeleteSource()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/sources/' . self::TEST_SOURCE_ID
- );
- $resource = $this->service->deleteSource(self::TEST_RESOURCE_ID, self::TEST_SOURCE_ID);
- }
-
- public function testDeleteTaxId()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/tax_ids/' . self::TEST_TAX_ID_ID
- );
- $resource = $this->service->deleteTaxId(self::TEST_RESOURCE_ID, self::TEST_TAX_ID_ID);
- self::assertInstanceOf(\Stripe\TaxId::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/customers/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Customer::class, $resource);
- }
-
- public function testRetrieveBalanceTransaction()
- {
- $this->expectsRequest(
- 'get',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/balance_transactions/'
- . self::TEST_CUSTOMER_BALANCE_TRANSACTION_ID
- );
- $resource = $this->service->retrieveBalanceTransaction(
- self::TEST_RESOURCE_ID,
- self::TEST_CUSTOMER_BALANCE_TRANSACTION_ID
- );
- self::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $resource);
- }
-
- public function testRetrieveSource()
- {
- $this->expectsRequest(
- 'get',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/sources/' . self::TEST_SOURCE_ID
- );
- $resource = $this->service->retrieveSource(self::TEST_RESOURCE_ID, self::TEST_SOURCE_ID);
- }
-
- public function testRetrieveTaxId()
- {
- $this->expectsRequest(
- 'get',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/tax_ids/' . self::TEST_TAX_ID_ID
- );
- $resource = $this->service->retrieveTaxId(self::TEST_RESOURCE_ID, self::TEST_TAX_ID_ID);
- self::assertInstanceOf(\Stripe\TaxId::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/customers/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Customer::class, $resource);
- }
-
- public function testUpdateBalanceTransaction()
- {
- $this->expectsRequest(
- 'post',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/balance_transactions/'
- . self::TEST_CUSTOMER_BALANCE_TRANSACTION_ID
- );
- $resource = $this->service->updateBalanceTransaction(
- self::TEST_RESOURCE_ID,
- self::TEST_CUSTOMER_BALANCE_TRANSACTION_ID,
- ['description' => 'new']
- );
- self::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $resource);
- }
-
- public function testUpdateSource()
- {
- $this->expectsRequest(
- 'post',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/sources/' . self::TEST_SOURCE_ID
- );
- $resource = $this->service->updateSource(self::TEST_RESOURCE_ID, self::TEST_SOURCE_ID, ['name' => 'name']);
- }
-
- public function testVerifySource()
- {
- $this->expectsRequest(
- 'post',
- '/v1/customers/' . self::TEST_RESOURCE_ID . '/sources/' . self::TEST_SOURCE_ID . '/verify'
- );
- $resource = $this->service->verifySource(self::TEST_RESOURCE_ID, self::TEST_SOURCE_ID, ['amounts' => [32, 45]]);
- self::assertInstanceOf(\Stripe\BankAccount::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/DisputeServiceTest.php b/tests/Stripe/Service/DisputeServiceTest.php
deleted file mode 100644
index d3fb7a797..000000000
--- a/tests/Stripe/Service/DisputeServiceTest.php
+++ /dev/null
@@ -1,73 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new DisputeService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/disputes'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Dispute::class, $resources->data[0]);
- }
-
- public function testClose()
- {
- $this->expectsRequest(
- 'post',
- '/v1/disputes/' . self::TEST_RESOURCE_ID . '/close'
- );
- $resource = $this->service->close(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Dispute::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/disputes/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Dispute::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/disputes/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Dispute::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/EphemeralKeyServiceTest.php b/tests/Stripe/Service/EphemeralKeyServiceTest.php
deleted file mode 100644
index b4e8905fa..000000000
--- a/tests/Stripe/Service/EphemeralKeyServiceTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new EphemeralKeyService($this->client);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/ephemeral_keys',
- null,
- ['Stripe-Version: 2017-05-25']
- );
- $resource = $this->service->create([
- 'customer' => 'cus_123',
- ], ['stripe_version' => '2017-05-25']);
- self::assertInstanceOf(\Stripe\EphemeralKey::class, $resource);
- }
-
- public function testCreateWithoutExplicitApiVersion()
- {
- $this->expectException(\InvalidArgumentException::class);
-
- $resource = $this->service->create([
- 'customer' => 'cus_123',
- ]);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/ephemeral_keys/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\EphemeralKey::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/EventServiceTest.php b/tests/Stripe/Service/EventServiceTest.php
deleted file mode 100644
index cff0731f8..000000000
--- a/tests/Stripe/Service/EventServiceTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new EventService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/events'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Event::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/events/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Event::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/ExchangeRateServiceTest.php b/tests/Stripe/Service/ExchangeRateServiceTest.php
deleted file mode 100644
index a6afddaf2..000000000
--- a/tests/Stripe/Service/ExchangeRateServiceTest.php
+++ /dev/null
@@ -1,41 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ExchangeRateService($this->client);
- }
-
- public function testAll()
- {
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\ExchangeRate::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $resource = $this->service->retrieve('usd');
- self::assertInstanceOf(\Stripe\ExchangeRate::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/FileLinkServiceTest.php b/tests/Stripe/Service/FileLinkServiceTest.php
deleted file mode 100644
index a061e1f52..000000000
--- a/tests/Stripe/Service/FileLinkServiceTest.php
+++ /dev/null
@@ -1,75 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new FileLinkService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/file_links'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\FileLink::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/file_links'
- );
- $resource = $this->service->create([
- 'file' => 'file_123',
- ]);
- self::assertInstanceOf(\Stripe\FileLink::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/file_links/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\FileLink::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/file_links/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\FileLink::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/FileServiceTest.php b/tests/Stripe/Service/FileServiceTest.php
deleted file mode 100644
index c126efb76..000000000
--- a/tests/Stripe/Service/FileServiceTest.php
+++ /dev/null
@@ -1,95 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new FileService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/files'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\File::class, $resources->data[0]);
- }
-
- public function testCreateWithCURLFile()
- {
- $client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'files_base' => MOCK_URL]);
- $service = new FileService($client);
-
- $this->expectsRequest(
- 'post',
- '/v1/files',
- null,
- ['Content-Type: multipart/form-data'],
- true,
- MOCK_URL
- );
- $curlFile = new \CURLFile(__DIR__ . '/../../data/test.png');
- $resource = $service->create([
- 'purpose' => 'dispute_evidence',
- 'file' => $curlFile,
- 'file_link_data' => ['create' => true],
- ]);
- self::assertInstanceOf(\Stripe\File::class, $resource);
- }
-
- public function testCreateWithFileHandle()
- {
- $client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'files_base' => MOCK_URL]);
- $service = new FileService($client);
-
- $this->expectsRequest(
- 'post',
- '/v1/files',
- null,
- ['Content-Type: multipart/form-data'],
- true,
- MOCK_URL
- );
- $fp = \fopen(__DIR__ . '/../../data/test.png', 'rb');
- $resource = $service->create([
- 'purpose' => 'dispute_evidence',
- 'file' => $fp,
- 'file_link_data' => ['create' => true],
- ]);
- self::assertInstanceOf(\Stripe\File::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/files/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\File::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Identity/VerificationReportServiceTest.php b/tests/Stripe/Service/Identity/VerificationReportServiceTest.php
deleted file mode 100644
index a7598ca8a..000000000
--- a/tests/Stripe/Service/Identity/VerificationReportServiceTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new VerificationReportService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/identity/verification_reports'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Identity\VerificationReport::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/identity/verification_reports/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Identity\VerificationReport::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Identity/VerificationSessionServiceTest.php b/tests/Stripe/Service/Identity/VerificationSessionServiceTest.php
deleted file mode 100644
index 8eb20614c..000000000
--- a/tests/Stripe/Service/Identity/VerificationSessionServiceTest.php
+++ /dev/null
@@ -1,85 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new VerificationSessionService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/identity/verification_sessions'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions'
- );
- $resource = $this->service->create([
- 'type' => 'id_number',
- ]);
- self::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $resource);
- }
-
- public function testCancel()
- {
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource = $this->service->cancel(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $resource);
- }
-
- public function testRedact()
- {
- $this->expectsRequest(
- 'post',
- '/v1/identity/verification_sessions/' . self::TEST_RESOURCE_ID . '/redact'
- );
- $resource = $this->service->redact(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Identity\VerificationSession::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/InvoiceItemServiceTest.php b/tests/Stripe/Service/InvoiceItemServiceTest.php
deleted file mode 100644
index 4a64fab4c..000000000
--- a/tests/Stripe/Service/InvoiceItemServiceTest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new InvoiceItemService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/invoiceitems'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\InvoiceItem::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoiceitems'
- );
- $resource = $this->service->create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'customer' => 'cus_123',
- ]);
- self::assertInstanceOf(\Stripe\InvoiceItem::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/invoiceitems/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\InvoiceItem::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/invoiceitems/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\InvoiceItem::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoiceitems/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\InvoiceItem::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/InvoiceServiceTest.php b/tests/Stripe/Service/InvoiceServiceTest.php
deleted file mode 100644
index de332f589..000000000
--- a/tests/Stripe/Service/InvoiceServiceTest.php
+++ /dev/null
@@ -1,145 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new InvoiceService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/invoices'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Invoice::class, $resources->data[0]);
- }
-
- public function testAllLines()
- {
- $this->expectsRequest(
- 'get',
- '/v1/invoices/' . self::TEST_RESOURCE_ID . '/lines'
- );
- $resources = $this->service->allLines(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoices'
- );
- $resource = $this->service->create([
- 'customer' => 'cus_123',
- ]);
- self::assertInstanceOf(\Stripe\Invoice::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/invoices/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Invoice::class, $resource);
- }
-
- public function testFinalizeInvoice()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . self::TEST_RESOURCE_ID . '/finalize'
- );
- $resource = $this->service->finalizeInvoice(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Invoice::class, $resource);
- }
-
- public function testMarkUncollectible()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . self::TEST_RESOURCE_ID . '/mark_uncollectible'
- );
- $resource = $this->service->markUncollectible(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Invoice::class, $resource);
- }
-
- public function testPay()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . self::TEST_RESOURCE_ID . '/pay'
- );
- $resource = $this->service->pay(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Invoice::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/invoices/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Invoice::class, $resource);
- }
-
- public function testSendInvoice()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . self::TEST_RESOURCE_ID . '/send'
- );
- $resource = $this->service->sendInvoice(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Invoice::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Invoice::class, $resource);
- }
-
- public function testVoidInvoice()
- {
- $this->expectsRequest(
- 'post',
- '/v1/invoices/' . self::TEST_RESOURCE_ID . '/void'
- );
- $resource = $this->service->voidInvoice(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Invoice::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Issuing/AuthorizationServiceTest.php b/tests/Stripe/Service/Issuing/AuthorizationServiceTest.php
deleted file mode 100644
index 785ce4bd9..000000000
--- a/tests/Stripe/Service/Issuing/AuthorizationServiceTest.php
+++ /dev/null
@@ -1,84 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new AuthorizationService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/authorizations'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Issuing\Authorization::class, $resources->data[0]);
- }
-
- public function testApprove()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/authorizations/' . self::TEST_RESOURCE_ID . '/approve'
- );
- $resource = $this->service->approve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Issuing\Authorization::class, $resource);
- }
-
- public function testDecline()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/authorizations/' . self::TEST_RESOURCE_ID . '/decline'
- );
- $resource = $this->service->decline(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Issuing\Authorization::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/authorizations/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Issuing\Authorization::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/authorizations/' . self::TEST_RESOURCE_ID,
- ['metadata' => ['key' => 'value']]
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Issuing\Authorization::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Issuing/CardServiceTest.php b/tests/Stripe/Service/Issuing/CardServiceTest.php
deleted file mode 100644
index 876cff892..000000000
--- a/tests/Stripe/Service/Issuing/CardServiceTest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new CardService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/cards'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Issuing\Card::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/cards'
- );
- $resource = $this->service->create([
- 'currency' => 'usd',
- 'type' => 'physical',
- ]);
- self::assertInstanceOf(\Stripe\Issuing\Card::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/cards/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Issuing\Card::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/cards/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Issuing\Card::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Issuing/CardholderServiceTest.php b/tests/Stripe/Service/Issuing/CardholderServiceTest.php
deleted file mode 100644
index 990ce8ba9..000000000
--- a/tests/Stripe/Service/Issuing/CardholderServiceTest.php
+++ /dev/null
@@ -1,88 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new CardholderService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/cardholders'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $params = [
- 'billing' => [
- 'address' => [
- 'city' => 'city',
- 'country' => 'US',
- 'line1' => 'line1',
- 'postal_code' => 'postal_code',
- ],
- ],
- 'name' => 'Cardholder Name',
- 'type' => 'individual',
- ];
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/cardholders',
- $params
- );
- $resource = $this->service->create($params);
- self::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/cardholders/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/cardholders/' . self::TEST_RESOURCE_ID,
- ['metadata' => ['key' => 'value']]
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Issuing\Cardholder::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Issuing/DisputeServiceTest.php b/tests/Stripe/Service/Issuing/DisputeServiceTest.php
deleted file mode 100644
index bf03cb3ca..000000000
--- a/tests/Stripe/Service/Issuing/DisputeServiceTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new DisputeService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/disputes'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Issuing\Dispute::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $params = [
- 'transaction' => 'ipi_123',
- ];
-
- $this->expectsRequest(
- 'post',
- '/v1/issuing/disputes',
- $params
- );
- $resource = $this->service->create($params);
- self::assertInstanceOf(\Stripe\Issuing\Dispute::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/disputes/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Issuing\Dispute::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/disputes/' . self::TEST_RESOURCE_ID,
- ['metadata' => ['key' => 'value']]
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Issuing\Dispute::class, $resource);
- }
-
- public function testSubmit()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/disputes/' . self::TEST_RESOURCE_ID . '/submit',
- ['metadata' => ['key' => 'value']]
- );
- $resource = $this->service->submit(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Issuing\Dispute::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Issuing/TransactionServiceTest.php b/tests/Stripe/Service/Issuing/TransactionServiceTest.php
deleted file mode 100644
index 8d3864483..000000000
--- a/tests/Stripe/Service/Issuing/TransactionServiceTest.php
+++ /dev/null
@@ -1,64 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new TransactionService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/transactions'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Issuing\Transaction::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/issuing/transactions/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Issuing\Transaction::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/issuing/transactions/' . self::TEST_RESOURCE_ID,
- ['metadata' => ['key' => 'value']]
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Issuing\Transaction::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/MandateServiceTest.php b/tests/Stripe/Service/MandateServiceTest.php
deleted file mode 100644
index 0e2dc29a8..000000000
--- a/tests/Stripe/Service/MandateServiceTest.php
+++ /dev/null
@@ -1,40 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new MandateService($this->client);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/mandates/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Mandate::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/PaymentIntentServiceTest.php b/tests/Stripe/Service/PaymentIntentServiceTest.php
deleted file mode 100644
index 6814c4bf6..000000000
--- a/tests/Stripe/Service/PaymentIntentServiceTest.php
+++ /dev/null
@@ -1,107 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new PaymentIntentService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/payment_intents'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\PaymentIntent::class, $resources->data[0]);
- }
-
- public function testCancel()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource = $this->service->cancel(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\PaymentIntent::class, $resource);
- }
-
- public function testCapture()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID . '/capture'
- );
- $resource = $this->service->capture(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\PaymentIntent::class, $resource);
- }
-
- public function testConfirm()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID . '/confirm'
- );
- $resource = $this->service->confirm(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\PaymentIntent::class, $resource);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents'
- );
- $resource = $this->service->create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'payment_method_types' => ['card'],
- ]);
- self::assertInstanceOf(\Stripe\PaymentIntent::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\PaymentIntent::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_intents/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\PaymentIntent::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/PaymentMethodServiceTest.php b/tests/Stripe/Service/PaymentMethodServiceTest.php
deleted file mode 100644
index 6e6046649..000000000
--- a/tests/Stripe/Service/PaymentMethodServiceTest.php
+++ /dev/null
@@ -1,100 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new PaymentMethodService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/payment_methods'
- );
- $resources = $this->service->all([
- 'customer' => 'cus_123',
- 'type' => 'card',
- ]);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\PaymentMethod::class, $resources->data[0]);
- }
-
- public function testAttach()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_methods/' . self::TEST_RESOURCE_ID . '/attach'
- );
- $resource = $this->service->attach(self::TEST_RESOURCE_ID, [
- 'customer' => 'cus_123',
- ]);
- self::assertInstanceOf(\Stripe\PaymentMethod::class, $resource);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_methods'
- );
- $resource = $this->service->create([
- 'type' => 'card',
- ]);
- self::assertInstanceOf(\Stripe\PaymentMethod::class, $resource);
- }
-
- public function testDetach()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_methods/' . self::TEST_RESOURCE_ID . '/detach'
- );
- $resource = $this->service->detach(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\PaymentMethod::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/payment_methods/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\PaymentMethod::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payment_methods/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\PaymentMethod::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/PayoutServiceTest.php b/tests/Stripe/Service/PayoutServiceTest.php
deleted file mode 100644
index f20415426..000000000
--- a/tests/Stripe/Service/PayoutServiceTest.php
+++ /dev/null
@@ -1,96 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new PayoutService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/payouts'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Payout::class, $resources->data[0]);
- }
-
- public function testCancel()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payouts/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource = $this->service->cancel(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Payout::class, $resource);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payouts'
- );
- $resource = $this->service->create([
- 'amount' => 100,
- 'currency' => 'usd',
- ]);
- self::assertInstanceOf(\Stripe\Payout::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/payouts/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Payout::class, $resource);
- }
-
- public function testReverse()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payouts/' . self::TEST_RESOURCE_ID . '/reverse'
- );
- $resource = $this->service->reverse(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Payout::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/payouts/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Payout::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/PlanServiceTest.php b/tests/Stripe/Service/PlanServiceTest.php
deleted file mode 100644
index cb7f3d469..000000000
--- a/tests/Stripe/Service/PlanServiceTest.php
+++ /dev/null
@@ -1,89 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new PlanService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/plans'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Plan::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/plans'
- );
- $resource = $this->service->create([
- 'amount' => 100,
- 'interval' => 'month',
- 'currency' => 'usd',
- 'nickname' => self::TEST_RESOURCE_ID,
- 'id' => self::TEST_RESOURCE_ID,
- ]);
- self::assertInstanceOf(\Stripe\Plan::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/plans/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Plan::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/plans/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Plan::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/plans/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Plan::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/PriceServiceTest.php b/tests/Stripe/Service/PriceServiceTest.php
deleted file mode 100644
index 482fff473..000000000
--- a/tests/Stripe/Service/PriceServiceTest.php
+++ /dev/null
@@ -1,82 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new PriceService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/prices'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Price::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/prices'
- );
- $resource = $this->service->create([
- 'unit_amount' => 2000,
- 'currency' => 'usd',
- 'recurring' => [
- 'interval' => 'month',
- ],
- 'product_data' => [
- 'name' => 'Product Name',
- ],
- ]);
- self::assertInstanceOf(\Stripe\Price::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/prices/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Price::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/prices/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Price::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/ProductServiceTest.php b/tests/Stripe/Service/ProductServiceTest.php
deleted file mode 100644
index 104def594..000000000
--- a/tests/Stripe/Service/ProductServiceTest.php
+++ /dev/null
@@ -1,85 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ProductService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/products'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Product::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/products'
- );
- $resource = $this->service->create([
- 'name' => 'name',
- ]);
- self::assertInstanceOf(\Stripe\Product::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/products/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Product::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/products/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Product::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/products/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Product::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/QuoteServiceTest.php b/tests/Stripe/Service/QuoteServiceTest.php
deleted file mode 100644
index 791671ba5..000000000
--- a/tests/Stripe/Service/QuoteServiceTest.php
+++ /dev/null
@@ -1,128 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL, 'files_base' => MOCK_URL]);
- $this->service = new QuoteService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/quotes'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Quote::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/quotes'
- );
- $resource = $this->service->create([
- 'customer' => 'cus_123',
- ]);
- self::assertInstanceOf(\Stripe\Quote::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/quotes/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Quote::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/quotes/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Quote::class, $resource);
- }
-
- public function testFinalizeQuote()
- {
- $this->expectsRequest(
- 'post',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/finalize'
- );
- $resource = $this->service->finalizeQuote(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Quote::class, $resource);
- }
-
- public function testCancel()
- {
- $this->expectsRequest(
- 'post',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource = $this->service->cancel(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Quote::class, $resource);
- }
-
- public function testAccept()
- {
- $this->expectsRequest(
- 'post',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource = $this->service->cancel(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Quote::class, $resource);
- }
-
- public function testAllLines()
- {
- $this->expectsRequest(
- 'get',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/line_items'
- );
- $resources = $this->service->allLineItems(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- }
-
- public function testPdf()
- {
- $this->expectsRequestStream(
- 'get',
- '/v1/quotes/' . self::TEST_RESOURCE_ID . '/pdf'
- );
- $output = '';
- $resources = $this->service->pdf(self::TEST_RESOURCE_ID, static function ($chunk) use (&$output) {
- $output .= $chunk;
- });
- self::assertSame('Stripe binary response', $output);
- }
-}
diff --git a/tests/Stripe/Service/Radar/EarlyFraudWarningServiceTest.php b/tests/Stripe/Service/Radar/EarlyFraudWarningServiceTest.php
deleted file mode 100644
index bd29d4291..000000000
--- a/tests/Stripe/Service/Radar/EarlyFraudWarningServiceTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new EarlyFraudWarningService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/early_fraud_warnings'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Radar\EarlyFraudWarning::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/early_fraud_warnings/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Radar\EarlyFraudWarning::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Radar/ValueListItemServiceTest.php b/tests/Stripe/Service/Radar/ValueListItemServiceTest.php
deleted file mode 100644
index 1d7a389fe..000000000
--- a/tests/Stripe/Service/Radar/ValueListItemServiceTest.php
+++ /dev/null
@@ -1,77 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ValueListItemService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/value_list_items'
- );
- $resources = $this->service->all([
- 'value_list' => 'rsl_123',
- ]);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/radar/value_list_items'
- );
- $resource = $this->service->create([
- 'value_list' => 'rsl_123',
- 'value' => 'value',
- ]);
- self::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/radar/value_list_items/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/value_list_items/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Radar\ValueListItem::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Radar/ValueListServiceTest.php b/tests/Stripe/Service/Radar/ValueListServiceTest.php
deleted file mode 100644
index 9a8b058db..000000000
--- a/tests/Stripe/Service/Radar/ValueListServiceTest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ValueListService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/value_lists'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Radar\ValueList::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/radar/value_lists'
- );
- $resource = $this->service->create([
- 'alias' => 'alias',
- 'name' => 'name',
- ]);
- self::assertInstanceOf(\Stripe\Radar\ValueList::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/radar/value_lists/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Radar\ValueList::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/radar/value_lists/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Radar\ValueList::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/radar/value_lists/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Radar\ValueList::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/RefundServiceTest.php b/tests/Stripe/Service/RefundServiceTest.php
deleted file mode 100644
index 7fb3f347c..000000000
--- a/tests/Stripe/Service/RefundServiceTest.php
+++ /dev/null
@@ -1,75 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new RefundService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/refunds'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Refund::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/refunds'
- );
- $resource = $this->service->create([
- 'charge' => 'ch_123',
- ]);
- self::assertInstanceOf(\Stripe\Refund::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/refunds/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Refund::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/refunds/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Refund::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Reporting/ReportRunServiceTest.php b/tests/Stripe/Service/Reporting/ReportRunServiceTest.php
deleted file mode 100644
index 114687c13..000000000
--- a/tests/Stripe/Service/Reporting/ReportRunServiceTest.php
+++ /dev/null
@@ -1,69 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ReportRunService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reporting/report_runs'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Reporting\ReportRun::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $params = [
- 'parameters' => [
- 'connected_account' => 'acct_123',
- ],
- 'report_type' => 'activity.summary.1',
- ];
-
- $this->expectsRequest(
- 'post',
- '/v1/reporting/report_runs',
- $params
- );
- $resource = $this->service->create($params);
- self::assertInstanceOf(\Stripe\Reporting\ReportRun::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reporting/report_runs/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Reporting\ReportRun::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Reporting/ReportTypeServiceTest.php b/tests/Stripe/Service/Reporting/ReportTypeServiceTest.php
deleted file mode 100644
index 883ca975f..000000000
--- a/tests/Stripe/Service/Reporting/ReportTypeServiceTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ReportTypeService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reporting/report_types'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Reporting\ReportType::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reporting/report_types/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Reporting\ReportType::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/ReviewServiceTest.php b/tests/Stripe/Service/ReviewServiceTest.php
deleted file mode 100644
index 986a3325e..000000000
--- a/tests/Stripe/Service/ReviewServiceTest.php
+++ /dev/null
@@ -1,61 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ReviewService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reviews'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Review::class, $resources->data[0]);
- }
-
- public function testApprove()
- {
- $this->expectsRequest(
- 'post',
- '/v1/reviews/' . self::TEST_RESOURCE_ID . '/approve'
- );
- $resource = $this->service->approve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Review::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/reviews/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Review::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/SetupAttemptServiceTest.php b/tests/Stripe/Service/SetupAttemptServiceTest.php
deleted file mode 100644
index 3cecb2e6c..000000000
--- a/tests/Stripe/Service/SetupAttemptServiceTest.php
+++ /dev/null
@@ -1,41 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new SetupAttemptService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/setup_attempts'
- );
- $resources = $this->service->all([
- 'setup_intent' => 'si_123',
- ]);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\SetupAttempt::class, $resources->data[0]);
- }
-}
diff --git a/tests/Stripe/Service/SetupIntentServiceTest.php b/tests/Stripe/Service/SetupIntentServiceTest.php
deleted file mode 100644
index 719fbde35..000000000
--- a/tests/Stripe/Service/SetupIntentServiceTest.php
+++ /dev/null
@@ -1,98 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new SetupIntentService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/setup_intents'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\SetupIntent::class, $resources->data[0]);
- }
-
- public function testCancel()
- {
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource = $this->service->cancel(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\SetupIntent::class, $resource);
- }
-
- public function testConfirm()
- {
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents/' . self::TEST_RESOURCE_ID . '/confirm'
- );
- $resource = $this->service->confirm(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\SetupIntent::class, $resource);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents'
- );
- $resource = $this->service->create([
- 'payment_method_types' => ['card'],
- ]);
- self::assertInstanceOf(\Stripe\SetupIntent::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/setup_intents/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\SetupIntent::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(
- self::TEST_RESOURCE_ID,
- [
- 'metadata' => ['key' => 'value'],
- ]
- );
- self::assertInstanceOf(\Stripe\SetupIntent::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Sigma/ScheduledQueryRunServiceTest.php b/tests/Stripe/Service/Sigma/ScheduledQueryRunServiceTest.php
deleted file mode 100644
index b89dcfa7c..000000000
--- a/tests/Stripe/Service/Sigma/ScheduledQueryRunServiceTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ScheduledQueryRunService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/sigma/scheduled_query_runs'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Sigma\ScheduledQueryRun::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/sigma/scheduled_query_runs/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Sigma\ScheduledQueryRun::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/SourceServiceTest.php b/tests/Stripe/Service/SourceServiceTest.php
deleted file mode 100644
index 84732f453..000000000
--- a/tests/Stripe/Service/SourceServiceTest.php
+++ /dev/null
@@ -1,95 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new SourceService($this->client);
- }
-
- public function testAllTransactions()
- {
- $this->expectsRequest(
- 'get',
- '/v1/sources/' . self::TEST_RESOURCE_ID . '/source_transactions'
- );
- $resources = $this->service->allSourceTransactions(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\SourceTransaction::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/sources'
- );
- $resource = $this->service->create([
- 'type' => 'card',
- ]);
- self::assertInstanceOf(\Stripe\Source::class, $resource);
- }
-
- public function testDetach()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/customers/cus_123/sources/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->detach('cus_123', self::TEST_RESOURCE_ID);
- // static::assertInstanceOf(\Stripe\Source::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/sources/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Source::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/sources/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Source::class, $resource);
- }
-
- public function testVerify()
- {
- $this->expectsRequest(
- 'post',
- '/v1/sources/' . self::TEST_RESOURCE_ID . '/verify'
- );
- $resource = $this->service->verify(self::TEST_RESOURCE_ID, ['values' => [32, 45]]);
- self::assertInstanceOf(\Stripe\Source::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/SubscriptionItemServiceTest.php b/tests/Stripe/Service/SubscriptionItemServiceTest.php
deleted file mode 100644
index daa1c7a8f..000000000
--- a/tests/Stripe/Service/SubscriptionItemServiceTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new SubscriptionItemService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscription_items',
- [
- 'subscription' => 'sub_123',
- ]
- );
- $resources = $this->service->all([
- 'subscription' => 'sub_123',
- ]);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\SubscriptionItem::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscription_items/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\SubscriptionItem::class, $resource);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_items'
- );
- $resource = $this->service->create([
- 'price' => 'price_123',
- 'subscription' => 'sub_123',
- ]);
- self::assertInstanceOf(\Stripe\SubscriptionItem::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_items/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\SubscriptionItem::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/subscription_items/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\SubscriptionItem::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-}
diff --git a/tests/Stripe/Service/SubscriptionScheduleServiceTest.php b/tests/Stripe/Service/SubscriptionScheduleServiceTest.php
deleted file mode 100644
index adbb0a3a5..000000000
--- a/tests/Stripe/Service/SubscriptionScheduleServiceTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new SubscriptionScheduleService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscription_schedules'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $resources->data[0]);
- }
-
- public function testCancel()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource = $this->service->cancel(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $resource);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules'
- );
- $resource = $this->service->create([
- 'phases' => [
- [
- 'items' => [
- ['price' => 'price_123', 'quantity' => 2],
- ],
- ],
- ],
- ]);
- self::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $resource);
- }
-
- public function testRelease()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules/' . self::TEST_RESOURCE_ID . '/release'
- );
- $resource = $this->service->release(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscription_schedules/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\SubscriptionSchedule::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/SubscriptionServiceTest.php b/tests/Stripe/Service/SubscriptionServiceTest.php
deleted file mode 100644
index fc57d59e7..000000000
--- a/tests/Stripe/Service/SubscriptionServiceTest.php
+++ /dev/null
@@ -1,113 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new SubscriptionService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscriptions'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Subscription::class, $resources->data[0]);
- }
-
- public function testAllPagination()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscriptions'
- );
- $resources = $this->service->all([
- 'status' => 'all',
- 'limit' => 100,
- ]);
- $filters = $resources->getFilters();
- self::assertSame($filters, [
- 'status' => 'all',
- 'limit' => 100,
- ]);
- }
-
- public function testCancel()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/subscriptions/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->cancel(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Subscription::class, $resource);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscriptions'
- );
- $resource = $this->service->create([
- 'customer' => 'cus_123',
- ]);
- self::assertInstanceOf(\Stripe\Subscription::class, $resource);
- }
-
- public function testDeleteDiscount()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/subscriptions/' . self::TEST_RESOURCE_ID . '/discount'
- );
- $resource = $this->service->deleteDiscount(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Discount::class, $resource);
- self::assertTrue($resource->isDeleted());
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscriptions/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Subscription::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscriptions/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Subscription::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/TaxCodeServiceTest.php b/tests/Stripe/Service/TaxCodeServiceTest.php
deleted file mode 100644
index 478442588..000000000
--- a/tests/Stripe/Service/TaxCodeServiceTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new TaxCodeService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/tax_codes'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\TaxCode::class, $resources->data[0]);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/tax_codes/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\TaxCode::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/TaxRateServiceTest.php b/tests/Stripe/Service/TaxRateServiceTest.php
deleted file mode 100644
index 266d58b44..000000000
--- a/tests/Stripe/Service/TaxRateServiceTest.php
+++ /dev/null
@@ -1,77 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new TaxRateService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/tax_rates'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\TaxRate::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/tax_rates'
- );
- $resource = $this->service->create([
- 'display_name' => 'name',
- 'inclusive' => false,
- 'percentage' => 10.15,
- ]);
- self::assertInstanceOf(\Stripe\TaxRate::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/tax_rates/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\TaxRate::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/tax_rates/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\TaxRate::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Terminal/ConnectionTokenServiceTest.php b/tests/Stripe/Service/Terminal/ConnectionTokenServiceTest.php
deleted file mode 100644
index ea1e8753d..000000000
--- a/tests/Stripe/Service/Terminal/ConnectionTokenServiceTest.php
+++ /dev/null
@@ -1,38 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ConnectionTokenService($this->client);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/terminal/connection_tokens'
- );
- $resource = $this->service->create();
- self::assertInstanceOf(\Stripe\Terminal\ConnectionToken::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Terminal/LocationServiceTest.php b/tests/Stripe/Service/Terminal/LocationServiceTest.php
deleted file mode 100644
index 3528be6d2..000000000
--- a/tests/Stripe/Service/Terminal/LocationServiceTest.php
+++ /dev/null
@@ -1,104 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new LocationService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/terminal/locations'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Terminal\Location::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/terminal/locations',
- [
- 'display_name' => 'name',
- 'address' => [
- 'line1' => 'line1',
- 'country' => 'US',
- 'state' => 'CA',
- 'postal_code' => '12345',
- 'city' => 'San Francisco',
- ],
- ]
- );
- $resource = $this->service->create(
- [
- 'display_name' => 'name',
- 'address' => [
- 'line1' => 'line1',
- 'country' => 'US',
- 'state' => 'CA',
- 'postal_code' => '12345',
- 'city' => 'San Francisco',
- ],
- ]
- );
- self::assertInstanceOf(\Stripe\Terminal\Location::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/terminal/locations/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Terminal\Location::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/terminal/locations/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Terminal\Location::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/terminal/locations/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Terminal\Location::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/Terminal/ReaderServiceTest.php b/tests/Stripe/Service/Terminal/ReaderServiceTest.php
deleted file mode 100644
index 45fb6ebc6..000000000
--- a/tests/Stripe/Service/Terminal/ReaderServiceTest.php
+++ /dev/null
@@ -1,84 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ReaderService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/terminal/readers'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Terminal\Reader::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/terminal/readers',
- ['registration_code' => 'a-b-c']
- );
- $resource = $this->service->create(['registration_code' => 'a-b-c']);
- self::assertInstanceOf(\Stripe\Terminal\Reader::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/terminal/readers/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Terminal\Reader::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/terminal/readers/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Terminal\Reader::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/terminal/readers/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Terminal\Reader::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/TestHelpers/Terminal/ReaderServiceTest.php b/tests/Stripe/Service/TestHelpers/Terminal/ReaderServiceTest.php
deleted file mode 100644
index a0cab1fe4..000000000
--- a/tests/Stripe/Service/TestHelpers/Terminal/ReaderServiceTest.php
+++ /dev/null
@@ -1,40 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new ReaderService($this->client);
- }
-
- public function testPresentPaymentMethod()
- {
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/terminal/readers/' . self::TEST_RESOURCE_ID . '/present_payment_method'
- );
- $resource = $this->service->presentPaymentMethod(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Terminal\Reader::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/TokenServiceTest.php b/tests/Stripe/Service/TokenServiceTest.php
deleted file mode 100644
index b1a0a6723..000000000
--- a/tests/Stripe/Service/TokenServiceTest.php
+++ /dev/null
@@ -1,50 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new TokenService($this->client);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/tokens'
- );
- $resource = $this->service->create(['card' => 'tok_visa']);
- self::assertInstanceOf(\Stripe\Token::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/tokens/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Token::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/TopupServiceTest.php b/tests/Stripe/Service/TopupServiceTest.php
deleted file mode 100644
index 87b8ba564..000000000
--- a/tests/Stripe/Service/TopupServiceTest.php
+++ /dev/null
@@ -1,89 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new TopupService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/topups'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Topup::class, $resources->data[0]);
- }
-
- public function testCancel()
- {
- $this->expectsRequest(
- 'post',
- '/v1/topups/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource = $this->service->cancel(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Topup::class, $resource);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/topups'
- );
- $resource = $this->service->create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'source' => 'tok_123',
- 'description' => 'description',
- 'statement_descriptor' => 'statement descriptor',
- ]);
- self::assertInstanceOf(\Stripe\Topup::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/topups/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Topup::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/topups/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Topup::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/TransferServiceTest.php b/tests/Stripe/Service/TransferServiceTest.php
deleted file mode 100644
index a7900882e..000000000
--- a/tests/Stripe/Service/TransferServiceTest.php
+++ /dev/null
@@ -1,125 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new TransferService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/transfers'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\Transfer::class, $resources->data[0]);
- }
-
- public function testAllReversals()
- {
- $this->expectsRequest(
- 'get',
- '/v1/transfers/' . self::TEST_RESOURCE_ID . '/reversals'
- );
- $resources = $this->service->allReversals(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\TransferReversal::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/transfers'
- );
- $resource = $this->service->create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'destination' => 'acct_123',
- ]);
- self::assertInstanceOf(\Stripe\Transfer::class, $resource);
- }
-
- public function testCreateReversal()
- {
- $this->expectsRequest(
- 'post',
- '/v1/transfers/' . self::TEST_RESOURCE_ID . '/reversals'
- );
- $resource = $this->service->createReversal(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\TransferReversal::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/transfers/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\Transfer::class, $resource);
- }
-
- public function testRetrieveReversal()
- {
- $this->expectsRequest(
- 'get',
- '/v1/transfers/' . self::TEST_RESOURCE_ID . '/reversals/' . self::TEST_REVERSAL_ID
- );
- $resource = $this->service->retrieveReversal(self::TEST_RESOURCE_ID, self::TEST_REVERSAL_ID);
- self::assertInstanceOf(\Stripe\TransferReversal::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/transfers/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(\Stripe\Transfer::class, $resource);
- }
-
- public function testUpdateReversal()
- {
- $this->expectsRequest(
- 'post',
- '/v1/transfers/' . self::TEST_RESOURCE_ID . '/reversals/' . self::TEST_REVERSAL_ID
- );
- $resource = $this->service->updateReversal(
- self::TEST_RESOURCE_ID,
- self::TEST_REVERSAL_ID,
- [
- 'metadata' => ['key' => 'value'],
- ]
- );
- self::assertInstanceOf(\Stripe\TransferReversal::class, $resource);
- }
-}
diff --git a/tests/Stripe/Service/WebhookEndpointServiceTest.php b/tests/Stripe/Service/WebhookEndpointServiceTest.php
deleted file mode 100644
index 2fcbfce03..000000000
--- a/tests/Stripe/Service/WebhookEndpointServiceTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-client = new \Stripe\StripeClient(['api_key' => 'sk_test_123', 'api_base' => MOCK_URL]);
- $this->service = new WebhookEndpointService($this->client);
- }
-
- public function testAll()
- {
- $this->expectsRequest(
- 'get',
- '/v1/webhook_endpoints'
- );
- $resources = $this->service->all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(\Stripe\WebhookEndpoint::class, $resources->data[0]);
- }
-
- public function testCreate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/webhook_endpoints'
- );
- $resource = $this->service->create([
- 'enabled_events' => ['charge.succeeded'],
- 'url' => 'https://stripe.com',
- ]);
- self::assertInstanceOf(\Stripe\WebhookEndpoint::class, $resource);
- }
-
- public function testDelete()
- {
- $this->expectsRequest(
- 'delete',
- '/v1/webhook_endpoints/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->delete(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\WebhookEndpoint::class, $resource);
- }
-
- public function testRetrieve()
- {
- $this->expectsRequest(
- 'get',
- '/v1/webhook_endpoints/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(\Stripe\WebhookEndpoint::class, $resource);
- }
-
- public function testUpdate()
- {
- $this->expectsRequest(
- 'post',
- '/v1/webhook_endpoints/' . self::TEST_RESOURCE_ID
- );
- $resource = $this->service->update(self::TEST_RESOURCE_ID, [
- 'enabled_events' => ['charge.succeeded'],
- ]);
- self::assertInstanceOf(\Stripe\WebhookEndpoint::class, $resource);
- }
-}
diff --git a/tests/Stripe/SetupAttemptTest.php b/tests/Stripe/SetupAttemptTest.php
deleted file mode 100644
index dda7f525b..000000000
--- a/tests/Stripe/SetupAttemptTest.php
+++ /dev/null
@@ -1,26 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/setup_attempts'
- );
- $resources = SetupAttempt::all([
- 'setup_intent' => 'si_123',
- ]);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(SetupAttempt::class, $resources->data[0]);
- }
-}
diff --git a/tests/Stripe/SetupIntentTest.php b/tests/Stripe/SetupIntentTest.php
deleted file mode 100644
index 75d908a5c..000000000
--- a/tests/Stripe/SetupIntentTest.php
+++ /dev/null
@@ -1,97 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/setup_intents'
- );
- $resources = SetupIntent::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(SetupIntent::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/setup_intents/' . self::TEST_RESOURCE_ID
- );
- $resource = SetupIntent::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(SetupIntent::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents'
- );
- $resource = SetupIntent::create([
- 'payment_method_types' => ['card'],
- ]);
- self::assertInstanceOf(SetupIntent::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = SetupIntent::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(SetupIntent::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents/' . self::TEST_RESOURCE_ID
- );
- $resource = SetupIntent::update(
- self::TEST_RESOURCE_ID,
- [
- 'metadata' => ['key' => 'value'],
- ]
- );
- self::assertInstanceOf(SetupIntent::class, $resource);
- }
-
- public function testIsCancelable()
- {
- $resource = SetupIntent::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource->cancel();
- self::assertInstanceOf(SetupIntent::class, $resource);
- }
-
- public function testIsConfirmable()
- {
- $resource = SetupIntent::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/setup_intents/' . self::TEST_RESOURCE_ID . '/confirm'
- );
- $resource->confirm();
- self::assertInstanceOf(SetupIntent::class, $resource);
- }
-}
diff --git a/tests/Stripe/Sigma/ScheduledQueryRunTest.php b/tests/Stripe/Sigma/ScheduledQueryRunTest.php
deleted file mode 100644
index cab96be41..000000000
--- a/tests/Stripe/Sigma/ScheduledQueryRunTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-data);
- self::assertInstanceOf(ScheduledQueryRun::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $resource = ScheduledQueryRun::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(ScheduledQueryRun::class, $resource);
- }
-}
diff --git a/tests/Stripe/SubscriptionItemTest.php b/tests/Stripe/SubscriptionItemTest.php
deleted file mode 100644
index 1c88e6af7..000000000
--- a/tests/Stripe/SubscriptionItemTest.php
+++ /dev/null
@@ -1,89 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/subscription_items',
- [
- 'subscription' => 'sub_123',
- ]
- );
- $resources = SubscriptionItem::all([
- 'subscription' => 'sub_123',
- ]);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(SubscriptionItem::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscription_items/' . self::TEST_RESOURCE_ID
- );
- $resource = SubscriptionItem::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(SubscriptionItem::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_items'
- );
- $resource = SubscriptionItem::create([
- 'price' => 'price_123',
- 'subscription' => 'sub_123',
- ]);
- self::assertInstanceOf(SubscriptionItem::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = SubscriptionItem::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/subscription_items/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(SubscriptionItem::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_items/' . self::TEST_RESOURCE_ID
- );
- $resource = SubscriptionItem::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(SubscriptionItem::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = SubscriptionItem::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/subscription_items/' . $resource->id
- );
- $resource->delete();
- self::assertInstanceOf(SubscriptionItem::class, $resource);
- }
-}
diff --git a/tests/Stripe/SubscriptionScheduleTest.php b/tests/Stripe/SubscriptionScheduleTest.php
deleted file mode 100644
index 28943c7c4..000000000
--- a/tests/Stripe/SubscriptionScheduleTest.php
+++ /dev/null
@@ -1,103 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/subscription_schedules'
- );
- $resources = SubscriptionSchedule::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(SubscriptionSchedule::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscription_schedules/' . self::TEST_RESOURCE_ID
- );
- $resource = SubscriptionSchedule::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(SubscriptionSchedule::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules'
- );
- $resource = SubscriptionSchedule::create([
- 'phases' => [
- [
- 'items' => [
- ['price' => 'price_123', 'quantity' => 2],
- ],
- ],
- ],
- ]);
- self::assertInstanceOf(SubscriptionSchedule::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = SubscriptionSchedule::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(SubscriptionSchedule::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules/' . self::TEST_RESOURCE_ID
- );
- $resource = SubscriptionSchedule::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(SubscriptionSchedule::class, $resource);
- }
-
- public function testIsCancelable()
- {
- $resource = SubscriptionSchedule::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules/' . $resource->id . '/cancel',
- []
- );
- $resource->cancel([]);
- self::assertInstanceOf(SubscriptionSchedule::class, $resource);
- }
-
- public function testIsReleaseable()
- {
- $resource = SubscriptionSchedule::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/subscription_schedules/' . $resource->id . '/release',
- []
- );
- $resource->release([]);
- self::assertInstanceOf(SubscriptionSchedule::class, $resource);
- }
-}
diff --git a/tests/Stripe/SubscriptionTest.php b/tests/Stripe/SubscriptionTest.php
deleted file mode 100644
index fe1852879..000000000
--- a/tests/Stripe/SubscriptionTest.php
+++ /dev/null
@@ -1,118 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/subscriptions'
- );
- $resources = Subscription::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Subscription::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/subscriptions/' . self::TEST_RESOURCE_ID
- );
- $resource = Subscription::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Subscription::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscriptions'
- );
- $resource = Subscription::create([
- 'customer' => 'cus_123',
- ]);
- self::assertInstanceOf(Subscription::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Subscription::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/subscriptions/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Subscription::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/subscriptions/' . self::TEST_RESOURCE_ID
- );
- $resource = Subscription::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Subscription::class, $resource);
- }
-
- public function testIsCancelable()
- {
- $resource = Subscription::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/subscriptions/' . $resource->id,
- []
- );
- $resource->cancel([]);
- self::assertInstanceOf(Subscription::class, $resource);
- }
-
- public function testCanDeleteDiscount()
- {
- $resource = Subscription::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/subscriptions/' . $resource->id . '/discount'
- );
- $resource->deleteDiscount();
- self::assertInstanceOf(Subscription::class, $resource);
- }
-
- public function testSerializeParametersItems()
- {
- /** @var Subscription */
- $obj = Util\Util::convertToStripeObject([
- 'object' => 'subscription',
- 'items' => Util\Util::convertToStripeObject([
- 'object' => 'list',
- 'data' => [],
- ], null),
- ], null);
- $obj->items = [
- ['id' => 'si_foo', 'deleted' => true],
- ['plan' => 'plan_bar'],
- ];
- $expected = [
- 'items' => [
- 0 => ['id' => 'si_foo', 'deleted' => true],
- 1 => ['plan' => 'plan_bar'],
- ],
- ];
- self::assertSame($expected, $obj->serializeParameters());
- }
-}
diff --git a/tests/Stripe/Tax/SettingsTest.php b/tests/Stripe/Tax/SettingsTest.php
deleted file mode 100644
index 8298b100a..000000000
--- a/tests/Stripe/Tax/SettingsTest.php
+++ /dev/null
@@ -1,27 +0,0 @@
-expectsRequest(
- 'post',
- '/v1/tax/settings'
- );
- $resource = Settings::update([
- 'defaults' => [
- 'tax_behavior' => 'exclusive',
- ],
- ]);
- self::assertInstanceOf(Settings::class, $resource);
- }
-}
diff --git a/tests/Stripe/TaxCodeTest.php b/tests/Stripe/TaxCodeTest.php
deleted file mode 100644
index e45965400..000000000
--- a/tests/Stripe/TaxCodeTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/tax_codes'
- );
- $resources = TaxCode::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(TaxCode::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/tax_codes/' . self::TEST_RESOURCE_ID
- );
- $resource = TaxCode::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(TaxCode::class, $resource);
- }
-}
diff --git a/tests/Stripe/TaxIdTest.php b/tests/Stripe/TaxIdTest.php
deleted file mode 100644
index 51d64083f..000000000
--- a/tests/Stripe/TaxIdTest.php
+++ /dev/null
@@ -1,61 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/tax_ids'
- );
- $resources = TaxId::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(TaxId::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/tax_ids/' . self::TEST_RESOURCE_ID
- );
- $resource = TaxId::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(TaxId::class, $resource);
- self::assertSame(
- '/v1/tax_ids/' . self::TEST_RESOURCE_ID,
- $resource->instanceUrl()
- );
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/tax_ids'
- );
- $resource = TaxId::create(['type' => 'eu_vat', 'value' => 'DE123456789']);
- self::assertInstanceOf(TaxId::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = TaxId::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/tax_ids/' . self::TEST_RESOURCE_ID
- );
- $resource->delete();
- self::assertInstanceOf(TaxId::class, $resource);
- }
-}
diff --git a/tests/Stripe/TaxRateTest.php b/tests/Stripe/TaxRateTest.php
deleted file mode 100644
index 5827e3a67..000000000
--- a/tests/Stripe/TaxRateTest.php
+++ /dev/null
@@ -1,74 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/tax_rates'
- );
- $resources = TaxRate::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(TaxRate::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/tax_rates/' . self::TEST_RESOURCE_ID
- );
- $resource = TaxRate::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(TaxRate::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/tax_rates'
- );
- $resource = TaxRate::create([
- 'display_name' => 'name',
- 'inclusive' => false,
- 'percentage' => 10.15,
- ]);
- self::assertInstanceOf(TaxRate::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = TaxRate::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/tax_rates/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(TaxRate::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/tax_rates/' . self::TEST_RESOURCE_ID
- );
- $resource = TaxRate::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(TaxRate::class, $resource);
- }
-}
diff --git a/tests/Stripe/Terminal/ConnectionTokenTest.php b/tests/Stripe/Terminal/ConnectionTokenTest.php
deleted file mode 100644
index 7f0b5d9b6..000000000
--- a/tests/Stripe/Terminal/ConnectionTokenTest.php
+++ /dev/null
@@ -1,23 +0,0 @@
-expectsRequest(
- 'post',
- '/v1/terminal/connection_tokens'
- );
- $resource = ConnectionToken::create();
- self::assertInstanceOf(ConnectionToken::class, $resource);
- }
-}
diff --git a/tests/Stripe/Terminal/LocationTest.php b/tests/Stripe/Terminal/LocationTest.php
deleted file mode 100644
index 616e444af..000000000
--- a/tests/Stripe/Terminal/LocationTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/terminal/locations'
- );
- $resources = Location::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Location::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/terminal/locations/' . self::TEST_RESOURCE_ID
- );
- $resource = Location::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Location::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Location::retrieve(self::TEST_RESOURCE_ID);
- $resource->display_name = 'new-name';
-
- $this->expectsRequest(
- 'post',
- '/v1/terminal/locations/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(Location::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/terminal/locations/' . self::TEST_RESOURCE_ID,
- ['display_name' => 'new-name']
- );
- $resource = Location::update(self::TEST_RESOURCE_ID, [
- 'display_name' => 'new-name',
- ]);
- self::assertInstanceOf(Location::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/terminal/locations',
- [
- 'display_name' => 'name',
- 'address' => [
- 'line1' => 'line1',
- 'country' => 'US',
- 'state' => 'CA',
- 'postal_code' => '12345',
- 'city' => 'San Francisco',
- ],
- ]
- );
- $resource = Location::create([
- 'display_name' => 'name',
- 'address' => [
- 'line1' => 'line1',
- 'country' => 'US',
- 'state' => 'CA',
- 'postal_code' => '12345',
- 'city' => 'San Francisco',
- ],
- ]);
- self::assertInstanceOf(Location::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = Location::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/terminal/locations/' . self::TEST_RESOURCE_ID
- );
- $resource->delete();
- self::assertInstanceOf(Location::class, $resource);
- }
-}
diff --git a/tests/Stripe/Terminal/ReaderTest.php b/tests/Stripe/Terminal/ReaderTest.php
deleted file mode 100644
index 1edf4a022..000000000
--- a/tests/Stripe/Terminal/ReaderTest.php
+++ /dev/null
@@ -1,84 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/terminal/readers'
- );
- $resources = Reader::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Reader::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/terminal/readers/' . self::TEST_RESOURCE_ID
- );
- $resource = Reader::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Reader::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Reader::retrieve(self::TEST_RESOURCE_ID);
- $resource->label = 'new-name';
-
- $this->expectsRequest(
- 'post',
- '/v1/terminal/readers/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(Reader::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/terminal/readers/' . self::TEST_RESOURCE_ID,
- ['label' => 'new-name']
- );
- $resource = Reader::update(self::TEST_RESOURCE_ID, [
- 'label' => 'new-name',
- ]);
- self::assertInstanceOf(Reader::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/terminal/readers',
- ['registration_code' => 'a-b-c']
- );
- $resource = Reader::create(['registration_code' => 'a-b-c']);
- self::assertInstanceOf(Reader::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = Reader::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/terminal/readers/' . self::TEST_RESOURCE_ID
- );
- $resource->delete();
- self::assertInstanceOf(Reader::class, $resource);
- }
-}
diff --git a/tests/Stripe/TokenTest.php b/tests/Stripe/TokenTest.php
deleted file mode 100644
index bc4012bdf..000000000
--- a/tests/Stripe/TokenTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/tokens/' . self::TEST_RESOURCE_ID
- );
- $resource = Token::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Token::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/tokens'
- );
- $resource = Token::create(['card' => 'tok_visa']);
- self::assertInstanceOf(Token::class, $resource);
- }
-}
diff --git a/tests/Stripe/TopupTest.php b/tests/Stripe/TopupTest.php
deleted file mode 100644
index 050175dbd..000000000
--- a/tests/Stripe/TopupTest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/topups'
- );
- $resources = Topup::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Topup::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/topups/' . self::TEST_RESOURCE_ID
- );
- $resource = Topup::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Topup::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/topups'
- );
- $resource = Topup::create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'source' => 'tok_123',
- 'description' => 'description',
- 'statement_descriptor' => 'statement descriptor',
- ]);
- self::assertInstanceOf(Topup::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Topup::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/topups/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Topup::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/topups/' . self::TEST_RESOURCE_ID
- );
- $resource = Topup::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Topup::class, $resource);
- }
-
- public function testIsCancelable()
- {
- $resource = Topup::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'post',
- '/v1/topups/' . self::TEST_RESOURCE_ID . '/cancel'
- );
- $resource = $resource->cancel();
- self::assertInstanceOf(Topup::class, $resource);
- }
-}
diff --git a/tests/Stripe/TransferTest.php b/tests/Stripe/TransferTest.php
deleted file mode 100644
index 6a4139462..000000000
--- a/tests/Stripe/TransferTest.php
+++ /dev/null
@@ -1,122 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/transfers'
- );
- $resources = Transfer::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(Transfer::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/transfers/' . self::TEST_RESOURCE_ID
- );
- $resource = Transfer::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(Transfer::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/transfers'
- );
- $resource = Transfer::create([
- 'amount' => 100,
- 'currency' => 'usd',
- 'destination' => 'acct_123',
- ]);
- self::assertInstanceOf(Transfer::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = Transfer::retrieve(self::TEST_RESOURCE_ID);
- $resource->metadata['key'] = 'value';
- $this->expectsRequest(
- 'post',
- '/v1/transfers/' . $resource->id
- );
- $resource->save();
- self::assertInstanceOf(Transfer::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/transfers/' . self::TEST_RESOURCE_ID
- );
- $resource = Transfer::update(self::TEST_RESOURCE_ID, [
- 'metadata' => ['key' => 'value'],
- ]);
- self::assertInstanceOf(Transfer::class, $resource);
- }
-
- public function testCanCreateReversal()
- {
- $this->expectsRequest(
- 'post',
- '/v1/transfers/' . self::TEST_RESOURCE_ID . '/reversals'
- );
- $resource = Transfer::createReversal(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(TransferReversal::class, $resource);
- }
-
- public function testCanRetrieveReversal()
- {
- $this->expectsRequest(
- 'get',
- '/v1/transfers/' . self::TEST_RESOURCE_ID . '/reversals/' . self::TEST_REVERSAL_ID
- );
- $resource = Transfer::retrieveReversal(self::TEST_RESOURCE_ID, self::TEST_REVERSAL_ID);
- self::assertInstanceOf(TransferReversal::class, $resource);
- }
-
- public function testCanUpdateReversal()
- {
- $this->expectsRequest(
- 'post',
- '/v1/transfers/' . self::TEST_RESOURCE_ID . '/reversals/' . self::TEST_REVERSAL_ID
- );
- $resource = Transfer::updateReversal(
- self::TEST_RESOURCE_ID,
- self::TEST_REVERSAL_ID,
- [
- 'metadata' => ['key' => 'value'],
- ]
- );
- self::assertInstanceOf(TransferReversal::class, $resource);
- }
-
- public function testCanListReversal()
- {
- $this->expectsRequest(
- 'get',
- '/v1/transfers/' . self::TEST_RESOURCE_ID . '/reversals'
- );
- $resources = Transfer::allReversals(self::TEST_RESOURCE_ID);
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(TransferReversal::class, $resources->data[0]);
- }
-}
diff --git a/tests/Stripe/WebhookEndpointTest.php b/tests/Stripe/WebhookEndpointTest.php
deleted file mode 100644
index a62188bd4..000000000
--- a/tests/Stripe/WebhookEndpointTest.php
+++ /dev/null
@@ -1,84 +0,0 @@
-expectsRequest(
- 'get',
- '/v1/webhook_endpoints'
- );
- $resources = WebhookEndpoint::all();
- self::compatAssertIsArray($resources->data);
- self::assertInstanceOf(WebhookEndpoint::class, $resources->data[0]);
- }
-
- public function testIsRetrievable()
- {
- $this->expectsRequest(
- 'get',
- '/v1/webhook_endpoints/' . self::TEST_RESOURCE_ID
- );
- $resource = WebhookEndpoint::retrieve(self::TEST_RESOURCE_ID);
- self::assertInstanceOf(WebhookEndpoint::class, $resource);
- }
-
- public function testIsCreatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/webhook_endpoints'
- );
- $resource = WebhookEndpoint::create([
- 'enabled_events' => ['charge.succeeded'],
- 'url' => 'https://stripe.com',
- ]);
- self::assertInstanceOf(WebhookEndpoint::class, $resource);
- }
-
- public function testIsSaveable()
- {
- $resource = WebhookEndpoint::retrieve(self::TEST_RESOURCE_ID);
- $resource->enabled_events = ['charge.succeeded'];
- $this->expectsRequest(
- 'post',
- '/v1/webhook_endpoints/' . self::TEST_RESOURCE_ID
- );
- $resource->save();
- self::assertInstanceOf(WebhookEndpoint::class, $resource);
- }
-
- public function testIsUpdatable()
- {
- $this->expectsRequest(
- 'post',
- '/v1/webhook_endpoints/' . self::TEST_RESOURCE_ID
- );
- $resource = WebhookEndpoint::update(self::TEST_RESOURCE_ID, [
- 'enabled_events' => ['charge.succeeded'],
- ]);
- self::assertInstanceOf(WebhookEndpoint::class, $resource);
- }
-
- public function testIsDeletable()
- {
- $resource = WebhookEndpoint::retrieve(self::TEST_RESOURCE_ID);
- $this->expectsRequest(
- 'delete',
- '/v1/webhook_endpoints/' . self::TEST_RESOURCE_ID
- );
- $resource->delete();
- self::assertInstanceOf(WebhookEndpoint::class, $resource);
- }
-}