Skip to Content Skip to Search
Methods
A
N
P
R

Attributes

[R] coupon
[R] coupon_code
[R] member
[R] old_subscription
[R] payment_method
[R] plan
[R] referrals
[R] stripe_order
[R] subscription_id
[R] token

Class Public methods

new(args = {})

# File app/actions/action/billing/base.rb, line 7
def initialize(args = {})
  @plan = args.fetch(:plan)
  @member = args.fetch(:member)
  @token = args[:card_token]
  @billing_coupon = Action::Billing::Coupon.new(code: args[:coupon_code], plan:)
  @coupon_code = @billing_coupon.code
  @coupon = @billing_coupon.coupon
  @referrals = args[:referrals]
end

Instance Public methods

add_member_to_plan()

# File app/actions/action/billing/base.rb, line 31
def add_member_to_plan
  member.plans << plan
end

amount()

# File app/actions/action/billing/base.rb, line 23
def amount
  intent.amount
end

purchase()

# File app/actions/action/billing/base.rb, line 19
def purchase
  raise NotImplementedError, "This #{self.class} needs to define: #{__method__}"
end

recovered_by()

# File app/actions/action/billing/base.rb, line 27
def recovered_by
  member.recovered_by
end