Class: Paid::Plan
- Inherits:
-
APIResource
- Object
- APIResource
- Paid::Plan
- Defined in:
- lib/paid/plan.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#interval_count ⇒ Object
Returns the value of attribute interval_count.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Attributes inherited from APIResource
Class Method Summary collapse
- .all(params = {}, headers = {}) ⇒ Object
- .create(params = {}, headers = {}) ⇒ Object
- .retrieve(id, params = {}, headers = {}) ⇒ Object
Instance Method Summary collapse
Methods inherited from APIResource
add_api_attribute, api_attribute_names, #api_attributes, api_subclass_fetch, api_subclasses, #changed_api_attributes, #clear_api_attributes, determine_api_attribute_value, #determine_api_attribute_value, #initialize, #inspect, #inspect_api_attributes, #inspect_nested, #refresh_from, register_api_subclass, #to_json
Constructor Details
This class inherits a constructor from Paid::APIResource
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
6 7 8 |
# File 'lib/paid/plan.rb', line 6 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/paid/plan.rb', line 5 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/paid/plan.rb', line 8 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/paid/plan.rb', line 3 def id @id end |
#interval ⇒ Object
Returns the value of attribute interval.
9 10 11 |
# File 'lib/paid/plan.rb', line 9 def interval @interval end |
#interval_count ⇒ Object
Returns the value of attribute interval_count.
10 11 12 |
# File 'lib/paid/plan.rb', line 10 def interval_count @interval_count end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/paid/plan.rb', line 7 def name @name end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
4 5 6 |
# File 'lib/paid/plan.rb', line 4 def object @object end |
Class Method Details
.all(params = {}, headers = {}) ⇒ Object
12 13 14 15 |
# File 'lib/paid/plan.rb', line 12 def self.all(params={}, headers={}) method = APIMethod.new(:get, "/plans", params, headers, self) APIList.new(self, method.execute, method) end |
.create(params = {}, headers = {}) ⇒ Object
25 26 27 28 |
# File 'lib/paid/plan.rb', line 25 def self.create(params={}, headers={}) method = APIMethod.new(:post, "/plans", params, headers, self) self.new(method.execute, method) end |
.retrieve(id, params = {}, headers = {}) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/paid/plan.rb', line 17 def self.retrieve(id, params={}, headers={}) params = ParamsBuilder.merge(params, { :id => id }) method = APIMethod.new(:get, "/plans/:id", params, headers, self) self.new(method.execute, method) end |