Module: Reji::Prorates

Extended by:
ActiveSupport::Concern
Included in:
Subscription, SubscriptionBuilder, SubscriptionItem
Defined in:
lib/reji/concerns/prorates.rb

Instance Method Summary collapse

Instance Method Details

#always_invoiceObject

Indicate that the plan change should always be invoiced.



22
23
24
# File 'lib/reji/concerns/prorates.rb', line 22

def always_invoice
  @proration_behavior = 'always_invoice'
end

#no_prorateObject

Indicate that the plan change should not be prorated.



8
9
10
11
12
# File 'lib/reji/concerns/prorates.rb', line 8

def no_prorate
  @proration_behavior = 'none'

  self
end

#prorateObject

Indicate that the plan change should be prorated.



15
16
17
18
19
# File 'lib/reji/concerns/prorates.rb', line 15

def prorate
  @proration_behavior = 'create_prorations'

  self
end

#proration_behaviorObject

Determine the prorating behavior when updating the subscription.



34
35
36
# File 'lib/reji/concerns/prorates.rb', line 34

def proration_behavior
  @proration_behavior ||= 'create_prorations'
end

#set_proration_behavior(value) ⇒ Object

Set the prorating behavior.



27
28
29
30
31
# File 'lib/reji/concerns/prorates.rb', line 27

def set_proration_behavior(value)
  @proration_behavior = value

  self
end