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
- .vat_registration_number ⇒ 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.
14521 14522 14523 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14521 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14519 14520 14521 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14519 def value @value end |
Class Method Details
.ALL ⇒ Object
14541 14542 14543 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14541 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, AddressFieldName.vat_registration_number] end |
.apply(value) ⇒ Object
Returns the instance of AddressFieldName for this value, creating a new instance for an unknown value
14526 14527 14528 14529 14530 14531 14532 14533 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14526 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
14561 14562 14563 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14561 def AddressFieldName.city @@_city ||= AddressFieldName.new('city') end |
.company ⇒ Object
14581 14582 14583 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14581 def AddressFieldName.company @@_company ||= AddressFieldName.new('company') end |
.country ⇒ Object
14573 14574 14575 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14573 def AddressFieldName.country @@_country ||= AddressFieldName.new('country') end |
.first_name ⇒ Object
14545 14546 14547 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14545 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
14536 14537 14538 14539 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14536 def AddressFieldName.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) AddressFieldName.ALL.find { |v| v.value == value } end |
.last_name ⇒ Object
14549 14550 14551 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14549 def AddressFieldName.last_name @@_last_name ||= AddressFieldName.new('last_name') end |
.phone ⇒ Object
14577 14578 14579 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14577 def AddressFieldName.phone @@_phone ||= AddressFieldName.new('phone') end |
.postal ⇒ Object
14569 14570 14571 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14569 def AddressFieldName.postal @@_postal ||= AddressFieldName.new('postal') end |
.province ⇒ Object
14565 14566 14567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14565 def AddressFieldName.province @@_province ||= AddressFieldName.new('province') end |
.street_1 ⇒ Object
14553 14554 14555 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14553 def AddressFieldName.street_1 @@_street_1 ||= AddressFieldName.new('street_1') end |
.street_2 ⇒ Object
14557 14558 14559 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14557 def AddressFieldName.street_2 @@_street_2 ||= AddressFieldName.new('street_2') end |
.vat_registration_number ⇒ Object
14585 14586 14587 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14585 def AddressFieldName.vat_registration_number @@_vat_registration_number ||= AddressFieldName.new('vat_registration_number') end |
Instance Method Details
#to_hash ⇒ Object
14589 14590 14591 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14589 def to_hash value end |