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.
14826 14827 14828 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14826 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14824 14825 14826 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14824 def value @value end |
Class Method Details
.ALL ⇒ Object
14846 14847 14848 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14846 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
14831 14832 14833 14834 14835 14836 14837 14838 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14831 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
14850 14851 14852 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14850 def ExclusionRuleState.current @@_current ||= ExclusionRuleState.new('current') end |
.deleting ⇒ Object
14854 14855 14856 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14854 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
14841 14842 14843 14844 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14841 def ExclusionRuleState.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ExclusionRuleState.ALL.find { |v| v.value == value } end |
.updating ⇒ Object
14858 14859 14860 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14858 def ExclusionRuleState.updating @@_updating ||= ExclusionRuleState.new('updating') end |
Instance Method Details
#to_hash ⇒ Object
14862 14863 14864 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14862 def to_hash value end |