Laravel\Cashier\SubscriptionBuilder::getBraintreeCustomer PHP Метод

getBraintreeCustomer() защищенный Метод

Get the Braintree customer instance for the current user and token.
protected getBraintreeCustomer ( string | null $token = null, array $options = [] ) : Customer
$token string | null
$options array
Результат Braintree\Customer
    protected function getBraintreeCustomer($token = null, array $options = [])
    {
        if (!$this->user->braintree_id) {
            $customer = $this->user->createAsBraintreeCustomer($token, $options);
        } else {
            $customer = $this->user->asBraintreeCustomer();
            if ($token) {
                $this->user->updateCard($token);
            }
        }
        return $customer;
    }