class Io::Flow::V0::Models::LabelTriggerMethod

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21915
def LabelTriggerMethod.ALL
  @@all ||= [LabelTriggerMethod.autogenerated, LabelTriggerMethod.on_demand]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 21900
def LabelTriggerMethod.apply(value)
  if value.instance_of?(LabelTriggerMethod)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || LabelTriggerMethod.new(value))
  end
end
autogenerated() click to toggle source

Label was generated as a side-effect based on some automated trigger condition

# File lib/flow_commerce/flow_api_v0_client.rb, line 21920
def LabelTriggerMethod.autogenerated
  @@_autogenerated ||= LabelTriggerMethod.new('autogenerated')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 21910
def LabelTriggerMethod.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  LabelTriggerMethod.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21895
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
on_demand() click to toggle source

Label was generated by an intentional internal or external actor

# File lib/flow_commerce/flow_api_v0_client.rb, line 21925
def LabelTriggerMethod.on_demand
  @@_on_demand ||= LabelTriggerMethod.new('on_demand')
end

Public Instance Methods

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