Class: AdvancedBilling::CleanupScope

Inherits:
Object
  • Object
show all
Defined in:
lib/advanced_billing/models/cleanup_scope.rb

Overview

all: Will clear all products, customers, and related subscriptions from the site. customers: Will clear only customers and related subscriptions (leaving the products untouched) for the site. Revenue will also be reset to 0.

Constant Summary collapse

CLEANUP_SCOPE =
[
  # TODO: Write general description for ALL
  ALL = 'all'.freeze,

  # TODO: Write general description for CUSTOMERS
  CUSTOMERS = 'customers'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



20
21
22
23
24
# File 'lib/advanced_billing/models/cleanup_scope.rb', line 20

def self.validate(value)
  return false if value.nil?

  CLEANUP_SCOPE.include?(value)
end