Class: ChargeBee::Subscription
- Defined in:
- lib/chargebee/models/subscription.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#activated_at ⇒ Object
Returns the value of attribute activated_at.
-
#addons ⇒ Object
Returns the value of attribute addons.
-
#cancel_reason ⇒ Object
Returns the value of attribute cancel_reason.
-
#cancelled_at ⇒ Object
Returns the value of attribute cancelled_at.
-
#coupon ⇒ Object
Returns the value of attribute coupon.
-
#coupons ⇒ Object
Returns the value of attribute coupons.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#current_term_end ⇒ Object
Returns the value of attribute current_term_end.
-
#current_term_start ⇒ Object
Returns the value of attribute current_term_start.
-
#due_invoices_count ⇒ Object
Returns the value of attribute due_invoices_count.
-
#due_since ⇒ Object
Returns the value of attribute due_since.
-
#id ⇒ Object
Returns the value of attribute id.
-
#plan_id ⇒ Object
Returns the value of attribute plan_id.
-
#plan_quantity ⇒ Object
Returns the value of attribute plan_quantity.
-
#remaining_billing_cycles ⇒ Object
Returns the value of attribute remaining_billing_cycles.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#status ⇒ Object
Returns the value of attribute status.
-
#total_dues ⇒ Object
Returns the value of attribute total_dues.
-
#trial_end ⇒ Object
Returns the value of attribute trial_end.
-
#trial_start ⇒ Object
Returns the value of attribute trial_start.
Class Method Summary collapse
- .add_credit(id, params, env = nil) ⇒ Object
- .cancel(id, params = {}, env = nil) ⇒ Object
- .change_term_end(id, params, env = nil) ⇒ Object
-
.create(params, env = nil) ⇒ Object
OPERATIONS ———–.
- .create_for_customer(id, params, env = nil) ⇒ Object
- .list(params = {}, env = nil) ⇒ Object
- .reactivate(id, params = {}, env = nil) ⇒ Object
- .retrieve(id, env = nil) ⇒ Object
- .subscriptions_for_customer(id, params = {}, env = nil) ⇒ Object
- .update(id, params = {}, env = nil) ⇒ Object
Methods inherited from Model
construct, #initialize, #inspect, #load, #method_missing, #to_s
Constructor Details
This class inherits a constructor from ChargeBee::Model
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ChargeBee::Model
Instance Attribute Details
#activated_at ⇒ Object
Returns the value of attribute activated_at.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def activated_at @activated_at end |
#addons ⇒ Object
Returns the value of attribute addons.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def addons @addons end |
#cancel_reason ⇒ Object
Returns the value of attribute cancel_reason.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def cancel_reason @cancel_reason end |
#cancelled_at ⇒ Object
Returns the value of attribute cancelled_at.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def cancelled_at @cancelled_at end |
#coupon ⇒ Object
Returns the value of attribute coupon.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def coupon @coupon end |
#coupons ⇒ Object
Returns the value of attribute coupons.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def coupons @coupons end |
#created_at ⇒ Object
Returns the value of attribute created_at.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def created_at @created_at end |
#current_term_end ⇒ Object
Returns the value of attribute current_term_end.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def current_term_end @current_term_end end |
#current_term_start ⇒ Object
Returns the value of attribute current_term_start.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def current_term_start @current_term_start end |
#due_invoices_count ⇒ Object
Returns the value of attribute due_invoices_count.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def due_invoices_count @due_invoices_count end |
#due_since ⇒ Object
Returns the value of attribute due_since.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def due_since @due_since end |
#id ⇒ Object
Returns the value of attribute id.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def id @id end |
#plan_id ⇒ Object
Returns the value of attribute plan_id.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def plan_id @plan_id end |
#plan_quantity ⇒ Object
Returns the value of attribute plan_quantity.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def plan_quantity @plan_quantity end |
#remaining_billing_cycles ⇒ Object
Returns the value of attribute remaining_billing_cycles.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def remaining_billing_cycles @remaining_billing_cycles end |
#start_date ⇒ Object
Returns the value of attribute start_date.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def start_date @start_date end |
#started_at ⇒ Object
Returns the value of attribute started_at.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def started_at @started_at end |
#status ⇒ Object
Returns the value of attribute status.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def status @status end |
#total_dues ⇒ Object
Returns the value of attribute total_dues.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def total_dues @total_dues end |
#trial_end ⇒ Object
Returns the value of attribute trial_end.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def trial_end @trial_end end |
#trial_start ⇒ Object
Returns the value of attribute trial_start.
12 13 14 |
# File 'lib/chargebee/models/subscription.rb', line 12 def trial_start @trial_start end |
Class Method Details
.add_credit(id, params, env = nil) ⇒ Object
56 57 58 |
# File 'lib/chargebee/models/subscription.rb', line 56 def self.add_credit(id, params, env=nil) Request.send('post', "/subscriptions/#{id.to_s}/add_credit", params, env) end |
.cancel(id, params = {}, env = nil) ⇒ Object
48 49 50 |
# File 'lib/chargebee/models/subscription.rb', line 48 def self.cancel(id, params={}, env=nil) Request.send('post', "/subscriptions/#{id.to_s}/cancel", params, env) end |
.change_term_end(id, params, env = nil) ⇒ Object
44 45 46 |
# File 'lib/chargebee/models/subscription.rb', line 44 def self.change_term_end(id, params, env=nil) Request.send('post', "/subscriptions/#{id.to_s}/change_term_end", params, env) end |
.create(params, env = nil) ⇒ Object
OPERATIONS
20 21 22 |
# File 'lib/chargebee/models/subscription.rb', line 20 def self.create(params, env=nil) Request.send('post', "/subscriptions", params, env) end |
.create_for_customer(id, params, env = nil) ⇒ Object
24 25 26 |
# File 'lib/chargebee/models/subscription.rb', line 24 def self.create_for_customer(id, params, env=nil) Request.send('post', "/customers/#{id.to_s}/subscriptions", params, env) end |
.list(params = {}, env = nil) ⇒ Object
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def self.list(params={}, env=nil) Request.send('get', "/subscriptions", params, env) end |
.reactivate(id, params = {}, env = nil) ⇒ Object
52 53 54 |
# File 'lib/chargebee/models/subscription.rb', line 52 def self.reactivate(id, params={}, env=nil) Request.send('post', "/subscriptions/#{id.to_s}/reactivate", params, env) end |
.retrieve(id, env = nil) ⇒ Object
36 37 38 |
# File 'lib/chargebee/models/subscription.rb', line 36 def self.retrieve(id, env=nil) Request.send('get', "/subscriptions/#{id.to_s}", {}, env) end |