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.



15478
15479
15480
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15478

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



15476
15477
15478
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15476

def value
  @value
end

Class Method Details

.ALLObject



15498
15499
15500
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15498

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



15483
15484
15485
15486
15487
15488
15489
15490
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15483

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



15510
15511
15512
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15510

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

.createdObject



15502
15503
15504
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15502

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

.failedObject



15514
15515
15516
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15514

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



15493
15494
15495
15496
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15493

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

.processingObject



15506
15507
15508
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15506

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

Instance Method Details

#to_hashObject



15518
15519
15520
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15518

def to_hash
  value
end