lib/sendgrid4r/rest/stats/global.rb in sendgrid4r-1.8.1 vs lib/sendgrid4r/rest/stats/global.rb in sendgrid4r-1.10.0
- old
+ new
@@ -1,26 +1,24 @@
# -*- encoding: utf-8 -*-
-module SendGrid4r
- module REST
- module Stats
- #
- # SendGrid Web API v3 Stats - Global
- #
- module Global
- include SendGrid4r::REST::Request
+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)
- SendGrid4r::REST::Stats.create_top_stats(resp)
- end
+ 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)
+ Stats.create_top_stats(resp)
end
end
end
end