/home/techb158/immovalet.com/vendor/laravel/cashier/src
Edit: /home/techb158/immovalet.com/vendor/laravel/cashier/src/PaymentMethod.php (2583B)
stripe_id !== $paymentMethod->customer) {
throw InvalidPaymentMethod::invalidOwner($paymentMethod, $owner);
}
$this->owner = $owner;
$this->paymentMethod = $paymentMethod;
}
/**
* Delete the payment method.
*
* @return \Stripe\PaymentMethod
*/
public function delete()
{
return $this->owner->removePaymentMethod($this->paymentMethod);
}
/**
* Get the Stripe model instance.
*
* @return \Illuminate\Database\Eloquent\Model
*/
public function owner()
{
return $this->owner;
}
/**
* Get the Stripe PaymentMethod instance.
*
* @return \Stripe\PaymentMethod
*/
public function asStripePaymentMethod()
{
return $this->paymentMethod;
}
/**
* Get the instance as an array.
*
* @return array
*/
public function toArray()
{
return $this->asStripePaymentMethod()->toArray();
}
/**
* Convert the object to its JSON representation.
*
* @param int $options
* @return string
*/
public function toJson($options = 0)
{
return json_encode($this->jsonSerialize(), $options);
}
/**
* Convert the object into something JSON serializable.
*
* @return array
*/
public function jsonSerialize()
{
return $this->toArray();
}
/**
* Dynamically get values from the Stripe object.
*
* @param string $key
* @return mixed
*/
public function __get($key)
{
return $this->paymentMethod->{$key};
}
}