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.
15188 15189 15190 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15188 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15186 15187 15188 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15186 def value @value end |
Class Method Details
.ALL ⇒ Object
15208 15209 15210 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15208 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
15193 15194 15195 15196 15197 15198 15199 15200 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15193 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
15228 15229 15230 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15228 def AddressFieldName.city @@_city ||= AddressFieldName.new('city') end |
.company ⇒ Object
15248 15249 15250 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15248 def AddressFieldName.company @@_company ||= AddressFieldName.new('company') end |
.country ⇒ Object
15240 15241 15242 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15240 def AddressFieldName.country @@_country ||= AddressFieldName.new('country') end |
.first_name ⇒ Object
15212 15213 15214 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15212 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
15203 15204 15205 15206 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15203 def AddressFieldName.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) AddressFieldName.ALL.find { |v| v.value == value } end |
.last_name ⇒ Object
15216 15217 15218 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15216 def AddressFieldName.last_name @@_last_name ||= AddressFieldName.new('last_name') end |
.phone ⇒ Object
15244 15245 15246 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15244 def AddressFieldName.phone @@_phone ||= AddressFieldName.new('phone') end |
.postal ⇒ Object
15236 15237 15238 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15236 def AddressFieldName.postal @@_postal ||= AddressFieldName.new('postal') end |
.province ⇒ Object
15232 15233 15234 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15232 def AddressFieldName.province @@_province ||= AddressFieldName.new('province') end |
.street_1 ⇒ Object
15220 15221 15222 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15220 def AddressFieldName.street_1 @@_street_1 ||= AddressFieldName.new('street_1') end |
.street_2 ⇒ Object
15224 15225 15226 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15224 def AddressFieldName.street_2 @@_street_2 ||= AddressFieldName.new('street_2') end |
.vat_registration_number ⇒ Object
15252 15253 15254 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15252 def AddressFieldName.vat_registration_number @@_vat_registration_number ||= AddressFieldName.new('vat_registration_number') end |
Instance Method Details
#to_hash ⇒ Object
15256 15257 15258 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15256 def to_hash value end |