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.
16354 16355 16356 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16354 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16352 16353 16354 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16352 def value @value end |
Class Method Details
.active ⇒ Object
16382 16383 16384 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16382 def ExperienceStatus.active @@_active ||= ExperienceStatus.new('active') end |
.ALL ⇒ Object
16374 16375 16376 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16374 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
16359 16360 16361 16362 16363 16364 16365 16366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16359 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
16392 16393 16394 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16392 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.
16388 16389 16390 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16388 def ExperienceStatus.archiving @@_archiving ||= ExperienceStatus.new('archiving') end |
.draft ⇒ Object
16378 16379 16380 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16378 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
16369 16370 16371 16372 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16369 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
16396 16397 16398 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16396 def to_hash value end |