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.
16401 16402 16403 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16401 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16399 16400 16401 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16399 def value @value end |
Class Method Details
.ALL ⇒ Object
16421 16422 16423 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16421 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
16406 16407 16408 16409 16410 16411 16412 16413 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16406 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
16441 16442 16443 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16441 def AddressFieldName.city @@_city ||= AddressFieldName.new('city') end |
.company ⇒ Object
16461 16462 16463 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16461 def AddressFieldName.company @@_company ||= AddressFieldName.new('company') end |
.country ⇒ Object
16453 16454 16455 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16453 def AddressFieldName.country @@_country ||= AddressFieldName.new('country') end |
.first_name ⇒ Object
16425 16426 16427 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16425 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
16416 16417 16418 16419 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16416 def AddressFieldName.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) AddressFieldName.ALL.find { |v| v.value == value } end |
.last_name ⇒ Object
16429 16430 16431 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16429 def AddressFieldName.last_name @@_last_name ||= AddressFieldName.new('last_name') end |
.phone ⇒ Object
16457 16458 16459 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16457 def AddressFieldName.phone @@_phone ||= AddressFieldName.new('phone') end |
.postal ⇒ Object
16449 16450 16451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16449 def AddressFieldName.postal @@_postal ||= AddressFieldName.new('postal') end |
.province ⇒ Object
16445 16446 16447 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16445 def AddressFieldName.province @@_province ||= AddressFieldName.new('province') end |
.street_1 ⇒ Object
16433 16434 16435 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16433 def AddressFieldName.street_1 @@_street_1 ||= AddressFieldName.new('street_1') end |
.street_2 ⇒ Object
16437 16438 16439 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16437 def AddressFieldName.street_2 @@_street_2 ||= AddressFieldName.new('street_2') end |
.vat_registration_number ⇒ Object
16465 16466 16467 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16465 def AddressFieldName.vat_registration_number @@_vat_registration_number ||= AddressFieldName.new('vat_registration_number') end |
Instance Method Details
#to_hash ⇒ Object
16469 16470 16471 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16469 def to_hash value end |