Class: LockstepSdk::StateModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/state_model.rb

Overview

State model for ISO-3166-2

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ StateModel

Initialize the StateModel using the provided prototype



24
25
26
27
28
# File 'lib/lockstep_sdk/models/state_model.rb', line 24

def initialize(params = {})
    @name = params.dig(:name)
    @alpha2 = params.dig(:alpha2)
    @aliases = params.dig(:aliases)
end

Instance Attribute Details

#aliasesString

Returns A different name for a state.

Returns:

  • (String)

    A different name for a state



35
36
37
# File 'lib/lockstep_sdk/models/state_model.rb', line 35

def aliases
  @aliases
end

#alpha2String

Returns 2 letter alphabetic code for the given state.

Returns:

  • (String)

    2 letter alphabetic code for the given state



33
34
35
# File 'lib/lockstep_sdk/models/state_model.rb', line 33

def alpha2
  @alpha2
end

#nameString

Returns Name of the state.

Returns:

  • (String)

    Name of the state



31
32
33
# File 'lib/lockstep_sdk/models/state_model.rb', line 31

def name
  @name
end