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



14963
14964
14965
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14963

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



14961
14962
14963
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14961

def value
  @value
end

Class Method Details

.activeObject



14991
14992
14993
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14991

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

.ALLObject



14983
14984
14985
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14983

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



14968
14969
14970
14971
14972
14973
14974
14975
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14968

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



15001
15002
15003
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15001

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.



14997
14998
14999
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14997

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

.draftObject



14987
14988
14989
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14987

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



14978
14979
14980
14981
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14978

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



15005
15006
15007
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15005

def to_hash
  value
end