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.
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
#value ⇒ Object (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
.ALL ⇒ Object
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 |
.completed ⇒ Object
12463 12464 12465 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12463 def ExportStatus.completed @@_completed ||= ExportStatus.new('completed') end |
.created ⇒ Object
12455 12456 12457 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12455 def ExportStatus.created @@_created ||= ExportStatus.new('created') end |
.failed ⇒ Object
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 |
.processing ⇒ Object
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_hash ⇒ Object
12471 12472 12473 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12471 def to_hash value end |