Class: EdiPartners::DashboardService

Inherits:
Object
  • Object
show all
Defined in:
app/services/edi_partners/dashboard_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(partner_ids:, start_date:, end_date:) ⇒ DashboardService

Returns a new instance of DashboardService.



5
6
7
8
9
# File 'app/services/edi_partners/dashboard_service.rb', line 5

def initialize(partner_ids:, start_date:, end_date:)
  @partner_ids = partner_ids
  @start_date = start_date
  @end_date = end_date
end

Instance Attribute Details

#end_dateObject (readonly)

Returns the value of attribute end_date.



3
4
5
# File 'app/services/edi_partners/dashboard_service.rb', line 3

def end_date
  @end_date
end

#partner_idsObject (readonly)

Returns the value of attribute partner_ids.



3
4
5
# File 'app/services/edi_partners/dashboard_service.rb', line 3

def partner_ids
  @partner_ids
end

#start_dateObject (readonly)

Returns the value of attribute start_date.



3
4
5
# File 'app/services/edi_partners/dashboard_service.rb', line 3

def start_date
  @start_date
end

Instance Method Details

#dashboard_statsObject



11
12
13
14
15
16
17
# File 'app/services/edi_partners/dashboard_service.rb', line 11

def dashboard_stats
  {
    approval_responses: approval_responses,
    status_messages: status_messages,
    status_messages_codes: status_messages_codes
  }
end