summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions/configuration.rb
diff options
context:
space:
mode:
authorAlessandro Desantis <desa.alessandro@gmail.com>2020-10-09 14:05:43 +0200
committerAlessandro Desantis <desa.alessandro@gmail.com>2020-10-09 14:09:01 +0200
commit5a5b2a3201462532f4fa9d38e02867a243c68670 (patch)
tree004eedfd40d8405f1bd3390d3fa983e0cfe02830 /lib/solidus_subscriptions/configuration.rb
parentd7369ba04b3657e47e21e6d24af516886ef0dbc4 (diff)
Implement Churn Buster API client
Diffstat (limited to 'lib/solidus_subscriptions/configuration.rb')
-rw-r--r--lib/solidus_subscriptions/configuration.rb8
1 files changed, 7 insertions, 1 deletions
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