summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions
diff options
context:
space:
mode:
authorBrendan Deere <brendan@stembolt.com>2017-01-06 15:43:14 -0800
committerBrendan Deere <brendan@stembolt.com>2017-01-12 14:56:27 -0800
commitfb00ab0a6feb83ad9d6b55e5bb8c38f697abb162 (patch)
tree5e475cfe6afe1b30662035ef599dc0e19cbe2bc4 /lib/solidus_subscriptions
parentae386e1d90679b946bf6c7b632b629b048fe3465 (diff)
Replace max_installments with end_date
The max_installments concept of a specific number of times to processa subscription was complicated and diffcult to understand. It was originally meant to allow for subscriptions to be active only for a given periode of time (ie, a 1 years magazine subscription). To better model this behaviour, this column is being changed to :end_date. A date after which the subscription will become inactive and not be processed. If a subscription has no value for this field, it will be processed until some action is taken to stop it (ex. cancelling the subscription).
Diffstat (limited to 'lib/solidus_subscriptions')
-rw-r--r--lib/solidus_subscriptions/config.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/solidus_subscriptions/config.rb b/lib/solidus_subscriptions/config.rb
index f0e3d88..6ab41c6 100644
--- a/lib/solidus_subscriptions/config.rb
+++ b/lib/solidus_subscriptions/config.rb
@@ -62,8 +62,8 @@ module SolidusSubscriptions
# be modified by the user. This locks these attributes from being passed
# in to the orders controller (or the api controller).
- # Ie. if a store does not want to allow users to configure the number of
- # installments they will receive. Add this to an initializer:
+ # Ie. if a store does not want to allow users to configure the end date of
+ # a subscription. Add this to an initializer:
# ```
# SolidusSubscriptions::Config.subscription_line_item_attributes = [
@@ -73,7 +73,6 @@ module SolidusSubscriptions
# :subscribable_id
# ]
# ```
- #
# This configuration also easily allows the gem to be customized to track
# more information on the subcriptions line items.
mattr_accessor(:subscription_line_item_attributes) do
@@ -82,7 +81,7 @@ module SolidusSubscriptions
:subscribable_id,
:interval_length,
:interval_units,
- :max_installments
+ :end_date
]
end