Class: AdvancedBilling::BasicDateField

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

Overview

Allows to filter by ‘created_at` or `updated_at`.

Constant Summary collapse

BASIC_DATE_FIELD =
[
  # TODO: Write general description for UPDATED_AT
  UPDATED_AT = 'updated_at'.freeze,

  # TODO: Write general description for CREATED_AT
  CREATED_AT = 'created_at'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



17
18
19
20
21
# File 'lib/advanced_billing/models/basic_date_field.rb', line 17

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

  BASIC_DATE_FIELD.include?(value)
end