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.



20209
20210
20211
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20209

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20207
20208
20209
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20207

def value
  @value
end

Class Method Details

.ALLObject



20229
20230
20231
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20229

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



20214
20215
20216
20217
20218
20219
20220
20221
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20214

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



20241
20242
20243
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20241

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

.failedObject



20245
20246
20247
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20245

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



20224
20225
20226
20227
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20224

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

.pendingObject



20233
20234
20235
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20233

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

.updatingObject



20237
20238
20239
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20237

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

Instance Method Details

#to_hashObject



20249
20250
20251
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20249

def to_hash
  value
end