You are here

public function Subscription::setPaymentMethod in Commerce Recurring Framework 8

Sets the payment method.

Parameters

\Drupal\commerce_payment\Entity\PaymentMethodInterface $payment_method: The payment method.

Return value

$this

Overrides SubscriptionInterface::setPaymentMethod

File

src/Entity/Subscription.php, line 177

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

public function setPaymentMethod(PaymentMethodInterface $payment_method) {
  $this
    ->set('payment_method', $payment_method);
  return $this;
}