Class: SolidusFriendlyPromotions::Configuration

Inherits:
Spree::Preferences::Configuration
  • Object
show all
Includes:
EnvironmentExtension
Defined in:
lib/solidus_friendly_promotions/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



10
11
12
13
# File 'lib/solidus_friendly_promotions/configuration.rb', line 10

def initialize
  @sync_order_promotions = true
  @recalculate_complete_orders = true
end

Instance Attribute Details

#advertiser_classClass

Allows providing a different promotion advertiser.

Returns:

  • (Class)

    an object that conforms to the API of the standard promotion advertiser class Spree::PromotionAdvertiser.

See Also:

  • Spree::PromotionAdvertiser


27
# File 'lib/solidus_friendly_promotions/configuration.rb', line 27

class_name_attribute :advertiser_class, default: "SolidusFriendlyPromotions::PromotionAdvertiser"

#promotions_per_pageInteger

Returns Promotions to show per-page in the admin (default: 25).

Returns:

  • (Integer)

    Promotions to show per-page in the admin (default: 25)



109
# File 'lib/solidus_friendly_promotions/configuration.rb', line 109

preference :promotions_per_page, :integer, default: 25

#recalculate_complete_ordersObject

Returns the value of attribute recalculate_complete_orders.



8
9
10
# File 'lib/solidus_friendly_promotions/configuration.rb', line 8

def recalculate_complete_orders
  @recalculate_complete_orders
end

#sync_order_promotionsObject

Returns the value of attribute sync_order_promotions.



7
8
9
# File 'lib/solidus_friendly_promotions/configuration.rb', line 7

def sync_order_promotions
  @sync_order_promotions
end