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.
16826 16827 16828 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16826 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16824 16825 16826 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16824 def value @value end |
Class Method Details
.address_required ⇒ Object
Indicates that a non empty address was not specified when required
16851 16852 16853 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16851 def LocationErrorCode.address_required @@_address_required ||= LocationErrorCode.new('address_required') end |
.ALL ⇒ Object
16846 16847 16848 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16846 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
16831 16832 16833 16834 16835 16836 16837 16838 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16831 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
16841 16842 16843 16844 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16841 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
16856 16857 16858 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16856 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
16861 16862 16863 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16861 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
16867 16868 16869 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16867 def LocationErrorCode.timezone_unavailable @@_timezone_unavailable ||= LocationErrorCode.new('timezone_unavailable') end |
Instance Method Details
#to_hash ⇒ Object
16871 16872 16873 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16871 def to_hash value end |