Class: ChargeBee::Plan

Inherits:
Model
  • Object
show all
Defined in:
lib/chargebee/models/plan.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #initialize, #inspect, #load, #method_missing, #to_s, uri_path

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

#archived_atObject

Returns the value of attribute archived_at.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def archived_at
  @archived_at
end

#billing_cyclesObject

Returns the value of attribute billing_cycles.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def billing_cycles
  @billing_cycles
end

#charge_modelObject

Returns the value of attribute charge_model.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def charge_model
  @charge_model
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def description
  @description
end

#downgrade_penaltyObject

Returns the value of attribute downgrade_penalty.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def downgrade_penalty
  @downgrade_penalty
end

#enabled_in_hosted_pagesObject

Returns the value of attribute enabled_in_hosted_pages.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def enabled_in_hosted_pages
  @enabled_in_hosted_pages
end

#free_quantityObject

Returns the value of attribute free_quantity.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def free_quantity
  @free_quantity
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def id
  @id
end

#invoice_nameObject

Returns the value of attribute invoice_name.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def invoice_name
  @invoice_name
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def name
  @name
end

#periodObject

Returns the value of attribute period.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def period
  @period
end

#period_unitObject

Returns the value of attribute period_unit.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def period_unit
  @period_unit
end

#priceObject

Returns the value of attribute price.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def price
  @price
end

#redirect_urlObject

Returns the value of attribute redirect_url.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def redirect_url
  @redirect_url
end

#setup_costObject

Returns the value of attribute setup_cost.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def setup_cost
  @setup_cost
end

#statusObject

Returns the value of attribute status.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def status
  @status
end

#trial_periodObject

Returns the value of attribute trial_period.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def trial_period
  @trial_period
end

#trial_period_unitObject

Returns the value of attribute trial_period_unit.



4
5
6
# File 'lib/chargebee/models/plan.rb', line 4

def trial_period_unit
  @trial_period_unit
end

Class Method Details

.create(params, env = nil) ⇒ Object

OPERATIONS




11
12
13
# File 'lib/chargebee/models/plan.rb', line 11

def self.create(params, env=nil)
  Request.send('post', uri_path("plans"), params, env)
end

.delete(id, env = nil) ⇒ Object



27
28
29
# File 'lib/chargebee/models/plan.rb', line 27

def self.delete(id, env=nil)
  Request.send('post', uri_path("plans",id.to_s,"delete"), {}, env)
end

.list(params = {}, env = nil) ⇒ Object



19
20
21
# File 'lib/chargebee/models/plan.rb', line 19

def self.list(params={}, env=nil)
  Request.send('get', uri_path("plans"), params, env)
end

.retrieve(id, env = nil) ⇒ Object



23
24
25
# File 'lib/chargebee/models/plan.rb', line 23

def self.retrieve(id, env=nil)
  Request.send('get', uri_path("plans",id.to_s), {}, env)
end

.update(id, params = {}, env = nil) ⇒ Object



15
16
17
# File 'lib/chargebee/models/plan.rb', line 15

def self.update(id, params={}, env=nil)
  Request.send('post', uri_path("plans",id.to_s), params, env)
end