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.



15426
15427
15428
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15426

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



15424
15425
15426
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15424

def value
  @value
end

Class Method Details

.activeObject



15454
15455
15456
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15454

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

.ALLObject



15446
15447
15448
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15446

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



15431
15432
15433
15434
15435
15436
15437
15438
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15431

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



15464
15465
15466
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15464

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.



15460
15461
15462
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15460

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

.draftObject



15450
15451
15452
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15450

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



15441
15442
15443
15444
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15441

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



15468
15469
15470
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15468

def to_hash
  value
end