Class: Io::Flow::V0::Models::ExperienceCloneStatus

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) ⇒ ExperienceCloneStatus

Returns a new instance of ExperienceCloneStatus.



16045
16046
16047
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16045

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



16043
16044
16045
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16043

def value
  @value
end

Class Method Details

.ALLObject



16065
16066
16067
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16065

def ExperienceCloneStatus.ALL
  @@all ||= [ExperienceCloneStatus.pending, ExperienceCloneStatus.updating, ExperienceCloneStatus.completed, ExperienceCloneStatus.failed]
end

.apply(value) ⇒ Object

Returns the instance of ExperienceCloneStatus for this value, creating a new instance for an unknown value



16050
16051
16052
16053
16054
16055
16056
16057
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16050

def ExperienceCloneStatus.apply(value)
  if value.instance_of?(ExperienceCloneStatus)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || ExperienceCloneStatus.new(value))
  end
end

.completedObject



16077
16078
16079
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16077

def ExperienceCloneStatus.completed
  @@_completed ||= ExperienceCloneStatus.new('completed')
end

.failedObject



16081
16082
16083
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16081

def ExperienceCloneStatus.failed
  @@_failed ||= ExperienceCloneStatus.new('failed')
end

.from_string(value) ⇒ Object

Returns the instance of ExperienceCloneStatus for this value, or nil if not found



16060
16061
16062
16063
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16060

def ExperienceCloneStatus.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  ExperienceCloneStatus.ALL.find { |v| v.value == value }
end

.pendingObject



16069
16070
16071
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16069

def ExperienceCloneStatus.pending
  @@_pending ||= ExperienceCloneStatus.new('pending')
end

.updatingObject



16073
16074
16075
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16073

def ExperienceCloneStatus.updating
  @@_updating ||= ExperienceCloneStatus.new('updating')
end

Instance Method Details

#to_hashObject



16085
16086
16087
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16085

def to_hash
  value
end