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
-
.archiving ⇒ Object
Archiving indicates an experience has been archived.
- .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.
15917 15918 15919 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15917 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15915 15916 15917 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15915 def value @value end |
Class Method Details
.active ⇒ Object
15945 15946 15947 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15945 def ExperienceStatus.active @@_active ||= ExperienceStatus.new('active') end |
.ALL ⇒ Object
15937 15938 15939 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15937 def ExperienceStatus.ALL @@all ||= [ExperienceStatus.draft, ExperienceStatus.active, ExperienceStatus.archiving, ExperienceStatus.archived] end |
.apply(value) ⇒ Object
Returns the instance of ExperienceStatus for this value, creating a new instance for an unknown value
15922 15923 15924 15925 15926 15927 15928 15929 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15922 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
15955 15956 15957 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15955 def ExperienceStatus.archived @@_archived ||= ExperienceStatus.new('archived') end |
.archiving ⇒ Object
Archiving indicates an experience has been archived. We allow some time for sessions to expire before fully marking the experience archived.
15951 15952 15953 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15951 def ExperienceStatus.archiving @@_archiving ||= ExperienceStatus.new('archiving') end |
.draft ⇒ Object
15941 15942 15943 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15941 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
15932 15933 15934 15935 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15932 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
15959 15960 15961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15959 def to_hash value end |