From ef08de9bbb057c226dbf2160b15265c10ede5330 Mon Sep 17 00:00:00 2001 From: Brendan Deere Date: Thu, 6 Oct 2016 12:39:05 -0700 Subject: 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 --- lib/solidus_subscriptions/config.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') 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 } -- cgit v1.2.3