Class: WalleeRubySdk::DisplayableMonth

Inherits:
Object
  • Object
show all
Defined in:
lib/wallee-ruby-sdk/models/displayable_month.rb

Constant Summary collapse

JANUARY =
"JANUARY".freeze
FEBRUARY =
"FEBRUARY".freeze
MARCH =
"MARCH".freeze
APRIL =
"APRIL".freeze
MAY =
"MAY".freeze
JUNE =
"JUNE".freeze
JULY =
"JULY".freeze
AUGUST =
"AUGUST".freeze
SEPTEMBER =
"SEPTEMBER".freeze
OCTOBER =
"OCTOBER".freeze
NOVEMBER =
"NOVEMBER".freeze
DECEMBER =
"DECEMBER".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



39
40
41
# File 'lib/wallee-ruby-sdk/models/displayable_month.rb', line 39

def self.all_vars
  @all_vars ||= [JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



46
47
48
# File 'lib/wallee-ruby-sdk/models/displayable_month.rb', line 46

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



53
54
55
56
# File 'lib/wallee-ruby-sdk/models/displayable_month.rb', line 53

def build_from_hash(value)
  return value if DisplayableMonth.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #DisplayableMonth"
end