Class: AdvancedBilling::ComponentKind

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

Overview

A handle for the component type

Constant Summary collapse

COMPONENT_KIND =
[
  # TODO: Write general description for METERED_COMPONENT
  METERED_COMPONENT = 'metered_component'.freeze,

  # TODO: Write general description for QUANTITY_BASED_COMPONENT
  QUANTITY_BASED_COMPONENT = 'quantity_based_component'.freeze,

  # TODO: Write general description for ON_OFF_COMPONENT
  ON_OFF_COMPONENT = 'on_off_component'.freeze,

  # TODO: Write general description for PREPAID_USAGE_COMPONENT
  PREPAID_USAGE_COMPONENT = 'prepaid_usage_component'.freeze,

  # TODO: Write general description for EVENT_BASED_COMPONENT
  EVENT_BASED_COMPONENT = 'event_based_component'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



26
27
28
29
30
# File 'lib/advanced_billing/models/component_kind.rb', line 26

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

  COMPONENT_KIND.include?(value)
end