mailgun-ruby 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +30 -8
  3. data/.rubocop.yml +64 -4
  4. data/Gemfile +3 -1
  5. data/README.md +1 -1
  6. data/Rakefile +5 -8
  7. data/docs/AnalyticsTags.md +63 -0
  8. data/lib/mailgun/address.rb +5 -5
  9. data/lib/mailgun/chains.rb +2 -3
  10. data/lib/mailgun/client.rb +56 -56
  11. data/lib/mailgun/domains/domains.rb +11 -10
  12. data/lib/mailgun/events/events.rb +4 -3
  13. data/lib/mailgun/exceptions/exceptions.rb +12 -15
  14. data/lib/mailgun/helpers/api_version_checker.rb +6 -1
  15. data/lib/mailgun/lists/opt_in_handler.rb +6 -10
  16. data/lib/mailgun/logs/logs.rb +4 -2
  17. data/lib/mailgun/messages/batch_message.rb +10 -10
  18. data/lib/mailgun/messages/message_builder.rb +40 -56
  19. data/lib/mailgun/metrics/metrics.rb +12 -6
  20. data/lib/mailgun/response.rb +12 -10
  21. data/lib/mailgun/subaccounts/subaccounts.rb +13 -8
  22. data/lib/mailgun/suppressions.rb +36 -43
  23. data/lib/mailgun/tags/analytics_tags.rb +37 -2
  24. data/lib/mailgun/tags/tags.rb +29 -19
  25. data/lib/mailgun/templates/templates.rb +40 -29
  26. data/lib/mailgun/version.rb +3 -1
  27. data/lib/mailgun/webhooks/webhooks.rb +22 -19
  28. data/lib/mailgun-ruby.rb +2 -0
  29. data/lib/mailgun.rb +4 -4
  30. data/lib/railgun/attachment.rb +12 -19
  31. data/lib/railgun/errors.rb +2 -3
  32. data/lib/railgun/mailer.rb +37 -41
  33. data/lib/railgun/railtie.rb +2 -0
  34. data/lib/railgun.rb +2 -0
  35. data/mailgun.gemspec +15 -11
  36. data/spec/integration/analytics_tags_spec.rb +54 -0
  37. data/spec/integration/bounces_spec.rb +12 -11
  38. data/spec/integration/campaign_spec.rb +20 -18
  39. data/spec/integration/complaints_spec.rb +8 -6
  40. data/spec/integration/domains_spec.rb +12 -18
  41. data/spec/integration/email_validation_spec.rb +35 -34
  42. data/spec/integration/events_spec.rb +8 -8
  43. data/spec/integration/list_members_spec.rb +27 -26
  44. data/spec/integration/list_spec.rb +22 -21
  45. data/spec/integration/logs_spec.rb +49 -47
  46. data/spec/integration/mailer_spec.rb +7 -3
  47. data/spec/integration/mailgun_spec.rb +85 -92
  48. data/spec/integration/metrics_spec.rb +137 -131
  49. data/spec/integration/routes_spec.rb +41 -40
  50. data/spec/integration/stats_spec.rb +4 -2
  51. data/spec/integration/subaccounts_spec.rb +9 -10
  52. data/spec/integration/suppressions_spec.rb +222 -44
  53. data/spec/integration/templates_spec.rb +14 -12
  54. data/spec/integration/unsubscribes_spec.rb +8 -6
  55. data/spec/integration/webhook_spec.rb +18 -12
  56. data/spec/spec_helper.rb +15 -8
  57. data/spec/unit/client_spec.rb +424 -0
  58. data/spec/unit/connection/test_client.rb +108 -55
  59. data/spec/unit/events/events_spec.rb +48 -29
  60. data/spec/unit/exceptions/exceptions_spec.rb +8 -7
  61. data/spec/unit/helpers/api_version_checker_spec.rb +206 -0
  62. data/spec/unit/lists/opt_in_handler_spec.rb +11 -7
  63. data/spec/unit/mailgun_spec.rb +71 -68
  64. data/spec/unit/messages/batch_message_spec.rb +37 -36
  65. data/spec/unit/messages/message_builder_spec.rb +170 -169
  66. data/spec/unit/railgun/content_type_spec.rb +31 -30
  67. data/spec/unit/railgun/mailer_spec.rb +62 -59
  68. data/spec/unit/response_spec.rb +225 -0
  69. data/vcr_cassettes/For_the_suppressions_handling_class/creates_a_single_bounce.yml +55 -0
  70. data/vcr_cassettes/analytics_tags.yml +187 -0
  71. data/vcr_cassettes/suppressions.yml +1053 -170
  72. metadata +95 -29
  73. data/.rubocop_todo.yml +0 -22
@@ -1,105 +1,99 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
  require 'mailgun'
3
5
  require 'mailgun/exceptions/exceptions'
4
6
 
5
- describe 'Mailgun instantiation', vcr: { :cassette_name => "instance" } do
7
+ describe 'Mailgun instantiation', vcr: { cassette_name: 'instance' } do
6
8
  it 'instantiates an HttpClient object' do
7
- expect {@mg_obj = Mailgun::Client.new(APIKEY, APIHOST, APIVERSION, SSL)}.not_to raise_error
9
+ expect { @mg_obj = Mailgun::Client.new(APIKEY, APIHOST, APIVERSION, SSL) }.not_to raise_error
8
10
  end
9
11
  end
10
12
 
11
- describe 'Client exceptions', vcr: { :cassette_name => "exceptions" } do
13
+ describe 'Client exceptions', vcr: { cassette_name: 'exceptions' } do
12
14
  before(:all) do
13
15
  @mg_obj = Mailgun::Client.new(APIKEY, APIHOST, APIVERSION, SSL)
14
16
  @domain = TESTDOMAIN || 'DOMAIN.TEST'
15
17
  end
16
18
 
17
19
  it 'display useful error information' do
18
- begin
19
- @mg_obj.send_message("not-our-doma.in", {
20
- :from => "sally@not-our-doma.in",
21
- :to => "bob@#{@domain}",
22
- :subject => 'Exception Integration Test',
23
- :text => 'INTEGRATION TESTING'
24
- })
25
- rescue Mailgun::CommunicationError => err
26
- expect(err.message).to include('404')
27
- expect(err.message).to include('Domain not found: not-our-doma.in')
28
- else
29
- fail
30
- end
20
+ @mg_obj.send_message('not-our-doma.in', {
21
+ from: 'sally@not-our-doma.in',
22
+ to: "bob@#{@domain}",
23
+ subject: 'Exception Integration Test',
24
+ text: 'INTEGRATION TESTING'
25
+ })
26
+ rescue Mailgun::CommunicationError => e
27
+ expect(e.message).to include('404')
28
+ expect(e.message).to include('Domain not found: not-our-doma.in')
29
+ else
30
+ raise
31
31
  end
32
32
  end
33
33
 
34
- describe 'Client exceptions', vcr: { :cassette_name => "exceptions-invalid-api-key" } do
34
+ describe 'Client exceptions', vcr: { cassette_name: 'exceptions-invalid-api-key' } do
35
35
  before(:all) do
36
36
  @mg_obj = Mailgun::Client.new(APIKEY, APIHOST, APIVERSION, SSL)
37
37
  @domain = TESTDOMAIN || 'DOMAIN.TEST'
38
38
  end
39
39
 
40
40
  it 'displays error information that API key is invalid' do
41
- begin
42
- @mg_obj.send_message(@domain, {
43
- :from => "sally@#{@domain}",
44
- :to => "sally@#{@domain}",
45
- :subject => 'Exception Integration Test',
46
- :text => 'INTEGRATION TESTING'
47
- })
48
- rescue Mailgun::Unauthorized => err
49
- expect(err.message).to include('401')
50
- expect(err.message).to include('Invalid Domain or API key')
51
- else
52
- fail
53
- end
41
+ @mg_obj.send_message(@domain, {
42
+ from: "sally@#{@domain}",
43
+ to: "sally@#{@domain}",
44
+ subject: 'Exception Integration Test',
45
+ text: 'INTEGRATION TESTING'
46
+ })
47
+ rescue Mailgun::Unauthorized => e
48
+ expect(e.message).to include('401')
49
+ expect(e.message).to include('Invalid Domain or API key')
50
+ else
51
+ raise
54
52
  end
55
53
  end
56
54
 
57
- describe 'Client exceptions', vcr: { :cassette_name => "exceptions-invalid-data" } do
55
+ describe 'Client exceptions', vcr: { cassette_name: 'exceptions-invalid-data' } do
58
56
  before(:all) do
59
57
  @mg_obj = Mailgun::Client.new(APIKEY, APIHOST, APIVERSION, SSL)
60
58
  @domain = TESTDOMAIN || 'DOMAIN.TEST'
61
59
  end
62
60
 
63
61
  it 'display useful error information' do
64
- begin
65
- @mg_obj.send_message(@domain, {
66
- :from => "sally@#{@domain}",
67
- :to => "sally#{@domain}",
68
- :subject => 'Exception Integration Test',
69
- :text => 'INTEGRATION TESTING'
70
- })
71
- rescue Mailgun::BadRequest => err
72
- expect(err.message).to include('400')
73
- expect(err.message).to include('to parameter is not a valid address. please check documentation')
74
- else
75
- fail
76
- end
62
+ @mg_obj.send_message(@domain, {
63
+ from: "sally@#{@domain}",
64
+ to: "sally#{@domain}",
65
+ subject: 'Exception Integration Test',
66
+ text: 'INTEGRATION TESTING'
67
+ })
68
+ rescue Mailgun::BadRequest => e
69
+ expect(e.message).to include('400')
70
+ expect(e.message).to include('to parameter is not a valid address. please check documentation')
71
+ else
72
+ raise
77
73
  end
78
74
  end
79
75
 
80
- describe 'Client exceptions', vcr: { :cassette_name => "exceptions-not-allowed" } do
76
+ describe 'Client exceptions', vcr: { cassette_name: 'exceptions-not-allowed' } do
81
77
  before(:all) do
82
78
  @mg_obj = Mailgun::Client.new(APIKEY, APIHOST, APIVERSION, SSL)
83
79
  @domain = TESTDOMAIN || 'DOMAIN.TEST'
84
80
  end
85
81
 
86
82
  it 'display useful error information' do
87
- begin
88
- @mg_obj.send_message(@domain, {
89
- :from => "invalid@#{@domain}",
90
- :to => "invalid#{@domain}",
91
- :subject => 'Exception Integration Test',
92
- :text => 'INTEGRATION TESTING'
93
- })
94
- rescue Mailgun::CommunicationError => err
95
- expect(err.message).to include('403')
96
- else
97
- fail
98
- end
83
+ @mg_obj.send_message(@domain, {
84
+ from: "invalid@#{@domain}",
85
+ to: "invalid#{@domain}",
86
+ subject: 'Exception Integration Test',
87
+ text: 'INTEGRATION TESTING'
88
+ })
89
+ rescue Mailgun::CommunicationError => e
90
+ expect(e.message).to include('403')
91
+ else
92
+ raise
99
93
  end
100
94
  end
101
95
 
102
- describe 'The method send_message()', vcr: { :cassette_name => "send_message" } do
96
+ describe 'The method send_message()', vcr: { cassette_name: 'send_message' } do
103
97
  before(:all) do
104
98
  @mg_obj = Mailgun::Client.new(APIKEY, APIHOST, APIVERSION, SSL)
105
99
  @domain = TESTDOMAIN || 'DOMAIN.TEST'
@@ -107,26 +101,26 @@ describe 'The method send_message()', vcr: { :cassette_name => "send_message" }
107
101
 
108
102
  it 'sends a standard message in test mode.' do
109
103
  @mg_obj.enable_test_mode!
110
- result = @mg_obj.send_message(@domain, {:from => "bob@#{@domain}",
111
- :to => "sally@#{@domain}",
112
- :subject => 'Hash Integration Test',
113
- :text => 'INTEGRATION TESTING',
114
- 'o:testmode' => true}
115
- )
104
+ result = @mg_obj.send_message(@domain, { :from => "bob@#{@domain}",
105
+ :to => "sally@#{@domain}",
106
+ :subject => 'Hash Integration Test',
107
+ :text => 'INTEGRATION TESTING',
108
+ 'o:testmode' => true })
116
109
  result.to_h!
117
- expect(result.body).to include("message")
118
- expect(result.body).to include("id")
110
+ expect(result.body).to include('message')
111
+ expect(result.body).to include('id')
112
+ expect(Mailgun::Client.deliveries.size).to eq(1)
119
113
  end
120
114
 
121
115
  it 'fakes message send while in *client* test mode' do
122
116
  @mg_obj.enable_test_mode!
123
117
 
124
- expect(@mg_obj.test_mode?).to eq(true)
118
+ expect(@mg_obj.test_mode?).to be(true)
125
119
 
126
- data = { :from => "joe@#{@domain}",
127
- :to => "bob@#{@domain}",
128
- :subject => "Test",
129
- :text => "Test Data" }
120
+ data = { from: "joe@#{@domain}",
121
+ to: "bob@#{@domain}",
122
+ subject: 'Test',
123
+ text: 'Test Data' }
130
124
  uuid = 'uuid'
131
125
 
132
126
  allow(SecureRandom).to receive(:uuid).and_return(uuid)
@@ -135,27 +129,27 @@ describe 'The method send_message()', vcr: { :cassette_name => "send_message" }
135
129
 
136
130
  result.to_h!
137
131
 
138
- expect(result.body).to include("message")
139
- expect(result.body).to include("id")
132
+ expect(result.body).to include('message')
133
+ expect(result.body).to include('id')
140
134
 
141
135
  expect(result.code).to eq(200)
142
136
  expect(result.body['id']).to eq("test-mode-mail-#{uuid}@localhost")
143
- expect(result.body['message']).to eq("Queued. Thank you.")
137
+ expect(result.body['message']).to eq('Queued. Thank you.')
144
138
  end
145
139
 
146
140
  it 'sends a message builder message in test mode.' do
147
- mb_obj = Mailgun::MessageBuilder.new()
148
- mb_obj.from("sender@#{@domain}", {'first' => 'Sending', 'last' => 'User'})
149
- mb_obj.add_recipient(:to, "recipient@#{@domain}", {'first' => 'Recipient', 'last' => 'User'})
150
- mb_obj.subject("Message Builder Integration Test")
151
- mb_obj.body_text("This is the text body.")
141
+ mb_obj = Mailgun::MessageBuilder.new
142
+ mb_obj.from("sender@#{@domain}", { 'first' => 'Sending', 'last' => 'User' })
143
+ mb_obj.add_recipient(:to, "recipient@#{@domain}", { 'first' => 'Recipient', 'last' => 'User' })
144
+ mb_obj.subject('Message Builder Integration Test')
145
+ mb_obj.body_text('This is the text body.')
152
146
  mb_obj.test_mode(true)
153
147
 
154
148
  result = @mg_obj.send_message(@domain, mb_obj)
155
149
 
156
150
  result.to_h!
157
- expect(result.body).to include("message")
158
- expect(result.body).to include("id")
151
+ expect(result.body).to include('message')
152
+ expect(result.body).to include('id')
159
153
  end
160
154
 
161
155
  it 'sends a custom MIME message in test mode.' do
@@ -175,26 +169,26 @@ Sender: me@samples.mailgun.org
175
169
 
176
170
  Testing some Mailgun awesomness!'
177
171
 
178
- message_params = {:from => "bobby@#{@domain}",
179
- :to => "sally@#{@domain}",
180
- :message => mime_string}
172
+ message_params = { from: "bobby@#{@domain}",
173
+ to: "sally@#{@domain}",
174
+ message: mime_string }
181
175
 
182
176
  result = @mg_obj.send_message(@domain, message_params)
183
177
 
184
178
  result.to_h!
185
- expect(result.body).to include("message")
186
- expect(result.body).to include("id")
179
+ expect(result.body).to include('message')
180
+ expect(result.body).to include('id')
187
181
  end
188
182
 
189
183
  it 'receives success response code' do
190
184
  @mg_obj.enable_test_mode!
191
185
 
192
- expect(@mg_obj.test_mode?).to eq(true)
186
+ expect(@mg_obj.test_mode?).to be(true)
193
187
 
194
- data = { :from => "joe@#{@domain}",
195
- :to => "bob@#{@domain}",
196
- :subject => "Test",
197
- :text => "Test Data" }
188
+ data = { from: "joe@#{@domain}",
189
+ to: "bob@#{@domain}",
190
+ subject: 'Test',
191
+ text: 'Test Data' }
198
192
 
199
193
  result = @mg_obj.send_message(@domain, data)
200
194
  result.to_h!
@@ -202,4 +196,3 @@ Testing some Mailgun awesomness!'
202
196
  expect(result.success?).to be(true)
203
197
  end
204
198
  end
205
-
@@ -1,20 +1,22 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
  require 'mailgun'
3
5
 
4
6
  vcr_opts = { cassette_name: 'metrics' }
5
7
 
6
8
  describe Mailgun::Metrics, vcr: vcr_opts do
7
- let(:metrics) { Mailgun::Metrics.new(Mailgun::Client.new(APIKEY, APIHOST, 'v1')) }
9
+ let(:metrics) { described_class.new(Mailgun::Client.new(APIKEY, APIHOST, 'v1')) }
8
10
 
9
11
  describe '#account_metrics' do
10
12
  let(:options) do
11
13
  {
12
14
  resolution: 'hour',
13
- metrics: [
14
- 'accepted_count',
15
- 'delivered_count',
16
- 'clicked_rate',
17
- 'opened_rate'
15
+ metrics: %w[
16
+ accepted_count
17
+ delivered_count
18
+ clicked_rate
19
+ opened_rate
18
20
  ],
19
21
  include_aggregates: true,
20
22
  start: 'Tue, 26 Nov 2024 20:56:50 -0500',
@@ -42,48 +44,53 @@ describe Mailgun::Metrics, vcr: vcr_opts do
42
44
  it 'responds with account metrics' do
43
45
  expect(metrics.account_metrics(options)).to eq(
44
46
  {
45
- "start" => "Fri, 01 Nov 2024 01:00:00 +0000",
46
- "end" => "Sun, 01 Dec 2024 01:00:00 +0000",
47
- "resolution" => "hour",
48
- "duration" => "1m",
49
- "dimensions" => ["time"],
50
- "pagination" => {
51
- "sort" => "", "skip" => 0, "limit" => 1500, "total" => 3
47
+ 'start' => 'Fri, 01 Nov 2024 01:00:00 +0000',
48
+ 'end' => 'Sun, 01 Dec 2024 01:00:00 +0000',
49
+ 'resolution' => 'hour',
50
+ 'duration' => '1m',
51
+ 'dimensions' => ['time'],
52
+ 'pagination' => {
53
+ 'sort' => '', 'skip' => 0, 'limit' => 1500, 'total' => 3
52
54
  },
53
- "items" => [{
54
- "dimensions" => [{
55
- "dimension" => "time",
56
- "value" => "Wed, 27 Nov 2024 12:00:00 +0000",
57
- "display_value" => "Wed, 27 Nov 2024 12:00:00 +0000"
58
- }],
59
- "metrics" => {
60
- "accepted_count" => 1, "delivered_count" => 1, "opened_rate" => "0.0000", "clicked_rate" => "0.0000"
61
- }
62
- },
63
- {
64
- "dimensions" => [{
65
- "dimension" => "time",
66
- "value" => "Wed, 27 Nov 2024 13:00:00 +0000",
67
- "display_value" => "Wed, 27 Nov 2024 13:00:00 +0000"
68
- }],
69
- "metrics" => {
70
- "accepted_count" => 1, "delivered_count" => 1, "opened_rate" => "0.0000", "clicked_rate" => "0.0000"
71
- }
72
- },
73
- {
74
- "dimensions" => [{
75
- "dimension" => "time",
76
- "value" => "Thu, 28 Nov 2024 15:00:00 +0000",
77
- "display_value" => "Thu, 28 Nov 2024 15:00:00 +0000"
78
- }],
79
- "metrics" => {
80
- "accepted_count" => 1, "delivered_count" => 1, "opened_rate" => "0.0000", "clicked_rate" => "0.0000"
81
- }
55
+ 'items' => [{
56
+ 'dimensions' => [{
57
+ 'dimension' => 'time',
58
+ 'value' => 'Wed, 27 Nov 2024 12:00:00 +0000',
59
+ 'display_value' => 'Wed, 27 Nov 2024 12:00:00 +0000'
60
+ }],
61
+ 'metrics' => {
62
+ 'accepted_count' => 1, 'delivered_count' => 1, 'opened_rate' => '0.0000', 'clicked_rate' => '0.0000'
82
63
  }
83
- ],
84
- "aggregates" => {
85
- "metrics" => {
86
- "accepted_count" => 3, "delivered_count" => 3, "opened_rate" => "0.0000", "clicked_rate" => "0.0000"
64
+ },
65
+ {
66
+ 'dimensions' => [{
67
+ 'dimension' => 'time',
68
+ 'value' => 'Wed, 27 Nov 2024 13:00:00 +0000',
69
+ 'display_value' => 'Wed, 27 Nov 2024 13:00:00 +0000'
70
+ }],
71
+ 'metrics' => {
72
+ 'accepted_count' => 1,
73
+ 'delivered_count' => 1,
74
+ 'opened_rate' => '0.0000',
75
+ 'clicked_rate' => '0.0000'
76
+ }
77
+ },
78
+ {
79
+ 'dimensions' => [{
80
+ 'dimension' => 'time',
81
+ 'value' => 'Thu, 28 Nov 2024 15:00:00 +0000',
82
+ 'display_value' => 'Thu, 28 Nov 2024 15:00:00 +0000'
83
+ }],
84
+ 'metrics' => {
85
+ 'accepted_count' => 1,
86
+ 'delivered_count' => 1,
87
+ 'opened_rate' => '0.0000',
88
+ 'clicked_rate' => '0.0000'
89
+ }
90
+ }],
91
+ 'aggregates' => {
92
+ 'metrics' => {
93
+ 'accepted_count' => 3, 'delivered_count' => 3, 'opened_rate' => '0.0000', 'clicked_rate' => '0.0000'
87
94
  }
88
95
  }
89
96
  }
@@ -95,21 +102,21 @@ describe Mailgun::Metrics, vcr: vcr_opts do
95
102
  let(:options) do
96
103
  {
97
104
  resolution: 'hour',
98
- metrics: [
99
- 'email_preview_count',
100
- 'email_preview_failed_count',
101
- 'email_validation_bulk_count',
102
- 'email_validation_count',
103
- 'email_validation_list_count',
104
- 'email_validation_mailgun_count',
105
- 'email_validation_mailjet_count',
106
- 'email_validation_public_count',
107
- 'email_validation_single_count',
108
- 'email_validation_valid_count',
109
- 'link_validation_count',
110
- 'link_validation_failed_count',
111
- 'processed_count',
112
- 'seed_test_count'
105
+ metrics: %w[
106
+ email_preview_count
107
+ email_preview_failed_count
108
+ email_validation_bulk_count
109
+ email_validation_count
110
+ email_validation_list_count
111
+ email_validation_mailgun_count
112
+ email_validation_mailjet_count
113
+ email_validation_public_count
114
+ email_validation_single_count
115
+ email_validation_valid_count
116
+ link_validation_count
117
+ link_validation_failed_count
118
+ processed_count
119
+ seed_test_count
113
120
  ],
114
121
  include_aggregates: true,
115
122
  start: 'Tue, 26 Nov 2024 20:56:50 -0500',
@@ -137,78 +144,77 @@ describe Mailgun::Metrics, vcr: vcr_opts do
137
144
  it 'responds with account usage metrics' do
138
145
  expect(metrics.account_usage_metrics(options)).to eq(
139
146
  {
140
- "start" => "Tue, 29 Oct 2024 01:00:00 +0000",
141
- "end" => "Fri, 29 Nov 2024 01:00:00 +0000",
142
- "resolution" => "hour",
143
- "duration" => "1m",
144
- "dimensions" => ["time"],
145
- "pagination" => {
146
- "sort" => "", "skip" => 0, "limit" => 1500, "total" => 2
147
+ 'start' => 'Tue, 29 Oct 2024 01:00:00 +0000',
148
+ 'end' => 'Fri, 29 Nov 2024 01:00:00 +0000',
149
+ 'resolution' => 'hour',
150
+ 'duration' => '1m',
151
+ 'dimensions' => ['time'],
152
+ 'pagination' => {
153
+ 'sort' => '', 'skip' => 0, 'limit' => 1500, 'total' => 2
147
154
  },
148
- "items" => [{
149
- "dimensions" => [{
150
- "dimension" => "time",
151
- "value" => "Wed, 27 Nov 2024 00:00:00 +0000",
152
- "display_value" => "Wed, 27 Nov 2024 00:00:00 +0000"
153
- }],
154
- "metrics" => {
155
- "processed_count" => 2,
156
- "email_validation_count" => 0,
157
- "email_validation_public_count" => 0,
158
- "email_validation_valid_count" => 0,
159
- "email_validation_single_count" => 0,
160
- "email_validation_bulk_count" => 0,
161
- "email_validation_list_count" => 0,
162
- "email_validation_mailgun_count" => 0,
163
- "email_validation_mailjet_count" => 0,
164
- "email_preview_count" => 0,
165
- "email_preview_failed_count" => 0,
166
- "link_validation_count" => 0,
167
- "link_validation_failed_count" => 0,
168
- "seed_test_count" => 0
169
- }
170
- },
171
- {
172
- "dimensions" => [{
173
- "dimension" => "time",
174
- "value" => "Thu, 28 Nov 2024 00:00:00 +0000",
175
- "display_value" => "Thu, 28 Nov 2024 00:00:00 +0000"
176
- }],
177
- "metrics" => {
178
- "processed_count" => 1,
179
- "email_validation_count" => 0,
180
- "email_validation_public_count" => 0,
181
- "email_validation_valid_count" => 0,
182
- "email_validation_single_count" => 0,
183
- "email_validation_bulk_count" => 0,
184
- "email_validation_list_count" => 0,
185
- "email_validation_mailgun_count" => 0,
186
- "email_validation_mailjet_count" => 0,
187
- "email_preview_count" => 0,
188
- "email_preview_failed_count" => 0,
189
- "link_validation_count" => 0,
190
- "link_validation_failed_count" => 0,
191
- "seed_test_count" => 0
192
- }
155
+ 'items' => [{
156
+ 'dimensions' => [{
157
+ 'dimension' => 'time',
158
+ 'value' => 'Wed, 27 Nov 2024 00:00:00 +0000',
159
+ 'display_value' => 'Wed, 27 Nov 2024 00:00:00 +0000'
160
+ }],
161
+ 'metrics' => {
162
+ 'processed_count' => 2,
163
+ 'email_validation_count' => 0,
164
+ 'email_validation_public_count' => 0,
165
+ 'email_validation_valid_count' => 0,
166
+ 'email_validation_single_count' => 0,
167
+ 'email_validation_bulk_count' => 0,
168
+ 'email_validation_list_count' => 0,
169
+ 'email_validation_mailgun_count' => 0,
170
+ 'email_validation_mailjet_count' => 0,
171
+ 'email_preview_count' => 0,
172
+ 'email_preview_failed_count' => 0,
173
+ 'link_validation_count' => 0,
174
+ 'link_validation_failed_count' => 0,
175
+ 'seed_test_count' => 0
193
176
  }
194
- ],
195
- "aggregates" => {
196
- "metrics" => {
197
- "permanent_failed_count" => 0,
198
- "processed_count" => 3,
199
- "email_validation_count" => 0,
200
- "email_validation_public_count" => 0,
201
- "email_validation_valid_count" => 0,
202
- "email_validation_single_count" => 0,
203
- "email_validation_bulk_count" => 0,
204
- "email_validation_list_count" => 0,
205
- "email_validation_mailgun_count" => 0,
206
- "email_validation_mailjet_count" => 0,
207
- "email_preview_count" => 0,
208
- "email_preview_failed_count" => 0,
209
- "link_validation_count" => 0,
210
- "link_validation_failed_count" => 0,
211
- "seed_test_count" => 0
177
+ },
178
+ {
179
+ 'dimensions' => [{
180
+ 'dimension' => 'time',
181
+ 'value' => 'Thu, 28 Nov 2024 00:00:00 +0000',
182
+ 'display_value' => 'Thu, 28 Nov 2024 00:00:00 +0000'
183
+ }],
184
+ 'metrics' => {
185
+ 'processed_count' => 1,
186
+ 'email_validation_count' => 0,
187
+ 'email_validation_public_count' => 0,
188
+ 'email_validation_valid_count' => 0,
189
+ 'email_validation_single_count' => 0,
190
+ 'email_validation_bulk_count' => 0,
191
+ 'email_validation_list_count' => 0,
192
+ 'email_validation_mailgun_count' => 0,
193
+ 'email_validation_mailjet_count' => 0,
194
+ 'email_preview_count' => 0,
195
+ 'email_preview_failed_count' => 0,
196
+ 'link_validation_count' => 0,
197
+ 'link_validation_failed_count' => 0,
198
+ 'seed_test_count' => 0
199
+ }
200
+ }],
201
+ 'aggregates' => {
202
+ 'metrics' => {
203
+ 'permanent_failed_count' => 0,
204
+ 'processed_count' => 3,
205
+ 'email_validation_count' => 0,
206
+ 'email_validation_public_count' => 0,
207
+ 'email_validation_valid_count' => 0,
208
+ 'email_validation_single_count' => 0,
209
+ 'email_validation_bulk_count' => 0,
210
+ 'email_validation_list_count' => 0,
211
+ 'email_validation_mailgun_count' => 0,
212
+ 'email_validation_mailjet_count' => 0,
213
+ 'email_preview_count' => 0,
214
+ 'email_preview_failed_count' => 0,
215
+ 'link_validation_count' => 0,
216
+ 'link_validation_failed_count' => 0,
217
+ 'seed_test_count' => 0
212
218
  }
213
219
  }
214
220
  }