Class: Spree::SavedReport
- Inherits:
-
Object
- Object
- Spree::SavedReport
- Includes:
- SingleStoreResource
- Defined in:
- app/models/spree/saved_report.rb
Overview
A reporting query kept for reuse: the contract JSON (see Spree::Reporting::Query); its visualization is inferred from the query's shape. Owned by the store and visible to every staff member who may read reports; the author is recorded for attribution only — execution re-authorizes the viewer.
Instance Method Summary collapse
- #event_serializer_class ⇒ Object
-
#reporting_query ⇒ Spree::Reporting::Query
The stored query, normalized against the registry.
Instance Method Details
#event_serializer_class ⇒ Object
28 29 30 |
# File 'app/models/spree/saved_report.rb', line 28 def event_serializer_class 'Spree::Api::V3::SavedReportEventSerializer'.safe_constantize end |
#reporting_query ⇒ Spree::Reporting::Query
The stored query, normalized against the registry.
35 36 37 |
# File 'app/models/spree/saved_report.rb', line 35 def reporting_query Spree::Reporting::Query.new(store: store, params: query || {}) end |