Class: Io::Flow::V0::Models::AddressFieldName
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AddressFieldName
- 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 AddressFieldName for this value, creating a new instance for an unknown value.
- .city ⇒ Object
- .company ⇒ Object
- .country ⇒ Object
- .first_name ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of AddressFieldName for this value, or nil if not found.
- .last_name ⇒ Object
- .phone ⇒ Object
- .postal ⇒ Object
- .province ⇒ Object
- .street_1 ⇒ Object
- .street_2 ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ AddressFieldName
constructor
A new instance of AddressFieldName.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ AddressFieldName
Returns a new instance of AddressFieldName.
12590 12591 12592 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12590 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
12588 12589 12590 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12588 def value @value end |
Class Method Details
.ALL ⇒ Object
12610 12611 12612 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12610 def AddressFieldName.ALL @@all ||= [AddressFieldName.first_name, AddressFieldName.last_name, AddressFieldName.street_1, AddressFieldName.street_2, AddressFieldName.city, AddressFieldName.province, AddressFieldName.postal, AddressFieldName.country, AddressFieldName.phone, AddressFieldName.company] end |
.apply(value) ⇒ Object
Returns the instance of AddressFieldName for this value, creating a new instance for an unknown value
12595 12596 12597 12598 12599 12600 12601 12602 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12595 def AddressFieldName.apply(value) if value.instance_of?(AddressFieldName) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || AddressFieldName.new(value)) end end |
.city ⇒ Object
12630 12631 12632 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12630 def AddressFieldName.city @@_city ||= AddressFieldName.new('city') end |
.company ⇒ Object
12650 12651 12652 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12650 def AddressFieldName.company @@_company ||= AddressFieldName.new('company') end |
.country ⇒ Object
12642 12643 12644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12642 def AddressFieldName.country @@_country ||= AddressFieldName.new('country') end |
.first_name ⇒ Object
12614 12615 12616 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12614 def AddressFieldName.first_name @@_first_name ||= AddressFieldName.new('first_name') end |
.from_string(value) ⇒ Object
Returns the instance of AddressFieldName for this value, or nil if not found
12605 12606 12607 12608 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12605 def AddressFieldName.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) AddressFieldName.ALL.find { |v| v.value == value } end |
.last_name ⇒ Object
12618 12619 12620 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12618 def AddressFieldName.last_name @@_last_name ||= AddressFieldName.new('last_name') end |
.phone ⇒ Object
12646 12647 12648 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12646 def AddressFieldName.phone @@_phone ||= AddressFieldName.new('phone') end |
.postal ⇒ Object
12638 12639 12640 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12638 def AddressFieldName.postal @@_postal ||= AddressFieldName.new('postal') end |
.province ⇒ Object
12634 12635 12636 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12634 def AddressFieldName.province @@_province ||= AddressFieldName.new('province') end |
.street_1 ⇒ Object
12622 12623 12624 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12622 def AddressFieldName.street_1 @@_street_1 ||= AddressFieldName.new('street_1') end |
.street_2 ⇒ Object
12626 12627 12628 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12626 def AddressFieldName.street_2 @@_street_2 ||= AddressFieldName.new('street_2') end |
Instance Method Details
#to_hash ⇒ Object
12654 12655 12656 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12654 def to_hash value end |