Class: Retab::UsageRunRecord

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_atObject

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_atObject

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

#creditsObject

Returns the value of attribute credits.



23
24
25
# File 'lib/retab/usage/usage_run_record.rb', line 23

def credits
  @credits
end

#duration_msObject

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_msObject

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_countObject

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_countObject

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_idObject

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_atObject

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

#statusObject

Returns the value of attribute status.



23
24
25
# File 'lib/retab/usage/usage_run_record.rb', line 23

def status
  @status
end

#trigger_typeObject

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_idObject

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