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.



8331
8332
8333
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8331

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



8329
8330
8331
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8329

def value
  @value
end

Class Method Details

.ALLObject



8351
8352
8353
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8351

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



8336
8337
8338
8339
8340
8341
8342
8343
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8336

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



8363
8364
8365
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8363

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

.createdObject



8355
8356
8357
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8355

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

.failedObject



8367
8368
8369
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8367

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



8346
8347
8348
8349
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8346

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

.processingObject



8359
8360
8361
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8359

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

Instance Method Details

#to_hashObject



8371
8372
8373
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8371

def to_hash
  value
end