Class: Io::Flow::V0::Models::LocationErrorCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::LocationErrorCode
- 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
-
.address_required ⇒ Object
Indicates that a non empty address was not specified when required.
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of LocationErrorCode for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of LocationErrorCode for this value, or nil if not found.
-
.ip_invalid ⇒ Object
Indicates the specified IP Address is invalid.
-
.ip_required ⇒ Object
Indicates that a non empty IP Address was not specified when required.
-
.timezone_unavailable ⇒ Object
Indicates that there is no timezone information available for the specified IP Address.
Instance Method Summary collapse
-
#initialize(value) ⇒ LocationErrorCode
constructor
A new instance of LocationErrorCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ LocationErrorCode
Returns a new instance of LocationErrorCode.
17309 17310 17311 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17309 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17307 17308 17309 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17307 def value @value end |
Class Method Details
.address_required ⇒ Object
Indicates that a non empty address was not specified when required
17334 17335 17336 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17334 def LocationErrorCode.address_required @@_address_required ||= LocationErrorCode.new('address_required') end |
.ALL ⇒ Object
17329 17330 17331 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17329 def LocationErrorCode.ALL @@all ||= [LocationErrorCode.address_required, LocationErrorCode.ip_invalid, LocationErrorCode.ip_required, LocationErrorCode.timezone_unavailable] end |
.apply(value) ⇒ Object
Returns the instance of LocationErrorCode for this value, creating a new instance for an unknown value
17314 17315 17316 17317 17318 17319 17320 17321 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17314 def LocationErrorCode.apply(value) if value.instance_of?(LocationErrorCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || LocationErrorCode.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of LocationErrorCode for this value, or nil if not found
17324 17325 17326 17327 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17324 def LocationErrorCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) LocationErrorCode.ALL.find { |v| v.value == value } end |
.ip_invalid ⇒ Object
Indicates the specified IP Address is invalid
17339 17340 17341 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17339 def LocationErrorCode.ip_invalid @@_ip_invalid ||= LocationErrorCode.new('ip_invalid') end |
.ip_required ⇒ Object
Indicates that a non empty IP Address was not specified when required
17344 17345 17346 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17344 def LocationErrorCode.ip_required @@_ip_required ||= LocationErrorCode.new('ip_required') end |
.timezone_unavailable ⇒ Object
Indicates that there is no timezone information available for the specified IP Address
17350 17351 17352 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17350 def LocationErrorCode.timezone_unavailable @@_timezone_unavailable ||= LocationErrorCode.new('timezone_unavailable') end |
Instance Method Details
#to_hash ⇒ Object
17354 17355 17356 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17354 def to_hash value end |