Class: OpportunityBriefing::CallSnapshot

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

Overview

Serializes only call records the requesting rep is permitted to read.

Defined Under Namespace

Classes: Result

Constant Summary collapse

LIMIT =
10

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
24
# File 'app/services/opportunity_briefing/call_snapshot.rb', line 17

def call
  validate!

  Result.new(
    items: calls,
    count: count_data(calls.size, permitted_total, LIMIT)
  )
end