Class: Io::Flow::V0::Models::ExperienceStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ExperienceStatus

Returns a new instance of ExperienceStatus.



12977
12978
12979
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12977

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12975
12976
12977
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12975

def value
  @value
end

Class Method Details

.activeObject



13005
13006
13007
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13005

def ExperienceStatus.active
  @@_active ||= ExperienceStatus.new('active')
end

.ALLObject



12997
12998
12999
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12997

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



12982
12983
12984
12985
12986
12987
12988
12989
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12982

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

.archivedObject



13015
13016
13017
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13015

def ExperienceStatus.archived
  @@_archived ||= ExperienceStatus.new('archived')
end

.archivingObject

Archiving indicates an experience has been archived. We allow some time for sessions to expire before fully marking the experience archived.



13011
13012
13013
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13011

def ExperienceStatus.archiving
  @@_archiving ||= ExperienceStatus.new('archiving')
end

.draftObject



13001
13002
13003
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13001

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



12992
12993
12994
12995
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12992

def ExperienceStatus.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  ExperienceStatus.ALL.find { |v| v.value == value }
end

Instance Method Details

#to_hashObject



13019
13020
13021
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13019

def to_hash
  value
end