Class: SpreeCmCommissioner::PricingModels::PreviewAdjustment
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::PricingModels::PreviewAdjustment
- Defined in:
- lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb
Instance Attribute Summary collapse
-
#action_type ⇒ Object
readonly
Returns the value of attribute action_type.
-
#adjustable_id ⇒ Object
readonly
Returns the value of attribute adjustable_id.
-
#adjustable_type ⇒ Object
readonly
Returns the value of attribute adjustable_type.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#guest_ids ⇒ Object
readonly
Returns the value of attribute guest_ids.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#line_item_id ⇒ Object
readonly
Returns the value of attribute line_item_id.
-
#pricing_action ⇒ Object
readonly
Returns the value of attribute pricing_action.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PreviewAdjustment
constructor
A new instance of PreviewAdjustment.
Constructor Details
#initialize(options = {}) ⇒ PreviewAdjustment
Returns a new instance of PreviewAdjustment.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 7 def initialize( = {}) @id = SecureRandom.uuid @label = [:label] @amount = [:amount] @action_type = [:action_type] @pricing_action = [:pricing_action] @adjustable_type = [:adjustable_type] @adjustable_id = [:adjustable_id] @line_item_id = [:line_item_id] @guest_ids = Array([:guest_ids]) end |
Instance Attribute Details
#action_type ⇒ Object (readonly)
Returns the value of attribute action_type.
4 5 6 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 4 def action_type @action_type end |
#adjustable_id ⇒ Object (readonly)
Returns the value of attribute adjustable_id.
4 5 6 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 4 def adjustable_id @adjustable_id end |
#adjustable_type ⇒ Object (readonly)
Returns the value of attribute adjustable_type.
4 5 6 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 4 def adjustable_type @adjustable_type end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 4 def amount @amount end |
#guest_ids ⇒ Object (readonly)
Returns the value of attribute guest_ids.
4 5 6 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 4 def guest_ids @guest_ids end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 4 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
4 5 6 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 4 def label @label end |
#line_item_id ⇒ Object (readonly)
Returns the value of attribute line_item_id.
4 5 6 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 4 def line_item_id @line_item_id end |
#pricing_action ⇒ Object (readonly)
Returns the value of attribute pricing_action.
4 5 6 |
# File 'lib/spree_cm_commissioner/pricing_models/preview_adjustment.rb', line 4 def pricing_action @pricing_action end |