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.
18205 18206 18207 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18205 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
18203 18204 18205 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18203 def value @value end |
Class Method Details
.ALL ⇒ Object
18225 18226 18227 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18225 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
18210 18211 18212 18213 18214 18215 18216 18217 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18210 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
18237 18238 18239 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18237 def ExportStatus.completed @@_completed ||= ExportStatus.new('completed') end |
.created ⇒ Object
18229 18230 18231 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18229 def ExportStatus.created @@_created ||= ExportStatus.new('created') end |
.failed ⇒ Object
18241 18242 18243 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18241 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
18220 18221 18222 18223 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18220 def ExportStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ExportStatus.ALL.find { |v| v.value == value } end |
.processing ⇒ Object
18233 18234 18235 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18233 def ExportStatus.processing @@_processing ||= ExportStatus.new('processing') end |
Instance Method Details
#to_hash ⇒ Object
18245 18246 18247 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18245 def to_hash value end |