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.



12674
12675
12676
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12674

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12672
12673
12674
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12672

def value
  @value
end

Class Method Details

.activeObject



12702
12703
12704
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12702

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

.ALLObject



12694
12695
12696
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12694

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



12679
12680
12681
12682
12683
12684
12685
12686
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12679

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



12712
12713
12714
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12712

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.



12708
12709
12710
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12708

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

.draftObject



12698
12699
12700
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12698

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



12689
12690
12691
12692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12689

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



12716
12717
12718
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12716

def to_hash
  value
end