Class: Mousetrap::Plan
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#items ⇒ Object
Returns the value of attribute items.
-
#name ⇒ Object
Returns the value of attribute name.
-
#recurring_charge_amount ⇒ Object
Returns the value of attribute recurring_charge_amount.
Class Method Summary collapse
Methods inherited from Resource
[], #destroy, destroy_all, exists?, #exists?, #initialize, #new?, new_from_api
Constructor Details
This class inherits a constructor from Mousetrap::Resource
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/mousetrap/plan.rb', line 3 def code @code end |
#items ⇒ Object
Returns the value of attribute items.
3 4 5 |
# File 'lib/mousetrap/plan.rb', line 3 def items @items end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/mousetrap/plan.rb', line 3 def name @name end |
#recurring_charge_amount ⇒ Object
Returns the value of attribute recurring_charge_amount.
3 4 5 |
# File 'lib/mousetrap/plan.rb', line 3 def recurring_charge_amount @recurring_charge_amount end |
Class Method Details
.all ⇒ Object
9 10 11 12 13 |
# File 'lib/mousetrap/plan.rb', line 9 def self.all response = get_resources plural_resource_name return [] unless response['plans'] build_resources_from response end |