🚀 Hostinger Optimized
🖥️ Server: Apache
💻 System: Linux webm015.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
👤 User: stakrfrcol (69043)
🐘 PHP: 8.3.31
🚫 Disabled: _dyuweyrj4,_dyuweyrj4r,dl

💻 Terminal

📁 /home/stakrfrcol/agency
$

📄 Subscription.php

📁 Path: /home/stakrfrcol/dolibarr/htdocs/includes/stripe/lib/Subscription.php
📊 Size: 2.46 KB
🔒 Perm: 0604
📝 MIME: text/x-php
<?php

namespace Stripe;

/**
 * Class Subscription
 *
 * @property string $id
 * @property string $object
 * @property float $application_fee_percent
 * @property string $billing
 * @property bool $cancel_at_period_end
 * @property int $canceled_at
 * @property int $created
 * @property int current_period_end
 * @property int current_period_start
 * @property string $customer
 * @property int $days_until_due
 * @property mixed $discount
 * @property int $ended_at
 * @property Collection $items
 * @property boolean $livemode
 * @property StripeObject $metadata
 * @property Plan $plan
 * @property int $quantity
 * @property int $start
 * @property string $status
 * @property float $tax_percent
 * @property int $trial_end
 * @property int $trial_start
 *
 * @package Stripe
 */
class Subscription extends ApiResource
{
    use ApiOperations\All;
    use ApiOperations\Create;
    use ApiOperations\Delete {
        delete as protected _delete;
    }
    use ApiOperations\Retrieve;
    use ApiOperations\Update;

    /**
     * These constants are possible representations of the status field.
     *
     * @link https://stripe.com/docs/api#subscription_object-status
     */
    const STATUS_ACTIVE = 'active';
    const STATUS_CANCELED = 'canceled';
    const STATUS_PAST_DUE = 'past_due';
    const STATUS_TRIALING = 'trialing';
    const STATUS_UNPAID = 'unpaid';

    public static function getSavedNestedResources()
    {
        static $savedNestedResources = null;
        if ($savedNestedResources === null) {
            $savedNestedResources = new Util\Set([
                'source',
            ]);
        }
        return $savedNestedResources;
    }

    /**
     * @param array|null $params
     *
     * @return Subscription The deleted subscription.
     */
    public function cancel($params = null, $opts = null)
    {
        return $this->_delete($params, $opts);
    }

    /**
     * @return Subscription The updated subscription.
     */
    public function deleteDiscount()
    {
        $url = $this->instanceUrl() . '/discount';
        list($response, $opts) = $this->_request('delete', $url);
        $this->refreshFrom(['discount' => null], $opts, true);
    }

    public function serializeParameters($force = false)
    {
        $update = parent::serializeParameters($force);
        if ($this->_unsavedValues->includes('items')) {
            $update['items'] = $this->serializeParamsValue($this->items, null, true, $force, 'items');
        }
        return $update;
    }
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨