Class: Io::Flow::V0::Models::ExportStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExportStatus
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of ExportStatus for this value, creating a new instance for an unknown value.
- .completed ⇒ Object
- .created ⇒ Object
- .failed ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ExportStatus for this value, or nil if not found.
- .processing ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ExportStatus
constructor
A new instance of ExportStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ExportStatus
Returns a new instance of ExportStatus.
14322 14323 14324 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14322 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14320 14321 14322 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14320 def value @value end |
Class Method Details
.ALL ⇒ Object
14342 14343 14344 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14342 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
14327 14328 14329 14330 14331 14332 14333 14334 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14327 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 |
.completed ⇒ Object
14354 14355 14356 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14354 def ExportStatus.completed @@_completed ||= ExportStatus.new('completed') end |
.created ⇒ Object
14346 14347 14348 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14346 def ExportStatus.created @@_created ||= ExportStatus.new('created') end |
.failed ⇒ Object
14358 14359 14360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14358 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
14337 14338 14339 14340 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14337 def ExportStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ExportStatus.ALL.find { |v| v.value == value } end |
.processing ⇒ Object
14350 14351 14352 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14350 def ExportStatus.processing @@_processing ||= ExportStatus.new('processing') end |
Instance Method Details
#to_hash ⇒ Object
14362 14363 14364 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14362 def to_hash value end |