$48 GRAYBYTE WORDPRESS FILE MANAGER $74

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravrvjk/kigalix.com/wp-content/themes/houzez/framework/stripe-php/lib/

HOME
Current File : /home/bravrvjk/kigalix.com/wp-content/themes/houzez/framework/stripe-php/lib//Subscription.php
<?php

// File generated from our OpenAPI spec

namespace Stripe;

/**
 * Subscriptions allow you to charge a customer on a recurring basis.
 *
 * Related guide: <a
 * href="https://stripe.com/docs/billing/subscriptions/creating">Creating
 * Subscriptions</a>.
 *
 * @property string $id Unique identifier for the object.
 * @property string $object String representing the object's type. Objects of the same type share the same value.
 * @property 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 <code>month</code> or <code>year</code> 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 <code>at_period_end</code> flag set to <code>true</code>, <code>cancel_at_period_end</code> 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 <code>cancel_at_period_end</code>, <code>canceled_at</code> will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
 * @property null|\Stripe\StripeObject $cancellation_details Details about why this subscription was cancelled
 * @property string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as <code>active</code>.
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
 * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
 * @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 <code>null</code> for subscriptions where <code>collection_method=charge_automatically</code>.
 * @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 <code>default_source</code>. If neither are set, invoices will use the customer's <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> or <a href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source</a>.
 * @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 <code>default_payment_method</code> is also set, <code>default_payment_method</code> will take precedence. If neither are set, invoices will use the customer's <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> or <a href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source</a>.
 * @property null|\Stripe\TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have <code>tax_rates</code> set. Invoices created will have their <code>default_tax_rates</code> 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 <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
 * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
 * @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at <code>pending_invoice_item_interval</code>.
 * @property null|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 <a href="https://stripe.com/docs/api#create_invoice">Create an invoice</a> for the given subscription at the specified interval.
 * @property null|string|\Stripe\SetupIntent $pending_setup_intent You can use this <a href="https://stripe.com/docs/api/setup_intents">SetupIntent</a> to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the <a href="https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2">SCA Migration Guide</a>.
 * @property null|\Stripe\StripeObject $pending_update If specified, <a href="https://stripe.com/docs/billing/subscriptions/pending-updates">pending updates</a> that will be applied to the subscription once the <code>latest_invoice</code> 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 <code>created</code> date due to backdating.
 * @property string $status <p>Possible values are <code>incomplete</code>, <code>incomplete_expired</code>, <code>trialing</code>, <code>active</code>, <code>past_due</code>, <code>canceled</code>, or <code>unpaid</code>.</p><p>For <code>collection_method=charge_automatically</code> a subscription moves into <code>incomplete</code> 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 <code>active</code> state. If the first invoice is not paid within 23 hours, the subscription transitions to <code>incomplete_expired</code>. This is a terminal state, the open invoice will be voided and no further invoices will be generated.</p><p>A subscription that is currently in a trial period is <code>trialing</code> and moves to <code>active</code> when the trial period is over.</p><p>If subscription <code>collection_method=charge_automatically</code> it becomes <code>past_due</code> when payment to renew it fails and <code>canceled</code> or <code>unpaid</code> (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts.</p><p>If subscription <code>collection_method=send_invoice</code> it becomes <code>past_due</code> when its invoice is not paid by the due date, and <code>canceled</code> or <code>unpaid</code> if it is still not paid by an additional deadline after that. Note that when a subscription has a status of <code>unpaid</code>, 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.</p>
 * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription belongs to.
 * @property null|\Stripe\StripeObject $transfer_data The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
 * @property null|int $trial_end If the subscription has a trial, the end of that trial.
 * @property null|\Stripe\StripeObject $trial_settings Settings related to subscription trials.
 * @property null|int $trial_start If the subscription has a trial, the beginning of that trial.
 */
class Subscription extends ApiResource
{
    const OBJECT_NAME = 'subscription';

    use ApiOperations\All;
    use ApiOperations\Create;
    use ApiOperations\Retrieve;
    use ApiOperations\Search;
    use ApiOperations\Update;

    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';

    const STATUS_ACTIVE = 'active';
    const STATUS_CANCELED = 'canceled';
    const STATUS_INCOMPLETE = 'incomplete';
    const STATUS_INCOMPLETE_EXPIRED = 'incomplete_expired';
    const STATUS_PAST_DUE = 'past_due';
    const STATUS_PAUSED = 'paused';
    const STATUS_TRIALING = 'trialing';
    const STATUS_UNPAID = 'unpaid';

    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;
    }

    /**
     * @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<Subscription> the subscription search results
     */
    public static function search($params = null, $opts = null)
    {
        $url = '/v1/subscriptions/search';

        return self::_searchResource($url, $params, $opts);
    }
}


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
ApiOperations
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Apps
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
BillingPortal
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Checkout
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Exception
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
FinancialConnections
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
HttpClient
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Identity
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Issuing
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Radar
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Reporting
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Service
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Sigma
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Tax
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Terminal
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
TestHelpers
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Treasury
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Util
--
8 May 2025 7.51 AM
bravrvjk / bravrvjk
0755
Account.php
15.949 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
AccountLink.php
0.811 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
ApiRequestor.php
18.614 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
ApiResource.php
3.408 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
ApiResponse.php
0.695 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
ApplePayDomain.php
0.992 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
ApplicationFee.php
4.155 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
ApplicationFeeRefund.php
2.444 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Balance.php
2.087 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
BalanceTransaction.php
5.541 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
BankAccount.php
7.694 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
BaseStripeClient.php
11.168 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
BaseStripeClientInterface.php
0.967 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Capability.php
2.932 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Card.php
8.226 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
CashBalance.php
2.417 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Charge.php
13.151 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Collection.php
8.308 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
CountrySpec.php
1.742 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Coupon.php
3.434 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
CreditNote.php
6.854 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
CreditNoteLineItem.php
2.177 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Customer.php
17.817 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
CustomerBalanceTransaction.php
5.294 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
CustomerCashBalanceTransaction.php
2.932 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Discount.php
1.533 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Dispute.php
5.075 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
EphemeralKey.php
1.516 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
ErrorObject.php
12.567 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Event.php
17.953 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
ExchangeRate.php
1.412 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
File.php
3.808 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
FileLink.php
1.451 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
FundingInstructions.php
1.38 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Invoice.php
22.681 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
InvoiceItem.php
4.544 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
InvoiceLineItem.php
3.247 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
LineItem.php
1.345 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
LoginLink.php
0.416 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Mandate.php
1.088 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
OAuth.php
3.313 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
OAuthErrorObject.php
0.841 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
PaymentIntent.php
13.623 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
PaymentLink.php
5.996 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
PaymentMethod.php
4.522 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Payout.php
7.313 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Person.php
5.867 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Plan.php
5.561 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Price.php
6.287 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Product.php
4.602 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
PromotionCode.php
2.462 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Quote.php
8.859 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
RecipientTransfer.php
0.896 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Refund.php
4.907 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
RequestTelemetry.php
0.526 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Review.php
3.35 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
SearchResult.php
6.398 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
SetupAttempt.php
3.223 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
SetupIntent.php
8.515 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
ShippingRate.php
2.406 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
SingletonApiResource.php
0.707 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Source.php
8.331 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
SourceTransaction.php
0.398 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Stripe.php
7.081 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
StripeClient.php
4.086 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
StripeClientInterface.php
0.572 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
StripeObject.php
18.834 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
StripeStreamingClientInterface.php
0.232 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Subscription.php
13.623 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
SubscriptionItem.php
4.798 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
SubscriptionSchedule.php
4.302 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
TaxCode.php
0.652 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
TaxId.php
5.442 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
TaxRate.php
3.014 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Token.php
3.554 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Topup.php
3.668 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Transfer.php
5.686 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
TransferReversal.php
3.245 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
UsageRecord.php
0.957 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
UsageRecordSummary.php
0.793 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
Webhook.php
1.479 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
WebhookEndpoint.php
2.262 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644
WebhookSignature.php
4.274 KB
28 Apr 2025 7.40 AM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF