Sha256: 1c9d2c74dd840f466bcdc868e24b8286268b8989b6e8e819e2ad5f5970c2a310

Contents?: true

Size: 548 Bytes

Versions: 4

Compression:

Stored size: 548 Bytes

Contents

# -*- encoding: utf-8 -*-

module SendGrid4r::REST
  module Stats
    #
    # SendGrid Web API v3 Stats - Global
    #
    module Global
      include Request

      def get_global_stats(
        start_date:, end_date: nil, aggregated_by: nil, &block
      )
        params = {
          start_date: start_date,
          end_date: end_date,
          aggregated_by: aggregated_by
        }
        resp = get(@auth, "#{BASE_URL}/stats", params, &block)
        finish(resp, @raw_resp) { |r| Stats.create_top_stats(r) }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sendgrid4r-1.15.0 lib/sendgrid4r/rest/stats/global.rb
sendgrid4r-1.14.0 lib/sendgrid4r/rest/stats/global.rb
sendgrid4r-1.13.0 lib/sendgrid4r/rest/stats/global.rb
sendgrid4r-1.12.0 lib/sendgrid4r/rest/stats/global.rb