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.
16178 16179 16180 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16178 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16176 16177 16178 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16176 def value @value end |
Class Method Details
.active ⇒ Object
16206 16207 16208 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16206 def ExperienceStatus.active @@_active ||= ExperienceStatus.new('active') end |
.ALL ⇒ Object
16198 16199 16200 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16198 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
16183 16184 16185 16186 16187 16188 16189 16190 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16183 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
16216 16217 16218 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16216 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.
16212 16213 16214 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16212 def ExperienceStatus.archiving @@_archiving ||= ExperienceStatus.new('archiving') end |
.draft ⇒ Object
16202 16203 16204 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16202 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
16193 16194 16195 16196 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16193 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
16220 16221 16222 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16220 def to_hash value end |