Class: WalleeRubySdk::RestAddressFormatField

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

Constant Summary collapse

GIVEN_NAME =
"GIVEN_NAME".freeze
FAMILY_NAME =
"FAMILY_NAME".freeze
ORGANIZATION_NAME =
"ORGANIZATION_NAME".freeze
STREET =
"STREET".freeze
DEPENDENT_LOCALITY =
"DEPENDENT_LOCALITY".freeze
CITY =
"CITY".freeze
POSTAL_STATE =
"POSTAL_STATE".freeze
POST_CODE =
"POST_CODE".freeze
SORTING_CODE =
"SORTING_CODE".freeze
COUNTRY =
"COUNTRY".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



37
38
39
# File 'lib/wallee-ruby-sdk/models/rest_address_format_field.rb', line 37

def self.all_vars
  @all_vars ||= [GIVEN_NAME, FAMILY_NAME, ORGANIZATION_NAME, STREET, DEPENDENT_LOCALITY, CITY, POSTAL_STATE, POST_CODE, SORTING_CODE, COUNTRY].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



44
45
46
# File 'lib/wallee-ruby-sdk/models/rest_address_format_field.rb', line 44

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



51
52
53
54
# File 'lib/wallee-ruby-sdk/models/rest_address_format_field.rb', line 51

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