Class: Retab::UsageRunRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::UsageRunRecord
- Defined in:
- lib/retab/usage/usage_run_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ completed_at: :completed_at, created_at: :created_at, credits: :credits, duration_ms: :duration_ms, execution_duration_ms: :execution_duration_ms, page_count: :page_count, retry_count: :retry_count, run_id: :run_id, started_at: :started_at, status: :status, trigger_type: :trigger_type, workflow_id: :workflow_id }.freeze
Instance Attribute Summary collapse
-
#completed_at ⇒ Object
Returns the value of attribute completed_at.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#credits ⇒ Object
Returns the value of attribute credits.
-
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
-
#execution_duration_ms ⇒ Object
Returns the value of attribute execution_duration_ms.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
-
#retry_count ⇒ Object
Returns the value of attribute retry_count.
-
#run_id ⇒ Object
Returns the value of attribute run_id.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#status ⇒ Object
Returns the value of attribute status.
-
#trigger_type ⇒ Object
Returns the value of attribute trigger_type.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ UsageRunRecord
constructor
A new instance of UsageRunRecord.
Constructor Details
#initialize(json) ⇒ UsageRunRecord
Returns a new instance of UsageRunRecord.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/retab/usage/usage_run_record.rb', line 38 def initialize(json) super() hash = self.class.normalize(json) @completed_at = hash[:completed_at] @created_at = hash[:created_at] @credits = hash[:credits] @duration_ms = hash[:duration_ms] @execution_duration_ms = hash[:execution_duration_ms] @page_count = hash[:page_count] @retry_count = hash[:retry_count] @run_id = hash[:run_id] @started_at = hash[:started_at] @status = hash[:status] @trigger_type = hash[:trigger_type] @workflow_id = hash[:workflow_id] end |
Instance Attribute Details
#completed_at ⇒ Object
Returns the value of attribute completed_at.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def completed_at @completed_at end |
#created_at ⇒ Object
Returns the value of attribute created_at.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def created_at @created_at end |
#credits ⇒ Object
Returns the value of attribute credits.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def credits @credits end |
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def duration_ms @duration_ms end |
#execution_duration_ms ⇒ Object
Returns the value of attribute execution_duration_ms.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def execution_duration_ms @execution_duration_ms end |
#page_count ⇒ Object
Returns the value of attribute page_count.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def page_count @page_count end |
#retry_count ⇒ Object
Returns the value of attribute retry_count.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def retry_count @retry_count end |
#run_id ⇒ Object
Returns the value of attribute run_id.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def run_id @run_id end |
#started_at ⇒ Object
Returns the value of attribute started_at.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def started_at @started_at end |
#status ⇒ Object
Returns the value of attribute status.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def status @status end |
#trigger_type ⇒ Object
Returns the value of attribute trigger_type.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def trigger_type @trigger_type end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
23 24 25 |
# File 'lib/retab/usage/usage_run_record.rb', line 23 def workflow_id @workflow_id end |