Method: Tang::CreateSubscription.finalize_customer

Defined in:
app/services/tang/create_subscription.rb

.finalize_customer(customer, subscription, stripe_card) ⇒ Object



90
91
92
93
94
95
96
97
# File 'app/services/tang/create_subscription.rb', line 90

def self.finalize_customer(customer, subscription, stripe_card)
  # Remove temporary coupon
  customer.subscription_coupon = nil
  # Save subscription data to customer
  customer.update_subscription_end(subscription)
  # Save the payment method
  customer.update_card_from_stripe(stripe_card)
end