summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrendan Deere <brendan@stembolt.com>2016-10-06 12:39:05 -0700
committerBrendan Deere <brendan@stembolt.com>2016-10-06 14:39:40 -0700
commitef08de9bbb057c226dbf2160b15265c10ede5330 (patch)
tree70dd64729e253ceb231f8a44acc9b7ef9853fbe3 /lib
parentceca26734c9e096aa6d24625024e964303a08c6b (diff)
Add config options for skips
maximum_successive_skips: maximum number of times a subscription can be skipped before it must be processed. maximum_total_skips: Total limit on number of skips, once a subscription has been skipped this many times, the subscription can no longer be skipped
Diffstat (limited to 'lib')
-rw-r--r--lib/solidus_subscriptions/config.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/solidus_subscriptions/config.rb b/lib/solidus_subscriptions/config.rb
index 7eabfab..e19c308 100644
--- a/lib/solidus_subscriptions/config.rb
+++ b/lib/solidus_subscriptions/config.rb
@@ -1,6 +1,14 @@
module SolidusSubscriptions
module Config
class << self
+ # Maximum number of times a user can skip their subscription before it
+ # must be processed
+ mattr_accessor(:maximum_successive_skips) { 1 }
+
+ # Limit on the number of times a user can skip thier subscription. Once
+ # this limit is reached, no skips are permitted
+ mattr_accessor(:maximum_total_skips) { nil }
+
# Time between an installment failing to be processed and the system
# retrying to fulfil it
mattr_accessor(:reprocessing_interval) { 1.day }