Class: Io::Flow::V0::Models::ProvinceType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ProvinceType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of ProvinceType for this value, creating a new instance for an unknown value.
- .area ⇒ Object
- .city ⇒ Object
- .county ⇒ Object
- .department ⇒ Object
- .dependency ⇒ Object
- .district ⇒ Object
- .do_si ⇒ Object
- .emirate ⇒ Object
- .entity ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ProvinceType for this value, or nil if not found.
- .island ⇒ Object
- .municipality ⇒ Object
- .oblast ⇒ Object
- .other ⇒ Object
- .outlying_area ⇒ Object
- .parish ⇒ Object
- .prefecture ⇒ Object
- .province ⇒ Object
- .state ⇒ Object
- .territory ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ProvinceType
constructor
A new instance of ProvinceType.
- #to_hash ⇒ Object
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
#value ⇒ Object (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
.ALL ⇒ Object
25577 25578 25579 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25577 def ProvinceType.ALL @@all ||= [ProvinceType.area, ProvinceType.city, ProvinceType.county, ProvinceType.department, ProvinceType.dependency, ProvinceType.district, ProvinceType.do_si, ProvinceType.emirate, ProvinceType.entity, ProvinceType.island, ProvinceType.municipality, ProvinceType.oblast, ProvinceType., ProvinceType.parish, ProvinceType.prefecture, ProvinceType.province, ProvinceType.state, ProvinceType.territory, ProvinceType.other] end |
.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 |
.area ⇒ Object
25581 25582 25583 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25581 def ProvinceType.area @@_area ||= ProvinceType.new('area') end |
.city ⇒ Object
25585 25586 25587 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25585 def ProvinceType.city @@_city ||= ProvinceType.new('city') end |
.county ⇒ Object
25589 25590 25591 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25589 def ProvinceType.county @@_county ||= ProvinceType.new('county') end |
.department ⇒ Object
25593 25594 25595 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25593 def ProvinceType.department @@_department ||= ProvinceType.new('department') end |
.dependency ⇒ Object
25597 25598 25599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25597 def ProvinceType.dependency @@_dependency ||= ProvinceType.new('dependency') end |
.district ⇒ Object
25601 25602 25603 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25601 def ProvinceType.district @@_district ||= ProvinceType.new('district') end |
.do_si ⇒ Object
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 |
.emirate ⇒ Object
25609 25610 25611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25609 def ProvinceType.emirate @@_emirate ||= ProvinceType.new('emirate') end |
.entity ⇒ Object
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 |
.island ⇒ Object
25617 25618 25619 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25617 def ProvinceType.island @@_island ||= ProvinceType.new('island') end |
.municipality ⇒ Object
25621 25622 25623 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25621 def ProvinceType.municipality @@_municipality ||= ProvinceType.new('municipality') end |
.oblast ⇒ Object
25625 25626 25627 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25625 def ProvinceType.oblast @@_oblast ||= ProvinceType.new('oblast') end |
.other ⇒ Object
25653 25654 25655 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25653 def ProvinceType.other @@_other ||= ProvinceType.new('other') end |
.outlying_area ⇒ Object
25629 25630 25631 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25629 def ProvinceType. @@_outlying_area ||= ProvinceType.new('outlying_area') end |
.parish ⇒ Object
25633 25634 25635 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25633 def ProvinceType.parish @@_parish ||= ProvinceType.new('parish') end |
.prefecture ⇒ Object
25637 25638 25639 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25637 def ProvinceType.prefecture @@_prefecture ||= ProvinceType.new('prefecture') end |
.province ⇒ Object
25641 25642 25643 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25641 def ProvinceType.province @@_province ||= ProvinceType.new('province') end |
.state ⇒ Object
25645 25646 25647 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25645 def ProvinceType.state @@_state ||= ProvinceType.new('state') end |
.territory ⇒ Object
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_hash ⇒ Object
25657 25658 25659 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25657 def to_hash value end |