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.



12662
12663
12664
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12662

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12660
12661
12662
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12660

def value
  @value
end

Class Method Details

.activeObject



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

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

.ALLObject



12682
12683
12684
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12682

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



12667
12668
12669
12670
12671
12672
12673
12674
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12667

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



12700
12701
12702
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12700

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.



12696
12697
12698
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12696

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

.draftObject



12686
12687
12688
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12686

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



12677
12678
12679
12680
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12677

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



12704
12705
12706
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12704

def to_hash
  value
end