Class: Spree::Seeds::CustomerGroups
- Inherits:
-
Object
- Object
- Spree::Seeds::CustomerGroups
- Includes:
- Spree::ServiceModule::Base
- Defined in:
- app/services/spree/seeds/customer_groups.rb
Overview
The Wholesale group is the B2B approval primitive until 6.1 Company accounts land: membership marks an approved wholesale buyer and is what wholesale price lists key off.
Constant Summary collapse
- WHOLESALE_NAME =
'Wholesale'.freeze
Instance Method Summary collapse
Methods included from Spree::ServiceModule::Base
Instance Method Details
#call ⇒ Object
11 12 13 14 15 |
# File 'app/services/spree/seeds/customer_groups.rb', line 11 def call Spree::Store.find_each do |store| store.customer_groups.find_or_create_by!(name: WHOLESALE_NAME) end end |