class Io::Flow::V0::Models::SortDirection
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26769 def SortDirection.ALL @@all ||= [SortDirection.ascending, SortDirection.descending] end
apply(value)
click to toggle source
Returns the instance of SortDirection
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 26754 def SortDirection.apply(value) if value.instance_of?(SortDirection) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || SortDirection.new(value)) end end
ascending()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26773 def SortDirection.ascending @@_ascending ||= SortDirection.new('ascending') end
descending()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26777 def SortDirection.descending @@_descending ||= SortDirection.new('descending') end
from_string(value)
click to toggle source
Returns the instance of SortDirection
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 26764 def SortDirection.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) SortDirection.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26749 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26781 def to_hash value end