Class: Io::Flow::V0::Models::ExperienceStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperienceStatus
- 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
- .active ⇒ Object
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of ExperienceStatus for this value, creating a new instance for an unknown value.
- .archived ⇒ Object
- .draft ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ExperienceStatus for this value, or nil if not found.
Instance Method Summary collapse
-
#initialize(value) ⇒ ExperienceStatus
constructor
A new instance of ExperienceStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ExperienceStatus
Returns a new instance of ExperienceStatus.
9736 9737 9738 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9736 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
9734 9735 9736 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9734 def value @value end |
Class Method Details
.active ⇒ Object
9764 9765 9766 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9764 def ExperienceStatus.active @@_active ||= ExperienceStatus.new('active') end |
.ALL ⇒ Object
9756 9757 9758 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9756 def ExperienceStatus.ALL @@all ||= [ExperienceStatus.draft, ExperienceStatus.active, ExperienceStatus.archived] end |
.apply(value) ⇒ Object
Returns the instance of ExperienceStatus for this value, creating a new instance for an unknown value
9741 9742 9743 9744 9745 9746 9747 9748 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9741 def ExperienceStatus.apply(value) if value.instance_of?(ExperienceStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ExperienceStatus.new(value)) end end |
.archived ⇒ Object
9768 9769 9770 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9768 def ExperienceStatus.archived @@_archived ||= ExperienceStatus.new('archived') end |
.draft ⇒ Object
9760 9761 9762 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9760 def ExperienceStatus.draft @@_draft ||= ExperienceStatus.new('draft') end |
.from_string(value) ⇒ Object
Returns the instance of ExperienceStatus for this value, or nil if not found
9751 9752 9753 9754 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9751 def ExperienceStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ExperienceStatus.ALL.find { |v| v.value == value } end |
Instance Method Details
#to_hash ⇒ Object
9772 9773 9774 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9772 def to_hash value end |