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.



8877
8878
8879
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8877

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



8875
8876
8877
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8875

def value
  @value
end

Class Method Details

.ALLObject



8897
8898
8899
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8897

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



8882
8883
8884
8885
8886
8887
8888
8889
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8882

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



8909
8910
8911
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8909

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

.createdObject



8901
8902
8903
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8901

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

.failedObject



8913
8914
8915
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8913

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



8892
8893
8894
8895
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8892

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

.processingObject



8905
8906
8907
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8905

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

Instance Method Details

#to_hashObject



8917
8918
8919
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8917

def to_hash
  value
end