Class: Mailfloss::Resources::Reports

Inherits:
Base
  • Object
show all
Defined in:
lib/mailfloss/resources.rb,
sig/resources.rbs

Overview

GET /reports/*

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#encode, #initialize

Constructor Details

This class inherits a constructor from Mailfloss::Resources::Base

Instance Method Details

#usage(period: nil, connection_id: nil) ⇒ Hash

GET /reports/usage — verification usage report.

Parameters:

  • period (String, nil) (defaults to: nil)

    this_week|this_month|this_year|lifetime

  • connection_id (String, nil) (defaults to: nil)

    scope to one ESP connection

  • period: (String, nil) (defaults to: nil)
  • connection_id: (String, nil) (defaults to: nil)

Returns:

  • (Hash)

    { period:, connection_id:, range:, total:, statuses:, reasons: }



106
107
108
109
# File 'lib/mailfloss/resources.rb', line 106

def usage(period: nil, connection_id: nil)
  client.request(:get, "/reports/usage",
                 query: { period: period, connection_id: connection_id })
end