diff options
author | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-09-24 14:05:05 +0200 |
---|---|---|
committer | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-09-24 14:48:37 +0200 |
commit | 19cd3c9e95d880b55a3a67fb4c3258becee31920 (patch) | |
tree | e0ff2e2645a8b8bca209fd8b68cb389b41686008 /lib/solidus_subscriptions/config.rb | |
parent | 9ab99ab24fc36805eac3c1fefef85aafe90cf7b8 (diff) |
Use `.configure`/`.configuration` standard for config management
Diffstat (limited to 'lib/solidus_subscriptions/config.rb')
-rw-r--r-- | lib/solidus_subscriptions/config.rb | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/lib/solidus_subscriptions/config.rb b/lib/solidus_subscriptions/config.rb deleted file mode 100644 index 20ebd20..0000000 --- a/lib/solidus_subscriptions/config.rb +++ /dev/null @@ -1,56 +0,0 @@ -module SolidusSubscriptions - module Config - class << self - attr_writer :success_dispatcher_class - def success_dispatcher_class - @success_dispatcher_class ||= ::SolidusSubscriptions::SuccessDispatcher - end - - attr_writer :failure_dispatcher_class - def failure_dispatcher_class - @failure_dispatcher_class ||= ::SolidusSubscriptions::FailureDispatcher - end - - attr_writer :payment_failed_dispatcher_class - def payment_failed_dispatcher_class - @payment_failed_dispatcher_class ||= ::SolidusSubscriptions::PaymentFailedDispatcher - end - - attr_writer :out_of_stock_dispatcher - def out_of_stock_dispatcher_class - @out_of_stock_dispatcher_class ||= ::SolidusSubscriptions::OutOfStockDispatcher - end - end - - mattr_accessor(:maximum_successive_skips) { 1 } - - mattr_accessor(:maximum_total_skips) { nil } - - mattr_accessor(:reprocessing_interval) { 1.day } - - mattr_accessor(:minimum_cancellation_notice) { 1.day } - - mattr_accessor(:processing_queue) { :default } - - mattr_accessor(:subscription_line_item_attributes) do - [ - :quantity, - :subscribable_id, - :interval_length, - :interval_units, - :end_date, - ] - end - - mattr_accessor(:subscription_attributes) do - [ - :interval_length, - :interval_units, - :end_date, - :actionable_date, - shipping_address_attributes: Spree::PermittedAttributes.address_attributes, - billing_address_attributes: Spree::PermittedAttributes.address_attributes, - ] - end - end -end |