class Io::Flow::V0::Models::ExclusionRuleState

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20183
def ExclusionRuleState.ALL
  @@all ||= [ExclusionRuleState.current, ExclusionRuleState.deleting, ExclusionRuleState.updating]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 20168
def ExclusionRuleState.apply(value)
  if value.instance_of?(ExclusionRuleState)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || ExclusionRuleState.new(value))
  end
end
current() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20187
def ExclusionRuleState.current
  @@_current ||= ExclusionRuleState.new('current')
end
deleting() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20191
def ExclusionRuleState.deleting
  @@_deleting ||= ExclusionRuleState.new('deleting')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 20178
def ExclusionRuleState.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  ExclusionRuleState.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20163
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
updating() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20195
def ExclusionRuleState.updating
  @@_updating ||= ExclusionRuleState.new('updating')
end

Public Instance Methods

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