diff --git a/client/autopay.php b/client/autopay.php
index c3765953..e7953dde 100644
--- a/client/autopay.php
+++ b/client/autopay.php
@@ -12,7 +12,7 @@ if ($session_contact_primary == 0 && !$session_contact_is_billing_contact) {
}
// Initialize stripe
-require_once '../plugins/stripe-php-10.5.0/init.php';
+require_once '../plugins/stripe-php/init.php';
// Get Stripe vars
$stripe_vars = mysqli_fetch_array(mysqli_query($mysqli, "SELECT config_stripe_enable, config_stripe_publishable, config_stripe_secret FROM settings WHERE company_id = 1"));
diff --git a/client/post.php b/client/post.php
index cc0d30f8..01dc88b5 100644
--- a/client/post.php
+++ b/client/post.php
@@ -447,7 +447,7 @@ if (isset($_POST['create_stripe_customer'])) {
}
// Include stripe SDK
- require_once '../plugins/stripe-php-10.5.0/init.php';
+ require_once '../plugins/stripe-php/init.php';
// Get client's StripeID from database (should be none)
$stripe_client_details = mysqli_fetch_array(mysqli_query($mysqli, "SELECT stripe_id FROM client_stripe WHERE client_id = $session_client_id LIMIT 1"));
@@ -519,7 +519,7 @@ if (isset($_GET['create_stripe_checkout'])) {
try {
// Initialize stripe
- require_once '../plugins/stripe-php-10.5.0/init.php';
+ require_once '../plugins/stripe-php/init.php';
$stripe = new \Stripe\StripeClient($config_stripe_secret);
// Create checkout session (server side)
@@ -567,7 +567,7 @@ if (isset($_GET['stripe_save_card'])) {
try {
// Initialize stripe
- require_once '../plugins/stripe-php-10.5.0/init.php';
+ require_once '../plugins/stripe-php/init.php';
$stripe = new \Stripe\StripeClient($config_stripe_secret);
// Retrieve checkout session
@@ -662,7 +662,7 @@ if (isset($_GET['stripe_remove_pm'])) {
try {
// Initialize stripe
- require_once '../plugins/stripe-php-10.5.0/init.php';
+ require_once '../plugins/stripe-php/init.php';
$stripe = new \Stripe\StripeClient($config_stripe_secret);
// Detach PM
diff --git a/guest/guest_ajax.php b/guest/guest_ajax.php
index 43ee2203..523e5208 100644
--- a/guest/guest_ajax.php
+++ b/guest/guest_ajax.php
@@ -72,7 +72,7 @@ if (isset($_GET['stripe_create_pi'])) {
}
// Setup Stripe
- require_once '../plugins/stripe-php-10.5.0/init.php';
+ require_once '../plugins/stripe-php/init.php';
$row = mysqli_fetch_array(mysqli_query($mysqli, "SELECT config_stripe_enable, config_stripe_secret, config_stripe_account FROM settings WHERE company_id = 1"));
diff --git a/guest/guest_pay_invoice_stripe.php b/guest/guest_pay_invoice_stripe.php
index e7bb1814..9f3c9a6e 100644
--- a/guest/guest_pay_invoice_stripe.php
+++ b/guest/guest_pay_invoice_stripe.php
@@ -181,7 +181,7 @@ if (isset($_GET['invoice_id'], $_GET['url_key']) && !isset($_GET['payment_intent
$pi_cs = $_GET['payment_intent_client_secret'];
// Initialize stripe
- require_once '../plugins/stripe-php-10.5.0/init.php';
+ require_once '../plugins/stripe-php/init.php';
\Stripe\Stripe::setApiKey($config_stripe_secret);
diff --git a/plugins/stripe-php-10.5.0/VERSION b/plugins/stripe-php-10.5.0/VERSION
deleted file mode 100644
index 2cf514e3..00000000
--- a/plugins/stripe-php-10.5.0/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-10.5.0
diff --git a/plugins/stripe-php-10.5.0/lib/AccountLink.php b/plugins/stripe-php-10.5.0/lib/AccountLink.php
deleted file mode 100644
index 24a9e68a..00000000
--- a/plugins/stripe-php-10.5.0/lib/AccountLink.php
+++ /dev/null
@@ -1,26 +0,0 @@
-Connect
- * Onboarding.
- *
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property int $expires_at The timestamp at which this account link will expire.
- * @property string $url The URL for the account link.
- */
-class AccountLink extends ApiResource
-{
- const OBJECT_NAME = 'account_link';
-
- use ApiOperations\Create;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/ApiOperations/All.php b/plugins/stripe-php-10.5.0/lib/ApiOperations/All.php
deleted file mode 100644
index ff2955d1..00000000
--- a/plugins/stripe-php-10.5.0/lib/ApiOperations/All.php
+++ /dev/null
@@ -1,37 +0,0 @@
-json, $opts);
- if (!($obj instanceof \Stripe\Collection)) {
- throw new \Stripe\Exception\UnexpectedValueException(
- 'Expected type ' . \Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.'
- );
- }
- $obj->setLastResponse($response);
- $obj->setFilters($params);
-
- return $obj;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/ApiOperations/Search.php b/plugins/stripe-php-10.5.0/lib/ApiOperations/Search.php
deleted file mode 100644
index 09472eba..00000000
--- a/plugins/stripe-php-10.5.0/lib/ApiOperations/Search.php
+++ /dev/null
@@ -1,37 +0,0 @@
-json, $opts);
- if (!($obj instanceof \Stripe\SearchResult)) {
- throw new \Stripe\Exception\UnexpectedValueException(
- 'Expected type ' . \Stripe\SearchResult::class . ', got "' . \get_class($obj) . '" instead.'
- );
- }
- $obj->setLastResponse($response);
- $obj->setFilters($params);
-
- return $obj;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/ApplePayDomain.php b/plugins/stripe-php-10.5.0/lib/ApplePayDomain.php
deleted file mode 100644
index 5f9489d4..00000000
--- a/plugins/stripe-php-10.5.0/lib/ApplePayDomain.php
+++ /dev/null
@@ -1,31 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- */
-class ApplePayDomain extends ApiResource
-{
- const OBJECT_NAME = 'apple_pay_domain';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
-
- /**
- * @return string The class URL for this resource. It needs to be special
- * cased because it doesn't fit into the standard resource pattern.
- */
- public static function classUrl()
- {
- return '/v1/apple_pay/domains';
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Balance.php b/plugins/stripe-php-10.5.0/lib/Balance.php
deleted file mode 100644
index 4c14a880..00000000
--- a/plugins/stripe-php-10.5.0/lib/Balance.php
+++ /dev/null
@@ -1,35 +0,0 @@
-transactions
- * that contributed to the balance (charges, payouts, and so forth).
- *
- * The available and pending amounts for each currency are broken down further by
- * payment source types.
- *
- * Related guide: Understanding Connect
- * Account Balances.
- *
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the Transfers API or Payouts API. The available balance for each currency and payment type can be found in the source_types property.
- * @property \Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the source_types property.
- * @property \Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts.
- * @property \Stripe\StripeObject $issuing
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the source_types property.
- */
-class Balance extends SingletonApiResource
-{
- const OBJECT_NAME = 'balance';
-
- use ApiOperations\SingletonRetrieve;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/BalanceTransaction.php b/plugins/stripe-php-10.5.0/lib/BalanceTransaction.php
deleted file mode 100644
index d7ddea43..00000000
--- a/plugins/stripe-php-10.5.0/lib/BalanceTransaction.php
+++ /dev/null
@@ -1,71 +0,0 @@
-Balance
- * Transaction Types.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Gross amount of the transaction, in %s.
- * @property int $available_on The date the transaction's net funds will become available in the Stripe balance.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|float $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the amount in currency A, times exchange_rate, would be the amount in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's amount would be 1000 and currency would be eur. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's amount would be 1234, currency would be usd, and exchange_rate would be 1.234.
- * @property int $fee Fees (in %s) paid for this transaction.
- * @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in %s) paid for this transaction.
- * @property int $net Net amount of the transaction, in %s.
- * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.
- * @property null|string|\Stripe\StripeObject $source The Stripe object to which this transaction is related.
- * @property string $status If the transaction's net funds are available in the Stripe balance yet. Either available or pending.
- * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead.
- */
-class BalanceTransaction extends ApiResource
-{
- const OBJECT_NAME = 'balance_transaction';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-
- const TYPE_ADJUSTMENT = 'adjustment';
- const TYPE_ADVANCE = 'advance';
- const TYPE_ADVANCE_FUNDING = 'advance_funding';
- const TYPE_ANTICIPATION_REPAYMENT = 'anticipation_repayment';
- const TYPE_APPLICATION_FEE = 'application_fee';
- const TYPE_APPLICATION_FEE_REFUND = 'application_fee_refund';
- const TYPE_CHARGE = 'charge';
- const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer';
- const TYPE_CONTRIBUTION = 'contribution';
- const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold';
- const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release';
- const TYPE_ISSUING_DISPUTE = 'issuing_dispute';
- const TYPE_ISSUING_TRANSACTION = 'issuing_transaction';
- const TYPE_PAYMENT = 'payment';
- const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund';
- const TYPE_PAYMENT_REFUND = 'payment_refund';
- const TYPE_PAYOUT = 'payout';
- const TYPE_PAYOUT_CANCEL = 'payout_cancel';
- const TYPE_PAYOUT_FAILURE = 'payout_failure';
- const TYPE_REFUND = 'refund';
- const TYPE_REFUND_FAILURE = 'refund_failure';
- const TYPE_RESERVE_TRANSACTION = 'reserve_transaction';
- const TYPE_RESERVED_FUNDS = 'reserved_funds';
- const TYPE_STRIPE_FEE = 'stripe_fee';
- const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee';
- const TYPE_TAX_FEE = 'tax_fee';
- const TYPE_TOPUP = 'topup';
- const TYPE_TOPUP_REVERSAL = 'topup_reversal';
- const TYPE_TRANSFER = 'transfer';
- const TYPE_TRANSFER_CANCEL = 'transfer_cancel';
- const TYPE_TRANSFER_FAILURE = 'transfer_failure';
- const TYPE_TRANSFER_REFUND = 'transfer_refund';
-}
diff --git a/plugins/stripe-php-10.5.0/lib/BillingPortal/Configuration.php b/plugins/stripe-php-10.5.0/lib/BillingPortal/Configuration.php
deleted file mode 100644
index 4449654c..00000000
--- a/plugins/stripe-php-10.5.0/lib/BillingPortal/Configuration.php
+++ /dev/null
@@ -1,33 +0,0 @@
-overriden when creating the session.
- * @property \Stripe\StripeObject $features
- * @property bool $is_default Whether the configuration is the default. If true, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $login_page
- * @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 int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
- */
-class Configuration extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'billing_portal.configuration';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Coupon.php b/plugins/stripe-php-10.5.0/lib/Coupon.php
deleted file mode 100644
index ce9b611d..00000000
--- a/plugins/stripe-php-10.5.0/lib/Coupon.php
+++ /dev/null
@@ -1,45 +0,0 @@
-subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not
- * work with conventional one-off charges or payment intents.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|int $amount_off Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer.
- * @property \Stripe\StripeObject $applies_to
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $currency If amount_off has been set, the three-letter ISO code for the currency of the amount to take off.
- * @property \Stripe\StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
- * @property string $duration One of forever, once, and repeating. Describes how long a customer who applies this coupon will get the discount.
- * @property null|int $duration_in_months If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts.
- * @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.
- * @property null|int $redeem_by Date after which the coupon can no longer be redeemed.
- * @property int $times_redeemed Number of times this coupon has been applied to a customer.
- * @property bool $valid Taking account of the above properties, whether this coupon can still be applied to a customer.
- */
-class Coupon extends ApiResource
-{
- const OBJECT_NAME = 'coupon';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Discount.php b/plugins/stripe-php-10.5.0/lib/Discount.php
deleted file mode 100644
index dbc5d4bb..00000000
--- a/plugins/stripe-php-10.5.0/lib/Discount.php
+++ /dev/null
@@ -1,23 +0,0 @@
-Event object. For example, when a charge succeeds, we create a
- * charge.succeeded event; and when an invoice payment attempt fails,
- * we create an invoice.payment_failed event. Note that many API
- * requests may cause multiple events to be created. For example, if you create a
- * new subscription for a customer, you will receive both a
- * customer.subscription.created event and a
- * charge.succeeded event.
- *
- * Events occur when the state of another API resource changes. The state of that
- * resource at the time of the change is embedded in the event's data field. For
- * example, a charge.succeeded event will contain a charge, and an
- * invoice.payment_failed event will contain an invoice.
- *
- * As with other API resources, you can use endpoints to retrieve an individual event or a list of events from the API.
- * We also have a separate webhooks system for sending the
- * Event objects directly to an endpoint on your server. Webhooks are
- * managed in your account
- * settings, and our Using
- * Webhooks guide will help you get set up.
- *
- * When using Connect, you can also
- * receive notifications of events that occur in connected accounts. For these
- * events, there will be an additional account attribute in the
- * received Event object.
- *
- * NOTE: Right now, access to events through the Retrieve Event API is
- * guaranteed only for 30 days.
- *
- * This class includes constants for the possible string representations of
- * event types. See https://stripe.com/docs/api#event_types for more details.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $account The connected account that originated the event.
- * @property null|string $api_version The Stripe API version used to render data. Note: This property is populated only for events on or after October 31, 2014.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $data
- * @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 $pending_webhooks Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.
- * @property null|\Stripe\StripeObject $request Information on the API request that instigated the event.
- * @property string $type Description of the event (e.g., invoice.created or charge.refunded).
- */
-class Event extends ApiResource
-{
- const OBJECT_NAME = 'event';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-
- const ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized';
- const ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized';
- const ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created';
- const ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted';
- const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated';
- const ACCOUNT_UPDATED = 'account.updated';
- const APPLICATION_FEE_CREATED = 'application_fee.created';
- const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
- const APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
- const BALANCE_AVAILABLE = 'balance.available';
- const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
- const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
- const BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
- const CAPABILITY_UPDATED = 'capability.updated';
- const CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available';
- const CHARGE_CAPTURED = 'charge.captured';
- const CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed';
- const CHARGE_DISPUTE_CREATED = 'charge.dispute.created';
- const CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated';
- const CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn';
- const CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated';
- const CHARGE_EXPIRED = 'charge.expired';
- const CHARGE_FAILED = 'charge.failed';
- const CHARGE_PENDING = 'charge.pending';
- const CHARGE_REFUND_UPDATED = 'charge.refund.updated';
- const CHARGE_REFUNDED = 'charge.refunded';
- const CHARGE_SUCCEEDED = 'charge.succeeded';
- const CHARGE_UPDATED = 'charge.updated';
- const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed';
- const CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED = 'checkout.session.async_payment_succeeded';
- const CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed';
- const CHECKOUT_SESSION_EXPIRED = 'checkout.session.expired';
- const COUPON_CREATED = 'coupon.created';
- const COUPON_DELETED = 'coupon.deleted';
- const COUPON_UPDATED = 'coupon.updated';
- const CREDIT_NOTE_CREATED = 'credit_note.created';
- const CREDIT_NOTE_UPDATED = 'credit_note.updated';
- const CREDIT_NOTE_VOIDED = 'credit_note.voided';
- const CUSTOMER_CREATED = 'customer.created';
- const CUSTOMER_DELETED = 'customer.deleted';
- const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created';
- const CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted';
- const CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated';
- const CUSTOMER_SOURCE_CREATED = 'customer.source.created';
- const CUSTOMER_SOURCE_DELETED = 'customer.source.deleted';
- const CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring';
- const CUSTOMER_SOURCE_UPDATED = 'customer.source.updated';
- const CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created';
- const CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted';
- const CUSTOMER_SUBSCRIPTION_PAUSED = 'customer.subscription.paused';
- const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied';
- const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired';
- const CUSTOMER_SUBSCRIPTION_RESUMED = 'customer.subscription.resumed';
- const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end';
- const CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated';
- const CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created';
- const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted';
- const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
- const CUSTOMER_UPDATED = 'customer.updated';
- const CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created';
- const FILE_CREATED = 'file.created';
- const FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created';
- const FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated';
- const FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
- const FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
- const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
- const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
- const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
- const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
- const IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted';
- const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input';
- const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified';
- const INVOICE_CREATED = 'invoice.created';
- const INVOICE_DELETED = 'invoice.deleted';
- const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
- const INVOICE_FINALIZED = 'invoice.finalized';
- const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible';
- const INVOICE_PAID = 'invoice.paid';
- const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
- const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
- const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
- const INVOICE_SENT = 'invoice.sent';
- const INVOICE_UPCOMING = 'invoice.upcoming';
- const INVOICE_UPDATED = 'invoice.updated';
- const INVOICE_VOIDED = 'invoice.voided';
- const INVOICEITEM_CREATED = 'invoiceitem.created';
- const INVOICEITEM_DELETED = 'invoiceitem.deleted';
- const INVOICEITEM_UPDATED = 'invoiceitem.updated';
- const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created';
- const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request';
- const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated';
- const ISSUING_CARD_CREATED = 'issuing_card.created';
- const ISSUING_CARD_UPDATED = 'issuing_card.updated';
- const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created';
- const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated';
- const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
- const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
- const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
- const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
- const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
- const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created';
- const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated';
- const MANDATE_UPDATED = 'mandate.updated';
- const ORDER_CREATED = 'order.created';
- const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated';
- const PAYMENT_INTENT_CANCELED = 'payment_intent.canceled';
- const PAYMENT_INTENT_CREATED = 'payment_intent.created';
- const PAYMENT_INTENT_PARTIALLY_FUNDED = 'payment_intent.partially_funded';
- const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed';
- const PAYMENT_INTENT_PROCESSING = 'payment_intent.processing';
- const PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action';
- const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded';
- const PAYMENT_LINK_CREATED = 'payment_link.created';
- const PAYMENT_LINK_UPDATED = 'payment_link.updated';
- const PAYMENT_METHOD_ATTACHED = 'payment_method.attached';
- const PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated';
- const PAYMENT_METHOD_DETACHED = 'payment_method.detached';
- const PAYMENT_METHOD_UPDATED = 'payment_method.updated';
- const PAYOUT_CANCELED = 'payout.canceled';
- const PAYOUT_CREATED = 'payout.created';
- const PAYOUT_FAILED = 'payout.failed';
- const PAYOUT_PAID = 'payout.paid';
- const PAYOUT_UPDATED = 'payout.updated';
- const PERSON_CREATED = 'person.created';
- const PERSON_DELETED = 'person.deleted';
- const PERSON_UPDATED = 'person.updated';
- const PLAN_CREATED = 'plan.created';
- const PLAN_DELETED = 'plan.deleted';
- const PLAN_UPDATED = 'plan.updated';
- const PRICE_CREATED = 'price.created';
- const PRICE_DELETED = 'price.deleted';
- const PRICE_UPDATED = 'price.updated';
- const PRODUCT_CREATED = 'product.created';
- const PRODUCT_DELETED = 'product.deleted';
- const PRODUCT_UPDATED = 'product.updated';
- const PROMOTION_CODE_CREATED = 'promotion_code.created';
- const PROMOTION_CODE_UPDATED = 'promotion_code.updated';
- const QUOTE_ACCEPTED = 'quote.accepted';
- const QUOTE_CANCELED = 'quote.canceled';
- const QUOTE_CREATED = 'quote.created';
- const QUOTE_FINALIZED = 'quote.finalized';
- const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created';
- const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated';
- const RECIPIENT_CREATED = 'recipient.created';
- const RECIPIENT_DELETED = 'recipient.deleted';
- const RECIPIENT_UPDATED = 'recipient.updated';
- const REFUND_CREATED = 'refund.created';
- const REFUND_UPDATED = 'refund.updated';
- const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed';
- const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded';
- const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated';
- const REVIEW_CLOSED = 'review.closed';
- const REVIEW_OPENED = 'review.opened';
- const SETUP_INTENT_CANCELED = 'setup_intent.canceled';
- const SETUP_INTENT_CREATED = 'setup_intent.created';
- const SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action';
- const SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed';
- const SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded';
- const SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created';
- const SKU_CREATED = 'sku.created';
- const SKU_DELETED = 'sku.deleted';
- const SKU_UPDATED = 'sku.updated';
- const SOURCE_CANCELED = 'source.canceled';
- const SOURCE_CHARGEABLE = 'source.chargeable';
- const SOURCE_FAILED = 'source.failed';
- const SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification';
- const SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required';
- const SOURCE_TRANSACTION_CREATED = 'source.transaction.created';
- const SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated';
- const SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted';
- const SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled';
- const SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed';
- const SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created';
- const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring';
- const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released';
- const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated';
- const TAX_RATE_CREATED = 'tax_rate.created';
- const TAX_RATE_UPDATED = 'tax_rate.updated';
- const TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed';
- const TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded';
- const TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing';
- const TEST_HELPERS_TEST_CLOCK_CREATED = 'test_helpers.test_clock.created';
- const TEST_HELPERS_TEST_CLOCK_DELETED = 'test_helpers.test_clock.deleted';
- const TEST_HELPERS_TEST_CLOCK_INTERNAL_FAILURE = 'test_helpers.test_clock.internal_failure';
- const TEST_HELPERS_TEST_CLOCK_READY = 'test_helpers.test_clock.ready';
- const TOPUP_CANCELED = 'topup.canceled';
- const TOPUP_CREATED = 'topup.created';
- const TOPUP_FAILED = 'topup.failed';
- const TOPUP_REVERSED = 'topup.reversed';
- const TOPUP_SUCCEEDED = 'topup.succeeded';
- const TRANSFER_CREATED = 'transfer.created';
- const TRANSFER_REVERSED = 'transfer.reversed';
- const TRANSFER_UPDATED = 'transfer.updated';
- const TREASURY_CREDIT_REVERSAL_CREATED = 'treasury.credit_reversal.created';
- const TREASURY_CREDIT_REVERSAL_POSTED = 'treasury.credit_reversal.posted';
- const TREASURY_DEBIT_REVERSAL_COMPLETED = 'treasury.debit_reversal.completed';
- const TREASURY_DEBIT_REVERSAL_CREATED = 'treasury.debit_reversal.created';
- const TREASURY_DEBIT_REVERSAL_INITIAL_CREDIT_GRANTED = 'treasury.debit_reversal.initial_credit_granted';
- const TREASURY_FINANCIAL_ACCOUNT_CLOSED = 'treasury.financial_account.closed';
- const TREASURY_FINANCIAL_ACCOUNT_CREATED = 'treasury.financial_account.created';
- const TREASURY_FINANCIAL_ACCOUNT_FEATURES_STATUS_UPDATED = 'treasury.financial_account.features_status_updated';
- const TREASURY_INBOUND_TRANSFER_CANCELED = 'treasury.inbound_transfer.canceled';
- const TREASURY_INBOUND_TRANSFER_CREATED = 'treasury.inbound_transfer.created';
- const TREASURY_INBOUND_TRANSFER_FAILED = 'treasury.inbound_transfer.failed';
- const TREASURY_INBOUND_TRANSFER_SUCCEEDED = 'treasury.inbound_transfer.succeeded';
- const TREASURY_OUTBOUND_PAYMENT_CANCELED = 'treasury.outbound_payment.canceled';
- const TREASURY_OUTBOUND_PAYMENT_CREATED = 'treasury.outbound_payment.created';
- const TREASURY_OUTBOUND_PAYMENT_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_payment.expected_arrival_date_updated';
- const TREASURY_OUTBOUND_PAYMENT_FAILED = 'treasury.outbound_payment.failed';
- const TREASURY_OUTBOUND_PAYMENT_POSTED = 'treasury.outbound_payment.posted';
- const TREASURY_OUTBOUND_PAYMENT_RETURNED = 'treasury.outbound_payment.returned';
- const TREASURY_OUTBOUND_TRANSFER_CANCELED = 'treasury.outbound_transfer.canceled';
- const TREASURY_OUTBOUND_TRANSFER_CREATED = 'treasury.outbound_transfer.created';
- const TREASURY_OUTBOUND_TRANSFER_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_transfer.expected_arrival_date_updated';
- const TREASURY_OUTBOUND_TRANSFER_FAILED = 'treasury.outbound_transfer.failed';
- const TREASURY_OUTBOUND_TRANSFER_POSTED = 'treasury.outbound_transfer.posted';
- const TREASURY_OUTBOUND_TRANSFER_RETURNED = 'treasury.outbound_transfer.returned';
- const TREASURY_RECEIVED_CREDIT_CREATED = 'treasury.received_credit.created';
- const TREASURY_RECEIVED_CREDIT_FAILED = 'treasury.received_credit.failed';
- const TREASURY_RECEIVED_CREDIT_SUCCEEDED = 'treasury.received_credit.succeeded';
- const TREASURY_RECEIVED_DEBIT_CREATED = 'treasury.received_debit.created';
-}
diff --git a/plugins/stripe-php-10.5.0/lib/ExchangeRate.php b/plugins/stripe-php-10.5.0/lib/ExchangeRate.php
deleted file mode 100644
index 382253c1..00000000
--- a/plugins/stripe-php-10.5.0/lib/ExchangeRate.php
+++ /dev/null
@@ -1,30 +0,0 @@
-Exchange Rate objects allow you to determine the rates that Stripe
- * is currently using to convert from one currency to another. Since this number is
- * variable throughout the day, there are various reasons why you might want to
- * know the current rate (for example, to dynamically price an item for a user with
- * a default payment in a foreign currency).
- *
- * If you want a guarantee that the charge is made with a certain exchange rate you
- * expect is current, you can pass in exchange_rate to charges
- * endpoints. If the value is no longer up to date, the charge won't go through.
- * Please refer to our Exchange
- * Rates API guide for more details.
- *
- * @property string $id Unique identifier for the object. Represented as the three-letter ISO currency code in lowercase.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $rates Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
- */
-class ExchangeRate extends ApiResource
-{
- const OBJECT_NAME = 'exchange_rate';
-
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/FileLink.php b/plugins/stripe-php-10.5.0/lib/FileLink.php
deleted file mode 100644
index ce3b10bd..00000000
--- a/plugins/stripe-php-10.5.0/lib/FileLink.php
+++ /dev/null
@@ -1,30 +0,0 @@
-File object with non-Stripe users, you
- * can create a FileLink. FileLinks contain a URL that
- * can be used to retrieve the contents of the file without authentication.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property bool $expired Whether this link is already expired.
- * @property null|int $expires_at Time at which the link expires.
- * @property string|\Stripe\File $file The file object this link points 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.
- * @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 $url The publicly accessible URL to download the file.
- */
-class FileLink extends ApiResource
-{
- const OBJECT_NAME = 'file_link';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/FinancialConnections/Session.php b/plugins/stripe-php-10.5.0/lib/FinancialConnections/Session.php
deleted file mode 100644
index 8d55cd06..00000000
--- a/plugins/stripe-php-10.5.0/lib/FinancialConnections/Session.php
+++ /dev/null
@@ -1,27 +0,0 @@
- $accounts The accounts that were collected as part of this Session.
- * @property string $client_secret A value that will be passed to the client to launch the authentication flow.
- * @property \Stripe\StripeObject $filters
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string[] $permissions Permissions requested for accounts collected during this session.
- * @property string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
- */
-class Session extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'financial_connections.session';
-
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Identity/VerificationReport.php b/plugins/stripe-php-10.5.0/lib/Identity/VerificationReport.php
deleted file mode 100644
index f41007c6..00000000
--- a/plugins/stripe-php-10.5.0/lib/Identity/VerificationReport.php
+++ /dev/null
@@ -1,45 +0,0 @@
-type and options parameters used. You can find the
- * result of each verification check performed in the appropriate sub-resource:
- * document, id_number, selfie.
- *
- * Each VerificationReport contains a copy of any data collected by the user as
- * well as reference IDs which can be used to access collected images through the
- * FileUpload API. To configure and
- * create VerificationReports, use the VerificationSession
- * API.
- *
- * Related guides: Accessing
- * verification results.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $document Result from a document check
- * @property \Stripe\StripeObject $id_number Result from an id_number check
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $options
- * @property \Stripe\StripeObject $selfie Result from a selfie check
- * @property string $type Type of report.
- * @property null|string $verification_session ID of the VerificationSession that created this report.
- */
-class VerificationReport extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'identity.verification_report';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-
- const TYPE_DOCUMENT = 'document';
- const TYPE_ID_NUMBER = 'id_number';
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Identity/VerificationSession.php b/plugins/stripe-php-10.5.0/lib/Identity/VerificationSession.php
deleted file mode 100644
index 180e5091..00000000
--- a/plugins/stripe-php-10.5.0/lib/Identity/VerificationSession.php
+++ /dev/null
@@ -1,88 +0,0 @@
-verification check to perform.
- * Only create one VerificationSession for each verification in your system.
- *
- * A VerificationSession transitions through multiple statuses throughout its
- * lifetime as it progresses through the verification flow. The VerificationSession
- * contains the user's verified data after verification checks are complete.
- *
- * Related guide: The Verification
- * Sessions API
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string $client_secret The short-lived client secret used by Stripe.js to show a verification modal inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on passing the client secret to the frontend to learn more.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|\Stripe\StripeObject $last_error If present, this property tells you the last error encountered when processing the verification.
- * @property null|string|\Stripe\Identity\VerificationReport $last_verification_report ID of the most recent VerificationReport. Learn more about accessing detailed verification results.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $options
- * @property null|\Stripe\StripeObject $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
- * @property string $status Status of this VerificationSession. Learn more about the lifecycle of sessions.
- * @property string $type The type of verification check to be performed.
- * @property null|string $url The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on verifying identity documents to learn how to redirect users to Stripe.
- * @property null|\Stripe\StripeObject $verified_outputs The user’s verified data.
- */
-class VerificationSession extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'identity.verification_session';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_PROCESSING = 'processing';
- const STATUS_REQUIRES_INPUT = 'requires_input';
- const STATUS_VERIFIED = 'verified';
-
- const TYPE_DOCUMENT = 'document';
- const TYPE_ID_NUMBER = 'id_number';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationSession the canceled verification session
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Identity\VerificationSession the redacted verification session
- */
- public function redact($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/redact';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/InvoiceItem.php b/plugins/stripe-php-10.5.0/lib/InvoiceItem.php
deleted file mode 100644
index 76eae069..00000000
--- a/plugins/stripe-php-10.5.0/lib/InvoiceItem.php
+++ /dev/null
@@ -1,50 +0,0 @@
-Subscription
- * Invoices.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount (in the currency specified) of the invoice item. This should always be equal to unit_amount * quantity.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string|\Stripe\Customer $customer The ID of the customer who will be billed when this invoice item is billed.
- * @property int $date Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations.
- * @property null|(string|\Stripe\Discount)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
- * @property null|string|\Stripe\Invoice $invoice The ID of the invoice this invoice item belongs 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.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $period
- * @property null|\Stripe\Plan $plan If the invoice item is a proration, the plan of the subscription that the proration was computed for.
- * @property null|\Stripe\Price $price The price of the invoice item.
- * @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
- * @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
- * @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any.
- * @property string $subscription_item The subscription item that this invoice item has been created for, if any.
- * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item.
- * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to.
- * @property null|int $unit_amount Unit amount (in the currency specified) of the invoice item.
- * @property null|string $unit_amount_decimal Same as unit_amount, but contains a decimal value with at most 12 decimal places.
- */
-class InvoiceItem extends ApiResource
-{
- const OBJECT_NAME = 'invoiceitem';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/InvoiceLineItem.php b/plugins/stripe-php-10.5.0/lib/InvoiceLineItem.php
deleted file mode 100644
index e5c123b2..00000000
--- a/plugins/stripe-php-10.5.0/lib/InvoiceLineItem.php
+++ /dev/null
@@ -1,36 +0,0 @@
-ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item.
- * @property bool $discountable If true, discounts will apply to this line item. Always false for prorations.
- * @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
- * @property string $invoice_item The ID of the invoice item associated with this line item if any.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with type=subscription this will reflect the metadata of the subscription that caused the line item to be created.
- * @property \Stripe\StripeObject $period
- * @property null|\Stripe\Plan $plan The plan of the subscription, if the line item is a subscription or a proration.
- * @property null|\Stripe\Price $price The price of the line item.
- * @property bool $proration Whether this is a proration.
- * @property null|\Stripe\StripeObject $proration_details Additional details for proration line items
- * @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
- * @property null|string $subscription The subscription that the invoice item pertains to, if any.
- * @property string $subscription_item The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
- * @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
- * @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
- * @property string $type A string identifying the type of the source of this line item, either an invoiceitem or a subscription.
- * @property null|string $unit_amount_excluding_tax The amount in %s representing the unit amount for this line item, excluding all tax and discounts.
- */
-class InvoiceLineItem extends ApiResource
-{
- const OBJECT_NAME = 'line_item';
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Issuing/Authorization.php b/plugins/stripe-php-10.5.0/lib/Issuing/Authorization.php
deleted file mode 100644
index 1433edd9..00000000
--- a/plugins/stripe-php-10.5.0/lib/Issuing/Authorization.php
+++ /dev/null
@@ -1,83 +0,0 @@
-issued card is used to
- * make a purchase, an Issuing Authorization object is created. Authorizations
- * must be approved for the purchase to be completed successfully.
- *
- * Related guide: Issued Card
- * Authorizations.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount The total amount that was authorized or rejected. This amount is in the card's currency and in the smallest currency unit.
- * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit.
- * @property bool $approved Whether the authorization has been approved.
- * @property string $authorization_method How the card details were provided.
- * @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization.
- * @property \Stripe\Issuing\Card $card You can create physical or virtual cards that are issued to cardholders.
- * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property 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 $merchant_amount The total amount that was authorized or rejected. This amount is in the merchant_currency and in the smallest currency unit.
- * @property string $merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property \Stripe\StripeObject $merchant_data
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|\Stripe\StripeObject $network_data Details about the authorization, such as identifiers, set by the card network.
- * @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an issuing_authorization.request webhook.
- * @property \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 \Stripe\Issuing\Transaction[] $transactions List of transactions associated with this authorization.
- * @property null|\Stripe\StripeObject $treasury Treasury details related to this authorization if it was created on a FinancialAccount.
- * @property \Stripe\StripeObject $verification_data
- * @property null|string $wallet The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay. Will populate as null when no digital wallet was utilized.
- */
-class Authorization extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'issuing.authorization';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Authorization the approved authorization
- */
- public function approve($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/approve';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Authorization the declined authorization
- */
- public function decline($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/decline';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Issuing/Card.php b/plugins/stripe-php-10.5.0/lib/Issuing/Card.php
deleted file mode 100644
index 78f1e3fc..00000000
--- a/plugins/stripe-php-10.5.0/lib/Issuing/Card.php
+++ /dev/null
@@ -1,43 +0,0 @@
-create physical or
- * virtual cards that are issued to cardholders.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $brand The brand of the card.
- * @property null|string $cancellation_reason The reason why the card was canceled.
- * @property \Stripe\Issuing\Cardholder $cardholder
An Issuing Cardholder object represents an individual or business entity who is issued cards.
Related guide: How to create a Cardholder
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property string $currency Three-letter ISO currency code, in lowercase. Supported currencies areusd in the US, eur in the EU, and gbp in the UK.
- * @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
- * @property int $exp_month The expiration month of the card.
- * @property int $exp_year The expiration year of the card.
- * @property null|string $financial_account The financial account this card is attached to.
- * @property string $last4 The last 4 digits of the card number.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
- * @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any.
- * @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any.
- * @property null|string $replacement_reason The reason why the previous card needed to be replaced.
- * @property null|\Stripe\StripeObject $shipping Where and how the card will be shipped.
- * @property \Stripe\StripeObject $spending_controls
- * @property string $status Whether authorizations can be approved on this card.
- * @property string $type The type of the card.
- * @property null|\Stripe\StripeObject $wallets Information relating to digital wallets (like Apple Pay and Google Pay).
- */
-class Card extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'issuing.card';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Issuing/Cardholder.php b/plugins/stripe-php-10.5.0/lib/Issuing/Cardholder.php
deleted file mode 100644
index 1e220d23..00000000
--- a/plugins/stripe-php-10.5.0/lib/Issuing/Cardholder.php
+++ /dev/null
@@ -1,39 +0,0 @@
-Cardholder object represents an individual or business
- * entity who is issued cards.
- *
- * Related guide: How to create a
- * Cardholder
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $billing
- * @property null|\Stripe\StripeObject $company Additional information about a company cardholder.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $email The cardholder's email address.
- * @property null|\Stripe\StripeObject $individual Additional information about an individual cardholder.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $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 \Stripe\StripeObject $requirements
- * @property null|\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.
- * @property string $type One of individual or company.
- */
-class Cardholder extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'issuing.cardholder';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Issuing/Dispute.php b/plugins/stripe-php-10.5.0/lib/Issuing/Dispute.php
deleted file mode 100644
index 644831a7..00000000
--- a/plugins/stripe-php-10.5.0/lib/Issuing/Dispute.php
+++ /dev/null
@@ -1,54 +0,0 @@
-card issuer, you can dispute
- * transactions that the cardholder does not recognize, suspects to be fraudulent,
- * or has other issues with.
- *
- * Related guide: Disputing
- * Transactions
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Disputed amount in the card's currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation).
- * @property null|\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency The currency the transaction was made in.
- * @property \Stripe\StripeObject $evidence
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $status Current status of the dispute.
- * @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed.
- * @property null|\Stripe\StripeObject $treasury Treasury details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
- */
-class Dispute extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'issuing.dispute';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Issuing\Dispute the submited dispute
- */
- public function submit($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/submit';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Mandate.php b/plugins/stripe-php-10.5.0/lib/Mandate.php
deleted file mode 100644
index 3452a014..00000000
--- a/plugins/stripe-php-10.5.0/lib/Mandate.php
+++ /dev/null
@@ -1,27 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $multi_use
- * @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate.
- * @property \Stripe\StripeObject $payment_method_details
- * @property \Stripe\StripeObject $single_use
- * @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment.
- * @property string $type The type of the mandate.
- */
-class Mandate extends ApiResource
-{
- const OBJECT_NAME = 'mandate';
-
- use ApiOperations\Retrieve;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/PaymentMethod.php b/plugins/stripe-php-10.5.0/lib/PaymentMethod.php
deleted file mode 100644
index 1ac4cee2..00000000
--- a/plugins/stripe-php-10.5.0/lib/PaymentMethod.php
+++ /dev/null
@@ -1,101 +0,0 @@
-PaymentIntents to
- * collect payments or save them to Customer objects to store instrument details
- * for future payments.
- *
- * Related guides: Payment Methods and
- * More Payment
- * Scenarios.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $acss_debit
- * @property \Stripe\StripeObject $affirm
- * @property \Stripe\StripeObject $afterpay_clearpay
- * @property \Stripe\StripeObject $alipay
- * @property \Stripe\StripeObject $au_becs_debit
- * @property \Stripe\StripeObject $bacs_debit
- * @property \Stripe\StripeObject $bancontact
- * @property \Stripe\StripeObject $billing_details
- * @property \Stripe\StripeObject $blik
- * @property \Stripe\StripeObject $boleto
- * @property \Stripe\StripeObject $card
- * @property \Stripe\StripeObject $card_present
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string|\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
- * @property \Stripe\StripeObject $customer_balance
- * @property \Stripe\StripeObject $eps
- * @property \Stripe\StripeObject $fpx
- * @property \Stripe\StripeObject $giropay
- * @property \Stripe\StripeObject $grabpay
- * @property \Stripe\StripeObject $ideal
- * @property \Stripe\StripeObject $interac_present
- * @property \Stripe\StripeObject $klarna
- * @property \Stripe\StripeObject $konbini
- * @property \Stripe\StripeObject $link
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $oxxo
- * @property \Stripe\StripeObject $p24
- * @property \Stripe\StripeObject $paynow
- * @property \Stripe\StripeObject $pix
- * @property \Stripe\StripeObject $promptpay
- * @property \Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information.
- * @property \Stripe\StripeObject $sepa_debit
- * @property \Stripe\StripeObject $sofort
- * @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
- * @property \Stripe\StripeObject $us_bank_account
- * @property \Stripe\StripeObject $wechat_pay
- */
-class PaymentMethod extends ApiResource
-{
- const OBJECT_NAME = 'payment_method';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentMethod the attached payment method
- */
- public function attach($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/attach';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\PaymentMethod the detached payment method
- */
- public function detach($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/detach';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Payout.php b/plugins/stripe-php-10.5.0/lib/Payout.php
deleted file mode 100644
index f3d20f79..00000000
--- a/plugins/stripe-php-10.5.0/lib/Payout.php
+++ /dev/null
@@ -1,110 +0,0 @@
-Payout object is created when you receive funds from Stripe, or
- * when you initiate a payout to either a bank account or debit card of a connected Stripe account. You
- * can retrieve individual payouts, as well as list all payouts. Payouts are made
- * on varying schedules,
- * depending on your country and industry.
- *
- * Related guide: Receiving Payouts.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount (in %s) to be transferred to your bank account or debit card.
- * @property int $arrival_date Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.
- * @property bool $automatic Returns true if the payout was created by an automated payout schedule, and false if it was requested manually.
- * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|string|\Stripe\BankAccount|\Stripe\Card $destination ID of the bank account or card the payout was sent to.
- * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.
- * @property null|string $failure_code Error code explaining reason for payout failure if available. See Types of payout failures for a list of failure codes.
- * @property null|string $failure_message Message to user further explaining reason for payout failure if available.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $method The method used to send this payout, which can be standard or instant. instant is only supported for payouts to debit cards. (See Instant payouts for marketplaces for more information.)
- * @property null|string|\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout.
- * @property null|string|\Stripe\Payout $reversed_by If the payout was reversed, this is the ID of the payout that reverses this payout.
- * @property string $source_type The source balance this payout came from. One of card, fpx, or bank_account.
- * @property null|string $statement_descriptor Extra information about a payout to be displayed on the user's bank statement.
- * @property string $status Current status of the payout: paid, pending, in_transit, canceled or failed. A payout is pending until it is submitted to the bank, when it becomes in_transit. The status then changes to paid if the transaction goes through, or to failed or canceled (within 5 business days). Some failed payouts may initially show as paid but then change to failed.
- * @property string $type Can be bank_account or card.
- */
-class Payout extends ApiResource
-{
- const OBJECT_NAME = 'payout';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const FAILURE_ACCOUNT_CLOSED = 'account_closed';
- const FAILURE_ACCOUNT_FROZEN = 'account_frozen';
- const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted';
- const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed';
- const FAILURE_COULD_NOT_PROCESS = 'could_not_process';
- const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
- const FAILURE_DECLINED = 'declined';
- const FAILURE_INCORRECT_ACCOUNT_HOLDER_ADDRESS = 'incorrect_account_holder_address';
- const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name';
- const FAILURE_INCORRECT_ACCOUNT_HOLDER_TAX_ID = 'incorrect_account_holder_tax_id';
- const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds';
- const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number';
- const FAILURE_INVALID_CURRENCY = 'invalid_currency';
- const FAILURE_NO_ACCOUNT = 'no_account';
- const FAILURE_UNSUPPORTED_CARD = 'unsupported_card';
-
- const METHOD_INSTANT = 'instant';
- const METHOD_STANDARD = 'standard';
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_FAILED = 'failed';
- const STATUS_IN_TRANSIT = 'in_transit';
- const STATUS_PAID = 'paid';
- const STATUS_PENDING = 'pending';
-
- const TYPE_BANK_ACCOUNT = 'bank_account';
- const TYPE_CARD = 'card';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Payout the canceled payout
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Payout the reversed payout
- */
- public function reverse($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/reverse';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Plan.php b/plugins/stripe-php-10.5.0/lib/Plan.php
deleted file mode 100644
index c3621fa6..00000000
--- a/plugins/stripe-php-10.5.0/lib/Plan.php
+++ /dev/null
@@ -1,57 +0,0 @@
-Prices API. It replaces the Plans
- * API and is backwards compatible to simplify your migration.
- *
- * Plans define the base price, currency, and billing cycle for recurring purchases
- * of products. Products help
- * you track inventory or provisioning, and plans help you track pricing. Different
- * physical goods or levels of service should be represented by products, and
- * pricing options should be represented by plans. This approach lets you change
- * prices without having to change your provisioning scheme.
- *
- * For example, you might have a single "gold" product that has plans for
- * $10/month, $100/year, €9/month, and €90/year.
- *
- * Related guides: Set up
- * a subscription and more about products and prices.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Whether the plan can be used for new purchases.
- * @property null|string $aggregate_usage Specifies a usage aggregation strategy for plans of usage_type=metered. Allowed values are sum for summing up all usage during a period, last_during_period for using the last usage record reported within a period, last_ever for using the last usage record ever (across period bounds) or max which uses the usage record with the maximum reported usage during a period. Defaults to sum.
- * @property null|int $amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
- * @property null|string $amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.
- * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in amount) will be charged per unit in quantity (for plans with usage_type=licensed), or per unit of total usage (for plans with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string $interval The frequency at which a subscription is billed. One of day, week, month or year.
- * @property int $interval_count The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.
- * @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|string $nickname A brief description of the plan, hidden from customers.
- * @property null|string|\Stripe\Product $product The product whose pricing this plan determines.
- * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.
- * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.
- * @property null|\Stripe\StripeObject $transform_usage Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers.
- * @property null|int $trial_period_days Default number of trial days when subscribing a customer to this plan using trial_from_plan=true.
- * @property string $usage_type Configures how the quantity per period should be determined. Can be either metered or licensed. licensed automatically bills the quantity set when adding it to a subscription. metered aggregates the total usage based on usage records. Defaults to licensed.
- */
-class Plan extends ApiResource
-{
- const OBJECT_NAME = 'plan';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Price.php b/plugins/stripe-php-10.5.0/lib/Price.php
deleted file mode 100644
index defb37d5..00000000
--- a/plugins/stripe-php-10.5.0/lib/Price.php
+++ /dev/null
@@ -1,85 +0,0 @@
-Products help you track
- * inventory or provisioning, and prices help you track payment terms. Different
- * physical goods or levels of service should be represented by products, and
- * pricing options should be represented by prices. This approach lets you change
- * prices without having to change your provisioning scheme.
- *
- * For example, you might have a single "gold" product that has prices
- * for $10/month, $100/year, and €9 once.
- *
- * Related guides: Set up
- * a subscription, create an invoice,
- * and more about products and prices.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Whether the price can be used for new purchases.
- * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property \Stripe\StripeObject $currency_options Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
- * @property null|\Stripe\StripeObject $custom_unit_amount When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
- * @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 $nickname A brief description of the price, hidden from customers.
- * @property string|\Stripe\Product $product The ID of the product this price is associated with.
- * @property null|\Stripe\StripeObject $recurring The recurring components of a price such as interval and usage_type.
- * @property null|string $tax_behavior Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.
- * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.
- * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.
- * @property null|\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers.
- * @property string $type One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
- * @property null|int $unit_amount The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
- * @property null|string $unit_amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.
- */
-class Price extends ApiResource
-{
- const OBJECT_NAME = 'price';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
- use ApiOperations\Update;
-
- const BILLING_SCHEME_PER_UNIT = 'per_unit';
- const BILLING_SCHEME_TIERED = 'tiered';
-
- const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
- const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
- const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified';
-
- const TIERS_MODE_GRADUATED = 'graduated';
- const TIERS_MODE_VOLUME = 'volume';
-
- const TYPE_ONE_TIME = 'one_time';
- const TYPE_RECURRING = 'recurring';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResult["color", "size"]).
- * @property null|string $caption A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of type=good.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string[] $deactivate_on An array of connect application identifiers that cannot purchase this product. Only applicable to products of type=good.
- * @property null|string|\Stripe\Price $default_price The ID of the Price object that is the default price for this product.
- * @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
- * @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $name The product's name, meant to be displayable to the customer.
- * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes.
- * @property null|bool $shippable Whether this product is shipped (i.e., physical goods).
- * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used.
- * @property null|string|\Stripe\TaxCode $tax_code A tax code ID.
- * @property string $type The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans.
- * @property null|string $unit_label A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
- * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
- * @property null|string $url A URL of a publicly-accessible webpage for this product.
- */
-class Product extends ApiResource
-{
- const OBJECT_NAME = 'product';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
- use ApiOperations\Update;
-
- const TYPE_GOOD = 'good';
- const TYPE_SERVICE = 'service';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\SearchResulttrue if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|int $max_redemptions Maximum number of times this promotion code can be redeemed.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $restrictions
- * @property int $times_redeemed Number of times this promotion code has been used.
- */
-class PromotionCode extends ApiResource
-{
- const OBJECT_NAME = 'promotion_code';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Radar/ValueList.php b/plugins/stripe-php-10.5.0/lib/Radar/ValueList.php
deleted file mode 100644
index 8cd62236..00000000
--- a/plugins/stripe-php-10.5.0/lib/Radar/ValueList.php
+++ /dev/null
@@ -1,35 +0,0 @@
-Default Stripe
- * Lists.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $alias The name of the value list for use in rules.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $created_by The name or email address of the user who created this value list.
- * @property string $item_type The type of items in the value list. One of card_fingerprint, card_bin, email, ip_address, country, string, case_sensitive_string, or customer_id.
- * @property \Stripe\Collection<\Stripe\Radar\ValueListItem> $list_items List of items contained within this value list.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $name The name of the value list.
- */
-class ValueList extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'radar.value_list';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Radar/ValueListItem.php b/plugins/stripe-php-10.5.0/lib/Radar/ValueListItem.php
deleted file mode 100644
index c4ab2819..00000000
--- a/plugins/stripe-php-10.5.0/lib/Radar/ValueListItem.php
+++ /dev/null
@@ -1,31 +0,0 @@
-Managing List
- * Items.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $created_by The name or email address of the user who added this item to the value list.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $value The value of the item.
- * @property string $value_list The identifier of the value list this item belongs to.
- */
-class ValueListItem extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'radar.value_list_item';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Refund.php b/plugins/stripe-php-10.5.0/lib/Refund.php
deleted file mode 100644
index 0ddabfc4..00000000
--- a/plugins/stripe-php-10.5.0/lib/Refund.php
+++ /dev/null
@@ -1,74 +0,0 @@
-Refund objects allow you to refund a charge that has previously
- * been created but not yet refunded. Funds will be refunded to the credit or debit
- * card that was originally charged.
- *
- * Related guide: Refunds.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount, in %s.
- * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
- * @property null|string|\Stripe\Charge $charge ID of the charge that was refunded.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)
- * @property string|\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
- * @property string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are lost_or_stolen_card, expired_or_canceled_card, or unknown.
- * @property string $instructions_email Email to which refund instructions, if required, are sent to.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $next_action
- * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was refunded.
- * @property null|string $reason Reason for the refund, either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Stripe internally (expired_uncaptured_charge).
- * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund.
- * @property null|string|\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details.
- * @property null|string $status Status of the refund. For credit card refunds, this can be pending, succeeded, or failed. For other types of refunds, it can be pending, requires_action, succeeded, failed, or canceled. Refer to our refunds documentation for more details.
- * @property null|string|\Stripe\TransferReversal $transfer_reversal If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter.
- */
-class Refund extends ApiResource
-{
- const OBJECT_NAME = 'refund';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const FAILURE_REASON_EXPIRED_OR_CANCELED_CARD = 'expired_or_canceled_card';
- const FAILURE_REASON_LOST_OR_STOLEN_CARD = 'lost_or_stolen_card';
- const FAILURE_REASON_UNKNOWN = 'unknown';
-
- const REASON_DUPLICATE = 'duplicate';
- const REASON_EXPIRED_UNCAPTURED_CHARGE = 'expired_uncaptured_charge';
- const REASON_FRAUDULENT = 'fraudulent';
- const REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer';
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_FAILED = 'failed';
- const STATUS_PENDING = 'pending';
- const STATUS_REQUIRES_ACTION = 'requires_action';
- const STATUS_SUCCEEDED = 'succeeded';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Refund the canceled refund
- */
- public function cancel($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Reporting/ReportRun.php b/plugins/stripe-php-10.5.0/lib/Reporting/ReportRun.php
deleted file mode 100644
index 7c3d2a99..00000000
--- a/plugins/stripe-php-10.5.0/lib/Reporting/ReportRun.php
+++ /dev/null
@@ -1,37 +0,0 @@
-API Access to
- * Reports.
- *
- * Note that certain report types can only be run based on your live-mode data (not
- * test-mode data), and will error when queried without a live-mode API key.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $error If something should go wrong during the run, a message about the failure (populated when status=failed).
- * @property bool $livemode true if the report is run on live mode data and false if it is run on test mode data.
- * @property \Stripe\StripeObject $parameters
- * @property string $report_type The ID of the report type to run, such as "balance.summary.1".
- * @property null|\Stripe\File $result The file object representing the result of the report run (populated when status=succeeded).
- * @property string $status Status of this report run. This will be pending when the run is initially created. When the run finishes, this will be set to succeeded and the result field will be populated. Rarely, we may encounter an error, at which point this will be set to failed and the error field will be populated.
- * @property null|int $succeeded_at Timestamp at which this run successfully finished (populated when status=succeeded). Measured in seconds since the Unix epoch.
- */
-class ReportRun extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'reporting.report_run';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Reporting/ReportType.php b/plugins/stripe-php-10.5.0/lib/Reporting/ReportType.php
deleted file mode 100644
index 4725656e..00000000
--- a/plugins/stripe-php-10.5.0/lib/Reporting/ReportType.php
+++ /dev/null
@@ -1,35 +0,0 @@
-API Access to Reports
- * documentation for those Report Type IDs, along with required and optional
- * parameters.
- *
- * Note that certain report types can only be run based on your live-mode data (not
- * test-mode data), and will error when queried without a live-mode API key.
- *
- * @property string $id The ID of the Report Type, such as balance.summary.1.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $data_available_end Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.
- * @property int $data_available_start Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.
- * @property null|string[] $default_columns List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the columns parameter, this will be null.)
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $name Human-readable name of the Report Type
- * @property int $updated When this Report Type was latest updated. Measured in seconds since the Unix epoch.
- * @property int $version Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.
- */
-class ReportType extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'reporting.report_type';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/AbstractServiceFactory.php b/plugins/stripe-php-10.5.0/lib/Service/AbstractServiceFactory.php
deleted file mode 100644
index 9c04244f..00000000
--- a/plugins/stripe-php-10.5.0/lib/Service/AbstractServiceFactory.php
+++ /dev/null
@@ -1,69 +0,0 @@
- */
- private $services;
-
- /**
- * @param \Stripe\StripeClientInterface $client
- */
- public function __construct($client)
- {
- $this->client = $client;
- $this->services = [];
- }
-
- /**
- * @param string $name
- *
- * @return null|string
- */
- abstract protected function getServiceClass($name);
-
- /**
- * @param string $name
- *
- * @return null|AbstractService|AbstractServiceFactory
- */
- public function __get($name)
- {
- return $this->getService($name);
- }
-
- /**
- * @param string $name
- *
- * @return null|AbstractService|AbstractServiceFactory
- */
- public function getService($name)
- {
- $serviceClass = $this->getServiceClass($name);
- if (null !== $serviceClass) {
- if (!\array_key_exists($name, $this->services)) {
- $this->services[$name] = new $serviceClass($this->client);
- }
-
- return $this->services[$name];
- }
-
- \trigger_error('Undefined property: ' . static::class . '::$' . $name);
-
- return null;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/SetupIntent.php b/plugins/stripe-php-10.5.0/lib/SetupIntent.php
deleted file mode 100644
index ae6111cb..00000000
--- a/plugins/stripe-php-10.5.0/lib/SetupIntent.php
+++ /dev/null
@@ -1,133 +0,0 @@
-PaymentIntents to drive
- * the payment flow.
- *
- * Create a SetupIntent as soon as you're ready to collect your customer's payment
- * credentials. Do not maintain long-lived, unconfirmed SetupIntents as they may no
- * longer be valid. The SetupIntent then transitions through multiple statuses as
- * it guides you through the setup process.
- *
- * Successful SetupIntents result in payment credentials that are optimized for
- * future payments. For example, cardholders in certain regions may need to be
- * run through Strong Customer
- * Authentication at the time of payment method collection in order to
- * streamline later off-session payments.
- * If the SetupIntent is used with a Customer,
- * upon success, it will automatically attach the resulting payment method to that
- * Customer. We recommend using SetupIntents or setup_future_usage
- * on PaymentIntents to save payment methods in order to prevent saving invalid or
- * unoptimized payment methods.
- *
- * By using SetupIntents, you ensure that your customers experience the minimum set
- * of required friction, even as regulations change over time.
- *
- * Related guide: Setup
- * Intents API.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the SetupIntent.
- * @property bool $attach_to_self If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
- * @property null|string $cancellation_reason Reason for cancellation of this SetupIntent, one ofabandoned, requested_by_customer, or duplicate.
- * @property null|string $client_secret The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property null|string|\Stripe\Customer $customerID of the Customer this SetupIntent belongs to, if one exists.
If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. - * @property null|string[] $flow_directionsIndicates the directions of money movement for which this payment method is intended to be used.
Include inbound if you intend to use the payment method as the origin to pull funds from. Include outbound if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string|\Stripe\Mandate $mandate ID of the multi use Mandate generated by the SetupIntent.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
- * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the setup is intended.
- * @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupIntent.
- * @property null|\Stripe\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.
- * @property null|string|\Stripe\Mandate $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.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|\Stripe\StripeObject $delivery_estimate The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
- * @property null|string $display_name The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
- * @property \Stripe\StripeObject $fixed_amount
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string $tax_behavior Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified.
- * @property null|string|\Stripe\TaxCode $tax_code A tax code ID. The Shipping tax code is txcd_92010001.
- * @property string $type The type of calculation to use on the shipping rate. Can only be fixed_amount for now.
- */
-class ShippingRate extends ApiResource
-{
- const OBJECT_NAME = 'shipping_rate';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
- const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
- const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified';
-
- const TYPE_FIXED_AMOUNT = 'fixed_amount';
-}
diff --git a/plugins/stripe-php-10.5.0/lib/SourceTransaction.php b/plugins/stripe-php-10.5.0/lib/SourceTransaction.php
deleted file mode 100644
index 281f2a71..00000000
--- a/plugins/stripe-php-10.5.0/lib/SourceTransaction.php
+++ /dev/null
@@ -1,20 +0,0 @@
-Creating
- * Subscriptions.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the subscription.
- * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
- * @property \Stripe\StripeObject $automatic_tax
- * @property int $billing_cycle_anchor Determines the date of the first full invoice, and, for plans with month or year intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
- * @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
- * @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled
- * @property bool $cancel_at_period_end If the subscription has been canceled with the at_period_end flag set to true, cancel_at_period_end on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period.
- * @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with cancel_at_period_end, canceled_at will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
- * @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property int $current_period_end End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
- * @property int $current_period_start Start of the current period that the subscription has been invoiced for.
- * @property string|\Stripe\Customer $customer ID of the customer who owns the subscription.
- * @property null|int $days_until_due Number of days a customer has to pay invoices generated by this subscription. This value will be null for subscriptions where collection_method=charge_automatically.
- * @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.
- * @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If default_payment_method is also set, default_payment_method will take precedence. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.
- * @property null|\Stripe\TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have tax_rates set. Invoices created will have their default_tax_rates populated from the subscription.
- * @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.
- * @property null|\Stripe\Discount $discount Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis.
- * @property null|int $ended_at If the subscription has ended, the date the subscription ended.
- * @property \Stripe\Collection<\Stripe\SubscriptionItem> $items List of subscription items, each with an attached price.
- * @property null|string|\Stripe\Invoice $latest_invoice The most recent invoice this subscription has generated.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at pending_invoice_item_interval.
- * @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.
- * @property null|\Stripe\StripeObject $pause_collection If specified, payment collection for this subscription will be paused.
- * @property null|\Stripe\StripeObject $payment_settings Payment settings passed on to invoices created by the subscription.
- * @property null|\Stripe\StripeObject $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval.
- * @property null|string|\Stripe\SetupIntent $pending_setup_intent You can use this SetupIntent to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the SCA Migration Guide.
- * @property null|\Stripe\StripeObject $pending_update If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid.
- * @property null|string|\Stripe\SubscriptionSchedule $schedule The schedule attached to the subscription
- * @property int $start_date Date when the subscription was first created. The date might differ from the created date due to backdating.
- * @property string $status Possible values are incomplete, incomplete_expired, trialing, active, past_due, canceled, or unpaid.
For collection_method=charge_automatically a subscription moves into incomplete if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active state. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal state, the open invoice will be voided and no further invoices will be generated.
A subscription that is currently in a trial period is trialing and moves to active when the trial period is over.
If subscription collection_method=charge_automatically it becomes past_due when payment to renew it fails and canceled or unpaid (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts.
If subscription collection_method=send_invoice it becomes past_due when its invoice is not paid by the due date, and canceled or unpaid if it is still not paid by an additional deadline after that. Note that when a subscription has a status of unpaid, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $type Type of the tax ID, one of ae_trn, au_abn, au_arn, bg_uic, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, eg_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, hk_br, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, ph_tin, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, th_vat, tr_tin, tw_vat, ua_vat, us_ein, or za_vat. Note that some legacy tax IDs have type unknown
- * @property string $value Value of the tax ID.
- * @property null|\Stripe\StripeObject $verification Tax ID verification information.
- */
-class TaxId extends ApiResource
-{
- const OBJECT_NAME = 'tax_id';
-
- use ApiOperations\Delete;
-
- const TYPE_AE_TRN = 'ae_trn';
- const TYPE_AU_ABN = 'au_abn';
- const TYPE_AU_ARN = 'au_arn';
- const TYPE_BG_UIC = 'bg_uic';
- const TYPE_BR_CNPJ = 'br_cnpj';
- const TYPE_BR_CPF = 'br_cpf';
- const TYPE_CA_BN = 'ca_bn';
- const TYPE_CA_GST_HST = 'ca_gst_hst';
- const TYPE_CA_PST_BC = 'ca_pst_bc';
- const TYPE_CA_PST_MB = 'ca_pst_mb';
- const TYPE_CA_PST_SK = 'ca_pst_sk';
- const TYPE_CA_QST = 'ca_qst';
- const TYPE_CH_VAT = 'ch_vat';
- const TYPE_CL_TIN = 'cl_tin';
- const TYPE_EG_TIN = 'eg_tin';
- const TYPE_ES_CIF = 'es_cif';
- const TYPE_EU_OSS_VAT = 'eu_oss_vat';
- const TYPE_EU_VAT = 'eu_vat';
- const TYPE_GB_VAT = 'gb_vat';
- const TYPE_GE_VAT = 'ge_vat';
- const TYPE_HK_BR = 'hk_br';
- const TYPE_HU_TIN = 'hu_tin';
- const TYPE_ID_NPWP = 'id_npwp';
- const TYPE_IL_VAT = 'il_vat';
- const TYPE_IN_GST = 'in_gst';
- const TYPE_IS_VAT = 'is_vat';
- const TYPE_JP_CN = 'jp_cn';
- const TYPE_JP_RN = 'jp_rn';
- const TYPE_JP_TRN = 'jp_trn';
- const TYPE_KE_PIN = 'ke_pin';
- const TYPE_KR_BRN = 'kr_brn';
- const TYPE_LI_UID = 'li_uid';
- const TYPE_MX_RFC = 'mx_rfc';
- const TYPE_MY_FRP = 'my_frp';
- const TYPE_MY_ITN = 'my_itn';
- const TYPE_MY_SST = 'my_sst';
- const TYPE_NO_VAT = 'no_vat';
- const TYPE_NZ_GST = 'nz_gst';
- const TYPE_PH_TIN = 'ph_tin';
- const TYPE_RU_INN = 'ru_inn';
- const TYPE_RU_KPP = 'ru_kpp';
- const TYPE_SA_VAT = 'sa_vat';
- const TYPE_SG_GST = 'sg_gst';
- const TYPE_SG_UEN = 'sg_uen';
- const TYPE_SI_TIN = 'si_tin';
- const TYPE_TH_VAT = 'th_vat';
- const TYPE_TR_TIN = 'tr_tin';
- const TYPE_TW_VAT = 'tw_vat';
- const TYPE_UA_VAT = 'ua_vat';
- const TYPE_UNKNOWN = 'unknown';
- const TYPE_US_EIN = 'us_ein';
- const TYPE_ZA_VAT = 'za_vat';
-
- const VERIFICATION_STATUS_PENDING = 'pending';
- const VERIFICATION_STATUS_UNAVAILABLE = 'unavailable';
- const VERIFICATION_STATUS_UNVERIFIED = 'unverified';
- const VERIFICATION_STATUS_VERIFIED = 'verified';
-
- /**
- * @return string the API URL for this tax id
- */
- public function instanceUrl()
- {
- $id = $this['id'];
- $customer = $this['customer'];
- if (!$id) {
- throw new Exception\UnexpectedValueException(
- "Could not determine which URL to request: class instance has invalid ID: {$id}"
- );
- }
- $id = Util\Util::utf8($id);
- $customer = Util\Util::utf8($customer);
-
- $base = Customer::classUrl();
- $customerExtn = \urlencode($customer);
- $extn = \urlencode($id);
-
- return "{$base}/{$customerExtn}/tax_ids/{$extn}";
- }
-
- /**
- * @param array|string $_id
- * @param null|array|string $_opts
- *
- * @throws \Stripe\Exception\BadMethodCallException
- */
- public static function retrieve($_id, $_opts = null)
- {
- $msg = 'Tax IDs cannot be retrieved without a customer ID. Retrieve ' .
- "a tax ID using `Customer::retrieveTaxId('customer_id', " .
- "'tax_id_id')`.";
-
- throw new Exception\BadMethodCallException($msg);
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/TaxRate.php b/plugins/stripe-php-10.5.0/lib/TaxRate.php
deleted file mode 100644
index 5a456378..00000000
--- a/plugins/stripe-php-10.5.0/lib/TaxRate.php
+++ /dev/null
@@ -1,50 +0,0 @@
-invoices, subscriptions and
- * Checkout
- * Sessions to collect tax.
- *
- * Related guide: Tax
- * Rates.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property bool $active Defaults to true. When set to false, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
- * @property null|string $country Two-letter country code (ISO 3166-1 alpha-2).
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
- * @property string $display_name The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
- * @property bool $inclusive This specifies if the tax rate is inclusive or exclusive.
- * @property null|string $jurisdiction The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
- * @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 float $percentage This represents the tax rate percent out of 100.
- * @property null|string $state ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States.
- * @property null|string $tax_type The high-level tax type, such as vat or sales_tax.
- */
-class TaxRate extends ApiResource
-{
- const OBJECT_NAME = 'tax_rate';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const TAX_TYPE_GST = 'gst';
- const TAX_TYPE_HST = 'hst';
- const TAX_TYPE_JCT = 'jct';
- const TAX_TYPE_PST = 'pst';
- const TAX_TYPE_QST = 'qst';
- const TAX_TYPE_RST = 'rst';
- const TAX_TYPE_SALES_TAX = 'sales_tax';
- const TAX_TYPE_VAT = 'vat';
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Terminal/Configuration.php b/plugins/stripe-php-10.5.0/lib/Terminal/Configuration.php
deleted file mode 100644
index f34831f7..00000000
--- a/plugins/stripe-php-10.5.0/lib/Terminal/Configuration.php
+++ /dev/null
@@ -1,28 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $tipping
- * @property \Stripe\StripeObject $verifone_p400
- */
-class Configuration extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'terminal.configuration';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Terminal/ConnectionToken.php b/plugins/stripe-php-10.5.0/lib/Terminal/ConnectionToken.php
deleted file mode 100644
index e49a0b0e..00000000
--- a/plugins/stripe-php-10.5.0/lib/Terminal/ConnectionToken.php
+++ /dev/null
@@ -1,22 +0,0 @@
-Fleet
- * Management.
- *
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $location The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens.
- * @property string $secret Your application should pass this token to the Stripe Terminal SDK.
- */
-class ConnectionToken extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'terminal.connection_token';
-
- use \Stripe\ApiOperations\Create;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Terminal/Location.php b/plugins/stripe-php-10.5.0/lib/Terminal/Location.php
deleted file mode 100644
index 11c625d8..00000000
--- a/plugins/stripe-php-10.5.0/lib/Terminal/Location.php
+++ /dev/null
@@ -1,30 +0,0 @@
-Fleet
- * Management.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $address
- * @property string $configuration_overrides The ID of a configuration that will be used to customize all readers in this location.
- * @property string $display_name The display name of the location.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- */
-class Location extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'terminal.location';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Terminal/Reader.php b/plugins/stripe-php-10.5.0/lib/Terminal/Reader.php
deleted file mode 100644
index 16d610a0..00000000
--- a/plugins/stripe-php-10.5.0/lib/Terminal/Reader.php
+++ /dev/null
@@ -1,104 +0,0 @@
-Connecting to a
- * Reader.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|\Stripe\StripeObject $action The most recent action performed by the reader.
- * @property null|string $device_sw_version The current software version of the reader.
- * @property string $device_type Type of reader, one of bbpos_wisepad3, stripe_m2, bbpos_chipper2x, bbpos_wisepos_e, verifone_P400, or simulated_wisepos_e.
- * @property null|string $ip_address The local IP address of the reader.
- * @property string $label Custom label given to the reader for easier identification.
- * @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|\Stripe\Terminal\Location $location The location identifier of the reader.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $serial_number Serial number of the reader.
- * @property null|string $status The networking status of the reader.
- */
-class Reader extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'terminal.reader';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader the canceled reader
- */
- public function cancelAction($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/cancel_action';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader the processed reader
- */
- public function processPaymentIntent($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/process_payment_intent';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader the processed reader
- */
- public function processSetupIntent($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/process_setup_intent';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Terminal\Reader the seted reader
- */
- public function setReaderDisplay($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/set_reader_display';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/TestHelpers/TestClock.php b/plugins/stripe-php-10.5.0/lib/TestHelpers/TestClock.php
deleted file mode 100644
index 01d36ea0..00000000
--- a/plugins/stripe-php-10.5.0/lib/TestHelpers/TestClock.php
+++ /dev/null
@@ -1,53 +0,0 @@
-true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|string $name The custom name supplied at creation.
- * @property string $status The status of the Test Clock.
- */
-class TestClock extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'test_helpers.test_clock';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Delete;
- use \Stripe\ApiOperations\Retrieve;
-
- const STATUS_ADVANCING = 'advancing';
- const STATUS_INTERNAL_FAILURE = 'internal_failure';
- const STATUS_READY = 'ready';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TestHelpers\TestClock the advanced test clock
- */
- public function advance($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/advance';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Token.php b/plugins/stripe-php-10.5.0/lib/Token.php
deleted file mode 100644
index 18b33e86..00000000
--- a/plugins/stripe-php-10.5.0/lib/Token.php
+++ /dev/null
@@ -1,57 +0,0 @@
-recommended payments integrations to
- * perform this process client-side. This ensures that no sensitive card data
- * touches your server, and allows your integration to operate in a PCI-compliant
- * way.
- *
- * If you cannot use client-side tokenization, you can also create tokens using the
- * API with either your publishable or secret API key. Keep in mind that if your
- * integration uses this method, you are responsible for any PCI compliance that
- * may be required, and you must keep your secret API key safe. Unlike with
- * client-side tokenization, your customer's information is not sent directly to
- * Stripe, so we cannot determine how it is handled or stored.
- *
- * Tokens cannot be stored or used more than once. To store card or bank account
- * information for later use, you can create Customer objects or Custom accounts. Note
- * that Radar, our integrated solution
- * for automatic fraud protection, performs best with integrations that use
- * client-side tokenization.
- *
- * Related guide: Accept
- * a payment
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\BankAccount $bank_account These bank accounts are payment methods on Customer objects.
On the other hand External Accounts are transfer destinations on Account objects for Custom accounts. They can be bank accounts or debit cards as well, and are documented in the links above.
Related guide: Bank Debits and Transfers.
- * @property \Stripe\Card $cardYou can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.
Related guide: Card Payments with Sources.
- * @property null|string $client_ip IP address of the client that generated the token. - * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property bool $livemode Has the valuetrue if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $type Type of the token: account, bank_account, card, or pii.
- * @property bool $used Whether this token has already been used (tokens can be used only once).
- */
-class Token extends ApiResource
-{
- const OBJECT_NAME = 'token';
-
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
-
- const TYPE_ACCOUNT = 'account';
- const TYPE_BANK_ACCOUNT = 'bank_account';
- const TYPE_CARD = 'card';
- const TYPE_PII = 'pii';
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Transfer.php b/plugins/stripe-php-10.5.0/lib/Transfer.php
deleted file mode 100644
index f93e3bda..00000000
--- a/plugins/stripe-php-10.5.0/lib/Transfer.php
+++ /dev/null
@@ -1,112 +0,0 @@
-Transfer object is created when you move funds between Stripe
- * accounts as part of Connect.
- *
- * Before April 6, 2017, transfers also represented movement of funds from a Stripe
- * account to a card or bank account. This behavior has since been split out into a
- * Payout object, with
- * corresponding payout endpoints. For more information, read about the transfer/payout split.
- *
- * Related guide: Creating Separate
- * Charges and Transfers.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount in %s to be transferred.
- * @property int $amount_reversed Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).
- * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this transfer on your account balance.
- * @property int $created Time that this record of the transfer was first created.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|string|\Stripe\Account $destination ID of the Stripe account the transfer was sent to.
- * @property string|\Stripe\Charge $destination_payment If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\Collection<\Stripe\TransferReversal> $reversals A list of reversals that have been applied to the transfer.
- * @property bool $reversed Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
- * @property null|string|\Stripe\Charge $source_transaction ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.
- * @property string $source_type The source balance this transfer came from. One of card, fpx, or bank_account.
- * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details.
- */
-class Transfer extends ApiResource
-{
- const OBJECT_NAME = 'transfer';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-
- const SOURCE_TYPE_BANK_ACCOUNT = 'bank_account';
- const SOURCE_TYPE_CARD = 'card';
- const SOURCE_TYPE_FPX = 'fpx';
-
- const PATH_REVERSALS = '/reversals';
-
- /**
- * @param string $id the ID of the transfer on which to retrieve the transfer reversals
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Collection<\Stripe\TransferReversal> the list of transfer reversals
- */
- public static function allReversals($id, $params = null, $opts = null)
- {
- return self::_allNestedResources($id, static::PATH_REVERSALS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the transfer on which to create the transfer reversal
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TransferReversal
- */
- public static function createReversal($id, $params = null, $opts = null)
- {
- return self::_createNestedResource($id, static::PATH_REVERSALS, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the transfer to which the transfer reversal belongs
- * @param string $reversalId the ID of the transfer reversal to retrieve
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TransferReversal
- */
- public static function retrieveReversal($id, $reversalId, $params = null, $opts = null)
- {
- return self::_retrieveNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts);
- }
-
- /**
- * @param string $id the ID of the transfer to which the transfer reversal belongs
- * @param string $reversalId the ID of the transfer reversal to update
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\TransferReversal
- */
- public static function updateReversal($id, $reversalId, $params = null, $opts = null)
- {
- return self::_updateNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts);
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/CreditReversal.php b/plugins/stripe-php-10.5.0/lib/Treasury/CreditReversal.php
deleted file mode 100644
index e142d811..00000000
--- a/plugins/stripe-php-10.5.0/lib/Treasury/CreditReversal.php
+++ /dev/null
@@ -1,42 +0,0 @@
-ReceivedCredits
- * depending on their network and source flow. Reversing a ReceivedCredit leads to
- * the creation of a new object known as a CreditReversal.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount (in cents) transferred.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string $financial_account The FinancialAccount to reverse funds from.
- * @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $network The rails used to reverse the funds.
- * @property string $received_credit The ReceivedCredit being reversed.
- * @property string $status Status of the CreditReversal
- * @property \Stripe\StripeObject $status_transitions
- * @property null|string|\Stripe\Treasury\Transaction $transaction The Transaction associated with this object.
- */
-class CreditReversal extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'treasury.credit_reversal';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
-
- const NETWORK_ACH = 'ach';
- const NETWORK_STRIPE = 'stripe';
-
- const STATUS_CANCELED = 'canceled';
- const STATUS_POSTED = 'posted';
- const STATUS_PROCESSING = 'processing';
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/FinancialAccount.php b/plugins/stripe-php-10.5.0/lib/Treasury/FinancialAccount.php
deleted file mode 100644
index a5c63c88..00000000
--- a/plugins/stripe-php-10.5.0/lib/Treasury/FinancialAccount.php
+++ /dev/null
@@ -1,75 +0,0 @@
-ISO 3166-1 alpha-2).
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\Treasury\FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a status enum and associated status_details. Stripe or the platform can control Features via the requested field.
- * @property \Stripe\StripeObject[] $financial_addresses The set of credentials that resolve to a FinancialAccount.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string[] $pending_features The array of paths to pending Features in the Features hash.
- * @property null|\Stripe\StripeObject $platform_restrictions The set of functionalities that the platform can restrict on the FinancialAccount.
- * @property string[] $restricted_features The array of paths to restricted Features in the Features hash.
- * @property string $status The enum specifying what state the account is in.
- * @property \Stripe\StripeObject $status_details
- * @property string[] $supported_currencies The currencies the FinancialAccount can hold a balance in. Three-letter ISO currency code, in lowercase.
- */
-class FinancialAccount extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'treasury.financial_account';
-
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
- use \Stripe\ApiOperations\Update;
-
- const STATUS_CLOSED = 'closed';
- const STATUS_OPEN = 'open';
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Treasury\FinancialAccount the retrieved financial account
- */
- public function retrieveFeatures($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/features';
- list($response, $opts) = $this->_request('get', $url, $params, $opts);
- $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts);
- $obj->setLastResponse($response);
-
- return $obj;
- }
-
- /**
- * @param null|array $params
- * @param null|array|string $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- *
- * @return \Stripe\Treasury\FinancialAccount the updated financial account
- */
- public function updateFeatures($params = null, $opts = null)
- {
- $url = $this->instanceUrl() . '/features';
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
- $this->refreshFrom($response, $opts);
-
- return $this;
- }
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/FinancialAccountFeatures.php b/plugins/stripe-php-10.5.0/lib/Treasury/FinancialAccountFeatures.php
deleted file mode 100644
index ef343a7c..00000000
--- a/plugins/stripe-php-10.5.0/lib/Treasury/FinancialAccountFeatures.php
+++ /dev/null
@@ -1,24 +0,0 @@
-status enum and associated status_details. Stripe or
- * the platform can control Features via the requested field.
- *
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $card_issuing Toggle settings for enabling/disabling a feature
- * @property \Stripe\StripeObject $deposit_insurance Toggle settings for enabling/disabling a feature
- * @property \Stripe\StripeObject $financial_addresses Settings related to Financial Addresses features on a Financial Account
- * @property \Stripe\StripeObject $inbound_transfers InboundTransfers contains inbound transfers features for a FinancialAccount.
- * @property \Stripe\StripeObject $intra_stripe_flows Toggle settings for enabling/disabling a feature
- * @property \Stripe\StripeObject $outbound_payments Settings related to Outbound Payments features on a Financial Account
- * @property \Stripe\StripeObject $outbound_transfers OutboundTransfers contains outbound transfers features for a FinancialAccount.
- */
-class FinancialAccountFeatures extends \Stripe\ApiResource
-{
- const OBJECT_NAME = 'treasury.financial_account_features';
-}
diff --git a/plugins/stripe-php-10.5.0/lib/Util/ObjectTypes.php b/plugins/stripe-php-10.5.0/lib/Util/ObjectTypes.php
deleted file mode 100644
index 6fa98e40..00000000
--- a/plugins/stripe-php-10.5.0/lib/Util/ObjectTypes.php
+++ /dev/null
@@ -1,118 +0,0 @@
- \Stripe\Account::class,
- \Stripe\AccountLink::OBJECT_NAME => \Stripe\AccountLink::class,
- \Stripe\ApplePayDomain::OBJECT_NAME => \Stripe\ApplePayDomain::class,
- \Stripe\ApplicationFee::OBJECT_NAME => \Stripe\ApplicationFee::class,
- \Stripe\ApplicationFeeRefund::OBJECT_NAME => \Stripe\ApplicationFeeRefund::class,
- \Stripe\Apps\Secret::OBJECT_NAME => \Stripe\Apps\Secret::class,
- \Stripe\Balance::OBJECT_NAME => \Stripe\Balance::class,
- \Stripe\BalanceTransaction::OBJECT_NAME => \Stripe\BalanceTransaction::class,
- \Stripe\BankAccount::OBJECT_NAME => \Stripe\BankAccount::class,
- \Stripe\BillingPortal\Configuration::OBJECT_NAME => \Stripe\BillingPortal\Configuration::class,
- \Stripe\BillingPortal\Session::OBJECT_NAME => \Stripe\BillingPortal\Session::class,
- \Stripe\Capability::OBJECT_NAME => \Stripe\Capability::class,
- \Stripe\Card::OBJECT_NAME => \Stripe\Card::class,
- \Stripe\CashBalance::OBJECT_NAME => \Stripe\CashBalance::class,
- \Stripe\Charge::OBJECT_NAME => \Stripe\Charge::class,
- \Stripe\Checkout\Session::OBJECT_NAME => \Stripe\Checkout\Session::class,
- \Stripe\Collection::OBJECT_NAME => \Stripe\Collection::class,
- \Stripe\CountrySpec::OBJECT_NAME => \Stripe\CountrySpec::class,
- \Stripe\Coupon::OBJECT_NAME => \Stripe\Coupon::class,
- \Stripe\CreditNote::OBJECT_NAME => \Stripe\CreditNote::class,
- \Stripe\CreditNoteLineItem::OBJECT_NAME => \Stripe\CreditNoteLineItem::class,
- \Stripe\Customer::OBJECT_NAME => \Stripe\Customer::class,
- \Stripe\CustomerBalanceTransaction::OBJECT_NAME => \Stripe\CustomerBalanceTransaction::class,
- \Stripe\CustomerCashBalanceTransaction::OBJECT_NAME => \Stripe\CustomerCashBalanceTransaction::class,
- \Stripe\Discount::OBJECT_NAME => \Stripe\Discount::class,
- \Stripe\Dispute::OBJECT_NAME => \Stripe\Dispute::class,
- \Stripe\EphemeralKey::OBJECT_NAME => \Stripe\EphemeralKey::class,
- \Stripe\Event::OBJECT_NAME => \Stripe\Event::class,
- \Stripe\ExchangeRate::OBJECT_NAME => \Stripe\ExchangeRate::class,
- \Stripe\File::OBJECT_NAME => \Stripe\File::class,
- \Stripe\File::OBJECT_NAME_ALT => \Stripe\File::class,
- \Stripe\FileLink::OBJECT_NAME => \Stripe\FileLink::class,
- \Stripe\FinancialConnections\Account::OBJECT_NAME => \Stripe\FinancialConnections\Account::class,
- \Stripe\FinancialConnections\AccountOwner::OBJECT_NAME => \Stripe\FinancialConnections\AccountOwner::class,
- \Stripe\FinancialConnections\AccountOwnership::OBJECT_NAME => \Stripe\FinancialConnections\AccountOwnership::class,
- \Stripe\FinancialConnections\Session::OBJECT_NAME => \Stripe\FinancialConnections\Session::class,
- \Stripe\FundingInstructions::OBJECT_NAME => \Stripe\FundingInstructions::class,
- \Stripe\Identity\VerificationReport::OBJECT_NAME => \Stripe\Identity\VerificationReport::class,
- \Stripe\Identity\VerificationSession::OBJECT_NAME => \Stripe\Identity\VerificationSession::class,
- \Stripe\Invoice::OBJECT_NAME => \Stripe\Invoice::class,
- \Stripe\InvoiceItem::OBJECT_NAME => \Stripe\InvoiceItem::class,
- \Stripe\InvoiceLineItem::OBJECT_NAME => \Stripe\InvoiceLineItem::class,
- \Stripe\Issuing\Authorization::OBJECT_NAME => \Stripe\Issuing\Authorization::class,
- \Stripe\Issuing\Card::OBJECT_NAME => \Stripe\Issuing\Card::class,
- \Stripe\Issuing\CardDetails::OBJECT_NAME => \Stripe\Issuing\CardDetails::class,
- \Stripe\Issuing\Cardholder::OBJECT_NAME => \Stripe\Issuing\Cardholder::class,
- \Stripe\Issuing\Dispute::OBJECT_NAME => \Stripe\Issuing\Dispute::class,
- \Stripe\Issuing\Transaction::OBJECT_NAME => \Stripe\Issuing\Transaction::class,
- \Stripe\LineItem::OBJECT_NAME => \Stripe\LineItem::class,
- \Stripe\LoginLink::OBJECT_NAME => \Stripe\LoginLink::class,
- \Stripe\Mandate::OBJECT_NAME => \Stripe\Mandate::class,
- \Stripe\PaymentIntent::OBJECT_NAME => \Stripe\PaymentIntent::class,
- \Stripe\PaymentLink::OBJECT_NAME => \Stripe\PaymentLink::class,
- \Stripe\PaymentMethod::OBJECT_NAME => \Stripe\PaymentMethod::class,
- \Stripe\Payout::OBJECT_NAME => \Stripe\Payout::class,
- \Stripe\Person::OBJECT_NAME => \Stripe\Person::class,
- \Stripe\Plan::OBJECT_NAME => \Stripe\Plan::class,
- \Stripe\Price::OBJECT_NAME => \Stripe\Price::class,
- \Stripe\Product::OBJECT_NAME => \Stripe\Product::class,
- \Stripe\PromotionCode::OBJECT_NAME => \Stripe\PromotionCode::class,
- \Stripe\Quote::OBJECT_NAME => \Stripe\Quote::class,
- \Stripe\Radar\EarlyFraudWarning::OBJECT_NAME => \Stripe\Radar\EarlyFraudWarning::class,
- \Stripe\Radar\ValueList::OBJECT_NAME => \Stripe\Radar\ValueList::class,
- \Stripe\Radar\ValueListItem::OBJECT_NAME => \Stripe\Radar\ValueListItem::class,
- \Stripe\Refund::OBJECT_NAME => \Stripe\Refund::class,
- \Stripe\Reporting\ReportRun::OBJECT_NAME => \Stripe\Reporting\ReportRun::class,
- \Stripe\Reporting\ReportType::OBJECT_NAME => \Stripe\Reporting\ReportType::class,
- \Stripe\Review::OBJECT_NAME => \Stripe\Review::class,
- \Stripe\SearchResult::OBJECT_NAME => \Stripe\SearchResult::class,
- \Stripe\SetupAttempt::OBJECT_NAME => \Stripe\SetupAttempt::class,
- \Stripe\SetupIntent::OBJECT_NAME => \Stripe\SetupIntent::class,
- \Stripe\ShippingRate::OBJECT_NAME => \Stripe\ShippingRate::class,
- \Stripe\Sigma\ScheduledQueryRun::OBJECT_NAME => \Stripe\Sigma\ScheduledQueryRun::class,
- \Stripe\Source::OBJECT_NAME => \Stripe\Source::class,
- \Stripe\SourceTransaction::OBJECT_NAME => \Stripe\SourceTransaction::class,
- \Stripe\Subscription::OBJECT_NAME => \Stripe\Subscription::class,
- \Stripe\SubscriptionItem::OBJECT_NAME => \Stripe\SubscriptionItem::class,
- \Stripe\SubscriptionSchedule::OBJECT_NAME => \Stripe\SubscriptionSchedule::class,
- \Stripe\TaxCode::OBJECT_NAME => \Stripe\TaxCode::class,
- \Stripe\TaxId::OBJECT_NAME => \Stripe\TaxId::class,
- \Stripe\TaxRate::OBJECT_NAME => \Stripe\TaxRate::class,
- \Stripe\Terminal\Configuration::OBJECT_NAME => \Stripe\Terminal\Configuration::class,
- \Stripe\Terminal\ConnectionToken::OBJECT_NAME => \Stripe\Terminal\ConnectionToken::class,
- \Stripe\Terminal\Location::OBJECT_NAME => \Stripe\Terminal\Location::class,
- \Stripe\Terminal\Reader::OBJECT_NAME => \Stripe\Terminal\Reader::class,
- \Stripe\TestHelpers\TestClock::OBJECT_NAME => \Stripe\TestHelpers\TestClock::class,
- \Stripe\Token::OBJECT_NAME => \Stripe\Token::class,
- \Stripe\Topup::OBJECT_NAME => \Stripe\Topup::class,
- \Stripe\Transfer::OBJECT_NAME => \Stripe\Transfer::class,
- \Stripe\TransferReversal::OBJECT_NAME => \Stripe\TransferReversal::class,
- \Stripe\Treasury\CreditReversal::OBJECT_NAME => \Stripe\Treasury\CreditReversal::class,
- \Stripe\Treasury\DebitReversal::OBJECT_NAME => \Stripe\Treasury\DebitReversal::class,
- \Stripe\Treasury\FinancialAccount::OBJECT_NAME => \Stripe\Treasury\FinancialAccount::class,
- \Stripe\Treasury\FinancialAccountFeatures::OBJECT_NAME => \Stripe\Treasury\FinancialAccountFeatures::class,
- \Stripe\Treasury\InboundTransfer::OBJECT_NAME => \Stripe\Treasury\InboundTransfer::class,
- \Stripe\Treasury\OutboundPayment::OBJECT_NAME => \Stripe\Treasury\OutboundPayment::class,
- \Stripe\Treasury\OutboundTransfer::OBJECT_NAME => \Stripe\Treasury\OutboundTransfer::class,
- \Stripe\Treasury\ReceivedCredit::OBJECT_NAME => \Stripe\Treasury\ReceivedCredit::class,
- \Stripe\Treasury\ReceivedDebit::OBJECT_NAME => \Stripe\Treasury\ReceivedDebit::class,
- \Stripe\Treasury\Transaction::OBJECT_NAME => \Stripe\Treasury\Transaction::class,
- \Stripe\Treasury\TransactionEntry::OBJECT_NAME => \Stripe\Treasury\TransactionEntry::class,
- \Stripe\UsageRecord::OBJECT_NAME => \Stripe\UsageRecord::class,
- \Stripe\UsageRecordSummary::OBJECT_NAME => \Stripe\UsageRecordSummary::class,
- \Stripe\WebhookEndpoint::OBJECT_NAME => \Stripe\WebhookEndpoint::class,
- ];
-}
diff --git a/plugins/stripe-php-10.5.0/lib/WebhookEndpoint.php b/plugins/stripe-php-10.5.0/lib/WebhookEndpoint.php
deleted file mode 100644
index 96333d13..00000000
--- a/plugins/stripe-php-10.5.0/lib/WebhookEndpoint.php
+++ /dev/null
@@ -1,41 +0,0 @@
-webhook
- * endpoints via the API to be notified about events that happen in your Stripe
- * account or connected accounts.
- *
- * Most users configure webhooks from the dashboard, which provides a
- * user interface for registering and testing your webhook endpoints.
- *
- * Related guide: Setting up
- * Webhooks.
- *
- * @property string $id Unique identifier for the object.
- * @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string $api_version The API version events are rendered as for this webhook endpoint.
- * @property null|string $application The ID of the associated Connect application.
- * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string $description An optional description of what the webhook is used for.
- * @property string[] $enabled_events The list of events to enable for this endpoint. ['*'] indicates that all events are enabled, except those that require explicit selection.
- * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property string $secret The endpoint's secret, used to generate webhook signatures. Only returned at creation.
- * @property string $status The status of the webhook. It can be enabled or disabled.
- * @property string $url The URL of the webhook endpoint.
- */
-class WebhookEndpoint extends ApiResource
-{
- const OBJECT_NAME = 'webhook_endpoint';
-
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
- use ApiOperations\Retrieve;
- use ApiOperations\Update;
-}
diff --git a/plugins/stripe-php-10.5.0/update_certs.php b/plugins/stripe-php-10.5.0/update_certs.php
deleted file mode 100644
index cb72b618..00000000
--- a/plugins/stripe-php-10.5.0/update_certs.php
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env php
- $fp,
- \CURLOPT_TIMEOUT => 3600,
- \CURLOPT_URL => 'https://curl.se/ca/cacert.pem',
-];
-
-$ch = \curl_init();
-\curl_setopt_array($ch, $options);
-\curl_exec($ch);
-\curl_close($ch);
-\fclose($fp);
diff --git a/plugins/stripe-php/.gitignore b/plugins/stripe-php/.gitignore
new file mode 100644
index 00000000..880465ac
--- /dev/null
+++ b/plugins/stripe-php/.gitignore
@@ -0,0 +1,35 @@
+# Ignore build files
+build/*
+
+# Mac OS X dumps these all over the place.
+.DS_Store
+
+# Ignore the SimpleTest library if it is installed to /test/.
+/test/simpletest/
+
+# Ignore the /vendor/ directory for people using composer
+/vendor/
+
+# If the vendor directory isn't being commited the composer.lock file should also be ignored
+composer.lock
+
+# Ignore PHPUnit coverage file
+clover.xml
+
+# Ignore IDE's configuration files
+.idea
+
+# Ignore PHP CS Fixer local config and cache
+.php_cs
+.php_cs.cache
+.php-cs-fixer.cache
+
+# Ignore PHPStan local config
+.phpstan.neon
+
+# Ignore phpDocumentor's local config and artifacts
+.phpdoc/*
+phpdoc.xml
+
+# Ignore cached PHPUnit results.
+.phpunit.result.cache
diff --git a/plugins/stripe-php/CHANGELOG.md b/plugins/stripe-php/CHANGELOG.md
new file mode 100644
index 00000000..ace08d25
--- /dev/null
+++ b/plugins/stripe-php/CHANGELOG.md
@@ -0,0 +1,2587 @@
+# Changelog
+
+## 16.4.0 - 2024-12-18
+* [#1793](https://github.com/stripe/stripe-php/pull/1793) This release changes the pinned API version to `2024-12-18.acacia`.
+ * Add support for `network_advice_code` and `network_decline_code` on `StripeError`
+ * Add support for new values `payout_minimum_balance_hold` and `payout_minimum_balance_release` on enum `BalanceTransaction.type`
+ * Add support for `allow_redisplay` on `Card` and `Source`
+ * Add support for `regulated_status` on `Card`
+ * Add support for new value `request_signature` on enum `Forwarding.Request.replacements[]`
+ * Change type of `LineItem.description` from `string` to `nullable(string)`
+ * Add support for new values `al_tin`, `am_tin`, `ao_tin`, `ba_tin`, `bb_tin`, `bs_tin`, `cd_nif`, `gn_nif`, `kh_tin`, `me_pib`, `mk_vat`, `mr_nif`, `np_pan`, `sn_ninea`, `sr_fin`, `tj_tin`, `ug_tin`, `zm_tin`, and `zw_tin` on enum `TaxId.type`
+
+## 16.3.0 - 2024-11-20
+* [#1786](https://github.com/stripe/stripe-php/pull/1786) This release changes the pinned API version to `2024-11-20.acacia`.
+ * Add support for `respond` test helper method on resource `Issuing.Authorization`
+ * Add support for `adaptive_pricing` on `Checkout.Session`
+ * Add support for new value `subscribe` on enums `Checkout.Session.submit_type` and `PaymentLink.submit_type`
+ * Add support for new value `financial_account_statement` on enum `File.purpose`
+ * Add support for `fraud_challenges` and `verified_by_fraud_challenge` on `Issuing.Authorization`
+ * Add support for `trace_id` on `Payout`
+ * Add support for new value `li_vat` on enum `TaxId.type`
+ * Add support for new value `service_tax` on enum `TaxRate.tax_type`
+ * Change type of `Treasury.InboundTransfer.origin_payment_method` from `string` to `nullable(string)`
+
+## 16.2.0 - 2024-10-29
+* [#1772](https://github.com/stripe/stripe-php/pull/1772) This release changes the pinned API version to `2024-10-28.acacia`.
+ * Add support for new resource `V2.EventDestinations`
+ * Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations`
+ * Add support for `submit_card` test helper method on resource `Issuing.Card`
+ * Add support for `groups` on `Account`
+ * Add support for `enhanced_eligibility_types` on `Dispute`
+ * Add support for new values `issuing_transaction.purchase_details_receipt_updated` and `refund.failed` on enum `Event.type`
+ * Add support for `metadata` on `Forwarding.Request`
+ * Add support for new value `alma` on enum `PaymentLink.payment_method_types[]`
+ * Add support for `alma` on `PaymentMethodConfiguration` and `PaymentMethod`
+ * Add support for `kakao_pay`, `kr_card`, `naver_pay`, `payco`, and `samsung_pay` on `PaymentMethod`
+ * Add support for new values `alma`, `kakao_pay`, `kr_card`, `naver_pay`, `payco`, and `samsung_pay` on enum `PaymentMethod.type`
+ * Add support for `amazon_pay` on `PaymentMethodDomain`
+ * Add support for new values `by_tin`, `ma_vat`, `md_vat`, `tz_vat`, `uz_tin`, and `uz_vat` on enum `TaxId.type`
+ * Add support for `flat_amount` and `rate_type` on `TaxRate`
+ * Add support for new value `retail_delivery_fee` on enum `TaxRate.tax_type`
+
+## 16.1.1 - 2024-10-18
+* [#1775](https://github.com/stripe/stripe-php/pull/1775) Deserialize into correct v2 EventData types
+ * Fixes a bug where v2 EventData was not being deserialized into the appropriate type for `V1BillingMeterErrorReportTriggeredEvent` and `V1BillingMeterNoMeterFoundEvent`
+* [#1776](https://github.com/stripe/stripe-php/pull/1776) update object tags for meter-related classes
+
+ - fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server.
+* [#1773](https://github.com/stripe/stripe-php/pull/1773) Clean up examples
+* [#1771](https://github.com/stripe/stripe-php/pull/1771) Renamed example file names
+
+## 16.1.0 - 2024-10-03
+* [#1765](https://github.com/stripe/stripe-php/pull/1765) Update generated code
+ * Remove the support for resource `Margin` that was accidentally made public in the last release
+
+## 16.0.0 - 2024-10-01
+* [#1756](https://github.com/stripe/stripe-php/pull/1756) Support for APIs in the new API version 2024-09-30.acacia
+
+ This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-09-30.acacia) and carefully review the API changes before upgrading.
+
+ ### ⚠️ Breaking changes
+
+ * Rename `usage_threshold_config` to `usage_threshold` on `Billing.Alert`
+ * Remove support for `filter` on `Billing.Alert`. Use the filters on the `usage_threshold` instead
+
+
+ ### Additions
+
+ * Add support for new value `international_transaction` on enum `Treasury.ReceivedCredit.failure_code`
+ * Add support for new Usage Billing APIs `Billing.MeterEvent`, `Billing.MeterEventAdjustments`, `Billing.MeterEventSession`, `Billing.MeterEventStream` and the new Events API `Core.Events` under the [v2 namespace ](https://docs.corp.stripe.com/api-v2-overview)
+ * Add new method `parseThinEvent()` on the `StripeClient` class to parse [thin events](https://docs.corp.stripe.com/event-destinations#events-overview).
+ * Add a new method [rawRequest()](https://github.com/stripe/stripe-node/tree/master?tab=readme-ov-file#custom-requests) on the `StripeClient` class that takes a HTTP method type, url and relevant parameters to make requests to the Stripe API that are not yet supported in the SDK.
+
+
+## 15.10.0 - 2024-09-18
+* [#1747](https://github.com/stripe/stripe-php/pull/1747) Update generated code
+ * Add support for new value `international_transaction` on enum `Treasury.ReceivedDebit.failure_code`
+* [#1745](https://github.com/stripe/stripe-php/pull/1745) Update generated code
+ * Add support for new value `terminal_reader_invalid_location_for_activation` on enum `StripeError.code`
+ * Add support for `automatically_finalizes_at` on `Invoice`
+
+## 15.9.0 - 2024-09-12
+* [#1737](https://github.com/stripe/stripe-php/pull/1737) Update generated code
+ * Add support for new resource `InvoiceRenderingTemplate`
+ * Add support for `all`, `archive`, `retrieve`, and `unarchive` methods on resource `InvoiceRenderingTemplate`
+
+## 15.8.0 - 2024-08-29
+* [#1742](https://github.com/stripe/stripe-php/pull/1742) Generate SDK for OpenAPI spec version 1230
+ * Add support for new value `issuing_regulatory_reporting` on enum `File.purpose`
+ * Add support for new value `hr_oib` on enum `TaxId.type`
+ * Add support for `status_details` on `TestHelpers.TestClock`
+
+## 15.7.0 - 2024-08-15
+* [#1736](https://github.com/stripe/stripe-php/pull/1736) Update generated code
+
+
+## 15.6.0 - 2024-08-08
+* [#1729](https://github.com/stripe/stripe-php/pull/1729) Update generated code
+ * Add support for `activate`, `all`, `archive`, `create`, `deactivate`, and `retrieve` methods on resource `Billing.Alert`
+ * Add support for `retrieve` method on resource `Tax.Calculation`
+ * Add support for new value `invalid_mandate_reference_prefix_format` on enum `StripeError.code`
+ * Add support for `related_customer` on `Identity.VerificationSession`
+ * Add support for new value `financial_addresses.aba.forwarding` on enums `Treasury.FinancialAccount.active_features[]`, `Treasury.FinancialAccount.pending_features[]`, and `Treasury.FinancialAccount.restricted_features[]`
+
+## 15.5.0 - 2024-08-01
+* [#1727](https://github.com/stripe/stripe-php/pull/1727) Update generated code
+ * Add support for new resources `Billing.AlertTriggered` and `Billing.Alert`
+ * Add support for new value `charge_exceeds_transaction_limit` on enum `StripeError.code`
+ * Add support for new value `billing.alert.triggered` on enum `Event.type`
+
+## 15.4.0 - 2024-07-25
+* [#1726](https://github.com/stripe/stripe-php/pull/1726) Update generated code
+ * Add support for `update` method on resource `Checkout.Session`
+ * Add support for new values `invoice.overdue` and `invoice.will_be_due` on enum `Event.type`
+ * Add support for `twint` on `PaymentMethodConfiguration`
+
+## 15.3.0 - 2024-07-18
+* [#1724](https://github.com/stripe/stripe-php/pull/1724) Update generated code
+ * Add support for new value `issuing_dispute.funds_rescinded` on enum `Event.type`
+ * Add support for new value `stripe_s700` on enum `Terminal.Reader.device_type`
+* [#1722](https://github.com/stripe/stripe-php/pull/1722) Update changelog
+
+## 15.2.0 - 2024-07-11
+* [#1721](https://github.com/stripe/stripe-php/pull/1721) Update generated code
+ * ⚠️ Remove support for values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, and `billing_policy_remote_function_unreachable` from enum `StripeError.code`.
+ * ⚠️ Remove support for value `payment_intent_fx_quote_invalid` from enum `StripeError.code`. The was mistakenly released last week.
+ * Add support for `payment_method_options` on `ConfirmationToken`
+
+## 15.1.0 - 2024-07-05
+* [#1718](https://github.com/stripe/stripe-php/pull/1718) Update generated code
+ * Add support for `add_lines`, `remove_lines`, and `update_lines` methods on resource `Invoice`
+ * Add support for new value `payment_intent_fx_quote_invalid` on enum `StripeError.code`
+ * Add support for new values `multibanco`, `twint`, and `zip` on enum `PaymentLink.payment_method_types[]`
+ * Add support for `posted_at` on `Tax.Transaction`
+ * Add support for `reboot_window` on `Terminal.Configuration`
+
+## 15.0.0 - 2024-06-24
+* [#1714](https://github.com/stripe/stripe-php/pull/1714)
+
+ This release changes the pinned API version to 2024-06-20. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-06-20) and carefully review the API changes before upgrading.
+
+ ### ⚠️ Breaking changes
+
+ * Remove the unused resource `PlatformTaxFee`
+ * Remove the protected method `_searchResource` on resources Charge, Customer, Invoice, PaymentIntent, Price, Product, and Subscription as it is no longer used.
+
+ ### Additions
+
+ * Add support for `finalize_amount` test helper method on resource `Issuing.Authorization`
+ * Add support for `fleet` and `fuel` on `Issuing.Authorization`
+ * Add support for new value `ch_uid` on enum `TaxId.type`
+
+## 14.10.0 - 2024-06-13
+* [#1706](https://github.com/stripe/stripe-php/pull/1706) Update generated code
+ * Add support for `multibanco` on `PaymentMethodConfiguration` and `PaymentMethod`
+ * Add support for `twint` on `PaymentMethod`
+ * Add support for new values `multibanco` and `twint` on enum `PaymentMethod.type`
+ * Add support for `invoice_settings` on `Subscription`
+ * Add support for new value `de_stn` on enum `TaxId.type`
+
+## 14.9.0 - 2024-05-30
+* [#1702](https://github.com/stripe/stripe-php/pull/1702) Update generated code
+ * Add support for new values `issuing_personalization_design.activated`, `issuing_personalization_design.deactivated`, `issuing_personalization_design.rejected`, and `issuing_personalization_design.updated` on enum `Event.type`
+* [#1701](https://github.com/stripe/stripe-php/pull/1701) Added PHPDocs for `create`, `update`, `delete`, `all`, `retrieve` methods after moving them out of traits.
+* [#1700](https://github.com/stripe/stripe-php/pull/1700) Add optional appInfo to StripeClient config
+ * `StripeClient` can now accept `$appInfo` as a `$config` option, so AppInfo can be set per-client. If not passed in, will fall back on the global AppInfo set by `Stripe::setAppInfo()`.
+ * The config expects `$appInfo` to be of type `array{name: string, version?: string, url?: string, partner_id?: string}`
+
+## 14.8.0 - 2024-05-23
+* [#1698](https://github.com/stripe/stripe-php/pull/1698) Update generated code
+ * Add support for new value `terminal_reader_invalid_location_for_payment` on enum `StripeError.code`
+* [#1697](https://github.com/stripe/stripe-php/pull/1697) Rename section for object type generation
+
+## 14.7.0 - 2024-05-16
+* [#1694](https://github.com/stripe/stripe-php/pull/1694) Update generated code
+ * Add support for `fee_source` on `ApplicationFee`
+ * Add support for `loss_reason` on `Issuing.Dispute`
+ * Add support for `application_fee_amount` and `application_fee` on `Payout`
+ * Add support for `stripe_s700` on `Terminal.Configuration`
+
+## 14.6.0 - 2024-05-09
+* [#1692](https://github.com/stripe/stripe-php/pull/1692) Update generated code
+ * Add support for `update` test helper method on resources `Treasury.OutboundPayment` and `Treasury.OutboundTransfer`
+ * Add support for new values `treasury.outbound_payment.tracking_details_updated` and `treasury.outbound_transfer.tracking_details_updated` on enum `Event.type`
+ * Add support for `allow_redisplay` on `PaymentMethod`
+ * Add support for `tracking_details` on `Treasury.OutboundPayment` and `Treasury.OutboundTransfer`
+
+## 14.5.0 - 2024-05-02
+* [#1688](https://github.com/stripe/stripe-php/pull/1688) Update generated code
+ * Add support for new value `shipping_address_invalid` on enum `StripeError.code`
+ * Add support for `ship_from_details` on `Tax.Calculation` and `Tax.Transaction`
+
+## 14.4.0 - 2024-04-25
+* [#1684](https://github.com/stripe/stripe-php/pull/1684) Update generated code
+ * Change type of `Entitlements.ActiveEntitlement.feature` from `string` to `expandable($Entitlements.Feature)`
+ * Add support for `mobilepay` on `PaymentMethodConfiguration`
+
+## 14.3.0 - 2024-04-18
+* [#1681](https://github.com/stripe/stripe-php/pull/1681) Update generated code
+ * Add support for `create_preview` method on resource `Invoice`
+ * Add support for `saved_payment_method_options` on `Checkout.Session`
+* [#1682](https://github.com/stripe/stripe-php/pull/1682) Added @throws to autoPagingIterator. Fixes [#1678](https://github.com/stripe/stripe-php/issues/1678)
+
+## 14.2.0 - 2024-04-16
+* [#1680](https://github.com/stripe/stripe-php/pull/1680) Update generated code
+ * Add support for new resource `Entitlements.ActiveEntitlementSummary`
+ * Add support for new value `entitlements.active_entitlement_summary.updated` on enum `Event.type`
+ * Remove support for `config` on `Forwarding.Request`. This field is no longer used by the Forwarding Request API.
+ * Add support for `swish` on `PaymentMethodConfiguration`
+
+## 14.1.0 - 2024-04-11
+* [#1677](https://github.com/stripe/stripe-php/pull/1677) Update generated code
+ * Add support for new values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, and `billing_policy_remote_function_unreachable` on enum `StripeError.code`
+ * Change type of `Billing.MeterEventAdjustment.cancel` from `BillingMeterResourceBillingMeterEventAdjustmentCancel` to `nullable(BillingMeterResourceBillingMeterEventAdjustmentCancel)`
+ * Add support for `amazon_pay` on `PaymentMethodConfiguration` and `PaymentMethod`
+ * Add support for new value `amazon_pay` on enum `PaymentMethod.type`
+ * Add support for new values `bh_vat`, `kz_bin`, `ng_tin`, and `om_vat` on enum `TaxId.type`
+
+## 14.0.0 - 2024-04-10
+* [#1673](https://github.com/stripe/stripe-php/pull/1673)
+
+ * This release changes the pinned API version to `2024-04-10`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-04-10) and carefully review the API changes before upgrading.
+
+ ### ⚠️ Breaking changes
+
+ * Rename `features` to `marketing_features` on `Product`
+ * Do not force resolution to IPv4 - Forcing IPv4 was causing hard-to-understand failures for users in IPv6-only environments. If you want to force IPv4 yourself, you can do so by telling the API client to use a CurlClient other than the default
+ ```php
+ $curl = new \Stripe\HttpClient\CurlClient([
+ CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4
+ ]);
+ \Stripe\ApiRequestor::setHttpClient($curl);
+ ```
+
+ #### ⚠️ Removal of enum values, properties and events that are no longer part of the publicly documented Stripe API
+
+ * Remove the below deprecated values on the enum `BalanceTransaction.Type`
+ * `obligation_inbound`
+ * `obligation_payout`
+ * `obligation_payout_failure`
+ * `obligation_reversal_outbound`
+ * Remove the deprecated value `various` on the enum `Climate.Supplier.RemovalPathway`
+ * Remove deprecated events
+ * `invoiceitem.updated`
+ * `order.created`
+ * `recipient.created`
+ * `recipient.deleted`
+ * `recipient.updated`
+ * `sku.created`
+ * `sku.deleted`
+ * `sku.updated`
+ * Remove the deprecated value `service_tax` on the enum `TaxRate.TaxType`
+ * Remove support for `id_bank_transfer`, `multibanco`, `netbanking`, `pay_by_bank`, and `upi` on `PaymentMethodConfiguration`
+ * Remove the legacy field `rendering_options` in `Invoice`. Use `rendering` instead.
+
+## 13.18.0 - 2024-04-09
+* [#1675](https://github.com/stripe/stripe-php/pull/1675) Update generated code
+ * Add support for new resources `Entitlements.ActiveEntitlement` and `Entitlements.Feature`
+ * Add support for `all` and `retrieve` methods on resource `ActiveEntitlement`
+ * Add support for `all`, `create`, `retrieve`, and `update` methods on resource `Feature`
+ * Add support for new value `none` on enum `Account.type`
+ * Add support for `cancel`, `event_name`, and `type` on `Billing.MeterEventAdjustment`
+
+## 13.17.0 - 2024-04-04
+* [#1670](https://github.com/stripe/stripe-php/pull/1670) Update generated code
+ * Add support for `subscription_item` on `Discount`
+ * Add support for `email` and `phone` on `Identity.VerificationReport`
+ * Add support for `verification_flow` on `Identity.VerificationReport` and `Identity.VerificationSession`
+ * Add support for new value `verification_flow` on enums `Identity.VerificationReport.type` and `Identity.VerificationSession.type`
+ * Add support for `provided_details` on `Identity.VerificationSession`
+ * Change type of `Invoice.discounts` from `nullable(array(expandable(deletable($Discount))))` to `array(expandable(deletable($Discount)))`
+ * Add support for `zip` on `PaymentMethodConfiguration`
+ * Add support for `discounts` on `SubscriptionItem` and `Subscription`
+ * Add support for new value `mobile_phone_reader` on enum `Terminal.Reader.device_type`
+
+## 13.16.0 - 2024-03-28
+* [#1666](https://github.com/stripe/stripe-php/pull/1666) Update generated code
+ * Add support for new resources `Billing.MeterEventAdjustment`, `Billing.MeterEvent`, and `Billing.Meter`
+ * Add support for `all`, `create`, `deactivate`, `reactivate`, `retrieve`, and `update` methods on resource `Meter`
+ * Add support for `create` method on resources `MeterEventAdjustment` and `MeterEvent`
+ * Add support for `meter` on `Plan`
+
+## 13.15.0 - 2024-03-21
+* [#1664](https://github.com/stripe/stripe-php/pull/1664) Update generated code
+ * Add support for new resources `ConfirmationToken` and `Forwarding.Request`
+ * Add support for `retrieve` method on resource `ConfirmationToken`
+ * Add support for `all`, `create`, and `retrieve` methods on resource `Request`
+ * Add support for new values `forwarding_api_inactive`, `forwarding_api_invalid_parameter`, `forwarding_api_upstream_connection_error`, and `forwarding_api_upstream_connection_timeout` on enum `StripeError.code`
+ * Add support for `mobilepay` on `PaymentMethod`
+ * Add support for new value `mobilepay` on enum `PaymentMethod.type`
+ * Add support for `name` on `Terminal.Configuration`
+
+## 13.14.0 - 2024-03-14
+* [#1660](https://github.com/stripe/stripe-php/pull/1660) Update generated code
+ * Add support for new resources `Issuing.PersonalizationDesign` and `Issuing.PhysicalBundle`
+ * Add support for `all`, `create`, `retrieve`, and `update` methods on resource `PersonalizationDesign`
+ * Add support for `all` and `retrieve` methods on resource `PhysicalBundle`
+ * Add support for `personalization_design` on `Issuing.Card`
+
+## 13.13.0 - 2024-02-29
+* [#1654](https://github.com/stripe/stripe-php/pull/1654) Update generated code
+ * Change type of `Identity.VerificationSession.type` from `nullable(enum('document'|'id_number'))` to `enum('document'|'id_number')`
+ * Add resources `Application`, `ConnectCollectionTransfer`, `PlatformTaxFee`, `ReserveTransaction`, `SourceMandateNotification`, and `TaxDeductedAtSource`. These classes have no methods on them, and are used to provide more complete types for PHPDocs.
+* [#1657](https://github.com/stripe/stripe-php/pull/1657) Update readme to use addBetaVersion
+
+## 13.12.0 - 2024-02-22
+* [#1651](https://github.com/stripe/stripe-php/pull/1651) Update generated code
+ * Add support for `client_reference_id` on `Identity.VerificationReport` and `Identity.VerificationSession`
+ * Remove support for value `service_tax` from enum `TaxRate.tax_type`
+* [#1650](https://github.com/stripe/stripe-php/pull/1650) Add TaxIds API
+ * Add support for `all`, `create`, `delete`, and `retrieve` methods on resource `TaxId`
+ * The `instanceUrl` function on `TaxId` now returns the top-level `/v1/tax_ids/{id}` path instead of the `/v1/customers/{customer}/tax_ids/{id}` path.
+
+## 13.11.0 - 2024-02-15
+* [#1639](https://github.com/stripe/stripe-php/pull/1639) Update generated code
+ * Add support for `networks` on `Card`
+ * Add support for new value `financial_connections.account.refreshed_ownership` on enum `Event.type`
+* [#1648](https://github.com/stripe/stripe-php/pull/1648) Remove broken methods on CustomerCashBalanceTransaction
+ * Bugfix: remove support for `CustomerCashBalanceTransaction::all` and `CustomerCashBalanceTransaction::retrieve`. These methods were included in the library unintentionally and never functioned.
+* [#1647](https://github.com/stripe/stripe-php/pull/1647) Fix \Stripe\Tax\Settings::update
+* [#1646](https://github.com/stripe/stripe-php/pull/1646) Add more specific PHPDoc and Psalm type for RequestOptions arrays on services
+
+## 13.10.0 - 2024-02-01
+* [#1636](https://github.com/stripe/stripe-php/pull/1636) Update generated code
+ * Add support for new value `swish` on enum `PaymentLink.payment_method_types[]`
+ * Add support for `swish` on `PaymentMethod`
+ * Add support for new value `swish` on enum `PaymentMethod.type`
+ * Add support for `jurisdiction_level` on `TaxRate`
+ * Change type of `Terminal.Reader.status` from `string` to `enum('offline'|'online')`
+* [#1633](https://github.com/stripe/stripe-php/pull/1633) Update generated code
+ * Add support for `issuer` on `Invoice`
+ * Add support for `customer_balance` on `PaymentMethodConfiguration`
+* [#1630](https://github.com/stripe/stripe-php/pull/1630) Add paginated requests helper function and use in Search and All
+
+## 13.9.0 - 2024-01-12
+* [#1629](https://github.com/stripe/stripe-php/pull/1629) Update generated code
+ * Add support for new resource `CustomerSession`
+ * Add support for `create` method on resource `CustomerSession`
+ * Remove support for values `obligation_inbound`, `obligation_payout_failure`, `obligation_payout`, and `obligation_reversal_outbound` from enum `BalanceTransaction.type`
+ * Add support for `billing_cycle_anchor_config` on `Subscription`
+
+## 13.8.0 - 2024-01-04
+* [#1627](https://github.com/stripe/stripe-php/pull/1627) Update generated code
+ * Add support for `retrieve` method on resource `Tax.Registration`
+
+## 13.7.0 - 2023-12-22
+* [#1621](https://github.com/stripe/stripe-php/pull/1621) Update generated code
+ * Add support for new resource `FinancialConnections.Transaction`
+ * Add support for `all` and `retrieve` methods on resource `Transaction`
+ * Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
+ * Add support for new value `financial_connections.account.refreshed_transactions` on enum `Event.type`
+ * Add support for `subscriptions` and `transaction_refresh` on `FinancialConnections.Account`
+ * Add support for new value `transactions` on enum `FinancialConnections.Session.prefetch[]`
+ * Add support for `revolut_pay` on `PaymentMethodConfiguration`
+ * Remove support for `id_bank_transfer`, `multibanco`, `netbanking`, `pay_by_bank`, and `upi` on `PaymentMethodConfiguration`
+ * Change type of `Quote.invoice_settings` from `nullable(InvoiceSettingQuoteSetting)` to `InvoiceSettingQuoteSetting`
+ * Add support for `destination_details` on `Refund`
+
+## 13.6.0 - 2023-12-07
+* [#1613](https://github.com/stripe/stripe-php/pull/1613) Update generated code
+ * Add support for new values `customer_tax_location_invalid` and `financial_connections_no_successful_transaction_refresh` on enum `StripeError.code`
+ * Add support for new values `payment_network_reserve_hold` and `payment_network_reserve_release` on enum `BalanceTransaction.type`
+ * Remove support for value `various` from enum `Climate.Supplier.removal_pathway`
+ * Add support for `inactive_message` and `restrictions` on `PaymentLink`
+* [#1612](https://github.com/stripe/stripe-php/pull/1612) Report usage of .save and StripeClient
+ * Reports uses of the deprecated `.save` and of `StripeClient` in `X-Stripe-Client-Telemetry`. (You can disable telemetry via `\Stripe\Stripe::setEnableTelemetry(false);`, see the [README](https://github.com/stripe/stripe-php/blob/master/README.md#telemetry).)
+
+## 13.5.0 - 2023-11-30
+* [#1611](https://github.com/stripe/stripe-php/pull/1611) Update generated code
+ * Add support for new resources `Climate.Order`, `Climate.Product`, and `Climate.Supplier`
+ * Add support for `all`, `cancel`, `create`, `retrieve`, and `update` methods on resource `Order`
+ * Add support for `all` and `retrieve` methods on resources `Product` and `Supplier`
+ * Add support for new value `financial_connections_account_inactive` on enum `StripeError.code`
+ * Add support for new values `climate_order_purchase` and `climate_order_refund` on enum `BalanceTransaction.type`
+ * Add support for new values `climate.order.canceled`, `climate.order.created`, `climate.order.delayed`, `climate.order.delivered`, `climate.order.product_substituted`, `climate.product.created`, and `climate.product.pricing_updated` on enum `Event.type`
+
+## 13.4.0 - 2023-11-21
+* [#1608](https://github.com/stripe/stripe-php/pull/1608) Update generated code
+ Add support for `transferred_to_balance` to `CustomerCashBalanceTransaction`
+* [#1605](https://github.com/stripe/stripe-php/pull/1605) Update generated code
+ * Add support for `network_data` on `Issuing.Transaction`
+
+## 13.3.0 - 2023-11-09
+* [#1603](https://github.com/stripe/stripe-php/pull/1603) Update generated code
+ * Add support for new value `terminal_reader_hardware_fault` on enum `StripeError.code`
+
+## 13.2.1 - 2023-11-06
+* [#1602](https://github.com/stripe/stripe-php/pull/1602) Fix error when "id" is not a string.
+
+## 13.2.0 - 2023-11-02
+* [#1599](https://github.com/stripe/stripe-php/pull/1599) Update generated code
+ * Add support for new resource `Tax.Registration`
+ * Add support for `all`, `create`, and `update` methods on resource `Registration`
+ * Add support for new value `token_card_network_invalid` on enum `StripeError.code`
+ * Add support for new value `payment_unreconciled` on enum `BalanceTransaction.type`
+ * Add support for `revolut_pay` on `PaymentMethod`
+ * Add support for new value `revolut_pay` on enum `PaymentMethod.type`
+
+## 13.1.0 - 2023-10-26
+* [#1595](https://github.com/stripe/stripe-php/pull/1595) Update generated code
+ * Add support for new value `balance_invalid_parameter` on enum `StripeError.code`
+
+## 13.0.0 - 2023-10-16
+* This release changes the pinned API version to `2023-10-16`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2023-10-16) and carefully review the API changes before upgrading `stripe-php` package.
+* [#1593](https://github.com/stripe/stripe-php/pull/1593) Update generated code
+ - Added `additional_tos_acceptances` field on `Person`
+
+## 12.8.0 - 2023-10-16
+* [#1590](https://github.com/stripe/stripe-php/pull/1590) Update generated code
+ * Add support for new values `issuing_token.created` and `issuing_token.updated` on enum `Event.type`
+
+## 12.7.0 - 2023-10-11
+* [#1589](https://github.com/stripe/stripe-php/pull/1589) Update generated code
+ * Add support for `client_secret`, `redirect_on_completion`, `return_url`, and `ui_mode` on `Checkout.Session`
+ * Add support for `offline` on `Terminal.Configuration`
+
+## 12.6.0 - 2023-10-05
+* [#1586](https://github.com/stripe/stripe-php/pull/1586) Update generated code
+ * Add support for new resource `Issuing.Token`
+ * Add support for `all`, `retrieve`, and `update` methods on resource `Token`
+ * Add support for `token` on `Issuing.Authorization` and `Issuing.Transaction`
+* [#1569](https://github.com/stripe/stripe-php/pull/1569) Fix: Do not bother removing `friendsofphp/php-cs-fixer`
+
+## 12.5.0 - 2023-09-28
+* [#1582](https://github.com/stripe/stripe-php/pull/1582) Generate Discount, SourceTransaction and use sections in more places
+* [#1584](https://github.com/stripe/stripe-php/pull/1584) Update generated code
+ * Add support for `rendering` on `Invoice`
+
+## 12.4.0 - 2023-09-21
+* [#1579](https://github.com/stripe/stripe-php/pull/1579) Update generated code
+ * Add back constant for `invoiceitem.updated` webhook event. This was mistakenly removed in v12.2.0.
+* [#1566](https://github.com/stripe/stripe-php/pull/1566) Fix: Remove `squizlabs/php_codesniffer`
+* [#1568](https://github.com/stripe/stripe-php/pull/1568) Enhancement: Reference `phpunit.xsd` as installed with `composer`
+* [#1565](https://github.com/stripe/stripe-php/pull/1565) Enhancement: Use PHP 8.2 as leading PHP version
+
+## 12.3.0 - 2023-09-14
+* [#1577](https://github.com/stripe/stripe-php/pull/1577) Update generated code
+ * Add support for new resource `PaymentMethodConfiguration`
+ * Add support for `all`, `create`, `retrieve`, and `update` methods on resource `PaymentMethodConfiguration`
+ * Add support for `payment_method_configuration_details` on `Checkout.Session`, `PaymentIntent`, and `SetupIntent`
+* [#1573](https://github.com/stripe/stripe-php/pull/1573) Update generated code
+ * Add support for `capture`, `create`, `expire`, `increment`, and `reverse` test helper methods on resource `Issuing.Authorization`
+ * Add support for `create_force_capture`, `create_unlinked_refund`, and `refund` test helper methods on resource `Issuing.Transaction`
+ * Add support for new value `stripe_tax_inactive` on enum `StripeError.code`
+
+## 12.2.0 - 2023-09-07
+* [#1571](https://github.com/stripe/stripe-php/pull/1571) Update generated code
+ * Add support for new resource `PaymentMethodDomain`
+ * Add support for `all`, `create`, `retrieve`, `update`, and `validate` methods on resource `PaymentMethodDomain`
+ * Add support for new values `treasury.credit_reversal.created`, `treasury.credit_reversal.posted`, `treasury.debit_reversal.completed`, `treasury.debit_reversal.created`, `treasury.debit_reversal.initial_credit_granted`, `treasury.financial_account.closed`, `treasury.financial_account.created`, `treasury.financial_account.features_status_updated`, `treasury.inbound_transfer.canceled`, `treasury.inbound_transfer.created`, `treasury.inbound_transfer.failed`, `treasury.inbound_transfer.succeeded`, `treasury.outbound_payment.canceled`, `treasury.outbound_payment.created`, `treasury.outbound_payment.expected_arrival_date_updated`, `treasury.outbound_payment.failed`, `treasury.outbound_payment.posted`, `treasury.outbound_payment.returned`, `treasury.outbound_transfer.canceled`, `treasury.outbound_transfer.created`, `treasury.outbound_transfer.expected_arrival_date_updated`, `treasury.outbound_transfer.failed`, `treasury.outbound_transfer.posted`, `treasury.outbound_transfer.returned`, `treasury.received_credit.created`, `treasury.received_credit.failed`, `treasury.received_credit.succeeded`, and `treasury.received_debit.created` on enum `Event.type`
+ * Remove support for value `invoiceitem.updated` from enum `Event.type`
+ * Add support for `features` on `Product`
+
+## 12.1.0 - 2023-08-31
+* [#1560](https://github.com/stripe/stripe-php/pull/1560) Update generated code
+ * Add support for new resource `AccountSession`
+ * Add support for `create` method on resource `AccountSession`
+ * Add support for new values `obligation_inbound`, `obligation_outbound`, `obligation_payout_failure`, `obligation_payout`, `obligation_reversal_inbound`, and `obligation_reversal_outbound` on enum `BalanceTransaction.type`
+ * Change type of `Event.type` from `string` to `enum`
+ * Add support for `application` on `PaymentLink`
+* [#1562](https://github.com/stripe/stripe-php/pull/1562) Nicer ApiErrorException::__toString()
+* [#1558](https://github.com/stripe/stripe-php/pull/1558) Update generated code
+ * Add support for `payment_method_details` on `Dispute`
+ * Add support for `prefetch` on `FinancialConnections.Session`
+
+## 12.0.0 - 2023-08-18
+**⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**
+
+### Version pinning
+
+In this release, Stripe API Version `2023-08-16` (the latest at time of release) will be sent by default on all requests. This is a significant change with wide ramifications. The API version affects the properties you see on responses, the parameters you are allowed to send on requests, and so on. The previous default was to use your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version).
+
+To successfully upgrade to stripe-php v12, you must either
+
+1. **(Recommended) Upgrade your integration to be compatible with API Version `2023-08-16`.**
+
+ Please read the API Changelog carefully for each API Version from `2023-08-16` back to your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version). Determine if you are using any of the APIs that have changed in a breaking way, and adjust your integration accordingly. Carefully test your changes with Stripe [Test Mode](https://stripe.com/docs/keys#test-live-modes) before deploying them to production.
+
+ You can read the [v12 migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v12) for more detailed instructions.
+2. **(Alternative option) Specify a version other than `2023-08-16` when initializing `stripe-php`.**
+
+ If you were previously initializing stripe-php without an explicit API Version, you can postpone modifying your integration by specifying a version equal to your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version). For example:
+
+ ```diff
+ // if using StripeClient
+ - $stripe = new \Stripe\StripeClient('sk_test_xyz');
+ + $stripe = new \Stripe\StripeClient([
+ + 'api_key' => 'sk_test_xyz',
+ 'stripe_version' => '2020-08-27',
+ + ]);
+
+ // if using the global client
+ Stripe.apiKey = "sk_test_xyz";
+ + Stripe::setApiVersion('2020-08-27');
+ ```
+
+ If you were already initializing stripe-php with an explicit API Version, upgrading to v12 will not affect your integration.
+
+ Read the [v12 migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v12) for more details.
+
+ Going forward, each major release of this library will be *pinned* by default to the latest Stripe API Version at the time of release.
+
+ That is, instead of upgrading stripe-php and separately upgrading your Stripe API Version through the Stripe Dashboard, whenever you upgrade major versions of stripe-php, you should also upgrade your integration to be compatible with the latest Stripe API version.
+
+### Other changes
+" ⚠️" symbol highlights breaking changes.
+* [#1553](https://github.com/stripe/stripe-php/pull/1553)⚠️ Remove deprecated enum value `Invoice.STATUS_DELETE`
+
+* [#1550](https://github.com/stripe/stripe-php/pull/1550) PHPDoc changes
+ * Remove support for `alternate_statement_descriptors`, `destination`, and `dispute` on `Charge`
+ * Remove support for value `charge_refunded` from enum `Dispute.status`
+ * Remove support for `rendering` on `Invoice`
+ * Remove support for `attributes`, `caption`, and `deactivate_on` on `Product`
+
+## 11.0.0 - 2023-08-16
+Please do not use stripe-php v11. It did not correctly apply the [pinning behavior](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#version-pinning) and was removed from packagist
+
+## 10.21.0 - 2023-08-10
+* [#1546](https://github.com/stripe/stripe-php/pull/1546) Update generated code
+ * Add support for new value `payment_reversal` on enum `BalanceTransaction.type`
+ * Add support for new value `adjusted_for_overdraft` on enum `CustomerBalanceTransaction.type`
+
+## 10.20.0 - 2023-08-03
+* [#1539](https://github.com/stripe/stripe-php/pull/1539) Update generated code
+ * Add support for `subscription_details` on `Invoice`
+ * Add support for new values `sepa_debit_fingerprint` and `us_bank_account_fingerprint` on enum `Radar.ValueList.item_type`
+
+## 10.19.0 - 2023-07-27
+* [#1534](https://github.com/stripe/stripe-php/pull/1534) Update generated code
+ * Improve PHPDoc type for `ApplicationFee.refunds`
+ * Add support for `deleted` on `Apps.Secret`
+* [#1526](https://github.com/stripe/stripe-php/pull/1526) Add constants for payment intent cancellation reasons
+* [#1533](https://github.com/stripe/stripe-php/pull/1533) Update generated code
+ * Add support for new value `service_tax` on enum `TaxRate.tax_type`
+* [#1487](https://github.com/stripe/stripe-php/pull/1487) PHPDoc: use union of literals for $method parameter throughout
+
+## 10.18.0 - 2023-07-20
+* [#1533](https://github.com/stripe/stripe-php/pull/1533) Update generated code
+ * Add support for new value `service_tax` on enum `TaxRate.tax_type`
+* [#1526](https://github.com/stripe/stripe-php/pull/1526) Add constants for payment intent cancellation reasons
+* [#1487](https://github.com/stripe/stripe-php/pull/1487) PHPDoc: use union of literals for $method parameter throughout
+
+## 10.17.0 - 2023-07-13
+* [#1525](https://github.com/stripe/stripe-php/pull/1525) Update generated code
+ * Add support for new resource `Tax.Settings`
+ * Add support for `retrieve` and `update` methods on resource `Settings`
+ * Add support for new value `invalid_tax_location` on enum `StripeError.code`
+ * Add support for `product` on `Tax.TransactionLineItem`
+ * Add constant for `tax.settings.updated` webhook event
+* [#1520](https://github.com/stripe/stripe-php/pull/1520) Update generated code
+ * Release specs are identical.
+
+## 10.16.0 - 2023-06-29
+* [#1517](https://github.com/stripe/stripe-php/pull/1517) Update generated code
+ * Add support for new value `application_fees_not_allowed` on enum `StripeError.code`
+ * Add support for `effective_at` on `CreditNote` and `Invoice`
+ * Add support for `on_behalf_of` on `Mandate`
+* [#1514](https://github.com/stripe/stripe-php/pull/1514) Update generated code
+ * Release specs are identical.
+* [#1512](https://github.com/stripe/stripe-php/pull/1512) Update generated code
+ * Change type of `Checkout.Session.success_url` from `string` to `nullable(string)`
+
+## 10.15.0 - 2023-06-08
+* [#1506](https://github.com/stripe/stripe-php/pull/1506) Update generated code
+ * Add support for `preferred_locales` on `Issuing.Cardholder`
+
+## 10.14.0 - 2023-05-25
+* [#1503](https://github.com/stripe/stripe-php/pull/1503) Update generated code
+ * Add support for `zip` on `PaymentMethod`
+ * Add support for new value `zip` on enum `PaymentMethod.type`
+* [#1502](https://github.com/stripe/stripe-php/pull/1502) Generate error codes
+* [#1501](https://github.com/stripe/stripe-php/pull/1501) Update generated code
+
+* [#1499](https://github.com/stripe/stripe-php/pull/1499) Update generated code
+ * Add support for new values `amusement_tax` and `communications_tax` on enum `TaxRate.tax_type`
+
+## 10.13.0 - 2023-05-11
+* [#1490](https://github.com/stripe/stripe-php/pull/1490) Update generated code
+ * Add support for `paypal` on `PaymentMethod`
+ * Add support for `effective_percentage` on `TaxRate`
+* [#1488](https://github.com/stripe/stripe-php/pull/1488) Increment PHPStan to strictness level 2
+* [#1483](https://github.com/stripe/stripe-php/pull/1483) Update generated code
+
+* [#1480](https://github.com/stripe/stripe-php/pull/1480) Update generated code
+ * Change type of `Identity.VerificationSession.options` from `VerificationSessionOptions` to `nullable(VerificationSessionOptions)`
+ * Change type of `Identity.VerificationSession.type` from `enum('document'|'id_number')` to `nullable(enum('document'|'id_number'))`
+* [#1478](https://github.com/stripe/stripe-php/pull/1478) Update generated code
+ * Release specs are identical.
+* [#1475](https://github.com/stripe/stripe-php/pull/1475) Update generated code
+
+
+## 10.12.1 - 2023-04-04
+* [#1473](https://github.com/stripe/stripe-php/pull/1473) Update generated code
+ * Add back `deleted` from `Invoice.status`.
+
+## 10.12.0 - 2023-03-30
+* [#1470](https://github.com/stripe/stripe-php/pull/1470) Update generated code
+ * Remove support for `create` method on resource `Tax.Transaction`
+ * This is not a breaking change, as this method was deprecated before the Tax Transactions API was released in favor of the `createFromCalculation` method.
+ * Remove support for value `deleted` from enum `Invoice.status`
+ * This is not a breaking change, as the value was never returned or accepted as input.
+* [#1468](https://github.com/stripe/stripe-php/pull/1468) Trigger workflow for tags
+* [#1467](https://github.com/stripe/stripe-php/pull/1467) Update generated code (new)
+ * Release specs are identical.
+
+## 10.11.0 - 2023-03-23
+* [#1458](https://github.com/stripe/stripe-php/pull/1458) Update generated code
+ * Add support for new resources `Tax.CalculationLineItem`, `Tax.Calculation`, `Tax.TransactionLineItem`, and `Tax.Transaction`
+ * Add support for `create` and `list_line_items` methods on resource `Calculation`
+ * Add support for `create_from_calculation`, `create_reversal`, `create`, `list_line_items`, and `retrieve` methods on resource `Transaction`
+ * Add support for `currency_conversion` on `Checkout.Session`
+ * Add support for new value `automatic_async` on enum `PaymentIntent.capture_method`
+ * Add support for new value `link` on enum `PaymentLink.payment_method_types[]`
+ * Add support for `automatic_payment_methods` on `SetupIntent`
+
+## 10.10.0 - 2023-03-16
+* [#1457](https://github.com/stripe/stripe-php/pull/1457) API Updates
+ * Add support for `future_requirements` and `requirements` on `BankAccount`
+ * Add support for new value `automatic_async` on enum `PaymentIntent.capture_method`
+ * Add support for new value `cashapp` on enum `PaymentLink.payment_method_types[]`
+ * Add support for `cashapp` on `PaymentMethod`
+ * Add support for new value `cashapp` on enum `PaymentMethod.type`
+* [#1454](https://github.com/stripe/stripe-php/pull/1454) Update generated code (new)
+ * Add support for new value `cashapp` on enum `PaymentLink.payment_method_types[]`
+ * Add support for `cashapp` on `PaymentMethod`
+ * Add support for new value `cashapp` on enum `PaymentMethod.type`
+
+## 10.9.1 - 2023-03-14
+* [#1453](https://github.com/stripe/stripe-php/pull/1453) Restore StripeClient.getService
+
+## 10.9.0 - 2023-03-09
+* [#1450](https://github.com/stripe/stripe-php/pull/1450) API Updates
+ * Add support for `cancellation_details` on `Subscription`
+ * Fix return types on custom methods (extends https://github.com/stripe/stripe-php/pull/1446)
+
+* [#1446](https://github.com/stripe/stripe-php/pull/1446) stripe->customers->retrievePaymentMethod returns the wrong class (type hint)
+
+## 10.8.0 - 2023-03-02
+* [#1447](https://github.com/stripe/stripe-php/pull/1447) API Updates
+ * Add support for `reconciliation_status` on `Payout`
+ * Add support for new value `lease_tax` on enum `TaxRate.tax_type`
+
+## 10.7.0 - 2023-02-23
+* [#1444](https://github.com/stripe/stripe-php/pull/1444) API Updates
+ * Add support for new value `igst` on enum `TaxRate.tax_type`
+
+## 10.6.1 - 2023-02-21
+* [#1443](https://github.com/stripe/stripe-php/pull/1443) Remove init.php from the list of ignored files
+
+## 10.6.0 - 2023-02-16
+* [#1441](https://github.com/stripe/stripe-php/pull/1441) API Updates
+ * Add support for `refund_payment` method on resource `Terminal.Reader`
+ * Add support for `custom_fields` on `Checkout.Session` and `PaymentLink`
+* [#1236](https://github.com/stripe/stripe-php/pull/1236) subscription_proration_date not always presented in Invoice
+* [#1431](https://github.com/stripe/stripe-php/pull/1431) Fix: Do not use unbounded version constraint for `actions/checkout`
+* [#1436](https://github.com/stripe/stripe-php/pull/1436) Enhancement: Enable and configure `visibility_required` fixer
+* [#1432](https://github.com/stripe/stripe-php/pull/1432) Enhancement: Update `actions/cache`
+* [#1434](https://github.com/stripe/stripe-php/pull/1434) Fix: Remove parentheses
+* [#1433](https://github.com/stripe/stripe-php/pull/1433) Enhancement: Run tests on PHP 8.2
+* [#1438](https://github.com/stripe/stripe-php/pull/1438) Update .gitattributes
+
+## 10.5.0 - 2023-02-02
+* [#1439](https://github.com/stripe/stripe-php/pull/1439) API Updates
+ * Add support for `resume` method on resource `Subscription`
+ * Add support for `amount_shipping` and `shipping_cost` on `CreditNote` and `Invoice`
+ * Add support for `shipping_details` on `Invoice`
+ * Add support for `invoice_creation` on `PaymentLink`
+ * Add support for `trial_settings` on `Subscription`
+ * Add support for new value `paused` on enum `Subscription.status`
+
+## 10.4.0 - 2023-01-19
+* [#1381](https://github.com/stripe/stripe-php/pull/1381) Add getService methods to StripeClient and AbstractServiceFactory to allow mocking
+* [#1424](https://github.com/stripe/stripe-php/pull/1424) API Updates
+
+ * Added `REFUND_CREATED`, `REFUND_UPDATED` event definitions.
+* [#1426](https://github.com/stripe/stripe-php/pull/1426) Ignore PHP version for formatting
+* [#1425](https://github.com/stripe/stripe-php/pull/1425) Fix Stripe::setAccountId parameter type
+* [#1418](https://github.com/stripe/stripe-php/pull/1418) Switch to mb_convert_encoding to fix utf8_encode deprecation warning
+
+## 10.3.0 - 2022-12-22
+* [#1413](https://github.com/stripe/stripe-php/pull/1413) API Updates
+ Change `CheckoutSession.cancel_url` to be nullable.
+
+## 10.2.0 - 2022-12-15
+* [#1411](https://github.com/stripe/stripe-php/pull/1411) API Updates
+ * Add support for new value `invoice_overpaid` on enum `CustomerBalanceTransaction.type`
+* [#1407](https://github.com/stripe/stripe-php/pull/1407) API Updates
+
+
+## 10.1.0 - 2022-12-06
+* [#1405](https://github.com/stripe/stripe-php/pull/1405) API Updates
+ * Add support for `flow` on `BillingPortal.Session`
+* [#1404](https://github.com/stripe/stripe-php/pull/1404) API Updates
+ * Remove support for resources `Order` and `Sku`
+ * Remove support for `all`, `cancel`, `create`, `list_line_items`, `reopen`, `retrieve`, `submit`, and `update` methods on resource `Order`
+ * Remove support for `all`, `create`, `delete`, `retrieve`, and `update` methods on resource `Sku`
+ * Add support for `custom_text` on `Checkout.Session` and `PaymentLink`
+ * Add support for `invoice_creation` and `invoice` on `Checkout.Session`
+ * Remove support for `product` on `LineItem`
+ * Add support for `latest_charge` on `PaymentIntent`
+ * Remove support for `charges` on `PaymentIntent`
+
+## 10.0.0 - 2022-11-16
+* [#1392](https://github.com/stripe/stripe-php/pull/1392) Next major release changes
+
+Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-11-15.
+
+"⚠️" symbol highlights breaking changes.
+
+### Deprecated
+* [#1382](https://github.com/stripe/stripe-php/pull/1382) Mark `resource.save` as deprecated. Prefer the static update method that doesn't require retrieval of the resource to update it.
+```PHP
+// before
+$resource = Price::retrieve(self::TEST_RESOURCE_ID);
+$resource->metadata['key'] = 'value';
+$resource->save();
+
+// after
+$resource = Price::update('price_123', [
+ 'metadata' => ['key' => 'value'],
+]);
+```
+
+### ⚠️ Removed
+- [#1377](https://github.com/stripe/stripe-php/pull/1377) Removed deprecated `Sku` resource and service
+- [#1375](https://github.com/stripe/stripe-php/pull/1375) Removed deprecated `Orders` resource and service
+- [#1375](https://github.com/stripe/stripe-php/pull/1375) Removed deprecated `Product` field from the `LineItem`
+- [#1388](https://github.com/stripe/stripe-php/pull/1388) Removed deprecated `AlipayAccount` resource
+- [#1396](https://github.com/stripe/stripe-php/pull/1396) Removed `charges` field on `PaymentIntent` and replace it with `latest_charge`.
+
+
+## 9.9.0 - 2022-11-08
+* [#1394](https://github.com/stripe/stripe-php/pull/1394) API Updates
+ * Add support for new values `eg_tin`, `ph_tin`, and `tr_tin` on enum `TaxId.type`
+* [#1389](https://github.com/stripe/stripe-php/pull/1389) API Updates
+ * Add support for `on_behalf_of` on `Subscription`
+* [#1379](https://github.com/stripe/stripe-php/pull/1379) Do not run Coveralls in PR-s
+
+## 9.8.0 - 2022-10-20
+* [#1383](https://github.com/stripe/stripe-php/pull/1383) API Updates
+ * Add support for new values `jp_trn` and `ke_pin` on enum `TaxId.type`
+* [#1293](https://github.com/stripe/stripe-php/pull/1293) Install deps in the install step of CI
+* [#1291](https://github.com/stripe/stripe-php/pull/1291) Fix: Configure finder for `friendsofphp/php-cs-fixer`
+
+## 9.7.0 - 2022-10-13
+* [#1376](https://github.com/stripe/stripe-php/pull/1376) API Updates
+ * Add support for `network_data` on `Issuing.Authorization`
+* [#1374](https://github.com/stripe/stripe-php/pull/1374) Add request_log_url on ErrorObject
+* [#1370](https://github.com/stripe/stripe-php/pull/1370) API Updates
+ * Add support for `created` on `Checkout.Session`
+
+## 9.6.0 - 2022-09-15
+* [#1365](https://github.com/stripe/stripe-php/pull/1365) API Updates
+ * Add support for `from_invoice` and `latest_revision` on `Invoice`
+ * Add support for new value `pix` on enum `PaymentLink.payment_method_types[]`
+ * Add support for `pix` on `PaymentMethod`
+ * Add support for new value `pix` on enum `PaymentMethod.type`
+ * Add support for `created` on `Treasury.CreditReversal` and `Treasury.DebitReversal`
+
+## 9.5.0 - 2022-09-06
+* [#1364](https://github.com/stripe/stripe-php/pull/1364) API Updates
+ * Add support for new value `terminal_reader_splashscreen` on enum `File.purpose`
+* [#1363](https://github.com/stripe/stripe-php/pull/1363) chore: Update PHP tests to handle search methods.
+
+## 9.4.0 - 2022-08-26
+* [#1362](https://github.com/stripe/stripe-php/pull/1362) API Updates
+ * Add support for `login_page` on `BillingPortal.Configuration`
+* [#1360](https://github.com/stripe/stripe-php/pull/1360) Add test coverage using Coveralls
+* [#1361](https://github.com/stripe/stripe-php/pull/1361) fix: Fix type hints for error objects.
+ * Update `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error` and `SetupIntent.setup_error` type to be `StripeObject`.
+ * Addresses https://github.com/stripe/stripe-php/issues/1353. The library today does not actually return a `ErrorObject` for these fields, so the type annotation was incorrect.
+* [#1356](https://github.com/stripe/stripe-php/pull/1356) Add beta readme.md section
+
+## 9.3.0 - 2022-08-23
+* [#1355](https://github.com/stripe/stripe-php/pull/1355) API Updates
+ * Change type of `Treasury.OutboundTransfer.destination_payment_method` from `string` to `string | null`
+ * Change the return type of `CustomerService.fundCashBalance` test helper from `CustomerBalanceTransaction` to `CustomerCashBalanceTransaction`.
+ * This would generally be considered a breaking change, but we've worked with all existing users to migrate and are comfortable releasing this as a minor as it is solely a test helper method. This was essentially broken prior to this change.
+
+## 9.2.0 - 2022-08-19
+* [#1352](https://github.com/stripe/stripe-php/pull/1352) API Updates
+ * Add support for new resource `CustomerCashBalanceTransaction`
+ * Add support for `currency` on `PaymentLink`
+ * Add constant for `customer_cash_balance_transaction.created` webhook event.
+* [#1351](https://github.com/stripe/stripe-php/pull/1351) Add a support section to the readme
+* [#1304](https://github.com/stripe/stripe-php/pull/1304) Allow passing PSR-3 loggers to setLogger as they are compatible
+
+## 9.1.0 - 2022-08-11
+* [#1348](https://github.com/stripe/stripe-php/pull/1348) API Updates
+ * Add support for `payment_method_collection` on `Checkout.Session` and `PaymentLink`
+
+* [#1346](https://github.com/stripe/stripe-php/pull/1346) API Updates
+ * Add support for `expires_at` on `Apps.Secret`
+
+## 9.0.0 - 2022-08-02
+
+Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v9. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
+
+"⚠️" symbol highlights breaking changes.
+
+* [#1344](https://github.com/stripe/stripe-php/pull/1344) API Updates
+* [#1337](https://github.com/stripe/stripe-php/pull/1337) API Updates
+* [#1273](https://github.com/stripe/stripe-php/pull/1273) Add some PHPDoc return types and fixes
+* [#1341](https://github.com/stripe/stripe-php/pull/1341) Next major release changes
+
+### Added
+* Add `alternate_statement_descriptors`, `authorization_code`, and `level3` properties to `Charge` resource.
+* Add `previewLines` method to `CreditNote` resource.
+* Add `transfer_data` property to `Subscription` resource.
+* Add `SOURCE_TYPE_FPX` constant to `Transfer` resource.
+* Add new error code constants to `ErrorObject`.
+* Add support for `shipping_cost` and `shipping_details` on `Checkout.Session`
+
+### ⚠️ Changed
+* Updated certificate bundle ([#1314](https://github.com/stripe/stripe-php/pull/1314))
+* Add `params` parameter to `close` method in `Dispute` resource.
+
+### ⚠️ Removed
+* Remove deprecated `AlipayAccount`, `BitcoinReceiver`, `BitcoinTransaction`, `Recipient`, `RecipientTransfer`, and `ThreeDSecure` resources.
+* Remove `CAPABILITY_CARD_PAYMENTS`, `CAPABILITY_LEGACY_PAYMENTS`, `CAPABILITY_PLATFORM_PAYMENTS`, `CAPABILITY_TRANSFERS`, `CAPABILITY_STATUS_ACTIVE`, `CAPABILITY_STATUS_INACTIVE`, and `CAPABILITY_STATUS_PENDING` constants from `Account` resource. Please use up-to-date values from https://stripe.com/docs/connect/account-capabilities.
+* Remove `AssociatedObjects` array property from `EphemeralKey` resource. The field was undocumented and unsupported.
+* Remove `details` method from `Card` resource. The endpoint was deprecated and no longer exists.
+* Remove `recipient` property from `Card` resource. The property was deprecated.
+* Remove ability to list `Card` resources for a particular `Recipient`.
+* Remove `sources` property from `Card` resource. The property was deprecated.
+* Remove `FAILURE_REASON` constant from `Refund` resource. The value was deprecated.
+* Remove `Recipient` resource. The resource was deprecated.
+* Remove `OrderItem` resource. The resource was deprecated.
+* Remove `all` method from `LineItem`.
+* Remove `cancel` method from `Transfer` and `TransferService`. This method is deprecated.
+* Remove `allTransactions` method from `SourceService` service. Please use `allSourceTransactions` method instead.
+* Remove `persons` method from `Account` resource. Please use `allPersons` method instead.
+* Remove `sourceTransactions` method from `Source` resource. Please use `allSourceTransactions` method instead.
+* Remove `usageRecordSummaries` method from `SubscriptionItem` resource. Please use `allUsageRecordSummaries` method instead.
+* Remove `SOURCE_TYPE_ALIPAY_ACCOUNT` and `SOURCE_TYPE_FINANCING` constants from `Transfer` resource. The values were deprecated and are no longer in use.
+* Remove deprecated error code constants from `ErrorObject`: `CODE_ACCOUNT_ALREADY_EXISTS`, `CODE_ORDER_CREATION_FAILED`, `CODE_ORDER_REQUIRED_SETTINGS`, `CODE_ORDER_STATUS_INVALID`, `CODE_ORDER_UPSTREAM_TIMEOUT`, and `CODE_UPSTREAM_ORDER_CREATION_FAILED`.
+* Remove deprecated event constants from `Webhook`: `ISSUER_FRAUD_RECORD_CREATED`, ` ORDER_PAYMENT_FAILED`, `ORDER_PAYMENT_SUCCEEDED`, `ORDER_UPDATED`, `ORDER_RETURN_CREATED`, `PAYMENT_METHOD_CARD_AUTOMATICALLY_UPDATED`, `PING`, `PROMOTION_CODE_DELETED`, and `TREASURY_RECEIVED_CREDIT_REVERSED`. The events are deprecated and no longer sent by Stripe.
+
+## 8.12.0 - 2022-07-25
+* [#1332](https://github.com/stripe/stripe-php/pull/1332) API Updates
+ * Add support for `default_currency` and `invoice_credit_balance` on `Customer`
+
+
+## 8.11.0 - 2022-07-18
+* [#1324](https://github.com/stripe/stripe-php/pull/1324) API Updates
+ * Add support for new value `blik` on enum `PaymentLink.payment_method_types[]`
+ * Add support for `blik` on `PaymentMethod`
+ * Add support for new value `blik` on enum `PaymentMethod.type`
+ * Add `Invoice.upcomingLines` method.
+ * Add `SourceService.allSourceTransactions` method.
+* [#1322](https://github.com/stripe/stripe-php/pull/1322) API Updates
+ * Change type of `source_type` on `Transfer` from nullable string to string (comment-only change)
+
+## 8.10.0 - 2022-07-07
+* [#1319](https://github.com/stripe/stripe-php/pull/1319) API Updates
+ * Add support for `currency_options` on `Coupon` and `Price`
+ * Add support for `currency` on `Subscription`
+* [#1318](https://github.com/stripe/stripe-php/pull/1318) API Updates
+ * Add support for new values financial_connections.account.created, financial_connections.account.deactivated, financial_connections.account.disconnected, financial_connections.account.reactivated, and financial_connections.account.refreshed_balance on `Event`.
+
+## 8.9.0 - 2022-06-29
+* [#1316](https://github.com/stripe/stripe-php/pull/1316) API Updates
+ * Add support for `deliver_card`, `fail_card`, `return_card`, and `ship_card` test helper methods on resource `Issuing.Card`
+ * Add support for `subtotal_excluding_tax` on `CreditNote` and `Invoice`
+ * Add support for `amount_excluding_tax` and `unit_amount_excluding_tax` on `CreditNoteLineItem` and `InvoiceLineItem`
+ * Add support for `total_excluding_tax` on `Invoice`
+ * Change type of `PaymentLink.payment_method_types[]` from `literal('card')` to `enum`
+ * Add support for `promptpay` on `PaymentMethod`
+ * Add support for new value `promptpay` on enum `PaymentMethod.type`
+ * Add support for `hosted_regulatory_receipt_url` and `reversal_details` on `Treasury.ReceivedCredit` and `Treasury.ReceivedDebit`
+
+## 8.8.0 - 2022-06-23
+* [#1302](https://github.com/stripe/stripe-php/pull/1302) API Updates
+ * Add support for `custom_unit_amount` on `Price`
+* [#1301](https://github.com/stripe/stripe-php/pull/1301) API Updates
+
+ Documentation updates.
+
+## 8.7.0 - 2022-06-17
+* [#1306](https://github.com/stripe/stripe-php/pull/1306) API Updates
+ * Add support for `fund_cash_balance` test helper method on resource `Customer`
+ * Add support for `total_excluding_tax` on `CreditNote`
+ * Add support for `rendering_options` on `Invoice`
+* [#1307](https://github.com/stripe/stripe-php/pull/1307) Support updating pre-release versions
+* [#1305](https://github.com/stripe/stripe-php/pull/1305) Trigger workflows on beta branches
+* [#1302](https://github.com/stripe/stripe-php/pull/1302) API Updates
+ * Add support for `custom_unit_amount` on `Price`
+* [#1301](https://github.com/stripe/stripe-php/pull/1301) API Updates
+
+ Documentation updates.
+
+## 8.6.0 - 2022-06-08
+* [#1300](https://github.com/stripe/stripe-php/pull/1300) API Updates
+ * Add support for `attach_to_self` and `flow_directions` on `SetupAttempt`
+
+## 8.5.0 - 2022-06-01
+* [#1298](https://github.com/stripe/stripe-php/pull/1298) API Updates
+ * Add support for `radar_options` on `Charge` and `PaymentMethod`
+ * Add support for new value `simulated_wisepos_e` on enum `Terminal.Reader.device_type`
+
+## 8.4.0 - 2022-05-26
+* [#1296](https://github.com/stripe/stripe-php/pull/1296) API Updates
+ * Add support for `persons` method on resource `Account`
+ * Add support for `balance_transactions` method on resource `Customer`
+ * Add support for `id_number_secondary_provided` on `Person`
+* [#1295](https://github.com/stripe/stripe-php/pull/1295) API Updates
+
+
+## 8.3.0 - 2022-05-23
+* [#1294](https://github.com/stripe/stripe-php/pull/1294) API Updates
+ * Add support for new resource `Apps.Secret`
+ * Add support for `affirm` and `link` on `PaymentMethod`
+ * Add support for new values `affirm` and `link` on enum `PaymentMethod.type`
+* [#1289](https://github.com/stripe/stripe-php/pull/1289) fix: Update RequestOptions#redactedApiKey to stop exploding null.
+
+## 8.2.0 - 2022-05-19
+* [#1286](https://github.com/stripe/stripe-php/pull/1286) API Updates
+ * Add support for new resources `Treasury.CreditReversal`, `Treasury.DebitReversal`, `Treasury.FinancialAccountFeatures`, `Treasury.FinancialAccount`, `Treasury.FlowDetails`, `Treasury.InboundTransfer`, `Treasury.OutboundPayment`, `Treasury.OutboundTransfer`, `Treasury.ReceivedCredit`, `Treasury.ReceivedDebit`, `Treasury.TransactionEntry`, and `Treasury.Transaction`
+ * Add support for `retrieve_payment_method` method on resource `Customer`
+ * Add support for `all` and `list_owners` methods on resource `FinancialConnections.Account`
+ * Add support for `treasury` on `Issuing.Authorization`, `Issuing.Dispute`, and `Issuing.Transaction`
+ * Add support for `financial_account` on `Issuing.Card`
+ * Add support for `client_secret` on `Order`
+ * Add support for `attach_to_self` and `flow_directions` on `SetupIntent`
+
+## 8.1.0 - 2022-05-11
+* [#1284](https://github.com/stripe/stripe-php/pull/1284) API Updates
+ * Add support for `consent_collection`, `customer_creation`, `payment_intent_data`, `shipping_options`, `submit_type`, and `tax_id_collection` on `PaymentLink`
+ * Add support for `description` on `Subscription`
+
+## 8.0.0 - 2022-05-09
+* [#1283](https://github.com/stripe/stripe-php/pull/1283) Major version release of v8.0.0. The [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-Guide-for-v8) contains more information.
+ (⚠️ = breaking changes):
+ * ⚠️ Replace the legacy `Order` API with the new `Order` API.
+ * Resource modified: `Order`.
+ * New methods: `cancel`, `list_line_items`, `reopen`, and `submit`
+ * Removed methods: `pay` and `return_order`
+ * Removed resources: `OrderItem` and `OrderReturn`
+ * Removed references from other resources: `Charge.order`
+ * ⚠️ Rename `\FinancialConnections\Account.refresh` method to `\FinancialConnections\Account.refresh_account`
+ * Add support for `amount_discount`, `amount_tax`, and `product` on `LineItem`
+
+## 7.128.0 - 2022-05-05
+* [#1282](https://github.com/stripe/stripe-php/pull/1282) API Updates
+ * Add support for `default_price` on `Product`
+ * Add support for `instructions_email` on `Refund`
+
+
+## 7.127.0 - 2022-05-05
+* [#1281](https://github.com/stripe/stripe-php/pull/1281) API Updates
+ * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
+* [#1278](https://github.com/stripe/stripe-php/pull/1278) Pin setup-php action version.
+* [#1277](https://github.com/stripe/stripe-php/pull/1277) API Updates
+ * Add support for `registered_address` on `Person`
+
+## 7.126.0 - 2022-05-03
+* [#1276](https://github.com/stripe/stripe-php/pull/1276) API Updates
+ * Add support for new resource `CashBalance`
+ * Change type of `BillingPortal.Configuration.application` from `$Application` to `deletable($Application)`
+ * Add support for `cash_balance` on `Customer`
+ * Add support for `application` on `Invoice`, `Quote`, `SubscriptionSchedule`, and `Subscription`
+ * Add support for new value `eu_oss_vat` on enum `TaxId.type`
+* [#1274](https://github.com/stripe/stripe-php/pull/1274) Fix PHPDoc on Discount for nullable properties
+* [#1272](https://github.com/stripe/stripe-php/pull/1272) Allow users to pass a custom IPRESOLVE cURL option.
+
+## 7.125.0 - 2022-04-21
+* [#1270](https://github.com/stripe/stripe-php/pull/1270) API Updates
+ * Add support for `expire` test helper method on resource `Refund`
+
+## 7.124.0 - 2022-04-18
+* [#1265](https://github.com/stripe/stripe-php/pull/1265) API Updates
+ * Add support for new resources `FundingInstructions` and `Terminal.Configuration`
+ * Add support for `create_funding_instructions` method on resource `Customer`
+ * Add support for `amount_details` on `PaymentIntent`
+ * Add support for `customer_balance` on `PaymentMethod`
+ * Add support for new value `customer_balance` on enum `PaymentMethod.type`
+ * Add support for `configuration_overrides` on `Terminal.Location`
+
+
+## 7.123.0 - 2022-04-13
+* [#1263](https://github.com/stripe/stripe-php/pull/1263) API Updates
+ * Add support for `increment_authorization` method on resource `PaymentIntent`
+* [#1262](https://github.com/stripe/stripe-php/pull/1262) Add support for updating the version of the repo
+* [#1230](https://github.com/stripe/stripe-php/pull/1230) Add PHPDoc return types
+* [#1242](https://github.com/stripe/stripe-php/pull/1242) Fix some PHPDoc in tests
+
+## 7.122.0 - 2022-04-08
+* [#1261](https://github.com/stripe/stripe-php/pull/1261) API Updates
+ * Add support for `apply_customer_balance` method on resource `PaymentIntent`
+* [#1259](https://github.com/stripe/stripe-php/pull/1259) API Updates
+
+ * Add `payment_intent.partially_funded`, `terminal.reader.action_failed`, and `terminal.reader.action_succeeded` events.
+
+## 7.121.0 - 2022-03-30
+* [#1258](https://github.com/stripe/stripe-php/pull/1258) API Updates
+ * Add support for `cancel_action`, `process_payment_intent`, `process_setup_intent`, and `set_reader_display` methods on resource `Terminal.Reader`
+ * Add support for `action` on `Terminal.Reader`
+
+## 7.120.0 - 2022-03-29
+* [#1257](https://github.com/stripe/stripe-php/pull/1257) API Updates
+ * Add support for Search API
+ * Add support for `search` method on resources `Charge`, `Customer`, `Invoice`, `PaymentIntent`, `Price`, `Product`, and `Subscription`
+
+## 7.119.0 - 2022-03-25
+* [#1256](https://github.com/stripe/stripe-php/pull/1256) API Updates
+ * Add support for PayNow and US Bank Accounts Debits payments
+ * Add support for `paynow` and `us_bank_account` on `PaymentMethod`
+ * Add support for new values `paynow` and `us_bank_account` on enum `PaymentMethod.type`
+ * Add support for `failure_balance_transaction` on `Charge`
+
+## 7.118.0 - 2022-03-23
+* [#1255](https://github.com/stripe/stripe-php/pull/1255) API Updates
+ * Add support for `cancel` method on resource `Refund`
+ * Add support for new values `bg_uic`, `hu_tin`, and `si_tin` on enum `TaxId.type`
+ * Add `test_helpers.test_clock.advancing`, `test_helpers.test_clock.created`, `test_helpers.test_clock.deleted`, `test_helpers.test_clock.internal_failure`, and `test_helpers.test_clock.ready` events.
+
+
+## 7.117.0 - 2022-03-18
+* [#1254](https://github.com/stripe/stripe-php/pull/1254) API Updates
+ * Add support for `status` on `Card`
+* [#1251](https://github.com/stripe/stripe-php/pull/1251) Add support for SearchResult objects.
+* [#1249](https://github.com/stripe/stripe-php/pull/1249) Add missing constant for payment_behavior
+
+## 7.116.0 - 2022-03-02
+* [#1248](https://github.com/stripe/stripe-php/pull/1248) API Updates
+ * Add support for `proration_details` on `InvoiceLineItem`
+
+
+## 7.115.0 - 2022-03-01
+* [#1245](https://github.com/stripe/stripe-php/pull/1245) [#1247](https://github.com/stripe/stripe-php/pull/1247) API Updates
+ * Add support for new resource `TestHelpers.TestClock`
+ * Add support for `test_clock` on `Customer`, `Invoice`, `InvoiceItem`, `Quote`, `Subscription`, and `SubscriptionSchedule`
+ * Add support for `next_action` on `Refund`
+ * Add support for `konbini` on `PaymentMethod`
+* [#1244](https://github.com/stripe/stripe-php/pull/1244) API Updates
+ * Add support for new values `bbpos_wisepad3` and `stripe_m2` on enum `Terminal.Reader.device_type`
+
+## 7.114.0 - 2022-02-15
+* [#1243](https://github.com/stripe/stripe-php/pull/1243) Add test
+* [#1240](https://github.com/stripe/stripe-php/pull/1240) API Updates
+ * Add support for `verify_microdeposits` method on resources `PaymentIntent` and `SetupIntent`
+* [#1241](https://github.com/stripe/stripe-php/pull/1241) Add generic parameter to \Stripe\Collection usages
+
+## 7.113.0 - 2022-02-03
+* [#1239](https://github.com/stripe/stripe-php/pull/1239) API Updates
+ * Add `REASON_EXPIRED_UNCAPTURED_CHARGE` enum value on `Refund`.
+
+## 7.112.0 - 2022-01-25
+* [#1235](https://github.com/stripe/stripe-php/pull/1235) API Updates
+ * Add support for `phone_number_collection` on `PaymentLink`
+ * Add support for new value `is_vat` on enum `TaxId.type`
+
+
+## 7.111.0 - 2022-01-20
+* [#1233](https://github.com/stripe/stripe-php/pull/1233) API Updates
+ * Add support for new resource `PaymentLink`
+ * Add support for `payment_link` on `Checkout.Session`
+
+## 7.110.0 - 2022-01-13
+* [#1232](https://github.com/stripe/stripe-php/pull/1232) API Updates
+ * Add support for `paid_out_of_band` on `Invoice`
+
+## 7.109.0 - 2022-01-12
+* [#1231](https://github.com/stripe/stripe-php/pull/1231) API Updates
+ * Add support for `customer_creation` on `Checkout.Session`
+* [#1227](https://github.com/stripe/stripe-php/pull/1227) Update docs URLs
+
+## 7.108.0 - 2021-12-22
+* [#1226](https://github.com/stripe/stripe-php/pull/1226) Upgrade php-cs-fixer to 3.4.0.
+* [#1222](https://github.com/stripe/stripe-php/pull/1222) API Updates
+ * Add support for `processing` on `PaymentIntent`
+* [#1220](https://github.com/stripe/stripe-php/pull/1220) API Updates
+
+## 7.107.0 - 2021-12-09
+* [#1219](https://github.com/stripe/stripe-php/pull/1219) API Updates
+ * Add support for `metadata` on `BillingPortal.Configuration`
+ * Add support for `wallets` on `Issuing.Card`
+
+## 7.106.0 - 2021-12-09
+* [#1218](https://github.com/stripe/stripe-php/pull/1218) API Updates
+ * Add support for new values `ge_vat` and `ua_vat` on enum `TaxId.type`
+* [#1216](https://github.com/stripe/stripe-php/pull/1216) Fix namespaced classes in @return PHPDoc.
+* [#1214](https://github.com/stripe/stripe-php/pull/1214) Announce PHP8 support in CHANGELOG.md
+
+## 7.105.0 - 2021-12-06
+* [#1213](https://github.com/stripe/stripe-php/pull/1213) PHP 8.1 missing ReturnTypeWillChange annotations.
+* As of this version, PHP 8.1 is officially supported.
+
+## 7.104.0 - 2021-12-01
+* [#1211](https://github.com/stripe/stripe-php/pull/1211) PHPStan compatibility with PHP8.x
+* [#1209](https://github.com/stripe/stripe-php/pull/1209) PHPUnit compatibility with PHP 8.x
+
+## 7.103.0 - 2021-11-19
+* [#1206](https://github.com/stripe/stripe-php/pull/1206) API Updates
+ * Add support for new value `jct` on enum `TaxRate.tax_type`
+
+## 7.102.0 - 2021-11-17
+* [#1205](https://github.com/stripe/stripe-php/pull/1205) API Updates
+ * Add support for `automatic_payment_methods` on `PaymentIntent`
+
+## 7.101.0 - 2021-11-16
+* [#1203](https://github.com/stripe/stripe-php/pull/1203) API Updates
+ * Add support for new resource `ShippingRate`
+ * Add support for `shipping_options` and `shipping_rate` on `Checkout.Session`
+ * Add support for `expire` method on resource `Checkout.Session`
+ * Add support for `status` on `Checkout.Session`
+
+## 7.100.0 - 2021-10-11
+* [#1190](https://github.com/stripe/stripe-php/pull/1190) API Updates
+ * Add support for `klarna` on `PaymentMethod`.
+
+## 7.99.0 - 2021-10-11
+* [#1188](https://github.com/stripe/stripe-php/pull/1188) API Updates
+ * Add support for `list_payment_methods` method on resource `Customer`
+
+## 7.98.0 - 2021-10-07
+* [#1187](https://github.com/stripe/stripe-php/pull/1187) API Updates
+ * Add support for `phone_number_collection` on `Checkout.Session`
+ * Add support for new value `customer_id` on enum `Radar.ValueList.item_type`
+ * Add support for new value `bbpos_wisepos_e` on enum `Terminal.Reader.device_type`
+
+## 7.97.0 - 2021-09-16
+* [#1181](https://github.com/stripe/stripe-php/pull/1181) API Updates
+ * Add support for `full_name_aliases` on `Person`
+
+## 7.96.0 - 2021-09-15
+* [#1178](https://github.com/stripe/stripe-php/pull/1178) API Updates
+ * Add support for livemode on Reporting.ReportType
+ * Add support for new value `rst` on enum `TaxRate.tax_type`
+
+## 7.95.0 - 2021-09-01
+* [#1177](https://github.com/stripe/stripe-php/pull/1177) API Updates
+ * Add support for `future_requirements` on `Account`, `Capability`, and `Person`
+ * Add support for `after_expiration`, `consent`, `consent_collection`, `expires_at`, and `recovered_from` on `Checkout.Session`
+
+## 7.94.0 - 2021-08-19
+* [#1173](https://github.com/stripe/stripe-php/pull/1173) API Updates
+ * Add support for new value `fil` on enum `Checkout.Session.locale`
+ * Add support for new value `au_arn` on enum `TaxId.type`
+
+## 7.93.0 - 2021-08-11
+* [#1172](https://github.com/stripe/stripe-php/pull/1172) API Updates
+ * Add support for `locale` on `BillingPortal.Session`
+
+* [#1171](https://github.com/stripe/stripe-php/pull/1171) Fix typo in docblock `CurlClient::executeStreamingRequestWithRetries`
+
+## 7.92.0 - 2021-07-28
+* [#1167](https://github.com/stripe/stripe-php/pull/1167) API Updates
+ * Add support for `account_type` on `BankAccount`
+ * Add support for new value `redacted` on enum `Review.closed_reason`
+
+## 7.91.0 - 2021-07-22
+* [#1164](https://github.com/stripe/stripe-php/pull/1164) API Updates
+ * Add support for new values `hr`, `ko`, and `vi` on enum `Checkout.Session.locale`
+ * Add support for `payment_settings` on `Subscription`
+
+## 7.90.0 - 2021-07-20
+* [#1163](https://github.com/stripe/stripe-php/pull/1163) API Updates
+ * Add support for `wallet` on `Issuing.Transaction`
+* [#1160](https://github.com/stripe/stripe-php/pull/1160) Remove unused API error types from docs.
+
+## 7.89.0 - 2021-07-14
+* [#1158](https://github.com/stripe/stripe-php/pull/1158) API Updates
+ * Add support for `list_computed_upfront_line_items` method on resource `Quote`
+* [#1157](https://github.com/stripe/stripe-php/pull/1157) Improve readme for old PHP versions
+
+## 7.88.0 - 2021-07-09
+* [#1152](https://github.com/stripe/stripe-php/pull/1152) API Updates
+ * Add support for new resource `Quote`
+ * Add support for `quote` on `Invoice`
+ * Add support for new value `quote_accept` on enum `Invoice.billing_reason`
+* [#1155](https://github.com/stripe/stripe-php/pull/1155) Add streaming methods to Service infra
+ * Add support for `setStreamingHttpClient` and `streamingHttpClient` to `ApiRequestor`
+ * Add support for `getStreamingClient` and `requestStream` to `AbstractService`
+ * Add support for `requestStream` to `BaseStripeClient`
+ * `\Stripe\RequestOptions::parse` now clones its input if it is already a `RequestOptions` object, to prevent accidental mutation.
+* [#1151](https://github.com/stripe/stripe-php/pull/1151) Add `mode` constants into Checkout\Session
+
+## 7.87.0 - 2021-06-30
+* [#1149](https://github.com/stripe/stripe-php/pull/1149) API Updates
+ * Add support for `wechat_pay` on `PaymentMethod`
+* [#1143](https://github.com/stripe/stripe-php/pull/1143) Streaming requests
+* [#1138](https://github.com/stripe/stripe-php/pull/1138) Deprecate travis
+
+## 7.86.0 - 2021-06-25
+* [#1145](https://github.com/stripe/stripe-php/pull/1145) API Updates
+ * Add support for `boleto` on `PaymentMethod`.
+ * Add support for `il_vat` as a member of the `TaxID.Type` enum.
+
+## 7.85.0 - 2021-06-18
+* [#1142](https://github.com/stripe/stripe-php/pull/1142) API Updates
+ * Add support for new TaxId types: `ca_pst_mb`, `ca_pst_bc`, `ca_gst_hst`, and `ca_pst_sk`.
+
+## 7.84.0 - 2021-06-16
+* [#1141](https://github.com/stripe/stripe-php/pull/1141) Update PHPDocs
+ * Add support for `url` on `Checkout\Session`
+
+
+## 7.83.0 - 2021-06-07
+* [#1140](https://github.com/stripe/stripe-php/pull/1140) API Updates
+ * Added support for `tax_id_collection` on `Checkout\Session` and `Checkout\Session#create`
+ * Update `Location` to be expandable on `Terminal\Reader`
+
+## 7.82.0 - 2021-06-04
+* [#1136](https://github.com/stripe/stripe-php/pull/1136) Update PHPDocs
+ * Add support for `controller` on `Account`.
+
+## 7.81.0 - 2021-06-04
+* [#1135](https://github.com/stripe/stripe-php/pull/1135) API Updates
+ * Add support for new resource `TaxCode`
+ * Add support for `automatic_tax` `Invoice` and`Checkout.Session`.
+ * Add support for `tax_behavior` on `Price`
+ * Add support for `tax_code` on `Product`
+ * Add support for `tax` on `Customer`
+ * Add support for `tax_type` enum on `TaxRate`
+
+## 7.80.0 - 2021-05-26
+* [#1130](https://github.com/stripe/stripe-php/pull/1130) Update PHPDocs
+
+## 7.79.0 - 2021-05-19
+* [#1126](https://github.com/stripe/stripe-php/pull/1126) API Updates
+ * Added support for new resource `Identity.VerificationReport`
+ * Added support for new resource `Identity.VerificationSession`
+ * `File#list.purpose` and `File.purpose` added new enum members: `identity_document_downloadable` and `selfie`.
+
+## 7.78.0 - 2021-05-05
+* [#1120](https://github.com/stripe/stripe-php/pull/1120) Update PHPDocs
+ * Add support for `Radar.EarlyFraudWarning.payment_intent`
+
+## 7.77.0 - 2021-04-12
+* [#1110](https://github.com/stripe/stripe-php/pull/1110) Update PHPDocs
+ * Add support for `acss_debit` on `PaymentMethod`
+ * Add support for `payment_method_options` on `Checkout\Session`
+* [#1107](https://github.com/stripe/stripe-php/pull/1107) Remove duplicate object phpdoc
+
+## 7.76.0 - 2021-03-22
+* [#1100](https://github.com/stripe/stripe-php/pull/1100) Update PHPDocs
+ * Added support for `amount_shipping` on `Checkout.Session.total_details`
+* [#1088](https://github.com/stripe/stripe-php/pull/1088) Make possibility to extend CurlClient
+
+## 7.75.0 - 2021-02-22
+* [#1094](https://github.com/stripe/stripe-php/pull/1094) Add support for Billing Portal Configuration API
+
+## 7.74.0 - 2021-02-17
+* [#1093](https://github.com/stripe/stripe-php/pull/1093) Update PHPDocs
+ * Add support for on_behalf_of to Invoice
+
+## 7.73.0 - 2021-02-16
+* [#1091](https://github.com/stripe/stripe-php/pull/1091) Update PHPDocs
+ * Add support for `afterpay_clearpay` on `PaymentMethod`.
+
+## 7.72.0 - 2021-02-08
+* [#1089](https://github.com/stripe/stripe-php/pull/1089) Update PHPDocs
+ * Add support for `afterpay_clearpay_payments` on `Account.capabilities`
+ * Add support for `payment_settings` on `Invoice`
+
+## 7.71.0 - 2021-02-05
+* [#1087](https://github.com/stripe/stripe-php/pull/1087) Update PHPDocs
+* [#1086](https://github.com/stripe/stripe-php/pull/1086) Update CA cert bundle URL
+
+## 7.70.0 - 2021-02-03
+* [#1085](https://github.com/stripe/stripe-php/pull/1085) Update PHPDocs
+ * Add support for `nationality` on `Person`
+ * Add member `gb_vat` of `TaxID` enum
+
+
+## 7.69.0 - 2021-01-21
+* [#1079](https://github.com/stripe/stripe-php/pull/1079) Update PHPDocs
+
+## 7.68.0 - 2021-01-14
+* [#1063](https://github.com/stripe/stripe-php/pull/1063) Multiple API changes
+* [#1061](https://github.com/stripe/stripe-php/pull/1061) Bump phpDocumentor to 3.0.0
+
+## 7.67.0 - 2020-12-09
+* [#1060](https://github.com/stripe/stripe-php/pull/1060) Improve PHPDocs for `Discount`
+* [#1059](https://github.com/stripe/stripe-php/pull/1059) Upgrade PHPStan to 0.12.59
+* [#1057](https://github.com/stripe/stripe-php/pull/1057) Bump PHP-CS-Fixer and update code
+
+## 7.66.1 - 2020-12-01
+* [#1054](https://github.com/stripe/stripe-php/pull/1054) Improve error message for invalid keys in StripeClient
+
+## 7.66.0 - 2020-11-24
+* [#1053](https://github.com/stripe/stripe-php/pull/1053) Update PHPDocs
+
+## 7.65.0 - 2020-11-19
+* [#1050](https://github.com/stripe/stripe-php/pull/1050) Added constants for `proration_behavior` on `Subscription`
+
+## 7.64.0 - 2020-11-18
+* [#1049](https://github.com/stripe/stripe-php/pull/1049) Update PHPDocs
+
+## 7.63.0 - 2020-11-17
+* [#1048](https://github.com/stripe/stripe-php/pull/1048) Update PHPDocs
+* [#1046](https://github.com/stripe/stripe-php/pull/1046) Force IPv4 resolving
+
+## 7.62.0 - 2020-11-09
+* [#1041](https://github.com/stripe/stripe-php/pull/1041) Add missing constants on `Event`
+* [#1038](https://github.com/stripe/stripe-php/pull/1038) Update PHPDocs
+
+## 7.61.0 - 2020-10-20
+* [#1030](https://github.com/stripe/stripe-php/pull/1030) Add support for `jp_rn` and `ru_kpp` as a `type` on `TaxId`
+
+## 7.60.0 - 2020-10-15
+* [#1027](https://github.com/stripe/stripe-php/pull/1027) Warn if opts are in params
+
+## 7.58.0 - 2020-10-14
+* [#1026](https://github.com/stripe/stripe-php/pull/1026) Add support for the Payout Reverse API
+
+## 7.57.0 - 2020-09-29
+* [#1020](https://github.com/stripe/stripe-php/pull/1020) Add support for the `SetupAttempt` resource and List API
+
+## 7.56.0 - 2020-09-25
+* [#1019](https://github.com/stripe/stripe-php/pull/1019) Update PHPDocs
+
+## 7.55.0 - 2020-09-24
+* [#1018](https://github.com/stripe/stripe-php/pull/1018) Multiple API changes
+ * Updated PHPDocs
+ * Added `TYPE_CONTRIBUTION` as a constant on `BalanceTransaction`
+
+## 7.54.0 - 2020-09-23
+* [#1017](https://github.com/stripe/stripe-php/pull/1017) Updated PHPDoc
+
+## 7.53.1 - 2020-09-22
+* [#1015](https://github.com/stripe/stripe-php/pull/1015) Bugfix: don't error on systems with php_uname in disablefunctions with whitespace
+
+## 7.53.0 - 2020-09-21
+* [#1016](https://github.com/stripe/stripe-php/pull/1016) Updated PHPDocs
+
+## 7.52.0 - 2020-09-08
+* [#1010](https://github.com/stripe/stripe-php/pull/1010) Update PHPDocs
+
+## 7.51.0 - 2020-09-02
+* [#1007](https://github.com/stripe/stripe-php/pull/1007) Multiple API changes
+ * Add support for the Issuing Dispute Submit API
+ * Add constants for `payment_status` on Checkout `Session`
+* [#1003](https://github.com/stripe/stripe-php/pull/1003) Add trim to getSignatures to allow for leading whitespace.
+
+## 7.50.0 - 2020-08-28
+* [#1005](https://github.com/stripe/stripe-php/pull/1005) Updated PHPDocs
+
+## 7.49.0 - 2020-08-19
+* [#998](https://github.com/stripe/stripe-php/pull/998) PHPDocs updated
+
+## 7.48.0 - 2020-08-17
+* [#997](https://github.com/stripe/stripe-php/pull/997) PHPDocs updated
+* [#996](https://github.com/stripe/stripe-php/pull/996) Fixing telemetry
+
+## 7.47.0 - 2020-08-13
+* [#994](https://github.com/stripe/stripe-php/pull/994) Nullable balance_transactions on issuing disputes
+* [#991](https://github.com/stripe/stripe-php/pull/991) Fix invalid return types in OAuthService
+
+## 7.46.1 - 2020-08-07
+* [#990](https://github.com/stripe/stripe-php/pull/990) PHPdoc changes
+
+## 7.46.0 - 2020-08-05
+* [#989](https://github.com/stripe/stripe-php/pull/989) Add support for the `PromotionCode` resource and APIs
+
+## 7.45.0 - 2020-07-28
+* [#981](https://github.com/stripe/stripe-php/pull/981) PHPdoc updates
+
+## 7.44.0 - 2020-07-20
+* [#948](https://github.com/stripe/stripe-php/pull/948) Add `first()` and `last()` functions to `Collection`
+
+## 7.43.0 - 2020-07-17
+* [#975](https://github.com/stripe/stripe-php/pull/975) Add support for `political_exposure` on `Person`
+
+## 7.42.0 - 2020-07-15
+* [#974](https://github.com/stripe/stripe-php/pull/974) Add new constants for `purpose` on `File`
+
+## 7.41.1 - 2020-07-15
+* [#973](https://github.com/stripe/stripe-php/pull/973) Multiple PHPDoc fixes
+
+## 7.41.0 - 2020-07-14
+* [#971](https://github.com/stripe/stripe-php/pull/971) Adds enum values for `billing_address_collection` on Checkout `Session`
+
+## 7.40.0 - 2020-07-06
+* [#964](https://github.com/stripe/stripe-php/pull/964) Add OAuthService
+
+## 7.39.0 - 2020-06-25
+* [#960](https://github.com/stripe/stripe-php/pull/960) Add constants for `payment_behavior` on `Subscription`
+
+## 7.38.0 - 2020-06-24
+* [#959](https://github.com/stripe/stripe-php/pull/959) Add multiple constants missing for `Event`
+
+## 7.37.2 - 2020-06-23
+* [#957](https://github.com/stripe/stripe-php/pull/957) Updated PHPDocs
+
+## 7.37.1 - 2020-06-11
+* [#952](https://github.com/stripe/stripe-php/pull/952) Improve PHPDoc
+
+## 7.37.0 - 2020-06-09
+* [#950](https://github.com/stripe/stripe-php/pull/950) Add support for `id_npwp` and `my_frp` as `type` on `TaxId`
+
+## 7.36.2 - 2020-06-03
+* [#946](https://github.com/stripe/stripe-php/pull/946) Update PHPDoc
+
+## 7.36.1 - 2020-05-28
+* [#938](https://github.com/stripe/stripe-php/pull/938) Remove extra array_keys() call.
+* [#942](https://github.com/stripe/stripe-php/pull/942) fix autopagination for service methods
+
+## 7.36.0 - 2020-05-21
+* [#937](https://github.com/stripe/stripe-php/pull/937) Add support for `ae_trn`, `cl_tin` and `sa_vat` as `type` on `TaxId`
+
+## 7.35.0 - 2020-05-20
+* [#936](https://github.com/stripe/stripe-php/pull/936) Add `anticipation_repayment` as a `type` on `BalanceTransaction`
+
+## 7.34.0 - 2020-05-18
+* [#934](https://github.com/stripe/stripe-php/pull/934) Add support for `issuing_dispute` as a `type` on `BalanceTransaction`
+
+## 7.33.1 - 2020-05-15
+* [#933](https://github.com/stripe/stripe-php/pull/933) Services bugfix: convert nested null params to empty strings
+
+## 7.33.0 - 2020-05-14
+* [#771](https://github.com/stripe/stripe-php/pull/771) Introduce client/services API. The [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-to-StripeClient-and-services-in-7.33.0) contains before & after examples of the backwards-compatible changes.
+
+## 7.32.1 - 2020-05-13
+* [#932](https://github.com/stripe/stripe-php/pull/932) Fix multiple PHPDoc
+
+## 7.32.0 - 2020-05-11
+* [#931](https://github.com/stripe/stripe-php/pull/931) Add support for the `LineItem` resource and APIs
+
+## 7.31.0 - 2020-05-01
+* [#927](https://github.com/stripe/stripe-php/pull/927) Add support for new tax IDs
+
+## 7.30.0 - 2020-04-29
+* [#924](https://github.com/stripe/stripe-php/pull/924) Add support for the `Price` resource and APIs
+
+## 7.29.0 - 2020-04-22
+* [#920](https://github.com/stripe/stripe-php/pull/920) Add support for the `Session` resource and APIs on the `BillingPortal` namespace
+
+## 7.28.1 - 2020-04-10
+* [#915](https://github.com/stripe/stripe-php/pull/915) Improve PHPdocs for many classes
+
+## 7.28.0 - 2020-04-03
+* [#912](https://github.com/stripe/stripe-php/pull/912) Preserve backwards compatibility for typoed `TYPE_ADJUSTEMENT` enum.
+* [#911](https://github.com/stripe/stripe-php/pull/911) Codegenerated PHPDoc for nested resources
+* [#902](https://github.com/stripe/stripe-php/pull/902) Update docstrings for nested resources
+
+## 7.27.3 - 2020-03-18
+* [#899](https://github.com/stripe/stripe-php/pull/899) Convert keys to strings in `StripeObject::toArray()`
+
+## 7.27.2 - 2020-03-13
+* [#894](https://github.com/stripe/stripe-php/pull/894) Multiple PHPDocs changes
+
+## 7.27.1 - 2020-03-03
+* [#890](https://github.com/stripe/stripe-php/pull/890) Update PHPdoc
+
+## 7.27.0 - 2020-02-28
+* [#889](https://github.com/stripe/stripe-php/pull/889) Add new constants for `type` on `TaxId`
+
+## 7.26.0 - 2020-02-26
+* [#886](https://github.com/stripe/stripe-php/pull/886) Add support for listing Checkout `Session`
+* [#883](https://github.com/stripe/stripe-php/pull/883) Add PHPDoc class descriptions
+
+## 7.25.0 - 2020-02-14
+* [#879](https://github.com/stripe/stripe-php/pull/879) Make `\Stripe\Collection` implement `\Countable`
+* [#875](https://github.com/stripe/stripe-php/pull/875) Last set of PHP-CS-Fixer updates
+* [#874](https://github.com/stripe/stripe-php/pull/874) Enable php_unit_internal_class rule
+* [#873](https://github.com/stripe/stripe-php/pull/873) Add support for phpDocumentor in Makefile
+* [#872](https://github.com/stripe/stripe-php/pull/872) Another batch of PHP-CS-Fixer rule updates
+* [#871](https://github.com/stripe/stripe-php/pull/871) Fix a few PHPDoc comments
+* [#870](https://github.com/stripe/stripe-php/pull/870) More PHP-CS-Fixer tweaks
+
+## 7.24.0 - 2020-02-10
+* [#862](https://github.com/stripe/stripe-php/pull/862) Better PHPDoc
+* [#865](https://github.com/stripe/stripe-php/pull/865) Get closer to `@PhpCsFixer` standard ruleset
+
+## 7.23.0 - 2020-02-05
+* [#860](https://github.com/stripe/stripe-php/pull/860) Add PHPDoc types for expandable fields
+* [#858](https://github.com/stripe/stripe-php/pull/858) Use `native_function_invocation` PHPStan rule
+* [#857](https://github.com/stripe/stripe-php/pull/857) Update PHPDoc on nested resources
+* [#855](https://github.com/stripe/stripe-php/pull/855) PHPDoc: `StripeObject` -> `ErrorObject` where appropriate
+* [#837](https://github.com/stripe/stripe-php/pull/837) Autogen diff
+* [#854](https://github.com/stripe/stripe-php/pull/854) Upgrade PHPStan and fix settings
+* [#850](https://github.com/stripe/stripe-php/pull/850) Yet more PHPDoc updates
+
+## 7.22.0 - 2020-01-31
+* [#849](https://github.com/stripe/stripe-php/pull/849) Add new constants for `type` on `TaxId`
+* [#843](https://github.com/stripe/stripe-php/pull/843) Even more PHPDoc fixes
+* [#841](https://github.com/stripe/stripe-php/pull/841) More PHPDoc fixes
+
+## 7.21.1 - 2020-01-29
+* [#840](https://github.com/stripe/stripe-php/pull/840) Update phpdocs across multiple resources.
+
+## 7.21.0 - 2020-01-28
+* [#839](https://github.com/stripe/stripe-php/pull/839) Add support for `TYPE_ES_CIF` on `TaxId`
+
+## 7.20.0 - 2020-01-23
+* [#836](https://github.com/stripe/stripe-php/pull/836) Add new type values for `TaxId`
+
+## 7.19.1 - 2020-01-14
+* [#831](https://github.com/stripe/stripe-php/pull/831) Fix incorrect `UnexpectedValueException` instantiation
+
+## 7.19.0 - 2020-01-14
+* [#830](https://github.com/stripe/stripe-php/pull/830) Add support for `CreditNoteLineItem`
+
+## 7.18.0 - 2020-01-13
+* [#829](https://github.com/stripe/stripe-php/pull/829) Don't call php_uname function if disabled by php.ini
+
+## 7.17.0 - 2020-01-08
+* [#821](https://github.com/stripe/stripe-php/pull/821) Improve PHPDoc types for `ApiErrorException.get/setJsonBody()` methods
+
+## 7.16.0 - 2020-01-06
+* [#826](https://github.com/stripe/stripe-php/pull/826) Rename remaining `$options` to `$opts`
+* [#825](https://github.com/stripe/stripe-php/pull/825) Update PHPDoc
+
+## 7.15.0 - 2020-01-06
+* [#824](https://github.com/stripe/stripe-php/pull/824) Add constant `TYPE_SG_UEN` to `TaxId`
+
+## 7.14.2 - 2019-12-04
+* [#816](https://github.com/stripe/stripe-php/pull/816) Disable autoloader when checking for `Throwable`
+
+## 7.14.1 - 2019-11-26
+* [#812](https://github.com/stripe/stripe-php/pull/812) Fix invalid PHPdoc on `Subscription`
+
+## 7.14.0 - 2019-11-26
+* [#811](https://github.com/stripe/stripe-php/pull/811) Add support for `CreditNote` preview.
+
+## 7.13.0 - 2019-11-19
+* [#808](https://github.com/stripe/stripe-php/pull/808) Add support for listing lines on an Invoice directly via `Invoice::allLines()`
+
+## 7.12.0 - 2019-11-08
+
+- [#805](https://github.com/stripe/stripe-php/pull/805) Add Source::allSourceTransactions and SubscriptionItem::allUsageRecordSummaries
+- [#798](https://github.com/stripe/stripe-php/pull/798) The argument of `array_key_exists` cannot be `null`
+- [#803](https://github.com/stripe/stripe-php/pull/803) Removed unwanted got
+
+## 7.11.0 - 2019-11-06
+
+- [#797](https://github.com/stripe/stripe-php/pull/797) Add support for reverse pagination
+
+## 7.10.0 - 2019-11-05
+
+- [#795](https://github.com/stripe/stripe-php/pull/795) Add support for `Mandate`
+
+## 7.9.0 - 2019-11-05
+
+- [#794](https://github.com/stripe/stripe-php/pull/794) Add PHPDoc to `ApiResponse`
+- [#792](https://github.com/stripe/stripe-php/pull/792) Use single quotes for `OBJECT_NAME` constants
+
+## 7.8.0 - 2019-11-05
+
+- [#790](https://github.com/stripe/stripe-php/pull/790) Mark nullable fields in PHPDoc
+- [#788](https://github.com/stripe/stripe-php/pull/788) Early codegen fixes
+- [#787](https://github.com/stripe/stripe-php/pull/787) Use PHPStan in Travis CI
+
+## 7.7.1 - 2019-10-25
+
+- [#781](https://github.com/stripe/stripe-php/pull/781) Fix telemetry header
+- [#780](https://github.com/stripe/stripe-php/pull/780) Contributor Convenant
+
+## 7.7.0 - 2019-10-23
+
+- [#776](https://github.com/stripe/stripe-php/pull/776) Add `CAPABILITY_TRANSFERS` to `Account`
+- [#778](https://github.com/stripe/stripe-php/pull/778) Add support for `TYPE_MX_RFC` type on `TaxId`
+
+## 7.6.0 - 2019-10-22
+
+- [#770](https://github.com/stripe/stripe-php/pull/770) Add missing constants for Customer's `TaxId`
+
+## 7.5.0 - 2019-10-18
+
+- [#768](https://github.com/stripe/stripe-php/pull/768) Redact API key in `RequestOptions` debug info
+
+## 7.4.0 - 2019-10-15
+
+- [#764](https://github.com/stripe/stripe-php/pull/764) Add support for HTTP request monitoring callback
+
+## 7.3.1 - 2019-10-07
+
+- [#755](https://github.com/stripe/stripe-php/pull/755) Respect Stripe-Should-Retry and Retry-After headers
+
+## 7.3.0 - 2019-10-02
+
+- [#752](https://github.com/stripe/stripe-php/pull/752) Add `payment_intent.canceled` and `setup_intent.canceled` events
+- [#749](https://github.com/stripe/stripe-php/pull/749) Call `toArray()` on objects only
+
+## 7.2.2 - 2019-09-24
+
+- [#746](https://github.com/stripe/stripe-php/pull/746) Add missing decline codes
+
+## 7.2.1 - 2019-09-23
+
+- [#744](https://github.com/stripe/stripe-php/pull/744) Added new PHPDoc
+
+## 7.2.0 - 2019-09-17
+
+- [#738](https://github.com/stripe/stripe-php/pull/738) Added missing constants for `SetupIntent` events
+
+## 7.1.1 - 2019-09-16
+
+- [#737](https://github.com/stripe/stripe-php/pull/737) Added new PHPDoc
+
+## 7.1.0 - 2019-09-13
+
+- [#736](https://github.com/stripe/stripe-php/pull/736) Make `CaseInsensitiveArray` countable and traversable
+
+## 7.0.2 - 2019-09-06
+
+- [#729](https://github.com/stripe/stripe-php/pull/729) Fix usage of `SignatureVerificationException` in PHPDoc blocks
+
+## 7.0.1 - 2019-09-05
+
+- [#728](https://github.com/stripe/stripe-php/pull/728) Clean up Collection
+
+## 7.0.0 - 2019-09-03
+
+Major version release. The [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v7) contains a detailed list of backwards-incompatible changes with upgrade instructions.
+
+Pull requests included in this release (cf. [#552](https://github.com/stripe/stripe-php/pull/552)) (⚠️ = breaking changes):
+
+- ⚠️ Drop support for PHP 5.4 ([#551](https://github.com/stripe/stripe-php/pull/551))
+- ⚠️ Drop support for PHP 5.5 ([#554](https://github.com/stripe/stripe-php/pull/554))
+- Bump dependencies ([#553](https://github.com/stripe/stripe-php/pull/553))
+- Remove `CURLFile` check ([#555](https://github.com/stripe/stripe-php/pull/555))
+- Update constant definitions for PHP >= 5.6 ([#556](https://github.com/stripe/stripe-php/pull/556))
+- ⚠️ Remove `FileUpload` alias ([#557](https://github.com/stripe/stripe-php/pull/557))
+- Remove `curl_reset` check ([#570](https://github.com/stripe/stripe-php/pull/570))
+- Use `\Stripe\application, which includes Custom accounts, the properties below are always
+ * returned.
+ *
+ * For accounts where controller.requirement_collection
+ * is stripe, which includes Standard and Express accounts, some properties are only returned
+ * until you create an Account Link or Account Session
+ * to start Connect Onboarding. Learn about the differences between accounts.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|\Stripe\StripeObject $business_profile Business information about the account.
- * @property null|string $business_type The business type.
- * @property \Stripe\StripeObject $capabilities
- * @property bool $charges_enabled Whether the account can create live charges.
- * @property \Stripe\StripeObject $company
- * @property \Stripe\StripeObject $controller
- * @property string $country The account's country.
- * @property int $created Time at which the account was connected. Measured in seconds since the Unix epoch.
- * @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that Stripe supports in the account's country.
- * @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.
- * @property null|string $email An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.
- * @property \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account
- * @property \Stripe\StripeObject $future_requirements
- * @property \Stripe\Person $individual This is an object representing a person associated with a Stripe account.
A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.
Related guide: Handling Identity Verification with the API.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - * @property bool $payouts_enabled Whether Stripe can send payouts to this account. - * @property \Stripe\StripeObject $requirements + * @property null|string $business_type The business type. After you create an Account Link or Account Session, this property is only returned for accounts where controller.requirement_collection isapplication, which includes Custom accounts.
+ * @property null|\Stripe\StripeObject $capabilities
+ * @property null|bool $charges_enabled Whether the account can process charges.
+ * @property null|\Stripe\StripeObject $company
+ * @property null|\Stripe\StripeObject $controller
+ * @property null|string $country The account's country.
+ * @property null|int $created Time at which the account was connected. Measured in seconds since the Unix epoch.
+ * @property null|string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that Stripe supports in the account's country.
+ * @property null|bool $details_submitted Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to an onboarding flow to finish submitting account details.
+ * @property null|string $email An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform.
+ * @property null|\Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where controller[is_controller] is true.
+ * @property null|\Stripe\StripeObject $future_requirements
+ * @property null|\Stripe\StripeObject $groups The groups associated with the account.
+ * @property null|\Stripe\Person $individual This is an object representing a person associated with a Stripe account.
A platform cannot access a person for an account where account.controller.requirement_collection is stripe, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
See the Standard onboarding or Express onboarding documentation for information about prefilling information and account onboarding steps. Learn more about handling identity verification with the API.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|bool $payouts_enabled Whether the funds in this account can be paid out. + * @property null|\Stripe\StripeObject $requirements * @property null|\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe. - * @property \Stripe\StripeObject $tos_acceptance - * @property string $type The Stripe account type. Can bestandard, express, or custom.
+ * @property null|\Stripe\StripeObject $tos_acceptance
+ * @property null|string $type The Stripe account type. Can be standard, express, custom, or none.
*/
class Account extends ApiResource
{
const OBJECT_NAME = 'account';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
use ApiOperations\NestedResource;
use ApiOperations\Update;
@@ -53,8 +56,132 @@ class Account extends ApiResource
const TYPE_CUSTOM = 'custom';
const TYPE_EXPRESS = 'express';
+ const TYPE_NONE = 'none';
const TYPE_STANDARD = 'standard';
+ /**
+ * With Connect, you can create Stripe accounts for
+ * your users. To do this, you’ll first need to register your
+ * platform.
+ *
+ * If you’ve already collected information for your connected accounts, you can prefill that information
+ * when creating the account. Connect Onboarding won’t ask for the prefilled
+ * information during account onboarding. You can prefill any information on the
+ * account.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Account the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * With Connect, you can delete accounts you manage.
+ *
+ * Test-mode accounts can be deleted at any time.
+ *
+ * Live-mode accounts where Stripe is responsible for negative account balances
+ * cannot be deleted, which includes Standard accounts. Live-mode accounts where
+ * your platform is liable for negative account balances, which includes Custom and
+ * Express accounts, can be deleted when all balances are zero.
+ *
+ * If you want to delete your own account, use the account information tab in
+ * your account settings instead.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Account the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Account> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Updates a connected account by setting the
+ * values of the parameters passed. Any parameters not provided are left unchanged.
+ *
+ * For accounts where controller.requirement_collection
+ * is application, which includes Custom accounts, you can update any
+ * information on the account.
+ *
+ * For accounts where controller.requirement_collection
+ * is stripe, which includes Standard and Express accounts, you can
+ * update all information until you create an Account
+ * Link or Account Session to start Connect
+ * onboarding, after which some properties can no longer be updated.
+ *
+ * To update your own account, use the Dashboard. Refer to our
+ * Connect documentation to learn
+ * more about updating accounts.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Account the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
use ApiOperations\Retrieve {
retrieve as protected _retrieve;
}
diff --git a/plugins/stripe-php/lib/AccountLink.php b/plugins/stripe-php/lib/AccountLink.php
new file mode 100644
index 00000000..339d0a1d
--- /dev/null
+++ b/plugins/stripe-php/lib/AccountLink.php
@@ -0,0 +1,45 @@
+Connect Onboarding
+ *
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property int $expires_at The timestamp at which this account link will expire.
+ * @property string $url The URL for the account link.
+ */
+class AccountLink extends ApiResource
+{
+ const OBJECT_NAME = 'account_link';
+
+ /**
+ * Creates an AccountLink object that includes a single-use Stripe URL that the
+ * platform can redirect their user to in order to take them through the Connect
+ * Onboarding flow.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\AccountLink the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/AccountSession.php b/plugins/stripe-php/lib/AccountSession.php
new file mode 100644
index 00000000..85b04c9b
--- /dev/null
+++ b/plugins/stripe-php/lib/AccountSession.php
@@ -0,0 +1,49 @@
+Connect embedded components
+ *
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property string $account The ID of the account the AccountSession was created for
+ * @property string $client_secret The client secret of this AccountSession. Used on the client to set up secure access to the given account.
The client secret can be used to provide access to account from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs to setup Connect embedded components and learn about how client_secret should be handled.
true if the object exists in live mode or the value false if the object exists in test mode.
+ */
+class AccountSession extends ApiResource
+{
+ const OBJECT_NAME = 'account_session';
+
+ /**
+ * Creates a AccountSession object that includes a single-use token that the
+ * platform can use on their front-end to grant client-side API access.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\AccountSession the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/ApiOperations/All.php b/plugins/stripe-php/lib/ApiOperations/All.php
new file mode 100644
index 00000000..f421f885
--- /dev/null
+++ b/plugins/stripe-php/lib/ApiOperations/All.php
@@ -0,0 +1,26 @@
+ 100, "
- . "'currency' => 'usd', 'source' => 'tok_1234'])\")";
+ . 'method calls. (HINT: an example call to create a charge '
+ . "would be: \"Stripe\\Charge::create(['amount' => 100, "
+ . "'currency' => 'usd', 'source' => 'tok_1234'])\")";
throw new \Stripe\Exception\InvalidArgumentException($message);
}
}
/**
- * @param string $method HTTP method ('get', 'post', etc.)
+ * @param 'delete'|'get'|'post' $method HTTP method ('get', 'post', etc.)
* @param string $url URL for the request
* @param array $params list of parameters for the request
* @param null|array|string $options
+ * @param string[] $usage names of tracked behaviors associated with this request
+ * @param 'v1'|'v2' $apiMode
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return array tuple containing (the JSON response, $options)
*/
- protected function _request($method, $url, $params = [], $options = null)
+ protected function _request($method, $url, $params = [], $options = null, $usage = [], $apiMode = 'v1')
{
$opts = $this->_opts->merge($options);
- list($resp, $options) = static::_staticRequest($method, $url, $params, $opts);
+ list($resp, $options) = static::_staticRequest($method, $url, $params, $opts, $usage, $apiMode);
$this->setLastResponse($resp);
return [$resp->json, $options];
}
/**
- * @param string $method HTTP method ('get', 'post', etc.)
+ * @param string $url URL for the request
+ * @param class-string< \Stripe\SearchResult|\Stripe\Collection > $resultClass indicating what type of paginated result is returned
+ * @param null|array $params list of parameters for the request
+ * @param null|array|string $options
+ * @param string[] $usage names of tracked behaviors associated with this request
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection|\Stripe\SearchResult
+ */
+ protected static function _requestPage($url, $resultClass, $params = null, $options = null, $usage = [])
+ {
+ self::_validateParams($params);
+
+ list($response, $opts) = static::_staticRequest('get', $url, $params, $options, $usage);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ if (!($obj instanceof $resultClass)) {
+ throw new \Stripe\Exception\UnexpectedValueException(
+ 'Expected type ' . $resultClass . ', got "' . \get_class($obj) . '" instead.'
+ );
+ }
+ $obj->setLastResponse($response);
+ $obj->setFilters($params);
+
+ return $obj;
+ }
+
+ /**
+ * @param 'delete'|'get'|'post' $method HTTP method ('get', 'post', etc.)
* @param string $url URL for the request
* @param callable $readBodyChunk function that will receive chunks of data from a successful request body
* @param array $params list of parameters for the request
* @param null|array|string $options
+ * @param string[] $usage names of tracked behaviors associated with this request
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
- protected function _requestStream($method, $url, $readBodyChunk, $params = [], $options = null)
+ protected function _requestStream($method, $url, $readBodyChunk, $params = [], $options = null, $usage = [])
{
$opts = $this->_opts->merge($options);
- static::_staticStreamingRequest($method, $url, $readBodyChunk, $params, $opts);
+ static::_staticStreamingRequest($method, $url, $readBodyChunk, $params, $opts, $usage);
}
/**
- * @param string $method HTTP method ('get', 'post', etc.)
+ * @param 'delete'|'get'|'post' $method HTTP method ('get', 'post', etc.)
* @param string $url URL for the request
* @param array $params list of parameters for the request
* @param null|array|string $options
+ * @param string[] $usage names of tracked behaviors associated with this request
+ * @param 'v1'|'v2' $apiMode
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return array tuple containing (the JSON response, $options)
*/
- protected static function _staticRequest($method, $url, $params, $options)
+ protected static function _staticRequest($method, $url, $params, $options, $usage = [], $apiMode = 'v1')
{
$opts = \Stripe\Util\RequestOptions::parse($options);
$baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl();
$requestor = new \Stripe\ApiRequestor($opts->apiKey, $baseUrl);
- list($response, $opts->apiKey) = $requestor->request($method, $url, $params, $opts->headers);
+ list($response, $opts->apiKey) = $requestor->request($method, $url, $params, $opts->headers, $apiMode, $usage);
$opts->discardNonPersistentHeaders();
return [$response, $opts];
}
/**
- * @param string $method HTTP method ('get', 'post', etc.)
+ * @param 'delete'|'get'|'post' $method HTTP method ('get', 'post', etc.)
* @param string $url URL for the request
* @param callable $readBodyChunk function that will receive chunks of data from a successful request body
* @param array $params list of parameters for the request
* @param null|array|string $options
+ * @param string[] $usage names of tracked behaviors associated with this request
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
- protected static function _staticStreamingRequest($method, $url, $readBodyChunk, $params, $options)
+ protected static function _staticStreamingRequest($method, $url, $readBodyChunk, $params, $options, $usage = [])
{
$opts = \Stripe\Util\RequestOptions::parse($options);
$baseUrl = isset($opts->apiBase) ? $opts->apiBase : static::baseUrl();
diff --git a/plugins/stripe-php-10.5.0/lib/ApiOperations/Retrieve.php b/plugins/stripe-php/lib/ApiOperations/Retrieve.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/ApiOperations/Retrieve.php
rename to plugins/stripe-php/lib/ApiOperations/Retrieve.php
diff --git a/plugins/stripe-php/lib/ApiOperations/Search.php b/plugins/stripe-php/lib/ApiOperations/Search.php
new file mode 100644
index 00000000..4ecd0aa1
--- /dev/null
+++ b/plugins/stripe-php/lib/ApiOperations/Search.php
@@ -0,0 +1,25 @@
+serializeParameters();
if (\count($params) > 0) {
$url = $this->instanceUrl();
- list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ list($response, $opts) = $this->_request('post', $url, $params, $opts, ['save']);
$this->refreshFrom($response, $opts);
}
diff --git a/plugins/stripe-php-10.5.0/lib/ApiRequestor.php b/plugins/stripe-php/lib/ApiRequestor.php
similarity index 74%
rename from plugins/stripe-php-10.5.0/lib/ApiRequestor.php
rename to plugins/stripe-php/lib/ApiRequestor.php
index 7162e33b..0476346c 100644
--- a/plugins/stripe-php-10.5.0/lib/ApiRequestor.php
+++ b/plugins/stripe-php/lib/ApiRequestor.php
@@ -17,6 +17,11 @@ class ApiRequestor
*/
private $_apiBase;
+ /**
+ * @var null|array
+ */
+ private $_appInfo;
+
/**
* @var HttpClient\ClientInterface
*/
@@ -31,21 +36,23 @@ class ApiRequestor
*/
private static $requestTelemetry;
- private static $OPTIONS_KEYS = ['api_key', 'idempotency_key', 'stripe_account', 'stripe_version', 'api_base'];
+ private static $OPTIONS_KEYS = ['api_key', 'idempotency_key', 'stripe_account', 'stripe_context', 'stripe_version', 'api_base'];
/**
* ApiRequestor constructor.
*
* @param null|string $apiKey
* @param null|string $apiBase
+ * @param null|array $appInfo
*/
- public function __construct($apiKey = null, $apiBase = null)
+ public function __construct($apiKey = null, $apiBase = null, $appInfo = null)
{
$this->_apiKey = $apiKey;
if (!$apiBase) {
$apiBase = Stripe::$apiBase;
}
$this->_apiBase = $apiBase;
+ $this->_appInfo = $appInfo;
}
/**
@@ -65,6 +72,9 @@ class ApiRequestor
'request_duration_ms' => $requestTelemetry->requestDuration,
],
];
+ if (\count($requestTelemetry->usage) > 0) {
+ $payload['last_request_metrics']['usage'] = $requestTelemetry->usage;
+ }
$result = \json_encode($payload);
if (false !== $result) {
@@ -106,44 +116,48 @@ class ApiRequestor
}
/**
- * @param string $method
+ * @param 'delete'|'get'|'post' $method
* @param string $url
* @param null|array $params
* @param null|array $headers
+ * @param 'v1'|'v2' $apiMode
+ * @param string[] $usage
*
* @throws Exception\ApiErrorException
*
* @return array tuple containing (ApiReponse, API key)
*/
- public function request($method, $url, $params = null, $headers = null)
+ public function request($method, $url, $params = null, $headers = null, $apiMode = 'v1', $usage = [])
{
$params = $params ?: [];
$headers = $headers ?: [];
list($rbody, $rcode, $rheaders, $myApiKey) =
- $this->_requestRaw($method, $url, $params, $headers);
- $json = $this->_interpretResponse($rbody, $rcode, $rheaders);
+ $this->_requestRaw($method, $url, $params, $headers, $apiMode, $usage);
+ $json = $this->_interpretResponse($rbody, $rcode, $rheaders, $apiMode);
$resp = new ApiResponse($rbody, $rcode, $rheaders, $json);
return [$resp, $myApiKey];
}
/**
- * @param string $method
+ * @param 'delete'|'get'|'post' $method
* @param string $url
* @param callable $readBodyChunkCallable
* @param null|array $params
* @param null|array $headers
+ * @param 'v1'|'v2' $apiMode
+ * @param string[] $usage
*
* @throws Exception\ApiErrorException
*/
- public function requestStream($method, $url, $readBodyChunkCallable, $params = null, $headers = null)
+ public function requestStream($method, $url, $readBodyChunkCallable, $params = null, $headers = null, $apiMode = 'v1', $usage = [])
{
$params = $params ?: [];
$headers = $headers ?: [];
list($rbody, $rcode, $rheaders, $myApiKey) =
- $this->_requestRawStreaming($method, $url, $params, $headers, $readBodyChunkCallable);
+ $this->_requestRawStreaming($method, $url, $params, $headers, $apiMode, $usage, $readBodyChunkCallable);
if ($rcode >= 300) {
- $this->_interpretResponse($rbody, $rcode, $rheaders);
+ $this->_interpretResponse($rbody, $rcode, $rheaders, $apiMode);
}
}
@@ -152,15 +166,16 @@ class ApiRequestor
* @param int $rcode
* @param array $rheaders
* @param array $resp
+ * @param 'v1'|'v2' $apiMode
*
* @throws Exception\UnexpectedValueException
* @throws Exception\ApiErrorException
*/
- public function handleErrorResponse($rbody, $rcode, $rheaders, $resp)
+ public function handleErrorResponse($rbody, $rcode, $rheaders, $resp, $apiMode)
{
if (!\is_array($resp) || !isset($resp['error'])) {
$msg = "Invalid response object from API: {$rbody} "
- . "(HTTP response code was {$rcode})";
+ . "(HTTP response code was {$rcode})";
throw new Exception\UnexpectedValueException($msg);
}
@@ -168,11 +183,12 @@ class ApiRequestor
$errorData = $resp['error'];
$error = null;
+
if (\is_string($errorData)) {
$error = self::_specificOAuthError($rbody, $rcode, $rheaders, $resp, $errorData);
}
if (!$error) {
- $error = self::_specificAPIError($rbody, $rcode, $rheaders, $resp, $errorData);
+ $error = 'v1' === $apiMode ? self::_specificV1APIError($rbody, $rcode, $rheaders, $resp, $errorData) : self::_specificV2APIError($rbody, $rcode, $rheaders, $resp, $errorData);
}
throw $error;
@@ -189,7 +205,7 @@ class ApiRequestor
*
* @return Exception\ApiErrorException
*/
- private static function _specificAPIError($rbody, $rcode, $rheaders, $resp, $errorData)
+ private static function _specificV1APIError($rbody, $rcode, $rheaders, $resp, $errorData)
{
$msg = isset($errorData['message']) ? $errorData['message'] : null;
$param = isset($errorData['param']) ? $errorData['param'] : null;
@@ -208,7 +224,8 @@ class ApiRequestor
return Exception\IdempotencyException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
}
- // no break
+ // fall through in generic 400 or 404, returns InvalidRequestException by default
+ // no break
case 404:
return Exception\InvalidRequestException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param);
@@ -229,6 +246,43 @@ class ApiRequestor
}
}
+ /**
+ * @static
+ *
+ * @param string $rbody
+ * @param int $rcode
+ * @param array $rheaders
+ * @param array $resp
+ * @param array $errorData
+ *
+ * @return Exception\ApiErrorException
+ */
+ private static function _specificV2APIError($rbody, $rcode, $rheaders, $resp, $errorData)
+ {
+ $msg = isset($errorData['message']) ? $errorData['message'] : null;
+ $code = isset($errorData['code']) ? $errorData['code'] : null;
+ $type = isset($errorData['type']) ? $errorData['type'] : null;
+
+ switch ($type) {
+ case 'idempotency_error':
+ return Exception\IdempotencyException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code);
+ // The beginning of the section generated from our OpenAPI spec
+ case 'temporary_session_expired':
+ return Exception\TemporarySessionExpiredException::factory(
+ $msg,
+ $rcode,
+ $rbody,
+ $resp,
+ $rheaders,
+ $code
+ );
+
+ // The end of the section generated from our OpenAPI spec
+ default:
+ return self::_specificV1APIError($rbody, $rcode, $rheaders, $resp, $errorData);
+ }
+ }
+
/**
* @static
*
@@ -279,10 +333,10 @@ class ApiRequestor
{
if (null !== $appInfo) {
$string = $appInfo['name'];
- if (null !== $appInfo['version']) {
+ if (\array_key_exists('version', $appInfo) && null !== $appInfo['version']) {
$string .= '/' . $appInfo['version'];
}
- if (null !== $appInfo['url']) {
+ if (\array_key_exists('url', $appInfo) && null !== $appInfo['url']) {
$string .= ' (' . $appInfo['url'] . ')';
}
@@ -315,20 +369,23 @@ class ApiRequestor
/**
* @static
*
- * @param string $apiKey
- * @param null $clientInfo
+ * @param string $apiKey the Stripe API key, to be used in regular API requests
+ * @param null $clientInfo client user agent information
+ * @param null $appInfo information to identify a plugin that integrates Stripe using this library
+ * @param 'v1'|'v2' $apiMode
*
* @return array
*/
- private static function _defaultHeaders($apiKey, $clientInfo = null)
+ private static function _defaultHeaders($apiKey, $clientInfo = null, $appInfo = null, $apiMode = 'v1')
{
- $uaString = 'Stripe/v1 PhpBindings/' . Stripe::VERSION;
+ $uaString = "Stripe/{$apiMode} PhpBindings/" . Stripe::VERSION;
$langVersion = \PHP_VERSION;
- $uname_disabled = static::_isDisabled(\ini_get('disable_functions'), 'php_uname');
+ $uname_disabled = self::_isDisabled(\ini_get('disable_functions'), 'php_uname');
$uname = $uname_disabled ? '(disabled)' : \php_uname();
- $appInfo = Stripe::getAppInfo();
+ // Fallback to global configuration to maintain backwards compatibility.
+ $appInfo = $appInfo ?: Stripe::getAppInfo();
$ua = [
'bindings_version' => Stripe::VERSION,
'lang' => 'php',
@@ -348,10 +405,18 @@ class ApiRequestor
'X-Stripe-Client-User-Agent' => \json_encode($ua),
'User-Agent' => $uaString,
'Authorization' => 'Bearer ' . $apiKey,
+ 'Stripe-Version' => Stripe::getApiVersion(),
];
}
- private function _prepareRequest($method, $url, $params, $headers)
+ /**
+ * @param 'delete'|'get'|'post' $method
+ * @param string $url
+ * @param array $params
+ * @param array $headers
+ * @param 'v1'|'v2' $apiMode
+ */
+ private function _prepareRequest($method, $url, $params, $headers, $apiMode)
{
$myApiKey = $this->_apiKey;
if (!$myApiKey) {
@@ -360,9 +425,9 @@ class ApiRequestor
if (!$myApiKey) {
$msg = 'No API key provided. (HINT: set your API key using '
- . '"Stripe::setApiKey(false if the object exists in test mode.
+ */
+class ApplePayDomain extends ApiResource
+{
+ const OBJECT_NAME = 'apple_pay_domain';
+
+ /**
+ * Create an apple pay domain.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ApplePayDomain the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Delete an apple pay domain.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ApplePayDomain the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * List apple pay domains.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\ApplePayDomain> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieve an apple pay domain.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ApplePayDomain
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * @return string The class URL for this resource. It needs to be special
+ * cased because it doesn't fit into the standard resource pattern.
+ */
+ public static function classUrl()
+ {
+ return '/v1/apple_pay/domains';
+ }
+}
diff --git a/plugins/stripe-php/lib/Application.php b/plugins/stripe-php/lib/Application.php
new file mode 100644
index 00000000..e74ef025
--- /dev/null
+++ b/plugins/stripe-php/lib/Application.php
@@ -0,0 +1,15 @@
+ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|\Stripe\StripeObject $fee_source Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
* @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|\Stripe\Charge $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the destination parameter.
* @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.
- * @property \Stripe\Collection<\Stripe\StripeObject> $refunds A list of refunds that have been applied to the fee.
+ * @property \Stripe\Collection<\Stripe\ApplicationFeeRefund> $refunds A list of refunds that have been applied to the fee.
*/
class ApplicationFee extends ApiResource
{
const OBJECT_NAME = 'application_fee';
- use ApiOperations\All;
use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
-
- const PATH_REFUNDS = '/refunds';
/**
- * @param string $id the ID of the application fee on which to retrieve the fee refunds
+ * Returns a list of application fees you’ve previously collected. The application
+ * fees are returned in sorted order, with the most recent fees appearing first.
+ *
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\ApplicationFeeRefund> the list of fee refunds
+ * @return \Stripe\Collection<\Stripe\ApplicationFee> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an application fee that your account has collected. The
+ * same information is returned when refunding the application fee.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ApplicationFee
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ const PATH_REFUNDS = '/refunds';
+
+ /**
+ * @param string $id the ID of the application fee on which to retrieve the application fee refunds
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\ApplicationFeeRefund> the list of application fee refunds
*/
public static function allRefunds($id, $params = null, $opts = null)
{
@@ -45,7 +82,7 @@ class ApplicationFee extends ApiResource
}
/**
- * @param string $id the ID of the application fee on which to create the fee refund
+ * @param string $id the ID of the application fee on which to create the application fee refund
* @param null|array $params
* @param null|array|string $opts
*
@@ -59,8 +96,8 @@ class ApplicationFee extends ApiResource
}
/**
- * @param string $id the ID of the application fee to which the fee refund belongs
- * @param string $refundId the ID of the fee refund to retrieve
+ * @param string $id the ID of the application fee to which the application fee refund belongs
+ * @param string $refundId the ID of the application fee refund to retrieve
* @param null|array $params
* @param null|array|string $opts
*
@@ -74,8 +111,8 @@ class ApplicationFee extends ApiResource
}
/**
- * @param string $id the ID of the application fee to which the fee refund belongs
- * @param string $refundId the ID of the fee refund to update
+ * @param string $id the ID of the application fee to which the application fee refund belongs
+ * @param string $refundId the ID of the application fee refund to update
* @param null|array $params
* @param null|array|string $opts
*
diff --git a/plugins/stripe-php-10.5.0/lib/ApplicationFeeRefund.php b/plugins/stripe-php/lib/ApplicationFeeRefund.php
similarity index 85%
rename from plugins/stripe-php-10.5.0/lib/ApplicationFeeRefund.php
rename to plugins/stripe-php/lib/ApplicationFeeRefund.php
index dc7c34ba..1d383c01 100644
--- a/plugins/stripe-php-10.5.0/lib/ApplicationFeeRefund.php
+++ b/plugins/stripe-php/lib/ApplicationFeeRefund.php
@@ -5,17 +5,15 @@
namespace Stripe;
/**
- * Application Fee Refund objects allow you to refund an application
- * fee that has previously been created but not yet refunded. Funds will be
- * refunded to the Stripe account from which the fee was originally collected.
+ * Application Fee Refund objects allow you to refund an application fee that
+ * has previously been created but not yet refunded. Funds will be refunded to
+ * the Stripe account from which the fee was originally collected.
*
- * Related guide: Refunding
- * Application Fees.
+ * Related guide: Refunding application fees
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount, in %s.
+ * @property int $amount Amount, in cents (or local equivalent).
* @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
diff --git a/plugins/stripe-php-10.5.0/lib/Apps/Secret.php b/plugins/stripe-php/lib/Apps/Secret.php
similarity index 55%
rename from plugins/stripe-php-10.5.0/lib/Apps/Secret.php
rename to plugins/stripe-php/lib/Apps/Secret.php
index bd0d777f..948f3dc1 100644
--- a/plugins/stripe-php-10.5.0/lib/Apps/Secret.php
+++ b/plugins/stripe-php/lib/Apps/Secret.php
@@ -5,29 +5,20 @@
namespace Stripe\Apps;
/**
- * Secret Store is an API that allows Stripe Apps developers to securely persist
- * secrets for use by UI Extensions and app backends.
+ * Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.
*
- * The primary resource in Secret Store is a secret. Other apps can't
- * view secrets created by an app. Additionally, secrets are scoped to provide
- * further permission control.
+ * The primary resource in Secret Store is a secret. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.
*
- * All Dashboard users and the app backend share account scoped
- * secrets. Use the account scope for secrets that don't change
- * per-user, like a third-party API key.
+ * All Dashboard users and the app backend share account scoped secrets. Use the account scope for secrets that don't change per-user, like a third-party API key.
*
- * A user scoped secret is accessible by the app backend and one
- * specific Dashboard user. Use the user scope for per-user secrets
- * like per-user OAuth tokens, where different users might have different
- * permissions.
+ * A user scoped secret is accessible by the app backend and one specific Dashboard user. Use the user scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
*
- * Related guide: Store
- * data between page reloads.
+ * Related guide: Store data between page reloads
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|bool $deleted If true, indicates that this secret has been deleted
* @property null|int $expires_at The Unix timestamp for the expiry time of the secret, after which the secret deletes.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property string $name A name for the secret that's unique within the scope.
@@ -38,8 +29,44 @@ class Secret extends \Stripe\ApiResource
{
const OBJECT_NAME = 'apps.secret';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
+ /**
+ * Create or replace a secret in the secret store.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Apps\Secret the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * List all secrets stored on the given scope.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Apps\Secret> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
/**
* @param null|array $params
diff --git a/plugins/stripe-php/lib/Balance.php b/plugins/stripe-php/lib/Balance.php
new file mode 100644
index 00000000..61c8f40e
--- /dev/null
+++ b/plugins/stripe-php/lib/Balance.php
@@ -0,0 +1,52 @@
+transactions that contributed to the balance
+ * (charges, payouts, and so forth).
+ *
+ * The available and pending amounts for each currency are broken down further by
+ * payment source types.
+ *
+ * Related guide: Understanding Connect account balances
+ *
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property \Stripe\StripeObject[] $available Available funds that you can transfer or pay out automatically by Stripe or explicitly through the Transfers API or Payouts API. You can find the available balance for each currency and payment type in the source_types property.
+ * @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected accounts where account.controller.requirement_collection is application, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the source_types property.
+ * @property null|\Stripe\StripeObject[] $instant_available Funds that you can pay out using Instant Payouts.
+ * @property null|\Stripe\StripeObject $issuing
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject[] $pending Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the source_types property.
+ */
+class Balance extends SingletonApiResource
+{
+ const OBJECT_NAME = 'balance';
+
+ /**
+ * Retrieves the current account balance, based on the authentication that was used
+ * to make the request. For a sample request, see Accounting
+ * for negative balances.
+ *
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Balance
+ */
+ public static function retrieve($opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static(null, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/BalanceTransaction.php b/plugins/stripe-php/lib/BalanceTransaction.php
new file mode 100644
index 00000000..b83ef767
--- /dev/null
+++ b/plugins/stripe-php/lib/BalanceTransaction.php
@@ -0,0 +1,119 @@
+Balance transaction types
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.
+ * @property int $available_on The date that the transaction's net funds become available in the Stripe balance.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
+ * @property null|float $exchange_rate If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the amount in currency A, multipled by the exchange_rate, equals the amount in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's amount is 1000 and currency is eur. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's amount is 1234, its currency is usd, and the exchange_rate is 1.234.
+ * @property int $fee Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
+ * @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
+ * @property int $net Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by amount - fee
+ * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.
+ * @property null|string|\Stripe\ApplicationFee|\Stripe\ApplicationFeeRefund|\Stripe\Charge|\Stripe\ConnectCollectionTransfer|\Stripe\CustomerCashBalanceTransaction|\Stripe\Dispute|\Stripe\Issuing\Authorization|\Stripe\Issuing\Dispute|\Stripe\Issuing\Transaction|\Stripe\Payout|\Stripe\Refund|\Stripe\ReserveTransaction|\Stripe\TaxDeductedAtSource|\Stripe\Topup|\Stripe\Transfer|\Stripe\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, 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, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category instead.
+ */
+class BalanceTransaction extends ApiResource
+{
+ const OBJECT_NAME = 'balance_transaction';
+
+ const TYPE_ADJUSTMENT = 'adjustment';
+ const TYPE_ADVANCE = 'advance';
+ const TYPE_ADVANCE_FUNDING = 'advance_funding';
+ const TYPE_ANTICIPATION_REPAYMENT = 'anticipation_repayment';
+ const TYPE_APPLICATION_FEE = 'application_fee';
+ const TYPE_APPLICATION_FEE_REFUND = 'application_fee_refund';
+ const TYPE_CHARGE = 'charge';
+ const TYPE_CLIMATE_ORDER_PURCHASE = 'climate_order_purchase';
+ const TYPE_CLIMATE_ORDER_REFUND = 'climate_order_refund';
+ const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer';
+ const TYPE_CONTRIBUTION = 'contribution';
+ const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold';
+ const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release';
+ const TYPE_ISSUING_DISPUTE = 'issuing_dispute';
+ const TYPE_ISSUING_TRANSACTION = 'issuing_transaction';
+ const TYPE_OBLIGATION_OUTBOUND = 'obligation_outbound';
+ const TYPE_OBLIGATION_REVERSAL_INBOUND = 'obligation_reversal_inbound';
+ const TYPE_PAYMENT = 'payment';
+ const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund';
+ const TYPE_PAYMENT_NETWORK_RESERVE_HOLD = 'payment_network_reserve_hold';
+ const TYPE_PAYMENT_NETWORK_RESERVE_RELEASE = 'payment_network_reserve_release';
+ const TYPE_PAYMENT_REFUND = 'payment_refund';
+ const TYPE_PAYMENT_REVERSAL = 'payment_reversal';
+ const TYPE_PAYMENT_UNRECONCILED = 'payment_unreconciled';
+ const TYPE_PAYOUT = 'payout';
+ const TYPE_PAYOUT_CANCEL = 'payout_cancel';
+ const TYPE_PAYOUT_FAILURE = 'payout_failure';
+ const TYPE_PAYOUT_MINIMUM_BALANCE_HOLD = 'payout_minimum_balance_hold';
+ const TYPE_PAYOUT_MINIMUM_BALANCE_RELEASE = 'payout_minimum_balance_release';
+ const TYPE_REFUND = 'refund';
+ const TYPE_REFUND_FAILURE = 'refund_failure';
+ const TYPE_RESERVED_FUNDS = 'reserved_funds';
+ const TYPE_RESERVE_TRANSACTION = 'reserve_transaction';
+ const TYPE_STRIPE_FEE = 'stripe_fee';
+ const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee';
+ const TYPE_TAX_FEE = 'tax_fee';
+ const TYPE_TOPUP = 'topup';
+ const TYPE_TOPUP_REVERSAL = 'topup_reversal';
+ const TYPE_TRANSFER = 'transfer';
+ const TYPE_TRANSFER_CANCEL = 'transfer_cancel';
+ const TYPE_TRANSFER_FAILURE = 'transfer_failure';
+ const TYPE_TRANSFER_REFUND = 'transfer_refund';
+
+ /**
+ * 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.
+ *
+ * Note that this endpoint was previously called “Balance history” and used the
+ * path /v1/balance/history.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\BalanceTransaction> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the balance transaction with the given ID.
+ *
+ * Note that this endpoint previously used the path
+ * /v1/balance/history/:id.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\BalanceTransaction
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/BankAccount.php b/plugins/stripe-php/lib/BankAccount.php
similarity index 67%
rename from plugins/stripe-php-10.5.0/lib/BankAccount.php
rename to plugins/stripe-php/lib/BankAccount.php
index 57fd19be..ce536a40 100644
--- a/plugins/stripe-php-10.5.0/lib/BankAccount.php
+++ b/plugins/stripe-php/lib/BankAccount.php
@@ -7,16 +7,11 @@ namespace Stripe;
/**
* These bank accounts are payment methods on Customer objects.
*
- * On the other hand External Accounts are
- * transfer destinations on Account objects for Custom accounts. They
- * can be bank accounts or debit cards as well, and are documented in the links
- * above.
+ * On the other hand External Accounts are transfer
+ * destinations on Account objects for connected accounts.
+ * They can be bank accounts or debit cards as well, and are documented in the links above.
*
- * Related guide: Bank Debits and
- * Transfers.
+ * Related guide: Bank debits and transfers
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -31,17 +26,37 @@ namespace Stripe;
* @property null|string|\Stripe\Customer $customer The ID of the customer that the bank account is associated with.
* @property null|bool $default_for_currency Whether this bank account is the default external account for its currency.
* @property null|string $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ * @property null|\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for the bank account, including what information needs to be collected, and by when.
* @property string $last4 The last four digits of the bank account number.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $requirements Information about the requirements for the bank account, including what information needs to be collected.
* @property null|string $routing_number The routing transit number for the bank account.
- * @property string $status For bank accounts, possible values are new, validated, verified, verification_failed, or errored. A bank account that hasn't had any activity or validation performed is new. If Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If a transfer sent to this bank account fails, we'll set the status to errored and will not continue to send transfers until the bank details are updated.
For external accounts, possible values are new and errored. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.
For bank accounts, possible values are new, validated, verified, verification_failed, or errored. A bank account that hasn't had any activity or validation performed is new. If Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If a payout sent to this bank account fails, we'll set the status to errored and will not continue to send scheduled payouts until the bank details are updated.
For external accounts, possible values are new, errored and verification_failed. If a payout fails, the status is set to errored and scheduled payouts are stopped until account details are updated. In the US and India, if we can't verify the owner of the bank account, we'll set the status to verification_failed. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
false if the object exists in test mode.
+ * @property null|string $status Status of the alert. This can be active, inactive or archived.
+ * @property string $title Title of the alert.
+ * @property null|\Stripe\StripeObject $usage_threshold Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
+ */
+class Alert extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'billing.alert';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_ARCHIVED = 'archived';
+ const STATUS_INACTIVE = 'inactive';
+
+ /**
+ * Creates a billing alert.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Alert the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Lists billing active and inactive alerts.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Billing\Alert> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a billing alert given an ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Alert
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Alert the activated alert
+ */
+ public function activate($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/activate';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Alert the archived alert
+ */
+ public function archive($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/archive';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Alert the deactivated alert
+ */
+ public function deactivate($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/deactivate';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/Billing/AlertTriggered.php b/plugins/stripe-php/lib/Billing/AlertTriggered.php
new file mode 100644
index 00000000..04bae44d
--- /dev/null
+++ b/plugins/stripe-php/lib/Billing/AlertTriggered.php
@@ -0,0 +1,18 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property int $value The value triggering the alert
+ */
+class AlertTriggered extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'billing.alert_triggered';
+}
diff --git a/plugins/stripe-php/lib/Billing/CreditBalanceSummary.php b/plugins/stripe-php/lib/Billing/CreditBalanceSummary.php
new file mode 100644
index 00000000..c6c76310
--- /dev/null
+++ b/plugins/stripe-php/lib/Billing/CreditBalanceSummary.php
@@ -0,0 +1,36 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ */
+class CreditBalanceSummary extends \Stripe\SingletonApiResource
+{
+ const OBJECT_NAME = 'billing.credit_balance_summary';
+
+ /**
+ * Retrieves the credit balance summary for a customer.
+ *
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditBalanceSummary
+ */
+ public static function retrieve($opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static(null, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/Billing/CreditBalanceTransaction.php b/plugins/stripe-php/lib/Billing/CreditBalanceTransaction.php
new file mode 100644
index 00000000..74ef7ae6
--- /dev/null
+++ b/plugins/stripe-php/lib/Billing/CreditBalanceTransaction.php
@@ -0,0 +1,63 @@
+credit.
+ * @property string|\Stripe\Billing\CreditGrant $credit_grant The credit grant associated with this credit balance transaction.
+ * @property null|\Stripe\StripeObject $debit Debit details for this credit balance transaction. Only present if type is debit.
+ * @property int $effective_at The effective time of this credit balance transaction.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this credit balance transaction belongs to.
+ * @property null|string $type The type of credit balance transaction (credit or debit).
+ */
+class CreditBalanceTransaction extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'billing.credit_balance_transaction';
+
+ const TYPE_CREDIT = 'credit';
+ const TYPE_DEBIT = 'debit';
+
+ /**
+ * Retrieve a list of credit balance transactions.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Billing\CreditBalanceTransaction> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a credit balance transaction.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditBalanceTransaction
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/Billing/CreditGrant.php b/plugins/stripe-php/lib/Billing/CreditGrant.php
new file mode 100644
index 00000000..bcc27446
--- /dev/null
+++ b/plugins/stripe-php/lib/Billing/CreditGrant.php
@@ -0,0 +1,151 @@
+Billing credits
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property \Stripe\StripeObject $amount
+ * @property \Stripe\StripeObject $applicability_config
+ * @property string $category The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string|\Stripe\Customer $customer ID of the customer receiving the billing credits.
+ * @property null|int $effective_at The time when the billing credits become effective-when they're eligible for use.
+ * @property null|int $expires_at The time when the billing credits expire. If not present, the billing credits don't expire.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|string $name A descriptive name shown in dashboard.
+ * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this credit grant belongs to.
+ * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ * @property null|int $voided_at The time when this credit grant was voided. If not present, the credit grant hasn't been voided.
+ */
+class CreditGrant extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'billing.credit_grant';
+
+ use \Stripe\ApiOperations\Update;
+
+ const CATEGORY_PAID = 'paid';
+ const CATEGORY_PROMOTIONAL = 'promotional';
+
+ /**
+ * Creates a credit grant.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Retrieve a list of credit grants.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Billing\CreditGrant> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a credit grant.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a credit grant.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant the expired credit grant
+ */
+ public function expire($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/expire';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant the voided credit grant
+ */
+ public function voidGrant($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/void';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/Billing/Meter.php b/plugins/stripe-php/lib/Billing/Meter.php
new file mode 100644
index 00000000..1e0080a9
--- /dev/null
+++ b/plugins/stripe-php/lib/Billing/Meter.php
@@ -0,0 +1,169 @@
+Usage based billing
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property \Stripe\StripeObject $customer_mapping
+ * @property \Stripe\StripeObject $default_aggregation
+ * @property string $display_name The meter's name.
+ * @property string $event_name The name of the meter event to record usage for. Corresponds with the event_name field on meter events.
+ * @property null|string $event_time_window The time window to pre-aggregate meter events for, if any.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $status The meter's status.
+ * @property \Stripe\StripeObject $status_transitions
+ * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ * @property \Stripe\StripeObject $value_settings
+ */
+class Meter extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'billing.meter';
+
+ use \Stripe\ApiOperations\NestedResource;
+ use \Stripe\ApiOperations\Update;
+
+ const EVENT_TIME_WINDOW_DAY = 'day';
+ const EVENT_TIME_WINDOW_HOUR = 'hour';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_INACTIVE = 'inactive';
+
+ /**
+ * Creates a billing meter.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Retrieve a list of billing meters.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Billing\Meter> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a billing meter given an ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a billing meter.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter the deactivated meter
+ */
+ public function deactivate($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/deactivate';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter the reactivated meter
+ */
+ public function reactivate($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/reactivate';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ const PATH_EVENT_SUMMARIES = '/event_summaries';
+
+ /**
+ * @param string $id the ID of the meter on which to retrieve the meter event summaries
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Billing\MeterEventSummary> the list of meter event summaries
+ */
+ public static function allEventSummaries($id, $params = null, $opts = null)
+ {
+ return self::_allNestedResources($id, static::PATH_EVENT_SUMMARIES, $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Billing/MeterEvent.php b/plugins/stripe-php/lib/Billing/MeterEvent.php
new file mode 100644
index 00000000..d0ff22c1
--- /dev/null
+++ b/plugins/stripe-php/lib/Billing/MeterEvent.php
@@ -0,0 +1,43 @@
+event_name field on a meter.
+ * @property string $identifier A unique identifier for the event.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $payload The payload of the event. This contains the fields corresponding to a meter's customer_mapping.event_payload_key (default is stripe_customer_id) and value_settings.event_payload_key (default is value). Read more about the payload.
+ * @property int $timestamp The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
+ */
+class MeterEvent extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'billing.meter_event';
+
+ /**
+ * Creates a billing meter event.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\MeterEvent the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Billing/MeterEventAdjustment.php b/plugins/stripe-php/lib/Billing/MeterEventAdjustment.php
new file mode 100644
index 00000000..90863fb6
--- /dev/null
+++ b/plugins/stripe-php/lib/Billing/MeterEventAdjustment.php
@@ -0,0 +1,45 @@
+event_name field on a meter.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $status The meter event adjustment's status.
+ * @property string $type Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ */
+class MeterEventAdjustment extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'billing.meter_event_adjustment';
+
+ const STATUS_COMPLETE = 'complete';
+ const STATUS_PENDING = 'pending';
+
+ /**
+ * Creates a billing meter event adjustment.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\MeterEventAdjustment the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Billing/MeterEventSummary.php b/plugins/stripe-php/lib/Billing/MeterEventSummary.php
new file mode 100644
index 00000000..e56ada7f
--- /dev/null
+++ b/plugins/stripe-php/lib/Billing/MeterEventSummary.php
@@ -0,0 +1,22 @@
+start_time (inclusive) and end_time (inclusive). The aggregation strategy is defined on meter via default_aggregation.
+ * @property int $end_time End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $meter The meter associated with this event summary.
+ * @property int $start_time Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.
+ */
+class MeterEventSummary extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'billing.meter_event_summary';
+}
diff --git a/plugins/stripe-php/lib/BillingPortal/Configuration.php b/plugins/stripe-php/lib/BillingPortal/Configuration.php
new file mode 100644
index 00000000..04b2c620
--- /dev/null
+++ b/plugins/stripe-php/lib/BillingPortal/Configuration.php
@@ -0,0 +1,113 @@
+overriden when creating the session.
+ * @property \Stripe\StripeObject $features
+ * @property bool $is_default Whether the configuration is the default. If true, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $login_page
+ * @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 int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ */
+class Configuration extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'billing_portal.configuration';
+
+ use \Stripe\ApiOperations\Update;
+
+ /**
+ * Creates a configuration that describes the functionality and behavior of a
+ * PortalSession.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\BillingPortal\Configuration the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of configurations that describe the functionality of the customer
+ * portal.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\BillingPortal\Configuration> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a configuration that describes the functionality of the customer
+ * portal.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\BillingPortal\Configuration
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a configuration that describes the functionality of the customer portal.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\BillingPortal\Configuration the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/BillingPortal/Session.php b/plugins/stripe-php/lib/BillingPortal/Session.php
similarity index 51%
rename from plugins/stripe-php-10.5.0/lib/BillingPortal/Session.php
rename to plugins/stripe-php/lib/BillingPortal/Session.php
index 243e845b..a94d5f9a 100644
--- a/plugins/stripe-php-10.5.0/lib/BillingPortal/Session.php
+++ b/plugins/stripe-php/lib/BillingPortal/Session.php
@@ -5,32 +5,30 @@
namespace Stripe\BillingPortal;
/**
- * The Billing customer portal is a Stripe-hosted UI for subscription and billing
- * management.
+ * The Billing customer portal is a Stripe-hosted UI for subscription and
+ * billing management.
*
- * A portal configuration describes the functionality and features that you want to
- * provide to your customers through the portal.
+ * A portal configuration describes the functionality and features that you
+ * want to provide to your customers through the portal.
*
- * A portal session describes the instantiation of the customer portal for a
- * particular customer. By visiting the session's URL, the customer can manage
- * their subscriptions and billing details. For security reasons, sessions are
- * short-lived and will expire if the customer does not visit the URL. Create
- * sessions on-demand when customers intend to manage their subscriptions and
- * billing details.
+ * A portal session describes the instantiation of the customer portal for
+ * a particular customer. By visiting the session's URL, the customer
+ * can manage their subscriptions and billing details. For security reasons,
+ * sessions are short-lived and will expire if the customer does not visit the URL.
+ * Create sessions on-demand when customers intend to manage their subscriptions
+ * and billing details.
*
- * Learn more in the integration
- * guide.
+ * Related guide: Customer management
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string|\Stripe\BillingPortal\Configuration $configuration The configuration used by this session, describing the features available.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $customer The ID of the customer for this session.
- * @property null|\Stripe\StripeObject $flow Information about a specific flow for the customer to go through.
+ * @property null|\Stripe\StripeObject $flow Information about a specific flow for the customer to go through. See the docs to learn more about using customer portal deep links and flows.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property null|string $locale The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s preferred_locales or browser’s locale is used.
- * @property null|string $on_behalf_of The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this on_behalf_of account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of account's branding settings, which the portal displays.
+ * @property null|string $on_behalf_of The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this on_behalf_of account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of account's branding settings, which the portal displays.
* @property null|string $return_url The URL to redirect customers to when they click on the portal's link to return to your website.
* @property string $url The short-lived URL of the session that gives customers access to the customer portal.
*/
@@ -38,5 +36,25 @@ class Session extends \Stripe\ApiResource
{
const OBJECT_NAME = 'billing_portal.session';
- use \Stripe\ApiOperations\Create;
+ /**
+ * Creates a session of the customer portal.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\BillingPortal\Session the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Capability.php b/plugins/stripe-php/lib/Capability.php
similarity index 67%
rename from plugins/stripe-php-10.5.0/lib/Capability.php
rename to plugins/stripe-php/lib/Capability.php
index f675d719..056c5e81 100644
--- a/plugins/stripe-php-10.5.0/lib/Capability.php
+++ b/plugins/stripe-php/lib/Capability.php
@@ -7,25 +7,21 @@ namespace Stripe;
/**
* This is an object representing a capability for a Stripe account.
*
- * Related guide: Account
- * capabilities.
+ * Related guide: Account capabilities
*
* @property string $id The identifier for the capability.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string|\Stripe\Account $account The account for which the capability enables functionality.
- * @property \Stripe\StripeObject $future_requirements
+ * @property null|\Stripe\StripeObject $future_requirements
* @property bool $requested Whether the capability has been requested.
* @property null|int $requested_at Time at which the capability was requested. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $requirements
- * @property string $status The status of the capability. Can be active, inactive, pending, or unrequested.
+ * @property null|\Stripe\StripeObject $requirements
+ * @property string $status The status of the capability.
*/
class Capability extends ApiResource
{
const OBJECT_NAME = 'capability';
- use ApiOperations\Update;
-
const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
const STATUS_PENDING = 'pending';
@@ -80,9 +76,32 @@ class Capability extends ApiResource
public static function update($_id, $_params = null, $_options = null)
{
$msg = 'Capabilities cannot be updated without an account ID. ' .
- 'Update a capability using `Account::updateCapability(' .
- "'account_id', 'capability_id', \$updateParams)`.";
+ 'Update a capability using `Account::updateCapability(' .
+ "'account_id', 'capability_id', \$updateParams)`.";
throw new Exception\BadMethodCallException($msg);
}
+
+ /**
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return static the saved resource
+ *
+ * @deprecated The `save` method is deprecated and will be removed in a
+ * future major version of the library. Use the static method `update`
+ * on the resource instead.
+ */
+ public function save($opts = null)
+ {
+ $params = $this->serializeParameters();
+ if (\count($params) > 0) {
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('post', $url, $params, $opts, ['save']);
+ $this->refreshFrom($response, $opts);
+ }
+
+ return $this;
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Card.php b/plugins/stripe-php/lib/Card.php
similarity index 66%
rename from plugins/stripe-php-10.5.0/lib/Card.php
rename to plugins/stripe-php/lib/Card.php
index 939523b1..014e6b45 100644
--- a/plugins/stripe-php-10.5.0/lib/Card.php
+++ b/plugins/stripe-php/lib/Card.php
@@ -9,12 +9,11 @@ namespace Stripe;
* later. You can also store multiple debit cards on a recipient in order to
* transfer to those cards later.
*
- * Related guide: Card Payments
- * with Sources.
+ * Related guide: Card payments with Sources
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\Account $account The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
+ * @property null|string|\Stripe\Account $account The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where controller.requirement_collection is application, which includes Custom accounts.
* @property null|string $address_city City/District/Suburb/Town/Village.
* @property null|string $address_country Billing address country, if provided when creating card.
* @property null|string $address_line1 Address line 1 (Street address/PO Box/Company name).
@@ -23,30 +22,58 @@ namespace Stripe;
* @property null|string $address_state State/County/Province/Region.
* @property null|string $address_zip ZIP or postal code.
* @property null|string $address_zip_check If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked.
+ * @property null|string $allow_redisplay This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
* @property null|string[] $available_payout_methods A set of available payout methods for this card. Only values from this set should be passed as the method when creating a payout.
- * @property string $brand Card brand. Can be American Express, Diners Club, Discover, JCB, MasterCard, UnionPay, Visa, or Unknown.
+ * @property string $brand Card brand. Can be American Express, Diners Club, Discover, Eftpos Australia, Girocard, JCB, MasterCard, UnionPay, Visa, or Unknown.
* @property null|string $country Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
- * @property null|string $currency Three-letter ISO code for currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
+ * @property null|string $currency Three-letter ISO code for currency in lowercase. Must be a supported currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where controller.requirement_collection is application, which includes Custom accounts.
* @property null|string|\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
* @property null|string $cvc_check If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see Check if a card is valid without a charge.
- * @property null|bool $default_for_currency Whether this card is the default external account for its currency.
+ * @property null|bool $default_for_currency Whether this card is the default external account for its currency. This property is only available for accounts where controller.requirement_collection is application, which includes Custom accounts.
* @property null|string $dynamic_last4 (For tokenized numbers only.) The last four digits of the device account number.
* @property int $exp_month Two-digit number representing the card's expiration month.
* @property int $exp_year Four-digit number representing the card's expiration year.
- * @property null|string $fingerprint Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.
+ * @property null|string $fingerprintUniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.
* @property string $funding Card funding type. Can becredit, debit, prepaid, or unknown.
* @property string $last4 The last four digits of the card.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|string $name Cardholder name.
- * @property null|string $status For external accounts, possible values are new and errored. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.
+ * @property null|\Stripe\StripeObject $networks
+ * @property null|string $regulated_status Status of a card based on the card issuer.
+ * @property null|string $status For external accounts that are cards, possible values are 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.
*/
class Card extends ApiResource
{
const OBJECT_NAME = 'card';
- use ApiOperations\Delete;
- use ApiOperations\Update;
+ const ALLOW_REDISPLAY_ALWAYS = 'always';
+ const ALLOW_REDISPLAY_LIMITED = 'limited';
+ const ALLOW_REDISPLAY_UNSPECIFIED = 'unspecified';
+
+ const REGULATED_STATUS_REGULATED = 'regulated';
+ const REGULATED_STATUS_UNREGULATED = 'unregulated';
+
+ /**
+ * Delete a specified external account for a given account.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Card the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
/**
* Possible string representations of the CVC check status.
@@ -135,4 +162,27 @@ class Card extends ApiResource
throw new Exception\BadMethodCallException($msg);
}
+
+ /**
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return static the saved resource
+ *
+ * @deprecated The `save` method is deprecated and will be removed in a
+ * future major version of the library. Use the static method `update`
+ * on the resource instead.
+ */
+ public function save($opts = null)
+ {
+ $params = $this->serializeParameters();
+ if (\count($params) > 0) {
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('post', $url, $params, $opts, ['save']);
+ $this->refreshFrom($response, $opts);
+ }
+
+ return $this;
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/CashBalance.php b/plugins/stripe-php/lib/CashBalance.php
similarity index 93%
rename from plugins/stripe-php-10.5.0/lib/CashBalance.php
rename to plugins/stripe-php/lib/CashBalance.php
index 3e739615..84ee9a81 100644
--- a/plugins/stripe-php-10.5.0/lib/CashBalance.php
+++ b/plugins/stripe-php/lib/CashBalance.php
@@ -5,9 +5,7 @@
namespace Stripe;
/**
- * A customer's Cash balance represents real funds. Customers can add
- * funds to their cash balance by sending a bank transfer. These funds can be used
- * for payment and can eventually be paid out to your bank account.
+ * A customer's Cash balance represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|\Stripe\StripeObject $available A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the smallest currency unit.
diff --git a/plugins/stripe-php-10.5.0/lib/Charge.php b/plugins/stripe-php/lib/Charge.php
similarity index 59%
rename from plugins/stripe-php-10.5.0/lib/Charge.php
rename to plugins/stripe-php/lib/Charge.php
index 428ef66e..2a3e37a0 100644
--- a/plugins/stripe-php-10.5.0/lib/Charge.php
+++ b/plugins/stripe-php/lib/Charge.php
@@ -5,50 +5,44 @@
namespace Stripe;
/**
- * To charge a credit or a debit card, you create a Charge object. You
- * can retrieve and refund individual charges as well as list all charges. Charges
- * are identified by a unique, random ID.
- *
- * Related guide: Accept a
- * payment with the Charges API.
+ * The Charge object represents a single attempt to move money into your Stripe account.
+ * PaymentIntent confirmation is the most common way to create Charges, but transferring
+ * money to a different Stripe account through Connect also creates Charges.
+ * Some legacy payment flows create Charges directly, which is not recommended for new integrations.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $alternate_statement_descriptors
* @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
- * @property int $amount_captured Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
- * @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
- * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the charge.
- * @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. See the Connect documentation for details.
- * @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. See the Connect documentation for details.
- * @property string $authorization_code Authorization code on the charge.
+ * @property int $amount_captured Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
+ * @property int $amount_refunded Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
+ * @property null|string|\Stripe\Application $application ID of the Connect application that created the charge.
+ * @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. See the Connect documentation for details.
+ * @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. See the Connect documentation for details.
+ * @property null|string $authorization_code Authorization code on the charge.
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
* @property \Stripe\StripeObject $billing_details
- * @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.
+ * @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments.
* @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property null|string|\Stripe\Customer $customer ID of the customer this charge is for if one exists.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|string|\Stripe\Account $destination ID of an existing, connected Stripe account to transfer funds to if transfer_data was specified in the charge request.
- * @property null|string|\Stripe\Dispute $dispute Details about the dispute if the charge has been disputed.
* @property bool $disputed Whether the charge has been disputed.
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
* @property null|string $failure_code Error code explaining reason for charge failure if available (see the errors section for a list of codes).
* @property null|string $failure_message Message to user further explaining reason for charge failure if available.
* @property null|\Stripe\StripeObject $fraud_details Information on fraud assessments for the charge.
* @property null|string|\Stripe\Invoice $invoice ID of the invoice this charge is for if one exists.
- * @property \Stripe\StripeObject $level3
+ * @property null|\Stripe\StripeObject $level3
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details.
+ * @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details.
* @property null|\Stripe\StripeObject $outcome Details about whether the payment was accepted, and why. See understanding declines for details.
* @property bool $paid true if the charge succeeded, or was successfully authorized for later capture.
* @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this charge, if one exists.
* @property null|string $payment_method ID of the payment method used in this charge.
* @property null|\Stripe\StripeObject $payment_method_details Details about the payment method at the time of the transaction.
- * @property \Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information.
+ * @property null|\Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information.
* @property null|string $receipt_email This is the email address that the receipt for this charge was sent to.
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent.
* @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
@@ -57,28 +51,114 @@ namespace Stripe;
* @property null|string|\Stripe\Review $review ID of the review associated with this charge if one exists.
* @property null|\Stripe\StripeObject $shipping Shipping information for the charge.
* @property null|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to payment_method or payment_method_details instead.
- * @property null|string|\Stripe\Transfer $source_transfer The transfer ID which created this charge. Only present if the charge came from another Stripe account. See the Connect documentation for details.
- * @property null|string $statement_descriptor For card charges, use statement_descriptor_suffix instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters.
- * @property null|string $statement_descriptor_suffix Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
+ * @property null|string|\Stripe\Transfer $source_transfer The transfer ID which created this charge. Only present if the charge came from another Stripe account. See the Connect documentation for details.
+ * @property null|string $statement_descriptor For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.
For a card charge, this value is ignored unless you don't specify a statement_descriptor_suffix, in which case this value is used as the suffix.
succeeded, pending, or failed.
- * @property string|\Stripe\Transfer $transfer ID of the transfer to the destination account (only applicable if the charge was created using the destination parameter).
+ * @property null|string|\Stripe\Transfer $transfer ID of the transfer to the destination account (only applicable if the charge was created using the destination parameter).
* @property null|\Stripe\StripeObject $transfer_data An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.
- * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details.
+ * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details.
*/
class Charge extends ApiResource
{
const OBJECT_NAME = 'charge';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
+ use ApiOperations\NestedResource;
use ApiOperations\Update;
const STATUS_FAILED = 'failed';
const STATUS_PENDING = 'pending';
const STATUS_SUCCEEDED = 'succeeded';
+ /**
+ * This method is no longer recommended—use the Payment Intents API to initiate a new
+ * payment instead. Confirmation of the PaymentIntent creates the
+ * Charge object used to request payment.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Charge the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of charges you’ve previously created. The charges are returned in
+ * sorted order, with the most recent charges appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Charge> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a charge that has previously been created. Supply the
+ * unique charge ID that was returned from your previous request, and Stripe will
+ * return the corresponding charge information. The same information is returned
+ * when creating or refunding the charge.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Charge
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified charge by setting the values of the parameters passed. Any
+ * parameters not provided will be left unchanged.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Charge the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
/**
* Possible string representations of decline codes.
* These strings are applicable to the decline_code property of the \Stripe\Exception\CardException exception.
@@ -155,12 +235,43 @@ class Charge extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\SearchResultredirectToCheckout in Stripe.js.
+ * @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|\Stripe\StripeObject $adaptive_pricing Settings for price localization with Adaptive Pricing.
* @property null|\Stripe\StripeObject $after_expiration When set, provides configuration for actions to take if this Checkout Session expires.
* @property null|bool $allow_promotion_codes Enables user redeemable promotion codes.
* @property null|int $amount_subtotal Total of all items before discounts or taxes are applied.
* @property null|int $amount_total Total of all items after discounts and taxes are applied.
* @property \Stripe\StripeObject $automatic_tax
- * @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address.
+ * @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address. Defaults to auto.
* @property null|string $cancel_url If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
* @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
+ * @property null|string $client_secret Client secret to be used when initializing Stripe.js embedded checkout.
* @property null|\Stripe\StripeObject $consent Results of consent_collection for this session.
* @property null|\Stripe\StripeObject $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|\Stripe\StripeObject $currency_conversion Currency conversion details for Adaptive Pricing sessions
+ * @property \Stripe\StripeObject[] $custom_fields Collect additional information from your customer using custom fields. Up to 3 fields are supported.
* @property \Stripe\StripeObject $custom_text
- * @property null|string|\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in payment or subscription mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created.
+ * @property null|string|\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in subscription mode or Checkout Sessions with customer_creation set as always in payment mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created.
* @property null|string $customer_creation Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
- * @property null|\Stripe\StripeObject $customer_details The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in setup mode.
+ * @property null|\Stripe\StripeObject $customer_details The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in setup mode.
* @property null|string $customer_email If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the customer attribute.
* @property int $expires_at The timestamp at which the Checkout Session will expire.
* @property null|string|\Stripe\Invoice $invoice ID of the invoice created by the Checkout Session, if it exists.
* @property null|\Stripe\StripeObject $invoice_creation Details on the state of invoice creation for the Checkout Session.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items The line items purchased by the customer.
+ * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items The line items purchased by the customer.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property null|string $locale The IETF language tag of the locale Checkout is displayed in. If blank or auto, the browser's locale is used.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property string $mode The mode of the Checkout Session.
- * @property null|string|\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in payment mode.
+ * @property null|string|\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in payment mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, expire the Checkout Session instead.
* @property null|string|\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session.
- * @property null|string $payment_method_collection Configure whether a Checkout Session should collect a payment method.
+ * @property null|string $payment_method_collection Configure whether a Checkout Session should collect a payment method. Defaults to always.
+ * @property null|\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
* @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
* @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
* @property string $payment_status The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer's order.
- * @property \Stripe\StripeObject $phone_number_collection
+ * @property null|\Stripe\StripeObject $phone_number_collection
* @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow.
- * @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in setup mode.
+ * @property null|string $redirect_on_completion This parameter applies to ui_mode: embedded. 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. 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|\Stripe\StripeObject $saved_payment_method_options Controls saved payment method settings for the session. Only available in payment and subscription mode.
+ * @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in setup mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, expire the Checkout Session instead.
* @property null|\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer.
* @property null|\Stripe\StripeObject $shipping_cost The details of the customer cost of shipping, including the customer chosen ShippingRate.
* @property null|\Stripe\StripeObject $shipping_details Shipping information for this Checkout Session.
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to this Session.
* @property null|string $status The status of the Checkout Session, one of open, complete, or expired.
- * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type can only be specified on Checkout Sessions in payment mode, but not Checkout Sessions in subscription or setup mode.
+ * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type can only be specified on Checkout Sessions in payment mode. If blank or auto, pay is used.
* @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in subscription mode.
- * @property string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
- * @property \Stripe\StripeObject $tax_id_collection
+ * @property null|string $success_url The URL the customer will be directed to after the payment or subscription creation is successful.
+ * @property null|\Stripe\StripeObject $tax_id_collection
* @property null|\Stripe\StripeObject $total_details Tax and discount details for the computed total amount.
+ * @property null|string $ui_mode The UI mode of the Session. Defaults to hosted.
* @property null|string $url The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value is only present when the session is active.
*/
class Session extends \Stripe\ApiResource
{
const OBJECT_NAME = 'checkout.session';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
+ use \Stripe\ApiOperations\Update;
const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';
@@ -96,6 +100,10 @@ class Session extends \Stripe\ApiResource
const PAYMENT_STATUS_PAID = 'paid';
const PAYMENT_STATUS_UNPAID = 'unpaid';
+ const REDIRECT_ON_COMPLETION_ALWAYS = 'always';
+ const REDIRECT_ON_COMPLETION_IF_REQUIRED = 'if_required';
+ const REDIRECT_ON_COMPLETION_NEVER = 'never';
+
const STATUS_COMPLETE = 'complete';
const STATUS_EXPIRED = 'expired';
const STATUS_OPEN = 'open';
@@ -104,6 +112,91 @@ class Session extends \Stripe\ApiResource
const SUBMIT_TYPE_BOOK = 'book';
const SUBMIT_TYPE_DONATE = 'donate';
const SUBMIT_TYPE_PAY = 'pay';
+ const SUBMIT_TYPE_SUBSCRIBE = 'subscribe';
+
+ const UI_MODE_EMBEDDED = 'embedded';
+ const UI_MODE_HOSTED = 'hosted';
+
+ /**
+ * Creates a Session object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Checkout\Session the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of Checkout Sessions.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Checkout\Session> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a Session object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Checkout\Session
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a Session object.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Checkout\Session the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
/**
* @param null|array $params
@@ -129,7 +222,7 @@ class Session extends \Stripe\ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\LineItem> list of LineItems
+ * @return \Stripe\Collection<\Stripe\LineItem> list of line items
*/
public static function allLineItems($id, $params = null, $opts = null)
{
diff --git a/plugins/stripe-php/lib/Climate/Order.php b/plugins/stripe-php/lib/Climate/Order.php
new file mode 100644
index 00000000..5d96204c
--- /dev/null
+++ b/plugins/stripe-php/lib/Climate/Order.php
@@ -0,0 +1,150 @@
+Frontier's service fees in the currency's smallest unit.
+ * @property int $amount_subtotal Total amount of the carbon removal in the currency's smallest unit.
+ * @property int $amount_total Total amount of the order including fees in the currency's smallest unit.
+ * @property null|\Stripe\StripeObject $beneficiary
+ * @property null|int $canceled_at Time at which the order was canceled. Measured in seconds since the Unix epoch.
+ * @property null|string $cancellation_reason Reason for the cancellation of this order.
+ * @property null|string $certificate For delivered orders, a URL to a delivery certificate for the order.
+ * @property null|int $confirmed_at Time at which the order was confirmed. Measured in seconds since the Unix epoch.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase, representing the currency for this order.
+ * @property null|int $delayed_at Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.
+ * @property null|int $delivered_at Time at which the order was delivered. Measured in seconds since the Unix epoch.
+ * @property \Stripe\StripeObject[] $delivery_details Details about the delivery of carbon removal for this order.
+ * @property int $expected_delivery_year The year this order is expected to be delivered.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property string $metric_tons Quantity of carbon removal that is included in this order.
+ * @property string|\Stripe\Climate\Product $product Unique ID for the Climate Product this order is purchasing.
+ * @property null|int $product_substituted_at Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.
+ * @property string $status The current status of this order.
+ */
+class Order extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'climate.order';
+
+ use \Stripe\ApiOperations\Update;
+
+ const CANCELLATION_REASON_EXPIRED = 'expired';
+ const CANCELLATION_REASON_PRODUCT_UNAVAILABLE = 'product_unavailable';
+ const CANCELLATION_REASON_REQUESTED = 'requested';
+
+ const STATUS_AWAITING_FUNDS = 'awaiting_funds';
+ const STATUS_CANCELED = 'canceled';
+ const STATUS_CONFIRMED = 'confirmed';
+ const STATUS_DELIVERED = 'delivered';
+ const STATUS_OPEN = 'open';
+
+ /**
+ * Creates a Climate order object for a given Climate product. The order will be
+ * processed immediately after creation and payment will be deducted your Stripe
+ * balance.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Order the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Lists all Climate order objects. The orders are returned sorted by creation
+ * date, with the most recently created orders appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Climate\Order> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a Climate order object with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Order
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified order by setting the values of the parameters passed.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Order the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Order the canceled order
+ */
+ public function cancel($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/cancel';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/Climate/Product.php b/plugins/stripe-php/lib/Climate/Product.php
new file mode 100644
index 00000000..3b7bc61c
--- /dev/null
+++ b/plugins/stripe-php/lib/Climate/Product.php
@@ -0,0 +1,60 @@
+climsku_. See carbon removal inventory for a list of available carbon removal products.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property \Stripe\StripeObject $current_prices_per_metric_ton Current prices for a metric ton of carbon removal in a currency's smallest unit.
+ * @property null|int $delivery_year The year in which the carbon removal is expected to be delivered.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $metric_tons_available The quantity of metric tons available for reservation.
+ * @property string $name The Climate product's name.
+ * @property \Stripe\Climate\Supplier[] $suppliers The carbon removal suppliers that fulfill orders for this Climate product.
+ */
+class Product extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'climate.product';
+
+ /**
+ * Lists all available Climate product objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Climate\Product> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a Climate product with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Product
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/Climate/Supplier.php b/plugins/stripe-php/lib/Climate/Supplier.php
new file mode 100644
index 00000000..4b298c9d
--- /dev/null
+++ b/plugins/stripe-php/lib/Climate/Supplier.php
@@ -0,0 +1,61 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject[] $locations The locations in which this supplier operates.
+ * @property string $name Name of this carbon removal supplier.
+ * @property string $removal_pathway The scientific pathway used for carbon removal.
+ */
+class Supplier extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'climate.supplier';
+
+ const REMOVAL_PATHWAY_BIOMASS_CARBON_REMOVAL_AND_STORAGE = 'biomass_carbon_removal_and_storage';
+ const REMOVAL_PATHWAY_DIRECT_AIR_CAPTURE = 'direct_air_capture';
+ const REMOVAL_PATHWAY_ENHANCED_WEATHERING = 'enhanced_weathering';
+
+ /**
+ * Lists all available Climate supplier objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Climate\Supplier> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a Climate supplier object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Supplier
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Collection.php b/plugins/stripe-php/lib/Collection.php
similarity index 98%
rename from plugins/stripe-php-10.5.0/lib/Collection.php
rename to plugins/stripe-php/lib/Collection.php
index 67da085d..bd8d7db8 100644
--- a/plugins/stripe-php-10.5.0/lib/Collection.php
+++ b/plugins/stripe-php/lib/Collection.php
@@ -165,6 +165,8 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
}
/**
+ * @throws Exception\ApiErrorException
+ *
* @return \Generator|TStripeObject[] A generator that can be used to
* iterate across all objects across all pages. As page boundaries are
* encountered, the next page will be fetched automatically for
@@ -228,6 +230,8 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate
* @param null|array $params
* @param null|array|string $opts
*
+ * @throws Exception\ApiErrorException
+ *
* @return Collectiontrue if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $mandate_data Data used for generating a Mandate.
+ * @property null|string $payment_intent ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
+ * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this ConfirmationToken.
+ * @property null|\Stripe\StripeObject $payment_method_preview Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
+ * @property null|string $return_url Return URL used to confirm the Intent.
+ * @property null|string $setup_future_usage Indicates 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. + * @property null|\Stripe\StripeObject $shipping Shipping information collected on this ConfirmationToken. + * @property bool $use_stripe_sdk Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults totrue on ConfirmationToken.
+ */
+class ConfirmationToken extends ApiResource
+{
+ const OBJECT_NAME = 'confirmation_token';
+
+ const SETUP_FUTURE_USAGE_OFF_SESSION = 'off_session';
+ const SETUP_FUTURE_USAGE_ON_SESSION = 'on_session';
+
+ /**
+ * Retrieves an existing ConfirmationToken object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ConfirmationToken
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/ConnectCollectionTransfer.php b/plugins/stripe-php/lib/ConnectCollectionTransfer.php
new file mode 100644
index 00000000..69f961d0
--- /dev/null
+++ b/plugins/stripe-php/lib/ConnectCollectionTransfer.php
@@ -0,0 +1,18 @@
+ISO currency code, in lowercase. Must be a supported currency.
+ * @property string|\Stripe\Account $destination ID of the account that funds are being collected for.
+ * @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.
+ */
+class ConnectCollectionTransfer extends ApiResource
+{
+ const OBJECT_NAME = 'connect_collection_transfer';
+}
diff --git a/plugins/stripe-php-10.5.0/lib/CountrySpec.php b/plugins/stripe-php/lib/CountrySpec.php
similarity index 56%
rename from plugins/stripe-php-10.5.0/lib/CountrySpec.php
rename to plugins/stripe-php/lib/CountrySpec.php
index 223afb31..aa601a7a 100644
--- a/plugins/stripe-php-10.5.0/lib/CountrySpec.php
+++ b/plugins/stripe-php/lib/CountrySpec.php
@@ -9,8 +9,8 @@ namespace Stripe;
* created. These requirements can differ depending on the account's country. The
* Country Specs API makes these rules available to your integration.
*
- * You can also view the information from this API call as an online guide.
+ * You can also view the information from this API call as an online
+ * guide.
*
* @property string $id Unique identifier for the object. Represented as the ISO country code for this country.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -25,6 +25,39 @@ class CountrySpec extends ApiResource
{
const OBJECT_NAME = 'country_spec';
- use ApiOperations\All;
- use ApiOperations\Retrieve;
+ /**
+ * Lists all Country Spec objects available in the API.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\CountrySpec> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Returns a Country Spec for a given Country code.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\CountrySpec
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
}
diff --git a/plugins/stripe-php/lib/Coupon.php b/plugins/stripe-php/lib/Coupon.php
new file mode 100644
index 00000000..cf110919
--- /dev/null
+++ b/plugins/stripe-php/lib/Coupon.php
@@ -0,0 +1,159 @@
+subscriptions, invoices,
+ * checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|int $amount_off Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer.
+ * @property null|\Stripe\StripeObject $applies_to
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string $currency If amount_off has been set, the three-letter ISO code for the currency of the amount to take off.
+ * @property null|\Stripe\StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
+ * @property string $duration One of forever, once, and repeating. Describes how long a customer who applies this coupon will get the discount.
+ * @property null|int $duration_in_months If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts.
+ * @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
+ * @property null|int $redeem_by Date after which the coupon can no longer be redeemed.
+ * @property int $times_redeemed Number of times this coupon has been applied to a customer.
+ * @property bool $valid Taking account of the above properties, whether this coupon can still be applied to a customer.
+ */
+class Coupon extends ApiResource
+{
+ const OBJECT_NAME = 'coupon';
+
+ use ApiOperations\Update;
+
+ const DURATION_FOREVER = 'forever';
+ const DURATION_ONCE = 'once';
+ const DURATION_REPEATING = 'repeating';
+
+ /**
+ * You can create coupons easily via the coupon management page of the
+ * Stripe dashboard. Coupon creation is also accessible via the API if you need to
+ * create coupons on the fly.
+ *
+ * A coupon has either a percent_off or an amount_off and
+ * currency. If you set an amount_off, that amount will
+ * be subtracted from any invoice’s subtotal. For example, an invoice with a
+ * subtotal of amount_off of
+ * amount_off of created unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
* @property string|\Stripe\Invoice $invoice ID of the invoice.
* @property \Stripe\Collection<\Stripe\CreditNoteLineItem> $lines Line items that make up the credit note
* @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.
@@ -29,15 +28,16 @@ namespace Stripe;
* @property string $number A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
* @property null|int $out_of_band_amount Amount that was credited outside of Stripe.
* @property string $pdf The link to download the PDF of the credit note.
+ * @property null|\Stripe\StripeObject[] $pretax_credit_amounts The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
* @property null|string $reason Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory
* @property null|string|\Stripe\Refund $refund Refund related to this credit note.
* @property null|\Stripe\StripeObject $shipping_cost The details of the cost of shipping, including the ShippingRate applied to the invoice.
* @property string $status Status of this credit note, one of issued or void. Learn more about voiding credit notes.
- * @property int $subtotal The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
- * @property null|int $subtotal_excluding_tax The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.
+ * @property int $subtotal The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
+ * @property null|int $subtotal_excluding_tax The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
* @property \Stripe\StripeObject[] $tax_amounts The aggregate amounts calculated per tax rate for all line items.
- * @property int $total The integer amount in %s representing the total amount of the credit note, including tax and all discount.
- * @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.
+ * @property int $total The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
+ * @property null|int $total_excluding_tax The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
* @property string $type Type of this credit note, one of pre_payment or post_payment. A pre_payment credit note means it was issued when the invoice was open. A post_payment credit note means it was issued when the invoice was paid.
* @property null|int $voided_at The time that the credit note was voided.
*/
@@ -45,10 +45,7 @@ class CreditNote extends ApiResource
{
const OBJECT_NAME = 'credit_note';
- use ApiOperations\All;
- use ApiOperations\Create;
use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
use ApiOperations\Update;
const REASON_DUPLICATE = 'duplicate';
@@ -62,6 +59,106 @@ class CreditNote extends ApiResource
const TYPE_POST_PAYMENT = 'post_payment';
const TYPE_PRE_PAYMENT = 'pre_payment';
+ /**
+ * Issue a credit note to adjust the amount of a finalized invoice. For a
+ * status=open invoice, a credit note reduces its
+ * amount_due. For a status=paid invoice, a credit note
+ * does not affect its amount_due. Instead, it can result in any
+ * combination of the following:.
+ *
+ * refund_amount) or link
+ * an existing refund (using refund).credit_amount) which
+ * will be automatically applied to their next invoice when it’s finalized.out_of_band_amount).pre_payment_credit_notes_amount or
+ * post_payment_credit_notes_amount depending on its
+ * status at the time of credit note creation.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\CreditNote the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of credit notes.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\CreditNote> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the credit note object with the given identifier.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\CreditNote
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates an existing credit note.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\CreditNote the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
@@ -86,7 +183,7 @@ class CreditNote extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\CreditNoteLineItem> list of CreditNoteLineItems
+ * @return \Stripe\Collection<\Stripe\CreditNoteLineItem> list of credit note line items
*/
public static function previewLines($params = null, $opts = null)
{
diff --git a/plugins/stripe-php-10.5.0/lib/CreditNoteLineItem.php b/plugins/stripe-php/lib/CreditNoteLineItem.php
similarity index 66%
rename from plugins/stripe-php-10.5.0/lib/CreditNoteLineItem.php
rename to plugins/stripe-php/lib/CreditNoteLineItem.php
index 6b2ca2e3..357dc0fb 100644
--- a/plugins/stripe-php-10.5.0/lib/CreditNoteLineItem.php
+++ b/plugins/stripe-php/lib/CreditNoteLineItem.php
@@ -5,22 +5,25 @@
namespace Stripe;
/**
+ * The credit note line item object.
+ *
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
- * @property null|int $amount_excluding_tax The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.
+ * @property int $amount The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
+ * @property null|int $amount_excluding_tax The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts.
* @property null|string $description Description of the item being credited.
- * @property int $discount_amount The integer amount in %s representing the discount being credited for this line item.
+ * @property int $discount_amount The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
* @property \Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item
- * @property string $invoice_line_item ID of the invoice line item being credited
+ * @property null|string $invoice_line_item ID of the invoice line item being credited
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject[] $pretax_credit_amounts The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
* @property null|int $quantity The number of units of product being credited.
* @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
* @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
* @property string $type The type of the credit note line item, one of invoice_line_item or custom_line_item. When the type is invoice_line_item there is an additional invoice_line_item property on the resource the value of which is the id of the credited line item on the invoice.
* @property null|int $unit_amount The cost of each unit of product being credited.
* @property null|string $unit_amount_decimal Same as unit_amount, but contains a decimal value with at most 12 decimal places.
- * @property null|string $unit_amount_excluding_tax The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.
+ * @property null|string $unit_amount_excluding_tax The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts.
*/
class CreditNoteLineItem extends ApiResource
{
diff --git a/plugins/stripe-php-10.5.0/lib/Customer.php b/plugins/stripe-php/lib/Customer.php
similarity index 63%
rename from plugins/stripe-php-10.5.0/lib/Customer.php
rename to plugins/stripe-php/lib/Customer.php
index 3c3413c0..1c7d246f 100644
--- a/plugins/stripe-php-10.5.0/lib/Customer.php
+++ b/plugins/stripe-php/lib/Customer.php
@@ -5,58 +5,165 @@
namespace Stripe;
/**
- * This object represents a customer of your business. It lets you create recurring
- * charges and track payments that belong to the same customer.
- *
- * Related guide: Save a card during
- * payment.
+ * This object represents a customer of your business. Use it to create recurring charges, save payment and contact information,
+ * and track payments that belong to the same customer.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|\Stripe\StripeObject $address The customer's address.
- * @property int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
- * @property null|\Stripe\CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically.
+ * @property null|int $balance The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize.
+ * @property null|\Stripe\CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The settings[reconciliation_mode] field describes if these funds apply to these payment intents manually or automatically.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes.
- * @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the customer.
If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method field instead.
- * @property null|bool $delinquentWhen the customer's latest invoice is billed by charging automatically, delinquent is true if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, delinquent is true if the invoice isn't paid by its due date.
If an invoice is marked uncollectible by dunning, delinquent doesn't get reset to false.
ID of the default payment source for the customer.
If you use payment methods created through the PaymentMethods API, see the invoice_settings.default_payment_method field instead.
+ * @property null|bool $delinquentTracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the invoice.due_date will set this field to true.
If an invoice becomes uncollectible by dunning, delinquent doesn't reset to false.
If you care whether the customer has paid their most recent subscription invoice, use subscription.status instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to false.
true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|string $name The customer's full name or business name.
- * @property int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001.
+ * @property null|int $next_invoice_sequence The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.
* @property null|string $phone The customer's phone number.
* @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference.
* @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
- * @property \Stripe\Collection<\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source> $sources The customer's payment sources, if any.
- * @property \Stripe\Collection<\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any.
- * @property \Stripe\StripeObject $tax
- * @property null|string $tax_exempt Describes the customer's tax exemption status. One of none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the text "Reverse charge".
- * @property \Stripe\Collection<\Stripe\TaxId> $tax_ids The customer's tax IDs.
- * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this customer belongs to.
+ * @property null|\Stripe\Collection<\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source> $sources The customer's payment sources, if any.
+ * @property null|\Stripe\Collection<\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any.
+ * @property null|\Stripe\StripeObject $tax
+ * @property null|string $tax_exempt Describes the customer's tax exemption status, which is none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the following text: "Reverse charge".
+ * @property null|\Stripe\Collection<\Stripe\TaxId> $tax_ids The customer's tax IDs.
+ * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock that this customer belongs to.
*/
class Customer extends ApiResource
{
const OBJECT_NAME = 'customer';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
use ApiOperations\Update;
const TAX_EXEMPT_EXEMPT = 'exempt';
const TAX_EXEMPT_NONE = 'none';
const TAX_EXEMPT_REVERSE = 'reverse';
+ /**
+ * Creates a new customer object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Customer the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Permanently deletes a customer. It cannot be undone. Also immediately cancels
+ * any active subscriptions on the customer.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Customer the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of your customers. The customers are returned sorted by creation
+ * date, with the most recent customers appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Customer> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a Customer object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Customer
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified customer by setting the values of the parameters passed.
+ * Any parameters not provided will be left unchanged. For example, if you pass the
+ * source parameter, that becomes the customer’s active source
+ * (e.g., a card) to be used for all charges in the future. When you update a
+ * customer to a new valid card source by passing the source
+ * parameter: for each of the customer’s current subscriptions, if the subscription
+ * bills automatically and is in the past_due state, then the latest
+ * open invoice for the subscription with automatic collection enabled will be
+ * retried. This retry will not count as an automatic retry, and will not affect
+ * the next regularly scheduled payment for the invoice. Changing the
+ * default_source for a customer will not trigger this behavior.
+ *
+ * This request accepts mostly the same arguments as the customer creation call.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Customer the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
public static function getSavedNestedResources()
{
static $savedNestedResources = null;
@@ -91,7 +198,7 @@ class Customer extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\PaymentMethod> list of PaymentMethods
+ * @return \Stripe\Collection<\Stripe\PaymentMethod> list of payment methods
*/
public static function allPaymentMethods($id, $params = null, $opts = null)
{
@@ -110,7 +217,7 @@ class Customer extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Customer the retrieved customer
+ * @return \Stripe\PaymentMethod the retrieved payment method
*/
public function retrievePaymentMethod($payment_method, $params = null, $opts = null)
{
@@ -128,46 +235,15 @@ class Customer extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\SearchResultbalance
- * value, which denotes a debit or credit that's automatically applied to their
- * next invoice upon finalization. You may modify the value directly by using the
- * update customer API,
- * or by creating a Customer Balance Transaction, which increments or decrements
- * the customer's balance by the specified amount.
+ * Each customer has a Balance value,
+ * which denotes a debit or credit that's automatically applied to their next invoice upon finalization.
+ * You may modify the value directly by using the update customer API,
+ * or by creating a Customer Balance Transaction, which increments or decrements the customer's balance by the specified amount.
*
- * Related guide: Customer Balance to
- * learn more.
+ * Related guide: Customer balance
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
diff --git a/plugins/stripe-php-10.5.0/lib/CustomerCashBalanceTransaction.php b/plugins/stripe-php/lib/CustomerCashBalanceTransaction.php
similarity index 68%
rename from plugins/stripe-php-10.5.0/lib/CustomerCashBalanceTransaction.php
rename to plugins/stripe-php/lib/CustomerCashBalanceTransaction.php
index f492bb62..aa8819e1 100644
--- a/plugins/stripe-php-10.5.0/lib/CustomerCashBalanceTransaction.php
+++ b/plugins/stripe-php/lib/CustomerCashBalanceTransaction.php
@@ -5,38 +5,38 @@
namespace Stripe;
/**
- * Customers with certain payments enabled have a cash balance, representing funds
- * that were paid by the customer to a merchant, but have not yet been allocated to
- * a payment. Cash Balance Transactions represent when funds are moved into or out
- * of this balance. This includes funding by the customer, allocation to payments,
- * and refunds to the customer.
+ * Customers with certain payments enabled have a cash balance, representing funds that were paid
+ * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions
+ * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation
+ * to payments, and refunds to the customer.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $applied_to_payment
+ * @property null|\Stripe\StripeObject $adjusted_for_overdraft
+ * @property null|\Stripe\StripeObject $applied_to_payment
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property string|\Stripe\Customer $customer The customer whose available cash balance changed as a result of this transaction.
* @property int $ending_balance The total available cash balance for the specified currency after this transaction was applied. Represented in the smallest currency unit.
- * @property \Stripe\StripeObject $funded
+ * @property null|\Stripe\StripeObject $funded
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property int $net_amount The amount by which the cash balance changed, represented in the smallest currency unit. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
- * @property \Stripe\StripeObject $refunded_from_payment
- * @property string $type The type of the cash balance transaction. One of applied_to_payment, unapplied_from_payment, refunded_from_payment, funded, return_initiated, or return_canceled. New types may be added in future. See Customer Balance to learn more about these types.
- * @property \Stripe\StripeObject $unapplied_from_payment
+ * @property null|\Stripe\StripeObject $refunded_from_payment
+ * @property null|\Stripe\StripeObject $transferred_to_balance
+ * @property string $type The type of the cash balance transaction. New types may be added in future. See Customer Balance to learn more about these types.
+ * @property null|\Stripe\StripeObject $unapplied_from_payment
*/
class CustomerCashBalanceTransaction extends ApiResource
{
const OBJECT_NAME = 'customer_cash_balance_transaction';
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-
+ const TYPE_ADJUSTED_FOR_OVERDRAFT = 'adjusted_for_overdraft';
const TYPE_APPLIED_TO_PAYMENT = 'applied_to_payment';
const TYPE_FUNDED = 'funded';
const TYPE_FUNDING_REVERSED = 'funding_reversed';
const TYPE_REFUNDED_FROM_PAYMENT = 'refunded_from_payment';
const TYPE_RETURN_CANCELED = 'return_canceled';
const TYPE_RETURN_INITIATED = 'return_initiated';
+ const TYPE_TRANSFERRED_TO_BALANCE = 'transferred_to_balance';
const TYPE_UNAPPLIED_FROM_PAYMENT = 'unapplied_from_payment';
}
diff --git a/plugins/stripe-php/lib/CustomerSession.php b/plugins/stripe-php/lib/CustomerSession.php
new file mode 100644
index 00000000..e84bb8c9
--- /dev/null
+++ b/plugins/stripe-php/lib/CustomerSession.php
@@ -0,0 +1,50 @@
+Customer Session with the Payment Element,
+ * Customer Session with the Pricing Table,
+ * Customer Session with the Buy Button.
+ *
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property string $client_secret The client secret of this Customer Session. Used on the client to set up secure access to the given customer.
The client secret can be used to provide access to customer from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.
true if the object exists in live mode or the value false if the object exists in test mode.
+ */
+class CustomerSession extends ApiResource
+{
+ const OBJECT_NAME = 'customer_session';
+
+ /**
+ * Creates a Customer Session object that includes a single-use client secret that
+ * you can use on your front-end to grant client-side API access for certain
+ * customer resources.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\CustomerSession the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Discount.php b/plugins/stripe-php/lib/Discount.php
new file mode 100644
index 00000000..e1f3f84a
--- /dev/null
+++ b/plugins/stripe-php/lib/Discount.php
@@ -0,0 +1,29 @@
+coupon or promotion code.
+ * It contains information about when the discount began, when it will end, and what it is applied to.
+ *
+ * Related guide: Applying discounts to subscriptions
+ *
+ * @property string $id The ID of the discount object. Discounts cannot be fetched by ID. Use expand[]=discounts in API calls to expand discount IDs in an array.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|string $checkout_session The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
+ * @property \Stripe\Coupon $coupon A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents.
+ * @property null|string|\Stripe\Customer $customer The ID of the customer associated with this discount.
+ * @property null|int $end If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null.
+ * @property null|string $invoice The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
+ * @property null|string $invoice_item The invoice item id (or invoice line item id for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
+ * @property null|string|\Stripe\PromotionCode $promotion_code The promotion code applied to create this discount.
+ * @property int $start Date that the coupon was applied.
+ * @property null|string $subscription The subscription that this coupon is applied to, if it is applied to a particular subscription.
+ * @property null|string $subscription_item The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
+ */
+class Discount extends ApiResource
+{
+ const OBJECT_NAME = 'discount';
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Dispute.php b/plugins/stripe-php/lib/Dispute.php
similarity index 55%
rename from plugins/stripe-php-10.5.0/lib/Dispute.php
rename to plugins/stripe-php/lib/Dispute.php
index 108495e6..4cac7523 100644
--- a/plugins/stripe-php-10.5.0/lib/Dispute.php
+++ b/plugins/stripe-php/lib/Dispute.php
@@ -6,37 +6,34 @@ namespace Stripe;
/**
* A dispute occurs when a customer questions your charge with their card issuer.
- * When this happens, you're given the opportunity to respond to the dispute with
- * evidence that shows that the charge is legitimate. You can find more information
- * about the dispute process in our Disputes and Fraud
- * documentation.
+ * When this happens, you have the opportunity to respond to the dispute with
+ * evidence that shows that the charge is legitimate.
*
- * Related guide: Disputes and
- * Fraud.
+ * Related guide: Disputes and fraud
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).
+ * @property int $amount Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed).
* @property \Stripe\BalanceTransaction[] $balance_transactions List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
- * @property string|\Stripe\Charge $charge ID of the charge that was disputed.
+ * @property string|\Stripe\Charge $charge ID of the charge that's disputed.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property string[] $enhanced_eligibility_types List of eligibility types that are included in enhanced_evidence.
* @property \Stripe\StripeObject $evidence
* @property \Stripe\StripeObject $evidence_details
- * @property bool $is_charge_refundable If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this 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 Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|string $network_reason_code Network-dependent reason code for the dispute.
- * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was disputed.
- * @property string $reason Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Read more about dispute reasons.
- * @property string $status Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, charge_refunded, won, or lost.
+ * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that's disputed.
+ * @property null|\Stripe\StripeObject $payment_method_details
+ * @property string $reason Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Learn more about dispute reasons.
+ * @property string $status Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, won, or lost.
*/
class Dispute extends ApiResource
{
const OBJECT_NAME = 'dispute';
- use ApiOperations\All;
- use ApiOperations\Retrieve;
use ApiOperations\Update;
const REASON_BANK_CANNOT_PROCESS = 'bank_cannot_process';
@@ -54,7 +51,6 @@ class Dispute extends ApiResource
const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled';
const REASON_UNRECOGNIZED = 'unrecognized';
- const STATUS_CHARGE_REFUNDED = 'charge_refunded';
const STATUS_LOST = 'lost';
const STATUS_NEEDS_RESPONSE = 'needs_response';
const STATUS_UNDER_REVIEW = 'under_review';
@@ -63,6 +59,73 @@ class Dispute extends ApiResource
const STATUS_WARNING_UNDER_REVIEW = 'warning_under_review';
const STATUS_WON = 'won';
+ /**
+ * Returns a list of your disputes.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Dispute> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the dispute with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Dispute
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * When you get a dispute, contacting your customer is always the best first step.
+ * If that doesn’t work, you can submit evidence to help us resolve the dispute in
+ * your favor. You can do this in your dashboard, but if you prefer,
+ * you can use the API to submit evidence programmatically.
+ *
+ * Depending on your dispute type, different evidence fields will give you a better
+ * chance of winning your dispute. To figure out which evidence fields to provide,
+ * see our guide to dispute types.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Dispute the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
diff --git a/plugins/stripe-php/lib/Entitlements/ActiveEntitlement.php b/plugins/stripe-php/lib/Entitlements/ActiveEntitlement.php
new file mode 100644
index 00000000..d3ea3265
--- /dev/null
+++ b/plugins/stripe-php/lib/Entitlements/ActiveEntitlement.php
@@ -0,0 +1,55 @@
+Feature that the customer is entitled 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.
+ * @property string $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters.
+ */
+class ActiveEntitlement extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'entitlements.active_entitlement';
+
+ /**
+ * Retrieve a list of active entitlements for a customer.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Entitlements\ActiveEntitlement> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieve an active entitlement.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Entitlements\ActiveEntitlement
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/Entitlements/ActiveEntitlementSummary.php b/plugins/stripe-php/lib/Entitlements/ActiveEntitlementSummary.php
new file mode 100644
index 00000000..46a9105f
--- /dev/null
+++ b/plugins/stripe-php/lib/Entitlements/ActiveEntitlementSummary.php
@@ -0,0 +1,18 @@
+ $entitlements The list of entitlements this customer has.
+ * @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.
+ */
+class ActiveEntitlementSummary extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'entitlements.active_entitlement_summary';
+}
diff --git a/plugins/stripe-php/lib/Entitlements/Feature.php b/plugins/stripe-php/lib/Entitlements/Feature.php
new file mode 100644
index 00000000..f7cd75c3
--- /dev/null
+++ b/plugins/stripe-php/lib/Entitlements/Feature.php
@@ -0,0 +1,105 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property string $name The feature's name, for your own purpose, not meant to be displayable to the customer.
+ */
+class Feature extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'entitlements.feature';
+
+ use \Stripe\ApiOperations\Update;
+
+ /**
+ * Creates a feature.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Entitlements\Feature the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Retrieve a list of features.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Entitlements\Feature> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a feature.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Entitlements\Feature
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Update a feature’s metadata or permanently deactivate it.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Entitlements\Feature the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/EphemeralKey.php b/plugins/stripe-php/lib/EphemeralKey.php
similarity index 66%
rename from plugins/stripe-php-10.5.0/lib/EphemeralKey.php
rename to plugins/stripe-php/lib/EphemeralKey.php
index ee8ecded..b69b0222 100644
--- a/plugins/stripe-php-10.5.0/lib/EphemeralKey.php
+++ b/plugins/stripe-php/lib/EphemeralKey.php
@@ -10,18 +10,37 @@ namespace Stripe;
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property int $expires Time at which the key will expire. Measured in seconds since the Unix epoch.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string $secret The key's secret. You can use this value to make authorized requests to the Stripe API.
+ * @property null|string $secret The key's secret. You can use this value to make authorized requests to the Stripe API.
*/
class EphemeralKey extends ApiResource
{
const OBJECT_NAME = 'ephemeral_key';
+ /**
+ * Invalidates a short-lived API key for a given resource.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\EphemeralKey the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
use ApiOperations\Create {
create as protected _create;
}
- use ApiOperations\Delete;
-
/**
* @param null|array $params
* @param null|array|string $opts
diff --git a/plugins/stripe-php-10.5.0/lib/ErrorObject.php b/plugins/stripe-php/lib/ErrorObject.php
similarity index 79%
rename from plugins/stripe-php-10.5.0/lib/ErrorObject.php
rename to plugins/stripe-php/lib/ErrorObject.php
index 3385aac0..02b5de3e 100644
--- a/plugins/stripe-php-10.5.0/lib/ErrorObject.php
+++ b/plugins/stripe-php/lib/ErrorObject.php
@@ -42,6 +42,8 @@ class ErrorObject extends StripeObject
*
* @see https://stripe.com/docs/error-codes
*/
+ // The beginning of the section generated from our OpenAPI spec
+ const CODE_ACCOUNT_CLOSED = 'account_closed';
const CODE_ACCOUNT_COUNTRY_INVALID_ADDRESS = 'account_country_invalid_address';
const CODE_ACCOUNT_ERROR_COUNTRY_CHANGE_REQUIRES_ADDITIONAL_STEPS = 'account_error_country_change_requires_additional_steps';
const CODE_ACCOUNT_INFORMATION_MISMATCH = 'account_information_mismatch';
@@ -52,16 +54,21 @@ class ErrorObject extends StripeObject
const CODE_AMOUNT_TOO_LARGE = 'amount_too_large';
const CODE_AMOUNT_TOO_SMALL = 'amount_too_small';
const CODE_API_KEY_EXPIRED = 'api_key_expired';
+ const CODE_APPLICATION_FEES_NOT_ALLOWED = 'application_fees_not_allowed';
const CODE_AUTHENTICATION_REQUIRED = 'authentication_required';
const CODE_BALANCE_INSUFFICIENT = 'balance_insufficient';
+ const CODE_BALANCE_INVALID_PARAMETER = 'balance_invalid_parameter';
const CODE_BANK_ACCOUNT_BAD_ROUTING_NUMBERS = 'bank_account_bad_routing_numbers';
const CODE_BANK_ACCOUNT_DECLINED = 'bank_account_declined';
const CODE_BANK_ACCOUNT_EXISTS = 'bank_account_exists';
+ const CODE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted';
const CODE_BANK_ACCOUNT_UNUSABLE = 'bank_account_unusable';
const CODE_BANK_ACCOUNT_UNVERIFIED = 'bank_account_unverified';
const CODE_BANK_ACCOUNT_VERIFICATION_FAILED = 'bank_account_verification_failed';
const CODE_BILLING_INVALID_MANDATE = 'billing_invalid_mandate';
const CODE_BITCOIN_UPGRADE_REQUIRED = 'bitcoin_upgrade_required';
+ const CODE_CAPTURE_CHARGE_AUTHORIZATION_EXPIRED = 'capture_charge_authorization_expired';
+ const CODE_CAPTURE_UNAUTHORIZED_PAYMENT = 'capture_unauthorized_payment';
const CODE_CARD_DECLINE_RATE_LIMIT_EXCEEDED = 'card_decline_rate_limit_exceeded';
const CODE_CARD_DECLINED = 'card_declined';
const CODE_CARDHOLDER_PHONE_NUMBER_REQUIRED = 'cardholder_phone_number_required';
@@ -69,22 +76,33 @@ class ErrorObject extends StripeObject
const CODE_CHARGE_ALREADY_REFUNDED = 'charge_already_refunded';
const CODE_CHARGE_DISPUTED = 'charge_disputed';
const CODE_CHARGE_EXCEEDS_SOURCE_LIMIT = 'charge_exceeds_source_limit';
+ const CODE_CHARGE_EXCEEDS_TRANSACTION_LIMIT = 'charge_exceeds_transaction_limit';
const CODE_CHARGE_EXPIRED_FOR_CAPTURE = 'charge_expired_for_capture';
const CODE_CHARGE_INVALID_PARAMETER = 'charge_invalid_parameter';
+ const CODE_CHARGE_NOT_REFUNDABLE = 'charge_not_refundable';
const CODE_CLEARING_CODE_UNSUPPORTED = 'clearing_code_unsupported';
const CODE_COUNTRY_CODE_INVALID = 'country_code_invalid';
const CODE_COUNTRY_UNSUPPORTED = 'country_unsupported';
const CODE_COUPON_EXPIRED = 'coupon_expired';
const CODE_CUSTOMER_MAX_PAYMENT_METHODS = 'customer_max_payment_methods';
const CODE_CUSTOMER_MAX_SUBSCRIPTIONS = 'customer_max_subscriptions';
+ const CODE_CUSTOMER_TAX_LOCATION_INVALID = 'customer_tax_location_invalid';
const CODE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
const CODE_EMAIL_INVALID = 'email_invalid';
const CODE_EXPIRED_CARD = 'expired_card';
+ const CODE_FINANCIAL_CONNECTIONS_ACCOUNT_INACTIVE = 'financial_connections_account_inactive';
+ const CODE_FINANCIAL_CONNECTIONS_NO_SUCCESSFUL_TRANSACTION_REFRESH = 'financial_connections_no_successful_transaction_refresh';
+ const CODE_FORWARDING_API_INACTIVE = 'forwarding_api_inactive';
+ const CODE_FORWARDING_API_INVALID_PARAMETER = 'forwarding_api_invalid_parameter';
+ const CODE_FORWARDING_API_UPSTREAM_CONNECTION_ERROR = 'forwarding_api_upstream_connection_error';
+ const CODE_FORWARDING_API_UPSTREAM_CONNECTION_TIMEOUT = 'forwarding_api_upstream_connection_timeout';
const CODE_IDEMPOTENCY_KEY_IN_USE = 'idempotency_key_in_use';
const CODE_INCORRECT_ADDRESS = 'incorrect_address';
const CODE_INCORRECT_CVC = 'incorrect_cvc';
const CODE_INCORRECT_NUMBER = 'incorrect_number';
const CODE_INCORRECT_ZIP = 'incorrect_zip';
+ const CODE_INSTANT_PAYOUTS_CONFIG_DISABLED = 'instant_payouts_config_disabled';
+ const CODE_INSTANT_PAYOUTS_CURRENCY_DISABLED = 'instant_payouts_currency_disabled';
const CODE_INSTANT_PAYOUTS_LIMIT_EXCEEDED = 'instant_payouts_limit_exceeded';
const CODE_INSTANT_PAYOUTS_UNSUPPORTED = 'instant_payouts_unsupported';
const CODE_INSUFFICIENT_FUNDS = 'insufficient_funds';
@@ -96,8 +114,10 @@ class ErrorObject extends StripeObject
const CODE_INVALID_CVC = 'invalid_cvc';
const CODE_INVALID_EXPIRY_MONTH = 'invalid_expiry_month';
const CODE_INVALID_EXPIRY_YEAR = 'invalid_expiry_year';
+ const CODE_INVALID_MANDATE_REFERENCE_PREFIX_FORMAT = 'invalid_mandate_reference_prefix_format';
const CODE_INVALID_NUMBER = 'invalid_number';
const CODE_INVALID_SOURCE_USAGE = 'invalid_source_usage';
+ const CODE_INVALID_TAX_LOCATION = 'invalid_tax_location';
const CODE_INVOICE_NO_CUSTOMER_LINE_ITEMS = 'invoice_no_customer_line_items';
const CODE_INVOICE_NO_PAYMENT_METHOD_TYPES = 'invoice_no_payment_method_types';
const CODE_INVOICE_NO_SUBSCRIPTION_LINE_ITEMS = 'invoice_no_subscription_line_items';
@@ -111,6 +131,7 @@ class ErrorObject extends StripeObject
const CODE_NO_ACCOUNT = 'no_account';
const CODE_NOT_ALLOWED_ON_STANDARD_ACCOUNT = 'not_allowed_on_standard_account';
const CODE_OUT_OF_INVENTORY = 'out_of_inventory';
+ const CODE_OWNERSHIP_DECLARATION_NOT_ALLOWED = 'ownership_declaration_not_allowed';
const CODE_PARAMETER_INVALID_EMPTY = 'parameter_invalid_empty';
const CODE_PARAMETER_INVALID_INTEGER = 'parameter_invalid_integer';
const CODE_PARAMETER_INVALID_STRING_BLANK = 'parameter_invalid_string_blank';
@@ -130,7 +151,9 @@ class ErrorObject extends StripeObject
const CODE_PAYMENT_METHOD_BANK_ACCOUNT_ALREADY_VERIFIED = 'payment_method_bank_account_already_verified';
const CODE_PAYMENT_METHOD_BANK_ACCOUNT_BLOCKED = 'payment_method_bank_account_blocked';
const CODE_PAYMENT_METHOD_BILLING_DETAILS_ADDRESS_MISSING = 'payment_method_billing_details_address_missing';
+ const CODE_PAYMENT_METHOD_CONFIGURATION_FAILURES = 'payment_method_configuration_failures';
const CODE_PAYMENT_METHOD_CURRENCY_MISMATCH = 'payment_method_currency_mismatch';
+ const CODE_PAYMENT_METHOD_CUSTOMER_DECLINE = 'payment_method_customer_decline';
const CODE_PAYMENT_METHOD_INVALID_PARAMETER = 'payment_method_invalid_parameter';
const CODE_PAYMENT_METHOD_INVALID_PARAMETER_TESTMODE = 'payment_method_invalid_parameter_testmode';
const CODE_PAYMENT_METHOD_MICRODEPOSIT_FAILED = 'payment_method_microdeposit_failed';
@@ -139,17 +162,21 @@ class ErrorObject extends StripeObject
const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_ATTEMPTS_EXCEEDED = 'payment_method_microdeposit_verification_attempts_exceeded';
const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_DESCRIPTOR_CODE_MISMATCH = 'payment_method_microdeposit_verification_descriptor_code_mismatch';
const CODE_PAYMENT_METHOD_MICRODEPOSIT_VERIFICATION_TIMEOUT = 'payment_method_microdeposit_verification_timeout';
+ const CODE_PAYMENT_METHOD_NOT_AVAILABLE = 'payment_method_not_available';
const CODE_PAYMENT_METHOD_PROVIDER_DECLINE = 'payment_method_provider_decline';
const CODE_PAYMENT_METHOD_PROVIDER_TIMEOUT = 'payment_method_provider_timeout';
const CODE_PAYMENT_METHOD_UNACTIVATED = 'payment_method_unactivated';
const CODE_PAYMENT_METHOD_UNEXPECTED_STATE = 'payment_method_unexpected_state';
const CODE_PAYMENT_METHOD_UNSUPPORTED_TYPE = 'payment_method_unsupported_type';
+ const CODE_PAYOUT_RECONCILIATION_NOT_READY = 'payout_reconciliation_not_ready';
+ const CODE_PAYOUTS_LIMIT_EXCEEDED = 'payouts_limit_exceeded';
const CODE_PAYOUTS_NOT_ALLOWED = 'payouts_not_allowed';
const CODE_PLATFORM_ACCOUNT_REQUIRED = 'platform_account_required';
const CODE_PLATFORM_API_KEY_EXPIRED = 'platform_api_key_expired';
const CODE_POSTAL_CODE_INVALID = 'postal_code_invalid';
const CODE_PROCESSING_ERROR = 'processing_error';
const CODE_PRODUCT_INACTIVE = 'product_inactive';
+ const CODE_PROGRESSIVE_ONBOARDING_LIMIT_EXCEEDED = 'progressive_onboarding_limit_exceeded';
const CODE_RATE_LIMIT = 'rate_limit';
const CODE_REFER_TO_CUSTOMER = 'refer_to_customer';
const CODE_REFUND_DISPUTED_PAYMENT = 'refund_disputed_payment';
@@ -162,21 +189,33 @@ class ErrorObject extends StripeObject
const CODE_SETUP_ATTEMPT_FAILED = 'setup_attempt_failed';
const CODE_SETUP_INTENT_AUTHENTICATION_FAILURE = 'setup_intent_authentication_failure';
const CODE_SETUP_INTENT_INVALID_PARAMETER = 'setup_intent_invalid_parameter';
+ const CODE_SETUP_INTENT_MANDATE_INVALID = 'setup_intent_mandate_invalid';
const CODE_SETUP_INTENT_SETUP_ATTEMPT_EXPIRED = 'setup_intent_setup_attempt_expired';
const CODE_SETUP_INTENT_UNEXPECTED_STATE = 'setup_intent_unexpected_state';
+ const CODE_SHIPPING_ADDRESS_INVALID = 'shipping_address_invalid';
const CODE_SHIPPING_CALCULATION_FAILED = 'shipping_calculation_failed';
const CODE_SKU_INACTIVE = 'sku_inactive';
const CODE_STATE_UNSUPPORTED = 'state_unsupported';
+ const CODE_STATUS_TRANSITION_INVALID = 'status_transition_invalid';
+ const CODE_STRIPE_TAX_INACTIVE = 'stripe_tax_inactive';
const CODE_TAX_ID_INVALID = 'tax_id_invalid';
const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed';
const CODE_TERMINAL_LOCATION_COUNTRY_UNSUPPORTED = 'terminal_location_country_unsupported';
+ const CODE_TERMINAL_READER_BUSY = 'terminal_reader_busy';
+ const CODE_TERMINAL_READER_HARDWARE_FAULT = 'terminal_reader_hardware_fault';
+ const CODE_TERMINAL_READER_INVALID_LOCATION_FOR_ACTIVATION = 'terminal_reader_invalid_location_for_activation';
+ const CODE_TERMINAL_READER_INVALID_LOCATION_FOR_PAYMENT = 'terminal_reader_invalid_location_for_payment';
+ const CODE_TERMINAL_READER_OFFLINE = 'terminal_reader_offline';
+ const CODE_TERMINAL_READER_TIMEOUT = 'terminal_reader_timeout';
const CODE_TESTMODE_CHARGES_ONLY = 'testmode_charges_only';
const CODE_TLS_VERSION_UNSUPPORTED = 'tls_version_unsupported';
const CODE_TOKEN_ALREADY_USED = 'token_already_used';
+ const CODE_TOKEN_CARD_NETWORK_INVALID = 'token_card_network_invalid';
const CODE_TOKEN_IN_USE = 'token_in_use';
const CODE_TRANSFER_SOURCE_BALANCE_PARAMETERS_MISMATCH = 'transfer_source_balance_parameters_mismatch';
const CODE_TRANSFERS_NOT_ALLOWED = 'transfers_not_allowed';
const CODE_URL_INVALID = 'url_invalid';
+ // The end of the section generated from our OpenAPI spec
/**
* Refreshes this object using the provided values.
@@ -184,8 +223,9 @@ class ErrorObject extends StripeObject
* @param array $values
* @param null|array|string|Util\RequestOptions $opts
* @param bool $partial defaults to false
+ * @param 'v1'|'v2' $apiMode
*/
- public function refreshFrom($values, $opts, $partial = false)
+ public function refreshFrom($values, $opts, $partial = false, $apiMode = 'v1')
{
// Unlike most other API resources, the API will omit attributes in
// error objects when they have a null value. We manually set default
diff --git a/plugins/stripe-php/lib/Event.php b/plugins/stripe-php/lib/Event.php
new file mode 100644
index 00000000..a935cc84
--- /dev/null
+++ b/plugins/stripe-php/lib/Event.php
@@ -0,0 +1,577 @@
+Event
+ * object. For example, when a charge succeeds, we create a charge.succeeded
+ * event, and when an invoice payment attempt fails, we create an
+ * invoice.payment_failed event. Certain API requests might create multiple
+ * events. For example, if you create a new subscription for a
+ * customer, you receive both a customer.subscription.created event and a
+ * charge.succeeded event.
+ *
+ * Events occur when the state of another API resource changes. The event's data
+ * field embeds the resource's state at the time of the change. For
+ * example, a charge.succeeded event contains a charge, and an
+ * invoice.payment_failed event contains an invoice.
+ *
+ * As with other API resources, you can use endpoints to retrieve an
+ * individual event or a list of events
+ * from the API. We also have a separate
+ * webhooks system for sending the
+ * Event objects directly to an endpoint on your server. You can manage
+ * webhooks in your
+ * account settings. Learn how
+ * to listen for events
+ * so that your integration can automatically trigger reactions.
+ *
+ * When using Connect, you can also receive event notifications
+ * that occur in connected accounts. For these events, there's an
+ * additional account attribute in the received Event object.
+ *
+ * We only guarantee access to events through the Retrieve Event API
+ * for 30 days.
+ *
+ * This class includes constants for the possible string representations of
+ * event types. See https://stripe.com/docs/api#event_types for more details.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|string $account The connected account that originates the event.
+ * @property null|string $api_version The Stripe API version used to render data. This property is populated only for events on or after October 31, 2014.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property \Stripe\StripeObject $data
+ * @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 $pending_webhooks Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.
+ * @property null|\Stripe\StripeObject $request Information on the API request that triggers the event.
+ * @property string $type Description of the event (for example, invoice.created or charge.refunded).
+ */
+class Event extends ApiResource
+{
+ const OBJECT_NAME = 'event';
+
+ const ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized';
+ const ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized';
+ const ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created';
+ const ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted';
+ const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated';
+ const ACCOUNT_UPDATED = 'account.updated';
+ const APPLICATION_FEE_CREATED = 'application_fee.created';
+ const APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
+ const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
+ const BALANCE_AVAILABLE = 'balance.available';
+ const BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
+ const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
+ const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
+ const BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
+ const CAPABILITY_UPDATED = 'capability.updated';
+ const CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available';
+ const CHARGE_CAPTURED = 'charge.captured';
+ const CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed';
+ const CHARGE_DISPUTE_CREATED = 'charge.dispute.created';
+ const CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated';
+ const CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn';
+ const CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated';
+ const CHARGE_EXPIRED = 'charge.expired';
+ const CHARGE_FAILED = 'charge.failed';
+ const CHARGE_PENDING = 'charge.pending';
+ const CHARGE_REFUNDED = 'charge.refunded';
+ const CHARGE_REFUND_UPDATED = 'charge.refund.updated';
+ const CHARGE_SUCCEEDED = 'charge.succeeded';
+ const CHARGE_UPDATED = 'charge.updated';
+ const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed';
+ const CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED = 'checkout.session.async_payment_succeeded';
+ const CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed';
+ const CHECKOUT_SESSION_EXPIRED = 'checkout.session.expired';
+ const CLIMATE_ORDER_CANCELED = 'climate.order.canceled';
+ const CLIMATE_ORDER_CREATED = 'climate.order.created';
+ const CLIMATE_ORDER_DELAYED = 'climate.order.delayed';
+ const CLIMATE_ORDER_DELIVERED = 'climate.order.delivered';
+ const CLIMATE_ORDER_PRODUCT_SUBSTITUTED = 'climate.order.product_substituted';
+ const CLIMATE_PRODUCT_CREATED = 'climate.product.created';
+ const CLIMATE_PRODUCT_PRICING_UPDATED = 'climate.product.pricing_updated';
+ const COUPON_CREATED = 'coupon.created';
+ const COUPON_DELETED = 'coupon.deleted';
+ const COUPON_UPDATED = 'coupon.updated';
+ const CREDIT_NOTE_CREATED = 'credit_note.created';
+ const CREDIT_NOTE_UPDATED = 'credit_note.updated';
+ const CREDIT_NOTE_VOIDED = 'credit_note.voided';
+ const CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created';
+ const CUSTOMER_CREATED = 'customer.created';
+ const CUSTOMER_DELETED = 'customer.deleted';
+ const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created';
+ const CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted';
+ const CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated';
+ const CUSTOMER_SOURCE_CREATED = 'customer.source.created';
+ const CUSTOMER_SOURCE_DELETED = 'customer.source.deleted';
+ const CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring';
+ const CUSTOMER_SOURCE_UPDATED = 'customer.source.updated';
+ const CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created';
+ const CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted';
+ const CUSTOMER_SUBSCRIPTION_PAUSED = 'customer.subscription.paused';
+ const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied';
+ const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired';
+ const CUSTOMER_SUBSCRIPTION_RESUMED = 'customer.subscription.resumed';
+ const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end';
+ const CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated';
+ const CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created';
+ const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted';
+ const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
+ const CUSTOMER_UPDATED = 'customer.updated';
+ const ENTITLEMENTS_ACTIVE_ENTITLEMENT_SUMMARY_UPDATED = 'entitlements.active_entitlement_summary.updated';
+ const FILE_CREATED = 'file.created';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_OWNERSHIP = 'financial_connections.account.refreshed_ownership';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_TRANSACTIONS = 'financial_connections.account.refreshed_transactions';
+ const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
+ const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
+ const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
+ const IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted';
+ const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input';
+ const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified';
+ const INVOICEITEM_CREATED = 'invoiceitem.created';
+ const INVOICEITEM_DELETED = 'invoiceitem.deleted';
+ const INVOICE_CREATED = 'invoice.created';
+ const INVOICE_DELETED = 'invoice.deleted';
+ const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
+ const INVOICE_FINALIZED = 'invoice.finalized';
+ const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible';
+ const INVOICE_OVERDUE = 'invoice.overdue';
+ const INVOICE_PAID = 'invoice.paid';
+ const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
+ const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
+ const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
+ const INVOICE_SENT = 'invoice.sent';
+ const INVOICE_UPCOMING = 'invoice.upcoming';
+ const INVOICE_UPDATED = 'invoice.updated';
+ const INVOICE_VOIDED = 'invoice.voided';
+ const INVOICE_WILL_BE_DUE = 'invoice.will_be_due';
+ const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created';
+ const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request';
+ const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated';
+ const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created';
+ const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated';
+ const ISSUING_CARD_CREATED = 'issuing_card.created';
+ const ISSUING_CARD_UPDATED = 'issuing_card.updated';
+ const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
+ const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
+ const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
+ const ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded';
+ const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
+ const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
+ const ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated';
+ const ISSUING_PERSONALIZATION_DESIGN_DEACTIVATED = 'issuing_personalization_design.deactivated';
+ const ISSUING_PERSONALIZATION_DESIGN_REJECTED = 'issuing_personalization_design.rejected';
+ const ISSUING_PERSONALIZATION_DESIGN_UPDATED = 'issuing_personalization_design.updated';
+ const ISSUING_TOKEN_CREATED = 'issuing_token.created';
+ const ISSUING_TOKEN_UPDATED = 'issuing_token.updated';
+ const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created';
+ const ISSUING_TRANSACTION_PURCHASE_DETAILS_RECEIPT_UPDATED = 'issuing_transaction.purchase_details_receipt_updated';
+ const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated';
+ const MANDATE_UPDATED = 'mandate.updated';
+ const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated';
+ const PAYMENT_INTENT_CANCELED = 'payment_intent.canceled';
+ const PAYMENT_INTENT_CREATED = 'payment_intent.created';
+ const PAYMENT_INTENT_PARTIALLY_FUNDED = 'payment_intent.partially_funded';
+ const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed';
+ const PAYMENT_INTENT_PROCESSING = 'payment_intent.processing';
+ const PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action';
+ const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded';
+ const PAYMENT_LINK_CREATED = 'payment_link.created';
+ const PAYMENT_LINK_UPDATED = 'payment_link.updated';
+ const PAYMENT_METHOD_ATTACHED = 'payment_method.attached';
+ const PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated';
+ const PAYMENT_METHOD_DETACHED = 'payment_method.detached';
+ const PAYMENT_METHOD_UPDATED = 'payment_method.updated';
+ const PAYOUT_CANCELED = 'payout.canceled';
+ const PAYOUT_CREATED = 'payout.created';
+ const PAYOUT_FAILED = 'payout.failed';
+ const PAYOUT_PAID = 'payout.paid';
+ const PAYOUT_RECONCILIATION_COMPLETED = 'payout.reconciliation_completed';
+ const PAYOUT_UPDATED = 'payout.updated';
+ const PERSON_CREATED = 'person.created';
+ const PERSON_DELETED = 'person.deleted';
+ const PERSON_UPDATED = 'person.updated';
+ const PLAN_CREATED = 'plan.created';
+ const PLAN_DELETED = 'plan.deleted';
+ const PLAN_UPDATED = 'plan.updated';
+ const PRICE_CREATED = 'price.created';
+ const PRICE_DELETED = 'price.deleted';
+ const PRICE_UPDATED = 'price.updated';
+ const PRODUCT_CREATED = 'product.created';
+ const PRODUCT_DELETED = 'product.deleted';
+ const PRODUCT_UPDATED = 'product.updated';
+ const PROMOTION_CODE_CREATED = 'promotion_code.created';
+ const PROMOTION_CODE_UPDATED = 'promotion_code.updated';
+ const QUOTE_ACCEPTED = 'quote.accepted';
+ const QUOTE_CANCELED = 'quote.canceled';
+ const QUOTE_CREATED = 'quote.created';
+ const QUOTE_FINALIZED = 'quote.finalized';
+ const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created';
+ const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated';
+ const REFUND_CREATED = 'refund.created';
+ const REFUND_FAILED = 'refund.failed';
+ const REFUND_UPDATED = 'refund.updated';
+ const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed';
+ const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded';
+ const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated';
+ const REVIEW_CLOSED = 'review.closed';
+ const REVIEW_OPENED = 'review.opened';
+ const SETUP_INTENT_CANCELED = 'setup_intent.canceled';
+ const SETUP_INTENT_CREATED = 'setup_intent.created';
+ const SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action';
+ const SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed';
+ const SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded';
+ const SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created';
+ const SOURCE_CANCELED = 'source.canceled';
+ const SOURCE_CHARGEABLE = 'source.chargeable';
+ const SOURCE_FAILED = 'source.failed';
+ const SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification';
+ const SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required';
+ const SOURCE_TRANSACTION_CREATED = 'source.transaction.created';
+ const SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated';
+ const SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted';
+ const SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled';
+ const SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed';
+ const SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created';
+ const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring';
+ const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released';
+ const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated';
+ const TAX_RATE_CREATED = 'tax_rate.created';
+ const TAX_RATE_UPDATED = 'tax_rate.updated';
+ const TAX_SETTINGS_UPDATED = 'tax.settings.updated';
+ const TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed';
+ const TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded';
+ const TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing';
+ const TEST_HELPERS_TEST_CLOCK_CREATED = 'test_helpers.test_clock.created';
+ const TEST_HELPERS_TEST_CLOCK_DELETED = 'test_helpers.test_clock.deleted';
+ const TEST_HELPERS_TEST_CLOCK_INTERNAL_FAILURE = 'test_helpers.test_clock.internal_failure';
+ const TEST_HELPERS_TEST_CLOCK_READY = 'test_helpers.test_clock.ready';
+ const TOPUP_CANCELED = 'topup.canceled';
+ const TOPUP_CREATED = 'topup.created';
+ const TOPUP_FAILED = 'topup.failed';
+ const TOPUP_REVERSED = 'topup.reversed';
+ const TOPUP_SUCCEEDED = 'topup.succeeded';
+ const TRANSFER_CREATED = 'transfer.created';
+ const TRANSFER_REVERSED = 'transfer.reversed';
+ const TRANSFER_UPDATED = 'transfer.updated';
+ const TREASURY_CREDIT_REVERSAL_CREATED = 'treasury.credit_reversal.created';
+ const TREASURY_CREDIT_REVERSAL_POSTED = 'treasury.credit_reversal.posted';
+ const TREASURY_DEBIT_REVERSAL_COMPLETED = 'treasury.debit_reversal.completed';
+ const TREASURY_DEBIT_REVERSAL_CREATED = 'treasury.debit_reversal.created';
+ const TREASURY_DEBIT_REVERSAL_INITIAL_CREDIT_GRANTED = 'treasury.debit_reversal.initial_credit_granted';
+ const TREASURY_FINANCIAL_ACCOUNT_CLOSED = 'treasury.financial_account.closed';
+ const TREASURY_FINANCIAL_ACCOUNT_CREATED = 'treasury.financial_account.created';
+ const TREASURY_FINANCIAL_ACCOUNT_FEATURES_STATUS_UPDATED = 'treasury.financial_account.features_status_updated';
+ const TREASURY_INBOUND_TRANSFER_CANCELED = 'treasury.inbound_transfer.canceled';
+ const TREASURY_INBOUND_TRANSFER_CREATED = 'treasury.inbound_transfer.created';
+ const TREASURY_INBOUND_TRANSFER_FAILED = 'treasury.inbound_transfer.failed';
+ const TREASURY_INBOUND_TRANSFER_SUCCEEDED = 'treasury.inbound_transfer.succeeded';
+ const TREASURY_OUTBOUND_PAYMENT_CANCELED = 'treasury.outbound_payment.canceled';
+ const TREASURY_OUTBOUND_PAYMENT_CREATED = 'treasury.outbound_payment.created';
+ const TREASURY_OUTBOUND_PAYMENT_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_payment.expected_arrival_date_updated';
+ const TREASURY_OUTBOUND_PAYMENT_FAILED = 'treasury.outbound_payment.failed';
+ const TREASURY_OUTBOUND_PAYMENT_POSTED = 'treasury.outbound_payment.posted';
+ const TREASURY_OUTBOUND_PAYMENT_RETURNED = 'treasury.outbound_payment.returned';
+ const TREASURY_OUTBOUND_PAYMENT_TRACKING_DETAILS_UPDATED = 'treasury.outbound_payment.tracking_details_updated';
+ const TREASURY_OUTBOUND_TRANSFER_CANCELED = 'treasury.outbound_transfer.canceled';
+ const TREASURY_OUTBOUND_TRANSFER_CREATED = 'treasury.outbound_transfer.created';
+ const TREASURY_OUTBOUND_TRANSFER_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_transfer.expected_arrival_date_updated';
+ const TREASURY_OUTBOUND_TRANSFER_FAILED = 'treasury.outbound_transfer.failed';
+ const TREASURY_OUTBOUND_TRANSFER_POSTED = 'treasury.outbound_transfer.posted';
+ const TREASURY_OUTBOUND_TRANSFER_RETURNED = 'treasury.outbound_transfer.returned';
+ const TREASURY_OUTBOUND_TRANSFER_TRACKING_DETAILS_UPDATED = 'treasury.outbound_transfer.tracking_details_updated';
+ const TREASURY_RECEIVED_CREDIT_CREATED = 'treasury.received_credit.created';
+ const TREASURY_RECEIVED_CREDIT_FAILED = 'treasury.received_credit.failed';
+ const TREASURY_RECEIVED_CREDIT_SUCCEEDED = 'treasury.received_credit.succeeded';
+ const TREASURY_RECEIVED_DEBIT_CREATED = 'treasury.received_debit.created';
+
+ const TYPE_ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized';
+ const TYPE_ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized';
+ const TYPE_ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created';
+ const TYPE_ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted';
+ const TYPE_ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated';
+ const TYPE_ACCOUNT_UPDATED = 'account.updated';
+ const TYPE_APPLICATION_FEE_CREATED = 'application_fee.created';
+ const TYPE_APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
+ const TYPE_APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
+ const TYPE_BALANCE_AVAILABLE = 'balance.available';
+ const TYPE_BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
+ const TYPE_BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
+ const TYPE_BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
+ const TYPE_BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
+ const TYPE_CAPABILITY_UPDATED = 'capability.updated';
+ const TYPE_CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available';
+ const TYPE_CHARGE_CAPTURED = 'charge.captured';
+ const TYPE_CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed';
+ const TYPE_CHARGE_DISPUTE_CREATED = 'charge.dispute.created';
+ const TYPE_CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated';
+ const TYPE_CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn';
+ const TYPE_CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated';
+ const TYPE_CHARGE_EXPIRED = 'charge.expired';
+ const TYPE_CHARGE_FAILED = 'charge.failed';
+ const TYPE_CHARGE_PENDING = 'charge.pending';
+ const TYPE_CHARGE_REFUNDED = 'charge.refunded';
+ const TYPE_CHARGE_REFUND_UPDATED = 'charge.refund.updated';
+ const TYPE_CHARGE_SUCCEEDED = 'charge.succeeded';
+ const TYPE_CHARGE_UPDATED = 'charge.updated';
+ const TYPE_CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed';
+ const TYPE_CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED = 'checkout.session.async_payment_succeeded';
+ const TYPE_CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed';
+ const TYPE_CHECKOUT_SESSION_EXPIRED = 'checkout.session.expired';
+ const TYPE_CLIMATE_ORDER_CANCELED = 'climate.order.canceled';
+ const TYPE_CLIMATE_ORDER_CREATED = 'climate.order.created';
+ const TYPE_CLIMATE_ORDER_DELAYED = 'climate.order.delayed';
+ const TYPE_CLIMATE_ORDER_DELIVERED = 'climate.order.delivered';
+ const TYPE_CLIMATE_ORDER_PRODUCT_SUBSTITUTED = 'climate.order.product_substituted';
+ const TYPE_CLIMATE_PRODUCT_CREATED = 'climate.product.created';
+ const TYPE_CLIMATE_PRODUCT_PRICING_UPDATED = 'climate.product.pricing_updated';
+ const TYPE_COUPON_CREATED = 'coupon.created';
+ const TYPE_COUPON_DELETED = 'coupon.deleted';
+ const TYPE_COUPON_UPDATED = 'coupon.updated';
+ const TYPE_CREDIT_NOTE_CREATED = 'credit_note.created';
+ const TYPE_CREDIT_NOTE_UPDATED = 'credit_note.updated';
+ const TYPE_CREDIT_NOTE_VOIDED = 'credit_note.voided';
+ const TYPE_CUSTOMER_CASH_BALANCE_TRANSACTION_CREATED = 'customer_cash_balance_transaction.created';
+ const TYPE_CUSTOMER_CREATED = 'customer.created';
+ const TYPE_CUSTOMER_DELETED = 'customer.deleted';
+ const TYPE_CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created';
+ const TYPE_CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted';
+ const TYPE_CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated';
+ const TYPE_CUSTOMER_SOURCE_CREATED = 'customer.source.created';
+ const TYPE_CUSTOMER_SOURCE_DELETED = 'customer.source.deleted';
+ const TYPE_CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring';
+ const TYPE_CUSTOMER_SOURCE_UPDATED = 'customer.source.updated';
+ const TYPE_CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created';
+ const TYPE_CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted';
+ const TYPE_CUSTOMER_SUBSCRIPTION_PAUSED = 'customer.subscription.paused';
+ const TYPE_CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied';
+ const TYPE_CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired';
+ const TYPE_CUSTOMER_SUBSCRIPTION_RESUMED = 'customer.subscription.resumed';
+ const TYPE_CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end';
+ const TYPE_CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated';
+ const TYPE_CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created';
+ const TYPE_CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted';
+ const TYPE_CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
+ const TYPE_CUSTOMER_UPDATED = 'customer.updated';
+ const TYPE_ENTITLEMENTS_ACTIVE_ENTITLEMENT_SUMMARY_UPDATED = 'entitlements.active_entitlement_summary.updated';
+ const TYPE_FILE_CREATED = 'file.created';
+ const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created';
+ const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated';
+ const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
+ const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
+ const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
+ const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_OWNERSHIP = 'financial_connections.account.refreshed_ownership';
+ const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_TRANSACTIONS = 'financial_connections.account.refreshed_transactions';
+ const TYPE_IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
+ const TYPE_IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
+ const TYPE_IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
+ const TYPE_IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted';
+ const TYPE_IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input';
+ const TYPE_IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified';
+ const TYPE_INVOICEITEM_CREATED = 'invoiceitem.created';
+ const TYPE_INVOICEITEM_DELETED = 'invoiceitem.deleted';
+ const TYPE_INVOICE_CREATED = 'invoice.created';
+ const TYPE_INVOICE_DELETED = 'invoice.deleted';
+ const TYPE_INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
+ const TYPE_INVOICE_FINALIZED = 'invoice.finalized';
+ const TYPE_INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible';
+ const TYPE_INVOICE_OVERDUE = 'invoice.overdue';
+ const TYPE_INVOICE_PAID = 'invoice.paid';
+ const TYPE_INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
+ const TYPE_INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
+ const TYPE_INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded';
+ const TYPE_INVOICE_SENT = 'invoice.sent';
+ const TYPE_INVOICE_UPCOMING = 'invoice.upcoming';
+ const TYPE_INVOICE_UPDATED = 'invoice.updated';
+ const TYPE_INVOICE_VOIDED = 'invoice.voided';
+ const TYPE_INVOICE_WILL_BE_DUE = 'invoice.will_be_due';
+ const TYPE_ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created';
+ const TYPE_ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request';
+ const TYPE_ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated';
+ const TYPE_ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created';
+ const TYPE_ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated';
+ const TYPE_ISSUING_CARD_CREATED = 'issuing_card.created';
+ const TYPE_ISSUING_CARD_UPDATED = 'issuing_card.updated';
+ const TYPE_ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
+ const TYPE_ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
+ const TYPE_ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
+ const TYPE_ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded';
+ const TYPE_ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
+ const TYPE_ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
+ const TYPE_ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated';
+ const TYPE_ISSUING_PERSONALIZATION_DESIGN_DEACTIVATED = 'issuing_personalization_design.deactivated';
+ const TYPE_ISSUING_PERSONALIZATION_DESIGN_REJECTED = 'issuing_personalization_design.rejected';
+ const TYPE_ISSUING_PERSONALIZATION_DESIGN_UPDATED = 'issuing_personalization_design.updated';
+ const TYPE_ISSUING_TOKEN_CREATED = 'issuing_token.created';
+ const TYPE_ISSUING_TOKEN_UPDATED = 'issuing_token.updated';
+ const TYPE_ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created';
+ const TYPE_ISSUING_TRANSACTION_PURCHASE_DETAILS_RECEIPT_UPDATED = 'issuing_transaction.purchase_details_receipt_updated';
+ const TYPE_ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated';
+ const TYPE_MANDATE_UPDATED = 'mandate.updated';
+ const TYPE_PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated';
+ const TYPE_PAYMENT_INTENT_CANCELED = 'payment_intent.canceled';
+ const TYPE_PAYMENT_INTENT_CREATED = 'payment_intent.created';
+ const TYPE_PAYMENT_INTENT_PARTIALLY_FUNDED = 'payment_intent.partially_funded';
+ const TYPE_PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed';
+ const TYPE_PAYMENT_INTENT_PROCESSING = 'payment_intent.processing';
+ const TYPE_PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action';
+ const TYPE_PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded';
+ const TYPE_PAYMENT_LINK_CREATED = 'payment_link.created';
+ const TYPE_PAYMENT_LINK_UPDATED = 'payment_link.updated';
+ const TYPE_PAYMENT_METHOD_ATTACHED = 'payment_method.attached';
+ const TYPE_PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated';
+ const TYPE_PAYMENT_METHOD_DETACHED = 'payment_method.detached';
+ const TYPE_PAYMENT_METHOD_UPDATED = 'payment_method.updated';
+ const TYPE_PAYOUT_CANCELED = 'payout.canceled';
+ const TYPE_PAYOUT_CREATED = 'payout.created';
+ const TYPE_PAYOUT_FAILED = 'payout.failed';
+ const TYPE_PAYOUT_PAID = 'payout.paid';
+ const TYPE_PAYOUT_RECONCILIATION_COMPLETED = 'payout.reconciliation_completed';
+ const TYPE_PAYOUT_UPDATED = 'payout.updated';
+ const TYPE_PERSON_CREATED = 'person.created';
+ const TYPE_PERSON_DELETED = 'person.deleted';
+ const TYPE_PERSON_UPDATED = 'person.updated';
+ const TYPE_PLAN_CREATED = 'plan.created';
+ const TYPE_PLAN_DELETED = 'plan.deleted';
+ const TYPE_PLAN_UPDATED = 'plan.updated';
+ const TYPE_PRICE_CREATED = 'price.created';
+ const TYPE_PRICE_DELETED = 'price.deleted';
+ const TYPE_PRICE_UPDATED = 'price.updated';
+ const TYPE_PRODUCT_CREATED = 'product.created';
+ const TYPE_PRODUCT_DELETED = 'product.deleted';
+ const TYPE_PRODUCT_UPDATED = 'product.updated';
+ const TYPE_PROMOTION_CODE_CREATED = 'promotion_code.created';
+ const TYPE_PROMOTION_CODE_UPDATED = 'promotion_code.updated';
+ const TYPE_QUOTE_ACCEPTED = 'quote.accepted';
+ const TYPE_QUOTE_CANCELED = 'quote.canceled';
+ const TYPE_QUOTE_CREATED = 'quote.created';
+ const TYPE_QUOTE_FINALIZED = 'quote.finalized';
+ const TYPE_RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created';
+ const TYPE_RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated';
+ const TYPE_REFUND_CREATED = 'refund.created';
+ const TYPE_REFUND_FAILED = 'refund.failed';
+ const TYPE_REFUND_UPDATED = 'refund.updated';
+ const TYPE_REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed';
+ const TYPE_REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded';
+ const TYPE_REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated';
+ const TYPE_REVIEW_CLOSED = 'review.closed';
+ const TYPE_REVIEW_OPENED = 'review.opened';
+ const TYPE_SETUP_INTENT_CANCELED = 'setup_intent.canceled';
+ const TYPE_SETUP_INTENT_CREATED = 'setup_intent.created';
+ const TYPE_SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action';
+ const TYPE_SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed';
+ const TYPE_SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded';
+ const TYPE_SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created';
+ const TYPE_SOURCE_CANCELED = 'source.canceled';
+ const TYPE_SOURCE_CHARGEABLE = 'source.chargeable';
+ const TYPE_SOURCE_FAILED = 'source.failed';
+ const TYPE_SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification';
+ const TYPE_SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required';
+ const TYPE_SOURCE_TRANSACTION_CREATED = 'source.transaction.created';
+ const TYPE_SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated';
+ const TYPE_SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted';
+ const TYPE_SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled';
+ const TYPE_SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed';
+ const TYPE_SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created';
+ const TYPE_SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring';
+ const TYPE_SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released';
+ const TYPE_SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated';
+ const TYPE_TAX_RATE_CREATED = 'tax_rate.created';
+ const TYPE_TAX_RATE_UPDATED = 'tax_rate.updated';
+ const TYPE_TAX_SETTINGS_UPDATED = 'tax.settings.updated';
+ const TYPE_TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed';
+ const TYPE_TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded';
+ const TYPE_TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing';
+ const TYPE_TEST_HELPERS_TEST_CLOCK_CREATED = 'test_helpers.test_clock.created';
+ const TYPE_TEST_HELPERS_TEST_CLOCK_DELETED = 'test_helpers.test_clock.deleted';
+ const TYPE_TEST_HELPERS_TEST_CLOCK_INTERNAL_FAILURE = 'test_helpers.test_clock.internal_failure';
+ const TYPE_TEST_HELPERS_TEST_CLOCK_READY = 'test_helpers.test_clock.ready';
+ const TYPE_TOPUP_CANCELED = 'topup.canceled';
+ const TYPE_TOPUP_CREATED = 'topup.created';
+ const TYPE_TOPUP_FAILED = 'topup.failed';
+ const TYPE_TOPUP_REVERSED = 'topup.reversed';
+ const TYPE_TOPUP_SUCCEEDED = 'topup.succeeded';
+ const TYPE_TRANSFER_CREATED = 'transfer.created';
+ const TYPE_TRANSFER_REVERSED = 'transfer.reversed';
+ const TYPE_TRANSFER_UPDATED = 'transfer.updated';
+ const TYPE_TREASURY_CREDIT_REVERSAL_CREATED = 'treasury.credit_reversal.created';
+ const TYPE_TREASURY_CREDIT_REVERSAL_POSTED = 'treasury.credit_reversal.posted';
+ const TYPE_TREASURY_DEBIT_REVERSAL_COMPLETED = 'treasury.debit_reversal.completed';
+ const TYPE_TREASURY_DEBIT_REVERSAL_CREATED = 'treasury.debit_reversal.created';
+ const TYPE_TREASURY_DEBIT_REVERSAL_INITIAL_CREDIT_GRANTED = 'treasury.debit_reversal.initial_credit_granted';
+ const TYPE_TREASURY_FINANCIAL_ACCOUNT_CLOSED = 'treasury.financial_account.closed';
+ const TYPE_TREASURY_FINANCIAL_ACCOUNT_CREATED = 'treasury.financial_account.created';
+ const TYPE_TREASURY_FINANCIAL_ACCOUNT_FEATURES_STATUS_UPDATED = 'treasury.financial_account.features_status_updated';
+ const TYPE_TREASURY_INBOUND_TRANSFER_CANCELED = 'treasury.inbound_transfer.canceled';
+ const TYPE_TREASURY_INBOUND_TRANSFER_CREATED = 'treasury.inbound_transfer.created';
+ const TYPE_TREASURY_INBOUND_TRANSFER_FAILED = 'treasury.inbound_transfer.failed';
+ const TYPE_TREASURY_INBOUND_TRANSFER_SUCCEEDED = 'treasury.inbound_transfer.succeeded';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_CANCELED = 'treasury.outbound_payment.canceled';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_CREATED = 'treasury.outbound_payment.created';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_payment.expected_arrival_date_updated';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_FAILED = 'treasury.outbound_payment.failed';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_POSTED = 'treasury.outbound_payment.posted';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_RETURNED = 'treasury.outbound_payment.returned';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_TRACKING_DETAILS_UPDATED = 'treasury.outbound_payment.tracking_details_updated';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_CANCELED = 'treasury.outbound_transfer.canceled';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_CREATED = 'treasury.outbound_transfer.created';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_transfer.expected_arrival_date_updated';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_FAILED = 'treasury.outbound_transfer.failed';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_POSTED = 'treasury.outbound_transfer.posted';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_RETURNED = 'treasury.outbound_transfer.returned';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_TRACKING_DETAILS_UPDATED = 'treasury.outbound_transfer.tracking_details_updated';
+ const TYPE_TREASURY_RECEIVED_CREDIT_CREATED = 'treasury.received_credit.created';
+ const TYPE_TREASURY_RECEIVED_CREDIT_FAILED = 'treasury.received_credit.failed';
+ const TYPE_TREASURY_RECEIVED_CREDIT_SUCCEEDED = 'treasury.received_credit.succeeded';
+ const TYPE_TREASURY_RECEIVED_DEBIT_CREATED = 'treasury.received_debit.created';
+
+ /**
+ * List events, going back up to 30 days. Each event data is rendered according to
+ * Stripe API version at its creation time, specified in event object
+ * api_version attribute (not according to your current Stripe API
+ * version or Stripe-Version header).
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Event> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an event if it was created in the last 30 days. Supply
+ * the unique identifier of the event, which you might have received in a webhook.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Event
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/EventData/V1BillingMeterErrorReportTriggeredEventData.php b/plugins/stripe-php/lib/EventData/V1BillingMeterErrorReportTriggeredEventData.php
new file mode 100644
index 00000000..3c8535c1
--- /dev/null
+++ b/plugins/stripe-php/lib/EventData/V1BillingMeterErrorReportTriggeredEventData.php
@@ -0,0 +1,15 @@
+data when fetched from /v2/events.
+ * @property \Stripe\StripeObject $reason This contains information about why meter error happens.
+ * @property int $validation_end The end of the window that is encapsulated by this summary.
+ * @property int $validation_start The start of the window that is encapsulated by this summary.
+ */
+class V1BillingMeterErrorReportTriggeredEventData extends \Stripe\StripeObject
+{
+}
diff --git a/plugins/stripe-php/lib/EventData/V1BillingMeterNoMeterFoundEventData.php b/plugins/stripe-php/lib/EventData/V1BillingMeterNoMeterFoundEventData.php
new file mode 100644
index 00000000..3c1d70a5
--- /dev/null
+++ b/plugins/stripe-php/lib/EventData/V1BillingMeterNoMeterFoundEventData.php
@@ -0,0 +1,15 @@
+data when fetched from /v2/events.
+ * @property \Stripe\StripeObject $reason This contains information about why meter error happens.
+ * @property int $validation_end The end of the window that is encapsulated by this summary.
+ * @property int $validation_start The start of the window that is encapsulated by this summary.
+ */
+class V1BillingMeterNoMeterFoundEventData extends \Stripe\StripeObject
+{
+}
diff --git a/plugins/stripe-php/lib/Events/V1BillingMeterErrorReportTriggeredEvent.php b/plugins/stripe-php/lib/Events/V1BillingMeterErrorReportTriggeredEvent.php
new file mode 100644
index 00000000..894ed6a2
--- /dev/null
+++ b/plugins/stripe-php/lib/Events/V1BillingMeterErrorReportTriggeredEvent.php
@@ -0,0 +1,46 @@
+related_object->url);
+ list($object, $options) = $this->_request(
+ 'get',
+ $this->related_object->url,
+ [],
+ ['stripe_account' => $this->context],
+ [],
+ $apiMode
+ );
+
+ return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
+ }
+
+ public static function constructFrom($values, $opts = null, $apiMode = 'v2')
+ {
+ $evt = parent::constructFrom($values, $opts, $apiMode);
+ if (null !== $evt->data) {
+ $evt->data = \Stripe\EventData\V1BillingMeterErrorReportTriggeredEventData::constructFrom($evt->data, $opts, $apiMode);
+ }
+
+ return $evt;
+ }
+}
diff --git a/plugins/stripe-php/lib/Events/V1BillingMeterNoMeterFoundEvent.php b/plugins/stripe-php/lib/Events/V1BillingMeterNoMeterFoundEvent.php
new file mode 100644
index 00000000..71356c58
--- /dev/null
+++ b/plugins/stripe-php/lib/Events/V1BillingMeterNoMeterFoundEvent.php
@@ -0,0 +1,23 @@
+data) {
+ $evt->data = \Stripe\EventData\V1BillingMeterNoMeterFoundEventData::constructFrom($evt->data, $opts, $apiMode);
+ }
+
+ return $evt;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/ApiConnectionException.php b/plugins/stripe-php/lib/Exception/ApiConnectionException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/ApiConnectionException.php
rename to plugins/stripe-php/lib/Exception/ApiConnectionException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/ApiErrorException.php b/plugins/stripe-php/lib/Exception/ApiErrorException.php
similarity index 97%
rename from plugins/stripe-php-10.5.0/lib/Exception/ApiErrorException.php
rename to plugins/stripe-php/lib/Exception/ApiErrorException.php
index 995a42e6..f753d62c 100644
--- a/plugins/stripe-php-10.5.0/lib/Exception/ApiErrorException.php
+++ b/plugins/stripe-php/lib/Exception/ApiErrorException.php
@@ -202,10 +202,11 @@ abstract class ApiErrorException extends \Exception implements ExceptionInterfac
*/
public function __toString()
{
+ $parentStr = parent::__toString();
$statusStr = (null === $this->getHttpStatus()) ? '' : "(Status {$this->getHttpStatus()}) ";
$idStr = (null === $this->getRequestId()) ? '' : "(Request {$this->getRequestId()}) ";
- return "{$statusStr}{$idStr}{$this->getMessage()}";
+ return "Error sending request to Stripe: {$statusStr}{$idStr}{$this->getMessage()}\n{$parentStr}";
}
protected function constructErrorObject()
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/AuthenticationException.php b/plugins/stripe-php/lib/Exception/AuthenticationException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/AuthenticationException.php
rename to plugins/stripe-php/lib/Exception/AuthenticationException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/BadMethodCallException.php b/plugins/stripe-php/lib/Exception/BadMethodCallException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/BadMethodCallException.php
rename to plugins/stripe-php/lib/Exception/BadMethodCallException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/CardException.php b/plugins/stripe-php/lib/Exception/CardException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/CardException.php
rename to plugins/stripe-php/lib/Exception/CardException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/ExceptionInterface.php b/plugins/stripe-php/lib/Exception/ExceptionInterface.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/ExceptionInterface.php
rename to plugins/stripe-php/lib/Exception/ExceptionInterface.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/IdempotencyException.php b/plugins/stripe-php/lib/Exception/IdempotencyException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/IdempotencyException.php
rename to plugins/stripe-php/lib/Exception/IdempotencyException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/InvalidArgumentException.php b/plugins/stripe-php/lib/Exception/InvalidArgumentException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/InvalidArgumentException.php
rename to plugins/stripe-php/lib/Exception/InvalidArgumentException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/InvalidRequestException.php b/plugins/stripe-php/lib/Exception/InvalidRequestException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/InvalidRequestException.php
rename to plugins/stripe-php/lib/Exception/InvalidRequestException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/OAuth/ExceptionInterface.php b/plugins/stripe-php/lib/Exception/OAuth/ExceptionInterface.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/OAuth/ExceptionInterface.php
rename to plugins/stripe-php/lib/Exception/OAuth/ExceptionInterface.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/OAuth/InvalidClientException.php b/plugins/stripe-php/lib/Exception/OAuth/InvalidClientException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/OAuth/InvalidClientException.php
rename to plugins/stripe-php/lib/Exception/OAuth/InvalidClientException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/OAuth/InvalidGrantException.php b/plugins/stripe-php/lib/Exception/OAuth/InvalidGrantException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/OAuth/InvalidGrantException.php
rename to plugins/stripe-php/lib/Exception/OAuth/InvalidGrantException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/OAuth/InvalidRequestException.php b/plugins/stripe-php/lib/Exception/OAuth/InvalidRequestException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/OAuth/InvalidRequestException.php
rename to plugins/stripe-php/lib/Exception/OAuth/InvalidRequestException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/OAuth/InvalidScopeException.php b/plugins/stripe-php/lib/Exception/OAuth/InvalidScopeException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/OAuth/InvalidScopeException.php
rename to plugins/stripe-php/lib/Exception/OAuth/InvalidScopeException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/OAuth/OAuthErrorException.php b/plugins/stripe-php/lib/Exception/OAuth/OAuthErrorException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/OAuth/OAuthErrorException.php
rename to plugins/stripe-php/lib/Exception/OAuth/OAuthErrorException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/OAuth/UnknownOAuthErrorException.php b/plugins/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/OAuth/UnknownOAuthErrorException.php
rename to plugins/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/OAuth/UnsupportedGrantTypeException.php b/plugins/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/OAuth/UnsupportedGrantTypeException.php
rename to plugins/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/OAuth/UnsupportedResponseTypeException.php b/plugins/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/OAuth/UnsupportedResponseTypeException.php
rename to plugins/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/PermissionException.php b/plugins/stripe-php/lib/Exception/PermissionException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/PermissionException.php
rename to plugins/stripe-php/lib/Exception/PermissionException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/RateLimitException.php b/plugins/stripe-php/lib/Exception/RateLimitException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/RateLimitException.php
rename to plugins/stripe-php/lib/Exception/RateLimitException.php
diff --git a/plugins/stripe-php-10.5.0/lib/Exception/SignatureVerificationException.php b/plugins/stripe-php/lib/Exception/SignatureVerificationException.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Exception/SignatureVerificationException.php
rename to plugins/stripe-php/lib/Exception/SignatureVerificationException.php
diff --git a/plugins/stripe-php/lib/Exception/TemporarySessionExpiredException.php b/plugins/stripe-php/lib/Exception/TemporarySessionExpiredException.php
new file mode 100644
index 00000000..cdab2233
--- /dev/null
+++ b/plugins/stripe-php/lib/Exception/TemporarySessionExpiredException.php
@@ -0,0 +1,9 @@
+ExchangeRate objects allow you to determine the rates that Stripe is currently
+ * using to convert from one currency to another. Since this number is variable
+ * throughout the day, there are various reasons why you might want to know the current
+ * rate (for example, to dynamically price an item for a user with a default
+ * payment in a foreign currency).
+ *
+ * Please refer to our Exchange Rates API guide for more details.
+ *
+ * [Note: this integration path is supported but no longer recommended] Additionally,
+ * you can guarantee that a charge is made with an exchange rate that you expect is
+ * current. To do so, you must pass in the exchange_rate to charges endpoints. If the
+ * value is no longer up to date, the charge won't go through. Please refer to our
+ * Using with charges guide for more details.
+ *
+ * -----
+ *
+ *
+ *
+ * This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:
+ *
+ * - localize prices for processing payments on Stripe
+ * - reconcile Stripe transactions
+ * - determine how much money to send to a connected account
+ * - determine app fees to charge a connected account
+ *
+ * Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.
+ *
+ * @property string $id Unique identifier for the object. Represented as the three-letter ISO currency code in lowercase.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property \Stripe\StripeObject $rates Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
+ */
+class ExchangeRate extends ApiResource
+{
+ const OBJECT_NAME = 'exchange_rate';
+
+ /**
+ * Returns a list of objects that contain the rates at which foreign currencies are
+ * converted to one another. Only shows the currencies for which Stripe supports.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\ExchangeRate> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the exchange rates from the given currency to every supported
+ * currency.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ExchangeRate
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/File.php b/plugins/stripe-php/lib/File.php
similarity index 53%
rename from plugins/stripe-php-10.5.0/lib/File.php
rename to plugins/stripe-php/lib/File.php
index d5c14fb7..0a46fbc8 100644
--- a/plugins/stripe-php-10.5.0/lib/File.php
+++ b/plugins/stripe-php/lib/File.php
@@ -5,35 +5,30 @@
namespace Stripe;
/**
- * This is an object representing a file hosted on Stripe's servers. The file may
- * have been uploaded by yourself using the create file request (for
- * example, when uploading dispute evidence) or it may have been created by Stripe
- * (for example, the results of a Sigma scheduled
+ * This object represents files hosted on Stripe's servers. You can upload
+ * files with the create file request
+ * (for example, when uploading dispute evidence). Stripe also
+ * creates files independently (for example, the results of a Sigma scheduled
* query).
*
- * Related guide: File Upload
- * Guide.
+ * Related guide: File upload guide
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|int $expires_at The time at which the file expires and is no longer available in epoch seconds.
- * @property null|string $filename A filename for the file, suitable for saving to a filesystem.
+ * @property null|int $expires_at The file expires and isn't available at this time in epoch seconds.
+ * @property null|string $filename The suitable name for saving the file to a filesystem.
* @property null|\Stripe\Collection<\Stripe\FileLink> $links A list of file links that point at this file.
* @property string $purpose The purpose of the uploaded file.
- * @property int $size The size in bytes of the file object.
- * @property null|string $title A user friendly title for the document.
- * @property null|string $type The type of the file returned (e.g., csv, pdf, jpg, or png).
- * @property null|string $url The URL from which the file can be downloaded using your live secret API key.
+ * @property int $size The size of the file object in bytes.
+ * @property null|string $title A suitable title for the document.
+ * @property null|string $type The returned file type (for example, csv, pdf, jpg, or png).
+ * @property null|string $url Use your live secret API key to download the file from this URL.
*/
class File extends ApiResource
{
const OBJECT_NAME = 'file';
- use ApiOperations\All;
- use ApiOperations\Retrieve;
-
const PURPOSE_ACCOUNT_REQUIREMENT = 'account_requirement';
const PURPOSE_ADDITIONAL_VERIFICATION = 'additional_verification';
const PURPOSE_BUSINESS_ICON = 'business_icon';
@@ -42,14 +37,56 @@ class File extends ApiResource
const PURPOSE_DISPUTE_EVIDENCE = 'dispute_evidence';
const PURPOSE_DOCUMENT_PROVIDER_IDENTITY_DOCUMENT = 'document_provider_identity_document';
const PURPOSE_FINANCE_REPORT_RUN = 'finance_report_run';
+ const PURPOSE_FINANCIAL_ACCOUNT_STATEMENT = 'financial_account_statement';
const PURPOSE_IDENTITY_DOCUMENT = 'identity_document';
const PURPOSE_IDENTITY_DOCUMENT_DOWNLOADABLE = 'identity_document_downloadable';
+ const PURPOSE_ISSUING_REGULATORY_REPORTING = 'issuing_regulatory_reporting';
const PURPOSE_PCI_DOCUMENT = 'pci_document';
const PURPOSE_SELFIE = 'selfie';
const PURPOSE_SIGMA_SCHEDULED_QUERY = 'sigma_scheduled_query';
const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload';
const PURPOSE_TERMINAL_READER_SPLASHSCREEN = 'terminal_reader_splashscreen';
+ /**
+ * Returns a list of the files that your account has access to. Stripe sorts and
+ * returns the files by their creation dates, placing the most recently created
+ * files at the top.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\File> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing file object. After you supply a unique file
+ * ID, Stripe returns the corresponding file object. Learn how to access file contents.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\File
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
// This resource can have two different object names. In latter API
// versions, only `file` is used, but since stripe-php may be used with
// any API version, we need to support deserializing the older
diff --git a/plugins/stripe-php/lib/FileLink.php b/plugins/stripe-php/lib/FileLink.php
new file mode 100644
index 00000000..8c449223
--- /dev/null
+++ b/plugins/stripe-php/lib/FileLink.php
@@ -0,0 +1,108 @@
+File object with non-Stripe users, you can
+ * create a FileLink. FileLinks contain a URL that you can use to
+ * retrieve the contents of the file without authentication.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property bool $expired Returns if the link is already expired.
+ * @property null|int $expires_at Time that the link expires.
+ * @property string|\Stripe\File $file The file object this link points 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.
+ * @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 $url The publicly accessible URL to download the file.
+ */
+class FileLink extends ApiResource
+{
+ const OBJECT_NAME = 'file_link';
+
+ use ApiOperations\Update;
+
+ /**
+ * Creates a new file link object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FileLink the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of file links.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\FileLink> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the file link with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FileLink
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates an existing file link object. Expired links can no longer be updated.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FileLink the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/FinancialConnections/Account.php b/plugins/stripe-php/lib/FinancialConnections/Account.php
similarity index 65%
rename from plugins/stripe-php-10.5.0/lib/FinancialConnections/Account.php
rename to plugins/stripe-php/lib/FinancialConnections/Account.php
index 0fc4e26d..e0f33d93 100644
--- a/plugins/stripe-php-10.5.0/lib/FinancialConnections/Account.php
+++ b/plugins/stripe-php/lib/FinancialConnections/Account.php
@@ -5,8 +5,7 @@
namespace Stripe\FinancialConnections;
/**
- * A Financial Connections Account represents an account that exists outside of
- * Stripe, to which you have been granted some degree of access.
+ * A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -24,15 +23,14 @@ namespace Stripe\FinancialConnections;
* @property null|string[] $permissions The list of permissions granted by this account.
* @property string $status The status of the link to the account.
* @property string $subcategory If category 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.
Account objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\FinancialConnections\Account> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an Financial Connections Account.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Account
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
@@ -73,7 +107,7 @@ class Account extends \Stripe\ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\FinancialConnections\AccountOwner> list of BankConnectionsResourceOwners
+ * @return \Stripe\Collection<\Stripe\FinancialConnections\AccountOwner> list of account owners
*/
public static function allOwners($id, $params = null, $opts = null)
{
@@ -101,4 +135,38 @@ class Account extends \Stripe\ApiResource
return $this;
}
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Account the subscribed account
+ */
+ public function subscribe($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/subscribe';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Account the unsubscribed account
+ */
+ public function unsubscribe($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/unsubscribe';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/FinancialConnections/AccountOwner.php b/plugins/stripe-php/lib/FinancialConnections/AccountOwner.php
similarity index 95%
rename from plugins/stripe-php-10.5.0/lib/FinancialConnections/AccountOwner.php
rename to plugins/stripe-php/lib/FinancialConnections/AccountOwner.php
index 53a7f1a4..57d0a7b6 100644
--- a/plugins/stripe-php-10.5.0/lib/FinancialConnections/AccountOwner.php
+++ b/plugins/stripe-php/lib/FinancialConnections/AccountOwner.php
@@ -5,6 +5,8 @@
namespace Stripe\FinancialConnections;
/**
+ * Describes an owner of an account.
+ *
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string $email The email address of the owner.
diff --git a/plugins/stripe-php-10.5.0/lib/FinancialConnections/AccountOwnership.php b/plugins/stripe-php/lib/FinancialConnections/AccountOwnership.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/FinancialConnections/AccountOwnership.php
rename to plugins/stripe-php/lib/FinancialConnections/AccountOwnership.php
diff --git a/plugins/stripe-php/lib/FinancialConnections/Session.php b/plugins/stripe-php/lib/FinancialConnections/Session.php
new file mode 100644
index 00000000..1bfd2af9
--- /dev/null
+++ b/plugins/stripe-php/lib/FinancialConnections/Session.php
@@ -0,0 +1,67 @@
+ $accounts The accounts that were collected as part of this Session.
+ * @property string $client_secret A value that will be passed to the client to launch the authentication flow.
+ * @property null|\Stripe\StripeObject $filters
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string[] $permissions Permissions requested for accounts collected during this session.
+ * @property null|string[] $prefetch Data features requested to be retrieved upon account creation.
+ * @property null|string $return_url For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ */
+class Session extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'financial_connections.session';
+
+ /**
+ * To launch the Financial Connections authorization flow, create a
+ * Session. The session’s client_secret can be used to
+ * launch the flow using Stripe.js.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Session the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Retrieves the details of a Financial Connections Session.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Session
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/FinancialConnections/Transaction.php b/plugins/stripe-php/lib/FinancialConnections/Transaction.php
new file mode 100644
index 00000000..8f90ab6b
--- /dev/null
+++ b/plugins/stripe-php/lib/FinancialConnections/Transaction.php
@@ -0,0 +1,66 @@
+ISO currency code, in lowercase. Must be a supported currency.
+ * @property string $description The description of this transaction.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $status The status of the transaction.
+ * @property \Stripe\StripeObject $status_transitions
+ * @property int $transacted_at Time at which the transaction was transacted. Measured in seconds since the Unix epoch.
+ * @property string $transaction_refresh The token of the transaction refresh that last updated or created this transaction.
+ * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ */
+class Transaction extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'financial_connections.transaction';
+
+ const STATUS_PENDING = 'pending';
+ const STATUS_POSTED = 'posted';
+ const STATUS_VOID = 'void';
+
+ /**
+ * Returns a list of Financial Connections Transaction objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\FinancialConnections\Transaction> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a Financial Connections Transaction.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Transaction
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/Forwarding/Request.php b/plugins/stripe-php/lib/Forwarding/Request.php
new file mode 100644
index 00000000..24efc5aa
--- /dev/null
+++ b/plugins/stripe-php/lib/Forwarding/Request.php
@@ -0,0 +1,98 @@
+Forward card details to third-party API endpoints.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property string $payment_method The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
+ * @property string[] $replacements The field kinds to be replaced in the forwarded request.
+ * @property null|\Stripe\StripeObject $request_context Context about the request from Stripe's servers to the destination endpoint.
+ * @property null|\Stripe\StripeObject $request_details The request that was sent to the destination endpoint. We redact any sensitive fields.
+ * @property null|\Stripe\StripeObject $response_details The response that the destination endpoint returned to us. We redact any sensitive fields.
+ * @property null|string $url The destination URL for the forwarded request. Must be supported by the config.
+ */
+class Request extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'forwarding.request';
+
+ /**
+ * Creates a ForwardingRequest object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Forwarding\Request the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Lists all ForwardingRequest objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Forwarding\Request> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a ForwardingRequest object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Forwarding\Request
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/FundingInstructions.php b/plugins/stripe-php/lib/FundingInstructions.php
similarity index 61%
rename from plugins/stripe-php-10.5.0/lib/FundingInstructions.php
rename to plugins/stripe-php/lib/FundingInstructions.php
index af799914..0632a31b 100644
--- a/plugins/stripe-php-10.5.0/lib/FundingInstructions.php
+++ b/plugins/stripe-php/lib/FundingInstructions.php
@@ -5,14 +5,11 @@
namespace Stripe;
/**
- * Each customer has a balance
- * that is automatically applied to future invoices and payments using the
- * customer_balance payment method. Customers can fund this balance by
- * initiating a bank transfer to any account in the
- * financial_addresses field. Related guide: Customer
- * Balance - Funding Instructions to learn more.
+ * Each customer has a balance that is
+ * automatically applied to future invoices and payments using the customer_balance payment method.
+ * Customers can fund this balance by initiating a bank transfer to any account in the
+ * financial_addresses field.
+ * Related guide: Customer balance funding instructions.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\StripeObject $bank_transfer
diff --git a/plugins/stripe-php-10.5.0/lib/HttpClient/ClientInterface.php b/plugins/stripe-php/lib/HttpClient/ClientInterface.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/HttpClient/ClientInterface.php
rename to plugins/stripe-php/lib/HttpClient/ClientInterface.php
index 3c7861e5..47f61d5b 100644
--- a/plugins/stripe-php-10.5.0/lib/HttpClient/ClientInterface.php
+++ b/plugins/stripe-php/lib/HttpClient/ClientInterface.php
@@ -5,12 +5,13 @@ namespace Stripe\HttpClient;
interface ClientInterface
{
/**
- * @param string $method The HTTP method being used
+ * @param 'delete'|'get'|'post' $method The HTTP method being used
* @param string $absUrl The URL being requested, including domain and protocol
* @param array $headers Headers to be used in the request (full strings, not KV pairs)
* @param array $params KV pairs for parameters. Can be nested for arrays and hashes
* @param bool $hasFile Whether or not $params references a file (via an @ prefix or
* CURLFile)
+ * @param 'v1'|'v2' $apiMode Specifies if this is a v1 or v2 request
*
* @throws \Stripe\Exception\ApiConnectionException
* @throws \Stripe\Exception\UnexpectedValueException
@@ -18,5 +19,5 @@ interface ClientInterface
* @return array an array whose first element is raw request body, second
* element is HTTP status code and third array of HTTP headers
*/
- public function request($method, $absUrl, $headers, $params, $hasFile);
+ public function request($method, $absUrl, $headers, $params, $hasFile, $apiMode = 'v1');
}
diff --git a/plugins/stripe-php-10.5.0/lib/HttpClient/CurlClient.php b/plugins/stripe-php/lib/HttpClient/CurlClient.php
similarity index 83%
rename from plugins/stripe-php-10.5.0/lib/HttpClient/CurlClient.php
rename to plugins/stripe-php/lib/HttpClient/CurlClient.php
index fdf421c1..3932da30 100644
--- a/plugins/stripe-php-10.5.0/lib/HttpClient/CurlClient.php
+++ b/plugins/stripe-php/lib/HttpClient/CurlClient.php
@@ -193,51 +193,92 @@ class CurlClient implements ClientInterface, StreamingClientInterface
// END OF USER DEFINED TIMEOUTS
- private function constructRequest($method, $absUrl, $headers, $params, $hasFile)
+ /**
+ * @param 'delete'|'get'|'post' $method
+ * @param string $absUrl
+ * @param string $params
+ * @param bool $hasFile
+ * @param 'v1'|'v2' $apiMode
+ */
+ private function constructUrlAndBody($method, $absUrl, $params, $hasFile, $apiMode)
{
- $method = \strtolower($method);
+ $params = Util\Util::objectsToIds($params);
+ if ('post' === $method) {
+ $absUrl = Util\Util::utf8($absUrl);
+ if ($hasFile) {
+ return [$absUrl, $params];
+ }
+ if ('v2' === $apiMode) {
+ if (\is_array($params) && 0 === \count($params)) {
+ // Send a request with empty body if we have no params set
+ // Setting the second parameter as null prevents the CURLOPT_POSTFIELDS
+ // from being set with the '[]', which is result of `json_encode([]).
+ return [$absUrl, null];
+ }
- $opts = [];
+ return [$absUrl, \json_encode($params)];
+ }
+
+ return [$absUrl, Util\Util::encodeParameters($params)];
+ }
+ if ($hasFile) {
+ throw new Exception\UnexpectedValueException("Unexpected. {$method} methods don't support file attachments");
+ }
+ if (0 === \count($params)) {
+ return [Util\Util::utf8($absUrl), null];
+ }
+ $encoded = Util\Util::encodeParameters($params, $apiMode);
+
+ $absUrl = "{$absUrl}?{$encoded}";
+ $absUrl = Util\Util::utf8($absUrl);
+
+ return [$absUrl, null];
+ }
+
+ private function calculateDefaultOptions($method, $absUrl, $headers, $params, $hasFile)
+ {
if (\is_callable($this->defaultOptions)) { // call defaultOptions callback, set options to return value
- $opts = \call_user_func_array($this->defaultOptions, \func_get_args());
- if (!\is_array($opts)) {
+ $ret = \call_user_func_array($this->defaultOptions, [$method, $absUrl, $headers, $params, $hasFile]);
+ if (!\is_array($ret)) {
throw new Exception\UnexpectedValueException('Non-array value returned by defaultOptions CurlClient callback');
}
- } elseif (\is_array($this->defaultOptions)) { // set default curlopts from array
- $opts = $this->defaultOptions;
+
+ return $ret;
+ }
+ if (\is_array($this->defaultOptions)) { // set default curlopts from array
+ return $this->defaultOptions;
}
- $params = Util\Util::objectsToIds($params);
+ return [];
+ }
+ private function constructCurlOptions($method, $absUrl, $headers, $body, $opts, $apiMode)
+ {
if ('get' === $method) {
- if ($hasFile) {
- throw new Exception\UnexpectedValueException(
- 'Issuing a GET request with a file parameter'
- );
- }
$opts[\CURLOPT_HTTPGET] = 1;
- if (\count($params) > 0) {
- $encoded = Util\Util::encodeParameters($params);
- $absUrl = "{$absUrl}?{$encoded}";
- }
} elseif ('post' === $method) {
$opts[\CURLOPT_POST] = 1;
- $opts[\CURLOPT_POSTFIELDS] = $hasFile ? $params : Util\Util::encodeParameters($params);
} elseif ('delete' === $method) {
$opts[\CURLOPT_CUSTOMREQUEST] = 'DELETE';
- if (\count($params) > 0) {
- $encoded = Util\Util::encodeParameters($params);
- $absUrl = "{$absUrl}?{$encoded}";
- }
} else {
throw new Exception\UnexpectedValueException("Unrecognized method {$method}");
}
- // It is only safe to retry network failures on POST requests if we
- // add an Idempotency-Key header
- if (('post' === $method) && (Stripe::$maxNetworkRetries > 0)) {
- if (!$this->hasHeader($headers, 'Idempotency-Key')) {
- $headers[] = 'Idempotency-Key: ' . $this->randomGenerator->uuid();
+ if ($body) {
+ $opts[\CURLOPT_POSTFIELDS] = $body;
+ }
+ // this is a little verbose, but makes v1 vs v2 behavior really clear
+ if (!$this->hasHeader($headers, 'Idempotency-Key')) {
+ // all v2 requests should have an IK
+ if ('v2' === $apiMode) {
+ if ('post' === $method || 'delete' === $method) {
+ $headers[] = 'Idempotency-Key: ' . $this->randomGenerator->uuid();
+ }
+ } else {
+ // v1 requests should keep old behavior for consistency
+ if ('post' === $method && Stripe::$maxNetworkRetries > 0) {
+ $headers[] = 'Idempotency-Key: ' . $this->randomGenerator->uuid();
+ }
}
}
@@ -255,7 +296,6 @@ class CurlClient implements ClientInterface, StreamingClientInterface
// sending an empty `Expect:` header.
$headers[] = 'Expect: ';
- $absUrl = Util\Util::utf8($absUrl);
$opts[\CURLOPT_URL] = $absUrl;
$opts[\CURLOPT_RETURNTRANSFER] = true;
$opts[\CURLOPT_CONNECTTIMEOUT] = $this->connectTimeout;
@@ -271,31 +311,56 @@ class CurlClient implements ClientInterface, StreamingClientInterface
$opts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2TLS;
}
- // If the user didn't explicitly specify a CURLOPT_IPRESOLVE option, we
- // force IPv4 resolving as Stripe's API servers are only accessible over
- // IPv4 (see. https://github.com/stripe/stripe-php/issues/1045).
- // We let users specify a custom option in case they need to say proxy
- // through an IPv6 proxy.
- if (!isset($opts[\CURLOPT_IPRESOLVE])) {
- $opts[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4;
- }
+ return $opts;
+ }
+
+ /**
+ * @param 'delete'|'get'|'post' $method
+ * @param string $absUrl
+ * @param array $headers
+ * @param array $params
+ * @param bool $hasFile
+ * @param 'v1'|'v2' $apiMode
+ */
+ private function constructRequest($method, $absUrl, $headers, $params, $hasFile, $apiMode)
+ {
+ $method = \strtolower($method);
+
+ $opts = $this->calculateDefaultOptions($method, $absUrl, $headers, $params, $hasFile);
+ list($absUrl, $body) = $this->constructUrlAndBody($method, $absUrl, $params, $hasFile, $apiMode);
+ $opts = $this->constructCurlOptions($method, $absUrl, $headers, $body, $opts, $apiMode);
return [$opts, $absUrl];
}
- public function request($method, $absUrl, $headers, $params, $hasFile)
+ /**
+ * @param 'delete'|'get'|'post' $method
+ * @param string $absUrl
+ * @param array $headers
+ * @param array $params
+ * @param bool $hasFile
+ * @param 'v1'|'v2' $apiMode
+ */
+ public function request($method, $absUrl, $headers, $params, $hasFile, $apiMode = 'v1')
{
- list($opts, $absUrl) = $this->constructRequest($method, $absUrl, $headers, $params, $hasFile);
-
+ list($opts, $absUrl) = $this->constructRequest($method, $absUrl, $headers, $params, $hasFile, $apiMode);
list($rbody, $rcode, $rheaders) = $this->executeRequestWithRetries($opts, $absUrl);
return [$rbody, $rcode, $rheaders];
}
- public function requestStream($method, $absUrl, $headers, $params, $hasFile, $readBodyChunk)
+ /**
+ * @param 'delete'|'get'|'post' $method
+ * @param string $absUrl
+ * @param array $headers
+ * @param array $params
+ * @param bool $hasFile
+ * @param callable $readBodyChunk
+ * @param 'v1'|'v2' $apiMode
+ */
+ public function requestStream($method, $absUrl, $headers, $params, $hasFile, $readBodyChunk, $apiMode = 'v1')
{
- list($opts, $absUrl) = $this->constructRequest($method, $absUrl, $headers, $params, $hasFile);
-
+ list($opts, $absUrl) = $this->constructRequest($method, $absUrl, $headers, $params, $hasFile, $apiMode);
$opts[\CURLOPT_RETURNTRANSFER] = false;
list($rbody, $rcode, $rheaders) = $this->executeStreamingRequestWithRetries($opts, $absUrl, $readBodyChunk);
@@ -387,15 +452,7 @@ class CurlClient implements ClientInterface, StreamingClientInterface
$errno = null;
$message = null;
- $determineWriteCallback = function ($rheaders) use (
- &$readBodyChunk,
- &$shouldRetry,
- &$rbody,
- &$numRetries,
- &$rcode,
- &$lastRHeaders,
- &$errno
- ) {
+ $determineWriteCallback = function ($rheaders) use (&$readBodyChunk, &$shouldRetry, &$rbody, &$numRetries, &$rcode, &$lastRHeaders, &$errno) {
$lastRHeaders = $rheaders;
$errno = \curl_errno($this->curlHandle);
@@ -549,24 +606,24 @@ class CurlClient implements ClientInterface, StreamingClientInterface
case \CURLE_COULDNT_RESOLVE_HOST:
case \CURLE_OPERATION_TIMEOUTED:
$msg = "Could not connect to Stripe ({$url}). Please check your "
- . 'internet connection and try again. If this problem persists, '
- . "you should check Stripe's service status at "
- . 'https://twitter.com/stripestatus, or';
+ . 'internet connection and try again. If this problem persists, '
+ . "you should check Stripe's service status at "
+ . 'https://twitter.com/stripestatus, or';
break;
case \CURLE_SSL_CACERT:
case \CURLE_SSL_PEER_CERTIFICATE:
$msg = "Could not verify Stripe's SSL certificate. Please make sure "
- . 'that your network is not intercepting certificates. '
- . "(Try going to {$url} in your browser.) "
- . 'If this problem persists,';
+ . 'that your network is not intercepting certificates. '
+ . "(Try going to {$url} in your browser.) "
+ . 'If this problem persists,';
break;
default:
$msg = 'Unexpected error communicating with Stripe. '
- . 'If this problem persists,';
+ . 'If this problem persists,';
}
$msg .= ' let us know at support@stripe.com.';
diff --git a/plugins/stripe-php-10.5.0/lib/HttpClient/StreamingClientInterface.php b/plugins/stripe-php/lib/HttpClient/StreamingClientInterface.php
similarity index 93%
rename from plugins/stripe-php-10.5.0/lib/HttpClient/StreamingClientInterface.php
rename to plugins/stripe-php/lib/HttpClient/StreamingClientInterface.php
index 482f9a11..7612c94a 100644
--- a/plugins/stripe-php-10.5.0/lib/HttpClient/StreamingClientInterface.php
+++ b/plugins/stripe-php/lib/HttpClient/StreamingClientInterface.php
@@ -5,7 +5,7 @@ namespace Stripe\HttpClient;
interface StreamingClientInterface
{
/**
- * @param string $method The HTTP method being used
+ * @param 'delete'|'get'|'post' $method The HTTP method being used
* @param string $absUrl The URL being requested, including domain and protocol
* @param array $headers Headers to be used in the request (full strings, not KV pairs)
* @param array $params KV pairs for parameters. Can be nested for arrays and hashes
diff --git a/plugins/stripe-php/lib/Identity/VerificationReport.php b/plugins/stripe-php/lib/Identity/VerificationReport.php
new file mode 100644
index 00000000..058ac7f9
--- /dev/null
+++ b/plugins/stripe-php/lib/Identity/VerificationReport.php
@@ -0,0 +1,78 @@
+type and options
+ * parameters used. You can find the result of each verification check performed in the
+ * appropriate sub-resource: document, id_number, selfie.
+ *
+ * Each VerificationReport contains a copy of any data collected by the user as well as
+ * reference IDs which can be used to access collected images through the FileUpload
+ * API. To configure and create VerificationReports, use the
+ * VerificationSession API.
+ *
+ * Related guide: Accessing verification results.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|string $client_reference_id A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|\Stripe\StripeObject $document Result from a document check
+ * @property null|\Stripe\StripeObject $email Result from a email check
+ * @property null|\Stripe\StripeObject $id_number Result from an id_number check
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $options
+ * @property null|\Stripe\StripeObject $phone Result from a phone check
+ * @property null|\Stripe\StripeObject $selfie Result from a selfie check
+ * @property string $type Type of report.
+ * @property null|string $verification_flow The configuration token of a verification flow from the dashboard.
+ * @property null|string $verification_session ID of the VerificationSession that created this report.
+ */
+class VerificationReport extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'identity.verification_report';
+
+ const TYPE_DOCUMENT = 'document';
+ const TYPE_ID_NUMBER = 'id_number';
+ const TYPE_VERIFICATION_FLOW = 'verification_flow';
+
+ /**
+ * List all verification reports.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Identity\VerificationReport> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an existing VerificationReport.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Identity\VerificationReport
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/Identity/VerificationSession.php b/plugins/stripe-php/lib/Identity/VerificationSession.php
new file mode 100644
index 00000000..7adf5d0a
--- /dev/null
+++ b/plugins/stripe-php/lib/Identity/VerificationSession.php
@@ -0,0 +1,185 @@
+verification
+ * check to perform. Only create one VerificationSession for
+ * each verification in your system.
+ *
+ * A VerificationSession transitions through multiple
+ * statuses throughout its lifetime as it progresses through
+ * the verification flow. The VerificationSession contains the user's verified data after
+ * verification checks are complete.
+ *
+ * Related guide: The Verification Sessions API
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|string $client_reference_id A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ * @property null|string $client_secret The short-lived client secret used by Stripe.js to show a verification modal inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on passing the client secret to the frontend to learn more.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|\Stripe\StripeObject $last_error If present, this property tells you the last error encountered when processing the verification.
+ * @property null|string|\Stripe\Identity\VerificationReport $last_verification_report ID of the most recent VerificationReport. Learn more about accessing detailed verification results.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $options A set of options for the session’s verification checks.
+ * @property null|\Stripe\StripeObject $provided_details Details provided about the user being verified. These details may be shown to the user.
+ * @property null|\Stripe\StripeObject $redaction Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
+ * @property null|string $related_customer Token referencing a Customer resource.
+ * @property string $status Status of this VerificationSession. Learn more about the lifecycle of sessions.
+ * @property string $type The type of verification check to be performed.
+ * @property null|string $url The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on verifying identity documents to learn how to redirect users to Stripe.
+ * @property null|string $verification_flow The configuration token of a verification flow from the dashboard.
+ * @property null|\Stripe\StripeObject $verified_outputs The user’s verified data.
+ */
+class VerificationSession extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'identity.verification_session';
+
+ use \Stripe\ApiOperations\Update;
+
+ const STATUS_CANCELED = 'canceled';
+ const STATUS_PROCESSING = 'processing';
+ const STATUS_REQUIRES_INPUT = 'requires_input';
+ const STATUS_VERIFIED = 'verified';
+
+ const TYPE_DOCUMENT = 'document';
+ const TYPE_ID_NUMBER = 'id_number';
+ const TYPE_VERIFICATION_FLOW = 'verification_flow';
+
+ /**
+ * Creates a VerificationSession object.
+ *
+ * After the VerificationSession is created, display a verification modal using the
+ * session client_secret or send your users to the session’s
+ * url.
+ *
+ * If your API key is in test mode, verification checks won’t actually process,
+ * though everything else will occur as if in live mode.
+ *
+ * Related guide: Verify your
+ * users’ identity documents
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Identity\VerificationSession the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of VerificationSessions.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Identity\VerificationSession> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a VerificationSession that was previously created.
+ *
+ * When the session status is requires_input, you can use this method
+ * to retrieve a valid client_secret or url to allow
+ * re-submission.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Identity\VerificationSession
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a VerificationSession object.
+ *
+ * When the session status is requires_input, you can use this method
+ * to update the verification check and options.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Identity\VerificationSession the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Identity\VerificationSession the canceled verification session
+ */
+ public function cancel($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/cancel';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Identity\VerificationSession the redacted verification session
+ */
+ public function redact($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/redact';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Invoice.php b/plugins/stripe-php/lib/Invoice.php
similarity index 58%
rename from plugins/stripe-php-10.5.0/lib/Invoice.php
rename to plugins/stripe-php/lib/Invoice.php
index eb5aa469..aba69de4 100644
--- a/plugins/stripe-php-10.5.0/lib/Invoice.php
+++ b/plugins/stripe-php/lib/Invoice.php
@@ -5,58 +5,56 @@
namespace Stripe;
/**
- * Invoices are statements of amounts owed by a customer, and are either generated
- * one-off, or generated periodically from a subscription.
+ * Invoices are statements of amounts owed by a customer, and are either
+ * generated one-off, or generated periodically from a subscription.
*
- * They contain invoice
- * items, and proration adjustments that may be caused by subscription
- * upgrades/downgrades (if necessary).
+ * They contain invoice items, and proration adjustments
+ * that may be caused by subscription upgrades/downgrades (if necessary).
*
- * If your invoice is configured to be billed through automatic charges, Stripe
- * automatically finalizes your invoice and attempts payment. Note that finalizing
- * the invoice, when
- * automatic, does not happen immediately as the invoice is created. Stripe
- * waits until one hour after the last webhook was successfully sent (or the last
+ * If your invoice is configured to be billed through automatic charges,
+ * Stripe automatically finalizes your invoice and attempts payment. Note
+ * that finalizing the invoice,
+ * when automatic, does
+ * not happen immediately as the invoice is created. Stripe waits
+ * until one hour after the last webhook was successfully sent (or the last
* webhook timed out after failing). If you (and the platforms you may have
- * connected to) have no webhooks configured, Stripe waits one hour after creation
- * to finalize the invoice.
+ * connected to) have no webhooks configured, Stripe waits one hour after
+ * creation to finalize the invoice.
*
- * If your invoice is configured to be billed by sending an email, then based on
- * your email
- * settings, Stripe will email the invoice to your customer and await payment.
- * These emails can contain a link to a hosted page to pay the invoice.
+ * If your invoice is configured to be billed by sending an email, then based on your
+ * email settings,
+ * Stripe will email the invoice to your customer and await payment. These
+ * emails can contain a link to a hosted page to pay the invoice.
*
- * Stripe applies any customer credit on the account before determining the amount
- * due for the invoice (i.e., the amount that will be actually charged). If the
- * amount due for the invoice is less than Stripe's minimum allowed
- * charge per currency, the invoice is automatically marked paid, and we add
- * the amount due to the customer's credit balance which is applied to the next
- * invoice.
+ * Stripe applies any customer credit on the account before determining the
+ * amount due for the invoice (i.e., the amount that will be actually
+ * charged). If the amount due for the invoice is less than Stripe's minimum allowed charge
+ * per currency, the
+ * invoice is automatically marked paid, and we add the amount due to the
+ * customer's credit balance which is applied to the next invoice.
*
- * More details on the customer's credit balance are here.
+ * More details on the customer's credit balance are
+ * here.
*
- * Related guide: Send
- * Invoices to Customers.
+ * Related guide: Send invoices to customers
*
- * @property string $id Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See Retrieve an upcoming invoice for more details.
+ * @property null|string $id Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See Retrieve an upcoming invoice for more details.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string $account_country The country of the business associated with this invoice, most often the business creating the invoice.
* @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice.
* @property null|(string|\Stripe\TaxId)[] $account_tax_ids The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
* @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due.
- * @property int $amount_paid The amount, in %s, that was paid.
- * @property int $amount_remaining The difference between amount_due and amount_paid, in %s.
+ * @property int $amount_paid The amount, in cents (or local equivalent), that was paid.
+ * @property int $amount_remaining The difference between amount_due and amount_paid, in cents (or local equivalent).
* @property int $amount_shipping This is the sum of all the shipping amounts.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the invoice.
- * @property null|int $application_fee_amount The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
- * @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
+ * @property null|string|\Stripe\Application $application ID of the Connect Application that created the invoice.
+ * @property null|int $application_fee_amount The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
+ * @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
* @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the invoice.created webhook, for example, so you might not want to display that invoice as unpaid to your users.
- * @property bool $auto_advance Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice's state will not automatically advance without an explicit action.
+ * @property null|bool $auto_advance Controls whether Stripe performs automatic collection of the invoice. If false, the invoice's state doesn't automatically advance without an explicit action.
* @property \Stripe\StripeObject $automatic_tax
- * @property null|string $billing_reason Indicates the reason why the invoice was created. subscription_cycle indicates an invoice created by a subscription advancing into a new period. subscription_create indicates an invoice created due to creating a subscription. subscription_update indicates an invoice created due to updating a subscription. subscription is set for all old invoices to indicate either a change to a subscription or a period advancement. manual is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The upcoming value is reserved for simulated invoices per the upcoming invoice endpoint. subscription_threshold indicates an invoice created due to a billing threshold being reached.
+ * @property null|int $automatically_finalizes_at The time when this invoice is currently scheduled to be automatically finalized. The field will be null if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be null - see finalized_at for the time when an already-finalized invoice was finalized.
+ * @property null|string $billing_reason Indicates the reason why the invoice was created.
* manual: Unrelated to a subscription, for example, created via the invoice editor. * subscription: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. * subscription_create: A new subscription was created. * subscription_cycle: A subscription advanced into a new period. * subscription_threshold: A subscription reached a billing threshold. * subscription_update: A subscription was updated. * upcoming: Reserved for simulated invoices, per the upcoming invoice endpoint.
charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
@@ -75,16 +73,18 @@ namespace Stripe;
* @property \Stripe\TaxRate[] $default_tax_rates The tax rates applied to this invoice, if any.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
* @property null|\Stripe\Discount $discount Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
- * @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
+ * @property (string|\Stripe\Discount)[] $discounts The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
* @property null|int $due_date The date on which payment for this invoice is due. This value will be null for invoices where collection_method=charge_automatically.
+ * @property null|int $effective_at The date when this invoice is in effect. Same as finalized_at unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
* @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
* @property null|string $footer Footer displayed on the invoice.
* @property null|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the revision documentation for more details.
* @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
* @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
+ * @property \Stripe\StripeObject $issuer
* @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
* @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice
- * @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
+ * @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|int $next_payment_attempt The time at which payment will next be attempted. This value will be null for invoices where collection_method=send_invoice.
@@ -94,13 +94,13 @@ namespace Stripe;
* @property bool $paid_out_of_band Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.
* @property null|string|\Stripe\PaymentIntent $payment_intent The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.
* @property \Stripe\StripeObject $payment_settings
- * @property int $period_end End of the usage period during which invoice items were added to this invoice.
- * @property int $period_start Start of the usage period during which invoice items were added to this invoice.
+ * @property int $period_end End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price.
+ * @property int $period_start Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price.
* @property int $post_payment_credit_notes_amount Total amount of all post-payment credit notes issued for this invoice.
* @property int $pre_payment_credit_notes_amount Total amount of all pre-payment credit notes issued for this invoice.
* @property null|string|\Stripe\Quote $quote The quote this invoice was generated from.
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this invoice.
- * @property null|\Stripe\StripeObject $rendering_options Options for invoice PDF rendering.
+ * @property null|\Stripe\StripeObject $rendering The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
* @property null|\Stripe\StripeObject $shipping_cost The details of the cost of shipping, including the ShippingRate applied on the invoice.
* @property null|\Stripe\StripeObject $shipping_details Shipping details for the invoice. The Invoice PDF will use the shipping_details value if it is set, otherwise the PDF will render the shipping address from the customer.
* @property int $starting_balance Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
@@ -108,15 +108,17 @@ namespace Stripe;
* @property null|string $status The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more
* @property \Stripe\StripeObject $status_transitions
* @property null|string|\Stripe\Subscription $subscription The subscription that this invoice was prepared for, if any.
- * @property int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
+ * @property null|\Stripe\StripeObject $subscription_details Details about the subscription that created this invoice.
+ * @property null|int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
* @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
- * @property null|int $subtotal_excluding_tax The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
+ * @property null|int $subtotal_excluding_tax The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
* @property null|int $tax The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice belongs to.
- * @property \Stripe\StripeObject $threshold_reason
+ * @property null|\Stripe\StripeObject $threshold_reason
* @property int $total Total after discounts and taxes.
* @property null|\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items.
- * @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.
+ * @property null|int $total_excluding_tax The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
+ * @property null|\Stripe\StripeObject[] $total_pretax_credit_amounts Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
* @property \Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items.
* @property null|\Stripe\StripeObject $transfer_data The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
* @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
@@ -125,17 +127,9 @@ class Invoice extends ApiResource
{
const OBJECT_NAME = 'invoice';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
use ApiOperations\Update;
- const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically';
- const BILLING_SEND_INVOICE = 'send_invoice';
-
const BILLING_REASON_AUTOMATIC_PENDING_INVOICE_ITEM_INVOICE = 'automatic_pending_invoice_item_invoice';
const BILLING_REASON_MANUAL = 'manual';
const BILLING_REASON_QUOTE_ACCEPT = 'quote_accept';
@@ -149,13 +143,171 @@ class Invoice extends ApiResource
const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically';
const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice';
- const STATUS_DELETED = 'deleted';
+ const CUSTOMER_TAX_EXEMPT_EXEMPT = 'exempt';
+ const CUSTOMER_TAX_EXEMPT_NONE = 'none';
+ const CUSTOMER_TAX_EXEMPT_REVERSE = 'reverse';
+
const STATUS_DRAFT = 'draft';
const STATUS_OPEN = 'open';
const STATUS_PAID = 'paid';
const STATUS_UNCOLLECTIBLE = 'uncollectible';
const STATUS_VOID = 'void';
+ /**
+ * This endpoint creates a draft invoice for a given customer. The invoice remains
+ * a draft until you finalize the invoice, which
+ * allows you to pay or send
+ * the invoice to your customers.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to
+ * delete invoices that are no longer in a draft state will fail; once an invoice
+ * has been finalized or if an invoice is for a subscription, it must be voided.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * You can list all invoices, or list the invoices for a specific customer. The
+ * invoices are returned sorted by creation date, with the most recently created
+ * invoices appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Invoice> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the invoice with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Draft invoices are fully editable. Once an invoice is finalized, monetary values,
+ * as well as collection_method, become uneditable.
+ *
+ * If you would like to stop the Stripe Billing engine from automatically
+ * finalizing, reattempting payments on, sending reminders for, or automatically reconciling
+ * invoices, pass auto_advance=false.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically';
+ const BILLING_SEND_INVOICE = 'send_invoice';
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the added invoice
+ */
+ public function addLines($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/add_lines';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the created invoice
+ */
+ public static function createPreview($params = null, $opts = null)
+ {
+ $url = static::classUrl() . '/create_preview';
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
@@ -207,6 +359,23 @@ class Invoice extends ApiResource
return $this;
}
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the removed invoice
+ */
+ public function removeLines($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/remove_lines';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
@@ -248,7 +417,7 @@ class Invoice extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\InvoiceLineItem> list of InvoiceLineItems
+ * @return \Stripe\Collection<\Stripe\InvoiceLineItem> list of invoice line items
*/
public static function upcomingLines($params = null, $opts = null)
{
@@ -260,6 +429,23 @@ class Invoice extends ApiResource
return $obj;
}
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice the updated invoice
+ */
+ public function updateLines($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/update_lines';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
@@ -283,25 +469,25 @@ class Invoice extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\SearchResultinvoice field, at which point it will be included as
+ * an invoice line item within
+ * invoice.lines.
+ *
+ * Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined
+ * with a subscription. Sometimes you want to add a charge or credit to a customer, but actually charge
+ * or credit the customer’s card only at the end of a regular billing cycle. This is useful for combining several charges
+ * (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.
+ *
+ * Related guides: Integrate with the Invoicing API, Subscription Invoices.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount Amount (in the currency specified) of the invoice item. This should always be equal to unit_amount * quantity.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property string|\Stripe\Customer $customer The ID of the customer who will be billed when this invoice item is billed.
+ * @property int $date Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
+ * @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations.
+ * @property null|(string|\Stripe\Discount)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
+ * @property null|string|\Stripe\Invoice $invoice The ID of the invoice this invoice item belongs 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.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property \Stripe\StripeObject $period
+ * @property null|\Stripe\Plan $plan If the invoice item is a proration, the plan of the subscription that the proration was computed for.
+ * @property null|\Stripe\Price $price The price of the invoice item.
+ * @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
+ * @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
+ * @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any.
+ * @property null|string $subscription_item The subscription item that this invoice item has been created for, if any.
+ * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item.
+ * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to.
+ * @property null|int $unit_amount Unit amount (in the currency specified) of the invoice item.
+ * @property null|string $unit_amount_decimal Same as unit_amount, but contains a decimal value with at most 12 decimal places.
+ */
+class InvoiceItem extends ApiResource
+{
+ const OBJECT_NAME = 'invoiceitem';
+
+ use ApiOperations\Update;
+
+ /**
+ * Creates an item to be added to a draft invoice (up to 250 items per invoice). If
+ * no invoice is specified, the item will be on the next invoice created for the
+ * customer specified.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceItem the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deletes an invoice item, removing it from an invoice. Deleting invoice items is
+ * only possible when they’re not attached to invoices, or if it’s attached to a
+ * draft invoice.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceItem the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of your invoice items. Invoice items are returned sorted by
+ * creation date, with the most recently created invoice items appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\InvoiceItem> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the invoice item with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceItem
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the amount or description of an invoice item on an upcoming invoice.
+ * Updating an invoice item is only possible before the invoice it’s attached to is
+ * closed.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceItem the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/InvoiceLineItem.php b/plugins/stripe-php/lib/InvoiceLineItem.php
new file mode 100644
index 00000000..a6120c9b
--- /dev/null
+++ b/plugins/stripe-php/lib/InvoiceLineItem.php
@@ -0,0 +1,72 @@
+invoice and only exist within the context of an invoice.
+ *
+ * Each line item is backed by either an invoice item or a subscription item.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount The amount, in cents (or local equivalent).
+ * @property null|int $amount_excluding_tax The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
+ * @property null|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item.
+ * @property bool $discountable If true, discounts will apply to this line item. Always false for prorations.
+ * @property (string|\Stripe\Discount)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
+ * @property null|string $invoice The ID of the invoice that contains this line item.
+ * @property null|string|\Stripe\InvoiceItem $invoice_item The ID of the invoice item associated with this line item if any.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with type=subscription, metadata reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.
+ * @property \Stripe\StripeObject $period
+ * @property null|\Stripe\Plan $plan The plan of the subscription, if the line item is a subscription or a proration.
+ * @property null|\Stripe\StripeObject[] $pretax_credit_amounts Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.
+ * @property null|\Stripe\Price $price The price of the line item.
+ * @property bool $proration Whether this is a proration.
+ * @property null|\Stripe\StripeObject $proration_details Additional details for proration line items
+ * @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration.
+ * @property null|string|\Stripe\Subscription $subscription The subscription that the invoice item pertains to, if any.
+ * @property null|string|\Stripe\SubscriptionItem $subscription_item The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.
+ * @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item
+ * @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item.
+ * @property string $type A string identifying the type of the source of this line item, either an invoiceitem or a subscription.
+ * @property null|string $unit_amount_excluding_tax The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.
+ */
+class InvoiceLineItem extends ApiResource
+{
+ const OBJECT_NAME = 'line_item';
+
+ use ApiOperations\Update;
+
+ /**
+ * Updates an invoice’s line item. Some fields, such as tax_amounts,
+ * only live on the invoice line item, so they can only be updated through this
+ * endpoint. Other fields, such as amount, live on both the invoice
+ * item and the invoice line item, so updates on this endpoint will propagate to
+ * the invoice item as well. Updating an invoice’s line item is only possible
+ * before the invoice is finalized.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceLineItem the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/InvoiceRenderingTemplate.php b/plugins/stripe-php/lib/InvoiceRenderingTemplate.php
new file mode 100644
index 00000000..f6ca508f
--- /dev/null
+++ b/plugins/stripe-php/lib/InvoiceRenderingTemplate.php
@@ -0,0 +1,99 @@
+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|string $nickname A brief description of the template, hidden from customers
+ * @property string $status The status of the template, one of active or archived.
+ * @property int $version Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
+ */
+class InvoiceRenderingTemplate extends ApiResource
+{
+ const OBJECT_NAME = 'invoice_rendering_template';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_ARCHIVED = 'archived';
+
+ /**
+ * List all templates, ordered by creation date, with the most recently created
+ * template appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\InvoiceRenderingTemplate> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an invoice rendering template with the given ID. It by default returns
+ * the latest version of the template. Optionally, specify a version to see
+ * previous versions.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceRenderingTemplate
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceRenderingTemplate the archived invoice rendering template
+ */
+ public function archive($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/archive';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceRenderingTemplate the unarchived invoice rendering template
+ */
+ public function unarchive($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/unarchive';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/Issuing/Authorization.php b/plugins/stripe-php/lib/Issuing/Authorization.php
new file mode 100644
index 00000000..ec4088b0
--- /dev/null
+++ b/plugins/stripe-php/lib/Issuing/Authorization.php
@@ -0,0 +1,156 @@
+issued card is used to make a purchase, an Issuing Authorization
+ * object is created. Authorizations must be approved for the
+ * purchase to be completed successfully.
+ *
+ * Related guide: Issued card authorizations
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount The total amount that was authorized or rejected. This amount is in currency and in the smallest currency unit. amount should be the same as merchant_amount, unless currency and merchant_currency are different.
+ * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit.
+ * @property bool $approved Whether the authorization has been approved.
+ * @property string $authorization_method How the card details were provided.
+ * @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization.
+ * @property \Stripe\Issuing\Card $card You can create physical or virtual cards that are issued to cardholders.
+ * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency The currency of the cardholder. This currency can be different from the currency presented at authorization and the merchant_currency field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|\Stripe\StripeObject $fleet Fleet-specific information for authorizations using Fleet cards.
+ * @property null|\Stripe\StripeObject[] $fraud_challenges Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.
+ * @property null|\Stripe\StripeObject $fuel Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed.
+ * @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 $merchant_amount The total amount that was authorized or rejected. This amount is in the merchant_currency and in the smallest currency unit. merchant_amount should be the same as amount, unless merchant_currency and currency are different.
+ * @property string $merchant_currency The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the currency field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property \Stripe\StripeObject $merchant_data
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $network_data Details about the authorization, such as identifiers, set by the card network.
+ * @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an issuing_authorization.request webhook.
+ * @property \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|\Stripe\Issuing\Token $token Token object used for this authorization. If a network token was not used for this authorization, this field will be null.
+ * @property \Stripe\Issuing\Transaction[] $transactions List of transactions associated with this authorization.
+ * @property null|\Stripe\StripeObject $treasury Treasury details related to this authorization if it was created on a FinancialAccount.
+ * @property \Stripe\StripeObject $verification_data
+ * @property null|bool $verified_by_fraud_challenge Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant.
+ * @property null|string $wallet The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay. Will populate as null when no digital wallet was utilized.
+ */
+class Authorization extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'issuing.authorization';
+
+ use \Stripe\ApiOperations\Update;
+
+ const AUTHORIZATION_METHOD_CHIP = 'chip';
+ const AUTHORIZATION_METHOD_CONTACTLESS = 'contactless';
+ const AUTHORIZATION_METHOD_KEYED_IN = 'keyed_in';
+ const AUTHORIZATION_METHOD_ONLINE = 'online';
+ const AUTHORIZATION_METHOD_SWIPE = 'swipe';
+
+ const STATUS_CLOSED = 'closed';
+ const STATUS_PENDING = 'pending';
+ const STATUS_REVERSED = 'reversed';
+
+ /**
+ * Returns a list of Issuing Authorization objects. The objects are
+ * sorted in descending order by creation date, with the most recently created
+ * object appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Issuing\Authorization> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an Issuing Authorization object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified Issuing Authorization object by setting the
+ * values of the parameters passed. Any parameters not provided will be left
+ * unchanged.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization the approved authorization
+ */
+ public function approve($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/approve';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization the declined authorization
+ */
+ public function decline($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/decline';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/Issuing/Card.php b/plugins/stripe-php/lib/Issuing/Card.php
new file mode 100644
index 00000000..a436ba31
--- /dev/null
+++ b/plugins/stripe-php/lib/Issuing/Card.php
@@ -0,0 +1,140 @@
+create physical or virtual cards that are issued to cardholders.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property string $brand The brand of the card.
+ * @property null|string $cancellation_reason The reason why the card was canceled.
+ * @property \Stripe\Issuing\Cardholder $cardholder An Issuing Cardholder object represents an individual or business entity who is issued cards.
Related guide: How to create a cardholder
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Supported currencies areusd in the US, eur in the EU, and gbp in the UK.
+ * @property null|string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
+ * @property int $exp_month The expiration month of the card.
+ * @property int $exp_year The expiration year of the card.
+ * @property null|string $financial_account The financial account this card is attached to.
+ * @property string $last4 The last 4 digits of the card number.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
+ * @property null|string|\Stripe\Issuing\PersonalizationDesign $personalization_design The personalization design object belonging to this card.
+ * @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any.
+ * @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any.
+ * @property null|string $replacement_reason The reason why the previous card needed to be replaced.
+ * @property null|\Stripe\StripeObject $shipping Where and how the card will be shipped.
+ * @property \Stripe\StripeObject $spending_controls
+ * @property string $status Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to inactive.
+ * @property string $type The type of the card.
+ * @property null|\Stripe\StripeObject $wallets Information relating to digital wallets (like Apple Pay and Google Pay).
+ */
+class Card extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'issuing.card';
+
+ use \Stripe\ApiOperations\Update;
+
+ const CANCELLATION_REASON_DESIGN_REJECTED = 'design_rejected';
+ const CANCELLATION_REASON_LOST = 'lost';
+ const CANCELLATION_REASON_STOLEN = 'stolen';
+
+ const REPLACEMENT_REASON_DAMAGED = 'damaged';
+ const REPLACEMENT_REASON_EXPIRED = 'expired';
+ const REPLACEMENT_REASON_LOST = 'lost';
+ const REPLACEMENT_REASON_STOLEN = 'stolen';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_CANCELED = 'canceled';
+ const STATUS_INACTIVE = 'inactive';
+
+ const TYPE_PHYSICAL = 'physical';
+ const TYPE_VIRTUAL = 'virtual';
+
+ /**
+ * Creates an Issuing Card object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Card the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of Issuing Card objects. The objects are sorted in
+ * descending order by creation date, with the most recently created object
+ * appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Issuing\Card> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an Issuing Card object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Card
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified Issuing Card object by setting the values of
+ * the parameters passed. Any parameters not provided will be left unchanged.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Card the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Issuing/CardDetails.php b/plugins/stripe-php/lib/Issuing/CardDetails.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Issuing/CardDetails.php
rename to plugins/stripe-php/lib/Issuing/CardDetails.php
diff --git a/plugins/stripe-php/lib/Issuing/Cardholder.php b/plugins/stripe-php/lib/Issuing/Cardholder.php
new file mode 100644
index 00000000..5731c638
--- /dev/null
+++ b/plugins/stripe-php/lib/Issuing/Cardholder.php
@@ -0,0 +1,126 @@
+Cardholder object represents an individual or business entity who is issued cards.
+ *
+ * Related guide: How to create a cardholder
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property \Stripe\StripeObject $billing
+ * @property null|\Stripe\StripeObject $company Additional information about a company cardholder.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string $email The cardholder's email address.
+ * @property null|\Stripe\StripeObject $individual Additional information about an individual cardholder.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property string $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 de, en, es, fr, or it. This changes the language of the 3D Secure flow and one-time password messages sent to the cardholder.
+ * @property \Stripe\StripeObject $requirements
+ * @property null|\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.
+ * @property string $type One of individual or company. See Choose a cardholder type for more details.
+ */
+class Cardholder extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'issuing.cardholder';
+
+ use \Stripe\ApiOperations\Update;
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_BLOCKED = 'blocked';
+ const STATUS_INACTIVE = 'inactive';
+
+ const TYPE_COMPANY = 'company';
+ const TYPE_INDIVIDUAL = 'individual';
+
+ /**
+ * Creates a new Issuing Cardholder object that can be issued cards.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Cardholder the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of Issuing Cardholder objects. The objects are
+ * sorted in descending order by creation date, with the most recently created
+ * object appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Issuing\Cardholder> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an Issuing Cardholder object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Cardholder
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified Issuing Cardholder object by setting the
+ * values of the parameters passed. Any parameters not provided will be left
+ * unchanged.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Cardholder the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Issuing/Dispute.php b/plugins/stripe-php/lib/Issuing/Dispute.php
new file mode 100644
index 00000000..b05c7e87
--- /dev/null
+++ b/plugins/stripe-php/lib/Issuing/Dispute.php
@@ -0,0 +1,165 @@
+card issuer, you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
+ *
+ * Related guide: Issuing disputes
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount Disputed amount in the card's currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation).
+ * @property null|\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency The currency the transaction was made in.
+ * @property \Stripe\StripeObject $evidence
+ * @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 $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 string $status Current status of the dispute.
+ * @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed.
+ * @property null|\Stripe\StripeObject $treasury Treasury details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
+ */
+class Dispute extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'issuing.dispute';
+
+ use \Stripe\ApiOperations\Update;
+
+ const LOSS_REASON_CARDHOLDER_AUTHENTICATION_ISSUER_LIABILITY = 'cardholder_authentication_issuer_liability';
+ const LOSS_REASON_ECI5_TOKEN_TRANSACTION_WITH_TAVV = 'eci5_token_transaction_with_tavv';
+ const LOSS_REASON_EXCESS_DISPUTES_IN_TIMEFRAME = 'excess_disputes_in_timeframe';
+ const LOSS_REASON_HAS_NOT_MET_THE_MINIMUM_DISPUTE_AMOUNT_REQUIREMENTS = 'has_not_met_the_minimum_dispute_amount_requirements';
+ const LOSS_REASON_INVALID_DUPLICATE_DISPUTE = 'invalid_duplicate_dispute';
+ const LOSS_REASON_INVALID_INCORRECT_AMOUNT_DISPUTE = 'invalid_incorrect_amount_dispute';
+ const LOSS_REASON_INVALID_NO_AUTHORIZATION = 'invalid_no_authorization';
+ const LOSS_REASON_INVALID_USE_OF_DISPUTES = 'invalid_use_of_disputes';
+ const LOSS_REASON_MERCHANDISE_DELIVERED_OR_SHIPPED = 'merchandise_delivered_or_shipped';
+ const LOSS_REASON_MERCHANDISE_OR_SERVICE_AS_DESCRIBED = 'merchandise_or_service_as_described';
+ const LOSS_REASON_NOT_CANCELLED = 'not_cancelled';
+ const LOSS_REASON_OTHER = 'other';
+ const LOSS_REASON_REFUND_ISSUED = 'refund_issued';
+ const LOSS_REASON_SUBMITTED_BEYOND_ALLOWABLE_TIME_LIMIT = 'submitted_beyond_allowable_time_limit';
+ const LOSS_REASON_TRANSACTION_3DS_REQUIRED = 'transaction_3ds_required';
+ const LOSS_REASON_TRANSACTION_APPROVED_AFTER_PRIOR_FRAUD_DISPUTE = 'transaction_approved_after_prior_fraud_dispute';
+ const LOSS_REASON_TRANSACTION_AUTHORIZED = 'transaction_authorized';
+ const LOSS_REASON_TRANSACTION_ELECTRONICALLY_READ = 'transaction_electronically_read';
+ const LOSS_REASON_TRANSACTION_QUALIFIES_FOR_VISA_EASY_PAYMENT_SERVICE = 'transaction_qualifies_for_visa_easy_payment_service';
+ const LOSS_REASON_TRANSACTION_UNATTENDED = 'transaction_unattended';
+
+ const STATUS_EXPIRED = 'expired';
+ const STATUS_LOST = 'lost';
+ const STATUS_SUBMITTED = 'submitted';
+ const STATUS_UNSUBMITTED = 'unsubmitted';
+ const STATUS_WON = 'won';
+
+ /**
+ * Creates an Issuing Dispute object. Individual pieces of evidence
+ * within the evidence object are optional at this point. Stripe only
+ * validates that required evidence is present during submission. Refer to Dispute
+ * reasons and evidence for more details about evidence requirements.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Dispute the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of Issuing Dispute objects. The objects are sorted
+ * in descending order by creation date, with the most recently created object
+ * appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Issuing\Dispute> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an Issuing Dispute object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Dispute
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified Issuing Dispute object by setting the values
+ * of the parameters passed. Any parameters not provided will be left unchanged.
+ * Properties on the evidence object can be unset by passing in an
+ * empty string.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Dispute the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Dispute the submited dispute
+ */
+ public function submit($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/submit';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/Issuing/PersonalizationDesign.php b/plugins/stripe-php/lib/Issuing/PersonalizationDesign.php
new file mode 100644
index 00000000..d2e472a5
--- /dev/null
+++ b/plugins/stripe-php/lib/Issuing/PersonalizationDesign.php
@@ -0,0 +1,117 @@
+purpose value of issuing_logo.
+ * @property null|\Stripe\StripeObject $carrier_text Hash containing carrier text, for use with physical bundles that support carrier text.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|string $lookup_key A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ * @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 $name Friendly display name.
+ * @property string|\Stripe\Issuing\PhysicalBundle $physical_bundle The physical bundle object belonging to this personalization design.
+ * @property \Stripe\StripeObject $preferences
+ * @property \Stripe\StripeObject $rejection_reasons
+ * @property string $status Whether this personalization design can be used to create cards.
+ */
+class PersonalizationDesign extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'issuing.personalization_design';
+
+ use \Stripe\ApiOperations\Update;
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_INACTIVE = 'inactive';
+ const STATUS_REJECTED = 'rejected';
+ const STATUS_REVIEW = 'review';
+
+ /**
+ * Creates a personalization design object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PersonalizationDesign the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of personalization design objects. The objects are sorted in
+ * descending order by creation date, with the most recently created object
+ * appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Issuing\PersonalizationDesign> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a personalization design object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PersonalizationDesign
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a card personalization object.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PersonalizationDesign the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Issuing/PhysicalBundle.php b/plugins/stripe-php/lib/Issuing/PhysicalBundle.php
new file mode 100644
index 00000000..419a0205
--- /dev/null
+++ b/plugins/stripe-php/lib/Issuing/PhysicalBundle.php
@@ -0,0 +1,65 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $name Friendly display name.
+ * @property string $status Whether this physical bundle can be used to create cards.
+ * @property string $type Whether this physical bundle is a standard Stripe offering or custom-made for you.
+ */
+class PhysicalBundle extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'issuing.physical_bundle';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_INACTIVE = 'inactive';
+ const STATUS_REVIEW = 'review';
+
+ const TYPE_CUSTOM = 'custom';
+ const TYPE_STANDARD = 'standard';
+
+ /**
+ * Returns a list of physical bundle objects. The objects are sorted in descending
+ * order by creation date, with the most recently created object appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Issuing\PhysicalBundle> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a physical bundle object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PhysicalBundle
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/Issuing/Token.php b/plugins/stripe-php/lib/Issuing/Token.php
new file mode 100644
index 00000000..196c7aba
--- /dev/null
+++ b/plugins/stripe-php/lib/Issuing/Token.php
@@ -0,0 +1,100 @@
+card issuer, you can view and manage these tokens through Stripe.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property string|\Stripe\Issuing\Card $card Card associated with this token.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string $device_fingerprint The hashed ID derived from the device ID from the card network associated with the token.
+ * @property null|string $last4 The last four digits of the token.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $network The token service provider / card network associated with the token.
+ * @property null|\Stripe\StripeObject $network_data
+ * @property int $network_updated_at Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
+ * @property string $status The usage state of the token.
+ * @property null|string $wallet_provider The digital wallet for this token, if one was used.
+ */
+class Token extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'issuing.token';
+
+ use \Stripe\ApiOperations\Update;
+
+ const NETWORK_MASTERCARD = 'mastercard';
+ const NETWORK_VISA = 'visa';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_DELETED = 'deleted';
+ const STATUS_REQUESTED = 'requested';
+ const STATUS_SUSPENDED = 'suspended';
+
+ const WALLET_PROVIDER_APPLE_PAY = 'apple_pay';
+ const WALLET_PROVIDER_GOOGLE_PAY = 'google_pay';
+ const WALLET_PROVIDER_SAMSUNG_PAY = 'samsung_pay';
+
+ /**
+ * Lists all Issuing Token objects for a given card.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Issuing\Token> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an Issuing Token object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Token
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Attempts to update the specified Issuing Token object to the status
+ * specified.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Token the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Issuing/Transaction.php b/plugins/stripe-php/lib/Issuing/Transaction.php
similarity index 52%
rename from plugins/stripe-php-10.5.0/lib/Issuing/Transaction.php
rename to plugins/stripe-php/lib/Issuing/Transaction.php
index 4586b2fa..45585a01 100644
--- a/plugins/stripe-php-10.5.0/lib/Issuing/Transaction.php
+++ b/plugins/stripe-php/lib/Issuing/Transaction.php
@@ -5,14 +5,11 @@
namespace Stripe\Issuing;
/**
- * Any use of an issued card that
- * results in funds entering or leaving your Stripe account, such as a completed
- * purchase or refund, is represented by an Issuing Transaction
- * object.
+ * Any use of an issued card that results in funds entering or leaving
+ * your Stripe account, such as a completed purchase or refund, is represented by an Issuing
+ * Transaction object.
*
- * Related guide: Issued Card
- * Transactions.
+ * Related guide: Issued card transactions
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -30,7 +27,9 @@ namespace Stripe\Issuing;
* @property string $merchant_currency The currency with which the merchant is taking payment.
* @property \Stripe\StripeObject $merchant_data
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $network_data Details about the transaction, such as processing dates, set by the card network.
* @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant.
+ * @property null|string|\Stripe\Issuing\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|\Stripe\StripeObject $treasury Treasury details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
* @property string $type The nature of the transaction.
* @property null|string $wallet The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay.
@@ -39,7 +38,75 @@ class Transaction extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.transaction';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;
+
+ const TYPE_CAPTURE = 'capture';
+ const TYPE_REFUND = 'refund';
+
+ const WALLET_APPLE_PAY = 'apple_pay';
+ const WALLET_GOOGLE_PAY = 'google_pay';
+ const WALLET_SAMSUNG_PAY = 'samsung_pay';
+
+ /**
+ * Returns a list of Issuing Transaction objects. The objects are
+ * sorted in descending order by creation date, with the most recently created
+ * object appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Issuing\Transaction> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an Issuing Transaction object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Transaction
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified Issuing Transaction object by setting the
+ * values of the parameters passed. Any parameters not provided will be left
+ * unchanged.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Transaction the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/LineItem.php b/plugins/stripe-php/lib/LineItem.php
similarity index 76%
rename from plugins/stripe-php-10.5.0/lib/LineItem.php
rename to plugins/stripe-php/lib/LineItem.php
index 63c5ca2e..837cbb1d 100644
--- a/plugins/stripe-php-10.5.0/lib/LineItem.php
+++ b/plugins/stripe-php/lib/LineItem.php
@@ -14,11 +14,11 @@ namespace Stripe;
* @property int $amount_tax Total tax amount applied. If no tax was applied, defaults to 0.
* @property int $amount_total Total after discounts and taxes.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
- * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
- * @property \Stripe\StripeObject[] $discounts The discounts applied to the line item.
+ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
+ * @property null|\Stripe\StripeObject[] $discounts The discounts applied to the line item.
* @property null|\Stripe\Price $price The price used to generate the line item.
* @property null|int $quantity The quantity of products being purchased.
- * @property \Stripe\StripeObject[] $taxes The taxes applied to the line item.
+ * @property null|\Stripe\StripeObject[] $taxes The taxes applied to the line item.
*/
class LineItem extends ApiResource
{
diff --git a/plugins/stripe-php-10.5.0/lib/LoginLink.php b/plugins/stripe-php/lib/LoginLink.php
similarity index 57%
rename from plugins/stripe-php-10.5.0/lib/LoginLink.php
rename to plugins/stripe-php/lib/LoginLink.php
index 3351356b..6d901293 100644
--- a/plugins/stripe-php-10.5.0/lib/LoginLink.php
+++ b/plugins/stripe-php/lib/LoginLink.php
@@ -5,6 +5,8 @@
namespace Stripe;
/**
+ * Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's account.controller.stripe_dashboard.type must be express to have access to the Express Dashboard.
+ *
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $url The URL for the login link.
diff --git a/plugins/stripe-php/lib/Mandate.php b/plugins/stripe-php/lib/Mandate.php
new file mode 100644
index 00000000..0974b96a
--- /dev/null
+++ b/plugins/stripe-php/lib/Mandate.php
@@ -0,0 +1,51 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $multi_use
+ * @property null|string $on_behalf_of The account (if any) that the mandate is intended for.
+ * @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate.
+ * @property \Stripe\StripeObject $payment_method_details
+ * @property null|\Stripe\StripeObject $single_use
+ * @property string $status The mandate status indicates whether or not you can use it to initiate a payment.
+ * @property string $type The type of the mandate.
+ */
+class Mandate extends ApiResource
+{
+ const OBJECT_NAME = 'mandate';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_INACTIVE = 'inactive';
+ const STATUS_PENDING = 'pending';
+
+ const TYPE_MULTI_USE = 'multi_use';
+ const TYPE_SINGLE_USE = 'single_use';
+
+ /**
+ * Retrieves a Mandate object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Mandate
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/OAuth.php b/plugins/stripe-php/lib/OAuth.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/OAuth.php
rename to plugins/stripe-php/lib/OAuth.php
diff --git a/plugins/stripe-php-10.5.0/lib/OAuthErrorObject.php b/plugins/stripe-php/lib/OAuthErrorObject.php
similarity index 94%
rename from plugins/stripe-php-10.5.0/lib/OAuthErrorObject.php
rename to plugins/stripe-php/lib/OAuthErrorObject.php
index 620c5bb2..7190ac9b 100644
--- a/plugins/stripe-php-10.5.0/lib/OAuthErrorObject.php
+++ b/plugins/stripe-php/lib/OAuthErrorObject.php
@@ -16,8 +16,9 @@ class OAuthErrorObject extends StripeObject
* @param array $values
* @param null|array|string|Util\RequestOptions $opts
* @param bool $partial defaults to false
+ * @param 'v1'|'v2' $apiMode
*/
- public function refreshFrom($values, $opts, $partial = false)
+ public function refreshFrom($values, $opts, $partial = false, $apiMode = 'v1')
{
// Unlike most other API resources, the API will omit attributes in
// error objects when they have a null value. We manually set default
diff --git a/plugins/stripe-php-10.5.0/lib/PaymentIntent.php b/plugins/stripe-php/lib/PaymentIntent.php
similarity index 52%
rename from plugins/stripe-php-10.5.0/lib/PaymentIntent.php
rename to plugins/stripe-php/lib/PaymentIntent.php
index 7fd57796..c466fed7 100644
--- a/plugins/stripe-php-10.5.0/lib/PaymentIntent.php
+++ b/plugins/stripe-php/lib/PaymentIntent.php
@@ -5,69 +5,83 @@
namespace Stripe;
/**
- * A PaymentIntent guides you through the process of collecting a payment from your
- * customer. We recommend that you create exactly one PaymentIntent for each order
- * or customer session in your system. You can reference the PaymentIntent later to
+ * A PaymentIntent guides you through the process of collecting a payment from your customer.
+ * We recommend that you create exactly one PaymentIntent for each order or
+ * customer session in your system. You can reference the PaymentIntent later to
* see the history of payment attempts for a particular session.
*
- * A PaymentIntent transitions through multiple
- * statuses throughout its lifetime as it interfaces with Stripe.js to perform
+ * A PaymentIntent transitions through
+ * multiple statuses
+ * throughout its lifetime as it interfaces with Stripe.js to perform
* authentication flows and ultimately creates at most one successful charge.
*
- * Related guide: Payment Intents API.
+ * Related guide: Payment Intents API
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $amount Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
* @property int $amount_capturable Amount that can be captured from this PaymentIntent.
- * @property \Stripe\StripeObject $amount_details
- * @property int $amount_received Amount that was collected by this PaymentIntent.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the PaymentIntent.
+ * @property null|\Stripe\StripeObject $amount_details
+ * @property int $amount_received Amount that this PaymentIntent collects.
+ * @property null|string|\Stripe\Application $application ID of the Connect application that created the PaymentIntent.
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts.
* @property null|\Stripe\StripeObject $automatic_payment_methods Settings to configure compatible payment methods from the Stripe Dashboard
* @property null|int $canceled_at Populated when status is canceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
* @property null|string $cancellation_reason Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by Stripe internally (failed_invoice, void_invoice, or automatic).
* @property string $capture_method Controls when the funds will be captured from the customer's account.
* @property null|string $client_secret The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs to accept a payment and learn about how client_secret should be handled.
ID of the Customer this PaymentIntent belongs to, if one exists.
Payment methods attached to other Customers cannot be used with this PaymentIntent.
If present in combination with setup_future_usage, this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.
+ * @property null|string|\Stripe\Customer $customerID of the Customer this PaymentIntent belongs to, if one exists.
Payment methods attached to other Customers cannot be used with this PaymentIntent.
If setup_future_usage is set and this PaymentIntent's payment method is not card_present, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is card_present and isn't a digital wallet, then a generated_card payment method representing the card is created and attached to the Customer instead.
null until PaymentIntent confirmation is attempted.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the documentation.
+ * @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. Learn more about storing information in metadata.
* @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents use case for connected accounts for details.
* @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent.
+ * @property null|\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this PaymentIntent.
* @property null|\Stripe\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.
* @property null|\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment.
* @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
* @property null|string|\Stripe\Review $review ID of the review associated with this PaymentIntent, if any.
- * @property null|string $setup_future_usage Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.
When processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.
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.
Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.
Setting this value for a card charge returns an error. For card charges, set the statement_descriptor_suffix instead.
+ * @property null|string $statement_descriptor_suffix Provides information about a card charge. Concatenated to the account's statement descriptor prefix to form the complete statement descriptor that appears on the customer's statement. * @property string $status Status of this PaymentIntent, one ofrequires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status.
- * @property null|\Stripe\StripeObject $transfer_data The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents use case for connected accounts for details.
- * @property null|string $transfer_group A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected accounts for details.
+ * @property null|\Stripe\StripeObject $transfer_data The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for connected accounts.
+ * @property null|string $transfer_group A string that identifies the resulting payment as part of a group. Learn more about the use case for connected accounts.
*/
class PaymentIntent extends ApiResource
{
const OBJECT_NAME = 'payment_intent';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
- use ApiOperations\Search;
use ApiOperations\Update;
+ const CANCELLATION_REASON_ABANDONED = 'abandoned';
+ const CANCELLATION_REASON_AUTOMATIC = 'automatic';
+ const CANCELLATION_REASON_DUPLICATE = 'duplicate';
+ const CANCELLATION_REASON_FAILED_INVOICE = 'failed_invoice';
+ const CANCELLATION_REASON_FRAUDULENT = 'fraudulent';
+ const CANCELLATION_REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer';
+ const CANCELLATION_REASON_VOID_INVOICE = 'void_invoice';
+
+ const CAPTURE_METHOD_AUTOMATIC = 'automatic';
+ const CAPTURE_METHOD_AUTOMATIC_ASYNC = 'automatic_async';
+ const CAPTURE_METHOD_MANUAL = 'manual';
+
+ const CONFIRMATION_METHOD_AUTOMATIC = 'automatic';
+ const CONFIRMATION_METHOD_MANUAL = 'manual';
+
+ const SETUP_FUTURE_USAGE_OFF_SESSION = 'off_session';
+ const SETUP_FUTURE_USAGE_ON_SESSION = 'on_session';
+
const STATUS_CANCELED = 'canceled';
const STATUS_PROCESSING = 'processing';
const STATUS_REQUIRES_ACTION = 'requires_action';
@@ -76,6 +90,110 @@ class PaymentIntent extends ApiResource
const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method';
const STATUS_SUCCEEDED = 'succeeded';
+ /**
+ * Creates a PaymentIntent object.
+ *
+ * After the PaymentIntent is created, attach a payment method and confirm to continue the payment.
+ * Learn more about the available payment
+ * flows with the Payment Intents API.
+ *
+ * When you use confirm=true during creation, it’s equivalent to
+ * creating and confirming the PaymentIntent in the same call. You can use any
+ * parameters available in the confirm
+ * API when you supply confirm=true.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentIntent the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of PaymentIntents.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\PaymentIntent> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a PaymentIntent that has previously been created.
+ *
+ * You can retrieve a PaymentIntent client-side using a publishable key when the
+ * client_secret is in the query string.
+ *
+ * If you retrieve a PaymentIntent with a publishable key, it only returns a subset
+ * of properties. Refer to the payment intent
+ * object reference for more details.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentIntent
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates properties on a PaymentIntent object without confirming.
+ *
+ * Depending on which properties you update, you might need to confirm the
+ * PaymentIntent again. For example, updating the payment_method
+ * always requires you to confirm the PaymentIntent again. If you prefer to update
+ * and confirm at the same time, we recommend updating properties through the confirm API instead.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentIntent the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
@@ -184,12 +302,12 @@ class PaymentIntent extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\SearchResulturl is active. If false, customers visiting the URL will be shown a page saying that the link has been deactivated.
* @property \Stripe\StripeObject $after_completion
* @property bool $allow_promotion_codes Whether user redeemable promotion codes are enabled.
+ * @property null|string|\Stripe\Application $application The ID of the Connect application that created the Payment Link.
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
- * @property null|float $application_fee_percent This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
+ * @property null|float $application_fee_percent This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
* @property \Stripe\StripeObject $automatic_tax
- * @property string $billing_address_collection Configuration for collecting the customer's billing address.
+ * @property string $billing_address_collection Configuration for collecting the customer's billing address. Defaults to auto.
* @property null|\Stripe\StripeObject $consent_collection When set, provides configuration to gather active consent from customers.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property \Stripe\StripeObject[] $custom_fields Collect additional information from your customer using custom fields. Up to 3 fields are supported.
* @property \Stripe\StripeObject $custom_text
* @property string $customer_creation Configuration for Customer creation during checkout.
+ * @property null|string $inactive_message The custom message to be displayed to a customer when a payment link is no longer active.
* @property null|\Stripe\StripeObject $invoice_creation Configuration for creating invoice for payment mode payment links.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items The line items representing what is being sold.
+ * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items The line items representing what is being sold.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|string|\Stripe\Account $on_behalf_of The account on behalf of which to charge. See the Connect documentation for details.
* @property null|\Stripe\StripeObject $payment_intent_data Indicates the parameters to be passed to PaymentIntent creation during checkout.
- * @property string $payment_method_collection Configuration for collecting a payment method during checkout.
+ * @property string $payment_method_collection Configuration for collecting a payment method during checkout. Defaults to always.
* @property null|string[] $payment_method_types The list of payment method types that customers can use. When null, Stripe will dynamically show relevant payment methods you've enabled in your payment method settings.
* @property \Stripe\StripeObject $phone_number_collection
+ * @property null|\Stripe\StripeObject $restrictions Settings that restrict the usage of a payment link.
* @property null|\Stripe\StripeObject $shipping_address_collection Configuration for collecting the customer's shipping address.
* @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to the session.
* @property string $submit_type Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
@@ -51,9 +49,6 @@ class PaymentLink extends ApiResource
{
const OBJECT_NAME = 'payment_link';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
use ApiOperations\Update;
const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
@@ -69,6 +64,88 @@ class PaymentLink extends ApiResource
const SUBMIT_TYPE_BOOK = 'book';
const SUBMIT_TYPE_DONATE = 'donate';
const SUBMIT_TYPE_PAY = 'pay';
+ const SUBMIT_TYPE_SUBSCRIBE = 'subscribe';
+
+ /**
+ * Creates a payment link.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentLink the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of your payment links.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\PaymentLink> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieve a payment link.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentLink
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a payment link.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentLink the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
/**
* @param string $id
@@ -77,7 +154,7 @@ class PaymentLink extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\LineItem> list of LineItems
+ * @return \Stripe\Collection<\Stripe\LineItem> list of line items
*/
public static function allLineItems($id, $params = null, $opts = null)
{
diff --git a/plugins/stripe-php/lib/PaymentMethod.php b/plugins/stripe-php/lib/PaymentMethod.php
new file mode 100644
index 00000000..d2d32b06
--- /dev/null
+++ b/plugins/stripe-php/lib/PaymentMethod.php
@@ -0,0 +1,255 @@
+PaymentIntents to collect payments or save them to
+ * Customer objects to store instrument details for future payments.
+ *
+ * Related guides: Payment Methods and More Payment Scenarios.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|\Stripe\StripeObject $acss_debit
+ * @property null|\Stripe\StripeObject $affirm
+ * @property null|\Stripe\StripeObject $afterpay_clearpay
+ * @property null|\Stripe\StripeObject $alipay
+ * @property null|string $allow_redisplay This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
+ * @property null|\Stripe\StripeObject $alma
+ * @property null|\Stripe\StripeObject $amazon_pay
+ * @property null|\Stripe\StripeObject $au_becs_debit
+ * @property null|\Stripe\StripeObject $bacs_debit
+ * @property null|\Stripe\StripeObject $bancontact
+ * @property \Stripe\StripeObject $billing_details
+ * @property null|\Stripe\StripeObject $blik
+ * @property null|\Stripe\StripeObject $boleto
+ * @property null|\Stripe\StripeObject $card
+ * @property null|\Stripe\StripeObject $card_present
+ * @property null|\Stripe\StripeObject $cashapp
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string|\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
+ * @property null|\Stripe\StripeObject $customer_balance
+ * @property null|\Stripe\StripeObject $eps
+ * @property null|\Stripe\StripeObject $fpx
+ * @property null|\Stripe\StripeObject $giropay
+ * @property null|\Stripe\StripeObject $grabpay
+ * @property null|\Stripe\StripeObject $ideal
+ * @property null|\Stripe\StripeObject $interac_present
+ * @property null|\Stripe\StripeObject $kakao_pay
+ * @property null|\Stripe\StripeObject $klarna
+ * @property null|\Stripe\StripeObject $konbini
+ * @property null|\Stripe\StripeObject $kr_card
+ * @property null|\Stripe\StripeObject $link
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $mobilepay
+ * @property null|\Stripe\StripeObject $multibanco
+ * @property null|\Stripe\StripeObject $naver_pay
+ * @property null|\Stripe\StripeObject $oxxo
+ * @property null|\Stripe\StripeObject $p24
+ * @property null|\Stripe\StripeObject $payco
+ * @property null|\Stripe\StripeObject $paynow
+ * @property null|\Stripe\StripeObject $paypal
+ * @property null|\Stripe\StripeObject $pix
+ * @property null|\Stripe\StripeObject $promptpay
+ * @property null|\Stripe\StripeObject $radar_options Options to configure Radar. See Radar Session for more information.
+ * @property null|\Stripe\StripeObject $revolut_pay
+ * @property null|\Stripe\StripeObject $samsung_pay
+ * @property null|\Stripe\StripeObject $sepa_debit
+ * @property null|\Stripe\StripeObject $sofort
+ * @property null|\Stripe\StripeObject $swish
+ * @property null|\Stripe\StripeObject $twint
+ * @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ * @property null|\Stripe\StripeObject $us_bank_account
+ * @property null|\Stripe\StripeObject $wechat_pay
+ * @property null|\Stripe\StripeObject $zip
+ */
+class PaymentMethod extends ApiResource
+{
+ const OBJECT_NAME = 'payment_method';
+
+ use ApiOperations\Update;
+
+ const ALLOW_REDISPLAY_ALWAYS = 'always';
+ const ALLOW_REDISPLAY_LIMITED = 'limited';
+ const ALLOW_REDISPLAY_UNSPECIFIED = 'unspecified';
+
+ const TYPE_ACSS_DEBIT = 'acss_debit';
+ const TYPE_AFFIRM = 'affirm';
+ const TYPE_AFTERPAY_CLEARPAY = 'afterpay_clearpay';
+ const TYPE_ALIPAY = 'alipay';
+ const TYPE_ALMA = 'alma';
+ const TYPE_AMAZON_PAY = 'amazon_pay';
+ const TYPE_AU_BECS_DEBIT = 'au_becs_debit';
+ const TYPE_BACS_DEBIT = 'bacs_debit';
+ const TYPE_BANCONTACT = 'bancontact';
+ const TYPE_BLIK = 'blik';
+ const TYPE_BOLETO = 'boleto';
+ const TYPE_CARD = 'card';
+ const TYPE_CARD_PRESENT = 'card_present';
+ const TYPE_CASHAPP = 'cashapp';
+ const TYPE_CUSTOMER_BALANCE = 'customer_balance';
+ const TYPE_EPS = 'eps';
+ const TYPE_FPX = 'fpx';
+ const TYPE_GIROPAY = 'giropay';
+ const TYPE_GRABPAY = 'grabpay';
+ const TYPE_IDEAL = 'ideal';
+ const TYPE_INTERAC_PRESENT = 'interac_present';
+ const TYPE_KAKAO_PAY = 'kakao_pay';
+ const TYPE_KLARNA = 'klarna';
+ const TYPE_KONBINI = 'konbini';
+ const TYPE_KR_CARD = 'kr_card';
+ const TYPE_LINK = 'link';
+ const TYPE_MOBILEPAY = 'mobilepay';
+ const TYPE_MULTIBANCO = 'multibanco';
+ const TYPE_NAVER_PAY = 'naver_pay';
+ const TYPE_OXXO = 'oxxo';
+ const TYPE_P24 = 'p24';
+ const TYPE_PAYCO = 'payco';
+ const TYPE_PAYNOW = 'paynow';
+ const TYPE_PAYPAL = 'paypal';
+ const TYPE_PIX = 'pix';
+ const TYPE_PROMPTPAY = 'promptpay';
+ const TYPE_REVOLUT_PAY = 'revolut_pay';
+ const TYPE_SAMSUNG_PAY = 'samsung_pay';
+ const TYPE_SEPA_DEBIT = 'sepa_debit';
+ const TYPE_SOFORT = 'sofort';
+ const TYPE_SWISH = 'swish';
+ const TYPE_TWINT = 'twint';
+ const TYPE_US_BANK_ACCOUNT = 'us_bank_account';
+ const TYPE_WECHAT_PAY = 'wechat_pay';
+ const TYPE_ZIP = 'zip';
+
+ /**
+ * Creates a PaymentMethod object. Read the Stripe.js
+ * reference to learn how to create PaymentMethods via Stripe.js.
+ *
+ * Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a
+ * payment immediately or the SetupIntent API to collect payment
+ * method details ahead of a future payment.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethod the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of PaymentMethods for Treasury flows. If you want to list the
+ * PaymentMethods attached to a Customer for payments, you should use the List a Customer’s
+ * PaymentMethods API instead.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\PaymentMethod> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a
+ * payment method attached to a Customer, you should use Retrieve a Customer’s
+ * PaymentMethods.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethod
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a PaymentMethod object. A PaymentMethod must be attached a customer to
+ * be updated.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethod the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethod the attached payment method
+ */
+ public function attach($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/attach';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethod the detached payment method
+ */
+ public function detach($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/detach';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/PaymentMethodConfiguration.php b/plugins/stripe-php/lib/PaymentMethodConfiguration.php
new file mode 100644
index 00000000..46e1ed0f
--- /dev/null
+++ b/plugins/stripe-php/lib/PaymentMethodConfiguration.php
@@ -0,0 +1,159 @@
+charge type:
+ *
+ * Direct configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect.
+ *
+ * Child configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter.
+ *
+ * Child configurations have a parent that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account’s associated child configuration. Parent configurations are managed in the dashboard and are not available in this API.
+ *
+ * Related guides:
+ * - Payment Method Configurations API
+ * - Multiple configurations on dynamic payment methods
+ * - Multiple configurations for your Connect accounts
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|\Stripe\StripeObject $acss_debit
+ * @property bool $active Whether the configuration can be used for new payments.
+ * @property null|\Stripe\StripeObject $affirm
+ * @property null|\Stripe\StripeObject $afterpay_clearpay
+ * @property null|\Stripe\StripeObject $alipay
+ * @property null|\Stripe\StripeObject $alma
+ * @property null|\Stripe\StripeObject $amazon_pay
+ * @property null|\Stripe\StripeObject $apple_pay
+ * @property null|string $application For child configs, the Connect application associated with the configuration.
+ * @property null|\Stripe\StripeObject $au_becs_debit
+ * @property null|\Stripe\StripeObject $bacs_debit
+ * @property null|\Stripe\StripeObject $bancontact
+ * @property null|\Stripe\StripeObject $blik
+ * @property null|\Stripe\StripeObject $boleto
+ * @property null|\Stripe\StripeObject $card
+ * @property null|\Stripe\StripeObject $cartes_bancaires
+ * @property null|\Stripe\StripeObject $cashapp
+ * @property null|\Stripe\StripeObject $customer_balance
+ * @property null|\Stripe\StripeObject $eps
+ * @property null|\Stripe\StripeObject $fpx
+ * @property null|\Stripe\StripeObject $giropay
+ * @property null|\Stripe\StripeObject $google_pay
+ * @property null|\Stripe\StripeObject $grabpay
+ * @property null|\Stripe\StripeObject $ideal
+ * @property bool $is_default The default configuration is used whenever a payment method configuration is not specified.
+ * @property null|\Stripe\StripeObject $jcb
+ * @property null|\Stripe\StripeObject $klarna
+ * @property null|\Stripe\StripeObject $konbini
+ * @property null|\Stripe\StripeObject $link
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $mobilepay
+ * @property null|\Stripe\StripeObject $multibanco
+ * @property string $name The configuration's name.
+ * @property null|\Stripe\StripeObject $oxxo
+ * @property null|\Stripe\StripeObject $p24
+ * @property null|string $parent For child configs, the configuration's parent configuration.
+ * @property null|\Stripe\StripeObject $paynow
+ * @property null|\Stripe\StripeObject $paypal
+ * @property null|\Stripe\StripeObject $promptpay
+ * @property null|\Stripe\StripeObject $revolut_pay
+ * @property null|\Stripe\StripeObject $sepa_debit
+ * @property null|\Stripe\StripeObject $sofort
+ * @property null|\Stripe\StripeObject $swish
+ * @property null|\Stripe\StripeObject $twint
+ * @property null|\Stripe\StripeObject $us_bank_account
+ * @property null|\Stripe\StripeObject $wechat_pay
+ * @property null|\Stripe\StripeObject $zip
+ */
+class PaymentMethodConfiguration extends ApiResource
+{
+ const OBJECT_NAME = 'payment_method_configuration';
+
+ use ApiOperations\Update;
+
+ /**
+ * Creates a payment method configuration.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodConfiguration the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * List payment method configurations.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\PaymentMethodConfiguration> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieve payment method configuration.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodConfiguration
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Update payment method configuration.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodConfiguration the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/PaymentMethodDomain.php b/plugins/stripe-php/lib/PaymentMethodDomain.php
new file mode 100644
index 00000000..e50eaa93
--- /dev/null
+++ b/plugins/stripe-php/lib/PaymentMethodDomain.php
@@ -0,0 +1,128 @@
+Payment method domains.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property \Stripe\StripeObject $amazon_pay Indicates the status of a specific payment method on a payment method domain.
+ * @property \Stripe\StripeObject $apple_pay Indicates the status of a specific payment method on a payment method domain.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $domain_name The domain name that this payment method domain object represents.
+ * @property bool $enabled Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
+ * @property \Stripe\StripeObject $google_pay Indicates the status of a specific payment method on a payment method domain.
+ * @property \Stripe\StripeObject $link Indicates the status of a specific payment method on a payment method domain.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $paypal Indicates the status of a specific payment method on a payment method domain.
+ */
+class PaymentMethodDomain extends ApiResource
+{
+ const OBJECT_NAME = 'payment_method_domain';
+
+ use ApiOperations\Update;
+
+ /**
+ * Creates a payment method domain.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Lists the details of existing payment method domains.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\PaymentMethodDomain> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing payment method domain.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates an existing payment method domain.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain the validated payment method domain
+ */
+ public function validate($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/validate';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/Payout.php b/plugins/stripe-php/lib/Payout.php
new file mode 100644
index 00000000..b97bcfa4
--- /dev/null
+++ b/plugins/stripe-php/lib/Payout.php
@@ -0,0 +1,212 @@
+Payout object is created when you receive funds from Stripe, or when you
+ * initiate a payout to either a bank account or debit card of a connected
+ * Stripe account. You can retrieve individual payouts,
+ * and list all payouts. Payouts are made on varying
+ * schedules, depending on your country and
+ * industry.
+ *
+ * Related guide: Receiving payouts
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount The amount (in cents (or local equivalent)) that transfers to your bank account or debit card.
+ * @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the payout. See the Connect documentation for details.
+ * @property null|int $application_fee_amount The amount of the application fee (if any) requested for the payout. See the Connect documentation for details.
+ * @property int $arrival_date Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays.
+ * @property bool $automatic Returns true if the payout is created by an automated payout schedule and false if it's requested manually.
+ * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
+ * @property null|string|\Stripe\BankAccount|\Stripe\Card $destination ID of the bank account or card the payout is sent to.
+ * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance.
+ * @property null|string $failure_code Error code that provides a reason for a payout failure, if available. View our list of failure codes.
+ * @property null|string $failure_message Message that provides the reason for a payout failure, if available.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property string $method The method used to send this payout, which can be standard or instant. instant is supported for payouts to debit cards and bank accounts in certain countries. Learn more about bank support for Instant Payouts.
+ * @property null|string|\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout.
+ * @property string $reconciliation_status If completed, you can use the Balance Transactions API to list all balance transactions that are paid out in this payout.
+ * @property null|string|\Stripe\Payout $reversed_by If the payout reverses, this is the ID of the payout that reverses this payout.
+ * @property string $source_type The source balance this payout came from, which can be one of the following: card, fpx, or bank_account.
+ * @property null|string $statement_descriptor Extra information about a payout that displays on the user's bank statement.
+ * @property string $status Current status of the payout: paid, pending, in_transit, canceled or failed. A payout is pending until it's submitted to the bank, when it becomes in_transit. The status changes to paid if the transaction succeeds, or to failed or canceled (within 5 business days). Some payouts that fail might initially show as paid, then change to failed.
+ * @property null|\Stripe\StripeObject $trace_id A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar.
+ * @property string $type Can be bank_account or card.
+ */
+class Payout extends ApiResource
+{
+ const OBJECT_NAME = 'payout';
+
+ use ApiOperations\Update;
+
+ const METHOD_INSTANT = 'instant';
+ const METHOD_STANDARD = 'standard';
+
+ const RECONCILIATION_STATUS_COMPLETED = 'completed';
+ const RECONCILIATION_STATUS_IN_PROGRESS = 'in_progress';
+ const RECONCILIATION_STATUS_NOT_APPLICABLE = 'not_applicable';
+
+ const STATUS_CANCELED = 'canceled';
+ const STATUS_FAILED = 'failed';
+ const STATUS_IN_TRANSIT = 'in_transit';
+ const STATUS_PAID = 'paid';
+ const STATUS_PENDING = 'pending';
+
+ const TYPE_BANK_ACCOUNT = 'bank_account';
+ const TYPE_CARD = 'card';
+
+ /**
+ * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t,
+ * you receive an “Insufficient Funds” error.
+ *
+ * If your API key is in test mode, money won’t actually be sent, though every
+ * other action occurs as if you’re in live mode.
+ *
+ * If you create a manual payout on a Stripe account that uses multiple payment
+ * source types, you need to specify the source type balance that the payout draws
+ * from. The balance object details available and
+ * pending amounts by source type.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Payout the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of existing payouts sent to third-party bank accounts or payouts
+ * that Stripe sent to you. The payouts return in sorted order, with the most
+ * recently created payouts appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Payout> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing payout. Supply the unique payout ID from
+ * either a payout creation request or the payout list. Stripe returns the
+ * corresponding payout information.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Payout
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified payout by setting the values of the parameters you pass.
+ * We don’t change parameters that you don’t provide. This request only accepts the
+ * metadata as arguments.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Payout the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ const FAILURE_ACCOUNT_CLOSED = 'account_closed';
+ const FAILURE_ACCOUNT_FROZEN = 'account_frozen';
+ const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted';
+ const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed';
+ const FAILURE_COULD_NOT_PROCESS = 'could_not_process';
+ const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
+ const FAILURE_DECLINED = 'declined';
+ const FAILURE_INCORRECT_ACCOUNT_HOLDER_ADDRESS = 'incorrect_account_holder_address';
+ const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name';
+ const FAILURE_INCORRECT_ACCOUNT_HOLDER_TAX_ID = 'incorrect_account_holder_tax_id';
+ const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds';
+ const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number';
+ const FAILURE_INVALID_CURRENCY = 'invalid_currency';
+ const FAILURE_NO_ACCOUNT = 'no_account';
+ const FAILURE_UNSUPPORTED_CARD = 'unsupported_card';
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Payout the canceled payout
+ */
+ public function cancel($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/cancel';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Payout the reversed payout
+ */
+ public function reverse($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/reverse';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Person.php b/plugins/stripe-php/lib/Person.php
similarity index 52%
rename from plugins/stripe-php-10.5.0/lib/Person.php
rename to plugins/stripe-php/lib/Person.php
index becd5904..467295ed 100644
--- a/plugins/stripe-php-10.5.0/lib/Person.php
+++ b/plugins/stripe-php/lib/Person.php
@@ -7,56 +7,46 @@ namespace Stripe;
/**
* This is an object representing a person associated with a Stripe account.
*
- * A platform cannot access a Standard or Express account's persons after the
- * account starts onboarding, such as after generating an account link for the
- * account. See the Standard onboarding
- * or Express onboarding
- * documentation for information about platform pre-filling and account
- * onboarding steps.
+ * A platform cannot access a person for an account where account.controller.requirement_collection is stripe, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
*
- * Related guide: Handling
- * Identity Verification with the API.
+ * See the Standard onboarding or Express onboarding documentation for information about prefilling information and account onboarding steps. Learn more about handling identity verification with the API.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property string $account The account the person is associated with.
- * @property \Stripe\StripeObject $address
+ * @property null|string $account The account the person is associated with.
+ * @property null|\Stripe\StripeObject $additional_tos_acceptances
+ * @property null|\Stripe\StripeObject $address
* @property null|\Stripe\StripeObject $address_kana The Kana variation of the person's address (Japan only).
* @property null|\Stripe\StripeObject $address_kanji The Kanji variation of the person's address (Japan only).
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property \Stripe\StripeObject $dob
+ * @property null|\Stripe\StripeObject $dob
* @property null|string $email The person's email address.
* @property null|string $first_name The person's first name.
* @property null|string $first_name_kana The Kana variation of the person's first name (Japan only).
* @property null|string $first_name_kanji The Kanji variation of the person's first name (Japan only).
- * @property string[] $full_name_aliases A list of alternate names or aliases that the person is known by.
- * @property null|\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.
- * @property null|string $gender The person's gender (International regulations require either "male" or "female").
- * @property bool $id_number_provided Whether the person's id_number was provided.
- * @property bool $id_number_secondary_provided Whether the person's id_number_secondary was provided.
+ * @property null|string[] $full_name_aliases A list of alternate names or aliases that the person is known by.
+ * @property null|\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.
+ * @property null|string $gender The person's gender.
+ * @property null|bool $id_number_provided Whether the person's id_number was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by ssn_last_4_provided).
+ * @property null|bool $id_number_secondary_provided Whether the person's id_number_secondary was provided.
* @property null|string $last_name The person's last name.
* @property null|string $last_name_kana The Kana variation of the person's last name (Japan only).
* @property null|string $last_name_kanji The Kanji variation of the person's last name (Japan only).
* @property null|string $maiden_name The person's maiden name.
- * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|string $nationality The country where the person is a national.
* @property null|string $phone The person's phone number.
- * @property string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
- * @property \Stripe\StripeObject $registered_address
- * @property \Stripe\StripeObject $relationship
+ * @property null|string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ * @property null|\Stripe\StripeObject $registered_address
+ * @property null|\Stripe\StripeObject $relationship
* @property null|\Stripe\StripeObject $requirements Information about the requirements for this person, including what information needs to be collected, and by when.
- * @property bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only).
- * @property \Stripe\StripeObject $verification
+ * @property null|bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only).
+ * @property null|\Stripe\StripeObject $verification
*/
class Person extends ApiResource
{
const OBJECT_NAME = 'person';
- use ApiOperations\Delete;
- use ApiOperations\Update;
-
const GENDER_FEMALE = 'female';
const GENDER_MALE = 'male';
@@ -67,6 +57,8 @@ class Person extends ApiResource
const VERIFICATION_STATUS_UNVERIFIED = 'unverified';
const VERIFICATION_STATUS_VERIFIED = 'verified';
+ use ApiOperations\Delete;
+
/**
* @return string the API URL for this Stripe account reversal
*/
@@ -116,9 +108,32 @@ class Person extends ApiResource
public static function update($_id, $_params = null, $_options = null)
{
$msg = 'Persons cannot be updated without an account ID. Update ' .
- "a person using `Account::updatePerson('account_id', " .
- "'person_id', \$updateParams)`.";
+ "a person using `Account::updatePerson('account_id', " .
+ "'person_id', \$updateParams)`.";
throw new Exception\BadMethodCallException($msg);
}
+
+ /**
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return static the saved resource
+ *
+ * @deprecated The `save` method is deprecated and will be removed in a
+ * future major version of the library. Use the static method `update`
+ * on the resource instead.
+ */
+ public function save($opts = null)
+ {
+ $params = $this->serializeParameters();
+ if (\count($params) > 0) {
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('post', $url, $params, $opts, ['save']);
+ $this->refreshFrom($response, $opts);
+ }
+
+ return $this;
+ }
}
diff --git a/plugins/stripe-php/lib/Plan.php b/plugins/stripe-php/lib/Plan.php
new file mode 100644
index 00000000..53d869b7
--- /dev/null
+++ b/plugins/stripe-php/lib/Plan.php
@@ -0,0 +1,170 @@
+Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.
+ *
+ * Plans define the base price, currency, and billing cycle for recurring purchases of products.
+ * Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
+ *
+ * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
+ *
+ * Related guides: Set up a subscription and more about products and prices.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property bool $active Whether the plan can be used for new purchases.
+ * @property null|string $aggregate_usage Specifies a usage aggregation strategy for plans of usage_type=metered. Allowed values are sum for summing up all usage during a period, last_during_period for using the last usage record reported within a period, last_ever for using the last usage record ever (across period bounds) or max which uses the usage record with the maximum reported usage during a period. Defaults to sum.
+ * @property null|int $amount The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
+ * @property null|string $amount_decimal The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.
+ * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in amount) will be charged per unit in quantity (for plans with usage_type=licensed), or per unit of total usage (for plans with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property string $interval The frequency at which a subscription is billed. One of day, week, month or year.
+ * @property int $interval_count The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.
+ * @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|string $meter The meter tracking the usage of a metered price
+ * @property null|string $nickname A brief description of the plan, hidden from customers.
+ * @property null|string|\Stripe\Product $product The product whose pricing this plan determines.
+ * @property null|\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.
+ * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.
+ * @property null|\Stripe\StripeObject $transform_usage Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers.
+ * @property null|int $trial_period_days Default number of trial days when subscribing a customer to this plan using trial_from_plan=true.
+ * @property string $usage_type Configures how the quantity per period should be determined. Can be either metered or licensed. licensed automatically bills the quantity set when adding it to a subscription. metered aggregates the total usage based on usage records. Defaults to licensed.
+ */
+class Plan extends ApiResource
+{
+ const OBJECT_NAME = 'plan';
+
+ use ApiOperations\Update;
+
+ const AGGREGATE_USAGE_LAST_DURING_PERIOD = 'last_during_period';
+ const AGGREGATE_USAGE_LAST_EVER = 'last_ever';
+ const AGGREGATE_USAGE_MAX = 'max';
+ const AGGREGATE_USAGE_SUM = 'sum';
+
+ const BILLING_SCHEME_PER_UNIT = 'per_unit';
+ const BILLING_SCHEME_TIERED = 'tiered';
+
+ const INTERVAL_DAY = 'day';
+ const INTERVAL_MONTH = 'month';
+ const INTERVAL_WEEK = 'week';
+ const INTERVAL_YEAR = 'year';
+
+ const TIERS_MODE_GRADUATED = 'graduated';
+ const TIERS_MODE_VOLUME = 'volume';
+
+ const USAGE_TYPE_LICENSED = 'licensed';
+ const USAGE_TYPE_METERED = 'metered';
+
+ /**
+ * You can now model subscriptions more flexibly using the Prices
+ * API. It replaces the Plans API and is backwards compatible to simplify your
+ * migration.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Plan the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deleting plans means new subscribers can’t be added. Existing subscribers aren’t
+ * affected.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Plan the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of your plans.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Plan> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the plan with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Plan
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified plan by setting the values of the parameters passed. Any
+ * parameters not provided are left unchanged. By design, you cannot change a
+ * plan’s ID, amount, currency, or billing cycle.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Plan the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Price.php b/plugins/stripe-php/lib/Price.php
new file mode 100644
index 00000000..48a76228
--- /dev/null
+++ b/plugins/stripe-php/lib/Price.php
@@ -0,0 +1,155 @@
+Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
+ *
+ * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
+ *
+ * Related guides: Set up a subscription, create an invoice, and more about products and prices.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property bool $active Whether the price can be used for new purchases.
+ * @property string $billing_scheme Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|\Stripe\StripeObject $currency_options Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
+ * @property null|\Stripe\StripeObject $custom_unit_amount When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ * @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 $nickname A brief description of the price, hidden from customers.
+ * @property string|\Stripe\Product $product The ID of the product this price is associated with.
+ * @property null|\Stripe\StripeObject $recurring The recurring components of a price such as interval and usage_type.
+ * @property null|string $tax_behavior Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.
+ * @property null|\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.
+ * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.
+ * @property null|\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers.
+ * @property string $type One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
+ * @property null|int $unit_amount The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
+ * @property null|string $unit_amount_decimal The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.
+ */
+class Price extends ApiResource
+{
+ const OBJECT_NAME = 'price';
+
+ use ApiOperations\Update;
+
+ const BILLING_SCHEME_PER_UNIT = 'per_unit';
+ const BILLING_SCHEME_TIERED = 'tiered';
+
+ const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
+ const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
+ const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified';
+
+ const TIERS_MODE_GRADUATED = 'graduated';
+ const TIERS_MODE_VOLUME = 'volume';
+
+ const TYPE_ONE_TIME = 'one_time';
+ const TYPE_RECURRING = 'recurring';
+
+ /**
+ * Creates a new price for an existing product. The price can be recurring or
+ * one-time.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Price the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of your active prices, excluding inline prices.
+ * For the list of inactive prices, set active to false.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Price> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the price with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Price
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified price by setting the values of the parameters passed. Any
+ * parameters not provided are left unchanged.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Price the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SearchResult<\Stripe\Price> the price search results
+ */
+ public static function search($params = null, $opts = null)
+ {
+ $url = '/v1/prices/search';
+
+ return static::_requestPage($url, \Stripe\SearchResult::class, $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Product.php b/plugins/stripe-php/lib/Product.php
new file mode 100644
index 00000000..168d7a0c
--- /dev/null
+++ b/plugins/stripe-php/lib/Product.php
@@ -0,0 +1,229 @@
+Prices to configure pricing in Payment Links, Checkout, and Subscriptions.
+ *
+ * Related guides: Set up a subscription,
+ * share a Payment Link,
+ * accept payments with Checkout,
+ * and more about Products and Prices
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property bool $active Whether the product is currently available for purchase.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string|\Stripe\Price $default_price The ID of the Price object that is the default price for this product.
+ * @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ * @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject[] $marketing_features A list of up to 15 marketing features for this product. These are displayed in pricing tables.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property string $name The product's name, meant to be displayable to the customer.
+ * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes.
+ * @property null|bool $shippable Whether this product is shipped (i.e., physical goods).
+ * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments.
+ * @property null|string|\Stripe\TaxCode $tax_code A tax code ID.
+ * @property string $type The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans.
+ * @property null|string $unit_label A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ * @property null|string $url A URL of a publicly-accessible webpage for this product.
+ */
+class Product extends ApiResource
+{
+ const OBJECT_NAME = 'product';
+
+ use ApiOperations\NestedResource;
+ use ApiOperations\Update;
+
+ const TYPE_GOOD = 'good';
+ const TYPE_SERVICE = 'service';
+
+ /**
+ * Creates a new product object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Product the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Delete a product. Deleting a product is only possible if it has no prices
+ * associated with it. Additionally, deleting a product with type=good
+ * is only possible if it has no SKUs associated with it.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Product the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of your products. The products are returned sorted by creation
+ * date, with the most recently created products appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Product> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing product. Supply the unique product ID from
+ * either a product creation request or the product list, and Stripe will return
+ * the corresponding product information.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Product
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specific product by setting the values of the parameters passed. Any
+ * parameters not provided will be left unchanged.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Product the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SearchResult<\Stripe\Product> the product search results
+ */
+ public static function search($params = null, $opts = null)
+ {
+ $url = '/v1/products/search';
+
+ return static::_requestPage($url, \Stripe\SearchResult::class, $params, $opts);
+ }
+
+ const PATH_FEATURES = '/features';
+
+ /**
+ * @param string $id the ID of the product on which to retrieve the product features
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\ProductFeature> the list of product features
+ */
+ public static function allFeatures($id, $params = null, $opts = null)
+ {
+ return self::_allNestedResources($id, static::PATH_FEATURES, $params, $opts);
+ }
+
+ /**
+ * @param string $id the ID of the product on which to create the product feature
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ProductFeature
+ */
+ public static function createFeature($id, $params = null, $opts = null)
+ {
+ return self::_createNestedResource($id, static::PATH_FEATURES, $params, $opts);
+ }
+
+ /**
+ * @param string $id the ID of the product to which the product feature belongs
+ * @param string $featureId the ID of the product feature to delete
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ProductFeature
+ */
+ public static function deleteFeature($id, $featureId, $params = null, $opts = null)
+ {
+ return self::_deleteNestedResource($id, static::PATH_FEATURES, $featureId, $params, $opts);
+ }
+
+ /**
+ * @param string $id the ID of the product to which the product feature belongs
+ * @param string $featureId the ID of the product feature to retrieve
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ProductFeature
+ */
+ public static function retrieveFeature($id, $featureId, $params = null, $opts = null)
+ {
+ return self::_retrieveNestedResource($id, static::PATH_FEATURES, $featureId, $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/ProductFeature.php b/plugins/stripe-php/lib/ProductFeature.php
new file mode 100644
index 00000000..a978fb18
--- /dev/null
+++ b/plugins/stripe-php/lib/ProductFeature.php
@@ -0,0 +1,19 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ */
+class ProductFeature extends ApiResource
+{
+ const OBJECT_NAME = 'product_feature';
+}
diff --git a/plugins/stripe-php/lib/PromotionCode.php b/plugins/stripe-php/lib/PromotionCode.php
new file mode 100644
index 00000000..317555e1
--- /dev/null
+++ b/plugins/stripe-php/lib/PromotionCode.php
@@ -0,0 +1,116 @@
+coupon. It can be used to
+ * create multiple codes for a single coupon.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property bool $active Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.
+ * @property string $code The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
+ * @property \Stripe\Coupon $coupon A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string|\Stripe\Customer $customer The customer that this promotion code can be used by.
+ * @property null|int $expires_at Date at which the promotion code can no longer be redeemed.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|int $max_redemptions Maximum number of times this promotion code can be redeemed.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property \Stripe\StripeObject $restrictions
+ * @property int $times_redeemed Number of times this promotion code has been used.
+ */
+class PromotionCode extends ApiResource
+{
+ const OBJECT_NAME = 'promotion_code';
+
+ use ApiOperations\Update;
+
+ /**
+ * A promotion code points to a coupon. You can optionally restrict the code to a
+ * specific customer, redemption limit, and expiration date.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PromotionCode the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of your promotion codes.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\PromotionCode> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the promotion code with the given ID. In order to retrieve a promotion
+ * code by the customer-facing code use list with the desired
+ * code.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PromotionCode
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified promotion code by setting the values of the parameters
+ * passed. Most fields are, by design, not editable.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PromotionCode the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Quote.php b/plugins/stripe-php/lib/Quote.php
similarity index 68%
rename from plugins/stripe-php-10.5.0/lib/Quote.php
rename to plugins/stripe-php/lib/Quote.php
index 7e564e8b..3a4eb41f 100644
--- a/plugins/stripe-php-10.5.0/lib/Quote.php
+++ b/plugins/stripe-php/lib/Quote.php
@@ -5,24 +5,23 @@
namespace Stripe;
/**
- * A Quote is a way to model prices that you'd like to provide to a customer. Once
- * accepted, it will automatically create an invoice, subscription or subscription
- * schedule.
+ * A Quote is a way to model prices that you'd like to provide to a customer.
+ * Once accepted, it will automatically create an invoice, subscription or subscription schedule.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $amount_subtotal Total before any discounts or taxes are applied.
* @property int $amount_total Total after discounts and taxes are applied.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the quote.
+ * @property null|string|\Stripe\Application $application ID of the Connect Application that created the quote.
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.
- * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
+ * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
* @property \Stripe\StripeObject $automatic_tax
* @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active. Defaults to charge_automatically.
* @property \Stripe\StripeObject $computed
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property null|string|\Stripe\Customer $customer The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
- * @property (string|\Stripe\TaxRate)[] $default_tax_rates The tax rates applied to this quote.
+ * @property null|(string|\Stripe\TaxRate)[] $default_tax_rates The tax rates applied to this quote.
* @property null|string $description A description that will be displayed on the quote PDF.
* @property (string|\Stripe\Discount)[] $discounts The discounts applied to this quote.
* @property int $expires_at The date on which the quote will be canceled if in open or draft status. Measured in seconds since the Unix epoch.
@@ -30,8 +29,8 @@ namespace Stripe;
* @property null|\Stripe\StripeObject $from_quote Details of the quote that was cloned. See the cloning documentation for more details.
* @property null|string $header A header that will be displayed on the quote PDF.
* @property null|string|\Stripe\Invoice $invoice The invoice that was created from this quote.
- * @property null|\Stripe\StripeObject $invoice_settings All invoices will be billed using the specified settings.
- * @property \Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
+ * @property \Stripe\StripeObject $invoice_settings
+ * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|string $number A unique number that identifies this particular quote. This number is assigned once the quote is finalized.
@@ -49,9 +48,6 @@ class Quote extends ApiResource
{
const OBJECT_NAME = 'quote';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
use ApiOperations\Update;
const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically';
@@ -63,21 +59,87 @@ class Quote extends ApiResource
const STATUS_OPEN = 'open';
/**
- * @param callable $readBodyChunkCallable
+ * A quote models prices and services for a customer. Default options for
+ * header, description, footer, and
+ * expires_at can be set in the dashboard via the quote template.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Quote the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of your quotes.
+ *
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Quote> of ApiResources
*/
- public function pdf($readBodyChunkCallable, $params = null, $opts = null)
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the quote with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Quote
+ */
+ public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
- if (null === $opts->apiBase) {
- $opts->apiBase = Stripe::$apiUploadBase;
- }
+ $instance = new static($id, $opts);
+ $instance->refresh();
- $url = $this->instanceUrl() . '/pdf';
- $this->_requestStream('get', $url, $readBodyChunkCallable, $params, $opts);
+ return $instance;
+ }
+
+ /**
+ * A quote models prices and services for a customer.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Quote the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
}
/**
@@ -138,7 +200,7 @@ class Quote extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\LineItem> list of LineItems
+ * @return \Stripe\Collection<\Stripe\LineItem> list of line items
*/
public static function allComputedUpfrontLineItems($id, $params = null, $opts = null)
{
@@ -157,7 +219,7 @@ class Quote extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\LineItem> list of LineItems
+ * @return \Stripe\Collection<\Stripe\LineItem> list of line items
*/
public static function allLineItems($id, $params = null, $opts = null)
{
@@ -168,4 +230,23 @@ class Quote extends ApiResource
return $obj;
}
+
+ /**
+ * @param callable $readBodyChunkCallable
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return void
+ */
+ public function pdf($readBodyChunkCallable, $params = null, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ if (!isset($opts->apiBase)) {
+ $opts->apiBase = \Stripe\Stripe::$apiUploadBase;
+ }
+ $url = $this->instanceUrl() . '/pdf';
+ $this->_requestStream('get', $url, $readBodyChunkCallable, $params, $opts);
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Radar/EarlyFraudWarning.php b/plugins/stripe-php/lib/Radar/EarlyFraudWarning.php
similarity index 55%
rename from plugins/stripe-php-10.5.0/lib/Radar/EarlyFraudWarning.php
rename to plugins/stripe-php/lib/Radar/EarlyFraudWarning.php
index 2dfd2aca..a48ae1a5 100644
--- a/plugins/stripe-php-10.5.0/lib/Radar/EarlyFraudWarning.php
+++ b/plugins/stripe-php/lib/Radar/EarlyFraudWarning.php
@@ -8,9 +8,7 @@ namespace Stripe\Radar;
* An early fraud warning indicates that the card issuer has notified us that a
* charge may be fraudulent.
*
- * Related guide: Early
- * Fraud Warnings.
+ * Related guide: Early fraud warnings
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -19,15 +17,12 @@ namespace Stripe\Radar;
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $fraud_type The type of fraud labelled by the issuer. One of card_never_received, fraudulent_card_application, made_with_counterfeit_card, made_with_lost_card, made_with_stolen_card, misc, unauthorized_use_of_card.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- * @property string|\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded.
+ * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the Payment Intent this early fraud warning is for, optionally expanded.
*/
class EarlyFraudWarning extends \Stripe\ApiResource
{
const OBJECT_NAME = 'radar.early_fraud_warning';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-
const FRAUD_TYPE_CARD_NEVER_RECEIVED = 'card_never_received';
const FRAUD_TYPE_FRAUDULENT_CARD_APPLICATION = 'fraudulent_card_application';
const FRAUD_TYPE_MADE_WITH_COUNTERFEIT_CARD = 'made_with_counterfeit_card';
@@ -35,4 +30,44 @@ class EarlyFraudWarning extends \Stripe\ApiResource
const FRAUD_TYPE_MADE_WITH_STOLEN_CARD = 'made_with_stolen_card';
const FRAUD_TYPE_MISC = 'misc';
const FRAUD_TYPE_UNAUTHORIZED_USE_OF_CARD = 'unauthorized_use_of_card';
+
+ /**
+ * Returns a list of early fraud warnings.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Radar\EarlyFraudWarning> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an early fraud warning that has previously been
+ * created.
+ *
+ * Please refer to the early fraud
+ * warning object reference for more details.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Radar\EarlyFraudWarning
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
}
diff --git a/plugins/stripe-php/lib/Radar/ValueList.php b/plugins/stripe-php/lib/Radar/ValueList.php
new file mode 100644
index 00000000..14afacd3
--- /dev/null
+++ b/plugins/stripe-php/lib/Radar/ValueList.php
@@ -0,0 +1,148 @@
+Default Stripe lists
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property string $alias The name of the value list for use in rules.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $created_by The name or email address of the user who created this value list.
+ * @property string $item_type The type of items in the value list. One of card_fingerprint, us_bank_account_fingerprint, sepa_debit_fingerprint, card_bin, email, ip_address, country, string, case_sensitive_string, or customer_id.
+ * @property \Stripe\Collection<\Stripe\Radar\ValueListItem> $list_items List of items contained within this value list.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property string $name The name of the value list.
+ */
+class ValueList extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'radar.value_list';
+
+ use \Stripe\ApiOperations\Update;
+
+ const ITEM_TYPE_CARD_BIN = 'card_bin';
+ const ITEM_TYPE_CARD_FINGERPRINT = 'card_fingerprint';
+ const ITEM_TYPE_CASE_SENSITIVE_STRING = 'case_sensitive_string';
+ const ITEM_TYPE_COUNTRY = 'country';
+ const ITEM_TYPE_CUSTOMER_ID = 'customer_id';
+ const ITEM_TYPE_EMAIL = 'email';
+ const ITEM_TYPE_IP_ADDRESS = 'ip_address';
+ const ITEM_TYPE_SEPA_DEBIT_FINGERPRINT = 'sepa_debit_fingerprint';
+ const ITEM_TYPE_STRING = 'string';
+ const ITEM_TYPE_US_BANK_ACCOUNT_FINGERPRINT = 'us_bank_account_fingerprint';
+
+ /**
+ * Creates a new ValueList object, which can then be referenced in
+ * rules.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Radar\ValueList the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deletes a ValueList object, also deleting any items contained
+ * within the value list. To be deleted, a value list must not be referenced in any
+ * rules.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Radar\ValueList the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of ValueList objects. The objects are sorted in
+ * descending order by creation date, with the most recently created object
+ * appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Radar\ValueList> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a ValueList object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Radar\ValueList
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a ValueList object by setting the values of the parameters
+ * passed. Any parameters not provided will be left unchanged. Note that
+ * item_type is immutable.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Radar\ValueList the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Radar/ValueListItem.php b/plugins/stripe-php/lib/Radar/ValueListItem.php
new file mode 100644
index 00000000..a40b9da8
--- /dev/null
+++ b/plugins/stripe-php/lib/Radar/ValueListItem.php
@@ -0,0 +1,106 @@
+Managing list items
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $created_by The name or email address of the user who added this item to the value list.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $value The value of the item.
+ * @property string $value_list The identifier of the value list this item belongs to.
+ */
+class ValueListItem extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'radar.value_list_item';
+
+ /**
+ * Creates a new ValueListItem object, which is added to the specified
+ * parent value list.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Radar\ValueListItem the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deletes a ValueListItem object, removing it from its parent value
+ * list.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Radar\ValueListItem the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of ValueListItem objects. The objects are sorted in
+ * descending order by creation date, with the most recently created object
+ * appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Radar\ValueListItem> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a ValueListItem object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Radar\ValueListItem
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/Reason.php b/plugins/stripe-php/lib/Reason.php
new file mode 100644
index 00000000..36e65fc4
--- /dev/null
+++ b/plugins/stripe-php/lib/Reason.php
@@ -0,0 +1,13 @@
+Refunds
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount Amount, in cents (or local equivalent).
+ * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
+ * @property null|string|\Stripe\Charge $charge ID of the charge that's refunded.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|string $description An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
+ * @property null|\Stripe\StripeObject $destination_details
+ * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
+ * @property null|string $failure_reason Provides the reason for the refund failure. Possible values are: lost_or_stolen_card, expired_or_canceled_card, charge_for_pending_refund_disputed, insufficient_funds, declined, merchant_request, or unknown.
+ * @property null|string $instructions_email For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $next_action
+ * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that's refunded.
+ * @property null|string $reason Reason for the refund, which is either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Stripe internally (expired_uncaptured_charge).
+ * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund.
+ * @property null|string|\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account.
+ * @property null|string $status Status of the refund. This can be pending, requires_action, succeeded, failed, or canceled. Learn more about failed refunds.
+ * @property null|string|\Stripe\TransferReversal $transfer_reversal This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter.
+ */
+class Refund extends ApiResource
+{
+ const OBJECT_NAME = 'refund';
+
+ use ApiOperations\Update;
+
+ const FAILURE_REASON_EXPIRED_OR_CANCELED_CARD = 'expired_or_canceled_card';
+ const FAILURE_REASON_LOST_OR_STOLEN_CARD = 'lost_or_stolen_card';
+ const FAILURE_REASON_UNKNOWN = 'unknown';
+
+ const REASON_DUPLICATE = 'duplicate';
+ const REASON_EXPIRED_UNCAPTURED_CHARGE = 'expired_uncaptured_charge';
+ const REASON_FRAUDULENT = 'fraudulent';
+ const REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer';
+
+ const STATUS_CANCELED = 'canceled';
+ const STATUS_FAILED = 'failed';
+ const STATUS_PENDING = 'pending';
+ const STATUS_REQUIRES_ACTION = 'requires_action';
+ const STATUS_SUCCEEDED = 'succeeded';
+
+ /**
+ * When you create a new refund, you must specify a Charge or a PaymentIntent
+ * object on which to create it.
+ *
+ * Creating a new refund will refund a charge that has previously been created but
+ * not yet refunded. Funds will be refunded to the credit or debit card that was
+ * originally charged.
+ *
+ * You can optionally refund only part of a charge. You can do so multiple times,
+ * until the entire charge has been refunded.
+ *
+ * Once entirely refunded, a charge can’t be refunded again. This method will raise
+ * an error when called on an already-refunded charge, or when trying to refund
+ * more money than is left on a charge.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Refund the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of all refunds you created. We return the refunds in sorted
+ * order, with the most recent refunds appearing first. The 10 most recent refunds
+ * are always available by default on the Charge object.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Refund> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing refund.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Refund
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the refund that you specify by setting the values of the passed
+ * parameters. Any parameters that you don’t provide remain unchanged.
+ *
+ * This request only accepts metadata as an argument.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Refund the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Refund the canceled refund
+ */
+ public function cancel($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/cancel';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/RelatedObject.php b/plugins/stripe-php/lib/RelatedObject.php
new file mode 100644
index 00000000..c6e1ba1b
--- /dev/null
+++ b/plugins/stripe-php/lib/RelatedObject.php
@@ -0,0 +1,15 @@
+API Access to Reports.
+ *
+ * Note that certain report types can only be run based on your live-mode data (not test-mode
+ * data), and will error when queried without a live-mode API key.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string $error If something should go wrong during the run, a message about the failure (populated when status=failed).
+ * @property bool $livemode true if the report is run on live mode data and false if it is run on test mode data.
+ * @property \Stripe\StripeObject $parameters
+ * @property string $report_type The ID of the report type to run, such as "balance.summary.1".
+ * @property null|\Stripe\File $result The file object representing the result of the report run (populated when status=succeeded).
+ * @property string $status Status of this report run. This will be pending when the run is initially created. When the run finishes, this will be set to succeeded and the result field will be populated. Rarely, we may encounter an error, at which point this will be set to failed and the error field will be populated.
+ * @property null|int $succeeded_at Timestamp at which this run successfully finished (populated when status=succeeded). Measured in seconds since the Unix epoch.
+ */
+class ReportRun extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'reporting.report_run';
+
+ /**
+ * Creates a new object and begin running the report. (Certain report types require
+ * a live-mode API key.).
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Reporting\ReportRun the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of Report Runs, with the most recent appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Reporting\ReportRun> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing Report Run.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Reporting\ReportRun
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/Reporting/ReportType.php b/plugins/stripe-php/lib/Reporting/ReportType.php
new file mode 100644
index 00000000..0fdeb536
--- /dev/null
+++ b/plugins/stripe-php/lib/Reporting/ReportType.php
@@ -0,0 +1,67 @@
+API Access to Reports documentation
+ * for those Report Type IDs, along with required and optional parameters.
+ *
+ * Note that certain report types can only be run based on your live-mode data (not test-mode
+ * data), and will error when queried without a live-mode API key.
+ *
+ * @property string $id The ID of the Report Type, such as balance.summary.1.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $data_available_end Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.
+ * @property int $data_available_start Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.
+ * @property null|string[] $default_columns List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the columns parameter, this will be null.)
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $name Human-readable name of the Report Type
+ * @property int $updated When this Report Type was latest updated. Measured in seconds since the Unix epoch.
+ * @property int $version Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.
+ */
+class ReportType extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'reporting.report_type';
+
+ /**
+ * Returns a full list of Report Types.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Reporting\ReportType> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a Report Type. (Certain report types require a live-mode API key.).
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Reporting\ReportType
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/RequestTelemetry.php b/plugins/stripe-php/lib/RequestTelemetry.php
similarity index 63%
rename from plugins/stripe-php-10.5.0/lib/RequestTelemetry.php
rename to plugins/stripe-php/lib/RequestTelemetry.php
index bf9074ac..b4a63b2e 100644
--- a/plugins/stripe-php-10.5.0/lib/RequestTelemetry.php
+++ b/plugins/stripe-php/lib/RequestTelemetry.php
@@ -9,18 +9,24 @@ namespace Stripe;
*/
class RequestTelemetry
{
+ /** @var string */
public $requestId;
+ /** @var int */
public $requestDuration;
+ /** @var string[] */
+ public $usage;
/**
* Initialize a new telemetry object.
*
* @param string $requestId the request's request ID
* @param int $requestDuration the request's duration in milliseconds
+ * @param string[] $usage names of tracked behaviors associated with this request
*/
- public function __construct($requestId, $requestDuration)
+ public function __construct($requestId, $requestDuration, $usage = [])
{
$this->requestId = $requestId;
$this->requestDuration = $requestDuration;
+ $this->usage = $usage;
}
}
diff --git a/plugins/stripe-php/lib/ReserveTransaction.php b/plugins/stripe-php/lib/ReserveTransaction.php
new file mode 100644
index 00000000..b7837034
--- /dev/null
+++ b/plugins/stripe-php/lib/ReserveTransaction.php
@@ -0,0 +1,17 @@
+ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
+ */
+class ReserveTransaction extends ApiResource
+{
+ const OBJECT_NAME = 'reserve_transaction';
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Review.php b/plugins/stripe-php/lib/Review.php
similarity index 63%
rename from plugins/stripe-php-10.5.0/lib/Review.php
rename to plugins/stripe-php/lib/Review.php
index af8f3985..cfb2395b 100644
--- a/plugins/stripe-php-10.5.0/lib/Review.php
+++ b/plugins/stripe-php/lib/Review.php
@@ -5,11 +5,10 @@
namespace Stripe;
/**
- * Reviews can be used to supplement automated fraud detection with human
- * expertise.
+ * Reviews can be used to supplement automated fraud detection with human expertise.
*
- * Learn more about Radar and reviewing payments here.
+ * Learn more about Radar and reviewing payments
+ * here.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -22,7 +21,7 @@ namespace Stripe;
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property bool $open If true, the review needs action.
* @property string $opened_reason The reason the review was opened. One of rule or manual.
- * @property string|\Stripe\PaymentIntent $payment_intent The PaymentIntent ID associated with this review, if one exists.
+ * @property null|string|\Stripe\PaymentIntent $payment_intent The PaymentIntent ID associated with this review, if one exists.
* @property string $reason The reason the review is currently open or closed. One of rule, manual, approved, refunded, refunded_as_fraud, disputed, or redacted.
* @property null|\Stripe\StripeObject $session Information related to the browsing session of the user who initiated the payment.
*/
@@ -30,8 +29,52 @@ class Review extends ApiResource
{
const OBJECT_NAME = 'review';
- use ApiOperations\All;
- use ApiOperations\Retrieve;
+ const CLOSED_REASON_APPROVED = 'approved';
+ const CLOSED_REASON_DISPUTED = 'disputed';
+ const CLOSED_REASON_REDACTED = 'redacted';
+ const CLOSED_REASON_REFUNDED = 'refunded';
+ const CLOSED_REASON_REFUNDED_AS_FRAUD = 'refunded_as_fraud';
+
+ const OPENED_REASON_MANUAL = 'manual';
+ const OPENED_REASON_RULE = 'rule';
+
+ /**
+ * Returns a list of Review objects that have open set to
+ * true. The objects are sorted in descending order by creation date,
+ * with the most recently created object appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Review> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a Review object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Review
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
/**
* Possible string representations of the current, the opening or the closure reason of the review.
diff --git a/plugins/stripe-php-10.5.0/lib/SearchResult.php b/plugins/stripe-php/lib/SearchResult.php
similarity index 98%
rename from plugins/stripe-php-10.5.0/lib/SearchResult.php
rename to plugins/stripe-php/lib/SearchResult.php
index b6005314..fc3e4616 100644
--- a/plugins/stripe-php-10.5.0/lib/SearchResult.php
+++ b/plugins/stripe-php/lib/SearchResult.php
@@ -124,6 +124,8 @@ class SearchResult extends StripeObject implements \Countable, \IteratorAggregat
}
/**
+ * @throws Exception\ApiErrorException
+ *
* @return \Generator|TStripeObject[] A generator that can be used to
* iterate across all objects across all pages. As page boundaries are
* encountered, the next page will be fetched automatically for
@@ -179,6 +181,8 @@ class SearchResult extends StripeObject implements \Countable, \IteratorAggregat
* @param null|array $params
* @param null|array|string $opts
*
+ * @throws Exception\ApiErrorException
+ *
* @return SearchResultapplication, which includes Custom accounts, you can update any
+ * information on the account.
+ *
+ * For accounts where controller.requirement_collection
+ * is stripe, which includes Standard and Express accounts, you can
+ * update all information until you create an Account
+ * Link or Account Session to start Connect
+ * onboarding, after which some properties can no longer be updated.
*
* To update your own account, use the Dashboard. Refer to our Connect documentation to learn more
- * about updating accounts.
+ * href="https://dashboard.stripe.com/settings/account">Dashboard. Refer to our
+ * Connect documentation to learn
+ * more about updating accounts.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -304,12 +328,13 @@ class AccountService extends \Stripe\Service\AbstractService
}
/**
- * Updates an existing Account Capability.
+ * Updates an existing Account Capability. Request or remove a capability by
+ * updating its requested parameter.
*
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -322,9 +347,13 @@ class AccountService extends \Stripe\Service\AbstractService
/**
* Updates the metadata, account holder name, account holder type of a bank account
- * belonging to a Custom account, and
- * optionally sets it as the default for its currency. Other bank account details
- * are not editable by design.
+ * belonging to a connected account and optionally sets it as the default for its
+ * currency. Other bank account details are not editable by design.
+ *
+ * You can only update bank accounts when account.controller.requirement_collection
+ * is application, which includes Custom accounts.
*
* You can re-enable a disabled bank account by performing an update call without
* providing any arguments or changes.
@@ -332,7 +361,7 @@ class AccountService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -349,7 +378,7 @@ class AccountService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -365,7 +394,7 @@ class AccountService extends \Stripe\Service\AbstractService
*
* @param null|string $id
* @param null|array $params
- * @param null|array|StripeUtilRequestOptions $opts
+ * @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php/lib/Service/AccountSessionService.php b/plugins/stripe-php/lib/Service/AccountSessionService.php
new file mode 100644
index 00000000..2b681b89
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/AccountSessionService.php
@@ -0,0 +1,28 @@
+request('post', '/v1/account_sessions', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/ApplePayDomainService.php b/plugins/stripe-php/lib/Service/ApplePayDomainService.php
similarity index 79%
rename from plugins/stripe-php-10.5.0/lib/Service/ApplePayDomainService.php
rename to plugins/stripe-php/lib/Service/ApplePayDomainService.php
index 3a076f47..04f5b630 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/ApplePayDomainService.php
+++ b/plugins/stripe-php/lib/Service/ApplePayDomainService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ApplePayDomainService extends \Stripe\Service\AbstractService
{
/**
* List apple pay domains.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -25,7 +29,7 @@ class ApplePayDomainService extends \Stripe\Service\AbstractService
* Create an apple pay domain.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class ApplePayDomainService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -57,7 +61,7 @@ class ApplePayDomainService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/ApplicationFeeService.php b/plugins/stripe-php/lib/Service/ApplicationFeeService.php
similarity index 88%
rename from plugins/stripe-php-10.5.0/lib/Service/ApplicationFeeService.php
rename to plugins/stripe-php/lib/Service/ApplicationFeeService.php
index 138c3794..8cc42afa 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/ApplicationFeeService.php
+++ b/plugins/stripe-php/lib/Service/ApplicationFeeService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ApplicationFeeService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
* fees are returned in sorted order, with the most recent fees appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -31,7 +35,7 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -56,7 +60,7 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -73,7 +77,7 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -92,7 +96,7 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -112,7 +116,7 @@ class ApplicationFeeService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Apps/AppsServiceFactory.php b/plugins/stripe-php/lib/Service/Apps/AppsServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/Apps/AppsServiceFactory.php
rename to plugins/stripe-php/lib/Service/Apps/AppsServiceFactory.php
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Apps/SecretService.php b/plugins/stripe-php/lib/Service/Apps/SecretService.php
similarity index 79%
rename from plugins/stripe-php-10.5.0/lib/Service/Apps/SecretService.php
rename to plugins/stripe-php/lib/Service/Apps/SecretService.php
index 8c9c74b4..760d3cb1 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Apps/SecretService.php
+++ b/plugins/stripe-php/lib/Service/Apps/SecretService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Apps;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SecretService extends \Stripe\Service\AbstractService
{
/**
* List all secrets stored on the given scope.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -25,7 +29,7 @@ class SecretService extends \Stripe\Service\AbstractService
* Create or replace a secret in the secret store.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -40,7 +44,7 @@ class SecretService extends \Stripe\Service\AbstractService
* Deletes a secret from the secret store by name and scope.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -55,7 +59,7 @@ class SecretService extends \Stripe\Service\AbstractService
* Finds a secret in the secret store by name and scope.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/BalanceService.php b/plugins/stripe-php/lib/Service/BalanceService.php
similarity index 75%
rename from plugins/stripe-php-10.5.0/lib/Service/BalanceService.php
rename to plugins/stripe-php/lib/Service/BalanceService.php
index 0f55385f..dac98eae 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/BalanceService.php
+++ b/plugins/stripe-php/lib/Service/BalanceService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class BalanceService extends \Stripe\Service\AbstractService
{
/**
@@ -13,7 +17,7 @@ class BalanceService extends \Stripe\Service\AbstractService
* for negative balances.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/BalanceTransactionService.php b/plugins/stripe-php/lib/Service/BalanceTransactionService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/BalanceTransactionService.php
rename to plugins/stripe-php/lib/Service/BalanceTransactionService.php
index 9e6d37c0..7ea050cc 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/BalanceTransactionService.php
+++ b/plugins/stripe-php/lib/Service/BalanceTransactionService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class BalanceTransactionService extends \Stripe\Service\AbstractService
{
/**
@@ -15,7 +19,7 @@ class BalanceTransactionService extends \Stripe\Service\AbstractService
* path /v1/balance/history.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -34,7 +38,7 @@ class BalanceTransactionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php/lib/Service/Billing/AlertService.php b/plugins/stripe-php/lib/Service/Billing/AlertService.php
new file mode 100644
index 00000000..8baafb1b
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Billing/AlertService.php
@@ -0,0 +1,107 @@
+request('post', $this->buildPath('/v1/billing/alerts/%s/activate', $id), $params, $opts);
+ }
+
+ /**
+ * Lists billing active and inactive alerts.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Billing\Alert>
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/billing/alerts', $params, $opts);
+ }
+
+ /**
+ * Archives this alert, removing it from the list view and APIs. This is
+ * non-reversible.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Alert
+ */
+ public function archive($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/billing/alerts/%s/archive', $id), $params, $opts);
+ }
+
+ /**
+ * Creates a billing alert.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Alert
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/billing/alerts', $params, $opts);
+ }
+
+ /**
+ * Deactivates this alert, preventing it from triggering.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Alert
+ */
+ public function deactivate($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/billing/alerts/%s/deactivate', $id), $params, $opts);
+ }
+
+ /**
+ * Retrieves a billing alert given an ID.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Alert
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/billing/alerts/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Billing/BillingServiceFactory.php b/plugins/stripe-php/lib/Service/Billing/BillingServiceFactory.php
new file mode 100644
index 00000000..eb1b160e
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Billing/BillingServiceFactory.php
@@ -0,0 +1,37 @@
+
+ */
+ private static $classMap = [
+ 'alerts' => AlertService::class,
+ 'creditBalanceSummary' => CreditBalanceSummaryService::class,
+ 'creditBalanceTransactions' => CreditBalanceTransactionService::class,
+ 'creditGrants' => CreditGrantService::class,
+ 'meterEventAdjustments' => MeterEventAdjustmentService::class,
+ 'meterEvents' => MeterEventService::class,
+ 'meters' => MeterService::class,
+ ];
+
+ protected function getServiceClass($name)
+ {
+ return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Billing/CreditBalanceSummaryService.php b/plugins/stripe-php/lib/Service/Billing/CreditBalanceSummaryService.php
new file mode 100644
index 00000000..6169f05f
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Billing/CreditBalanceSummaryService.php
@@ -0,0 +1,27 @@
+request('get', '/v1/billing/credit_balance_summary', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Billing/CreditBalanceTransactionService.php b/plugins/stripe-php/lib/Service/Billing/CreditBalanceTransactionService.php
new file mode 100644
index 00000000..b4b84087
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Billing/CreditBalanceTransactionService.php
@@ -0,0 +1,43 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/billing/credit_balance_transactions', $params, $opts);
+ }
+
+ /**
+ * Retrieves a credit balance transaction.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditBalanceTransaction
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/billing/credit_balance_transactions/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Billing/CreditGrantService.php b/plugins/stripe-php/lib/Service/Billing/CreditGrantService.php
new file mode 100644
index 00000000..29cbb155
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Billing/CreditGrantService.php
@@ -0,0 +1,106 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/billing/credit_grants', $params, $opts);
+ }
+
+ /**
+ * Creates a credit grant.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/billing/credit_grants', $params, $opts);
+ }
+
+ /**
+ * Expires a credit grant.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant
+ */
+ public function expire($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/billing/credit_grants/%s/expire', $id), $params, $opts);
+ }
+
+ /**
+ * Retrieves a credit grant.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/billing/credit_grants/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Updates a credit grant.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/billing/credit_grants/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Voids a credit grant.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\CreditGrant
+ */
+ public function voidGrant($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/billing/credit_grants/%s/void', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Billing/MeterEventAdjustmentService.php b/plugins/stripe-php/lib/Service/Billing/MeterEventAdjustmentService.php
new file mode 100644
index 00000000..90eb9710
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Billing/MeterEventAdjustmentService.php
@@ -0,0 +1,27 @@
+request('post', '/v1/billing/meter_event_adjustments', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Billing/MeterEventService.php b/plugins/stripe-php/lib/Service/Billing/MeterEventService.php
new file mode 100644
index 00000000..9c442b73
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Billing/MeterEventService.php
@@ -0,0 +1,27 @@
+request('post', '/v1/billing/meter_events', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Billing/MeterService.php b/plugins/stripe-php/lib/Service/Billing/MeterService.php
new file mode 100644
index 00000000..7defce8c
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Billing/MeterService.php
@@ -0,0 +1,124 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/billing/meters', $params, $opts);
+ }
+
+ /**
+ * Retrieve a list of billing meter event summaries.
+ *
+ * @param string $parentId
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Billing\MeterEventSummary>
+ */
+ public function allEventSummaries($parentId, $params = null, $opts = null)
+ {
+ return $this->requestCollection('get', $this->buildPath('/v1/billing/meters/%s/event_summaries', $parentId), $params, $opts);
+ }
+
+ /**
+ * Creates a billing meter.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/billing/meters', $params, $opts);
+ }
+
+ /**
+ * When a meter is deactivated, no more meter events will be accepted for this
+ * meter. You can’t attach a deactivated meter to a price.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter
+ */
+ public function deactivate($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/billing/meters/%s/deactivate', $id), $params, $opts);
+ }
+
+ /**
+ * When a meter is reactivated, events for this meter can be accepted and you can
+ * attach the meter to a price.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter
+ */
+ public function reactivate($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/billing/meters/%s/reactivate', $id), $params, $opts);
+ }
+
+ /**
+ * Retrieves a billing meter given an ID.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/billing/meters/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Updates a billing meter.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Billing\Meter
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/billing/meters/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/BillingPortal/BillingPortalServiceFactory.php b/plugins/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/BillingPortal/BillingPortalServiceFactory.php
rename to plugins/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php
diff --git a/plugins/stripe-php-10.5.0/lib/Service/BillingPortal/ConfigurationService.php b/plugins/stripe-php/lib/Service/BillingPortal/ConfigurationService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/BillingPortal/ConfigurationService.php
rename to plugins/stripe-php/lib/Service/BillingPortal/ConfigurationService.php
index 11d1a5a3..dad1380c 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/BillingPortal/ConfigurationService.php
+++ b/plugins/stripe-php/lib/Service/BillingPortal/ConfigurationService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\BillingPortal;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ConfigurationService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* portal.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,7 +31,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* PortalSession.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -44,7 +48,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -60,7 +64,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/BillingPortal/SessionService.php b/plugins/stripe-php/lib/Service/BillingPortal/SessionService.php
similarity index 70%
rename from plugins/stripe-php-10.5.0/lib/Service/BillingPortal/SessionService.php
rename to plugins/stripe-php/lib/Service/BillingPortal/SessionService.php
index 6b3e6026..6f7e5174 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/BillingPortal/SessionService.php
+++ b/plugins/stripe-php/lib/Service/BillingPortal/SessionService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\BillingPortal;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SessionService extends \Stripe\Service\AbstractService
{
/**
* Creates a session of the customer portal.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/ChargeService.php b/plugins/stripe-php/lib/Service/ChargeService.php
similarity index 72%
rename from plugins/stripe-php-10.5.0/lib/Service/ChargeService.php
rename to plugins/stripe-php/lib/Service/ChargeService.php
index 0bde0279..500456f9 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/ChargeService.php
+++ b/plugins/stripe-php/lib/Service/ChargeService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ChargeService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class ChargeService extends \Stripe\Service\AbstractService
* sorted order, with the most recent charges appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -23,18 +27,19 @@ class ChargeService extends \Stripe\Service\AbstractService
}
/**
- * Capture the payment of an existing, uncaptured, charge. This is the second half
- * of the two-step payment flow, where first you created a
- * charge with the capture option set to false.
+ * Capture the payment of an existing, uncaptured charge that was created with the
+ * capture option set to false.
*
* Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured
- * by that point in time, they will be marked as refunded and will no longer be
- * capturable.
+ * href="/docs/charges/placing-a-hold">7 by default), after which they are
+ * marked as refunded and capture attempts will fail.
+ *
+ * Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -46,14 +51,13 @@ class ChargeService extends \Stripe\Service\AbstractService
}
/**
- * To charge a credit card or other payment source, you create a
- * Charge object. If your API key is in test mode, the supplied
- * payment source (e.g., card) won’t actually be charged, although everything else
- * will occur as if in live mode. (Stripe assumes that the charge would have
- * completed successfully).
+ * This method is no longer recommended—use the Payment Intents API to initiate a new
+ * payment instead. Confirmation of the PaymentIntent creates the
+ * Charge object used to request payment.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -72,7 +76,7 @@ class ChargeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -92,7 +96,7 @@ class ChargeService extends \Stripe\Service\AbstractService
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -109,7 +113,7 @@ class ChargeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Checkout/CheckoutServiceFactory.php b/plugins/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/Checkout/CheckoutServiceFactory.php
rename to plugins/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Checkout/SessionService.php b/plugins/stripe-php/lib/Service/Checkout/SessionService.php
similarity index 72%
rename from plugins/stripe-php-10.5.0/lib/Service/Checkout/SessionService.php
rename to plugins/stripe-php/lib/Service/Checkout/SessionService.php
index 2291ccd5..c419a505 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Checkout/SessionService.php
+++ b/plugins/stripe-php/lib/Service/Checkout/SessionService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Checkout;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SessionService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of Checkout Sessions.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -29,7 +33,7 @@ class SessionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -44,7 +48,7 @@ class SessionService extends \Stripe\Service\AbstractService
* Creates a Session object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -63,7 +67,7 @@ class SessionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -79,7 +83,7 @@ class SessionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -89,4 +93,20 @@ class SessionService extends \Stripe\Service\AbstractService
{
return $this->request('get', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts);
}
+
+ /**
+ * Updates a Session object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Checkout\Session
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts);
+ }
}
diff --git a/plugins/stripe-php/lib/Service/Climate/ClimateServiceFactory.php b/plugins/stripe-php/lib/Service/Climate/ClimateServiceFactory.php
new file mode 100644
index 00000000..ff4422ae
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Climate/ClimateServiceFactory.php
@@ -0,0 +1,29 @@
+
+ */
+ private static $classMap = [
+ 'orders' => OrderService::class,
+ 'products' => ProductService::class,
+ 'suppliers' => SupplierService::class,
+ ];
+
+ protected function getServiceClass($name)
+ {
+ return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Climate/OrderService.php b/plugins/stripe-php/lib/Service/Climate/OrderService.php
new file mode 100644
index 00000000..29917ffa
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Climate/OrderService.php
@@ -0,0 +1,98 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/climate/orders', $params, $opts);
+ }
+
+ /**
+ * Cancels a Climate order. You can cancel an order within 24 hours of creation.
+ * Stripe refunds the reservation amount_subtotal, but not the
+ * amount_fees for user-triggered cancellations. Frontier might cancel
+ * reservations if suppliers fail to deliver. If Frontier cancels the reservation,
+ * Stripe provides 90 days advance notice and refunds the
+ * amount_total.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Order
+ */
+ public function cancel($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/climate/orders/%s/cancel', $id), $params, $opts);
+ }
+
+ /**
+ * Creates a Climate order object for a given Climate product. The order will be
+ * processed immediately after creation and payment will be deducted your Stripe
+ * balance.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Order
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/climate/orders', $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a Climate order object with the given ID.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Order
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/climate/orders/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Updates the specified order by setting the values of the parameters passed.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Order
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/climate/orders/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Climate/ProductService.php b/plugins/stripe-php/lib/Service/Climate/ProductService.php
new file mode 100644
index 00000000..c449b856
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Climate/ProductService.php
@@ -0,0 +1,43 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/climate/products', $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a Climate product with the given ID.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Product
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/climate/products/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Climate/SupplierService.php b/plugins/stripe-php/lib/Service/Climate/SupplierService.php
new file mode 100644
index 00000000..5ab203d6
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Climate/SupplierService.php
@@ -0,0 +1,43 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/climate/suppliers', $params, $opts);
+ }
+
+ /**
+ * Retrieves a Climate supplier object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Climate\Supplier
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/climate/suppliers/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/ConfirmationTokenService.php b/plugins/stripe-php/lib/Service/ConfirmationTokenService.php
new file mode 100644
index 00000000..cdf47105
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/ConfirmationTokenService.php
@@ -0,0 +1,28 @@
+request('get', $this->buildPath('/v1/confirmation_tokens/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/CoreServiceFactory.php b/plugins/stripe-php/lib/Service/CoreServiceFactory.php
similarity index 76%
rename from plugins/stripe-php-10.5.0/lib/Service/CoreServiceFactory.php
rename to plugins/stripe-php/lib/Service/CoreServiceFactory.php
index 351f6913..15042041 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/CoreServiceFactory.php
+++ b/plugins/stripe-php/lib/Service/CoreServiceFactory.php
@@ -1,41 +1,50 @@
*/
private static $classMap = [
+ 'oauth' => OAuthService::class,
+ // Class Map: The beginning of the section generated from our OpenAPI spec
'accountLinks' => AccountLinkService::class,
'accounts' => AccountService::class,
+ 'accountSessions' => AccountSessionService::class,
'applePayDomains' => ApplePayDomainService::class,
'applicationFees' => ApplicationFeeService::class,
'apps' => Apps\AppsServiceFactory::class,
'balance' => BalanceService::class,
'balanceTransactions' => BalanceTransactionService::class,
+ 'billing' => Billing\BillingServiceFactory::class,
'billingPortal' => BillingPortal\BillingPortalServiceFactory::class,
'charges' => ChargeService::class,
'checkout' => Checkout\CheckoutServiceFactory::class,
+ 'climate' => Climate\ClimateServiceFactory::class,
+ 'confirmationTokens' => ConfirmationTokenService::class,
'countrySpecs' => CountrySpecService::class,
'coupons' => CouponService::class,
'creditNotes' => CreditNoteService::class,
'customers' => CustomerService::class,
+ 'customerSessions' => CustomerSessionService::class,
'disputes' => DisputeService::class,
+ 'entitlements' => Entitlements\EntitlementsServiceFactory::class,
'ephemeralKeys' => EphemeralKeyService::class,
'events' => EventService::class,
'exchangeRates' => ExchangeRateService::class,
'fileLinks' => FileLinkService::class,
'files' => FileService::class,
'financialConnections' => FinancialConnections\FinancialConnectionsServiceFactory::class,
+ 'forwarding' => Forwarding\ForwardingServiceFactory::class,
'identity' => Identity\IdentityServiceFactory::class,
'invoiceItems' => InvoiceItemService::class,
+ 'invoiceRenderingTemplates' => InvoiceRenderingTemplateService::class,
'invoices' => InvoiceService::class,
'issuing' => Issuing\IssuingServiceFactory::class,
'mandates' => MandateService::class,
- 'oauth' => OAuthService::class,
'paymentIntents' => PaymentIntentService::class,
'paymentLinks' => PaymentLinkService::class,
+ 'paymentMethodConfigurations' => PaymentMethodConfigurationService::class,
+ 'paymentMethodDomains' => PaymentMethodDomainService::class,
'paymentMethods' => PaymentMethodService::class,
'payouts' => PayoutService::class,
'plans' => PlanService::class,
@@ -119,7 +143,9 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'subscriptionItems' => SubscriptionItemService::class,
'subscriptions' => SubscriptionService::class,
'subscriptionSchedules' => SubscriptionScheduleService::class,
+ 'tax' => Tax\TaxServiceFactory::class,
'taxCodes' => TaxCodeService::class,
+ 'taxIds' => TaxIdService::class,
'taxRates' => TaxRateService::class,
'terminal' => Terminal\TerminalServiceFactory::class,
'testHelpers' => TestHelpers\TestHelpersServiceFactory::class,
@@ -127,7 +153,9 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'topups' => TopupService::class,
'transfers' => TransferService::class,
'treasury' => Treasury\TreasuryServiceFactory::class,
+ 'v2' => V2\V2ServiceFactory::class,
'webhookEndpoints' => WebhookEndpointService::class,
+ // Class Map: The end of the section generated from our OpenAPI spec
];
protected function getServiceClass($name)
diff --git a/plugins/stripe-php-10.5.0/lib/Service/CountrySpecService.php b/plugins/stripe-php/lib/Service/CountrySpecService.php
similarity index 76%
rename from plugins/stripe-php-10.5.0/lib/Service/CountrySpecService.php
rename to plugins/stripe-php/lib/Service/CountrySpecService.php
index 8f3869fe..e4410e12 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/CountrySpecService.php
+++ b/plugins/stripe-php/lib/Service/CountrySpecService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class CountrySpecService extends \Stripe\Service\AbstractService
{
/**
* Lists all Country Spec objects available in the API.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class CountrySpecService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/CouponService.php b/plugins/stripe-php/lib/Service/CouponService.php
similarity index 86%
rename from plugins/stripe-php-10.5.0/lib/Service/CouponService.php
rename to plugins/stripe-php/lib/Service/CouponService.php
index 89eb2c7d..d0d4f82a 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/CouponService.php
+++ b/plugins/stripe-php/lib/Service/CouponService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class CouponService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of your coupons.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -38,7 +42,7 @@ class CouponService extends \Stripe\Service\AbstractService
* it.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -58,7 +62,7 @@ class CouponService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -74,7 +78,7 @@ class CouponService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -91,7 +95,7 @@ class CouponService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/CreditNoteService.php b/plugins/stripe-php/lib/Service/CreditNoteService.php
similarity index 85%
rename from plugins/stripe-php-10.5.0/lib/Service/CreditNoteService.php
rename to plugins/stripe-php/lib/Service/CreditNoteService.php
index a00f010a..6731730b 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/CreditNoteService.php
+++ b/plugins/stripe-php/lib/Service/CreditNoteService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class CreditNoteService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of credit notes.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -23,12 +27,12 @@ class CreditNoteService extends \Stripe\Service\AbstractService
/**
* When retrieving a credit note, you’ll get a lines property
- * containing the the first handful of those items. There is also a URL where you
- * can retrieve the full (paginated) list of line items.
+ * containing the first handful of those items. There is also a URL where you can
+ * retrieve the full (paginated) list of line items.
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -62,7 +66,7 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* status at the time of credit note creation.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -77,7 +81,7 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* Get a preview of a credit note without creating it.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -94,7 +98,7 @@ class CreditNoteService extends \Stripe\Service\AbstractService
* the full (paginated) list of line items.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -110,7 +114,7 @@ class CreditNoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -126,7 +130,7 @@ class CreditNoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -143,7 +147,7 @@ class CreditNoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/CustomerService.php b/plugins/stripe-php/lib/Service/CustomerService.php
similarity index 83%
rename from plugins/stripe-php-10.5.0/lib/Service/CustomerService.php
rename to plugins/stripe-php/lib/Service/CustomerService.php
index 5cb7910a..f8d5b1ed 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/CustomerService.php
+++ b/plugins/stripe-php/lib/Service/CustomerService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class CustomerService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class CustomerService extends \Stripe\Service\AbstractService
* date, with the most recent customers appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -28,7 +32,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -45,7 +49,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -61,7 +65,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -77,11 +81,11 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card|\Stripe\Source>
+ * @return \Stripe\Collection<\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source>
*/
public function allSources($parentId, $params = null, $opts = null)
{
@@ -93,7 +97,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -108,7 +112,7 @@ class CustomerService extends \Stripe\Service\AbstractService
* Creates a new customer object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -125,7 +129,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -145,11 +149,11 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Customer
+ * @return \Stripe\FundingInstructions
*/
public function createFundingInstructions($id, $params = null, $opts = null)
{
@@ -167,11 +171,11 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
+ * @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*/
public function createSource($parentId, $params = null, $opts = null)
{
@@ -179,11 +183,11 @@ class CustomerService extends \Stripe\Service\AbstractService
}
/**
- * Creates a new TaxID object for a customer.
+ * Creates a new tax_id object for a customer.
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -200,7 +204,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -216,11 +220,11 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Customer
+ * @return \Stripe\Discount
*/
public function deleteDiscount($id, $params = null, $opts = null)
{
@@ -228,14 +232,16 @@ class CustomerService extends \Stripe\Service\AbstractService
}
/**
+ * Delete a specified source for a given customer.
+ *
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
+ * @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*/
public function deleteSource($parentId, $id, $params = null, $opts = null)
{
@@ -243,12 +249,12 @@ class CustomerService extends \Stripe\Service\AbstractService
}
/**
- * Deletes an existing TaxID object.
+ * Deletes an existing tax_id object.
*
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -264,7 +270,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -282,7 +288,7 @@ class CustomerService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -298,7 +304,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -316,7 +322,7 @@ class CustomerService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -333,11 +339,11 @@ class CustomerService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Customer
+ * @return \Stripe\PaymentMethod
*/
public function retrievePaymentMethod($parentId, $id, $params = null, $opts = null)
{
@@ -350,11 +356,11 @@ class CustomerService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
+ * @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*/
public function retrieveSource($parentId, $id, $params = null, $opts = null)
{
@@ -362,12 +368,12 @@ class CustomerService extends \Stripe\Service\AbstractService
}
/**
- * Retrieves the TaxID object with the given identifier.
+ * Retrieves the tax_id object with the given identifier.
*
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -387,7 +393,7 @@ class CustomerService extends \Stripe\Service\AbstractService
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -415,7 +421,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -433,7 +439,7 @@ class CustomerService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -449,7 +455,7 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -461,14 +467,16 @@ class CustomerService extends \Stripe\Service\AbstractService
}
/**
+ * Update a specified source for a given customer.
+ *
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
+ * @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*/
public function updateSource($parentId, $id, $params = null, $opts = null)
{
@@ -476,14 +484,16 @@ class CustomerService extends \Stripe\Service\AbstractService
}
/**
+ * Verify a specified bank account for a given customer.
+ *
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
+ * @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*/
public function verifySource($parentId, $id, $params = null, $opts = null)
{
diff --git a/plugins/stripe-php/lib/Service/CustomerSessionService.php b/plugins/stripe-php/lib/Service/CustomerSessionService.php
new file mode 100644
index 00000000..d3b0d685
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/CustomerSessionService.php
@@ -0,0 +1,29 @@
+request('post', '/v1/customer_sessions', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/DisputeService.php b/plugins/stripe-php/lib/Service/DisputeService.php
similarity index 85%
rename from plugins/stripe-php-10.5.0/lib/Service/DisputeService.php
rename to plugins/stripe-php/lib/Service/DisputeService.php
index 86d3584a..ea48ceb4 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/DisputeService.php
+++ b/plugins/stripe-php/lib/Service/DisputeService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class DisputeService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of your disputes.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -30,7 +34,7 @@ class DisputeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -46,7 +50,7 @@ class DisputeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -70,7 +74,7 @@ class DisputeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php/lib/Service/Entitlements/ActiveEntitlementService.php b/plugins/stripe-php/lib/Service/Entitlements/ActiveEntitlementService.php
new file mode 100644
index 00000000..f9760016
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Entitlements/ActiveEntitlementService.php
@@ -0,0 +1,43 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/entitlements/active_entitlements', $params, $opts);
+ }
+
+ /**
+ * Retrieve an active entitlement.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Entitlements\ActiveEntitlement
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/entitlements/active_entitlements/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Entitlements/EntitlementsServiceFactory.php b/plugins/stripe-php/lib/Service/Entitlements/EntitlementsServiceFactory.php
new file mode 100644
index 00000000..74deb812
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Entitlements/EntitlementsServiceFactory.php
@@ -0,0 +1,27 @@
+
+ */
+ private static $classMap = [
+ 'activeEntitlements' => ActiveEntitlementService::class,
+ 'features' => FeatureService::class,
+ ];
+
+ protected function getServiceClass($name)
+ {
+ return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Entitlements/FeatureService.php b/plugins/stripe-php/lib/Service/Entitlements/FeatureService.php
new file mode 100644
index 00000000..a47fc499
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Entitlements/FeatureService.php
@@ -0,0 +1,74 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/entitlements/features', $params, $opts);
+ }
+
+ /**
+ * Creates a feature.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Entitlements\Feature
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/entitlements/features', $params, $opts);
+ }
+
+ /**
+ * Retrieves a feature.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Entitlements\Feature
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/entitlements/features/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Update a feature’s metadata or permanently deactivate it.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Entitlements\Feature
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/entitlements/features/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/EphemeralKeyService.php b/plugins/stripe-php/lib/Service/EphemeralKeyService.php
similarity index 84%
rename from plugins/stripe-php-10.5.0/lib/Service/EphemeralKeyService.php
rename to plugins/stripe-php/lib/Service/EphemeralKeyService.php
index 3ca14c90..cb2d4a42 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/EphemeralKeyService.php
+++ b/plugins/stripe-php/lib/Service/EphemeralKeyService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class EphemeralKeyService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class EphemeralKeyService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/EventService.php b/plugins/stripe-php/lib/Service/EventService.php
similarity index 58%
rename from plugins/stripe-php-10.5.0/lib/Service/EventService.php
rename to plugins/stripe-php/lib/Service/EventService.php
index 9e779dd9..7b02e408 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/EventService.php
+++ b/plugins/stripe-php/lib/Service/EventService.php
@@ -4,17 +4,21 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class EventService extends \Stripe\Service\AbstractService
{
/**
* List events, going back up to 30 days. Each event data is rendered according to
* Stripe API version at its creation time, specified in event object api_version
- * attribute (not according to your current Stripe API version or
- * Stripe-Version header).
+ * href="https://docs.stripe.com/api/events/object">event object
+ * api_version attribute (not according to your current Stripe API
+ * version or Stripe-Version header).
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,12 +30,12 @@ class EventService extends \Stripe\Service\AbstractService
}
/**
- * Retrieves the details of an event. Supply the unique identifier of the event,
- * which you might have received in a webhook.
+ * Retrieves the details of an event if it was created in the last 30 days. Supply
+ * the unique identifier of the event, which you might have received in a webhook.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/ExchangeRateService.php b/plugins/stripe-php/lib/Service/ExchangeRateService.php
similarity index 78%
rename from plugins/stripe-php-10.5.0/lib/Service/ExchangeRateService.php
rename to plugins/stripe-php/lib/Service/ExchangeRateService.php
index fe010b00..ff2223f1 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/ExchangeRateService.php
+++ b/plugins/stripe-php/lib/Service/ExchangeRateService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ExchangeRateService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class ExchangeRateService extends \Stripe\Service\AbstractService
* converted to one another. Only shows the currencies for which Stripe supports.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -28,7 +32,7 @@ class ExchangeRateService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/FileLinkService.php b/plugins/stripe-php/lib/Service/FileLinkService.php
similarity index 79%
rename from plugins/stripe-php-10.5.0/lib/Service/FileLinkService.php
rename to plugins/stripe-php/lib/Service/FileLinkService.php
index 06929a9c..68773f0b 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/FileLinkService.php
+++ b/plugins/stripe-php/lib/Service/FileLinkService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class FileLinkService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of file links.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -25,7 +29,7 @@ class FileLinkService extends \Stripe\Service\AbstractService
* Creates a new file link object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class FileLinkService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -57,7 +61,7 @@ class FileLinkService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/FileService.php b/plugins/stripe-php/lib/Service/FileService.php
similarity index 70%
rename from plugins/stripe-php-10.5.0/lib/Service/FileService.php
rename to plugins/stripe-php/lib/Service/FileService.php
index 82ef0e50..87748ddd 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/FileService.php
+++ b/plugins/stripe-php/lib/Service/FileService.php
@@ -4,15 +4,19 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class FileService extends \Stripe\Service\AbstractService
{
/**
- * Returns a list of the files that your account has access to. The files are
- * returned sorted by creation date, with the most recently created files appearing
- * first.
+ * Returns a list of the files that your account has access to. Stripe sorts and
+ * returns the files by their creation dates, placing the most recently created
+ * files at the top.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -24,14 +28,13 @@ class FileService extends \Stripe\Service\AbstractService
}
/**
- * Retrieves the details of an existing file object. Supply the unique file ID from
- * a file, and Stripe will return the corresponding file object. To access file
- * contents, see the File Upload
- * Guide.
+ * Retrieves the details of an existing file object. After you supply a unique file
+ * ID, Stripe returns the corresponding file object. Learn how to access file contents.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/FinancialConnections/AccountService.php b/plugins/stripe-php/lib/Service/FinancialConnections/AccountService.php
similarity index 60%
rename from plugins/stripe-php-10.5.0/lib/Service/FinancialConnections/AccountService.php
rename to plugins/stripe-php/lib/Service/FinancialConnections/AccountService.php
index 213d1727..dd52243f 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/FinancialConnections/AccountService.php
+++ b/plugins/stripe-php/lib/Service/FinancialConnections/AccountService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\FinancialConnections;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class AccountService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of Financial Connections Account objects.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class AccountService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -44,7 +48,7 @@ class AccountService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -60,7 +64,7 @@ class AccountService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -76,7 +80,7 @@ class AccountService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -86,4 +90,38 @@ class AccountService extends \Stripe\Service\AbstractService
{
return $this->request('get', $this->buildPath('/v1/financial_connections/accounts/%s', $id), $params, $opts);
}
+
+ /**
+ * Subscribes to periodic refreshes of data associated with a Financial Connections
+ * Account.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Account
+ */
+ public function subscribe($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/subscribe', $id), $params, $opts);
+ }
+
+ /**
+ * Unsubscribes from periodic refreshes of data associated with a Financial
+ * Connections Account.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Account
+ */
+ public function unsubscribe($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/financial_connections/accounts/%s/unsubscribe', $id), $params, $opts);
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php b/plugins/stripe-php/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
similarity index 87%
rename from plugins/stripe-php-10.5.0/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
rename to plugins/stripe-php/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
index 7dd82634..5c24c323 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
+++ b/plugins/stripe-php/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php
@@ -9,6 +9,7 @@ namespace Stripe\Service\FinancialConnections;
*
* @property AccountService $accounts
* @property SessionService $sessions
+ * @property TransactionService $transactions
*/
class FinancialConnectionsServiceFactory extends \Stripe\Service\AbstractServiceFactory
{
@@ -18,6 +19,7 @@ class FinancialConnectionsServiceFactory extends \Stripe\Service\AbstractService
private static $classMap = [
'accounts' => AccountService::class,
'sessions' => SessionService::class,
+ 'transactions' => TransactionService::class,
];
protected function getServiceClass($name)
diff --git a/plugins/stripe-php-10.5.0/lib/Service/FinancialConnections/SessionService.php b/plugins/stripe-php/lib/Service/FinancialConnections/SessionService.php
similarity index 79%
rename from plugins/stripe-php-10.5.0/lib/Service/FinancialConnections/SessionService.php
rename to plugins/stripe-php/lib/Service/FinancialConnections/SessionService.php
index eab589cd..2ba8c3ae 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/FinancialConnections/SessionService.php
+++ b/plugins/stripe-php/lib/Service/FinancialConnections/SessionService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\FinancialConnections;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SessionService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class SessionService extends \Stripe\Service\AbstractService
* launch the flow using Stripe.js.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -28,7 +32,7 @@ class SessionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php/lib/Service/FinancialConnections/TransactionService.php b/plugins/stripe-php/lib/Service/FinancialConnections/TransactionService.php
new file mode 100644
index 00000000..9204b6a3
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/FinancialConnections/TransactionService.php
@@ -0,0 +1,43 @@
+Transaction objects.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\FinancialConnections\Transaction>
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/financial_connections/transactions', $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a Financial Connections Transaction.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\FinancialConnections\Transaction
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/financial_connections/transactions/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php b/plugins/stripe-php/lib/Service/Forwarding/ForwardingServiceFactory.php
similarity index 52%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
rename to plugins/stripe-php/lib/Service/Forwarding/ForwardingServiceFactory.php
index a202ec33..1ae9f888 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
+++ b/plugins/stripe-php/lib/Service/Forwarding/ForwardingServiceFactory.php
@@ -2,20 +2,20 @@
// File generated from our OpenAPI spec
-namespace Stripe\Service\TestHelpers\Issuing;
+namespace Stripe\Service\Forwarding;
/**
- * Service factory class for API resources in the Issuing namespace.
+ * Service factory class for API resources in the Forwarding namespace.
*
- * @property CardService $cards
+ * @property RequestService $requests
*/
-class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
+class ForwardingServiceFactory extends \Stripe\Service\AbstractServiceFactory
{
/**
* @var arraysubscription_details.proration_date parameter when doing the actual
+ * subscription update. The recommended way to get only the prorations being
+ * previewed is to consider only proration line items where
+ * period[start] is equal to the
+ * subscription_details.proration_date value passed in the request.
+ *
+ * Note: Currency conversion calculations use the latest exchange rates. Exchange
+ * rates may vary between the time of the preview and the time of the actual
+ * invoice creation. Learn
+ * more
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice
+ */
+ public function createPreview($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/invoices/create_preview', $params, $opts);
+ }
+
/**
* Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to
* delete invoices that are no longer in a draft state will fail; once an invoice
@@ -68,7 +128,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -86,7 +146,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -103,7 +163,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -123,7 +183,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -134,12 +194,29 @@ class InvoiceService extends \Stripe\Service\AbstractService
return $this->request('post', $this->buildPath('/v1/invoices/%s/pay', $id), $params, $opts);
}
+ /**
+ * Removes multiple line items from an invoice. This is only possible when an
+ * invoice is still a draft.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice
+ */
+ public function removeLines($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/invoices/%s/remove_lines', $id), $params, $opts);
+ }
+
/**
* Retrieves the invoice with the given ID.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -159,7 +236,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -182,7 +259,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -208,16 +285,20 @@ class InvoiceService extends \Stripe\Service\AbstractService
*
* You can preview the effects of updating a subscription, including a preview of
* what proration will take place. To ensure that the actual proration is
- * calculated exactly the same as the previewed proration, you should pass a
- * proration_date parameter when doing the actual subscription update.
- * The value passed in should be the same as the
- * subscription_proration_date returned on the upcoming invoice
- * resource. The recommended way to get only the prorations being previewed is to
- * consider only proration line items where period[start] is equal to
- * the subscription_proration_date on the upcoming invoice resource.
+ * calculated exactly the same as the previewed proration, you should pass the
+ * subscription_details.proration_date parameter when doing the actual
+ * subscription update. The recommended way to get only the prorations being
+ * previewed is to consider only proration line items where
+ * period[start] is equal to the
+ * subscription_details.proration_date value passed in the request.
+ *
+ * Note: Currency conversion calculations use the latest exchange rates. Exchange
+ * rates may vary between the time of the preview and the time of the actual
+ * invoice creation. Learn
+ * more
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -235,7 +316,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
* line items.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -258,7 +339,7 @@ class InvoiceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -269,15 +350,60 @@ class InvoiceService extends \Stripe\Service\AbstractService
return $this->request('post', $this->buildPath('/v1/invoices/%s', $id), $params, $opts);
}
+ /**
+ * Updates an invoice’s line item. Some fields, such as tax_amounts,
+ * only live on the invoice line item, so they can only be updated through this
+ * endpoint. Other fields, such as amount, live on both the invoice
+ * item and the invoice line item, so updates on this endpoint will propagate to
+ * the invoice item as well. Updating an invoice’s line item is only possible
+ * before the invoice is finalized.
+ *
+ * @param string $parentId
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\InvoiceLineItem
+ */
+ public function updateLine($parentId, $id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/invoices/%s/lines/%s', $parentId, $id), $params, $opts);
+ }
+
+ /**
+ * Updates multiple line items on an invoice. This is only possible when an invoice
+ * is still a draft.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Invoice
+ */
+ public function updateLines($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/invoices/%s/update_lines', $id), $params, $opts);
+ }
+
/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is
* similar to deletion, however it only applies to
* finalized invoices and maintains a papertrail where the invoice can still be
* found.
*
+ * Consult with local regulations to determine whether and how an invoice might be
+ * amended, canceled, or voided in the jurisdiction you’re doing business in. You
+ * might need to issue another invoice or credit note instead. Stripe recommends that you
+ * consult with your legal counsel for advice specific to your business.
+ *
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Issuing/AuthorizationService.php b/plugins/stripe-php/lib/Service/Issuing/AuthorizationService.php
similarity index 64%
rename from plugins/stripe-php-10.5.0/lib/Service/Issuing/AuthorizationService.php
rename to plugins/stripe-php/lib/Service/Issuing/AuthorizationService.php
index d36f48ed..a743ead7 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Issuing/AuthorizationService.php
+++ b/plugins/stripe-php/lib/Service/Issuing/AuthorizationService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\Issuing;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class AuthorizationService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class AuthorizationService extends \Stripe\Service\AbstractService
* object appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -24,16 +28,18 @@ class AuthorizationService extends \Stripe\Service\AbstractService
}
/**
- * Approves a pending Issuing Authorization object. This request
- * should be made within the timeout window of the Authorization object. This
+ * request should be made within the timeout window of the real-time
- * authorization flow. You can also respond directly to the webhook request to
- * approve an authorization (preferred). More details can be found here.
+ * authorization flow. This method is deprecated. Instead, respond
+ * directly to the webhook request to approve an authorization.
+ *
+ * @deprecated this method is deprecated, please refer to the description for details
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -45,16 +51,18 @@ class AuthorizationService extends \Stripe\Service\AbstractService
}
/**
- * Declines a pending Issuing Authorization object. This request
- * should be made within the timeout window of the Authorization object. This
+ * request should be made within the timeout window of the real time
- * authorization flow. You can also respond directly to the webhook request to
- * decline an authorization (preferred). More details can be found here.
+ * authorization flow. This method is deprecated. Instead, respond
+ * directly to the webhook request to decline an authorization.
+ *
+ * @deprecated this method is deprecated, please refer to the description for details
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -70,7 +78,7 @@ class AuthorizationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -88,7 +96,7 @@ class AuthorizationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Issuing/CardService.php b/plugins/stripe-php/lib/Service/Issuing/CardService.php
similarity index 81%
rename from plugins/stripe-php-10.5.0/lib/Service/Issuing/CardService.php
rename to plugins/stripe-php/lib/Service/Issuing/CardService.php
index 22b7e541..27844d09 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Issuing/CardService.php
+++ b/plugins/stripe-php/lib/Service/Issuing/CardService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\Issuing;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class CardService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class CardService extends \Stripe\Service\AbstractService
* appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,7 +31,7 @@ class CardService extends \Stripe\Service\AbstractService
* Creates an Issuing Card object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -43,7 +47,7 @@ class CardService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -60,7 +64,7 @@ class CardService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Issuing/CardholderService.php b/plugins/stripe-php/lib/Service/Issuing/CardholderService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/Issuing/CardholderService.php
rename to plugins/stripe-php/lib/Service/Issuing/CardholderService.php
index 65e675b3..abc3a887 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Issuing/CardholderService.php
+++ b/plugins/stripe-php/lib/Service/Issuing/CardholderService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\Issuing;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class CardholderService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class CardholderService extends \Stripe\Service\AbstractService
* object appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,7 +31,7 @@ class CardholderService extends \Stripe\Service\AbstractService
* Creates a new Issuing Cardholder object that can be issued cards.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -43,7 +47,7 @@ class CardholderService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -61,7 +65,7 @@ class CardholderService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Issuing/DisputeService.php b/plugins/stripe-php/lib/Service/Issuing/DisputeService.php
similarity index 86%
rename from plugins/stripe-php-10.5.0/lib/Service/Issuing/DisputeService.php
rename to plugins/stripe-php/lib/Service/Issuing/DisputeService.php
index 45c25288..19f4da43 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Issuing/DisputeService.php
+++ b/plugins/stripe-php/lib/Service/Issuing/DisputeService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\Issuing;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class DisputeService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class DisputeService extends \Stripe\Service\AbstractService
* appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -31,7 +35,7 @@ class DisputeService extends \Stripe\Service\AbstractService
* reasons and evidence for more details about evidence requirements.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -47,7 +51,7 @@ class DisputeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -67,7 +71,7 @@ class DisputeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -86,7 +90,7 @@ class DisputeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php b/plugins/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php
new file mode 100644
index 00000000..852351d2
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php
@@ -0,0 +1,39 @@
+
+ */
+ private static $classMap = [
+ 'authorizations' => AuthorizationService::class,
+ 'cardholders' => CardholderService::class,
+ 'cards' => CardService::class,
+ 'disputes' => DisputeService::class,
+ 'personalizationDesigns' => PersonalizationDesignService::class,
+ 'physicalBundles' => PhysicalBundleService::class,
+ 'tokens' => TokenService::class,
+ 'transactions' => TransactionService::class,
+ ];
+
+ protected function getServiceClass($name)
+ {
+ return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Issuing/PersonalizationDesignService.php b/plugins/stripe-php/lib/Service/Issuing/PersonalizationDesignService.php
new file mode 100644
index 00000000..0a54d9e4
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Issuing/PersonalizationDesignService.php
@@ -0,0 +1,76 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/issuing/personalization_designs', $params, $opts);
+ }
+
+ /**
+ * Creates a personalization design object.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PersonalizationDesign
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/issuing/personalization_designs', $params, $opts);
+ }
+
+ /**
+ * Retrieves a personalization design object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PersonalizationDesign
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/issuing/personalization_designs/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Updates a card personalization object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PersonalizationDesign
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/issuing/personalization_designs/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Issuing/PhysicalBundleService.php b/plugins/stripe-php/lib/Service/Issuing/PhysicalBundleService.php
new file mode 100644
index 00000000..620266fe
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Issuing/PhysicalBundleService.php
@@ -0,0 +1,44 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/issuing/physical_bundles', $params, $opts);
+ }
+
+ /**
+ * Retrieves a physical bundle object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PhysicalBundle
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/issuing/physical_bundles/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Issuing/TokenService.php b/plugins/stripe-php/lib/Service/Issuing/TokenService.php
new file mode 100644
index 00000000..f1314c8b
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Issuing/TokenService.php
@@ -0,0 +1,60 @@
+Token objects for a given card.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Issuing\Token>
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/issuing/tokens', $params, $opts);
+ }
+
+ /**
+ * Retrieves an Issuing Token object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Token
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/issuing/tokens/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Attempts to update the specified Issuing Token object to the status
+ * specified.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Token
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/issuing/tokens/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Issuing/TransactionService.php b/plugins/stripe-php/lib/Service/Issuing/TransactionService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/Issuing/TransactionService.php
rename to plugins/stripe-php/lib/Service/Issuing/TransactionService.php
index dd83b182..063295e9 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Issuing/TransactionService.php
+++ b/plugins/stripe-php/lib/Service/Issuing/TransactionService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\Issuing;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class TransactionService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class TransactionService extends \Stripe\Service\AbstractService
* object appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -28,7 +32,7 @@ class TransactionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -46,7 +50,7 @@ class TransactionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/MandateService.php b/plugins/stripe-php/lib/Service/MandateService.php
similarity index 70%
rename from plugins/stripe-php-10.5.0/lib/Service/MandateService.php
rename to plugins/stripe-php/lib/Service/MandateService.php
index 156bff0a..7d10f322 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/MandateService.php
+++ b/plugins/stripe-php/lib/Service/MandateService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class MandateService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class MandateService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/OAuthService.php b/plugins/stripe-php/lib/Service/OAuthService.php
similarity index 98%
rename from plugins/stripe-php-10.5.0/lib/Service/OAuthService.php
rename to plugins/stripe-php/lib/Service/OAuthService.php
index b745ad98..3870cccd 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/OAuthService.php
+++ b/plugins/stripe-php/lib/Service/OAuthService.php
@@ -7,7 +7,7 @@ class OAuthService extends \Stripe\Service\AbstractService
/**
* Sends a request to Stripe's Connect API.
*
- * @param string $method the HTTP method
+ * @param 'delete'|'get'|'post' $method the HTTP method
* @param string $path the path of the request
* @param array $params the parameters of the request
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
diff --git a/plugins/stripe-php-10.5.0/lib/Service/PaymentIntentService.php b/plugins/stripe-php/lib/Service/PaymentIntentService.php
similarity index 72%
rename from plugins/stripe-php-10.5.0/lib/Service/PaymentIntentService.php
rename to plugins/stripe-php/lib/Service/PaymentIntentService.php
index f3f81d5c..58b54bd3 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/PaymentIntentService.php
+++ b/plugins/stripe-php/lib/Service/PaymentIntentService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class PaymentIntentService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of PaymentIntents.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -22,11 +26,12 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
}
/**
- * Manually reconcile the remaining amount for a customer_balance PaymentIntent.
+ * Manually reconcile the remaining amount for a customer_balance
+ * PaymentIntent.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -38,23 +43,23 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
}
/**
- * A PaymentIntent object can be canceled when it is in one of these statuses:
+ * You can cancel a PaymentIntent object when it’s in one of these statuses:
* requires_payment_method, requires_capture,
* requires_confirmation, requires_action or, in rare cases, processing.
*
- * Once canceled, no additional charges will be made by the PaymentIntent and any
- * operations on the PaymentIntent will fail with an error. For PaymentIntents with
- * status=’requires_capture’, the remaining
- * amount_capturable will automatically be refunded.
+ * After it’s canceled, no additional charges are made by the PaymentIntent and any
+ * operations on the PaymentIntent fail with an error. For PaymentIntents with a
+ * status of requires_capture, the remaining
+ * amount_capturable is automatically refunded.
*
- * You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session
* instead.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -69,15 +74,15 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
* Capture the funds of an existing uncaptured PaymentIntent when its status is
* requires_capture.
*
- * Uncaptured PaymentIntents will be canceled a set number of days after they are
- * created (7 by default).
+ * Uncaptured PaymentIntents are cancelled a set number of days (7 by default)
+ * after their creation.
*
* Learn more about separate authorization
* and capture.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -94,8 +99,9 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
* If the selected payment method requires additional authentication steps, the
* PaymentIntent will transition to the requires_action status and
* suggest additional actions via next_action. If payment fails, the
- * PaymentIntent will transition to the requires_payment_method
- * status. If payment succeeds, the PaymentIntent will transition to the
+ * PaymentIntent transitions to the requires_payment_method status or
+ * the canceled status if the confirmation limit is reached. If
+ * payment succeeds, the PaymentIntent will transition to the
* succeeded status (or requires_capture, if
* capture_method is set to manual). If the
* confirmation_method is automatic, payment may be
@@ -109,13 +115,14 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
* If any actions are required for the payment, the PaymentIntent will return to
* the requires_confirmation state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate
- * the next payment attempt. Read the expanded documentation to
- * learn more about manual confirmation.
+ * the next payment attempt. There is a variable upper limit on how many times a
+ * PaymentIntent can be confirmed. After this limit is reached, any further calls
+ * to this endpoint will transition the PaymentIntent to the canceled
+ * state.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -131,16 +138,16 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
*
* After the PaymentIntent is created, attach a payment method and confirm to continue the payment.
- * You can read more about the different payment flows available via the Payment
- * Intents API here.
+ * Learn more about the available payment
+ * flows with the Payment Intents API.
*
- * When confirm=true is used during creation, it is equivalent to
- * creating and confirming the PaymentIntent in the same call. You may use any
+ * When you use confirm=true during creation, it’s equivalent to
+ * creating and confirming the PaymentIntent in the same call. You can use any
* parameters available in the confirm
- * API when confirm=true is supplied.
+ * API when you supply confirm=true.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -159,21 +166,22 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
* must be true.
*
* Incremental authorizations attempt to increase the authorized amount on your
- * customer’s card to the new, higher amount provided. As with the
- * initial authorization, incremental authorizations may be declined. A single
+ * customer’s card to the new, higher amount provided. Similar to the
+ * initial authorization, incremental authorizations can be declined. A single
* PaymentIntent can call this endpoint multiple times to further increase the
* authorized amount.
*
- * If the incremental authorization succeeds, the PaymentIntent object is returned
- * with the updated amount.
* If the incremental authorization fails, a card_declined error is returned, and
- * no fields on the PaymentIntent or Charge are updated. The PaymentIntent object
+ * href="/docs/error-codes#card-declined">card_declined error returns, and no
+ * other fields on the PaymentIntent or Charge update. The PaymentIntent object
* remains capturable for the previously authorized amount.
*
* Each PaymentIntent can have a maximum of 10 incremental authorization attempts,
- * including declines. Once captured, a PaymentIntent can no longer be incremented.
+ * including declines. After it’s captured, a PaymentIntent can no longer be
+ * incremented.
*
* Learn more about incremental
@@ -181,7 +189,7 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -195,16 +203,16 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
/**
* Retrieves the details of a PaymentIntent that has previously been created.
*
- * Client-side retrieval using a publishable key is allowed when the
- * client_secret is provided in the query string.
+ * You can retrieve a PaymentIntent client-side using a publishable key when the
+ * client_secret is in the query string.
*
- * When retrieved with a publishable key, only a subset of properties will be
- * returned. Please refer to the payment
- * intent object reference for more details.
+ * If you retrieve a PaymentIntent with a publishable key, it only returns a subset
+ * of properties. Refer to the payment intent
+ * object reference for more details.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -224,7 +232,7 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -238,15 +246,15 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
/**
* Updates properties on a PaymentIntent object without confirming.
*
- * Depending on which properties you update, you may need to confirm the
- * PaymentIntent again. For example, updating the payment_method will
- * always require you to confirm the PaymentIntent again. If you prefer to update
- * and confirm at the same time, we recommend updating properties via the payment_method
+ * always requires you to confirm the PaymentIntent again. If you prefer to update
+ * and confirm at the same time, we recommend updating properties through the confirm API instead.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -262,7 +270,7 @@ class PaymentIntentService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/PaymentLinkService.php b/plugins/stripe-php/lib/Service/PaymentLinkService.php
similarity index 81%
rename from plugins/stripe-php-10.5.0/lib/Service/PaymentLinkService.php
rename to plugins/stripe-php/lib/Service/PaymentLinkService.php
index e5008d7a..d6daa177 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/PaymentLinkService.php
+++ b/plugins/stripe-php/lib/Service/PaymentLinkService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class PaymentLinkService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of your payment links.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -29,7 +33,7 @@ class PaymentLinkService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -44,7 +48,7 @@ class PaymentLinkService extends \Stripe\Service\AbstractService
* Creates a payment link.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -60,7 +64,7 @@ class PaymentLinkService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -76,7 +80,7 @@ class PaymentLinkService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php/lib/Service/PaymentMethodConfigurationService.php b/plugins/stripe-php/lib/Service/PaymentMethodConfigurationService.php
new file mode 100644
index 00000000..4bd7b965
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/PaymentMethodConfigurationService.php
@@ -0,0 +1,74 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/payment_method_configurations', $params, $opts);
+ }
+
+ /**
+ * Creates a payment method configuration.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodConfiguration
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/payment_method_configurations', $params, $opts);
+ }
+
+ /**
+ * Retrieve payment method configuration.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodConfiguration
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Update payment method configuration.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodConfiguration
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/PaymentMethodDomainService.php b/plugins/stripe-php/lib/Service/PaymentMethodDomainService.php
new file mode 100644
index 00000000..c6e7d084
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/PaymentMethodDomainService.php
@@ -0,0 +1,101 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/payment_method_domains', $params, $opts);
+ }
+
+ /**
+ * Creates a payment method domain.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/payment_method_domains', $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing payment method domain.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Updates an existing payment method domain.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Some payment methods such as Apple Pay require additional steps to verify a
+ * domain. If the requirements weren’t satisfied when the domain was created, the
+ * payment method will be inactive on the domain. The payment method doesn’t appear
+ * in Elements for this domain until it is active.
+ *
+ * To activate a payment method on an existing payment method domain, complete the
+ * required validation steps specific to the payment method, and then validate the
+ * payment method domain with this endpoint.
+ *
+ * Related guides: Payment method
+ * domains.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain
+ */
+ public function validate($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s/validate', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/PaymentMethodService.php b/plugins/stripe-php/lib/Service/PaymentMethodService.php
similarity index 89%
rename from plugins/stripe-php-10.5.0/lib/Service/PaymentMethodService.php
rename to plugins/stripe-php/lib/Service/PaymentMethodService.php
index 70944daa..054d03b6 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/PaymentMethodService.php
+++ b/plugins/stripe-php/lib/Service/PaymentMethodService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class PaymentMethodService extends \Stripe\Service\AbstractService
{
/**
@@ -13,7 +17,7 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
* PaymentMethods API instead.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -46,7 +50,7 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -69,7 +73,7 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
* method details ahead of a future payment.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -86,7 +90,7 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -105,7 +109,7 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -122,7 +126,7 @@ class PaymentMethodService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/PayoutService.php b/plugins/stripe-php/lib/Service/PayoutService.php
similarity index 56%
rename from plugins/stripe-php-10.5.0/lib/Service/PayoutService.php
rename to plugins/stripe-php/lib/Service/PayoutService.php
index 4ca3561c..3bd0eb29 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/PayoutService.php
+++ b/plugins/stripe-php/lib/Service/PayoutService.php
@@ -4,15 +4,19 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class PayoutService extends \Stripe\Service\AbstractService
{
/**
- * Returns a list of existing payouts sent to third-party bank accounts or that
- * Stripe has sent you. The payouts are returned in sorted order, with the most
+ * Returns a list of existing payouts sent to third-party bank accounts or payouts
+ * that Stripe sent to you. The payouts return in sorted order, with the most
* recently created payouts appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -24,13 +28,13 @@ class PayoutService extends \Stripe\Service\AbstractService
}
/**
- * A previously created payout can be canceled if it has not yet been paid out.
- * Funds will be refunded to your available balance. You may not cancel automatic
- * Stripe payouts.
+ * You can cancel a previously created payout if its status is
+ * pending. Stripe refunds the funds to your available balance. You
+ * can’t cancel automatic Stripe payouts.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -42,20 +46,20 @@ class PayoutService extends \Stripe\Service\AbstractService
}
/**
- * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or
- * you’ll receive an “Insufficient Funds” error.
+ * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t,
+ * you receive an “Insufficient Funds” error.
*
- * If your API key is in test mode, money won’t actually be sent, though everything
- * else will occur as if in live mode.
+ * If your API key is in test mode, money won’t actually be sent, though every
+ * other action occurs as if you’re in live mode.
*
- * If you are creating a manual payout on a Stripe account that uses multiple
- * payment source types, you’ll need to specify the source type balance that the
- * payout should draw from. The balance object
- * details available and pending amounts by source type.
+ * If you create a manual payout on a Stripe account that uses multiple payment
+ * source types, you need to specify the source type balance that the payout draws
+ * from. The balance object details available and
+ * pending amounts by source type.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -68,12 +72,12 @@ class PayoutService extends \Stripe\Service\AbstractService
/**
* Retrieves the details of an existing payout. Supply the unique payout ID from
- * either a payout creation request or the payout list, and Stripe will return the
+ * either a payout creation request or the payout list. Stripe returns the
* corresponding payout information.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -85,18 +89,18 @@ class PayoutService extends \Stripe\Service\AbstractService
}
/**
- * Reverses a payout by debiting the destination bank account. Only payouts for
- * connected accounts to US bank accounts may be reversed at this time. If the
- * payout is in the pending status,
- * /v1/payouts/:id/cancel should be used instead.
+ * Reverses a payout by debiting the destination bank account. At this time, you
+ * can only reverse payouts for connected accounts to US bank accounts. If the
+ * payout is manual and in the pending status, use
+ * /v1/payouts/:id/cancel instead.
*
- * By requesting a reversal via /v1/payouts/:id/reverse, you confirm
- * that the authorized signatory of the selected bank account has authorized the
- * debit on the bank account and that no other authorization is required.
+ * By requesting a reversal through /v1/payouts/:id/reverse, you
+ * confirm that the authorized signatory of the selected bank account authorizes
+ * the debit on the bank account and that no other authorization is required.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -108,13 +112,13 @@ class PayoutService extends \Stripe\Service\AbstractService
}
/**
- * Updates the specified payout by setting the values of the parameters passed. Any
- * parameters not provided will be left unchanged. This request accepts only the
+ * Updates the specified payout by setting the values of the parameters you pass.
+ * We don’t change parameters that you don’t provide. This request only accepts the
* metadata as arguments.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/PlanService.php b/plugins/stripe-php/lib/Service/PlanService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/PlanService.php
rename to plugins/stripe-php/lib/Service/PlanService.php
index 6c0a8d47..1cea58ea 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/PlanService.php
+++ b/plugins/stripe-php/lib/Service/PlanService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class PlanService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of your plans.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,7 +31,7 @@ class PlanService extends \Stripe\Service\AbstractService
* migration.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -44,7 +48,7 @@ class PlanService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -60,7 +64,7 @@ class PlanService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -78,7 +82,7 @@ class PlanService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/PriceService.php b/plugins/stripe-php/lib/Service/PriceService.php
similarity index 78%
rename from plugins/stripe-php-10.5.0/lib/Service/PriceService.php
rename to plugins/stripe-php/lib/Service/PriceService.php
index ef2b938d..7d164ba4 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/PriceService.php
+++ b/plugins/stripe-php/lib/Service/PriceService.php
@@ -4,13 +4,19 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class PriceService extends \Stripe\Service\AbstractService
{
/**
- * Returns a list of your prices.
+ * Returns a list of your active prices, excluding inline prices.
+ * For the list of inactive prices, set active to false.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +32,7 @@ class PriceService extends \Stripe\Service\AbstractService
* one-time.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -42,7 +48,7 @@ class PriceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -62,7 +68,7 @@ class PriceService extends \Stripe\Service\AbstractService
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -79,7 +85,7 @@ class PriceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/ProductService.php b/plugins/stripe-php/lib/Service/ProductService.php
similarity index 54%
rename from plugins/stripe-php-10.5.0/lib/Service/ProductService.php
rename to plugins/stripe-php/lib/Service/ProductService.php
index 5eb6d82c..d3aee577 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/ProductService.php
+++ b/plugins/stripe-php/lib/Service/ProductService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ProductService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class ProductService extends \Stripe\Service\AbstractService
* date, with the most recently created products appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -22,11 +26,27 @@ class ProductService extends \Stripe\Service\AbstractService
return $this->requestCollection('get', '/v1/products', $params, $opts);
}
+ /**
+ * Retrieve a list of features for a product.
+ *
+ * @param string $parentId
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\ProductFeature>
+ */
+ public function allFeatures($parentId, $params = null, $opts = null)
+ {
+ return $this->requestCollection('get', $this->buildPath('/v1/products/%s/features', $parentId), $params, $opts);
+ }
+
/**
* Creates a new product object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -37,6 +57,22 @@ class ProductService extends \Stripe\Service\AbstractService
return $this->request('post', '/v1/products', $params, $opts);
}
+ /**
+ * Creates a product_feature, which represents a feature attachment to a product.
+ *
+ * @param string $parentId
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ProductFeature
+ */
+ public function createFeature($parentId, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/products/%s/features', $parentId), $params, $opts);
+ }
+
/**
* Delete a product. Deleting a product is only possible if it has no prices
* associated with it. Additionally, deleting a product with type=good
@@ -44,7 +80,7 @@ class ProductService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -55,6 +91,23 @@ class ProductService extends \Stripe\Service\AbstractService
return $this->request('delete', $this->buildPath('/v1/products/%s', $id), $params, $opts);
}
+ /**
+ * Deletes the feature attachment to a product.
+ *
+ * @param string $parentId
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ProductFeature
+ */
+ public function deleteFeature($parentId, $id, $params = null, $opts = null)
+ {
+ return $this->request('delete', $this->buildPath('/v1/products/%s/features/%s', $parentId, $id), $params, $opts);
+ }
+
/**
* Retrieves the details of an existing product. Supply the unique product ID from
* either a product creation request or the product list, and Stripe will return
@@ -62,7 +115,7 @@ class ProductService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -73,6 +126,23 @@ class ProductService extends \Stripe\Service\AbstractService
return $this->request('get', $this->buildPath('/v1/products/%s', $id), $params, $opts);
}
+ /**
+ * Retrieves a product_feature, which represents a feature attachment to a product.
+ *
+ * @param string $parentId
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ProductFeature
+ */
+ public function retrieveFeature($parentId, $id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/products/%s/features/%s', $parentId, $id), $params, $opts);
+ }
+
/**
* Search for products you’ve previously created using Stripe’s Search Query Language. Don’t use
@@ -82,7 +152,7 @@ class ProductService extends \Stripe\Service\AbstractService
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -99,7 +169,7 @@ class ProductService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/PromotionCodeService.php b/plugins/stripe-php/lib/Service/PromotionCodeService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/PromotionCodeService.php
rename to plugins/stripe-php/lib/Service/PromotionCodeService.php
index 17461b4b..8e24e73c 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/PromotionCodeService.php
+++ b/plugins/stripe-php/lib/Service/PromotionCodeService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class PromotionCodeService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of your promotion codes.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class PromotionCodeService extends \Stripe\Service\AbstractService
* specific customer, redemption limit, and expiration date.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -45,7 +49,7 @@ class PromotionCodeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -62,7 +66,7 @@ class PromotionCodeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/QuoteService.php b/plugins/stripe-php/lib/Service/QuoteService.php
similarity index 80%
rename from plugins/stripe-php-10.5.0/lib/Service/QuoteService.php
rename to plugins/stripe-php/lib/Service/QuoteService.php
index 05f0dfb6..09ff03a4 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/QuoteService.php
+++ b/plugins/stripe-php/lib/Service/QuoteService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class QuoteService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class QuoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class QuoteService extends \Stripe\Service\AbstractService
* Returns a list of your quotes.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -45,7 +49,7 @@ class QuoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -63,7 +67,7 @@ class QuoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -79,7 +83,7 @@ class QuoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -97,7 +101,7 @@ class QuoteService extends \Stripe\Service\AbstractService
* href="https://dashboard.stripe.com/settings/billing/quote">quote template.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -113,7 +117,7 @@ class QuoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -124,12 +128,35 @@ class QuoteService extends \Stripe\Service\AbstractService
return $this->request('post', $this->buildPath('/v1/quotes/%s/finalize', $id), $params, $opts);
}
+ /**
+ * Download the PDF for a finalized quote. Explanation for special handling can be
+ * found here.
+ *
+ * @param string $id
+ * @param callable $readBodyChunkCallable
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return mixed
+ */
+ public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ if (!isset($opts->apiBase)) {
+ $opts->apiBase = $this->getClient()->getFilesBase();
+ }
+
+ return $this->requestStream('get', $this->buildPath('/v1/quotes/%s/pdf', $id), $readBodyChunkCallable, $params, $opts);
+ }
+
/**
* Retrieves the quote with the given ID.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -145,7 +172,7 @@ class QuoteService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -155,23 +182,4 @@ class QuoteService extends \Stripe\Service\AbstractService
{
return $this->request('post', $this->buildPath('/v1/quotes/%s', $id), $params, $opts);
}
-
- /**
- * Download the PDF for a finalized quote.
- *
- * @param string $id
- * @param callable $readBodyChunkCallable
- * @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
- *
- * @throws \Stripe\Exception\ApiErrorException if the request fails
- */
- public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null)
- {
- $opts = \Stripe\Util\RequestOptions::parse($opts);
- if (!isset($opts->apiBase)) {
- $opts->apiBase = $this->getClient()->getFilesBase();
- }
- $this->requestStream('get', $this->buildPath('/v1/quotes/%s/pdf', $id), $readBodyChunkCallable, $params, $opts);
- }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Radar/EarlyFraudWarningService.php b/plugins/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php
similarity index 79%
rename from plugins/stripe-php-10.5.0/lib/Service/Radar/EarlyFraudWarningService.php
rename to plugins/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php
index be119b4c..3047a984 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Radar/EarlyFraudWarningService.php
+++ b/plugins/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Radar;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class EarlyFraudWarningService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of early fraud warnings.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -30,7 +34,7 @@ class EarlyFraudWarningService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Radar/RadarServiceFactory.php b/plugins/stripe-php/lib/Service/Radar/RadarServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/Radar/RadarServiceFactory.php
rename to plugins/stripe-php/lib/Service/Radar/RadarServiceFactory.php
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Radar/ValueListItemService.php b/plugins/stripe-php/lib/Service/Radar/ValueListItemService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/Radar/ValueListItemService.php
rename to plugins/stripe-php/lib/Service/Radar/ValueListItemService.php
index b9da3dd8..0113f12b 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Radar/ValueListItemService.php
+++ b/plugins/stripe-php/lib/Service/Radar/ValueListItemService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\Radar;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ValueListItemService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class ValueListItemService extends \Stripe\Service\AbstractService
* appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -28,7 +32,7 @@ class ValueListItemService extends \Stripe\Service\AbstractService
* parent value list.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -45,7 +49,7 @@ class ValueListItemService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -61,7 +65,7 @@ class ValueListItemService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Radar/ValueListService.php b/plugins/stripe-php/lib/Service/Radar/ValueListService.php
similarity index 83%
rename from plugins/stripe-php-10.5.0/lib/Service/Radar/ValueListService.php
rename to plugins/stripe-php/lib/Service/Radar/ValueListService.php
index 70d9b486..125f5d5d 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Radar/ValueListService.php
+++ b/plugins/stripe-php/lib/Service/Radar/ValueListService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\Radar;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ValueListService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class ValueListService extends \Stripe\Service\AbstractService
* appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -28,7 +32,7 @@ class ValueListService extends \Stripe\Service\AbstractService
* rules.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -46,7 +50,7 @@ class ValueListService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -62,7 +66,7 @@ class ValueListService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -80,7 +84,7 @@ class ValueListService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/RefundService.php b/plugins/stripe-php/lib/Service/RefundService.php
similarity index 54%
rename from plugins/stripe-php-10.5.0/lib/Service/RefundService.php
rename to plugins/stripe-php/lib/Service/RefundService.php
index 772c0f6e..f86b2090 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/RefundService.php
+++ b/plugins/stripe-php/lib/Service/RefundService.php
@@ -4,16 +4,19 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class RefundService extends \Stripe\Service\AbstractService
{
/**
- * Returns a list of all refunds you’ve previously created. The refunds are
- * returned in sorted order, with the most recent refunds appearing first. For
- * convenience, the 10 most recent refunds are always available by default on the
- * charge object.
+ * Returns a list of all refunds you created. We return the refunds in sorted
+ * order, with the most recent refunds appearing first. The 10 most recent refunds
+ * are always available by default on the Charge object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,12 +30,12 @@ class RefundService extends \Stripe\Service\AbstractService
/**
* Cancels a refund with a status of requires_action.
*
- * Refunds in other states cannot be canceled, and only refunds for payment methods
- * that require customer action will enter the requires_action state.
+ * You can’t cancel refunds in other states. Only refunds for payment methods that
+ * require customer action can enter the requires_action state.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -44,10 +47,22 @@ class RefundService extends \Stripe\Service\AbstractService
}
/**
- * Create a refund.
+ * When you create a new refund, you must specify a Charge or a PaymentIntent
+ * object on which to create it.
+ *
+ * Creating a new refund will refund a charge that has previously been created but
+ * not yet refunded. Funds will be refunded to the credit or debit card that was
+ * originally charged.
+ *
+ * You can optionally refund only part of a charge. You can do so multiple times,
+ * until the entire charge has been refunded.
+ *
+ * Once entirely refunded, a charge can’t be refunded again. This method will raise
+ * an error when called on an already-refunded charge, or when trying to refund
+ * more money than is left on a charge.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -63,7 +78,7 @@ class RefundService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -75,14 +90,14 @@ class RefundService extends \Stripe\Service\AbstractService
}
/**
- * Updates the specified refund by setting the values of the parameters passed. Any
- * parameters not provided will be left unchanged.
+ * Updates the refund that you specify by setting the values of the passed
+ * parameters. Any parameters that you don’t provide remain unchanged.
*
* This request only accepts metadata as an argument.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Reporting/ReportRunService.php b/plugins/stripe-php/lib/Service/Reporting/ReportRunService.php
similarity index 80%
rename from plugins/stripe-php-10.5.0/lib/Service/Reporting/ReportRunService.php
rename to plugins/stripe-php/lib/Service/Reporting/ReportRunService.php
index b62898fd..569bd247 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Reporting/ReportRunService.php
+++ b/plugins/stripe-php/lib/Service/Reporting/ReportRunService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Reporting;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ReportRunService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of Report Runs, with the most recent appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class ReportRunService extends \Stripe\Service\AbstractService
* a live-mode API key.).
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -42,7 +46,7 @@ class ReportRunService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Reporting/ReportTypeService.php b/plugins/stripe-php/lib/Service/Reporting/ReportTypeService.php
similarity index 78%
rename from plugins/stripe-php-10.5.0/lib/Service/Reporting/ReportTypeService.php
rename to plugins/stripe-php/lib/Service/Reporting/ReportTypeService.php
index 7fa50382..0b2dde53 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Reporting/ReportTypeService.php
+++ b/plugins/stripe-php/lib/Service/Reporting/ReportTypeService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Reporting;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ReportTypeService extends \Stripe\Service\AbstractService
{
/**
* Returns a full list of Report Types.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,7 +31,7 @@ class ReportTypeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Reporting/ReportingServiceFactory.php b/plugins/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/Reporting/ReportingServiceFactory.php
rename to plugins/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php
diff --git a/plugins/stripe-php-10.5.0/lib/Service/ReviewService.php b/plugins/stripe-php/lib/Service/ReviewService.php
similarity index 80%
rename from plugins/stripe-php-10.5.0/lib/Service/ReviewService.php
rename to plugins/stripe-php/lib/Service/ReviewService.php
index 3bcd325b..b04a8d9e 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/ReviewService.php
+++ b/plugins/stripe-php/lib/Service/ReviewService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ReviewService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class ReviewService extends \Stripe\Service\AbstractService
* with the most recently created object appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -29,7 +33,7 @@ class ReviewService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -45,7 +49,7 @@ class ReviewService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php/lib/Service/ServiceNavigatorTrait.php b/plugins/stripe-php/lib/Service/ServiceNavigatorTrait.php
new file mode 100644
index 00000000..c53f3721
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/ServiceNavigatorTrait.php
@@ -0,0 +1,58 @@
+ */
+ protected $services = [];
+
+ /** @var \Stripe\StripeClientInterface */
+ protected $client;
+
+ protected function getServiceClass($name)
+ {
+ \trigger_error('Undefined property: ' . static::class . '::$' . $name);
+ }
+
+ public function __get($name)
+ {
+ $serviceClass = $this->getServiceClass($name);
+ if (null !== $serviceClass) {
+ if (!\array_key_exists($name, $this->services)) {
+ $this->services[$name] = new $serviceClass($this->client);
+ }
+
+ return $this->services[$name];
+ }
+
+ \trigger_error('Undefined property: ' . static::class . '::$' . $name);
+
+ return null;
+ }
+
+ /**
+ * @param string $name
+ *
+ * @return null|AbstractService|AbstractServiceFactory
+ */
+ public function getService($name)
+ {
+ $serviceClass = $this->getServiceClass($name);
+ if (null !== $serviceClass) {
+ if (!\array_key_exists($name, $this->services)) {
+ $this->services[$name] = new $serviceClass($this->client);
+ }
+
+ return $this->services[$name];
+ }
+
+ \trigger_error('Undefined property: ' . static::class . '::$' . $name);
+
+ return null;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/SetupAttemptService.php b/plugins/stripe-php/lib/Service/SetupAttemptService.php
similarity index 61%
rename from plugins/stripe-php-10.5.0/lib/Service/SetupAttemptService.php
rename to plugins/stripe-php/lib/Service/SetupAttemptService.php
index 8657441e..b6ddbff5 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/SetupAttemptService.php
+++ b/plugins/stripe-php/lib/Service/SetupAttemptService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SetupAttemptService extends \Stripe\Service\AbstractService
{
/**
- * Returns a list of SetupAttempts associated with a provided SetupIntent.
+ * Returns a list of SetupAttempts that associate with a provided SetupIntent.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/SetupIntentService.php b/plugins/stripe-php/lib/Service/SetupIntentService.php
similarity index 77%
rename from plugins/stripe-php-10.5.0/lib/Service/SetupIntentService.php
rename to plugins/stripe-php/lib/Service/SetupIntentService.php
index 3dea24cb..e3428da5 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/SetupIntentService.php
+++ b/plugins/stripe-php/lib/Service/SetupIntentService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SetupIntentService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of SetupIntents.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -22,16 +26,18 @@ class SetupIntentService extends \Stripe\Service\AbstractService
}
/**
- * A SetupIntent object can be canceled when it is in one of these statuses:
+ * You can cancel a SetupIntent object when it’s in one of these statuses:
* requires_payment_method, requires_confirmation, or
* requires_action.
*
- * Once canceled, setup is abandoned and any operations on the SetupIntent will
- * fail with an error.
+ * After you cancel it, setup is abandoned and any operations on the SetupIntent
+ * fail with an error. You can’t cancel the SetupIntent for a Checkout Session. Expire the Checkout Session
+ * instead.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -52,11 +58,12 @@ class SetupIntentService extends \Stripe\Service\AbstractService
*
* Otherwise, it will transition to the requires_action status and
* suggest additional actions via next_action. If setup fails, the
- * SetupIntent will transition to the requires_payment_method status.
+ * SetupIntent will transition to the requires_payment_method status
+ * or the canceled status if the confirmation limit is reached.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -70,12 +77,12 @@ class SetupIntentService extends \Stripe\Service\AbstractService
/**
* Creates a SetupIntent object.
*
- * After the SetupIntent is created, attach a payment method and confirm to collect any required
+ * After you create the SetupIntent, attach a payment method and confirm it to collect any required
* permissions to charge the payment method later.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -98,7 +105,7 @@ class SetupIntentService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -114,7 +121,7 @@ class SetupIntentService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -130,7 +137,7 @@ class SetupIntentService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/ShippingRateService.php b/plugins/stripe-php/lib/Service/ShippingRateService.php
similarity index 79%
rename from plugins/stripe-php-10.5.0/lib/Service/ShippingRateService.php
rename to plugins/stripe-php/lib/Service/ShippingRateService.php
index d141e484..c9015b7f 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/ShippingRateService.php
+++ b/plugins/stripe-php/lib/Service/ShippingRateService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ShippingRateService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of your shipping rates.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -25,7 +29,7 @@ class ShippingRateService extends \Stripe\Service\AbstractService
* Creates a new shipping rate object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class ShippingRateService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -57,7 +61,7 @@ class ShippingRateService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Sigma/ScheduledQueryRunService.php b/plugins/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php
similarity index 77%
rename from plugins/stripe-php-10.5.0/lib/Service/Sigma/ScheduledQueryRunService.php
rename to plugins/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php
index 0fa8cd9c..79562e20 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Sigma/ScheduledQueryRunService.php
+++ b/plugins/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Sigma;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ScheduledQueryRunService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of scheduled query runs.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class ScheduledQueryRunService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Sigma/SigmaServiceFactory.php b/plugins/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/Sigma/SigmaServiceFactory.php
rename to plugins/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php
diff --git a/plugins/stripe-php-10.5.0/lib/Service/SourceService.php b/plugins/stripe-php/lib/Service/SourceService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/SourceService.php
rename to plugins/stripe-php/lib/Service/SourceService.php
index b5571788..9b94aeb1 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/SourceService.php
+++ b/plugins/stripe-php/lib/Service/SourceService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SourceService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class SourceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class SourceService extends \Stripe\Service\AbstractService
* Creates a new source object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -43,11 +47,11 @@ class SourceService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Source
+ * @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source
*/
public function detach($parentId, $id, $params = null, $opts = null)
{
@@ -61,7 +65,7 @@ class SourceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -83,7 +87,7 @@ class SourceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -99,7 +103,7 @@ class SourceService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/SubscriptionItemService.php b/plugins/stripe-php/lib/Service/SubscriptionItemService.php
similarity index 89%
rename from plugins/stripe-php-10.5.0/lib/Service/SubscriptionItemService.php
rename to plugins/stripe-php/lib/Service/SubscriptionItemService.php
index e18c8de4..133542f6 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/SubscriptionItemService.php
+++ b/plugins/stripe-php/lib/Service/SubscriptionItemService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SubscriptionItemService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of your subscription items for a given subscription.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -35,7 +39,7 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -51,7 +55,7 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
* or replaced.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -89,7 +93,7 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -106,7 +110,7 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -122,7 +126,7 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -138,7 +142,7 @@ class SubscriptionItemService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/SubscriptionScheduleService.php b/plugins/stripe-php/lib/Service/SubscriptionScheduleService.php
similarity index 86%
rename from plugins/stripe-php-10.5.0/lib/Service/SubscriptionScheduleService.php
rename to plugins/stripe-php/lib/Service/SubscriptionScheduleService.php
index 42aaf6bb..3145b312 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/SubscriptionScheduleService.php
+++ b/plugins/stripe-php/lib/Service/SubscriptionScheduleService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SubscriptionScheduleService extends \Stripe\Service\AbstractService
{
/**
* Retrieves the list of your subscription schedules.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -29,7 +33,7 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -45,7 +49,7 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
* active or scheduled subscriptions.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -66,7 +70,7 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -84,7 +88,7 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -100,7 +104,7 @@ class SubscriptionScheduleService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/SubscriptionService.php b/plugins/stripe-php/lib/Service/SubscriptionService.php
similarity index 50%
rename from plugins/stripe-php-10.5.0/lib/Service/SubscriptionService.php
rename to plugins/stripe-php/lib/Service/SubscriptionService.php
index dcbc8e64..922be94c 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/SubscriptionService.php
+++ b/plugins/stripe-php/lib/Service/SubscriptionService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class SubscriptionService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* order to list canceled subscriptions, specify status=canceled.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -23,27 +27,26 @@ class SubscriptionService extends \Stripe\Service\AbstractService
}
/**
- * Cancels a customer’s subscription immediately. The customer will not be charged
- * again for the subscription.
+ * Cancels a customer’s subscription immediately. The customer won’t be charged
+ * again for the subscription. After it’s canceled, you can no longer update the
+ * subscription or its metadata.
*
- * Note, however, that any pending invoice items that you’ve created will still be
- * charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel
- * at the end of the period, any pending prorations will also be left in place and
- * collected at the end of the period. But if the subscription is set to cancel
- * immediately, pending prorations will be removed.
+ * Any pending invoice items that you’ve created are still charged at the end of
+ * the period, unless manually deleted. If you’ve
+ * set the subscription to cancel at the end of the period, any pending prorations
+ * are also left in place and collected at the end of the period. But if the
+ * subscription is set to cancel immediately, pending prorations are removed.
*
- * By default, upon subscription cancellation, Stripe will stop automatic
- * collection of all finalized invoices for the customer. This is intended to
- * prevent unexpected payment attempts after the customer has canceled a
- * subscription. However, you can resume automatic collection of the invoices
- * manually after subscription cancellation to have us proceed. Or, you could check
- * for unpaid invoices before allowing the customer to cancel the subscription at
- * all.
+ * By default, upon subscription cancellation, Stripe stops automatic collection of
+ * all finalized invoices for the customer. This is intended to prevent unexpected
+ * payment attempts after the customer has canceled a subscription. However, you
+ * can resume automatic collection of the invoices manually after subscription
+ * cancellation to have us proceed. Or, you could check for unpaid invoices before
+ * allowing the customer to cancel the subscription at all.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -70,7 +73,7 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* billing configurations that change over time.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -86,11 +89,11 @@ class SubscriptionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Subscription
+ * @return \Stripe\Discount
*/
public function deleteDiscount($id, $params = null, $opts = null)
{
@@ -107,7 +110,7 @@ class SubscriptionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -123,7 +126,7 @@ class SubscriptionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -143,7 +146,7 @@ class SubscriptionService extends \Stripe\Service\AbstractService
* during outages. Search functionality is not available to merchants in India.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -155,15 +158,59 @@ class SubscriptionService extends \Stripe\Service\AbstractService
}
/**
- * Updates an existing subscription on a customer to match the specified
- * parameters. When changing plans or quantities, we will optionally prorate the
- * price we charge next month to make up for any price changes. To preview how the
- * proration will be calculated, use the upcoming
- * invoice endpoint.
+ * Updates an existing subscription to match the specified parameters. When
+ * changing prices or quantities, we optionally prorate the price we charge next
+ * month to make up for any price changes. To preview how the proration is
+ * calculated, use the create
+ * preview endpoint.
+ *
+ * By default, we prorate subscription changes. For example, if a customer signs up
+ * on May 1 for a proration_behavior as always_invoice to create
+ * prorations, automatically invoice the customer for those proration adjustments,
+ * and attempt to collect payment. If you pass create_prorations, the
+ * prorations are created but not automatically invoiced. If you want to bill the
+ * customer for the prorations before the subscription’s renewal date, you need to
+ * manually invoice the customer.
+ *
+ * If you don’t want to prorate, set the proration_behavior option to
+ * none. With this option, the customer is billed
+ * proration_behavior to none when
+ * switching between different billing intervals (for example, from monthly to
+ * yearly), we don’t generate any credits for the old subscription’s unused time.
+ * We still reset the billing date and bill immediately for the new subscription.
+ *
+ * Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently
+ * changing quantity, consider integrating usage-based billing instead.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php/lib/Service/Tax/CalculationService.php b/plugins/stripe-php/lib/Service/Tax/CalculationService.php
new file mode 100644
index 00000000..68a1f048
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Tax/CalculationService.php
@@ -0,0 +1,62 @@
+
+ */
+ public function allLineItems($id, $params = null, $opts = null)
+ {
+ return $this->requestCollection('get', $this->buildPath('/v1/tax/calculations/%s/line_items', $id), $params, $opts);
+ }
+
+ /**
+ * Calculates tax based on the input and returns a Tax Calculation
+ * object.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Calculation
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/tax/calculations', $params, $opts);
+ }
+
+ /**
+ * Retrieves a Tax Calculation object, if the calculation hasn’t
+ * expired.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Calculation
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/tax/calculations/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Tax/RegistrationService.php b/plugins/stripe-php/lib/Service/Tax/RegistrationService.php
new file mode 100644
index 00000000..db05503a
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Tax/RegistrationService.php
@@ -0,0 +1,77 @@
+Registration objects.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Tax\Registration>
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/tax/registrations', $params, $opts);
+ }
+
+ /**
+ * Creates a new Tax Registration object.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Registration
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/tax/registrations', $params, $opts);
+ }
+
+ /**
+ * Returns a Tax Registration object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Registration
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/tax/registrations/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Updates an existing Tax Registration object.
+ *
+ * A registration cannot be deleted after it has been created. If you wish to end a
+ * registration you may do so by setting expires_at.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Registration
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/tax/registrations/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Tax/SettingsService.php b/plugins/stripe-php/lib/Service/Tax/SettingsService.php
new file mode 100644
index 00000000..38d02cc5
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Tax/SettingsService.php
@@ -0,0 +1,43 @@
+Settings for a merchant.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Settings
+ */
+ public function retrieve($params = null, $opts = null)
+ {
+ return $this->request('get', '/v1/tax/settings', $params, $opts);
+ }
+
+ /**
+ * Updates Tax Settings parameters used in tax calculations. All
+ * parameters are editable but none can be removed once set.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Settings
+ */
+ public function update($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/tax/settings', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Tax/TaxServiceFactory.php b/plugins/stripe-php/lib/Service/Tax/TaxServiceFactory.php
new file mode 100644
index 00000000..2aeeb64f
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Tax/TaxServiceFactory.php
@@ -0,0 +1,31 @@
+
+ */
+ private static $classMap = [
+ 'calculations' => CalculationService::class,
+ 'registrations' => RegistrationService::class,
+ 'settings' => SettingsService::class,
+ 'transactions' => TransactionService::class,
+ ];
+
+ protected function getServiceClass($name)
+ {
+ return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/Tax/TransactionService.php b/plugins/stripe-php/lib/Service/Tax/TransactionService.php
new file mode 100644
index 00000000..416332ee
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/Tax/TransactionService.php
@@ -0,0 +1,75 @@
+
+ */
+ public function allLineItems($id, $params = null, $opts = null)
+ {
+ return $this->requestCollection('get', $this->buildPath('/v1/tax/transactions/%s/line_items', $id), $params, $opts);
+ }
+
+ /**
+ * Creates a Tax Transaction from a calculation, if that calculation hasn’t
+ * expired. Calculations expire after 90 days.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Transaction
+ */
+ public function createFromCalculation($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/tax/transactions/create_from_calculation', $params, $opts);
+ }
+
+ /**
+ * Partially or fully reverses a previously created Transaction.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Transaction
+ */
+ public function createReversal($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/tax/transactions/create_reversal', $params, $opts);
+ }
+
+ /**
+ * Retrieves a Tax Transaction object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Transaction
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/tax/transactions/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TaxCodeService.php b/plugins/stripe-php/lib/Service/TaxCodeService.php
similarity index 79%
rename from plugins/stripe-php-10.5.0/lib/Service/TaxCodeService.php
rename to plugins/stripe-php/lib/Service/TaxCodeService.php
index fd167a10..7baf4d74 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TaxCodeService.php
+++ b/plugins/stripe-php/lib/Service/TaxCodeService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class TaxCodeService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class TaxCodeService extends \Stripe\Service\AbstractService
* available to add to Products in order to allow specific tax calculations.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -28,7 +32,7 @@ class TaxCodeService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php/lib/Service/TaxIdService.php b/plugins/stripe-php/lib/Service/TaxIdService.php
new file mode 100644
index 00000000..6593387f
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/TaxIdService.php
@@ -0,0 +1,74 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/tax_ids', $params, $opts);
+ }
+
+ /**
+ * Creates a new account or customer tax_id object.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxId
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/tax_ids', $params, $opts);
+ }
+
+ /**
+ * Deletes an existing account or customer tax_id object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxId
+ */
+ public function delete($id, $params = null, $opts = null)
+ {
+ return $this->request('delete', $this->buildPath('/v1/tax_ids/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Retrieves an account or customer tax_id object.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxId
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/tax_ids/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TaxRateService.php b/plugins/stripe-php/lib/Service/TaxRateService.php
similarity index 79%
rename from plugins/stripe-php-10.5.0/lib/Service/TaxRateService.php
rename to plugins/stripe-php/lib/Service/TaxRateService.php
index 0d67eec3..5763f099 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TaxRateService.php
+++ b/plugins/stripe-php/lib/Service/TaxRateService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class TaxRateService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class TaxRateService extends \Stripe\Service\AbstractService
* date, with the most recently created tax rates appearing first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class TaxRateService extends \Stripe\Service\AbstractService
* Creates a new tax rate.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -42,7 +46,7 @@ class TaxRateService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -58,7 +62,7 @@ class TaxRateService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Terminal/ConfigurationService.php b/plugins/stripe-php/lib/Service/Terminal/ConfigurationService.php
similarity index 81%
rename from plugins/stripe-php-10.5.0/lib/Service/Terminal/ConfigurationService.php
rename to plugins/stripe-php/lib/Service/Terminal/ConfigurationService.php
index 97c7c275..62350082 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Terminal/ConfigurationService.php
+++ b/plugins/stripe-php/lib/Service/Terminal/ConfigurationService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Terminal;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ConfigurationService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of Configuration objects.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -25,7 +29,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
* Creates a new Configuration object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -57,7 +61,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -73,7 +77,7 @@ class ConfigurationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Terminal/ConnectionTokenService.php b/plugins/stripe-php/lib/Service/Terminal/ConnectionTokenService.php
similarity index 76%
rename from plugins/stripe-php-10.5.0/lib/Service/Terminal/ConnectionTokenService.php
rename to plugins/stripe-php/lib/Service/Terminal/ConnectionTokenService.php
index 7b25b231..8c8235d6 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Terminal/ConnectionTokenService.php
+++ b/plugins/stripe-php/lib/Service/Terminal/ConnectionTokenService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\Terminal;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ConnectionTokenService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class ConnectionTokenService extends \Stripe\Service\AbstractService
* an endpoint that creates and returns a connection token.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Terminal/LocationService.php b/plugins/stripe-php/lib/Service/Terminal/LocationService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/Terminal/LocationService.php
rename to plugins/stripe-php/lib/Service/Terminal/LocationService.php
index 74a776eb..980c318a 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Terminal/LocationService.php
+++ b/plugins/stripe-php/lib/Service/Terminal/LocationService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Terminal;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class LocationService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of Location objects.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,7 +31,7 @@ class LocationService extends \Stripe\Service\AbstractService
* href="/docs/terminal/fleet/locations">Manage locations guide.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -43,7 +47,7 @@ class LocationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -59,7 +63,7 @@ class LocationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -76,7 +80,7 @@ class LocationService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Terminal/ReaderService.php b/plugins/stripe-php/lib/Service/Terminal/ReaderService.php
similarity index 75%
rename from plugins/stripe-php-10.5.0/lib/Service/Terminal/ReaderService.php
rename to plugins/stripe-php/lib/Service/Terminal/ReaderService.php
index ae855595..f119f8e2 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Terminal/ReaderService.php
+++ b/plugins/stripe-php/lib/Service/Terminal/ReaderService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Terminal;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ReaderService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of Reader objects.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class ReaderService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class ReaderService extends \Stripe\Service\AbstractService
* Creates a new Reader object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -57,7 +61,7 @@ class ReaderService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -73,7 +77,7 @@ class ReaderService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -89,7 +93,7 @@ class ReaderService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -100,12 +104,28 @@ class ReaderService extends \Stripe\Service\AbstractService
return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/process_setup_intent', $id), $params, $opts);
}
+ /**
+ * Initiates a refund on a Reader.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader
+ */
+ public function refundPayment($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/terminal/readers/%s/refund_payment', $id), $params, $opts);
+ }
+
/**
* Retrieves a Reader object.
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -121,7 +141,7 @@ class ReaderService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -138,7 +158,7 @@ class ReaderService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Terminal/TerminalServiceFactory.php b/plugins/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/Terminal/TerminalServiceFactory.php
rename to plugins/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php
diff --git a/plugins/stripe-php/lib/Service/TestHelpers/ConfirmationTokenService.php b/plugins/stripe-php/lib/Service/TestHelpers/ConfirmationTokenService.php
new file mode 100644
index 00000000..a98c0e3a
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/TestHelpers/ConfirmationTokenService.php
@@ -0,0 +1,27 @@
+request('post', '/v1/test_helpers/confirmation_tokens', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/CustomerService.php b/plugins/stripe-php/lib/Service/TestHelpers/CustomerService.php
similarity index 66%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/CustomerService.php
rename to plugins/stripe-php/lib/Service/TestHelpers/CustomerService.php
index c46b5797..902a9333 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/CustomerService.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/CustomerService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\TestHelpers;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class CustomerService extends \Stripe\Service\AbstractService
{
/**
@@ -11,11 +15,11 @@ class CustomerService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Customer
+ * @return \Stripe\CustomerCashBalanceTransaction
*/
public function fundCashBalance($id, $params = null, $opts = null)
{
diff --git a/plugins/stripe-php/lib/Service/TestHelpers/Issuing/AuthorizationService.php b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/AuthorizationService.php
new file mode 100644
index 00000000..22d3ff8e
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/AuthorizationService.php
@@ -0,0 +1,125 @@
+request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/capture', $id), $params, $opts);
+ }
+
+ /**
+ * Create a test-mode authorization.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/test_helpers/issuing/authorizations', $params, $opts);
+ }
+
+ /**
+ * Expire a test-mode Authorization.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function expire($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/expire', $id), $params, $opts);
+ }
+
+ /**
+ * Finalize the amount on an Authorization prior to capture, when the initial
+ * authorization was for an estimated amount.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function finalizeAmount($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/finalize_amount', $id), $params, $opts);
+ }
+
+ /**
+ * Increment a test-mode Authorization.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function increment($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/increment', $id), $params, $opts);
+ }
+
+ /**
+ * Respond to a fraud challenge on a testmode Issuing authorization, simulating
+ * either a confirmation of fraud or a correction of legitimacy.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function respond($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/fraud_challenges/respond', $id), $params, $opts);
+ }
+
+ /**
+ * Reverse a test-mode Authorization.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Authorization
+ */
+ public function reverse($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/reverse', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Issuing/CardService.php b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/CardService.php
similarity index 66%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Issuing/CardService.php
rename to plugins/stripe-php/lib/Service/TestHelpers/Issuing/CardService.php
index 01d7080a..b74b9edb 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Issuing/CardService.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/CardService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\TestHelpers\Issuing;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class CardService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class CardService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -29,7 +33,7 @@ class CardService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -46,7 +50,7 @@ class CardService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -63,7 +67,7 @@ class CardService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -73,4 +77,22 @@ class CardService extends \Stripe\Service\AbstractService
{
return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/ship', $id), $params, $opts);
}
+
+ /**
+ * Updates the shipping status of the specified Issuing Card object to
+ * submitted. This method requires Stripe Version ‘2024-09-30.acacia’
+ * or later.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Card
+ */
+ public function submitCard($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/submit', $id), $params, $opts);
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Issuing/IssuingServiceFactory.php b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
similarity index 77%
rename from plugins/stripe-php-10.5.0/lib/Service/Issuing/IssuingServiceFactory.php
rename to plugins/stripe-php/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
index a8d5d0f8..c6224144 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Issuing/IssuingServiceFactory.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php
@@ -2,15 +2,14 @@
// File generated from our OpenAPI spec
-namespace Stripe\Service\Issuing;
+namespace Stripe\Service\TestHelpers\Issuing;
/**
* Service factory class for API resources in the Issuing namespace.
*
* @property AuthorizationService $authorizations
- * @property CardholderService $cardholders
* @property CardService $cards
- * @property DisputeService $disputes
+ * @property PersonalizationDesignService $personalizationDesigns
* @property TransactionService $transactions
*/
class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
@@ -20,9 +19,8 @@ class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
*/
private static $classMap = [
'authorizations' => AuthorizationService::class,
- 'cardholders' => CardholderService::class,
'cards' => CardService::class,
- 'disputes' => DisputeService::class,
+ 'personalizationDesigns' => PersonalizationDesignService::class,
'transactions' => TransactionService::class,
];
diff --git a/plugins/stripe-php/lib/Service/TestHelpers/Issuing/PersonalizationDesignService.php b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/PersonalizationDesignService.php
new file mode 100644
index 00000000..386fc955
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/PersonalizationDesignService.php
@@ -0,0 +1,63 @@
+status of the specified testmode personalization design
+ * object to active.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PersonalizationDesign
+ */
+ public function activate($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/personalization_designs/%s/activate', $id), $params, $opts);
+ }
+
+ /**
+ * Updates the status of the specified testmode personalization design
+ * object to inactive.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PersonalizationDesign
+ */
+ public function deactivate($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/personalization_designs/%s/deactivate', $id), $params, $opts);
+ }
+
+ /**
+ * Updates the status of the specified testmode personalization design
+ * object to rejected.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\PersonalizationDesign
+ */
+ public function reject($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/personalization_designs/%s/reject', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/TestHelpers/Issuing/TransactionService.php b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/TransactionService.php
new file mode 100644
index 00000000..0142ecfd
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/TestHelpers/Issuing/TransactionService.php
@@ -0,0 +1,58 @@
+request('post', '/v1/test_helpers/issuing/transactions/create_force_capture', $params, $opts);
+ }
+
+ /**
+ * Allows the user to refund an arbitrary amount, also known as a unlinked refund.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Transaction
+ */
+ public function createUnlinkedRefund($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/test_helpers/issuing/transactions/create_unlinked_refund', $params, $opts);
+ }
+
+ /**
+ * Refund a test-mode Transaction.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Issuing\Transaction
+ */
+ public function refund($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/transactions/%s/refund', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/RefundService.php b/plugins/stripe-php/lib/Service/TestHelpers/RefundService.php
similarity index 72%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/RefundService.php
rename to plugins/stripe-php/lib/Service/TestHelpers/RefundService.php
index de0e4d10..51234044 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/RefundService.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/RefundService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\TestHelpers;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class RefundService extends \Stripe\Service\AbstractService
{
/**
@@ -11,7 +15,7 @@ class RefundService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Terminal/ReaderService.php b/plugins/stripe-php/lib/Service/TestHelpers/Terminal/ReaderService.php
similarity index 76%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Terminal/ReaderService.php
rename to plugins/stripe-php/lib/Service/TestHelpers/Terminal/ReaderService.php
index 2eb4de49..afdecb55 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Terminal/ReaderService.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/Terminal/ReaderService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\TestHelpers\Terminal;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ReaderService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class ReaderService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php b/plugins/stripe-php/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php
rename to plugins/stripe-php/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/TestClockService.php b/plugins/stripe-php/lib/Service/TestHelpers/TestClockService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/TestClockService.php
rename to plugins/stripe-php/lib/Service/TestHelpers/TestClockService.php
index a4eee8c3..d938a96b 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/TestClockService.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/TestClockService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\TestHelpers;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class TestClockService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class TestClockService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,7 +31,7 @@ class TestClockService extends \Stripe\Service\AbstractService
* Returns a list of your test clocks.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -42,7 +46,7 @@ class TestClockService extends \Stripe\Service\AbstractService
* Creates a new test clock that can be attached to new customers and quotes.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -58,7 +62,7 @@ class TestClockService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -74,7 +78,7 @@ class TestClockService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/TestHelpersServiceFactory.php b/plugins/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php
similarity index 89%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/TestHelpersServiceFactory.php
rename to plugins/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php
index cb0ee1a0..038a565a 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/TestHelpersServiceFactory.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php
@@ -7,6 +7,7 @@ namespace Stripe\Service\TestHelpers;
/**
* Service factory class for API resources in the TestHelpers namespace.
*
+ * @property ConfirmationTokenService $confirmationTokens
* @property CustomerService $customers
* @property Issuing\IssuingServiceFactory $issuing
* @property RefundService $refunds
@@ -20,6 +21,7 @@ class TestHelpersServiceFactory extends \Stripe\Service\AbstractServiceFactory
* @var arraycanceled or failed states.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\OutboundPayment
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/outbound_payments/%s', $id), $params, $opts);
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/OutboundTransferService.php b/plugins/stripe-php/lib/Service/TestHelpers/Treasury/OutboundTransferService.php
similarity index 64%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/OutboundTransferService.php
rename to plugins/stripe-php/lib/Service/TestHelpers/Treasury/OutboundTransferService.php
index 4b26bedf..c1528800 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/OutboundTransferService.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/Treasury/OutboundTransferService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\TestHelpers\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class OutboundTransferService extends \Stripe\Service\AbstractService
{
/**
@@ -13,7 +17,7 @@ class OutboundTransferService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -31,7 +35,7 @@ class OutboundTransferService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -49,7 +53,7 @@ class OutboundTransferService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -59,4 +63,22 @@ class OutboundTransferService extends \Stripe\Service\AbstractService
{
return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/outbound_transfers/%s/return', $id), $params, $opts);
}
+
+ /**
+ * Updates a test mode created OutboundTransfer with tracking details. The
+ * OutboundTransfer must not be cancelable, and cannot be in the
+ * canceled or failed states.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\OutboundTransfer
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/test_helpers/treasury/outbound_transfers/%s', $id), $params, $opts);
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/ReceivedCreditService.php b/plugins/stripe-php/lib/Service/TestHelpers/Treasury/ReceivedCreditService.php
similarity index 75%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/ReceivedCreditService.php
rename to plugins/stripe-php/lib/Service/TestHelpers/Treasury/ReceivedCreditService.php
index a90031a3..b1d865c1 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/ReceivedCreditService.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/Treasury/ReceivedCreditService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\TestHelpers\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ReceivedCreditService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class ReceivedCreditService extends \Stripe\Service\AbstractService
* third parties.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/ReceivedDebitService.php b/plugins/stripe-php/lib/Service/TestHelpers/Treasury/ReceivedDebitService.php
similarity index 75%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/ReceivedDebitService.php
rename to plugins/stripe-php/lib/Service/TestHelpers/Treasury/ReceivedDebitService.php
index 17f4c827..bbd0cc9f 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/ReceivedDebitService.php
+++ b/plugins/stripe-php/lib/Service/TestHelpers/Treasury/ReceivedDebitService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service\TestHelpers\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ReceivedDebitService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class ReceivedDebitService extends \Stripe\Service\AbstractService
* parties.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/TreasuryServiceFactory.php b/plugins/stripe-php/lib/Service/TestHelpers/Treasury/TreasuryServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/TestHelpers/Treasury/TreasuryServiceFactory.php
rename to plugins/stripe-php/lib/Service/TestHelpers/Treasury/TreasuryServiceFactory.php
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TokenService.php b/plugins/stripe-php/lib/Service/TokenService.php
similarity index 56%
rename from plugins/stripe-php-10.5.0/lib/Service/TokenService.php
rename to plugins/stripe-php/lib/Service/TokenService.php
index 1c72759f..3e90aa92 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TokenService.php
+++ b/plugins/stripe-php/lib/Service/TokenService.php
@@ -4,16 +4,22 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class TokenService extends \Stripe\Service\AbstractService
{
/**
- * Creates a single-use token that represents a bank account’s details. This token
- * can be used with any API method in place of a bank account dictionary. This
- * token can be used only once, by attaching it to a Custom
- * account.
+ * Creates a single-use token that represents a bank account’s details. You can use
+ * this token with any v1 API method in place of a bank account dictionary. You can
+ * only use this token once. To do so, attach it to a connected
+ * account where controller.requirement_collection
+ * is application, which includes Custom accounts.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -29,7 +35,7 @@ class TokenService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TopupService.php b/plugins/stripe-php/lib/Service/TopupService.php
similarity index 81%
rename from plugins/stripe-php-10.5.0/lib/Service/TopupService.php
rename to plugins/stripe-php/lib/Service/TopupService.php
index bd486b9e..2d11619f 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TopupService.php
+++ b/plugins/stripe-php/lib/Service/TopupService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class TopupService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of top-ups.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class TopupService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class TopupService extends \Stripe\Service\AbstractService
* Top up the balance of an account.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -59,7 +63,7 @@ class TopupService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -76,7 +80,7 @@ class TopupService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/TransferService.php b/plugins/stripe-php/lib/Service/TransferService.php
similarity index 88%
rename from plugins/stripe-php-10.5.0/lib/Service/TransferService.php
rename to plugins/stripe-php/lib/Service/TransferService.php
index b5113e9a..26ec45ef 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/TransferService.php
+++ b/plugins/stripe-php/lib/Service/TransferService.php
@@ -4,6 +4,10 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class TransferService extends \Stripe\Service\AbstractService
{
/**
@@ -12,7 +16,7 @@ class TransferService extends \Stripe\Service\AbstractService
* first.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -32,7 +36,7 @@ class TransferService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -49,7 +53,7 @@ class TransferService extends \Stripe\Service\AbstractService
* cover the transfer amount, or you’ll receive an “Insufficient Funds” error.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -72,7 +76,7 @@ class TransferService extends \Stripe\Service\AbstractService
*
* @param string $parentId
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -90,7 +94,7 @@ class TransferService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -109,7 +113,7 @@ class TransferService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -128,7 +132,7 @@ class TransferService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -148,7 +152,7 @@ class TransferService extends \Stripe\Service\AbstractService
* @param string $parentId
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/CreditReversalService.php b/plugins/stripe-php/lib/Service/Treasury/CreditReversalService.php
similarity index 80%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/CreditReversalService.php
rename to plugins/stripe-php/lib/Service/Treasury/CreditReversalService.php
index 60bf900a..5cd42226 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/CreditReversalService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/CreditReversalService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class CreditReversalService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of CreditReversals.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -25,7 +29,7 @@ class CreditReversalService extends \Stripe\Service\AbstractService
* Reverses a ReceivedCredit and creates a CreditReversal object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -43,7 +47,7 @@ class CreditReversalService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/DebitReversalService.php b/plugins/stripe-php/lib/Service/Treasury/DebitReversalService.php
similarity index 78%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/DebitReversalService.php
rename to plugins/stripe-php/lib/Service/Treasury/DebitReversalService.php
index 8887ee14..cbeaa111 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/DebitReversalService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/DebitReversalService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class DebitReversalService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of DebitReversals.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -25,7 +29,7 @@ class DebitReversalService extends \Stripe\Service\AbstractService
* Reverses a ReceivedDebit and creates a DebitReversal object.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class DebitReversalService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/FinancialAccountService.php b/plugins/stripe-php/lib/Service/Treasury/FinancialAccountService.php
similarity index 80%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/FinancialAccountService.php
rename to plugins/stripe-php/lib/Service/Treasury/FinancialAccountService.php
index f273bd9c..f8ec126f 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/FinancialAccountService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/FinancialAccountService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class FinancialAccountService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of FinancialAccounts.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class FinancialAccountService extends \Stripe\Service\AbstractService
* one FinancialAccount.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -42,7 +46,7 @@ class FinancialAccountService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -58,11 +62,11 @@ class FinancialAccountService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Treasury\FinancialAccount
+ * @return \Stripe\Treasury\FinancialAccountFeatures
*/
public function retrieveFeatures($id, $params = null, $opts = null)
{
@@ -74,7 +78,7 @@ class FinancialAccountService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -90,11 +94,11 @@ class FinancialAccountService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Treasury\FinancialAccount
+ * @return \Stripe\Treasury\FinancialAccountFeatures
*/
public function updateFeatures($id, $params = null, $opts = null)
{
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/InboundTransferService.php b/plugins/stripe-php/lib/Service/Treasury/InboundTransferService.php
similarity index 80%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/InboundTransferService.php
rename to plugins/stripe-php/lib/Service/Treasury/InboundTransferService.php
index 49ea32ba..95c7fdc6 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/InboundTransferService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/InboundTransferService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class InboundTransferService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of InboundTransfers sent from the specified FinancialAccount.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class InboundTransferService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class InboundTransferService extends \Stripe\Service\AbstractService
* Creates an InboundTransfer.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -57,7 +61,7 @@ class InboundTransferService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/OutboundPaymentService.php b/plugins/stripe-php/lib/Service/Treasury/OutboundPaymentService.php
similarity index 81%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/OutboundPaymentService.php
rename to plugins/stripe-php/lib/Service/Treasury/OutboundPaymentService.php
index e6108e0c..53a5e02a 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/OutboundPaymentService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/OutboundPaymentService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class OutboundPaymentService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of OutboundPayments sent from the specified FinancialAccount.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class OutboundPaymentService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class OutboundPaymentService extends \Stripe\Service\AbstractService
* Creates an OutboundPayment.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -59,7 +63,7 @@ class OutboundPaymentService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/OutboundTransferService.php b/plugins/stripe-php/lib/Service/Treasury/OutboundTransferService.php
similarity index 82%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/OutboundTransferService.php
rename to plugins/stripe-php/lib/Service/Treasury/OutboundTransferService.php
index f6131865..0b2a2738 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/OutboundTransferService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/OutboundTransferService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class OutboundTransferService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of OutboundTransfers sent from the specified FinancialAccount.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class OutboundTransferService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -41,7 +45,7 @@ class OutboundTransferService extends \Stripe\Service\AbstractService
* Creates an OutboundTransfer.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -59,7 +63,7 @@ class OutboundTransferService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/ReceivedCreditService.php b/plugins/stripe-php/lib/Service/Treasury/ReceivedCreditService.php
similarity index 78%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/ReceivedCreditService.php
rename to plugins/stripe-php/lib/Service/Treasury/ReceivedCreditService.php
index 1355deb5..8c741265 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/ReceivedCreditService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/ReceivedCreditService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ReceivedCreditService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of ReceivedCredits.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,7 +31,7 @@ class ReceivedCreditService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/ReceivedDebitService.php b/plugins/stripe-php/lib/Service/Treasury/ReceivedDebitService.php
similarity index 78%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/ReceivedDebitService.php
rename to plugins/stripe-php/lib/Service/Treasury/ReceivedDebitService.php
index dfe3786b..8d856881 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/ReceivedDebitService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/ReceivedDebitService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class ReceivedDebitService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of ReceivedDebits.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -27,7 +31,7 @@ class ReceivedDebitService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/TransactionEntryService.php b/plugins/stripe-php/lib/Service/Treasury/TransactionEntryService.php
similarity index 77%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/TransactionEntryService.php
rename to plugins/stripe-php/lib/Service/Treasury/TransactionEntryService.php
index 3943de1c..52af51d5 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/TransactionEntryService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/TransactionEntryService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class TransactionEntryService extends \Stripe\Service\AbstractService
{
/**
* Retrieves a list of TransactionEntry objects.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class TransactionEntryService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/TransactionService.php b/plugins/stripe-php/lib/Service/Treasury/TransactionService.php
similarity index 76%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/TransactionService.php
rename to plugins/stripe-php/lib/Service/Treasury/TransactionService.php
index 232b2b1c..11eb6a54 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/Treasury/TransactionService.php
+++ b/plugins/stripe-php/lib/Service/Treasury/TransactionService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service\Treasury;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class TransactionService extends \Stripe\Service\AbstractService
{
/**
* Retrieves a list of Transaction objects.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -26,7 +30,7 @@ class TransactionService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/Service/Treasury/TreasuryServiceFactory.php b/plugins/stripe-php/lib/Service/Treasury/TreasuryServiceFactory.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Service/Treasury/TreasuryServiceFactory.php
rename to plugins/stripe-php/lib/Service/Treasury/TreasuryServiceFactory.php
diff --git a/plugins/stripe-php/lib/Service/V2/Billing/BillingServiceFactory.php b/plugins/stripe-php/lib/Service/V2/Billing/BillingServiceFactory.php
new file mode 100644
index 00000000..d24e45c2
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/V2/Billing/BillingServiceFactory.php
@@ -0,0 +1,31 @@
+
+ */
+ private static $classMap = [
+ 'meterEventAdjustments' => MeterEventAdjustmentService::class,
+ 'meterEvents' => MeterEventService::class,
+ 'meterEventSession' => MeterEventSessionService::class,
+ 'meterEventStream' => MeterEventStreamService::class,
+ ];
+
+ protected function getServiceClass($name)
+ {
+ return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/V2/Billing/MeterEventAdjustmentService.php b/plugins/stripe-php/lib/Service/V2/Billing/MeterEventAdjustmentService.php
new file mode 100644
index 00000000..c3c542e9
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/V2/Billing/MeterEventAdjustmentService.php
@@ -0,0 +1,27 @@
+request('post', '/v2/billing/meter_event_adjustments', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/V2/Billing/MeterEventService.php b/plugins/stripe-php/lib/Service/V2/Billing/MeterEventService.php
new file mode 100644
index 00000000..7a13a19a
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/V2/Billing/MeterEventService.php
@@ -0,0 +1,29 @@
+request('post', '/v2/billing/meter_events', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/V2/Billing/MeterEventSessionService.php b/plugins/stripe-php/lib/Service/V2/Billing/MeterEventSessionService.php
new file mode 100644
index 00000000..d1ca99da
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/V2/Billing/MeterEventSessionService.php
@@ -0,0 +1,29 @@
+request('post', '/v2/billing/meter_event_session', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/V2/Billing/MeterEventStreamService.php b/plugins/stripe-php/lib/Service/V2/Billing/MeterEventStreamService.php
new file mode 100644
index 00000000..e4ae2b7f
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/V2/Billing/MeterEventStreamService.php
@@ -0,0 +1,33 @@
+apiBase)) {
+ $opts->apiBase = $this->getClient()->getMeterEventsBase();
+ }
+ $this->request('post', '/v2/billing/meter_event_stream', $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/V2/Core/CoreServiceFactory.php b/plugins/stripe-php/lib/Service/V2/Core/CoreServiceFactory.php
new file mode 100644
index 00000000..c2638971
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/V2/Core/CoreServiceFactory.php
@@ -0,0 +1,29 @@
+
+ */
+ private static $classMap = [
+ // Class Map: The beginning of the section generated from our OpenAPI spec
+ 'eventDestinations' => EventDestinationService::class,
+ 'events' => EventService::class,
+ // Class Map: The end of the section generated from our OpenAPI spec
+ ];
+
+ protected function getServiceClass($name)
+ {
+ return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/V2/Core/EventDestinationService.php b/plugins/stripe-php/lib/Service/V2/Core/EventDestinationService.php
new file mode 100644
index 00000000..b633967d
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/V2/Core/EventDestinationService.php
@@ -0,0 +1,138 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v2/core/event_destinations', $params, $opts);
+ }
+
+ /**
+ * Create a new event destination.
+ *
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\V2\EventDestination
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v2/core/event_destinations', $params, $opts);
+ }
+
+ /**
+ * Delete an event destination.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\V2\EventDestination
+ */
+ public function delete($id, $params = null, $opts = null)
+ {
+ return $this->request('delete', $this->buildPath('/v2/core/event_destinations/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Disable an event destination.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\V2\EventDestination
+ */
+ public function disable($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s/disable', $id), $params, $opts);
+ }
+
+ /**
+ * Enable an event destination.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\V2\EventDestination
+ */
+ public function enable($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s/enable', $id), $params, $opts);
+ }
+
+ /**
+ * Send a `ping` event to an event destination.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\V2\Event
+ */
+ public function ping($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s/ping', $id), $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an event destination.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\V2\EventDestination
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v2/core/event_destinations/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Update the details of an event destination.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\V2\EventDestination
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/V2/Core/EventService.php b/plugins/stripe-php/lib/Service/V2/Core/EventService.php
new file mode 100644
index 00000000..fdc5aaaa
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/V2/Core/EventService.php
@@ -0,0 +1,43 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v2/core/events', $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an event.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\V2\Event
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v2/core/events/%s', $id), $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php/lib/Service/V2/V2ServiceFactory.php b/plugins/stripe-php/lib/Service/V2/V2ServiceFactory.php
new file mode 100644
index 00000000..f16fe623
--- /dev/null
+++ b/plugins/stripe-php/lib/Service/V2/V2ServiceFactory.php
@@ -0,0 +1,27 @@
+
+ */
+ private static $classMap = [
+ 'billing' => Billing\BillingServiceFactory::class,
+ 'core' => Core\CoreServiceFactory::class,
+ ];
+
+ protected function getServiceClass($name)
+ {
+ return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Service/WebhookEndpointService.php b/plugins/stripe-php/lib/Service/WebhookEndpointService.php
similarity index 85%
rename from plugins/stripe-php-10.5.0/lib/Service/WebhookEndpointService.php
rename to plugins/stripe-php/lib/Service/WebhookEndpointService.php
index baa15bd2..913f01a7 100644
--- a/plugins/stripe-php-10.5.0/lib/Service/WebhookEndpointService.php
+++ b/plugins/stripe-php/lib/Service/WebhookEndpointService.php
@@ -4,13 +4,17 @@
namespace Stripe\Service;
+/**
+ * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
+ */
class WebhookEndpointService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of your webhook endpoints.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -33,7 +37,7 @@ class WebhookEndpointService extends \Stripe\Service\AbstractService
* section of the Dashboard.
*
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -51,7 +55,7 @@ class WebhookEndpointService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -67,7 +71,7 @@ class WebhookEndpointService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
@@ -84,7 +88,7 @@ class WebhookEndpointService extends \Stripe\Service\AbstractService
*
* @param string $id
* @param null|array $params
- * @param null|array|\Stripe\Util\RequestOptions $opts
+ * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
diff --git a/plugins/stripe-php-10.5.0/lib/SetupAttempt.php b/plugins/stripe-php/lib/SetupAttempt.php
similarity index 64%
rename from plugins/stripe-php-10.5.0/lib/SetupAttempt.php
rename to plugins/stripe-php/lib/SetupAttempt.php
index b091cda2..e766c9b2 100644
--- a/plugins/stripe-php-10.5.0/lib/SetupAttempt.php
+++ b/plugins/stripe-php/lib/SetupAttempt.php
@@ -5,15 +5,15 @@
namespace Stripe;
/**
- * A SetupAttempt describes one attempted confirmation of a SetupIntent, whether
- * that confirmation was successful or unsuccessful. You can use SetupAttempts to
- * inspect details of a specific attempt at setting up a payment method using a
- * SetupIntent.
+ * A SetupAttempt describes one attempted confirmation of a SetupIntent,
+ * whether that confirmation is successful or unsuccessful. You can use
+ * SetupAttempts to inspect details of a specific attempt at setting up a
+ * payment method using a SetupIntent.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\StripeObject $application The value of application on the SetupIntent at the time of this confirmation.
- * @property bool $attach_to_self If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ * @property null|string|\Stripe\Application $application The value of application on the SetupIntent at the time of this confirmation. + * @property null|bool $attach_to_selfIf present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string|\Stripe\Customer $customer The value of customer on the SetupIntent at the time of this confirmation. * @property null|string[] $flow_directionsIndicates the directions of money movement for which this payment method is intended to be used.
Include inbound if you intend to use the payment method as the origin to pull funds from. Include outbound if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ * @property null|\Stripe\StripeObject $automatic_payment_methods Settings for dynamic payment methods compatible with this Setup Intent + * @property null|string $cancellation_reason Reason for cancellation of this SetupIntent, one ofabandoned, requested_by_customer, or duplicate.
+ * @property null|string $client_secret The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\Stripe\Customer $customerID of the Customer this SetupIntent belongs to, if one exists.
If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string[] $flow_directionsIndicates the directions of money movement for which this payment method is intended to be used.
Include inbound if you intend to use the payment method as the origin to pull funds from. Include outbound if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|string|\Stripe\Mandate $mandate ID of the multi use Mandate generated by the SetupIntent.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
+ * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the setup is intended.
+ * @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupIntent. If the payment method is card_present and isn't a digital wallet, then the generated_card associated with the latest_attempt is attached to the Customer instead.
+ * @property null|\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this Setup Intent.
+ * @property null|\Stripe\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.
+ * @property null|string|\Stripe\Mandate $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.
client_secret is provided in the query string.
+ *
+ * When retrieved with a publishable key, only a subset of properties will be
+ * returned. Please refer to the SetupIntent
+ * object reference for more details.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SetupIntent
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a SetupIntent object.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SetupIntent the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SetupIntent the canceled setup intent
+ */
+ public function cancel($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/cancel';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SetupIntent the confirmed setup intent
+ */
+ public function confirm($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/confirm';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SetupIntent the verified setup intent
+ */
+ public function verifyMicrodeposits($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/verify_microdeposits';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/ShippingRate.php b/plugins/stripe-php/lib/ShippingRate.php
new file mode 100644
index 00000000..e90b40c0
--- /dev/null
+++ b/plugins/stripe-php/lib/ShippingRate.php
@@ -0,0 +1,116 @@
+Charge for shipping.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property bool $active Whether the shipping rate can be used for new purchases. Defaults to true.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|\Stripe\StripeObject $delivery_estimate The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ * @property null|string $display_name The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ * @property null|\Stripe\StripeObject $fixed_amount
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|string $tax_behavior Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified.
+ * @property null|string|\Stripe\TaxCode $tax_code A tax code ID. The Shipping tax code is txcd_92010001.
+ * @property string $type The type of calculation to use on the shipping rate.
+ */
+class ShippingRate extends ApiResource
+{
+ const OBJECT_NAME = 'shipping_rate';
+
+ use ApiOperations\Update;
+
+ const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
+ const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
+ const TAX_BEHAVIOR_UNSPECIFIED = 'unspecified';
+
+ const TYPE_FIXED_AMOUNT = 'fixed_amount';
+
+ /**
+ * Creates a new shipping rate object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ShippingRate the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of your shipping rates.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\ShippingRate> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Returns the shipping rate object with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ShippingRate
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates an existing shipping rate object.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\ShippingRate the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Sigma/ScheduledQueryRun.php b/plugins/stripe-php/lib/Sigma/ScheduledQueryRun.php
similarity index 50%
rename from plugins/stripe-php-10.5.0/lib/Sigma/ScheduledQueryRun.php
rename to plugins/stripe-php/lib/Sigma/ScheduledQueryRun.php
index b109dde7..5efd1cd8 100644
--- a/plugins/stripe-php-10.5.0/lib/Sigma/ScheduledQueryRun.php
+++ b/plugins/stripe-php/lib/Sigma/ScheduledQueryRun.php
@@ -5,17 +5,16 @@
namespace Stripe\Sigma;
/**
- * If you have scheduled
- * a Sigma query, you'll receive a
- * sigma.scheduled_query_run.created webhook each time the query runs.
- * The webhook contains a ScheduledQueryRun object, which you can use
- * to retrieve the query results.
+ * If you have scheduled a Sigma query, you'll
+ * receive a sigma.scheduled_query_run.created webhook each time the query
+ * runs. The webhook contains a ScheduledQueryRun object, which you can use to
+ * retrieve the query results.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property int $data_load_time When the query was run, Sigma contained a snapshot of your Stripe data at this time.
- * @property \Stripe\StripeObject $error
+ * @property null|\Stripe\StripeObject $error
* @property null|\Stripe\File $file The file object representing the results of the query.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property int $result_available_until Time at which the result expires and is no longer available for download.
@@ -27,8 +26,41 @@ class ScheduledQueryRun extends \Stripe\ApiResource
{
const OBJECT_NAME = 'scheduled_query_run';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
+ /**
+ * Returns a list of scheduled query runs.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Sigma\ScheduledQueryRun> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an scheduled query run.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Sigma\ScheduledQueryRun
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
public static function classUrl()
{
diff --git a/plugins/stripe-php-10.5.0/lib/SingletonApiResource.php b/plugins/stripe-php/lib/SingletonApiResource.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/SingletonApiResource.php
rename to plugins/stripe-php/lib/SingletonApiResource.php
diff --git a/plugins/stripe-php-10.5.0/lib/Source.php b/plugins/stripe-php/lib/Source.php
similarity index 53%
rename from plugins/stripe-php-10.5.0/lib/Source.php
rename to plugins/stripe-php/lib/Source.php
index 201fdab7..2e8aa0d5 100644
--- a/plugins/stripe-php-10.5.0/lib/Source.php
+++ b/plugins/stripe-php/lib/Source.php
@@ -5,67 +5,67 @@
namespace Stripe;
/**
- * Source objects allow you to accept a variety of payment methods.
- * They represent a customer's payment instrument, and can be used with the Stripe
- * API just like a Card object: once chargeable, they can be charged,
- * or can be attached to customers.
+ * Source objects allow you to accept a variety of payment methods. They
+ * represent a customer's payment instrument, and can be used with the Stripe API
+ * just like a Card object: once chargeable, they can be charged, or can be
+ * attached to customers.
*
- * Stripe doesn't recommend using the deprecated Sources API. We recommend that
- * you adopt the PaymentMethods API. This
- * newer API provides access to our latest features and payment method types.
+ * Stripe doesn't recommend using the deprecated Sources API.
+ * We recommend that you adopt the PaymentMethods API.
+ * This newer API provides access to our latest features and payment method types.
*
- * Related guides: Sources API and Sources & Customers.
+ * Related guides: Sources API and Sources & Customers.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property \Stripe\StripeObject $ach_credit_transfer
- * @property \Stripe\StripeObject $ach_debit
- * @property \Stripe\StripeObject $acss_debit
- * @property \Stripe\StripeObject $alipay
+ * @property null|\Stripe\StripeObject $ach_credit_transfer
+ * @property null|\Stripe\StripeObject $ach_debit
+ * @property null|\Stripe\StripeObject $acss_debit
+ * @property null|\Stripe\StripeObject $alipay
+ * @property null|string $allow_redisplay This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
* @property null|int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources.
- * @property \Stripe\StripeObject $au_becs_debit
- * @property \Stripe\StripeObject $bancontact
- * @property \Stripe\StripeObject $card
- * @property \Stripe\StripeObject $card_present
+ * @property null|\Stripe\StripeObject $au_becs_debit
+ * @property null|\Stripe\StripeObject $bancontact
+ * @property null|\Stripe\StripeObject $card
+ * @property null|\Stripe\StripeObject $card_present
* @property string $client_secret The client secret of the source. Used for client-side retrieval using a publishable key.
- * @property \Stripe\StripeObject $code_verification
+ * @property null|\Stripe\StripeObject $code_verification
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use sources.
- * @property string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
- * @property \Stripe\StripeObject $eps
+ * @property null|string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
+ * @property null|\Stripe\StripeObject $eps
* @property string $flow The authentication flow of the source. flow is one of redirect, receiver, code_verification, none.
- * @property \Stripe\StripeObject $giropay
- * @property \Stripe\StripeObject $ideal
- * @property \Stripe\StripeObject $klarna
+ * @property null|\Stripe\StripeObject $giropay
+ * @property null|\Stripe\StripeObject $ideal
+ * @property null|\Stripe\StripeObject $klarna
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property \Stripe\StripeObject $multibanco
+ * @property null|\Stripe\StripeObject $multibanco
* @property null|\Stripe\StripeObject $owner Information about the owner of the payment instrument that may be used or required by particular source types.
- * @property \Stripe\StripeObject $p24
- * @property \Stripe\StripeObject $receiver
- * @property \Stripe\StripeObject $redirect
- * @property \Stripe\StripeObject $sepa_credit_transfer
- * @property \Stripe\StripeObject $sepa_debit
- * @property \Stripe\StripeObject $sofort
- * @property \Stripe\StripeObject $source_order
+ * @property null|\Stripe\StripeObject $p24
+ * @property null|\Stripe\StripeObject $receiver
+ * @property null|\Stripe\StripeObject $redirect
+ * @property null|\Stripe\StripeObject $sepa_credit_transfer
+ * @property null|\Stripe\StripeObject $sepa_debit
+ * @property null|\Stripe\StripeObject $sofort
+ * @property null|\Stripe\StripeObject $source_order
* @property null|string $statement_descriptor Extra information about a source. This will appear on your customer's statement every time you charge the source.
* @property string $status The status of the source, one of canceled, chargeable, consumed, failed, or pending. Only chargeable sources can be used to create a charge.
- * @property \Stripe\StripeObject $three_d_secure
+ * @property null|\Stripe\StripeObject $three_d_secure
* @property string $type The type of the source. The type is a payment method, one of ach_credit_transfer, ach_debit, alipay, bancontact, card, card_present, eps, giropay, ideal, multibanco, klarna, p24, sepa_debit, sofort, three_d_secure, or wechat. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method used.
* @property null|string $usage Either reusable or single_use. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
- * @property \Stripe\StripeObject $wechat
+ * @property null|\Stripe\StripeObject $wechat
*/
class Source extends ApiResource
{
const OBJECT_NAME = 'source';
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
use ApiOperations\Update;
+ const ALLOW_REDISPLAY_ALWAYS = 'always';
+ const ALLOW_REDISPLAY_LIMITED = 'limited';
+ const ALLOW_REDISPLAY_UNSPECIFIED = 'unspecified';
+
const FLOW_CODE_VERIFICATION = 'code_verification';
const FLOW_NONE = 'none';
const FLOW_RECEIVER = 'receiver';
@@ -77,9 +77,101 @@ class Source extends ApiResource
const STATUS_FAILED = 'failed';
const STATUS_PENDING = 'pending';
+ const TYPE_ACH_CREDIT_TRANSFER = 'ach_credit_transfer';
+ const TYPE_ACH_DEBIT = 'ach_debit';
+ const TYPE_ACSS_DEBIT = 'acss_debit';
+ const TYPE_ALIPAY = 'alipay';
+ const TYPE_AU_BECS_DEBIT = 'au_becs_debit';
+ const TYPE_BANCONTACT = 'bancontact';
+ const TYPE_CARD = 'card';
+ const TYPE_CARD_PRESENT = 'card_present';
+ const TYPE_EPS = 'eps';
+ const TYPE_GIROPAY = 'giropay';
+ const TYPE_IDEAL = 'ideal';
+ const TYPE_KLARNA = 'klarna';
+ const TYPE_MULTIBANCO = 'multibanco';
+ const TYPE_P24 = 'p24';
+ const TYPE_SEPA_CREDIT_TRANSFER = 'sepa_credit_transfer';
+ const TYPE_SEPA_DEBIT = 'sepa_debit';
+ const TYPE_SOFORT = 'sofort';
+ const TYPE_THREE_D_SECURE = 'three_d_secure';
+ const TYPE_WECHAT = 'wechat';
+
const USAGE_REUSABLE = 'reusable';
const USAGE_SINGLE_USE = 'single_use';
+ /**
+ * Creates a new source object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Source the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Retrieves an existing source object. Supply the unique source ID from a source
+ * creation request and Stripe will return the corresponding up-to-date source
+ * object information.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Source
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified source by setting the values of the parameters passed. Any
+ * parameters not provided will be left unchanged.
+ *
+ * This request accepts the metadata and owner as
+ * arguments. It is also possible to update type specific information for selected
+ * payment methods. Please refer to our payment method
+ * guides for more detail.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Source the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
use ApiOperations\NestedResource;
/**
@@ -128,7 +220,7 @@ class Source extends ApiResource
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
- * @return \Stripe\Collection<\Stripe\SourceTransaction> list of SourceTransactions
+ * @return \Stripe\Collection<\Stripe\SourceTransaction> list of source transactions
*/
public static function allSourceTransactions($id, $params = null, $opts = null)
{
diff --git a/plugins/stripe-php/lib/SourceMandateNotification.php b/plugins/stripe-php/lib/SourceMandateNotification.php
new file mode 100644
index 00000000..11960527
--- /dev/null
+++ b/plugins/stripe-php/lib/SourceMandateNotification.php
@@ -0,0 +1,28 @@
+debit_initiated.
+ * @property null|\Stripe\StripeObject $bacs_debit
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $reason The reason of the mandate notification. Valid reasons are mandate_confirmed or debit_initiated.
+ * @property null|\Stripe\StripeObject $sepa_debit
+ * @property \Stripe\Source $source Source objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a Card object: once chargeable, they can be charged, or can be attached to customers.
Stripe doesn't recommend using the deprecated Sources API. We recommend that you adopt the PaymentMethods API. This newer API provides access to our latest features and payment method types.
Related guides: Sources API and Sources & Customers.
+ * @property string $status The status of the mandate notification. Valid statuses arepending or submitted.
+ * @property string $type The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as three_d_secure.
+ */
+class SourceMandateNotification extends ApiResource
+{
+ const OBJECT_NAME = 'source_mandate_notification';
+}
diff --git a/plugins/stripe-php/lib/SourceTransaction.php b/plugins/stripe-php/lib/SourceTransaction.php
new file mode 100644
index 00000000..38c218e0
--- /dev/null
+++ b/plugins/stripe-php/lib/SourceTransaction.php
@@ -0,0 +1,48 @@
+ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|\Stripe\StripeObject $gbp_credit_transfer
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $paper_check
+ * @property null|\Stripe\StripeObject $sepa_credit_transfer
+ * @property string $source The ID of the source this transaction is attached to.
+ * @property string $status The status of the transaction, one of succeeded, pending, or failed.
+ * @property string $type The type of source this transaction is attached to.
+ */
+class SourceTransaction extends ApiResource
+{
+ const OBJECT_NAME = 'source_transaction';
+
+ const TYPE_ACH_CREDIT_TRANSFER = 'ach_credit_transfer';
+ const TYPE_ACH_DEBIT = 'ach_debit';
+ const TYPE_ALIPAY = 'alipay';
+ const TYPE_BANCONTACT = 'bancontact';
+ const TYPE_CARD = 'card';
+ const TYPE_CARD_PRESENT = 'card_present';
+ const TYPE_EPS = 'eps';
+ const TYPE_GIROPAY = 'giropay';
+ const TYPE_IDEAL = 'ideal';
+ const TYPE_KLARNA = 'klarna';
+ const TYPE_MULTIBANCO = 'multibanco';
+ const TYPE_P24 = 'p24';
+ const TYPE_SEPA_DEBIT = 'sepa_debit';
+ const TYPE_SOFORT = 'sofort';
+ const TYPE_THREE_D_SECURE = 'three_d_secure';
+ const TYPE_WECHAT = 'wechat';
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Stripe.php b/plugins/stripe-php/lib/Stripe.php
similarity index 91%
rename from plugins/stripe-php-10.5.0/lib/Stripe.php
rename to plugins/stripe-php/lib/Stripe.php
index b11bf4f8..14285a5e 100644
--- a/plugins/stripe-php-10.5.0/lib/Stripe.php
+++ b/plugins/stripe-php/lib/Stripe.php
@@ -22,8 +22,8 @@ class Stripe
/** @var string The base URL for the Stripe API uploads endpoint. */
public static $apiUploadBase = 'https://files.stripe.com';
- /** @var null|string The version of the Stripe API to use for requests. */
- public static $apiVersion = null;
+ /** @var string The version of the Stripe API to use for requests. */
+ public static $apiVersion = \Stripe\Util\ApiVersion::CURRENT;
/** @var null|string The account ID for connected accounts requests. */
public static $accountId = null;
@@ -43,12 +43,18 @@ class Stripe
*/
public static $logger = null;
+ // this is set higher (to `2`) in all other SDKs, but PHP gets a special exception
+ // because PHP scripts are run as short one-offs rather than long-lived servers.
+ // We didn't want to risk messing up integrations by setting a higher default
+ // since that would have worse side effects than other more long-running languages.
/** @var int Maximum number of request retries */
public static $maxNetworkRetries = 0;
/** @var bool Whether client telemetry is enabled. Defaults to true. */
public static $enableTelemetry = true;
+ // this is 5s in other languages
+ // see note on `maxNetworkRetries` for more info
/** @var float Maximum delay between retries, in seconds */
private static $maxNetworkRetryDelay = 2.0;
@@ -58,7 +64,7 @@ class Stripe
/** @var float Initial delay between retries, in seconds */
private static $initialNetworkRetryDelay = 0.5;
- const VERSION = '10.5.0';
+ const VERSION = '16.4.0';
/**
* @return string the API key used for requests
@@ -119,8 +125,7 @@ class Stripe
}
/**
- * @return string The API version used for requests. null if we're using the
- * latest version.
+ * @return string the API version used for requests
*/
public static function getApiVersion()
{
diff --git a/plugins/stripe-php-10.5.0/lib/StripeClient.php b/plugins/stripe-php/lib/StripeClient.php
similarity index 76%
rename from plugins/stripe-php-10.5.0/lib/StripeClient.php
rename to plugins/stripe-php/lib/StripeClient.php
index 73522abc..f8c07d4d 100644
--- a/plugins/stripe-php-10.5.0/lib/StripeClient.php
+++ b/plugins/stripe-php/lib/StripeClient.php
@@ -1,41 +1,50 @@
getService($name);
+ }
+
+ public function getService($name)
{
if (null === $this->coreServiceFactory) {
$this->coreServiceFactory = new \Stripe\Service\CoreServiceFactory($this);
}
- return $this->coreServiceFactory->__get($name);
+ return $this->coreServiceFactory->getService($name);
}
}
diff --git a/plugins/stripe-php-10.5.0/lib/StripeClientInterface.php b/plugins/stripe-php/lib/StripeClientInterface.php
similarity index 90%
rename from plugins/stripe-php-10.5.0/lib/StripeClientInterface.php
rename to plugins/stripe-php/lib/StripeClientInterface.php
index d5a8806f..a18308d7 100644
--- a/plugins/stripe-php-10.5.0/lib/StripeClientInterface.php
+++ b/plugins/stripe-php/lib/StripeClientInterface.php
@@ -10,7 +10,7 @@ interface StripeClientInterface extends BaseStripeClientInterface
/**
* Sends a request to Stripe's API.
*
- * @param string $method the HTTP method
+ * @param 'delete'|'get'|'post' $method the HTTP method
* @param string $path the path of the request
* @param array $params the parameters of the request
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
diff --git a/plugins/stripe-php-10.5.0/lib/StripeObject.php b/plugins/stripe-php/lib/StripeObject.php
similarity index 95%
rename from plugins/stripe-php-10.5.0/lib/StripeObject.php
rename to plugins/stripe-php/lib/StripeObject.php
index 844cfebd..7e973755 100644
--- a/plugins/stripe-php-10.5.0/lib/StripeObject.php
+++ b/plugins/stripe-php/lib/StripeObject.php
@@ -4,6 +4,8 @@ namespace Stripe;
/**
* Class StripeObject.
+ *
+ * @property null|string $id
*/
class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
{
@@ -177,11 +179,11 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
$class = static::class;
$attrs = \implode(', ', \array_keys($this->_values));
$message = "Stripe Notice: Undefined property of {$class} instance: {$k}. "
- . "HINT: The {$k} attribute was set in the past, however. "
- . 'It was then wiped when refreshing the object '
- . "with the result returned by Stripe's API, "
- . 'probably as a result of a save(). The attributes currently '
- . "available on this object are: {$attrs}";
+ . "HINT: The {$k} attribute was set in the past, however. "
+ . 'It was then wiped when refreshing the object '
+ . "with the result returned by Stripe's API, "
+ . 'probably as a result of a save(). The attributes currently '
+ . "available on this object are: {$attrs}";
Stripe::getLogger()->error($message);
return $nullval;
@@ -264,13 +266,14 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
*
* @param array $values
* @param null|array|string|Util\RequestOptions $opts
+ * @param 'v1'|'v2' $apiMode
*
* @return static the object constructed from the given values
*/
- public static function constructFrom($values, $opts = null)
+ public static function constructFrom($values, $opts = null, $apiMode = 'v1')
{
$obj = new static(isset($values['id']) ? $values['id'] : null);
- $obj->refreshFrom($values, $opts);
+ $obj->refreshFrom($values, $opts, false, $apiMode);
return $obj;
}
@@ -281,8 +284,9 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
* @param array $values
* @param null|array|string|Util\RequestOptions $opts
* @param bool $partial defaults to false
+ * @param 'v1'|'v2' $apiMode
*/
- public function refreshFrom($values, $opts, $partial = false)
+ public function refreshFrom($values, $opts, $partial = false, $apiMode = 'v1')
{
$this->_opts = Util\RequestOptions::parse($opts);
@@ -305,7 +309,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
unset($this->{$k});
}
- $this->updateAttributes($values, $opts, false);
+ $this->updateAttributes($values, $opts, false, $apiMode);
foreach ($values as $k => $v) {
$this->_transientValues->discard($k);
$this->_unsavedValues->discard($k);
@@ -318,8 +322,9 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
* @param array $values
* @param null|array|string|Util\RequestOptions $opts
* @param bool $dirty defaults to true
+ * @param 'v1'|'v2' $apiMode
*/
- public function updateAttributes($values, $opts = null, $dirty = true)
+ public function updateAttributes($values, $opts = null, $dirty = true, $apiMode = 'v1')
{
foreach ($values as $k => $v) {
// Special-case metadata to always be cast as a StripeObject
@@ -327,9 +332,9 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
// not differentiate between lists and hashes, and we consider
// empty arrays to be lists.
if (('metadata' === $k) && (\is_array($v))) {
- $this->_values[$k] = StripeObject::constructFrom($v, $opts);
+ $this->_values[$k] = StripeObject::constructFrom($v, $opts, $apiMode);
} else {
- $this->_values[$k] = Util\Util::convertToStripeObject($v, $opts);
+ $this->_values[$k] = Util\Util::convertToStripeObject($v, $opts, $apiMode);
}
if ($dirty) {
$this->dirtyValue($this->_values[$k]);
@@ -417,8 +422,8 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
throw new Exception\InvalidArgumentException(
"Cannot save property `{$key}` containing an API resource of type " .
- \get_class($value) . ". It doesn't appear to be persisted and is " .
- 'not marked as `saveWithParent`.'
+ \get_class($value) . ". It doesn't appear to be persisted and is " .
+ 'not marked as `saveWithParent`.'
);
}
if (\is_array($value)) {
diff --git a/plugins/stripe-php-10.5.0/lib/StripeStreamingClientInterface.php b/plugins/stripe-php/lib/StripeStreamingClientInterface.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/StripeStreamingClientInterface.php
rename to plugins/stripe-php/lib/StripeStreamingClientInterface.php
diff --git a/plugins/stripe-php/lib/Subscription.php b/plugins/stripe-php/lib/Subscription.php
new file mode 100644
index 00000000..6d1dc8ca
--- /dev/null
+++ b/plugins/stripe-php/lib/Subscription.php
@@ -0,0 +1,309 @@
+Creating subscriptions
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|string|\Stripe\Application $application ID of the Connect Application that created the subscription.
+ * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
+ * @property \Stripe\StripeObject $automatic_tax
+ * @property int $billing_cycle_anchor The reference point that aligns future billing cycle dates. It sets the day of week for week intervals, the day of month for month and year intervals, and the month of year for year intervals. The timestamp is in UTC format.
+ * @property null|\Stripe\StripeObject $billing_cycle_anchor_config The fixed values used to calculate the billing_cycle_anchor.
+ * @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
+ * @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled
+ * @property bool $cancel_at_period_end Whether this subscription will (if status=active) or did (if status=canceled) cancel at the end of the current billing period.
+ * @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with cancel_at_period_end, canceled_at will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
+ * @property null|\Stripe\StripeObject $cancellation_details Details about why this subscription was cancelled
+ * @property string $collection_method Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property int $current_period_end End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
+ * @property int $current_period_start Start of the current period that the subscription has been invoiced for.
+ * @property string|\Stripe\Customer $customer ID of the customer who owns the subscription.
+ * @property null|int $days_until_due Number of days a customer has to pay invoices generated by this subscription. This value will be null for subscriptions where collection_method=charge_automatically.
+ * @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.
+ * @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If default_payment_method is also set, default_payment_method will take precedence. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.
+ * @property null|\Stripe\TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have tax_rates set. Invoices created will have their default_tax_rates populated from the subscription.
+ * @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 null|\Stripe\Discount $discount Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use discounts instead.
+ * @property (string|\Stripe\Discount)[] $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 \Stripe\StripeObject $invoice_settings
+ * @property \Stripe\Collection<\Stripe\SubscriptionItem> $items List of subscription items, each with an attached price.
+ * @property null|string|\Stripe\Invoice $latest_invoice The most recent invoice this subscription has generated.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at pending_invoice_item_interval.
+ * @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.
+ * @property null|\Stripe\StripeObject $pause_collection If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to paused. Learn more about pausing collection.
+ * @property null|\Stripe\StripeObject $payment_settings Payment settings passed on to invoices created by the subscription.
+ * @property null|\Stripe\StripeObject $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval.
+ * @property null|string|\Stripe\SetupIntent $pending_setup_intent You can use this SetupIntent to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the SCA Migration Guide.
+ * @property null|\Stripe\StripeObject $pending_update If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid.
+ * @property null|string|\Stripe\SubscriptionSchedule $schedule The schedule attached to the subscription
+ * @property int $start_date Date when the subscription was first created. The date might differ from the created date due to backdating.
+ * @property string $status Possible values are incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid, or paused.
For collection_method=charge_automatically a subscription moves into incomplete if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active status. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal status, the open invoice will be voided and no further invoices will be generated.
A subscription that is currently in a trial period is trialing and moves to active when the trial period is over.
A subscription can only enter a paused status when a trial ends without a payment method. A paused subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The paused status is different from pausing collection, which still generates invoices and leaves the subscription's status unchanged.
If subscription collection_method=charge_automatically, it becomes past_due when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become canceled or unpaid (depending on your subscriptions settings).
If subscription collection_method=send_invoice it becomes past_due when its invoice is not paid by the due date, and canceled or unpaid if it is still not paid by an additional deadline after that. Note that when a subscription has a status of unpaid, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
collection_method=charge_automatically, the first invoice is
+ * finalized as part of the request. The payment_behavior parameter
+ * determines the exact behavior of the initial payment.
+ *
+ * To start subscriptions where the first invoice always begins in a
+ * draft status, use subscription
+ * schedules instead. Schedules provide the flexibility to model more complex
+ * billing configurations that change over time.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Subscription the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * By default, returns a list of subscriptions that have not been canceled. In
+ * order to list canceled subscriptions, specify status=canceled.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Subscription> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the subscription with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Subscription
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates an existing subscription to match the specified parameters. When
+ * changing prices or quantities, we optionally prorate the price we charge next
+ * month to make up for any price changes. To preview how the proration is
+ * calculated, use the create
+ * preview endpoint.
+ *
+ * By default, we prorate subscription changes. For example, if a customer signs up
+ * on May 1 for a proration_behavior as always_invoice to create
+ * prorations, automatically invoice the customer for those proration adjustments,
+ * and attempt to collect payment. If you pass create_prorations, the
+ * prorations are created but not automatically invoiced. If you want to bill the
+ * customer for the prorations before the subscription’s renewal date, you need to
+ * manually invoice the customer.
+ *
+ * If you don’t want to prorate, set the proration_behavior option to
+ * none. With this option, the customer is billed
+ * proration_behavior to none when
+ * switching between different billing intervals (for example, from monthly to
+ * yearly), we don’t generate any credits for the old subscription’s unused time.
+ * We still reset the billing date and bill immediately for the new subscription.
+ *
+ * Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently
+ * changing quantity, consider integrating usage-based billing instead.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Subscription the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ use ApiOperations\Delete {
+ delete as protected _delete;
+ }
+
+ public static function getSavedNestedResources()
+ {
+ static $savedNestedResources = null;
+ if (null === $savedNestedResources) {
+ $savedNestedResources = new Util\Set([
+ 'source',
+ ]);
+ }
+
+ return $savedNestedResources;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Subscription the updated subscription
+ */
+ public function deleteDiscount($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/discount';
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom(['discount' => null], $opts, true);
+
+ return $this;
+ }
+
+ const PAYMENT_BEHAVIOR_ALLOW_INCOMPLETE = 'allow_incomplete';
+ const PAYMENT_BEHAVIOR_DEFAULT_INCOMPLETE = 'default_incomplete';
+ const PAYMENT_BEHAVIOR_ERROR_IF_INCOMPLETE = 'error_if_incomplete';
+ const PAYMENT_BEHAVIOR_PENDING_IF_INCOMPLETE = 'pending_if_incomplete';
+
+ const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice';
+ const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations';
+ const PRORATION_BEHAVIOR_NONE = 'none';
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Subscription the canceled subscription
+ */
+ public function cancel($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Subscription the resumed subscription
+ */
+ public function resume($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/resume';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SearchResult<\Stripe\Subscription> the subscription search results
+ */
+ public static function search($params = null, $opts = null)
+ {
+ $url = '/v1/subscriptions/search';
+
+ return static::_requestPage($url, \Stripe\SearchResult::class, $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/SubscriptionItem.php b/plugins/stripe-php/lib/SubscriptionItem.php
similarity index 53%
rename from plugins/stripe-php-10.5.0/lib/SubscriptionItem.php
rename to plugins/stripe-php/lib/SubscriptionItem.php
index 79ea5989..fe74493c 100644
--- a/plugins/stripe-php-10.5.0/lib/SubscriptionItem.php
+++ b/plugins/stripe-php/lib/SubscriptionItem.php
@@ -5,17 +5,18 @@
namespace Stripe;
/**
- * Subscription items allow you to create customer subscriptions with more than one
- * plan, making it easy to represent complex billing relationships.
+ * Subscription items allow you to create customer subscriptions with more than
+ * one plan, making it easy to represent complex billing relationships.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property (string|\Stripe\Discount)[] $discounts The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use expand[]=discounts to expand each discount.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property \Stripe\Plan $plan You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.
Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
Related guides: Set up a subscription and more about products and prices.
* @property \Stripe\Price $pricePrices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
Related guides: Set up a subscription, create an invoice, and more about products and prices.
- * @property int $quantity The quantity of the plan to which the customer should be subscribed. + * @property null|int $quantity The quantity of the plan to which the customer should be subscribed. * @property string $subscription Thesubscription this subscription_item belongs to.
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item.
*/
@@ -23,17 +24,117 @@ class SubscriptionItem extends ApiResource
{
const OBJECT_NAME = 'subscription_item';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Delete;
use ApiOperations\NestedResource;
- use ApiOperations\Retrieve;
use ApiOperations\Update;
+ /**
+ * Adds a new item to an existing subscription. No existing items will be changed
+ * or replaced.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SubscriptionItem the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deletes an item from the subscription. Removing a subscription item from a
+ * subscription will not cancel the subscription.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SubscriptionItem the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of your subscription items for a given subscription.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\SubscriptionItem> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the subscription item with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SubscriptionItem
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the plan or quantity of an item on a current subscription.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SubscriptionItem the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
const PATH_USAGE_RECORDS = '/usage_records';
/**
- * @param null|string $id the ID of the subscription item on which to create the usage record
+ * @param string $id the ID of the subscription item on which to create the usage record
* @param null|array $params
* @param null|array|string $opts
*
@@ -45,7 +146,6 @@ class SubscriptionItem extends ApiResource
{
return self::_createNestedResource($id, static::PATH_USAGE_RECORDS, $params, $opts);
}
-
const PATH_USAGE_RECORD_SUMMARIES = '/usage_record_summaries';
/**
diff --git a/plugins/stripe-php-10.5.0/lib/SubscriptionSchedule.php b/plugins/stripe-php/lib/SubscriptionSchedule.php
similarity index 52%
rename from plugins/stripe-php-10.5.0/lib/SubscriptionSchedule.php
rename to plugins/stripe-php/lib/SubscriptionSchedule.php
index cc001170..24220e58 100644
--- a/plugins/stripe-php-10.5.0/lib/SubscriptionSchedule.php
+++ b/plugins/stripe-php/lib/SubscriptionSchedule.php
@@ -5,23 +5,20 @@
namespace Stripe;
/**
- * A subscription schedule allows you to create and manage the lifecycle of a
- * subscription by predefining expected changes.
+ * A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
*
- * Related guide: Subscription
- * Schedules.
+ * Related guide: Subscription schedules
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the schedule.
+ * @property null|string|\Stripe\Application $application ID of the Connect Application that created the schedule.
* @property null|int $canceled_at Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
* @property null|int $completed_at Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|\Stripe\StripeObject $current_phase Object representing the start and end dates for the current phase of the subscription schedule, if it is active.
* @property string|\Stripe\Customer $customer ID of the customer who owns the subscription schedule.
* @property \Stripe\StripeObject $default_settings
- * @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends. Possible values are release or cancel with the default being release. release will end the subscription schedule and keep the underlying subscription running.cancel will end the subscription schedule and cancel the underlying subscription.
+ * @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends. Possible values are release or cancel with the default being release. release will end the subscription schedule and keep the underlying subscription running. cancel will end the subscription schedule and cancel the underlying subscription.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property \Stripe\StripeObject[] $phases Configuration for the subscription schedule's phases.
@@ -35,11 +32,103 @@ class SubscriptionSchedule extends ApiResource
{
const OBJECT_NAME = 'subscription_schedule';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
use ApiOperations\Update;
+ const END_BEHAVIOR_CANCEL = 'cancel';
+ const END_BEHAVIOR_NONE = 'none';
+ const END_BEHAVIOR_RELEASE = 'release';
+ const END_BEHAVIOR_RENEW = 'renew';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_CANCELED = 'canceled';
+ const STATUS_COMPLETED = 'completed';
+ const STATUS_NOT_STARTED = 'not_started';
+ const STATUS_RELEASED = 'released';
+
+ /**
+ * Creates a new subscription schedule object. Each customer can have up to 500
+ * active or scheduled subscriptions.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SubscriptionSchedule the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Retrieves the list of your subscription schedules.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\SubscriptionSchedule> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing subscription schedule. You only need to
+ * supply the unique subscription schedule identifier that was returned upon
+ * subscription schedule creation.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SubscriptionSchedule
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates an existing subscription schedule.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\SubscriptionSchedule the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
diff --git a/plugins/stripe-php/lib/Tax/Calculation.php b/plugins/stripe-php/lib/Tax/Calculation.php
new file mode 100644
index 00000000..0e56bfd4
--- /dev/null
+++ b/plugins/stripe-php/lib/Tax/Calculation.php
@@ -0,0 +1,93 @@
+Calculate tax in your custom payment flow
+ *
+ * @property null|string $id Unique identifier for the calculation.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount_total Total amount after taxes in the smallest currency unit.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|string $customer The ID of an existing Customer used for the resource.
+ * @property \Stripe\StripeObject $customer_details
+ * @property null|int $expires_at Timestamp of date at which the tax calculation will expire.
+ * @property null|\Stripe\Collection<\Stripe\Tax\CalculationLineItem> $line_items The list of items the customer is purchasing.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $ship_from_details The details of the ship from location, such as the address.
+ * @property null|\Stripe\StripeObject $shipping_cost The shipping cost details for the calculation.
+ * @property int $tax_amount_exclusive The amount of tax to be collected on top of the line item prices.
+ * @property int $tax_amount_inclusive The amount of tax already included in the line item prices.
+ * @property \Stripe\StripeObject[] $tax_breakdown Breakdown of individual tax amounts that add up to the total.
+ * @property int $tax_date Timestamp of date at which the tax rules and rates in effect applies for the calculation.
+ */
+class Calculation extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'tax.calculation';
+
+ /**
+ * Calculates tax based on the input and returns a Tax Calculation
+ * object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Calculation the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Retrieves a Tax Calculation object, if the calculation hasn’t
+ * expired.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Calculation
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Tax\CalculationLineItem> list of calculation line items
+ */
+ public static function allLineItems($id, $params = null, $opts = null)
+ {
+ $url = static::resourceUrl($id) . '/line_items';
+ list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Tax/CalculationLineItem.php b/plugins/stripe-php/lib/Tax/CalculationLineItem.php
new file mode 100644
index 00000000..70c711e2
--- /dev/null
+++ b/plugins/stripe-php/lib/Tax/CalculationLineItem.php
@@ -0,0 +1,26 @@
+smallest currency unit. If tax_behavior=inclusive, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ * @property int $amount_tax The amount of tax calculated for this line item, in the smallest currency unit.
+ * @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 $product The ID of an existing Product.
+ * @property int $quantity The number of units of the item being purchased. For reversals, this is the quantity reversed.
+ * @property null|string $reference A custom identifier for this line item.
+ * @property string $tax_behavior Specifies whether the amount includes taxes. If tax_behavior=inclusive, then the amount includes taxes.
+ * @property null|\Stripe\StripeObject[] $tax_breakdown Detailed account of taxes relevant to this line item.
+ * @property string $tax_code The tax code ID used for this resource.
+ */
+class CalculationLineItem extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'tax.calculation_line_item';
+
+ const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
+ const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
+}
diff --git a/plugins/stripe-php/lib/Tax/Registration.php b/plugins/stripe-php/lib/Tax/Registration.php
new file mode 100644
index 00000000..2126e1e9
--- /dev/null
+++ b/plugins/stripe-php/lib/Tax/Registration.php
@@ -0,0 +1,117 @@
+Registration lets us know that your business is registered to collect tax on payments within a region, enabling you to automatically collect tax.
+ *
+ * Stripe doesn't register on your behalf with the relevant authorities when you create a Tax Registration object. For more information on how to register to collect tax, see our guide.
+ *
+ * Related guide: Using the Registrations API
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $active_from Time at which the registration becomes active. Measured in seconds since the Unix epoch.
+ * @property string $country Two-letter country code (ISO 3166-1 alpha-2).
+ * @property \Stripe\StripeObject $country_options
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|int $expires_at If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $status The status of the registration. This field is present for convenience and can be deduced from active_from and expires_at.
+ */
+class Registration extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'tax.registration';
+
+ use \Stripe\ApiOperations\Update;
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_EXPIRED = 'expired';
+ const STATUS_SCHEDULED = 'scheduled';
+
+ /**
+ * Creates a new Tax Registration object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Registration the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of Tax Registration objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Tax\Registration> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Returns a Tax Registration object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Registration
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates an existing Tax Registration object.
+ *
+ * A registration cannot be deleted after it has been created. If you wish to end a
+ * registration you may do so by setting expires_at.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Registration the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Tax/Settings.php b/plugins/stripe-php/lib/Tax/Settings.php
new file mode 100644
index 00000000..16dcdc2e
--- /dev/null
+++ b/plugins/stripe-php/lib/Tax/Settings.php
@@ -0,0 +1,86 @@
+Settings to manage configurations used by Stripe Tax calculations.
+ *
+ * Related guide: Using the Settings API
+ *
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property \Stripe\StripeObject $defaults
+ * @property null|\Stripe\StripeObject $head_office The place where your business is located.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $status The status of the Tax Settings.
+ * @property \Stripe\StripeObject $status_details
+ */
+class Settings extends \Stripe\SingletonApiResource
+{
+ const OBJECT_NAME = 'tax.settings';
+
+ const STATUS_ACTIVE = 'active';
+ const STATUS_PENDING = 'pending';
+
+ /**
+ * Retrieves Tax Settings for a merchant.
+ *
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Settings
+ */
+ public static function retrieve($opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static(null, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return static the updated resource
+ */
+ public static function update($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = '/v1/tax/settings';
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return static the saved resource
+ *
+ * @deprecated The `save` method is deprecated and will be removed in a
+ * future major version of the library. Use the static method `update`
+ * on the resource instead.
+ */
+ public function save($opts = null)
+ {
+ $params = $this->serializeParameters();
+ if (\count($params) > 0) {
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('post', $url, $params, $opts, ['save']);
+ $this->refreshFrom($response, $opts);
+ }
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/Tax/Transaction.php b/plugins/stripe-php/lib/Tax/Transaction.php
new file mode 100644
index 00000000..13304b8e
--- /dev/null
+++ b/plugins/stripe-php/lib/Tax/Transaction.php
@@ -0,0 +1,109 @@
+Calculate tax in your custom payment flow
+ *
+ * @property string $id Unique identifier for the transaction.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|string $customer The ID of an existing Customer used for the resource.
+ * @property \Stripe\StripeObject $customer_details
+ * @property null|\Stripe\Collection<\Stripe\Tax\TransactionLineItem> $line_items The tax collected or refunded, by line item.
+ * @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 int $posted_at The Unix timestamp representing when the tax liability is assumed or reduced.
+ * @property string $reference A custom unique identifier, such as 'myOrder_123'.
+ * @property null|\Stripe\StripeObject $reversal If type=reversal, contains information about what was reversed.
+ * @property null|\Stripe\StripeObject $ship_from_details The details of the ship from location, such as the address.
+ * @property null|\Stripe\StripeObject $shipping_cost The shipping cost details for the transaction.
+ * @property int $tax_date Timestamp of date at which the tax rules and rates in effect applies for the calculation.
+ * @property string $type If reversal, this transaction reverses an earlier transaction.
+ */
+class Transaction extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'tax.transaction';
+
+ const TYPE_REVERSAL = 'reversal';
+ const TYPE_TRANSACTION = 'transaction';
+
+ /**
+ * Retrieves a Tax Transaction object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Transaction
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Transaction the created transaction
+ */
+ public static function createFromCalculation($params = null, $opts = null)
+ {
+ $url = static::classUrl() . '/create_from_calculation';
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Tax\Transaction the created transaction
+ */
+ public static function createReversal($params = null, $opts = null)
+ {
+ $url = static::classUrl() . '/create_reversal';
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Tax\TransactionLineItem> list of transaction line items
+ */
+ public static function allLineItems($id, $params = null, $opts = null)
+ {
+ $url = static::resourceUrl($id) . '/line_items';
+ list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Tax/TransactionLineItem.php b/plugins/stripe-php/lib/Tax/TransactionLineItem.php
new file mode 100644
index 00000000..a506c6d8
--- /dev/null
+++ b/plugins/stripe-php/lib/Tax/TransactionLineItem.php
@@ -0,0 +1,31 @@
+smallest currency unit. If tax_behavior=inclusive, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ * @property int $amount_tax The amount of tax calculated for this line item, in the smallest currency unit.
+ * @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|string $product The ID of an existing Product.
+ * @property int $quantity The number of units of the item being purchased. For reversals, this is the quantity reversed.
+ * @property string $reference A custom identifier for this line item in the transaction.
+ * @property null|\Stripe\StripeObject $reversal If type=reversal, contains information about what was reversed.
+ * @property string $tax_behavior Specifies whether the amount includes taxes. If tax_behavior=inclusive, then the amount includes taxes.
+ * @property string $tax_code The tax code ID used for this resource.
+ * @property string $type If reversal, this line item reverses an earlier transaction.
+ */
+class TransactionLineItem extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'tax.transaction_line_item';
+
+ const TAX_BEHAVIOR_EXCLUSIVE = 'exclusive';
+ const TAX_BEHAVIOR_INCLUSIVE = 'inclusive';
+
+ const TYPE_REVERSAL = 'reversal';
+ const TYPE_TRANSACTION = 'transaction';
+}
diff --git a/plugins/stripe-php/lib/TaxCode.php b/plugins/stripe-php/lib/TaxCode.php
new file mode 100644
index 00000000..f57caaad
--- /dev/null
+++ b/plugins/stripe-php/lib/TaxCode.php
@@ -0,0 +1,56 @@
+Tax codes classify goods and services for tax purposes.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property string $description A detailed description of which types of products the tax code represents.
+ * @property string $name A short name for the tax code.
+ */
+class TaxCode extends ApiResource
+{
+ const OBJECT_NAME = 'tax_code';
+
+ /**
+ * A list of all tax codes
+ * available to add to Products in order to allow specific tax calculations.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\TaxCode> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing tax code. Supply the unique tax code ID and
+ * Stripe will return the corresponding tax code information.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxCode
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php/lib/TaxDeductedAtSource.php b/plugins/stripe-php/lib/TaxDeductedAtSource.php
new file mode 100644
index 00000000..93bb8a34
--- /dev/null
+++ b/plugins/stripe-php/lib/TaxDeductedAtSource.php
@@ -0,0 +1,17 @@
+customer or account.
+ * Customer and account tax IDs get displayed on related invoices and credit notes.
+ *
+ * Related guides: Customer tax identification numbers, Account tax IDs
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|string $country Two-letter ISO code representing the country of the tax ID.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string|\Stripe\Customer $customer ID of the customer.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $owner The account or customer the tax ID belongs to.
+ * @property string $type Type of the tax ID, one of ad_nrt, ae_trn, al_tin, am_tin, ao_tin, ar_cuit, au_abn, au_arn, ba_tin, bb_tin, bg_uic, bh_vat, bo_tin, br_cnpj, br_cpf, bs_tin, by_tin, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, cd_nif, ch_uid, ch_vat, cl_tin, cn_tin, co_nit, cr_tin, de_stn, do_rcn, ec_ruc, eg_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, gn_nif, hk_br, hr_oib, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kh_tin, kr_brn, kz_bin, li_uid, li_vat, ma_vat, md_vat, me_pib, mk_vat, mr_nif, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, np_pan, nz_gst, om_vat, pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sn_ninea, sr_fin, sv_nit, th_vat, tj_tin, tr_tin, tw_vat, tz_vat, ua_vat, ug_tin, us_ein, uy_ruc, uz_tin, uz_vat, ve_rif, vn_tin, za_vat, zm_tin, or zw_tin. Note that some legacy tax IDs have type unknown
+ * @property string $value Value of the tax ID.
+ * @property null|\Stripe\StripeObject $verification Tax ID verification information.
+ */
+class TaxId extends ApiResource
+{
+ const OBJECT_NAME = 'tax_id';
+
+ const TYPE_AD_NRT = 'ad_nrt';
+ const TYPE_AE_TRN = 'ae_trn';
+ const TYPE_AL_TIN = 'al_tin';
+ const TYPE_AM_TIN = 'am_tin';
+ const TYPE_AO_TIN = 'ao_tin';
+ const TYPE_AR_CUIT = 'ar_cuit';
+ const TYPE_AU_ABN = 'au_abn';
+ const TYPE_AU_ARN = 'au_arn';
+ const TYPE_BA_TIN = 'ba_tin';
+ const TYPE_BB_TIN = 'bb_tin';
+ const TYPE_BG_UIC = 'bg_uic';
+ const TYPE_BH_VAT = 'bh_vat';
+ const TYPE_BO_TIN = 'bo_tin';
+ const TYPE_BR_CNPJ = 'br_cnpj';
+ const TYPE_BR_CPF = 'br_cpf';
+ const TYPE_BS_TIN = 'bs_tin';
+ const TYPE_BY_TIN = 'by_tin';
+ const TYPE_CA_BN = 'ca_bn';
+ const TYPE_CA_GST_HST = 'ca_gst_hst';
+ const TYPE_CA_PST_BC = 'ca_pst_bc';
+ const TYPE_CA_PST_MB = 'ca_pst_mb';
+ const TYPE_CA_PST_SK = 'ca_pst_sk';
+ const TYPE_CA_QST = 'ca_qst';
+ const TYPE_CD_NIF = 'cd_nif';
+ const TYPE_CH_UID = 'ch_uid';
+ const TYPE_CH_VAT = 'ch_vat';
+ const TYPE_CL_TIN = 'cl_tin';
+ const TYPE_CN_TIN = 'cn_tin';
+ const TYPE_CO_NIT = 'co_nit';
+ const TYPE_CR_TIN = 'cr_tin';
+ const TYPE_DE_STN = 'de_stn';
+ const TYPE_DO_RCN = 'do_rcn';
+ const TYPE_EC_RUC = 'ec_ruc';
+ const TYPE_EG_TIN = 'eg_tin';
+ const TYPE_ES_CIF = 'es_cif';
+ const TYPE_EU_OSS_VAT = 'eu_oss_vat';
+ const TYPE_EU_VAT = 'eu_vat';
+ const TYPE_GB_VAT = 'gb_vat';
+ const TYPE_GE_VAT = 'ge_vat';
+ const TYPE_GN_NIF = 'gn_nif';
+ const TYPE_HK_BR = 'hk_br';
+ const TYPE_HR_OIB = 'hr_oib';
+ const TYPE_HU_TIN = 'hu_tin';
+ const TYPE_ID_NPWP = 'id_npwp';
+ const TYPE_IL_VAT = 'il_vat';
+ const TYPE_IN_GST = 'in_gst';
+ const TYPE_IS_VAT = 'is_vat';
+ const TYPE_JP_CN = 'jp_cn';
+ const TYPE_JP_RN = 'jp_rn';
+ const TYPE_JP_TRN = 'jp_trn';
+ const TYPE_KE_PIN = 'ke_pin';
+ const TYPE_KH_TIN = 'kh_tin';
+ const TYPE_KR_BRN = 'kr_brn';
+ const TYPE_KZ_BIN = 'kz_bin';
+ const TYPE_LI_UID = 'li_uid';
+ const TYPE_LI_VAT = 'li_vat';
+ const TYPE_MA_VAT = 'ma_vat';
+ const TYPE_MD_VAT = 'md_vat';
+ const TYPE_ME_PIB = 'me_pib';
+ const TYPE_MK_VAT = 'mk_vat';
+ const TYPE_MR_NIF = 'mr_nif';
+ const TYPE_MX_RFC = 'mx_rfc';
+ const TYPE_MY_FRP = 'my_frp';
+ const TYPE_MY_ITN = 'my_itn';
+ const TYPE_MY_SST = 'my_sst';
+ const TYPE_NG_TIN = 'ng_tin';
+ const TYPE_NO_VAT = 'no_vat';
+ const TYPE_NO_VOEC = 'no_voec';
+ const TYPE_NP_PAN = 'np_pan';
+ const TYPE_NZ_GST = 'nz_gst';
+ const TYPE_OM_VAT = 'om_vat';
+ const TYPE_PE_RUC = 'pe_ruc';
+ const TYPE_PH_TIN = 'ph_tin';
+ const TYPE_RO_TIN = 'ro_tin';
+ const TYPE_RS_PIB = 'rs_pib';
+ const TYPE_RU_INN = 'ru_inn';
+ const TYPE_RU_KPP = 'ru_kpp';
+ const TYPE_SA_VAT = 'sa_vat';
+ const TYPE_SG_GST = 'sg_gst';
+ const TYPE_SG_UEN = 'sg_uen';
+ const TYPE_SI_TIN = 'si_tin';
+ const TYPE_SN_NINEA = 'sn_ninea';
+ const TYPE_SR_FIN = 'sr_fin';
+ const TYPE_SV_NIT = 'sv_nit';
+ const TYPE_TH_VAT = 'th_vat';
+ const TYPE_TJ_TIN = 'tj_tin';
+ const TYPE_TR_TIN = 'tr_tin';
+ const TYPE_TW_VAT = 'tw_vat';
+ const TYPE_TZ_VAT = 'tz_vat';
+ const TYPE_UA_VAT = 'ua_vat';
+ const TYPE_UG_TIN = 'ug_tin';
+ const TYPE_UNKNOWN = 'unknown';
+ const TYPE_US_EIN = 'us_ein';
+ const TYPE_UY_RUC = 'uy_ruc';
+ const TYPE_UZ_TIN = 'uz_tin';
+ const TYPE_UZ_VAT = 'uz_vat';
+ const TYPE_VE_RIF = 've_rif';
+ const TYPE_VN_TIN = 'vn_tin';
+ const TYPE_ZA_VAT = 'za_vat';
+ const TYPE_ZM_TIN = 'zm_tin';
+ const TYPE_ZW_TIN = 'zw_tin';
+
+ /**
+ * Creates a new account or customer tax_id object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxId the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deletes an existing account or customer tax_id object.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxId the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of tax IDs.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\TaxId> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves an account or customer tax_id object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxId
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ const VERIFICATION_STATUS_PENDING = 'pending';
+ const VERIFICATION_STATUS_UNAVAILABLE = 'unavailable';
+ const VERIFICATION_STATUS_UNVERIFIED = 'unverified';
+ const VERIFICATION_STATUS_VERIFIED = 'verified';
+}
diff --git a/plugins/stripe-php/lib/TaxRate.php b/plugins/stripe-php/lib/TaxRate.php
new file mode 100644
index 00000000..fc564ff1
--- /dev/null
+++ b/plugins/stripe-php/lib/TaxRate.php
@@ -0,0 +1,143 @@
+invoices, subscriptions and Checkout Sessions to collect tax.
+ *
+ * Related guide: Tax rates
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property bool $active Defaults to true. When set to false, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ * @property null|string $country Two-letter country code (ISO 3166-1 alpha-2).
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string $description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ * @property string $display_name The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
+ * @property null|float $effective_percentage Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction.
+ * @property null|\Stripe\StripeObject $flat_amount The amount of the tax rate when the rate_type is flat_amount. Tax rates with rate_type percentage can vary based on the transaction, resulting in this field being null. This field exposes the amount and currency of the flat tax rate.
+ * @property bool $inclusive This specifies if the tax rate is inclusive or exclusive.
+ * @property null|string $jurisdiction The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ * @property null|string $jurisdiction_level The level of the jurisdiction that imposes this tax rate. Will be null for manually defined tax rates.
+ * @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 float $percentage Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.
+ * @property null|string $rate_type Indicates the type of tax rate applied to the taxable amount. This value can be null when no tax applies to the location.
+ * @property null|string $state ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States.
+ * @property null|string $tax_type The high-level tax type, such as vat or sales_tax.
+ */
+class TaxRate extends ApiResource
+{
+ const OBJECT_NAME = 'tax_rate';
+
+ use ApiOperations\Update;
+
+ const JURISDICTION_LEVEL_CITY = 'city';
+ const JURISDICTION_LEVEL_COUNTRY = 'country';
+ const JURISDICTION_LEVEL_COUNTY = 'county';
+ const JURISDICTION_LEVEL_DISTRICT = 'district';
+ const JURISDICTION_LEVEL_MULTIPLE = 'multiple';
+ const JURISDICTION_LEVEL_STATE = 'state';
+
+ const RATE_TYPE_FLAT_AMOUNT = 'flat_amount';
+ const RATE_TYPE_PERCENTAGE = 'percentage';
+
+ const TAX_TYPE_AMUSEMENT_TAX = 'amusement_tax';
+ const TAX_TYPE_COMMUNICATIONS_TAX = 'communications_tax';
+ const TAX_TYPE_GST = 'gst';
+ const TAX_TYPE_HST = 'hst';
+ const TAX_TYPE_IGST = 'igst';
+ const TAX_TYPE_JCT = 'jct';
+ const TAX_TYPE_LEASE_TAX = 'lease_tax';
+ const TAX_TYPE_PST = 'pst';
+ const TAX_TYPE_QST = 'qst';
+ const TAX_TYPE_RETAIL_DELIVERY_FEE = 'retail_delivery_fee';
+ const TAX_TYPE_RST = 'rst';
+ const TAX_TYPE_SALES_TAX = 'sales_tax';
+ const TAX_TYPE_SERVICE_TAX = 'service_tax';
+ const TAX_TYPE_VAT = 'vat';
+
+ /**
+ * Creates a new tax rate.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxRate the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of your tax rates. Tax rates are returned sorted by creation
+ * date, with the most recently created tax rates appearing first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\TaxRate> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a tax rate with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxRate
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates an existing tax rate.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TaxRate the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Terminal/Configuration.php b/plugins/stripe-php/lib/Terminal/Configuration.php
new file mode 100644
index 00000000..66a6e667
--- /dev/null
+++ b/plugins/stripe-php/lib/Terminal/Configuration.php
@@ -0,0 +1,129 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|string $name String indicating the name of the Configuration object, set by the user
+ * @property null|\Stripe\StripeObject $offline
+ * @property null|\Stripe\StripeObject $reboot_window
+ * @property null|\Stripe\StripeObject $stripe_s700
+ * @property null|\Stripe\StripeObject $tipping
+ * @property null|\Stripe\StripeObject $verifone_p400
+ */
+class Configuration extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'terminal.configuration';
+
+ use \Stripe\ApiOperations\Update;
+
+ /**
+ * Creates a new Configuration object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Configuration the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deletes a Configuration object.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Configuration the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of Configuration objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Terminal\Configuration> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a Configuration object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Configuration
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a new Configuration object.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Configuration the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Terminal/ConnectionToken.php b/plugins/stripe-php/lib/Terminal/ConnectionToken.php
new file mode 100644
index 00000000..276ec2ad
--- /dev/null
+++ b/plugins/stripe-php/lib/Terminal/ConnectionToken.php
@@ -0,0 +1,43 @@
+Fleet management
+ *
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|string $location The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens.
+ * @property string $secret Your application should pass this token to the Stripe Terminal SDK.
+ */
+class ConnectionToken extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'terminal.connection_token';
+
+ /**
+ * To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived
+ * connection token from Stripe, proxied through your server. On your backend, add
+ * an endpoint that creates and returns a connection token.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\ConnectionToken the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Terminal/Location.php b/plugins/stripe-php/lib/Terminal/Location.php
new file mode 100644
index 00000000..11a6f0f0
--- /dev/null
+++ b/plugins/stripe-php/lib/Terminal/Location.php
@@ -0,0 +1,130 @@
+Fleet management
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property \Stripe\StripeObject $address
+ * @property null|string $configuration_overrides The ID of a configuration that will be used to customize all readers in this location.
+ * @property string $display_name The display name of the location.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ */
+class Location extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'terminal.location';
+
+ use \Stripe\ApiOperations\Update;
+
+ /**
+ * Creates a new Location object. For further details, including which
+ * address fields are required in each country, see the Manage locations guide.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Location the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deletes a Location object.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Location the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of Location objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Terminal\Location> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a Location object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Location
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a Location object by setting the values of the parameters
+ * passed. Any parameters not provided will be left unchanged.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Location the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php/lib/Terminal/Reader.php b/plugins/stripe-php/lib/Terminal/Reader.php
new file mode 100644
index 00000000..abb8a0d5
--- /dev/null
+++ b/plugins/stripe-php/lib/Terminal/Reader.php
@@ -0,0 +1,230 @@
+Connecting to a reader
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|\Stripe\StripeObject $action The most recent action performed by the reader.
+ * @property null|string $device_sw_version The current software version of the reader.
+ * @property string $device_type Type of reader, one of bbpos_wisepad3, stripe_m2, stripe_s700, bbpos_chipper2x, bbpos_wisepos_e, verifone_P400, simulated_wisepos_e, or mobile_phone_reader.
+ * @property null|string $ip_address The local IP address of the reader.
+ * @property string $label Custom label given to the reader for easier identification.
+ * @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|\Stripe\Terminal\Location $location The location identifier of the reader.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property string $serial_number Serial number of the reader.
+ * @property null|string $status The networking status of the reader. We do not recommend using this field in flows that may block taking payments.
+ */
+class Reader extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'terminal.reader';
+
+ use \Stripe\ApiOperations\Update;
+
+ const DEVICE_TYPE_BBPOS_CHIPPER2X = 'bbpos_chipper2x';
+ const DEVICE_TYPE_BBPOS_WISEPAD3 = 'bbpos_wisepad3';
+ const DEVICE_TYPE_BBPOS_WISEPOS_E = 'bbpos_wisepos_e';
+ const DEVICE_TYPE_MOBILE_PHONE_READER = 'mobile_phone_reader';
+ const DEVICE_TYPE_SIMULATED_WISEPOS_E = 'simulated_wisepos_e';
+ const DEVICE_TYPE_STRIPE_M2 = 'stripe_m2';
+ const DEVICE_TYPE_STRIPE_S700 = 'stripe_s700';
+ const DEVICE_TYPE_VERIFONE_P400 = 'verifone_P400';
+
+ const STATUS_OFFLINE = 'offline';
+ const STATUS_ONLINE = 'online';
+
+ /**
+ * Creates a new Reader object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deletes a Reader object.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of Reader objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Terminal\Reader> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a Reader object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates a Reader object by setting the values of the parameters
+ * passed. Any parameters not provided will be left unchanged.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader the canceled reader
+ */
+ public function cancelAction($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/cancel_action';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader the processed reader
+ */
+ public function processPaymentIntent($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/process_payment_intent';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader the processed reader
+ */
+ public function processSetupIntent($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/process_setup_intent';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader the refunded reader
+ */
+ public function refundPayment($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/refund_payment';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Terminal\Reader the seted reader
+ */
+ public function setReaderDisplay($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/set_reader_display';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/TestHelpers/TestClock.php b/plugins/stripe-php/lib/TestHelpers/TestClock.php
new file mode 100644
index 00000000..361b2692
--- /dev/null
+++ b/plugins/stripe-php/lib/TestHelpers/TestClock.php
@@ -0,0 +1,125 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|string $name The custom name supplied at creation.
+ * @property string $status The status of the Test Clock.
+ * @property \Stripe\StripeObject $status_details
+ */
+class TestClock extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'test_helpers.test_clock';
+
+ const STATUS_ADVANCING = 'advancing';
+ const STATUS_INTERNAL_FAILURE = 'internal_failure';
+ const STATUS_READY = 'ready';
+
+ /**
+ * Creates a new test clock that can be attached to new customers and quotes.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TestHelpers\TestClock the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Deletes a test clock.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TestHelpers\TestClock the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of your test clocks.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\TestHelpers\TestClock> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a test clock.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TestHelpers\TestClock
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TestHelpers\TestClock the advanced test clock
+ */
+ public function advance($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/advance';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/ThinEvent.php b/plugins/stripe-php/lib/ThinEvent.php
new file mode 100644
index 00000000..0ff3a237
--- /dev/null
+++ b/plugins/stripe-php/lib/ThinEvent.php
@@ -0,0 +1,27 @@
+v2->core->events->retrieve(thin_event.id)` to fetch the full event object.
+ *
+ * @property string $id Unique identifier for the event.
+ * @property string $type The type of the event.
+ * @property string $created Time at which the object was created.
+ * @property null|string $context Authentication context needed to fetch the event or related object.
+ * @property null|RelatedObject $related_object Object containing the reference to API resource relevant to the event.
+ * @property null|Reason $reason Reason for the event.
+ * @property bool $livemode Livemode indicates if the event is from a production(true) or test(false) account.
+ */
+class ThinEvent
+{
+ public $id;
+ public $type;
+ public $created;
+ public $context;
+ public $related_object;
+ public $reason;
+ public $livemode;
+}
diff --git a/plugins/stripe-php/lib/Token.php b/plugins/stripe-php/lib/Token.php
new file mode 100644
index 00000000..83e53700
--- /dev/null
+++ b/plugins/stripe-php/lib/Token.php
@@ -0,0 +1,93 @@
+recommended payments integrations to perform this process
+ * on the client-side. This guarantees that no sensitive card data touches your server,
+ * and allows your integration to operate in a PCI-compliant way.
+ *
+ * If you can't use client-side tokenization, you can also create tokens using
+ * the API with either your publishable or secret API key. If
+ * your integration uses this method, you're responsible for any PCI compliance
+ * that it might require, and you must keep your secret API key safe. Unlike with
+ * client-side tokenization, your customer's information isn't sent directly to
+ * Stripe, so we can't determine how it's handled or stored.
+ *
+ * You can't store or use tokens more than once. To store card or bank account
+ * information for later use, create Customer
+ * objects or External accounts.
+ * Radar, our integrated solution for automatic fraud protection,
+ * performs best with integrations that use client-side tokenization.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|\Stripe\BankAccount $bank_account These bank accounts are payment methods on Customer objects.
On the other hand External Accounts are transfer destinations on Account objects for connected accounts. They can be bank accounts or debit cards as well, and are documented in the links above.
Related guide: Bank debits and transfers
+ * @property null|\Stripe\Card $cardYou can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.
Related guide: Card payments with Sources
+ * @property null|string $client_ip IP address of the client that generates the token. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property bool $livemode Has the valuetrue if the object exists in live mode or the value false if the object exists in test mode.
+ * @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).
+ */
+class Token extends ApiResource
+{
+ const OBJECT_NAME = 'token';
+
+ const TYPE_ACCOUNT = 'account';
+ const TYPE_BANK_ACCOUNT = 'bank_account';
+ const TYPE_CARD = 'card';
+ const TYPE_PII = 'pii';
+
+ /**
+ * Creates a single-use token that represents a bank account’s details. You can use
+ * this token with any v1 API method in place of a bank account dictionary. You can
+ * only use this token once. To do so, attach it to a connected
+ * account where controller.requirement_collection
+ * is application, which includes Custom accounts.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Token the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Retrieves the token with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Token
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Topup.php b/plugins/stripe-php/lib/Topup.php
similarity index 54%
rename from plugins/stripe-php-10.5.0/lib/Topup.php
rename to plugins/stripe-php/lib/Topup.php
index a0ea053c..2954a7d1 100644
--- a/plugins/stripe-php-10.5.0/lib/Topup.php
+++ b/plugins/stripe-php/lib/Topup.php
@@ -9,8 +9,7 @@ namespace Stripe;
* individual top-ups, as well as list all top-ups. Top-ups are identified by a
* unique, random ID.
*
- * Related guide: Topping Up your
- * Platform Account.
+ * Related guide: Topping up your platform account
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -24,7 +23,7 @@ namespace Stripe;
* @property null|string $failure_message Message to user further explaining reason for top-up failure if available.
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- * @property null|\Stripe\Source $source For most Stripe users, the source of every top-up is a bank account. This hash is then the source object describing that bank account.
+ * @property null|\Stripe\Source $source The source field is deprecated. It might not always be present in the API response.
* @property null|string $statement_descriptor Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.
* @property string $status The status of the top-up is either canceled, failed, pending, reversed, or succeeded.
* @property null|string $transfer_group A string that identifies this top-up as part of a group.
@@ -33,9 +32,6 @@ class Topup extends ApiResource
{
const OBJECT_NAME = 'topup';
- use ApiOperations\All;
- use ApiOperations\Create;
- use ApiOperations\Retrieve;
use ApiOperations\Update;
const STATUS_CANCELED = 'canceled';
@@ -44,6 +40,90 @@ class Topup extends ApiResource
const STATUS_REVERSED = 'reversed';
const STATUS_SUCCEEDED = 'succeeded';
+ /**
+ * Top up the balance of an account.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Topup the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of top-ups.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Topup> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a top-up that has previously been created. Supply the
+ * unique top-up ID that was returned from your previous request, and Stripe will
+ * return the corresponding top-up information.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Topup
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the metadata of a top-up. Other top-up details are not editable by
+ * design.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Topup the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
diff --git a/plugins/stripe-php/lib/Transfer.php b/plugins/stripe-php/lib/Transfer.php
new file mode 100644
index 00000000..16c7b1b2
--- /dev/null
+++ b/plugins/stripe-php/lib/Transfer.php
@@ -0,0 +1,197 @@
+Transfer object is created when you move funds between Stripe accounts as
+ * part of Connect.
+ *
+ * Before April 6, 2017, transfers also represented movement of funds from a
+ * Stripe account to a card or bank account. This behavior has since been split
+ * out into a Payout object, with corresponding payout endpoints. For more
+ * information, read about the
+ * transfer/payout split.
+ *
+ * Related guide: Creating separate charges and transfers
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount Amount in cents (or local equivalent) to be transferred.
+ * @property int $amount_reversed Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).
+ * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this transfer on your account balance.
+ * @property int $created Time that this record of the transfer was first created.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
+ * @property null|string|\Stripe\Account $destination ID of the Stripe account the transfer was sent to.
+ * @property null|string|\Stripe\Charge $destination_payment If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property \Stripe\Collection<\Stripe\TransferReversal> $reversals A list of reversals that have been applied to the transfer.
+ * @property bool $reversed Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
+ * @property null|string|\Stripe\Charge $source_transaction ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance.
+ * @property null|string $source_type The source balance this transfer came from. One of card, fpx, or bank_account.
+ * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the Connect documentation for details.
+ */
+class Transfer extends ApiResource
+{
+ const OBJECT_NAME = 'transfer';
+
+ use ApiOperations\NestedResource;
+ use ApiOperations\Update;
+
+ const SOURCE_TYPE_BANK_ACCOUNT = 'bank_account';
+ const SOURCE_TYPE_CARD = 'card';
+ const SOURCE_TYPE_FPX = 'fpx';
+
+ /**
+ * To send funds from your Stripe account to a connected account, you create a new
+ * transfer object. Your Stripe balance must be able to
+ * cover the transfer amount, or you’ll receive an “Insufficient Funds” error.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Transfer the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of existing transfers sent to connected accounts. The transfers
+ * are returned in sorted order, with the most recently created transfers appearing
+ * first.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Transfer> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing transfer. Supply the unique transfer ID
+ * from either a transfer creation request or the transfer list, and Stripe will
+ * return the corresponding transfer information.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Transfer
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the specified transfer by setting the values of the parameters passed.
+ * Any parameters not provided will be left unchanged.
+ *
+ * This request accepts only metadata as an argument.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Transfer the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ const PATH_REVERSALS = '/reversals';
+
+ /**
+ * @param string $id the ID of the transfer on which to retrieve the transfer reversals
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\TransferReversal> the list of transfer reversals
+ */
+ public static function allReversals($id, $params = null, $opts = null)
+ {
+ return self::_allNestedResources($id, static::PATH_REVERSALS, $params, $opts);
+ }
+
+ /**
+ * @param string $id the ID of the transfer on which to create the transfer reversal
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TransferReversal
+ */
+ public static function createReversal($id, $params = null, $opts = null)
+ {
+ return self::_createNestedResource($id, static::PATH_REVERSALS, $params, $opts);
+ }
+
+ /**
+ * @param string $id the ID of the transfer to which the transfer reversal belongs
+ * @param string $reversalId the ID of the transfer reversal to retrieve
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TransferReversal
+ */
+ public static function retrieveReversal($id, $reversalId, $params = null, $opts = null)
+ {
+ return self::_retrieveNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts);
+ }
+
+ /**
+ * @param string $id the ID of the transfer to which the transfer reversal belongs
+ * @param string $reversalId the ID of the transfer reversal to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\TransferReversal
+ */
+ public static function updateReversal($id, $reversalId, $params = null, $opts = null)
+ {
+ return self::_updateNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts);
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/TransferReversal.php b/plugins/stripe-php/lib/TransferReversal.php
similarity index 77%
rename from plugins/stripe-php-10.5.0/lib/TransferReversal.php
rename to plugins/stripe-php/lib/TransferReversal.php
index b6167dbb..36e8ebe4 100644
--- a/plugins/stripe-php-10.5.0/lib/TransferReversal.php
+++ b/plugins/stripe-php/lib/TransferReversal.php
@@ -5,26 +5,23 @@
namespace Stripe;
/**
- * Stripe Connect platforms can
- * reverse transfers made to a connected account, either entirely or partially, and
- * can also specify whether to refund any related application fees. Transfer
- * reversals add to the platform's balance and subtract from the destination
- * account's balance.
+ * Stripe Connect platforms can reverse transfers made to a
+ * connected account, either entirely or partially, and can also specify whether
+ * to refund any related application fees. Transfer reversals add to the
+ * platform's balance and subtract from the destination account's balance.
*
- * Reversing a transfer that was made for a destination charge is allowed only
- * up to the amount of the charge. It is possible to reverse a transfer_group
+ * Reversing a transfer that was made for a destination
+ * charge is allowed only up to the amount of
+ * the charge. It is possible to reverse a
+ * transfer_group
* transfer only if the destination account has enough balance to cover the
* reversal.
*
- * Related guide: Reversing
- * Transfers.
+ * Related guide: Reverse transfers
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
- * @property int $amount Amount, in %s.
+ * @property int $amount Amount, in cents (or local equivalent).
* @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
diff --git a/plugins/stripe-php/lib/Treasury/CreditReversal.php b/plugins/stripe-php/lib/Treasury/CreditReversal.php
new file mode 100644
index 00000000..c0df1448
--- /dev/null
+++ b/plugins/stripe-php/lib/Treasury/CreditReversal.php
@@ -0,0 +1,95 @@
+ReceivedCredits depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property int $amount Amount (in cents) transferred.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property string $financial_account The FinancialAccount to reverse funds from.
+ * @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property string $network The rails used to reverse the funds.
+ * @property string $received_credit The ReceivedCredit being reversed.
+ * @property string $status Status of the CreditReversal
+ * @property \Stripe\StripeObject $status_transitions
+ * @property null|string|\Stripe\Treasury\Transaction $transaction The Transaction associated with this object.
+ */
+class CreditReversal extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'treasury.credit_reversal';
+
+ const NETWORK_ACH = 'ach';
+ const NETWORK_STRIPE = 'stripe';
+
+ const STATUS_CANCELED = 'canceled';
+ const STATUS_POSTED = 'posted';
+ const STATUS_PROCESSING = 'processing';
+
+ /**
+ * Reverses a ReceivedCredit and creates a CreditReversal object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\CreditReversal the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of CreditReversals.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\CreditReversal> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing CreditReversal by passing the unique
+ * CreditReversal ID from either the CreditReversal creation request or
+ * CreditReversal list.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\CreditReversal
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/DebitReversal.php b/plugins/stripe-php/lib/Treasury/DebitReversal.php
similarity index 51%
rename from plugins/stripe-php-10.5.0/lib/Treasury/DebitReversal.php
rename to plugins/stripe-php/lib/Treasury/DebitReversal.php
index fa550331..4b83967c 100644
--- a/plugins/stripe-php-10.5.0/lib/Treasury/DebitReversal.php
+++ b/plugins/stripe-php/lib/Treasury/DebitReversal.php
@@ -5,10 +5,7 @@
namespace Stripe\Treasury;
/**
- * You can reverse some ReceivedDebits depending
- * on their network and source flow. Reversing a ReceivedDebit leads to the
- * creation of a new object known as a DebitReversal.
+ * You can reverse some ReceivedDebits depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -30,14 +27,68 @@ class DebitReversal extends \Stripe\ApiResource
{
const OBJECT_NAME = 'treasury.debit_reversal';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
-
const NETWORK_ACH = 'ach';
const NETWORK_CARD = 'card';
const STATUS_FAILED = 'failed';
const STATUS_PROCESSING = 'processing';
const STATUS_SUCCEEDED = 'succeeded';
+
+ /**
+ * Reverses a ReceivedDebit and creates a DebitReversal object.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\DebitReversal the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of DebitReversals.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\DebitReversal> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a DebitReversal object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\DebitReversal
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
}
diff --git a/plugins/stripe-php/lib/Treasury/FinancialAccount.php b/plugins/stripe-php/lib/Treasury/FinancialAccount.php
new file mode 100644
index 00000000..db77d186
--- /dev/null
+++ b/plugins/stripe-php/lib/Treasury/FinancialAccount.php
@@ -0,0 +1,153 @@
+ISO 3166-1 alpha-2).
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|\Stripe\Treasury\FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a status enum and associated status_details. Stripe or the platform can control Features via the requested field.
+ * @property \Stripe\StripeObject[] $financial_addresses The set of credentials that resolve to a FinancialAccount.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|string[] $pending_features The array of paths to pending Features in the Features hash.
+ * @property null|\Stripe\StripeObject $platform_restrictions The set of functionalities that the platform can restrict on the FinancialAccount.
+ * @property null|string[] $restricted_features The array of paths to restricted Features in the Features hash.
+ * @property string $status Status of this FinancialAccount.
+ * @property \Stripe\StripeObject $status_details
+ * @property string[] $supported_currencies The currencies the FinancialAccount can hold a balance in. Three-letter ISO currency code, in lowercase.
+ */
+class FinancialAccount extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'treasury.financial_account';
+
+ use \Stripe\ApiOperations\Update;
+
+ const STATUS_CLOSED = 'closed';
+ const STATUS_OPEN = 'open';
+
+ /**
+ * Creates a new FinancialAccount. For now, each connected account can only have
+ * one FinancialAccount.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\FinancialAccount the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of FinancialAccounts.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\FinancialAccount> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of a FinancialAccount.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\FinancialAccount
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the details of a FinancialAccount.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\FinancialAccount the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\FinancialAccountFeatures the retrieved financial account features
+ */
+ public function retrieveFeatures($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/features';
+ list($response, $opts) = $this->_request('get', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\FinancialAccountFeatures the updated financial account features
+ */
+ public function updateFeatures($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/features';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/plugins/stripe-php/lib/Treasury/FinancialAccountFeatures.php b/plugins/stripe-php/lib/Treasury/FinancialAccountFeatures.php
new file mode 100644
index 00000000..0854f485
--- /dev/null
+++ b/plugins/stripe-php/lib/Treasury/FinancialAccountFeatures.php
@@ -0,0 +1,23 @@
+status enum and associated status_details.
+ * Stripe or the platform can control Features via the requested field.
+ *
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|\Stripe\StripeObject $card_issuing Toggle settings for enabling/disabling a feature
+ * @property null|\Stripe\StripeObject $deposit_insurance Toggle settings for enabling/disabling a feature
+ * @property null|\Stripe\StripeObject $financial_addresses Settings related to Financial Addresses features on a Financial Account
+ * @property null|\Stripe\StripeObject $inbound_transfers InboundTransfers contains inbound transfers features for a FinancialAccount.
+ * @property null|\Stripe\StripeObject $intra_stripe_flows Toggle settings for enabling/disabling a feature
+ * @property null|\Stripe\StripeObject $outbound_payments Settings related to Outbound Payments features on a Financial Account
+ * @property null|\Stripe\StripeObject $outbound_transfers OutboundTransfers contains outbound transfers features for a FinancialAccount.
+ */
+class FinancialAccountFeatures extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'treasury.financial_account_features';
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/InboundTransfer.php b/plugins/stripe-php/lib/Treasury/InboundTransfer.php
similarity index 60%
rename from plugins/stripe-php-10.5.0/lib/Treasury/InboundTransfer.php
rename to plugins/stripe-php/lib/Treasury/InboundTransfer.php
index bc841aa4..5ae219bc 100644
--- a/plugins/stripe-php-10.5.0/lib/Treasury/InboundTransfer.php
+++ b/plugins/stripe-php/lib/Treasury/InboundTransfer.php
@@ -5,12 +5,9 @@
namespace Stripe\Treasury;
/**
- * Use InboundTransfers
- * to add funds to your FinancialAccount via a
- * PaymentMethod that is owned by you. The funds will be transferred via an ACH
- * debit.
+ * Use InboundTransfers to add funds to your FinancialAccount via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
+ *
+ * Related guide: Moving money with Treasury using InboundTransfer objects
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -25,7 +22,7 @@ namespace Stripe\Treasury;
* @property \Stripe\StripeObject $linked_flows
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property \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 $origin_payment_method The origin payment method to be debited for an InboundTransfer.
+ * @property null|string $origin_payment_method The origin payment method to be debited for an InboundTransfer.
* @property null|\Stripe\StripeObject $origin_payment_method_details Details about the PaymentMethod for an InboundTransfer.
* @property null|bool $returned Returns true if the funds for an InboundTransfer were returned after the InboundTransfer went to the succeeded state.
* @property string $statement_descriptor Statement descriptor shown when funds are debited from the source. Not all payment networks support statement_descriptor.
@@ -37,15 +34,69 @@ class InboundTransfer extends \Stripe\ApiResource
{
const OBJECT_NAME = 'treasury.inbound_transfer';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
-
const STATUS_CANCELED = 'canceled';
const STATUS_FAILED = 'failed';
const STATUS_PROCESSING = 'processing';
const STATUS_SUCCEEDED = 'succeeded';
+ /**
+ * Creates an InboundTransfer.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\InboundTransfer the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of InboundTransfers sent from the specified FinancialAccount.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\InboundTransfer> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing InboundTransfer.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\InboundTransfer
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/OutboundPayment.php b/plugins/stripe-php/lib/Treasury/OutboundPayment.php
similarity index 60%
rename from plugins/stripe-php-10.5.0/lib/Treasury/OutboundPayment.php
rename to plugins/stripe-php/lib/Treasury/OutboundPayment.php
index 3997bd30..5d3b541f 100644
--- a/plugins/stripe-php-10.5.0/lib/Treasury/OutboundPayment.php
+++ b/plugins/stripe-php/lib/Treasury/OutboundPayment.php
@@ -5,14 +5,11 @@
namespace Stripe\Treasury;
/**
- * Use OutboundPayments to send funds to another party's external bank account or
- * FinancialAccount.
- * To send money to an account belonging to the same user, use an OutboundTransfer.
+ * Use OutboundPayments to send funds to another party's external bank account or FinancialAccount. To send money to an account belonging to the same user, use an OutboundTransfer.
*
- * Simulate OutboundPayment state changes with the
- * /v1/test_helpers/treasury/outbound_payments endpoints. These
- * methods can only be called on test mode objects.
+ * Simulate OutboundPayment state changes with the /v1/test_helpers/treasury/outbound_payments endpoints. These methods can only be called on test mode objects.
+ *
+ * Related guide: Moving money with Treasury using OutboundPayment objects
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -34,22 +31,79 @@ namespace Stripe\Treasury;
* @property string $statement_descriptor The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
* @property string $status Current status of the OutboundPayment: processing, failed, posted, returned, canceled. An OutboundPayment is processing if it has been created and is pending. 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 destination, its status will change to returned.
* @property \Stripe\StripeObject $status_transitions
+ * @property null|\Stripe\StripeObject $tracking_details Details about network-specific tracking information if available.
* @property string|\Stripe\Treasury\Transaction $transaction The Transaction associated with this object.
*/
class OutboundPayment extends \Stripe\ApiResource
{
const OBJECT_NAME = 'treasury.outbound_payment';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
-
const STATUS_CANCELED = 'canceled';
const STATUS_FAILED = 'failed';
const STATUS_POSTED = 'posted';
const STATUS_PROCESSING = 'processing';
const STATUS_RETURNED = 'returned';
+ /**
+ * Creates an OutboundPayment.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\OutboundPayment the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of OutboundPayments sent from the specified FinancialAccount.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\OutboundPayment> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing OutboundPayment by passing the unique
+ * OutboundPayment ID from either the OutboundPayment creation request or
+ * OutboundPayment list.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\OutboundPayment
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/OutboundTransfer.php b/plugins/stripe-php/lib/Treasury/OutboundTransfer.php
similarity index 56%
rename from plugins/stripe-php-10.5.0/lib/Treasury/OutboundTransfer.php
rename to plugins/stripe-php/lib/Treasury/OutboundTransfer.php
index a21680be..595d5985 100644
--- a/plugins/stripe-php-10.5.0/lib/Treasury/OutboundTransfer.php
+++ b/plugins/stripe-php/lib/Treasury/OutboundTransfer.php
@@ -5,16 +5,11 @@
namespace Stripe\Treasury;
/**
- * Use OutboundTransfers to transfer funds from a FinancialAccount to a
- * PaymentMethod belonging to the same entity. To send funds to a different party,
- * use OutboundPayments
- * instead. You can send funds over ACH rails or through a domestic wire transfer
- * to a user's own external bank account.
+ * Use OutboundTransfers to transfer funds from a FinancialAccount to a PaymentMethod belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
*
- * Simulate OutboundTransfer state changes with the
- * /v1/test_helpers/treasury/outbound_transfers endpoints. These
- * methods can only be called on test mode objects.
+ * Simulate OutboundTransfer state changes with the /v1/test_helpers/treasury/outbound_transfers endpoints. These methods can only be called on test mode objects.
+ *
+ * Related guide: Moving money with Treasury using OutboundTransfer objects
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -34,22 +29,79 @@ namespace Stripe\Treasury;
* @property string $statement_descriptor Information about the OutboundTransfer to be sent to the recipient account.
* @property string $status Current status of the OutboundTransfer: processing, failed, canceled, posted, returned. An OutboundTransfer is processing if it has been created and is pending. 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 destination, its status will change to returned.
* @property \Stripe\StripeObject $status_transitions
+ * @property null|\Stripe\StripeObject $tracking_details Details about network-specific tracking information if available.
* @property string|\Stripe\Treasury\Transaction $transaction The Transaction associated with this object.
*/
class OutboundTransfer extends \Stripe\ApiResource
{
const OBJECT_NAME = 'treasury.outbound_transfer';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Create;
- use \Stripe\ApiOperations\Retrieve;
-
const STATUS_CANCELED = 'canceled';
const STATUS_FAILED = 'failed';
const STATUS_POSTED = 'posted';
const STATUS_PROCESSING = 'processing';
const STATUS_RETURNED = 'returned';
+ /**
+ * Creates an OutboundTransfer.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\OutboundTransfer the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * Returns a list of OutboundTransfers sent from the specified FinancialAccount.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\OutboundTransfer> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing OutboundTransfer by passing the unique
+ * OutboundTransfer ID from either the OutboundTransfer creation request or
+ * OutboundTransfer list.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\OutboundTransfer
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
/**
* @param null|array $params
* @param null|array|string $opts
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/ReceivedCredit.php b/plugins/stripe-php/lib/Treasury/ReceivedCredit.php
similarity index 63%
rename from plugins/stripe-php-10.5.0/lib/Treasury/ReceivedCredit.php
rename to plugins/stripe-php/lib/Treasury/ReceivedCredit.php
index 9a72ff07..a2a1cd17 100644
--- a/plugins/stripe-php-10.5.0/lib/Treasury/ReceivedCredit.php
+++ b/plugins/stripe-php/lib/Treasury/ReceivedCredit.php
@@ -5,10 +5,7 @@
namespace Stripe\Treasury;
/**
- * ReceivedCredits represent funds sent to a FinancialAccount (for
- * example, via ACH or wire). These money movements are not initiated from the
- * FinancialAccount.
+ * ReceivedCredits represent funds sent to a FinancialAccount (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -31,11 +28,9 @@ class ReceivedCredit extends \Stripe\ApiResource
{
const OBJECT_NAME = 'treasury.received_credit';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-
const FAILURE_CODE_ACCOUNT_CLOSED = 'account_closed';
const FAILURE_CODE_ACCOUNT_FROZEN = 'account_frozen';
+ const FAILURE_CODE_INTERNATIONAL_TRANSACTION = 'international_transaction';
const FAILURE_CODE_OTHER = 'other';
const NETWORK_ACH = 'ach';
@@ -45,4 +40,41 @@ class ReceivedCredit extends \Stripe\ApiResource
const STATUS_FAILED = 'failed';
const STATUS_SUCCEEDED = 'succeeded';
+
+ /**
+ * Returns a list of ReceivedCredits.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\ReceivedCredit> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing ReceivedCredit by passing the unique
+ * ReceivedCredit ID from the ReceivedCredit list.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\ReceivedCredit
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/ReceivedDebit.php b/plugins/stripe-php/lib/Treasury/ReceivedDebit.php
similarity index 63%
rename from plugins/stripe-php-10.5.0/lib/Treasury/ReceivedDebit.php
rename to plugins/stripe-php/lib/Treasury/ReceivedDebit.php
index c252df41..ba9bf482 100644
--- a/plugins/stripe-php-10.5.0/lib/Treasury/ReceivedDebit.php
+++ b/plugins/stripe-php/lib/Treasury/ReceivedDebit.php
@@ -5,9 +5,7 @@
namespace Stripe\Treasury;
/**
- * ReceivedDebits represent funds pulled from a FinancialAccount.
- * These are not initiated from the FinancialAccount.
+ * ReceivedDebits represent funds pulled from a FinancialAccount. These are not initiated from the FinancialAccount.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -18,7 +16,7 @@ namespace Stripe\Treasury;
* @property null|string $failure_code Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
* @property null|string $financial_account The FinancialAccount that funds were pulled from.
* @property null|string $hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
- * @property \Stripe\StripeObject $initiating_payment_method_details
+ * @property null|\Stripe\StripeObject $initiating_payment_method_details
* @property \Stripe\StripeObject $linked_flows
* @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
* @property string $network The network used for the ReceivedDebit.
@@ -30,12 +28,10 @@ class ReceivedDebit extends \Stripe\ApiResource
{
const OBJECT_NAME = 'treasury.received_debit';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-
const FAILURE_CODE_ACCOUNT_CLOSED = 'account_closed';
const FAILURE_CODE_ACCOUNT_FROZEN = 'account_frozen';
const FAILURE_CODE_INSUFFICIENT_FUNDS = 'insufficient_funds';
+ const FAILURE_CODE_INTERNATIONAL_TRANSACTION = 'international_transaction';
const FAILURE_CODE_OTHER = 'other';
const NETWORK_ACH = 'ach';
@@ -44,4 +40,41 @@ class ReceivedDebit extends \Stripe\ApiResource
const STATUS_FAILED = 'failed';
const STATUS_SUCCEEDED = 'succeeded';
+
+ /**
+ * Returns a list of ReceivedDebits.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\ReceivedDebit> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing ReceivedDebit by passing the unique
+ * ReceivedDebit ID from the ReceivedDebit list.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\ReceivedDebit
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/Transaction.php b/plugins/stripe-php/lib/Treasury/Transaction.php
similarity index 65%
rename from plugins/stripe-php-10.5.0/lib/Treasury/Transaction.php
rename to plugins/stripe-php/lib/Treasury/Transaction.php
index 32168984..b694d68a 100644
--- a/plugins/stripe-php-10.5.0/lib/Treasury/Transaction.php
+++ b/plugins/stripe-php/lib/Treasury/Transaction.php
@@ -5,9 +5,7 @@
namespace Stripe\Treasury;
/**
- * Transactions represent changes to a FinancialAccount's
- * balance.
+ * Transactions represent changes to a FinancialAccount's balance.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -29,9 +27,6 @@ class Transaction extends \Stripe\ApiResource
{
const OBJECT_NAME = 'treasury.transaction';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-
const FLOW_TYPE_CREDIT_REVERSAL = 'credit_reversal';
const FLOW_TYPE_DEBIT_REVERSAL = 'debit_reversal';
const FLOW_TYPE_INBOUND_TRANSFER = 'inbound_transfer';
@@ -45,4 +40,40 @@ class Transaction extends \Stripe\ApiResource
const STATUS_OPEN = 'open';
const STATUS_POSTED = 'posted';
const STATUS_VOID = 'void';
+
+ /**
+ * Retrieves a list of Transaction objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\Transaction> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing Transaction.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\Transaction
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/Treasury/TransactionEntry.php b/plugins/stripe-php/lib/Treasury/TransactionEntry.php
similarity index 74%
rename from plugins/stripe-php-10.5.0/lib/Treasury/TransactionEntry.php
rename to plugins/stripe-php/lib/Treasury/TransactionEntry.php
index e50dbad9..fcef7eff 100644
--- a/plugins/stripe-php-10.5.0/lib/Treasury/TransactionEntry.php
+++ b/plugins/stripe-php/lib/Treasury/TransactionEntry.php
@@ -5,8 +5,7 @@
namespace Stripe\Treasury;
/**
- * TransactionEntries represent individual units of money movements within a single
- * Transaction.
+ * TransactionEntries represent individual units of money movements within a single Transaction.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
@@ -26,9 +25,6 @@ class TransactionEntry extends \Stripe\ApiResource
{
const OBJECT_NAME = 'treasury.transaction_entry';
- use \Stripe\ApiOperations\All;
- use \Stripe\ApiOperations\Retrieve;
-
const FLOW_TYPE_CREDIT_REVERSAL = 'credit_reversal';
const FLOW_TYPE_DEBIT_REVERSAL = 'debit_reversal';
const FLOW_TYPE_INBOUND_TRANSFER = 'inbound_transfer';
@@ -59,4 +55,40 @@ class TransactionEntry extends \Stripe\ApiResource
const TYPE_OUTBOUND_TRANSFER_RETURN = 'outbound_transfer_return';
const TYPE_RECEIVED_CREDIT = 'received_credit';
const TYPE_RECEIVED_DEBIT = 'received_debit';
+
+ /**
+ * Retrieves a list of TransactionEntry objects.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\Treasury\TransactionEntry> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves a TransactionEntry object.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Treasury\TransactionEntry
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
}
diff --git a/plugins/stripe-php-10.5.0/lib/UsageRecord.php b/plugins/stripe-php/lib/UsageRecord.php
similarity index 75%
rename from plugins/stripe-php-10.5.0/lib/UsageRecord.php
rename to plugins/stripe-php/lib/UsageRecord.php
index 55229827..13dd1ccf 100644
--- a/plugins/stripe-php-10.5.0/lib/UsageRecord.php
+++ b/plugins/stripe-php/lib/UsageRecord.php
@@ -8,9 +8,9 @@ namespace Stripe;
* Usage records allow you to report customer usage and metrics to Stripe for
* metered billing of subscription prices.
*
- * Related guide: Metered
- * Billing.
+ * Related guide: Metered billing
+ *
+ * This is our legacy usage-based billing API. See the updated usage-based billing docs.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
diff --git a/plugins/stripe-php-10.5.0/lib/UsageRecordSummary.php b/plugins/stripe-php/lib/UsageRecordSummary.php
similarity index 84%
rename from plugins/stripe-php-10.5.0/lib/UsageRecordSummary.php
rename to plugins/stripe-php/lib/UsageRecordSummary.php
index 174e14e0..d9a98392 100644
--- a/plugins/stripe-php-10.5.0/lib/UsageRecordSummary.php
+++ b/plugins/stripe-php/lib/UsageRecordSummary.php
@@ -5,6 +5,8 @@
namespace Stripe;
/**
+ * A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period.
+ *
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string $invoice The invoice in which this usage period has been billed for.
diff --git a/plugins/stripe-php-10.5.0/lib/Util/ApiVersion.php b/plugins/stripe-php/lib/Util/ApiVersion.php
similarity index 69%
rename from plugins/stripe-php-10.5.0/lib/Util/ApiVersion.php
rename to plugins/stripe-php/lib/Util/ApiVersion.php
index 9efa9d70..e8a11904 100644
--- a/plugins/stripe-php-10.5.0/lib/Util/ApiVersion.php
+++ b/plugins/stripe-php/lib/Util/ApiVersion.php
@@ -6,5 +6,5 @@ namespace Stripe\Util;
class ApiVersion
{
- const CURRENT = '2022-11-15';
+ const CURRENT = '2024-12-18.acacia';
}
diff --git a/plugins/stripe-php-10.5.0/lib/Util/CaseInsensitiveArray.php b/plugins/stripe-php/lib/Util/CaseInsensitiveArray.php
similarity index 90%
rename from plugins/stripe-php-10.5.0/lib/Util/CaseInsensitiveArray.php
rename to plugins/stripe-php/lib/Util/CaseInsensitiveArray.php
index 5e1ac7de..262bca7e 100644
--- a/plugins/stripe-php-10.5.0/lib/Util/CaseInsensitiveArray.php
+++ b/plugins/stripe-php/lib/Util/CaseInsensitiveArray.php
@@ -45,7 +45,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \IteratorAggrega
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
- $offset = static::maybeLowercase($offset);
+ $offset = self::maybeLowercase($offset);
if (null === $offset) {
$this->container[] = $value;
} else {
@@ -59,7 +59,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \IteratorAggrega
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
- $offset = static::maybeLowercase($offset);
+ $offset = self::maybeLowercase($offset);
return isset($this->container[$offset]);
}
@@ -70,7 +70,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \IteratorAggrega
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
- $offset = static::maybeLowercase($offset);
+ $offset = self::maybeLowercase($offset);
unset($this->container[$offset]);
}
@@ -80,7 +80,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \IteratorAggrega
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
- $offset = static::maybeLowercase($offset);
+ $offset = self::maybeLowercase($offset);
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
diff --git a/plugins/stripe-php-10.5.0/lib/Util/DefaultLogger.php b/plugins/stripe-php/lib/Util/DefaultLogger.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Util/DefaultLogger.php
rename to plugins/stripe-php/lib/Util/DefaultLogger.php
diff --git a/plugins/stripe-php/lib/Util/EventTypes.php b/plugins/stripe-php/lib/Util/EventTypes.php
new file mode 100644
index 00000000..8badd284
--- /dev/null
+++ b/plugins/stripe-php/lib/Util/EventTypes.php
@@ -0,0 +1,13 @@
+ \Stripe\Events\V1BillingMeterErrorReportTriggeredEvent::class,
+ \Stripe\Events\V1BillingMeterNoMeterFoundEvent::LOOKUP_TYPE => \Stripe\Events\V1BillingMeterNoMeterFoundEvent::class,
+ // The end of the section generated from our OpenAPI spec
+ ];
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Util/LoggerInterface.php b/plugins/stripe-php/lib/Util/LoggerInterface.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Util/LoggerInterface.php
rename to plugins/stripe-php/lib/Util/LoggerInterface.php
diff --git a/plugins/stripe-php/lib/Util/ObjectTypes.php b/plugins/stripe-php/lib/Util/ObjectTypes.php
new file mode 100644
index 00000000..df368635
--- /dev/null
+++ b/plugins/stripe-php/lib/Util/ObjectTypes.php
@@ -0,0 +1,170 @@
+ \Stripe\Collection::class,
+ \Stripe\Issuing\CardDetails::OBJECT_NAME => \Stripe\Issuing\CardDetails::class,
+ \Stripe\SearchResult::OBJECT_NAME => \Stripe\SearchResult::class,
+ \Stripe\File::OBJECT_NAME_ALT => \Stripe\File::class,
+ // object classes: The beginning of the section generated from our OpenAPI spec
+ \Stripe\Account::OBJECT_NAME => \Stripe\Account::class,
+ \Stripe\AccountLink::OBJECT_NAME => \Stripe\AccountLink::class,
+ \Stripe\AccountSession::OBJECT_NAME => \Stripe\AccountSession::class,
+ \Stripe\ApplePayDomain::OBJECT_NAME => \Stripe\ApplePayDomain::class,
+ \Stripe\Application::OBJECT_NAME => \Stripe\Application::class,
+ \Stripe\ApplicationFee::OBJECT_NAME => \Stripe\ApplicationFee::class,
+ \Stripe\ApplicationFeeRefund::OBJECT_NAME => \Stripe\ApplicationFeeRefund::class,
+ \Stripe\Apps\Secret::OBJECT_NAME => \Stripe\Apps\Secret::class,
+ \Stripe\Balance::OBJECT_NAME => \Stripe\Balance::class,
+ \Stripe\BalanceTransaction::OBJECT_NAME => \Stripe\BalanceTransaction::class,
+ \Stripe\BankAccount::OBJECT_NAME => \Stripe\BankAccount::class,
+ \Stripe\Billing\Alert::OBJECT_NAME => \Stripe\Billing\Alert::class,
+ \Stripe\Billing\AlertTriggered::OBJECT_NAME => \Stripe\Billing\AlertTriggered::class,
+ \Stripe\Billing\CreditBalanceSummary::OBJECT_NAME => \Stripe\Billing\CreditBalanceSummary::class,
+ \Stripe\Billing\CreditBalanceTransaction::OBJECT_NAME => \Stripe\Billing\CreditBalanceTransaction::class,
+ \Stripe\Billing\CreditGrant::OBJECT_NAME => \Stripe\Billing\CreditGrant::class,
+ \Stripe\Billing\Meter::OBJECT_NAME => \Stripe\Billing\Meter::class,
+ \Stripe\Billing\MeterEvent::OBJECT_NAME => \Stripe\Billing\MeterEvent::class,
+ \Stripe\Billing\MeterEventAdjustment::OBJECT_NAME => \Stripe\Billing\MeterEventAdjustment::class,
+ \Stripe\Billing\MeterEventSummary::OBJECT_NAME => \Stripe\Billing\MeterEventSummary::class,
+ \Stripe\BillingPortal\Configuration::OBJECT_NAME => \Stripe\BillingPortal\Configuration::class,
+ \Stripe\BillingPortal\Session::OBJECT_NAME => \Stripe\BillingPortal\Session::class,
+ \Stripe\Capability::OBJECT_NAME => \Stripe\Capability::class,
+ \Stripe\Card::OBJECT_NAME => \Stripe\Card::class,
+ \Stripe\CashBalance::OBJECT_NAME => \Stripe\CashBalance::class,
+ \Stripe\Charge::OBJECT_NAME => \Stripe\Charge::class,
+ \Stripe\Checkout\Session::OBJECT_NAME => \Stripe\Checkout\Session::class,
+ \Stripe\Climate\Order::OBJECT_NAME => \Stripe\Climate\Order::class,
+ \Stripe\Climate\Product::OBJECT_NAME => \Stripe\Climate\Product::class,
+ \Stripe\Climate\Supplier::OBJECT_NAME => \Stripe\Climate\Supplier::class,
+ \Stripe\ConfirmationToken::OBJECT_NAME => \Stripe\ConfirmationToken::class,
+ \Stripe\ConnectCollectionTransfer::OBJECT_NAME => \Stripe\ConnectCollectionTransfer::class,
+ \Stripe\CountrySpec::OBJECT_NAME => \Stripe\CountrySpec::class,
+ \Stripe\Coupon::OBJECT_NAME => \Stripe\Coupon::class,
+ \Stripe\CreditNote::OBJECT_NAME => \Stripe\CreditNote::class,
+ \Stripe\CreditNoteLineItem::OBJECT_NAME => \Stripe\CreditNoteLineItem::class,
+ \Stripe\Customer::OBJECT_NAME => \Stripe\Customer::class,
+ \Stripe\CustomerBalanceTransaction::OBJECT_NAME => \Stripe\CustomerBalanceTransaction::class,
+ \Stripe\CustomerCashBalanceTransaction::OBJECT_NAME => \Stripe\CustomerCashBalanceTransaction::class,
+ \Stripe\CustomerSession::OBJECT_NAME => \Stripe\CustomerSession::class,
+ \Stripe\Discount::OBJECT_NAME => \Stripe\Discount::class,
+ \Stripe\Dispute::OBJECT_NAME => \Stripe\Dispute::class,
+ \Stripe\Entitlements\ActiveEntitlement::OBJECT_NAME => \Stripe\Entitlements\ActiveEntitlement::class,
+ \Stripe\Entitlements\ActiveEntitlementSummary::OBJECT_NAME => \Stripe\Entitlements\ActiveEntitlementSummary::class,
+ \Stripe\Entitlements\Feature::OBJECT_NAME => \Stripe\Entitlements\Feature::class,
+ \Stripe\EphemeralKey::OBJECT_NAME => \Stripe\EphemeralKey::class,
+ \Stripe\Event::OBJECT_NAME => \Stripe\Event::class,
+ \Stripe\ExchangeRate::OBJECT_NAME => \Stripe\ExchangeRate::class,
+ \Stripe\File::OBJECT_NAME => \Stripe\File::class,
+ \Stripe\FileLink::OBJECT_NAME => \Stripe\FileLink::class,
+ \Stripe\FinancialConnections\Account::OBJECT_NAME => \Stripe\FinancialConnections\Account::class,
+ \Stripe\FinancialConnections\AccountOwner::OBJECT_NAME => \Stripe\FinancialConnections\AccountOwner::class,
+ \Stripe\FinancialConnections\AccountOwnership::OBJECT_NAME => \Stripe\FinancialConnections\AccountOwnership::class,
+ \Stripe\FinancialConnections\Session::OBJECT_NAME => \Stripe\FinancialConnections\Session::class,
+ \Stripe\FinancialConnections\Transaction::OBJECT_NAME => \Stripe\FinancialConnections\Transaction::class,
+ \Stripe\Forwarding\Request::OBJECT_NAME => \Stripe\Forwarding\Request::class,
+ \Stripe\FundingInstructions::OBJECT_NAME => \Stripe\FundingInstructions::class,
+ \Stripe\Identity\VerificationReport::OBJECT_NAME => \Stripe\Identity\VerificationReport::class,
+ \Stripe\Identity\VerificationSession::OBJECT_NAME => \Stripe\Identity\VerificationSession::class,
+ \Stripe\Invoice::OBJECT_NAME => \Stripe\Invoice::class,
+ \Stripe\InvoiceItem::OBJECT_NAME => \Stripe\InvoiceItem::class,
+ \Stripe\InvoiceLineItem::OBJECT_NAME => \Stripe\InvoiceLineItem::class,
+ \Stripe\InvoiceRenderingTemplate::OBJECT_NAME => \Stripe\InvoiceRenderingTemplate::class,
+ \Stripe\Issuing\Authorization::OBJECT_NAME => \Stripe\Issuing\Authorization::class,
+ \Stripe\Issuing\Card::OBJECT_NAME => \Stripe\Issuing\Card::class,
+ \Stripe\Issuing\Cardholder::OBJECT_NAME => \Stripe\Issuing\Cardholder::class,
+ \Stripe\Issuing\Dispute::OBJECT_NAME => \Stripe\Issuing\Dispute::class,
+ \Stripe\Issuing\PersonalizationDesign::OBJECT_NAME => \Stripe\Issuing\PersonalizationDesign::class,
+ \Stripe\Issuing\PhysicalBundle::OBJECT_NAME => \Stripe\Issuing\PhysicalBundle::class,
+ \Stripe\Issuing\Token::OBJECT_NAME => \Stripe\Issuing\Token::class,
+ \Stripe\Issuing\Transaction::OBJECT_NAME => \Stripe\Issuing\Transaction::class,
+ \Stripe\LineItem::OBJECT_NAME => \Stripe\LineItem::class,
+ \Stripe\LoginLink::OBJECT_NAME => \Stripe\LoginLink::class,
+ \Stripe\Mandate::OBJECT_NAME => \Stripe\Mandate::class,
+ \Stripe\PaymentIntent::OBJECT_NAME => \Stripe\PaymentIntent::class,
+ \Stripe\PaymentLink::OBJECT_NAME => \Stripe\PaymentLink::class,
+ \Stripe\PaymentMethod::OBJECT_NAME => \Stripe\PaymentMethod::class,
+ \Stripe\PaymentMethodConfiguration::OBJECT_NAME => \Stripe\PaymentMethodConfiguration::class,
+ \Stripe\PaymentMethodDomain::OBJECT_NAME => \Stripe\PaymentMethodDomain::class,
+ \Stripe\Payout::OBJECT_NAME => \Stripe\Payout::class,
+ \Stripe\Person::OBJECT_NAME => \Stripe\Person::class,
+ \Stripe\Plan::OBJECT_NAME => \Stripe\Plan::class,
+ \Stripe\Price::OBJECT_NAME => \Stripe\Price::class,
+ \Stripe\Product::OBJECT_NAME => \Stripe\Product::class,
+ \Stripe\ProductFeature::OBJECT_NAME => \Stripe\ProductFeature::class,
+ \Stripe\PromotionCode::OBJECT_NAME => \Stripe\PromotionCode::class,
+ \Stripe\Quote::OBJECT_NAME => \Stripe\Quote::class,
+ \Stripe\Radar\EarlyFraudWarning::OBJECT_NAME => \Stripe\Radar\EarlyFraudWarning::class,
+ \Stripe\Radar\ValueList::OBJECT_NAME => \Stripe\Radar\ValueList::class,
+ \Stripe\Radar\ValueListItem::OBJECT_NAME => \Stripe\Radar\ValueListItem::class,
+ \Stripe\Refund::OBJECT_NAME => \Stripe\Refund::class,
+ \Stripe\Reporting\ReportRun::OBJECT_NAME => \Stripe\Reporting\ReportRun::class,
+ \Stripe\Reporting\ReportType::OBJECT_NAME => \Stripe\Reporting\ReportType::class,
+ \Stripe\ReserveTransaction::OBJECT_NAME => \Stripe\ReserveTransaction::class,
+ \Stripe\Review::OBJECT_NAME => \Stripe\Review::class,
+ \Stripe\SetupAttempt::OBJECT_NAME => \Stripe\SetupAttempt::class,
+ \Stripe\SetupIntent::OBJECT_NAME => \Stripe\SetupIntent::class,
+ \Stripe\ShippingRate::OBJECT_NAME => \Stripe\ShippingRate::class,
+ \Stripe\Sigma\ScheduledQueryRun::OBJECT_NAME => \Stripe\Sigma\ScheduledQueryRun::class,
+ \Stripe\Source::OBJECT_NAME => \Stripe\Source::class,
+ \Stripe\SourceMandateNotification::OBJECT_NAME => \Stripe\SourceMandateNotification::class,
+ \Stripe\SourceTransaction::OBJECT_NAME => \Stripe\SourceTransaction::class,
+ \Stripe\Subscription::OBJECT_NAME => \Stripe\Subscription::class,
+ \Stripe\SubscriptionItem::OBJECT_NAME => \Stripe\SubscriptionItem::class,
+ \Stripe\SubscriptionSchedule::OBJECT_NAME => \Stripe\SubscriptionSchedule::class,
+ \Stripe\Tax\Calculation::OBJECT_NAME => \Stripe\Tax\Calculation::class,
+ \Stripe\Tax\CalculationLineItem::OBJECT_NAME => \Stripe\Tax\CalculationLineItem::class,
+ \Stripe\Tax\Registration::OBJECT_NAME => \Stripe\Tax\Registration::class,
+ \Stripe\Tax\Settings::OBJECT_NAME => \Stripe\Tax\Settings::class,
+ \Stripe\Tax\Transaction::OBJECT_NAME => \Stripe\Tax\Transaction::class,
+ \Stripe\Tax\TransactionLineItem::OBJECT_NAME => \Stripe\Tax\TransactionLineItem::class,
+ \Stripe\TaxCode::OBJECT_NAME => \Stripe\TaxCode::class,
+ \Stripe\TaxDeductedAtSource::OBJECT_NAME => \Stripe\TaxDeductedAtSource::class,
+ \Stripe\TaxId::OBJECT_NAME => \Stripe\TaxId::class,
+ \Stripe\TaxRate::OBJECT_NAME => \Stripe\TaxRate::class,
+ \Stripe\Terminal\Configuration::OBJECT_NAME => \Stripe\Terminal\Configuration::class,
+ \Stripe\Terminal\ConnectionToken::OBJECT_NAME => \Stripe\Terminal\ConnectionToken::class,
+ \Stripe\Terminal\Location::OBJECT_NAME => \Stripe\Terminal\Location::class,
+ \Stripe\Terminal\Reader::OBJECT_NAME => \Stripe\Terminal\Reader::class,
+ \Stripe\TestHelpers\TestClock::OBJECT_NAME => \Stripe\TestHelpers\TestClock::class,
+ \Stripe\Token::OBJECT_NAME => \Stripe\Token::class,
+ \Stripe\Topup::OBJECT_NAME => \Stripe\Topup::class,
+ \Stripe\Transfer::OBJECT_NAME => \Stripe\Transfer::class,
+ \Stripe\TransferReversal::OBJECT_NAME => \Stripe\TransferReversal::class,
+ \Stripe\Treasury\CreditReversal::OBJECT_NAME => \Stripe\Treasury\CreditReversal::class,
+ \Stripe\Treasury\DebitReversal::OBJECT_NAME => \Stripe\Treasury\DebitReversal::class,
+ \Stripe\Treasury\FinancialAccount::OBJECT_NAME => \Stripe\Treasury\FinancialAccount::class,
+ \Stripe\Treasury\FinancialAccountFeatures::OBJECT_NAME => \Stripe\Treasury\FinancialAccountFeatures::class,
+ \Stripe\Treasury\InboundTransfer::OBJECT_NAME => \Stripe\Treasury\InboundTransfer::class,
+ \Stripe\Treasury\OutboundPayment::OBJECT_NAME => \Stripe\Treasury\OutboundPayment::class,
+ \Stripe\Treasury\OutboundTransfer::OBJECT_NAME => \Stripe\Treasury\OutboundTransfer::class,
+ \Stripe\Treasury\ReceivedCredit::OBJECT_NAME => \Stripe\Treasury\ReceivedCredit::class,
+ \Stripe\Treasury\ReceivedDebit::OBJECT_NAME => \Stripe\Treasury\ReceivedDebit::class,
+ \Stripe\Treasury\Transaction::OBJECT_NAME => \Stripe\Treasury\Transaction::class,
+ \Stripe\Treasury\TransactionEntry::OBJECT_NAME => \Stripe\Treasury\TransactionEntry::class,
+ \Stripe\UsageRecord::OBJECT_NAME => \Stripe\UsageRecord::class,
+ \Stripe\UsageRecordSummary::OBJECT_NAME => \Stripe\UsageRecordSummary::class,
+ \Stripe\WebhookEndpoint::OBJECT_NAME => \Stripe\WebhookEndpoint::class,
+ // object classes: The end of the section generated from our OpenAPI spec
+ ];
+
+ /**
+ * @var array Mapping from v2 object types to resource classes
+ */
+ const v2Mapping = [
+ // v2 object classes: The beginning of the section generated from our OpenAPI spec
+ \Stripe\V2\Billing\MeterEvent::OBJECT_NAME => \Stripe\V2\Billing\MeterEvent::class,
+ \Stripe\V2\Billing\MeterEventAdjustment::OBJECT_NAME => \Stripe\V2\Billing\MeterEventAdjustment::class,
+ \Stripe\V2\Billing\MeterEventSession::OBJECT_NAME => \Stripe\V2\Billing\MeterEventSession::class,
+ \Stripe\V2\Event::OBJECT_NAME => \Stripe\V2\Event::class,
+ \Stripe\V2\EventDestination::OBJECT_NAME => \Stripe\V2\EventDestination::class,
+ // v2 object classes: The end of the section generated from our OpenAPI spec
+ ];
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Util/RandomGenerator.php b/plugins/stripe-php/lib/Util/RandomGenerator.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/Util/RandomGenerator.php
rename to plugins/stripe-php/lib/Util/RandomGenerator.php
diff --git a/plugins/stripe-php-10.5.0/lib/Util/RequestOptions.php b/plugins/stripe-php/lib/Util/RequestOptions.php
similarity index 80%
rename from plugins/stripe-php-10.5.0/lib/Util/RequestOptions.php
rename to plugins/stripe-php/lib/Util/RequestOptions.php
index cce3a521..62412ebd 100644
--- a/plugins/stripe-php-10.5.0/lib/Util/RequestOptions.php
+++ b/plugins/stripe-php/lib/Util/RequestOptions.php
@@ -2,6 +2,10 @@
namespace Stripe\Util;
+/**
+ * @phpstan-type RequestOptionsArray array{api_key?: string, idempotency_key?: string, stripe_account?: string, stripe_context?: string, stripe_version?: string, api_base?: string }
+ * @psalm-type RequestOptionsArray = array{api_key?: string, idempotency_key?: string, stripe_account?: string, stripe_context?: string, stripe_version?: string, api_base?: string }
+ */
class RequestOptions
{
/**
@@ -125,11 +129,21 @@ class RequestOptions
unset($options['idempotency_key']);
}
if (\array_key_exists('stripe_account', $options)) {
- $headers['Stripe-Account'] = $options['stripe_account'];
+ if (null !== $options['stripe_account']) {
+ $headers['Stripe-Account'] = $options['stripe_account'];
+ }
unset($options['stripe_account']);
}
+ if (\array_key_exists('stripe_context', $options)) {
+ if (null !== $options['stripe_context']) {
+ $headers['Stripe-Context'] = $options['stripe_context'];
+ }
+ unset($options['stripe_context']);
+ }
if (\array_key_exists('stripe_version', $options)) {
- $headers['Stripe-Version'] = $options['stripe_version'];
+ if (null !== $options['stripe_version']) {
+ $headers['Stripe-Version'] = $options['stripe_version'];
+ }
unset($options['stripe_version']);
}
if (\array_key_exists('api_base', $options)) {
@@ -147,9 +161,9 @@ class RequestOptions
}
$message = 'The second argument to Stripe API method calls is an '
- . 'optional per-request apiKey, which must be a string, or '
- . 'per-request options, which must be an array. (HINT: you can set '
- . 'a global apiKey by "Stripe::setApiKey(true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $payload The payload of the event. This must contain the fields corresponding to a meter’s customer_mapping.event_payload_key (default is stripe_customer_id) and value_settings.event_payload_key (default is value). Read more about the payload.
+ * @property int $timestamp The time of the event. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
+ */
+class MeterEvent extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'v2.billing.meter_event';
+}
diff --git a/plugins/stripe-php/lib/V2/Billing/MeterEventAdjustment.php b/plugins/stripe-php/lib/V2/Billing/MeterEventAdjustment.php
new file mode 100644
index 00000000..aa10ce37
--- /dev/null
+++ b/plugins/stripe-php/lib/V2/Billing/MeterEventAdjustment.php
@@ -0,0 +1,23 @@
+event_name field on a meter.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property string $status Open Enum. The meter event adjustment’s status.
+ * @property string $type Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ */
+class MeterEventAdjustment extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'v2.billing.meter_event_adjustment';
+
+ const STATUS_COMPLETE = 'complete';
+ const STATUS_PENDING = 'pending';
+}
diff --git a/plugins/stripe-php/lib/V2/Billing/MeterEventSession.php b/plugins/stripe-php/lib/V2/Billing/MeterEventSession.php
new file mode 100644
index 00000000..14ae5cdd
--- /dev/null
+++ b/plugins/stripe-php/lib/V2/Billing/MeterEventSession.php
@@ -0,0 +1,18 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ */
+class MeterEventSession extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'v2.billing.meter_event_session';
+}
diff --git a/plugins/stripe-php/lib/V2/Collection.php b/plugins/stripe-php/lib/V2/Collection.php
new file mode 100644
index 00000000..d8a1ded6
--- /dev/null
+++ b/plugins/stripe-php/lib/V2/Collection.php
@@ -0,0 +1,110 @@
+
+ *
+ * @property null|string $next_page_url
+ * @property null|string $previous_page_url
+ * @property TStripeObject[] $data
+ */
+class Collection extends \Stripe\StripeObject implements \Countable, \IteratorAggregate
+{
+ const OBJECT_NAME = 'list';
+
+ use \Stripe\ApiOperations\Request;
+
+ /**
+ * @return string the base URL for the given class
+ */
+ public static function baseUrl()
+ {
+ return \Stripe\Stripe::$apiBase;
+ }
+
+ /**
+ * @return mixed
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($k)
+ {
+ if (\is_string($k)) {
+ return parent::offsetGet($k);
+ }
+ $msg = "You tried to access the {$k} index, but V2Collection " .
+ 'types only support string keys. (HINT: List calls ' .
+ 'return an object with a `data` (which is the data ' .
+ "array). You likely want to call ->data[{$k}])";
+
+ throw new \Stripe\Exception\InvalidArgumentException($msg);
+ }
+
+ /**
+ * @return int the number of objects in the current page
+ */
+ #[\ReturnTypeWillChange]
+ public function count()
+ {
+ return \count($this->data);
+ }
+
+ /**
+ * @return \ArrayIterator an iterator that can be used to iterate
+ * across objects in the current page
+ */
+ #[\ReturnTypeWillChange]
+ public function getIterator()
+ {
+ return new \ArrayIterator($this->data);
+ }
+
+ /**
+ * @return \ArrayIterator an iterator that can be used to iterate
+ * backwards across objects in the current page
+ */
+ public function getReverseIterator()
+ {
+ return new \ArrayIterator(\array_reverse($this->data));
+ }
+
+ /**
+ * @throws \Stripe\Exception\ApiErrorException
+ *
+ * @return \Generator|TStripeObject[] A generator that can be used to
+ * iterate across all objects across all pages. As page boundaries are
+ * encountered, the next page will be fetched automatically for
+ * continued iteration.
+ */
+ public function autoPagingIterator()
+ {
+ $page = $this->data;
+ $next_page_url = $this->next_page_url;
+
+ while (true) {
+ foreach ($page as $item) {
+ yield $item;
+ }
+ if (null === $next_page_url) {
+ break;
+ }
+
+ list($response, $opts) = $this->_request(
+ 'get',
+ $next_page_url,
+ null,
+ null,
+ [],
+ 'v2'
+ );
+ $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts, 'v2');
+ /** @phpstan-ignore-next-line */
+ $page = $obj->data;
+ /** @phpstan-ignore-next-line */
+ $next_page_url = $obj->next_page_url;
+ }
+ }
+}
diff --git a/plugins/stripe-php/lib/V2/Event.php b/plugins/stripe-php/lib/V2/Event.php
new file mode 100644
index 00000000..a8ac4dbb
--- /dev/null
+++ b/plugins/stripe-php/lib/V2/Event.php
@@ -0,0 +1,16 @@
+true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property null|\Stripe\StripeObject $metadata Metadata.
+ * @property string $name Event destination name.
+ * @property null|string $snapshot_api_version If using the snapshot event payload, the API version events are rendered as.
+ * @property string $status Status. It can be set to either enabled or disabled.
+ * @property null|\Stripe\StripeObject $status_details Additional information about event destination status.
+ * @property string $type Event destination type.
+ * @property int $updated Time at which the object was last updated.
+ * @property null|\Stripe\StripeObject $webhook_endpoint Webhook endpoint configuration.
+ */
+class EventDestination extends \Stripe\ApiResource
+{
+ const OBJECT_NAME = 'v2.core.event_destination';
+
+ const EVENT_PAYLOAD_SNAPSHOT = 'snapshot';
+ const EVENT_PAYLOAD_THIN = 'thin';
+
+ const STATUS_DISABLED = 'disabled';
+ const STATUS_ENABLED = 'enabled';
+
+ const TYPE_AMAZON_EVENTBRIDGE = 'amazon_eventbridge';
+ const TYPE_WEBHOOK_ENDPOINT = 'webhook_endpoint';
+}
diff --git a/plugins/stripe-php-10.5.0/lib/Webhook.php b/plugins/stripe-php/lib/Webhook.php
similarity index 92%
rename from plugins/stripe-php-10.5.0/lib/Webhook.php
rename to plugins/stripe-php/lib/Webhook.php
index b9db2d6c..9d92b0ef 100644
--- a/plugins/stripe-php-10.5.0/lib/Webhook.php
+++ b/plugins/stripe-php/lib/Webhook.php
@@ -7,7 +7,7 @@ abstract class Webhook
const DEFAULT_TOLERANCE = 300;
/**
- * Returns an Event instance using the provided JSON payload. Throws an
+ * Returns an Events instance using the provided JSON payload. Throws an
* Exception\UnexpectedValueException if the payload is not valid JSON, and
* an Exception\SignatureVerificationException if the signature
* verification fails for any reason.
@@ -22,7 +22,7 @@ abstract class Webhook
* @throws Exception\UnexpectedValueException if the payload is not valid JSON,
* @throws Exception\SignatureVerificationException if the verification fails
*
- * @return Event the Event instance
+ * @return Event the Events instance
*/
public static function constructEvent($payload, $sigHeader, $secret, $tolerance = self::DEFAULT_TOLERANCE)
{
diff --git a/plugins/stripe-php/lib/WebhookEndpoint.php b/plugins/stripe-php/lib/WebhookEndpoint.php
new file mode 100644
index 00000000..0d500f29
--- /dev/null
+++ b/plugins/stripe-php/lib/WebhookEndpoint.php
@@ -0,0 +1,147 @@
+webhook endpoints via the API to be
+ * notified about events that happen in your Stripe account or connected
+ * accounts.
+ *
+ * Most users configure webhooks from the dashboard, which provides a user interface for registering and testing your webhook endpoints.
+ *
+ * Related guide: Setting up webhooks
+ *
+ * @property string $id Unique identifier for the object.
+ * @property string $object String representing the object's type. Objects of the same type share the same value.
+ * @property null|string $api_version The API version events are rendered as for this webhook endpoint.
+ * @property null|string $application The ID of the associated Connect application.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property null|string $description An optional description of what the webhook is used for.
+ * @property string[] $enabled_events The list of events to enable for this endpoint. ['*'] indicates that all events are enabled, except those that require explicit selection.
+ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
+ * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ * @property null|string $secret The endpoint's secret, used to generate webhook signatures. Only returned at creation.
+ * @property string $status The status of the webhook. It can be enabled or disabled.
+ * @property string $url The URL of the webhook endpoint.
+ */
+class WebhookEndpoint extends ApiResource
+{
+ const OBJECT_NAME = 'webhook_endpoint';
+
+ use ApiOperations\Update;
+
+ /**
+ * A webhook endpoint must have a url and a list of
+ * enabled_events. You may optionally specify the Boolean
+ * connect parameter. If set to true, then a Connect webhook endpoint
+ * that notifies the specified url about events from all connected
+ * accounts is created; otherwise an account webhook endpoint that notifies the
+ * specified url only about events from your account is created. You
+ * can also create webhook endpoints in the webhooks settings
+ * section of the Dashboard.
+ *
+ * @param null|array $params
+ * @param null|array|string $options
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\WebhookEndpoint the created resource
+ */
+ public static function create($params = null, $options = null)
+ {
+ self::_validateParams($params);
+ $url = static::classUrl();
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+
+ /**
+ * You can also delete webhook endpoints via the webhook endpoint
+ * management page of the Stripe dashboard.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\WebhookEndpoint the deleted resource
+ */
+ public function delete($params = null, $opts = null)
+ {
+ self::_validateParams($params);
+
+ $url = $this->instanceUrl();
+ list($response, $opts) = $this->_request('delete', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+
+ /**
+ * Returns a list of your webhook endpoints.
+ *
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\Collection<\Stripe\WebhookEndpoint> of ApiResources
+ */
+ public static function all($params = null, $opts = null)
+ {
+ $url = static::classUrl();
+
+ return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
+ }
+
+ /**
+ * Retrieves the webhook endpoint with the given ID.
+ *
+ * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\WebhookEndpoint
+ */
+ public static function retrieve($id, $opts = null)
+ {
+ $opts = \Stripe\Util\RequestOptions::parse($opts);
+ $instance = new static($id, $opts);
+ $instance->refresh();
+
+ return $instance;
+ }
+
+ /**
+ * Updates the webhook endpoint. You may edit the url, the list of
+ * enabled_events, and the status of your endpoint.
+ *
+ * @param string $id the ID of the resource to update
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\WebhookEndpoint the updated resource
+ */
+ public static function update($id, $params = null, $opts = null)
+ {
+ self::_validateParams($params);
+ $url = static::resourceUrl($id);
+
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+ $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+ $obj->setLastResponse($response);
+
+ return $obj;
+ }
+}
diff --git a/plugins/stripe-php-10.5.0/lib/WebhookSignature.php b/plugins/stripe-php/lib/WebhookSignature.php
similarity index 100%
rename from plugins/stripe-php-10.5.0/lib/WebhookSignature.php
rename to plugins/stripe-php/lib/WebhookSignature.php
diff --git a/post/admin/admin_settings_online_payment_clients.php b/post/admin/admin_settings_online_payment_clients.php
index 651674d0..656466db 100644
--- a/post/admin/admin_settings_online_payment_clients.php
+++ b/post/admin/admin_settings_online_payment_clients.php
@@ -16,7 +16,7 @@ if (isset($_GET['stripe_remove_pm'])) {
try {
// Initialize stripe
- require_once 'plugins/stripe-php-10.5.0/init.php';
+ require_once 'plugins/stripe-php/init.php';
$stripe = new \Stripe\StripeClient($config_stripe_secret);
// Detach PM
diff --git a/post/user/invoice.php b/post/user/invoice.php
index 424e9af6..0da9a3c0 100644
--- a/post/user/invoice.php
+++ b/post/user/invoice.php
@@ -953,7 +953,7 @@ if (isset($_GET['add_payment_stripe'])) {
}
// Initialize Stripe
- require_once __DIR__ . '/../../plugins/stripe-php-10.5.0/init.php';
+ require_once __DIR__ . '/../../plugins/stripe-php/init.php';
$stripe = new \Stripe\StripeClient($config_stripe_secret);
$balance_to_pay = round($invoice_amount, 2);
diff --git a/scripts/cron.php b/scripts/cron.php
index 4df62f61..52a3cce6 100644
--- a/scripts/cron.php
+++ b/scripts/cron.php
@@ -708,7 +708,7 @@ while ($row = mysqli_fetch_array($sql_recurring)) {
if ($config_stripe_enable && $stripe_id && $stripe_pm) {
// Initialize
- require_once __DIR__ . '/../plugins/stripe-php-10.5.0/init.php';
+ require_once __DIR__ . '/../plugins/stripe-php/init.php';
$stripe = new \Stripe\StripeClient($config_stripe_secret);
$balance_to_pay = round($invoice_amount, 2);