Class: AdvancedBilling::PricePointType

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

Overview

Price point type. We expose the following types: 1. default: a price point that is marked as a default price for a certain product. 2. custom: a custom price point. 3. catalog: a price point that is not marked as a default price for a certain product and is not a custom one.

Constant Summary collapse

PRICE_POINT_TYPE =
[
  # TODO: Write general description for CATALOG
  CATALOG = 'catalog'.freeze,

  # TODO: Write general description for DEFAULT
  DEFAULT = 'default'.freeze,

  # TODO: Write general description for CUSTOM
  CUSTOM = 'custom'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



24
25
26
27
28
# File 'lib/advanced_billing/models/price_point_type.rb', line 24

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

  PRICE_POINT_TYPE.include?(value)
end