Class: Whitebox::Batch
- Inherits:
-
Data
- Object
- Data
- Whitebox::Batch
- Defined in:
- lib/whitebox/models.rb
Instance Attribute Summary collapse
-
#completed ⇒ Object
readonly
Returns the value of attribute completed.
-
#completed_at ⇒ Object
readonly
Returns the value of attribute completed_at.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#failed ⇒ Object
readonly
Returns the value of attribute failed.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#progress ⇒ Object
readonly
Returns the value of attribute progress.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
-
#webhook_url ⇒ Object
readonly
Returns the value of attribute webhook_url.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#completed ⇒ Object (readonly)
Returns the value of attribute completed
34 35 36 |
# File 'lib/whitebox/models.rb', line 34 def completed @completed end |
#completed_at ⇒ Object (readonly)
Returns the value of attribute completed_at
34 35 36 |
# File 'lib/whitebox/models.rb', line 34 def completed_at @completed_at end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at
34 35 36 |
# File 'lib/whitebox/models.rb', line 34 def created_at @created_at end |
#failed ⇒ Object (readonly)
Returns the value of attribute failed
34 35 36 |
# File 'lib/whitebox/models.rb', line 34 def failed @failed end |
#id ⇒ Object (readonly)
Returns the value of attribute id
34 35 36 |
# File 'lib/whitebox/models.rb', line 34 def id @id end |
#progress ⇒ Object (readonly)
Returns the value of attribute progress
34 35 36 |
# File 'lib/whitebox/models.rb', line 34 def progress @progress end |
#status ⇒ Object (readonly)
Returns the value of attribute status
34 35 36 |
# File 'lib/whitebox/models.rb', line 34 def status @status end |
#total ⇒ Object (readonly)
Returns the value of attribute total
34 35 36 |
# File 'lib/whitebox/models.rb', line 34 def total @total end |
#webhook_url ⇒ Object (readonly)
Returns the value of attribute webhook_url
34 35 36 |
# File 'lib/whitebox/models.rb', line 34 def webhook_url @webhook_url end |
Class Method Details
.from_hash(h) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/whitebox/models.rb', line 35 def self.from_hash(h) new( id: h["id"], status: h["status"], total: h["total"], completed: h["completed"], failed: h["failed"], progress: h["progress"], webhook_url: h["webhook_url"], completed_at: h["completed_at"], created_at: h["created_at"] ) end |
Instance Method Details
#complete? ⇒ Boolean
49 |
# File 'lib/whitebox/models.rb', line 49 def complete? = status == "complete" |