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.



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

#valueObject (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

.activeObject



16382
16383
16384
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16382

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

.ALLObject



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

.archivedObject



16392
16393
16394
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16392

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.



16388
16389
16390
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16388

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

.draftObject



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_hashObject



16396
16397
16398
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16396

def to_hash
  value
end