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.



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

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Class Method Details

.ALLObject



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

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



8901
8902
8903
8904
8905
8906
8907
8908
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8901

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



8928
8929
8930
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8928

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

.createdObject



8920
8921
8922
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8920

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

.failedObject



8932
8933
8934
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8932

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



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

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

.processingObject



8924
8925
8926
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8924

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

Instance Method Details

#to_hashObject



8936
8937
8938
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8936

def to_hash
  value
end