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.



11881
11882
11883
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11881

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



11879
11880
11881
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11879

def value
  @value
end

Class Method Details

.ALLObject



11901
11902
11903
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11901

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



11886
11887
11888
11889
11890
11891
11892
11893
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11886

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



11913
11914
11915
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11913

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

.createdObject



11905
11906
11907
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11905

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

.failedObject



11917
11918
11919
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11917

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



11896
11897
11898
11899
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11896

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

.processingObject



11909
11910
11911
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11909

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

Instance Method Details

#to_hashObject



11921
11922
11923
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 11921

def to_hash
  value
end