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.



12431
12432
12433
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12431

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12429
12430
12431
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12429

def value
  @value
end

Class Method Details

.ALLObject



12451
12452
12453
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12451

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



12436
12437
12438
12439
12440
12441
12442
12443
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12436

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



12463
12464
12465
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12463

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

.createdObject



12455
12456
12457
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12455

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

.failedObject



12467
12468
12469
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12467

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



12446
12447
12448
12449
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12446

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

.processingObject



12459
12460
12461
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12459

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

Instance Method Details

#to_hashObject



12471
12472
12473
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12471

def to_hash
  value
end