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.



8488
8489
8490
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8488

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



8486
8487
8488
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8486

def value
  @value
end

Class Method Details

.ALLObject



8508
8509
8510
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8508

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



8493
8494
8495
8496
8497
8498
8499
8500
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8493

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



8520
8521
8522
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8520

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

.createdObject



8512
8513
8514
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8512

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

.failedObject



8524
8525
8526
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8524

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



8503
8504
8505
8506
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8503

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

.processingObject



8516
8517
8518
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8516

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

Instance Method Details

#to_hashObject



8528
8529
8530
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8528

def to_hash
  value
end