Class: Payment::Manager::Plan
- Inherits:
-
Object
- Object
- Payment::Manager::Plan
- Defined in:
- lib/payment/manager/plan.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#details ⇒ Object
Returns the value of attribute details.
-
#duration_in_months ⇒ Object
Returns the value of attribute duration_in_months.
-
#id ⇒ Object
Returns the value of attribute id.
-
#installments ⇒ Object
Returns the value of attribute installments.
-
#name ⇒ Object
Returns the value of attribute name.
-
#price ⇒ Object
Returns the value of attribute price.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(args = nil) ⇒ Plan
constructor
A new instance of Plan.
Constructor Details
#initialize(args = nil) ⇒ Plan
Returns a new instance of Plan.
13 14 15 16 17 |
# File 'lib/payment/manager/plan.rb', line 13 def initialize(args = nil) args&.each do |k, v| instance_variable_set("@#{k}", v) unless v.nil? end end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/payment/manager/plan.rb', line 7 def description @description end |
#details ⇒ Object
Returns the value of attribute details.
11 12 13 |
# File 'lib/payment/manager/plan.rb', line 11 def details @details end |
#duration_in_months ⇒ Object
Returns the value of attribute duration_in_months.
10 11 12 |
# File 'lib/payment/manager/plan.rb', line 10 def duration_in_months @duration_in_months end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/payment/manager/plan.rb', line 5 def id @id end |
#installments ⇒ Object
Returns the value of attribute installments.
9 10 11 |
# File 'lib/payment/manager/plan.rb', line 9 def installments @installments end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/payment/manager/plan.rb', line 6 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
8 9 10 |
# File 'lib/payment/manager/plan.rb', line 8 def price @price end |
Instance Method Details
#eql?(other) ⇒ Boolean
19 20 21 22 23 24 |
# File 'lib/payment/manager/plan.rb', line 19 def eql?(other) id == other.id && name == other.name && description == other.description && price == other.price end |