<?php


namespace App\Extensions;


use Stripe\Subscription as StripeSubscription;

class CustomCashierUserSubscription extends \Laravel\Cashier\Subscription {

    /**
     * Get the subscription as a Stripe subscription object.
     *
     * @param  array  $expand
     * @return \Stripe\Subscription
     */
    public function asStripeSubscription(array $expand = []) {
        return StripeSubscription::retrieve(
            ['id' => $this->stripe_id, 'expand' => $expand],
            $this->owner()->stripeOptions()
        );
    }

}
