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.



8531
8532
8533
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8531

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Class Method Details

.ALLObject



8551
8552
8553
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8551

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



8536
8537
8538
8539
8540
8541
8542
8543
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8536

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



8563
8564
8565
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8563

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

.createdObject



8555
8556
8557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8555

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

.failedObject



8567
8568
8569
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8567

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



8546
8547
8548
8549
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8546

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

.processingObject



8559
8560
8561
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8559

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

Instance Method Details

#to_hashObject



8571
8572
8573
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8571

def to_hash
  value
end