Class: SpreeCmCommissioner::PricingModels::PricingPreview

Inherits:
Object
  • Object
show all
Defined in:
lib/spree_cm_commissioner/pricing_models/pricing_preview.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, item_total:, total:, pricing_adjustment_total:, pricing_adjustments:) ⇒ PricingPreview

Returns a new instance of PricingPreview.



6
7
8
9
10
11
12
# File 'lib/spree_cm_commissioner/pricing_models/pricing_preview.rb', line 6

def initialize(id:, item_total:, total:, pricing_adjustment_total:, pricing_adjustments:)
  @id = id
  @item_total = item_total
  @total = total
  @pricing_adjustment_total = pricing_adjustment_total
  @pricing_adjustments = pricing_adjustments
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/spree_cm_commissioner/pricing_models/pricing_preview.rb', line 4

def id
  @id
end

#item_totalObject (readonly)

Returns the value of attribute item_total.



4
5
6
# File 'lib/spree_cm_commissioner/pricing_models/pricing_preview.rb', line 4

def item_total
  @item_total
end

#pricing_adjustment_totalObject (readonly)

Returns the value of attribute pricing_adjustment_total.



4
5
6
# File 'lib/spree_cm_commissioner/pricing_models/pricing_preview.rb', line 4

def pricing_adjustment_total
  @pricing_adjustment_total
end

#pricing_adjustmentsObject (readonly)

Returns the value of attribute pricing_adjustments.



4
5
6
# File 'lib/spree_cm_commissioner/pricing_models/pricing_preview.rb', line 4

def pricing_adjustments
  @pricing_adjustments
end

#totalObject (readonly)

Returns the value of attribute total.



4
5
6
# File 'lib/spree_cm_commissioner/pricing_models/pricing_preview.rb', line 4

def total
  @total
end