Beispiel #1
0
 /**
  * Update the quantity of the subscription.
  *
  * @param  \Stripe\Customer  $customer
  * @param  int  $quantity
  * @return void
  */
 public function updateQuantity($customer, $quantity)
 {
     $subscription = ['plan' => $customer->subscription->plan->id, 'quantity' => $quantity];
     if ($trialEnd = $this->getTrialEndForUpdate()) {
         $subscription['trial_end'] = $trialEnd;
     }
     $customer->updateSubscription($subscription);
 }