Class: VRPayment::DisplayableMonth

Inherits:
Object
  • Object
show all
Defined in:
lib/vrpayment-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

Instance Method Summary collapse

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



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

def build_from_hash(value)
  constantValues = DisplayableMonth.constants.select { |c| DisplayableMonth::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #DisplayableMonth" if constantValues.empty?
  value
end