Class: SolidusLegacyPromotions::Configuration

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

Instance Attribute Summary collapse

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:



65
# File 'lib/solidus_legacy_promotions/configuration.rb', line 65

class_name_attribute :advertiser_class, default: 'Spree::PromotionAdvertiser'

#coupon_code_handler_classClass

Allows providing a different coupon code handler.

Returns:

  • (Class)

    an object that conforms to the API of the standard coupon code handler class Spree::PromotionHandler::Coupon.

See Also:



57
# File 'lib/solidus_legacy_promotions/configuration.rb', line 57

class_name_attribute :coupon_code_handler_class, default: 'Spree::PromotionHandler::Coupon'

#promotion_attributesArray<Symbol>

Returns Attributes to be returned by the API for a promotion.

Returns:

  • (Array<Symbol>)

    Attributes to be returned by the API for a promotion



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/solidus_legacy_promotions/configuration.rb', line 13

preference :promotion_api_attributes, :array, default: [
  :id,
  :name,
  :description,
  :expires_at,
  :starts_at,
  :type,
  :usage_limit,
  :advertise,
  :path
]

#promotion_code_batch_mailer_classActionMailer::Base

Allows providing your own Mailer for promotion code batch mailer.

Returns:

  • (ActionMailer::Base)

    an object that responds to “promotion_code_batch_finished”, and “promotion_code_batch_errored” (e.g. an ActionMailer with a “promotion_code_batch_finished” method) with the same signature as Spree::PromotionCodeBatchMailer.promotion_code_batch_finished.



49
# File 'lib/solidus_legacy_promotions/configuration.rb', line 49

class_name_attribute :promotion_code_batch_mailer_class, default: 'Spree::PromotionCodeBatchMailer'

#promotions_per_pageInteger

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

Returns:

  • (Integer)

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



9
# File 'lib/solidus_legacy_promotions/configuration.rb', line 9

preference :promotions_per_page, :integer, default: 15

#shipping_promotion_handler_classClass

Allows providing a different shipping promotion handler.

Returns:

  • (Class)

    an object that conforms to the API of the standard shipping promotion handler class Spree::PromotionHandler::Coupon.

See Also:



40
# File 'lib/solidus_legacy_promotions/configuration.rb', line 40

class_name_attribute :shipping_promotion_handler_class, default: 'Spree::PromotionHandler::Shipping'