Class: Io::Flow::V0::Models::ExportStatus

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

Returns a new instance of ExportStatus.



12293
12294
12295
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12293

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12291
12292
12293
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12291

def value
  @value
end

Class Method Details

.ALLObject



12313
12314
12315
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12313

def ExportStatus.ALL
  @@all ||= [ExportStatus.created, ExportStatus.processing, ExportStatus.completed, ExportStatus.failed]
end

.apply(value) ⇒ Object

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



12298
12299
12300
12301
12302
12303
12304
12305
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12298

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

.completedObject



12325
12326
12327
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12325

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

.createdObject



12317
12318
12319
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12317

def ExportStatus.created
  @@_created ||= ExportStatus.new('created')
end

.failedObject



12329
12330
12331
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12329

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

.from_string(value) ⇒ Object

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



12308
12309
12310
12311
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12308

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

.processingObject



12321
12322
12323
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12321

def ExportStatus.processing
  @@_processing ||= ExportStatus.new('processing')
end

Instance Method Details

#to_hashObject



12333
12334
12335
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12333

def to_hash
  value
end