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.



14322
14323
14324
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14322

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



14320
14321
14322
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14320

def value
  @value
end

Class Method Details

.ALLObject



14342
14343
14344
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14342

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



14327
14328
14329
14330
14331
14332
14333
14334
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14327

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



14354
14355
14356
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14354

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

.createdObject



14346
14347
14348
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14346

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

.failedObject



14358
14359
14360
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14358

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



14337
14338
14339
14340
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14337

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

.processingObject



14350
14351
14352
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14350

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

Instance Method Details

#to_hashObject



14362
14363
14364
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14362

def to_hash
  value
end