Class: Io::Flow::V0::Models::LabelTriggerMethod
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::LabelTriggerMethod
- 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
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of LabelTriggerMethod for this value, creating a new instance for an unknown value.
-
.autogenerated ⇒ Object
Label was generated as a side-effect based on some automated trigger condition.
-
.from_string(value) ⇒ Object
Returns the instance of LabelTriggerMethod for this value, or nil if not found.
-
.on_demand ⇒ Object
Label was generated by an intentional internal or external actor.
Instance Method Summary collapse
-
#initialize(value) ⇒ LabelTriggerMethod
constructor
A new instance of LabelTriggerMethod.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ LabelTriggerMethod
Returns a new instance of LabelTriggerMethod.
21895 21896 21897 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21895 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
21893 21894 21895 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21893 def value @value end |
Class Method Details
.ALL ⇒ Object
21915 21916 21917 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21915 def LabelTriggerMethod.ALL @@all ||= [LabelTriggerMethod.autogenerated, LabelTriggerMethod.on_demand] end |
.apply(value) ⇒ Object
Returns the instance of LabelTriggerMethod for this value, creating a new instance for an unknown value
21900 21901 21902 21903 21904 21905 21906 21907 |
# 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 ⇒ Object
Label was generated as a side-effect based on some automated trigger condition
21920 21921 21922 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21920 def LabelTriggerMethod.autogenerated @@_autogenerated ||= LabelTriggerMethod.new('autogenerated') end |
.from_string(value) ⇒ Object
Returns the instance of LabelTriggerMethod for this value, or nil if not found
21910 21911 21912 21913 |
# 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 |
.on_demand ⇒ Object
Label was generated by an intentional internal or external actor
21925 21926 21927 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21925 def LabelTriggerMethod.on_demand @@_on_demand ||= LabelTriggerMethod.new('on_demand') end |
Instance Method Details
#to_hash ⇒ Object
21929 21930 21931 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21929 def to_hash value end |