class Io::Flow::V0::Models::ExceptionType

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20141
def ExceptionType.ALL
  @@all ||= [ExceptionType.open, ExceptionType.closed]
end
apply(value) click to toggle source

Returns the instance of ExceptionType for this value, creating a new instance for an unknown value

# File lib/flow_commerce/flow_api_v0_client.rb, line 20126
def ExceptionType.apply(value)
  if value.instance_of?(ExceptionType)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || ExceptionType.new(value))
  end
end
closed() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20149
def ExceptionType.closed
  @@_closed ||= ExceptionType.new('closed')
end
from_string(value) click to toggle source

Returns the instance of ExceptionType for this value, or nil if not found

# File lib/flow_commerce/flow_api_v0_client.rb, line 20136
def ExceptionType.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  ExceptionType.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20121
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
open() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20145
def ExceptionType.open
  @@_open ||= ExceptionType.new('open')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20153
def to_hash
  value
end