Class: LlmCostTracker::Reconciliation::ImportResult
- Inherits:
-
Data
- Object
- Data
- LlmCostTracker::Reconciliation::ImportResult
- Defined in:
- lib/llm_cost_tracker/reconciliation/import_result.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#import_id ⇒ Object
readonly
Returns the value of attribute import_id.
-
#inserted ⇒ Object
readonly
Returns the value of attribute inserted.
-
#skipped ⇒ Object
readonly
Returns the value of attribute skipped.
-
#updated ⇒ Object
readonly
Returns the value of attribute updated.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/import_result.rb', line 5 def errors @errors end |
#import_id ⇒ Object (readonly)
Returns the value of attribute import_id
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/import_result.rb', line 5 def import_id @import_id end |
#inserted ⇒ Object (readonly)
Returns the value of attribute inserted
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/import_result.rb', line 5 def inserted @inserted end |
#skipped ⇒ Object (readonly)
Returns the value of attribute skipped
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/import_result.rb', line 5 def skipped @skipped end |
#updated ⇒ Object (readonly)
Returns the value of attribute updated
5 6 7 |
# File 'lib/llm_cost_tracker/reconciliation/import_result.rb', line 5 def updated @updated end |
Class Method Details
.empty ⇒ Object
6 7 8 |
# File 'lib/llm_cost_tracker/reconciliation/import_result.rb', line 6 def self.empty new(inserted: 0, updated: 0, skipped: 0, errors: [], import_id: nil) end |
Instance Method Details
#success? ⇒ Boolean
14 15 16 |
# File 'lib/llm_cost_tracker/reconciliation/import_result.rb', line 14 def success? errors.empty? end |
#total_imported ⇒ Object
10 11 12 |
# File 'lib/llm_cost_tracker/reconciliation/import_result.rb', line 10 def total_imported inserted + updated end |