diff options
author | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-09-30 14:56:42 +0200 |
---|---|---|
committer | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-10-01 14:23:03 +0200 |
commit | 21ffb8140385485fe7383164532dcc93e5c7a07a (patch) | |
tree | 76642e82a8d857d6b96d8b91ad9e80143e91330b /lib | |
parent | f6181cb98d21aa2e80d9344e328cd82be40c9682 (diff) |
Reformat sample configuration file
Diffstat (limited to 'lib')
-rw-r--r-- | lib/generators/solidus_subscriptions/install/templates/initializer.rb | 83 |
1 files changed, 35 insertions, 48 deletions
diff --git a/lib/generators/solidus_subscriptions/install/templates/initializer.rb b/lib/generators/solidus_subscriptions/install/templates/initializer.rb index fb4fa46..17a6f51 100644 --- a/lib/generators/solidus_subscriptions/install/templates/initializer.rb +++ b/lib/generators/solidus_subscriptions/install/templates/initializer.rb @@ -1,13 +1,32 @@ # frozen_string_literal: true SolidusSubscriptions.configure do |config| - # These handlers are pluggable, however it is highly encouraged that - # you subclass from the the dispatcher you are replacing, and call - # `super` from within the #dispatch method (if you override it). + # ========================================= Basic config ========================================= # The ActiveRecord model users can subscribe to. # config.subscribable_class = 'Spree::Variant' + # Which queue is responsible for processing subscription background jobs. + # config.processing_queue = :default + + # Maximum number of times a user can skip their subscription before it must be processed. + # config.maximum_successive_skips = 1 + + # Maximum number of times a user can skip their subscription. + # config.maximum_total_skips = nil + + # Minimum days between the current date and the next installment for the installment not to be + # processed after the user cancels their subscription. + # config.minimum_cancellation_notice = 1.day + + # Time between an installment failing to be processed and the system retrying to fulfill it. + # config.reprocessing_interval = 1.day + + # ========================================= Dispatchers ========================================== + # + # These dispatchers are pluggable. If you override any handlers, it is highly encouraged that you + # subclass from the the dispatcher you are replacing and call `super` from within `#dispatch`. + # This handler is called when a subscription order is successfully placed. # config.success_dispatcher_class = 'SolidusSubscriptions::SuccessDispatcher' @@ -20,46 +39,24 @@ SolidusSubscriptions.configure do |config| # This handler is called when there isn't enough stock to fulfill an installment. # config.out_of_stock_dispatcher = 'SolidusSubscriptions::OutOfStockDispatcher' - # Maximum number of times a user can skip their subscription before it - # must be processed. - # config.maximum_successive_skips = 1 - - # Maximum number of times a user can skip their subscription. Once this limit - # is reached, no more skips are permitted. - # config.maximum_total_skips = nil - - # Minimum days between the current date and the next installment for the - # installment not to be processed after subscription cancellation. - # config.minimum_cancellation_notice = 1.day - - # Time between an installment failing to be processed and the system - # retrying to fulfill it. - # config.reprocessing_interval = 1.day - - # Which queue is responsible for processing subscription background jobs. - # config.processing_queue = :default - - # SolidusSubscriptions::LineItem attributes which are allowed to - # be updated from user data + # ===================================== Permitted attributes ===================================== # - # This is useful in the case where certain fields should not be allowed to - # be modified by the user. This locks these attributes from being passed - # to the orders controller (or the API controller). + # In this section, you can override the list of attributes the user can pass to the controllers. # - # For example, if a store does not want to allow users to configure the end - # date of a subscription, set this: - # - # ``` - # SolidusSubscriptions.configuration.subscription_line_item_attributes = [ - # :quantity, - # :subscribable_id, + # This is useful in the case where certain fields should not be allowed to be modified by the + # user, or if you add additional fields to the extension's model and you want the users to be able + # to set them. + + # Attributes the user can specify for subscriptions. + # config.subscription_attributes = [ # :interval_length, # :interval_units, + # :end_date, + # shipping_address_attributes: Spree::PermittedAttributes.address_attributes, + # billing_address_attributes: Spree::PermittedAttributes.address_attributes, # ] - # ``` - # - # You can also add additional attributes that you want to track in the - # subscription line items. + + # Attributes the user be specify for subscription line items. # config.subscription_line_item_attributes = [ # :quantity, # :subscribable_id, @@ -67,14 +64,4 @@ SolidusSubscriptions.configure do |config| # :interval_units, # :end_date, # ] - - # SolidusSubscriptions::Subscription attributes which are allowed to - # be modified by the user. - # config.subscription_attributes = [ - # :interval_length, - # :interval_units, - # :end_date, - # shipping_address_attributes: Spree::PermittedAttributes.address_attributes, - # billing_address_attributes: Spree::PermittedAttributes.address_attributes, - # ] end |