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.



15237
15238
15239
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15237

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



15235
15236
15237
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15235

def value
  @value
end

Class Method Details

.ALLObject



15257
15258
15259
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15257

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



15242
15243
15244
15245
15246
15247
15248
15249
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15242

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



15269
15270
15271
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15269

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

.createdObject



15261
15262
15263
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15261

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

.failedObject



15273
15274
15275
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15273

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



15252
15253
15254
15255
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15252

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

.processingObject



15265
15266
15267
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15265

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

Instance Method Details

#to_hashObject



15277
15278
15279
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15277

def to_hash
  value
end