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.



20394
20395
20396
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20394

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20392
20393
20394
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20392

def value
  @value
end

Class Method Details

.ALLObject



20414
20415
20416
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20414

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



20399
20400
20401
20402
20403
20404
20405
20406
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20399

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



20426
20427
20428
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20426

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

.createdObject



20418
20419
20420
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20418

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

.failedObject



20430
20431
20432
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20430

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



20409
20410
20411
20412
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20409

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

.processingObject



20422
20423
20424
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20422

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

Instance Method Details

#to_hashObject



20434
20435
20436
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20434

def to_hash
  value
end