Class: AdvancedBilling::AllocationPreviewLineItemKind

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

Overview

A handle for the line item kind for allocation preview

Constant Summary collapse

ALLOCATION_PREVIEW_LINE_ITEM_KIND =
[
  # 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 COUPON
  COUPON = 'coupon'.freeze,

  # TODO: Write general description for TAX
  TAX = 'tax'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



23
24
25
26
27
# File 'lib/advanced_billing/models/allocation_preview_line_item_kind.rb', line 23

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

  ALLOCATION_PREVIEW_LINE_ITEM_KIND.include?(value)
end