From 5a5b2a3201462532f4fa9d38e02867a243c68670 Mon Sep 17 00:00:00 2001 From: Alessandro Desantis Date: Fri, 9 Oct 2020 14:05:43 +0200 Subject: Implement Churn Buster API client --- lib/solidus_subscriptions/configuration.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/solidus_subscriptions/configuration.rb') diff --git a/lib/solidus_subscriptions/configuration.rb b/lib/solidus_subscriptions/configuration.rb index d5dc80f..22b7d84 100644 --- a/lib/solidus_subscriptions/configuration.rb +++ b/lib/solidus_subscriptions/configuration.rb @@ -2,7 +2,9 @@ module SolidusSubscriptions class Configuration - attr_accessor :maximum_total_skips + attr_accessor( + :maximum_total_skips, :churn_buster_account_id, :churn_buster_api_key, + ) attr_writer( :success_dispatcher_class, :failure_dispatcher_class, :payment_failed_dispatcher_class, @@ -73,5 +75,9 @@ module SolidusSubscriptions @subscribable_class ||= 'Spree::Variant' @subscribable_class.constantize end + + def churn_buster? + churn_buster_account_id.present? && churn_buster_api_key.present? + end end end -- cgit v1.2.3