Class: Io::Flow::V0::Models::ExclusionRuleState
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExclusionRuleState
- 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 ExclusionRuleState for this value, creating a new instance for an unknown value.
- .current ⇒ Object
- .deleting ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ExclusionRuleState for this value, or nil if not found.
- .updating ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ExclusionRuleState
constructor
A new instance of ExclusionRuleState.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ExclusionRuleState
Returns a new instance of ExclusionRuleState.
15048 15049 15050 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15048 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15046 15047 15048 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15046 def value @value end |
Class Method Details
.ALL ⇒ Object
15068 15069 15070 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15068 def ExclusionRuleState.ALL @@all ||= [ExclusionRuleState.current, ExclusionRuleState.deleting, ExclusionRuleState.updating] end |
.apply(value) ⇒ Object
Returns the instance of ExclusionRuleState for this value, creating a new instance for an unknown value
15053 15054 15055 15056 15057 15058 15059 15060 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15053 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 ⇒ Object
15072 15073 15074 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15072 def ExclusionRuleState.current @@_current ||= ExclusionRuleState.new('current') end |
.deleting ⇒ Object
15076 15077 15078 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15076 def ExclusionRuleState.deleting @@_deleting ||= ExclusionRuleState.new('deleting') end |
.from_string(value) ⇒ Object
Returns the instance of ExclusionRuleState for this value, or nil if not found
15063 15064 15065 15066 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15063 def ExclusionRuleState.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ExclusionRuleState.ALL.find { |v| v.value == value } end |
.updating ⇒ Object
15080 15081 15082 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15080 def ExclusionRuleState.updating @@_updating ||= ExclusionRuleState.new('updating') end |
Instance Method Details
#to_hash ⇒ Object
15084 15085 15086 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15084 def to_hash value end |