Class: SpreeCmCommissioner::PaymentMethodGroup
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::PaymentMethodGroup
- Defined in:
- lib/spree_cm_commissioner/payment_method_group.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#payment_method_ids ⇒ Object
Returns the value of attribute payment_method_ids.
-
#payment_methods ⇒ Object
Returns the value of attribute payment_methods.
Instance Method Summary collapse
-
#initialize(name:, payment_methods:) ⇒ PaymentMethodGroup
constructor
A new instance of PaymentMethodGroup.
Constructor Details
#initialize(name:, payment_methods:) ⇒ PaymentMethodGroup
Returns a new instance of PaymentMethodGroup.
5 6 7 8 9 10 |
# File 'lib/spree_cm_commissioner/payment_method_group.rb', line 5 def initialize(name:, payment_methods:) @id = SecureRandom.hex @name = name @payment_methods = payment_methods @payment_method_ids = payment_methods.pluck(:id) end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/spree_cm_commissioner/payment_method_group.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/spree_cm_commissioner/payment_method_group.rb', line 3 def name @name end |
#payment_method_ids ⇒ Object
Returns the value of attribute payment_method_ids.
3 4 5 |
# File 'lib/spree_cm_commissioner/payment_method_group.rb', line 3 def payment_method_ids @payment_method_ids end |
#payment_methods ⇒ Object
Returns the value of attribute payment_methods.
3 4 5 |
# File 'lib/spree_cm_commissioner/payment_method_group.rb', line 3 def payment_methods @payment_methods end |