Class: OpportunityBriefing::QuoteCollectionSnapshot

Inherits:
Object
  • Object
show all
Includes:
SnapshotFormatting, Service
Defined in:
app/services/opportunity_briefing/quote_collection_snapshot.rb

Overview

Selects the focused/latest quote and serializes the bounded revision list.

Defined Under Namespace

Classes: Result

Constant Summary collapse

LIMIT =
20

Instance Method Summary collapse

Methods included from Service

#attributes_used, #build_result, call, #logger

Methods included from Service::Initializer

#initialize

Instance Method Details

#callObject



17
18
19
20
21
22
23
# File 'app/services/opportunity_briefing/quote_collection_snapshot.rb', line 17

def call
  Result.new(
    selected_quote: selected_quote,
    items: quotes,
    count: count_data(limited_quotes.size, opportunity.quotes.count, LIMIT)
  )
end