Class: AiUsage::CostReconciler::Report
- Inherits:
-
Data
- Object
- Data
- AiUsage::CostReconciler::Report
- Defined in:
- app/services/ai_usage/cost_reconciler.rb
Overview
Full reconciliation result for a window.
Instance Attribute Summary collapse
-
#ending_at ⇒ Object
readonly
Returns the value of attribute ending_at.
-
#real_total_usd ⇒ Object
readonly
Returns the value of attribute real_total_usd.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
-
#starting_at ⇒ Object
readonly
Returns the value of attribute starting_at.
-
#tracked_total_usd ⇒ Object
readonly
Returns the value of attribute tracked_total_usd.
Instance Method Summary collapse
-
#coverage_pct ⇒ Float
Overall tracked as a percentage of real.
Instance Attribute Details
#ending_at ⇒ Object (readonly)
Returns the value of attribute ending_at
26 27 28 |
# File 'app/services/ai_usage/cost_reconciler.rb', line 26 def ending_at @ending_at end |
#real_total_usd ⇒ Object (readonly)
Returns the value of attribute real_total_usd
26 27 28 |
# File 'app/services/ai_usage/cost_reconciler.rb', line 26 def real_total_usd @real_total_usd end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows
26 27 28 |
# File 'app/services/ai_usage/cost_reconciler.rb', line 26 def rows @rows end |
#starting_at ⇒ Object (readonly)
Returns the value of attribute starting_at
26 27 28 |
# File 'app/services/ai_usage/cost_reconciler.rb', line 26 def starting_at @starting_at end |
#tracked_total_usd ⇒ Object (readonly)
Returns the value of attribute tracked_total_usd
26 27 28 |
# File 'app/services/ai_usage/cost_reconciler.rb', line 26 def tracked_total_usd @tracked_total_usd end |
Instance Method Details
#coverage_pct ⇒ Float
Returns overall tracked as a percentage of real.
28 29 30 |
# File 'app/services/ai_usage/cost_reconciler.rb', line 28 def coverage_pct real_total_usd.zero? ? 100.0 : (tracked_total_usd / real_total_usd * 100).round(1) end |