Class: Io::Flow::V0::Models::ProvinceType

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ProvinceType

Returns a new instance of ProvinceType.



25557
25558
25559
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25557

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



25555
25556
25557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25555

def value
  @value
end

Class Method Details

.apply(value) ⇒ Object

Returns the instance of ProvinceType for this value, creating a new instance for an unknown value



25562
25563
25564
25565
25566
25567
25568
25569
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25562

def ProvinceType.apply(value)
  if value.instance_of?(ProvinceType)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || ProvinceType.new(value))
  end
end

.areaObject



25581
25582
25583
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25581

def ProvinceType.area
  @@_area ||= ProvinceType.new('area')
end

.cityObject



25585
25586
25587
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25585

def ProvinceType.city
  @@_city ||= ProvinceType.new('city')
end

.countyObject



25589
25590
25591
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25589

def ProvinceType.county
  @@_county ||= ProvinceType.new('county')
end

.departmentObject



25593
25594
25595
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25593

def ProvinceType.department
  @@_department ||= ProvinceType.new('department')
end

.dependencyObject



25597
25598
25599
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25597

def ProvinceType.dependency
  @@_dependency ||= ProvinceType.new('dependency')
end

.districtObject



25601
25602
25603
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25601

def ProvinceType.district
  @@_district ||= ProvinceType.new('district')
end

.do_siObject



25605
25606
25607
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25605

def ProvinceType.do_si
  @@_do_si ||= ProvinceType.new('do_si')
end

.emirateObject



25609
25610
25611
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25609

def ProvinceType.emirate
  @@_emirate ||= ProvinceType.new('emirate')
end

.entityObject



25613
25614
25615
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25613

def ProvinceType.entity
  @@_entity ||= ProvinceType.new('entity')
end

.from_string(value) ⇒ Object

Returns the instance of ProvinceType for this value, or nil if not found



25572
25573
25574
25575
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25572

def ProvinceType.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  ProvinceType.ALL.find { |v| v.value == value }
end

.islandObject



25617
25618
25619
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25617

def ProvinceType.island
  @@_island ||= ProvinceType.new('island')
end

.municipalityObject



25621
25622
25623
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25621

def ProvinceType.municipality
  @@_municipality ||= ProvinceType.new('municipality')
end

.oblastObject



25625
25626
25627
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25625

def ProvinceType.oblast
  @@_oblast ||= ProvinceType.new('oblast')
end

.otherObject



25653
25654
25655
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25653

def ProvinceType.other
  @@_other ||= ProvinceType.new('other')
end

.outlying_areaObject



25629
25630
25631
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25629

def ProvinceType.outlying_area
  @@_outlying_area ||= ProvinceType.new('outlying_area')
end

.parishObject



25633
25634
25635
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25633

def ProvinceType.parish
  @@_parish ||= ProvinceType.new('parish')
end

.prefectureObject



25637
25638
25639
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25637

def ProvinceType.prefecture
  @@_prefecture ||= ProvinceType.new('prefecture')
end

.provinceObject



25641
25642
25643
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25641

def ProvinceType.province
  @@_province ||= ProvinceType.new('province')
end

.stateObject



25645
25646
25647
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25645

def ProvinceType.state
  @@_state ||= ProvinceType.new('state')
end

.territoryObject



25649
25650
25651
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25649

def ProvinceType.territory
  @@_territory ||= ProvinceType.new('territory')
end

Instance Method Details

#to_hashObject



25657
25658
25659
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25657

def to_hash
  value
end