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.



8459
8460
8461
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8459

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



8457
8458
8459
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8457

def value
  @value
end

Class Method Details

.ALLObject



8479
8480
8481
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8479

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



8464
8465
8466
8467
8468
8469
8470
8471
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8464

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



8491
8492
8493
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8491

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

.createdObject



8483
8484
8485
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8483

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

.failedObject



8495
8496
8497
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8495

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



8474
8475
8476
8477
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8474

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

.processingObject



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

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

Instance Method Details

#to_hashObject



8499
8500
8501
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8499

def to_hash
  value
end