mailgun-ruby 1.4.4 → 1.4.6

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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +721 -71
  3. data/README.md +4 -1
  4. data/lib/mailgun/api_keys/api_keys.rb +65 -0
  5. data/lib/mailgun/client.rb +2 -2
  6. data/lib/mailgun/domains/domain_keys.rb +5 -5
  7. data/lib/mailgun/domains/domains.rb +12 -9
  8. data/lib/mailgun/events/events.rb +1 -1
  9. data/lib/mailgun/helpers/api_version_checker.rb +23 -12
  10. data/lib/mailgun/helpers/deprecation.rb +32 -0
  11. data/lib/mailgun/lists/mailing_lists.rb +250 -0
  12. data/lib/mailgun/messages/message_builder.rb +17 -7
  13. data/lib/mailgun/response.rb +1 -1
  14. data/lib/mailgun/routes/routes.rb +98 -0
  15. data/lib/mailgun/tags/analytics_tags.rb +2 -2
  16. data/lib/mailgun/tags/tags.rb +16 -8
  17. data/lib/mailgun/version.rb +1 -1
  18. data/lib/mailgun/webhooks/account_webhooks.rb +2 -2
  19. data/lib/mailgun/webhooks/webhooks.rb +65 -18
  20. data/lib/mailgun.rb +2 -0
  21. metadata +7 -318
  22. data/.github/workflows/ci.yml +0 -49
  23. data/.gitignore +0 -24
  24. data/.rubocop.yml +0 -68
  25. data/.ruby-env.yml.example +0 -13
  26. data/Gemfile +0 -9
  27. data/Rakefile +0 -32
  28. data/docs/AccountWebhooks.md +0 -55
  29. data/docs/AnalyticsTags.md +0 -63
  30. data/docs/DomainKeys.md +0 -49
  31. data/docs/Domains.md +0 -82
  32. data/docs/EmailValidation.md +0 -34
  33. data/docs/Events.md +0 -48
  34. data/docs/Logs.md +0 -67
  35. data/docs/MessageBuilder.md +0 -120
  36. data/docs/Metrics.md +0 -108
  37. data/docs/OptInHandler.md +0 -103
  38. data/docs/Snippets.md +0 -519
  39. data/docs/Subaccounts.md +0 -68
  40. data/docs/Suppressions.md +0 -92
  41. data/docs/Templates.md +0 -92
  42. data/docs/Webhooks.md +0 -42
  43. data/docs/railgun/EmailValidation.md +0 -34
  44. data/docs/railgun/Overview.md +0 -11
  45. data/docs/railgun/Parameters.md +0 -83
  46. data/mailgun.gemspec +0 -47
  47. data/spec/integration/account_webhooks_spec.rb +0 -57
  48. data/spec/integration/analytics_tags_spec.rb +0 -54
  49. data/spec/integration/bounces_spec.rb +0 -45
  50. data/spec/integration/campaign_spec.rb +0 -62
  51. data/spec/integration/complaints_spec.rb +0 -40
  52. data/spec/integration/domain_keys_spec.rb +0 -124
  53. data/spec/integration/domains_spec.rb +0 -201
  54. data/spec/integration/email_validation_spec.rb +0 -73
  55. data/spec/integration/events_spec.rb +0 -28
  56. data/spec/integration/list_members_spec.rb +0 -64
  57. data/spec/integration/list_spec.rb +0 -59
  58. data/spec/integration/logs_spec.rb +0 -105
  59. data/spec/integration/mailer_spec.rb +0 -65
  60. data/spec/integration/mailgun_spec.rb +0 -198
  61. data/spec/integration/messages/sample_data/mime.txt +0 -38
  62. data/spec/integration/metrics_spec.rb +0 -224
  63. data/spec/integration/routes_spec.rb +0 -91
  64. data/spec/integration/stats_spec.rb +0 -17
  65. data/spec/integration/subaccounts_spec.rb +0 -57
  66. data/spec/integration/suppressions_spec.rb +0 -320
  67. data/spec/integration/templates_spec.rb +0 -137
  68. data/spec/integration/unsubscribes_spec.rb +0 -44
  69. data/spec/integration/webhook_spec.rb +0 -45
  70. data/spec/spec_helper.rb +0 -50
  71. data/spec/unit/client_spec.rb +0 -424
  72. data/spec/unit/connection/test_client.rb +0 -169
  73. data/spec/unit/events/events_spec.rb +0 -88
  74. data/spec/unit/exceptions/exceptions_spec.rb +0 -31
  75. data/spec/unit/helpers/api_version_checker_spec.rb +0 -206
  76. data/spec/unit/lists/opt_in_handler_spec.rb +0 -28
  77. data/spec/unit/mailgun_spec.rb +0 -171
  78. data/spec/unit/messages/batch_message_spec.rb +0 -148
  79. data/spec/unit/messages/message_builder_spec.rb +0 -745
  80. data/spec/unit/messages/sample_data/mailgun_icon.png +0 -0
  81. data/spec/unit/messages/sample_data/mime.txt +0 -38
  82. data/spec/unit/messages/sample_data/rackspace_logo.jpg +0 -0
  83. data/spec/unit/messages/sample_data/unknown.type +0 -0
  84. data/spec/unit/railgun/content_type_spec.rb +0 -89
  85. data/spec/unit/railgun/mailer_spec.rb +0 -391
  86. data/spec/unit/response_spec.rb +0 -225
  87. data/vcr_cassettes/For_the_suppressions_handling_class/creates_a_single_bounce.yml +0 -55
  88. data/vcr_cassettes/account_webhooks.yml +0 -269
  89. data/vcr_cassettes/analytics_tags.yml +0 -187
  90. data/vcr_cassettes/bounces.yml +0 -136
  91. data/vcr_cassettes/complaints.yml +0 -315
  92. data/vcr_cassettes/domains.todo.yml +0 -42
  93. data/vcr_cassettes/domains.yml +0 -1243
  94. data/vcr_cassettes/email_validation.yml +0 -152
  95. data/vcr_cassettes/events.yml +0 -69
  96. data/vcr_cassettes/exceptions-invalid-api-key.yml +0 -52
  97. data/vcr_cassettes/exceptions-invalid-data.yml +0 -52
  98. data/vcr_cassettes/exceptions-not-allowed.yml +0 -54
  99. data/vcr_cassettes/exceptions.yml +0 -92
  100. data/vcr_cassettes/list_members.yml +0 -328
  101. data/vcr_cassettes/logs.yml +0 -53
  102. data/vcr_cassettes/mailer_invalid_domain.yml +0 -109
  103. data/vcr_cassettes/mailing_list.todo.yml +0 -43
  104. data/vcr_cassettes/mailing_list.yml +0 -682
  105. data/vcr_cassettes/message_deliver.yml +0 -149
  106. data/vcr_cassettes/metrics.yml +0 -116
  107. data/vcr_cassettes/routes.yml +0 -359
  108. data/vcr_cassettes/send_message.yml +0 -158
  109. data/vcr_cassettes/stats.yml +0 -48
  110. data/vcr_cassettes/subaccounts.yml +0 -270
  111. data/vcr_cassettes/suppressions.yml +0 -1392
  112. data/vcr_cassettes/templates.yml +0 -1065
  113. data/vcr_cassettes/unsubscribes.yml +0 -401
  114. data/vcr_cassettes/webhooks.yml +0 -246
@@ -1,149 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.mailgun.net/v3/DOMAIN.TEST/messages
6
- body:
7
- encoding: US-ASCII
8
- string: from[]=bob%40DOMAIN.TEST&subject[]=subject&html[]=%3Cp%3ETest%21%3C%2Fp%3E&text[]=Test%21&to[]=bob%40DOMAIN.TEST&h%3Acontent-type=multipart%2Falternative%3B+boundary%3D%22--%3D%3D_mimepart_6098f913d64ca_62833fd4d74521802775%22%3B+charset%3DUTF-8
9
- headers:
10
- Accept:
11
- - "*/*"
12
- User-Agent:
13
- - rest-client/2.1.0 (darwin18.7.0 x86_64) ruby/2.2.2p95
14
- Content-Length:
15
- - '261'
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- Accept-Encoding:
19
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
- Host:
21
- - api.mailgun.net
22
- Authorization:
23
- - Basic YXBpOmQ5MTViNWNkYjlhNTgzNjg1ZDhmM2ZiMWJlYzBmMjBmLTA3YmM3YjA1LWZhNDgxNmEx
24
- response:
25
- status:
26
- code: 200
27
- message: OK
28
- headers:
29
- Access-Control-Allow-Credentials:
30
- - 'true'
31
- Access-Control-Allow-Headers:
32
- - Content-Type, x-requested-with, Authorization
33
- Access-Control-Allow-Methods:
34
- - GET, POST, PUT, DELETE, OPTIONS
35
- Access-Control-Allow-Origin:
36
- - "*"
37
- Access-Control-Max-Age:
38
- - '600'
39
- Cache-Control:
40
- - no-store
41
- Content-Disposition:
42
- - inline
43
- Content-Type:
44
- - application/json
45
- Date:
46
- - Mon, 10 May 2021 09:12:52 GMT
47
- Server:
48
- - nginx
49
- Strict-Transport-Security:
50
- - max-age=63072000; includeSubDomains
51
- X-Ratelimit-Limit:
52
- - '2000000'
53
- X-Ratelimit-Remaining:
54
- - '1999999'
55
- X-Ratelimit-Reset:
56
- - '1620637982656'
57
- X-Recipient-Limit:
58
- - '1000000'
59
- X-Recipient-Remaining:
60
- - '999999'
61
- X-Recipient-Reset:
62
- - '1620637982657'
63
- Content-Length:
64
- - '136'
65
- Connection:
66
- - keep-alive
67
- body:
68
- encoding: UTF-8
69
- string: |-
70
- {
71
- "id": "<20210510091252.1.D6347B73DA43962E@DOMAIN.TEST>",
72
- "message": "Queued. Thank you."
73
- }
74
- http_version:
75
- recorded_at: Mon, 10 May 2021 09:12:52 GMT
76
- - request:
77
- method: post
78
- uri: https://api.mailgun.net/v3/DOMAIN.TEST/messages
79
- body:
80
- encoding: US-ASCII
81
- string: from[]=bob%40DOMAIN.TEST&subject[]=subject&html[]=%3Cp%3ETest%21%3C%2Fp%3E&text[]=Test%21&to[]=bob%40DOMAIN.TEST&h%3Amessage-id=%3C20210510091252.1.D6347B73DA43962E%40DOMAIN.TEST%3E&h%3Acontent-type=multipart%2Falternative%3B+boundary%3D%22--%3D%3D_mimepart_6098f913d64ca_62833fd4d74521802775%22%3B+charset%3DUTF-8
82
- headers:
83
- Accept:
84
- - "*/*"
85
- User-Agent:
86
- - rest-client/2.1.0 (darwin18.7.0 x86_64) ruby/2.2.2p95
87
- Content-Length:
88
- - '370'
89
- Content-Type:
90
- - application/x-www-form-urlencoded
91
- Accept-Encoding:
92
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
93
- Host:
94
- - api.mailgun.net
95
- Authorization:
96
- - Basic YXBpOmQ5MTViNWNkYjlhNTgzNjg1ZDhmM2ZiMWJlYzBmMjBmLTA3YmM3YjA1LWZhNDgxNmEx
97
- response:
98
- status:
99
- code: 200
100
- message: OK
101
- headers:
102
- Access-Control-Allow-Credentials:
103
- - 'true'
104
- Access-Control-Allow-Headers:
105
- - Content-Type, x-requested-with, Authorization
106
- Access-Control-Allow-Methods:
107
- - GET, POST, PUT, DELETE, OPTIONS
108
- Access-Control-Allow-Origin:
109
- - "*"
110
- Access-Control-Max-Age:
111
- - '600'
112
- Cache-Control:
113
- - no-store
114
- Content-Disposition:
115
- - inline
116
- Content-Type:
117
- - application/json
118
- Date:
119
- - Mon, 10 May 2021 09:12:56 GMT
120
- Server:
121
- - nginx
122
- Strict-Transport-Security:
123
- - max-age=63072000; includeSubDomains
124
- X-Ratelimit-Limit:
125
- - '2000000'
126
- X-Ratelimit-Remaining:
127
- - '1999998'
128
- X-Ratelimit-Reset:
129
- - '1620637982656'
130
- X-Recipient-Limit:
131
- - '1000000'
132
- X-Recipient-Remaining:
133
- - '999998'
134
- X-Recipient-Reset:
135
- - '1620637982657'
136
- Content-Length:
137
- - '136'
138
- Connection:
139
- - keep-alive
140
- body:
141
- encoding: UTF-8
142
- string: |-
143
- {
144
- "id": "<20210510091252.1.D6347B73DA43962E@DOMAIN.TEST>",
145
- "message": "Queued. Thank you."
146
- }
147
- http_version:
148
- recorded_at: Mon, 10 May 2021 09:12:56 GMT
149
- recorded_with: VCR 3.0.3
@@ -1,116 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.mailgun.net/v1/analytics/metrics
6
- body:
7
- encoding: UTF-8
8
- string: '{"resolution":"hour","metrics":["accepted_count","delivered_count","clicked_rate","opened_rate"],"include_aggregates":true,"start":"Tue,
9
- 26 Nov 2024 20:56:50 -0500","duration":"1m","filter":{"AND":[{"attribute":"domain","comparator":"!=","values":[{"label":"example.com","value":"example.com"}]}]},"dimensions":["time"],"end":"Tue,
10
- 30 Nov 2024 20:56:50 -0500","include_subaccounts":true}'
11
- headers:
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - rest-client/2.1.0 (darwin23 x86_64) ruby/3.1.4p223
16
- Content-Type:
17
- - application/json
18
- Content-Length:
19
- - '387'
20
- Accept-Encoding:
21
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
22
- Host:
23
- - api.mailgun.net
24
- Authorization:
25
- - Basic xxx
26
- response:
27
- status:
28
- code: 200
29
- message: OK
30
- headers:
31
- Access-Control-Allow-Credentials:
32
- - 'true'
33
- Access-Control-Allow-Origin:
34
- - "*"
35
- Cache-Control:
36
- - no-store
37
- Content-Length:
38
- - '1006'
39
- Content-Type:
40
- - application/json; charset=utf-8
41
- Date:
42
- - Thu, 28 Nov 2024 18:20:22 GMT
43
- Strict-Transport-Security:
44
- - max-age=63072000; includeSubDomains
45
- X-Mailgun-Key-Id:
46
- - c02fd0ba-d8dbad66
47
- X-Xss-Protection:
48
- - 1; mode=block
49
- body:
50
- encoding: UTF-8
51
- string: '{"start":"Fri, 01 Nov 2024 01:00:00 +0000","end":"Sun, 01 Dec 2024
52
- 01:00:00 +0000","resolution":"hour","duration":"1m","dimensions":["time"],"pagination":{"sort":"","skip":0,"limit":1500,"total":3},"items":[{"dimensions":[{"dimension":"time","value":"Wed,
53
- 27 Nov 2024 12:00:00 +0000","display_value":"Wed, 27 Nov 2024 12:00:00 +0000"}],"metrics":{"accepted_count":1,"delivered_count":1,"opened_rate":"0.0000","clicked_rate":"0.0000"}},{"dimensions":[{"dimension":"time","value":"Wed,
54
- 27 Nov 2024 13:00:00 +0000","display_value":"Wed, 27 Nov 2024 13:00:00 +0000"}],"metrics":{"accepted_count":1,"delivered_count":1,"opened_rate":"0.0000","clicked_rate":"0.0000"}},{"dimensions":[{"dimension":"time","value":"Thu,
55
- 28 Nov 2024 15:00:00 +0000","display_value":"Thu, 28 Nov 2024 15:00:00 +0000"}],"metrics":{"accepted_count":1,"delivered_count":1,"opened_rate":"0.0000","clicked_rate":"0.0000"}}],"aggregates":{"metrics":{"accepted_count":3,"delivered_count":3,"opened_rate":"0.0000","clicked_rate":"0.0000"}}}
56
-
57
- '
58
- http_version:
59
- recorded_at: Thu, 28 Nov 2024 18:20:22 GMT
60
- - request:
61
- method: post
62
- uri: https://api.mailgun.net/v1/analytics/usage/metrics
63
- body:
64
- encoding: UTF-8
65
- string: '{"resolution":"hour","metrics":["email_preview_count","email_preview_failed_count","email_validation_bulk_count","email_validation_count","email_validation_list_count","email_validation_mailgun_count","email_validation_mailjet_count","email_validation_public_count","email_validation_single_count","email_validation_valid_count","link_validation_count","link_validation_failed_count","processed_count","seed_test_count"],"include_aggregates":true,"start":"Tue,
66
- 26 Nov 2024 20:56:50 -0500","duration":"1m","filter":{"AND":[{"attribute":"subaccount","comparator":"!=","values":[{"label":"12345","value":"12345"}]}]},"dimensions":["time"],"end":"Tue,
67
- 28 Nov 2024 20:56:50 -0500","include_subaccounts":true}'
68
- headers:
69
- Accept:
70
- - "*/*"
71
- User-Agent:
72
- - rest-client/2.1.0 (darwin23 x86_64) ruby/3.1.4p223
73
- Content-Type:
74
- - application/json
75
- Content-Length:
76
- - '703'
77
- Accept-Encoding:
78
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
79
- Host:
80
- - api.mailgun.net
81
- Authorization:
82
- - Basic xxx
83
- response:
84
- status:
85
- code: 200
86
- message: OK
87
- headers:
88
- Access-Control-Allow-Credentials:
89
- - 'true'
90
- Access-Control-Allow-Origin:
91
- - "*"
92
- Cache-Control:
93
- - no-store
94
- Content-Length:
95
- - '1795'
96
- Content-Type:
97
- - application/json; charset=utf-8
98
- Date:
99
- - Thu, 28 Nov 2024 18:20:23 GMT
100
- Strict-Transport-Security:
101
- - max-age=63072000; includeSubDomains
102
- X-Mailgun-Key-Id:
103
- - c02fd0ba-d8dbad66
104
- X-Xss-Protection:
105
- - 1; mode=block
106
- body:
107
- encoding: UTF-8
108
- string: '{"start":"Tue, 29 Oct 2024 01:00:00 +0000","end":"Fri, 29 Nov 2024
109
- 01:00:00 +0000","resolution":"hour","duration":"1m","dimensions":["time"],"pagination":{"sort":"","skip":0,"limit":1500,"total":2},"items":[{"dimensions":[{"dimension":"time","value":"Wed,
110
- 27 Nov 2024 00:00:00 +0000","display_value":"Wed, 27 Nov 2024 00:00:00 +0000"}],"metrics":{"processed_count":2,"email_validation_count":0,"email_validation_public_count":0,"email_validation_valid_count":0,"email_validation_single_count":0,"email_validation_bulk_count":0,"email_validation_list_count":0,"email_validation_mailgun_count":0,"email_validation_mailjet_count":0,"email_preview_count":0,"email_preview_failed_count":0,"link_validation_count":0,"link_validation_failed_count":0,"seed_test_count":0}},{"dimensions":[{"dimension":"time","value":"Thu,
111
- 28 Nov 2024 00:00:00 +0000","display_value":"Thu, 28 Nov 2024 00:00:00 +0000"}],"metrics":{"processed_count":1,"email_validation_count":0,"email_validation_public_count":0,"email_validation_valid_count":0,"email_validation_single_count":0,"email_validation_bulk_count":0,"email_validation_list_count":0,"email_validation_mailgun_count":0,"email_validation_mailjet_count":0,"email_preview_count":0,"email_preview_failed_count":0,"link_validation_count":0,"link_validation_failed_count":0,"seed_test_count":0}}],"aggregates":{"metrics":{"permanent_failed_count":0,"processed_count":3,"email_validation_count":0,"email_validation_public_count":0,"email_validation_valid_count":0,"email_validation_single_count":0,"email_validation_bulk_count":0,"email_validation_list_count":0,"email_validation_mailgun_count":0,"email_validation_mailjet_count":0,"email_preview_count":0,"email_preview_failed_count":0,"link_validation_count":0,"link_validation_failed_count":0,"seed_test_count":0}}}
112
-
113
- '
114
- http_version:
115
- recorded_at: Thu, 28 Nov 2024 18:20:23 GMT
116
- recorded_with: VCR 3.0.3
@@ -1,359 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.mailgun.net/v3/routes
6
- body:
7
- encoding: UTF-8
8
- string: action=forward%28%22.%2A%40%22%29&description=Integration+Test+Route&expression=match_recipient%28%22alice%40%22%29&priority=10
9
- headers:
10
- User-Agent:
11
- - mailgun-sdk-ruby/1.3.2
12
- Accept:
13
- - "*/*"
14
- Authorization:
15
- - Basic xxx==
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- Accept-Encoding:
19
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- Access-Control-Allow-Credentials:
26
- - 'true'
27
- Access-Control-Allow-Origin:
28
- - "*"
29
- Cache-Control:
30
- - no-store
31
- Content-Disposition:
32
- - inline
33
- Content-Length:
34
- - '251'
35
- Content-Type:
36
- - application/json
37
- Date:
38
- - Mon, 27 Jan 2025 17:45:19 GMT
39
- Server:
40
- - TwistedWeb/22.10.0
41
- Strict-Transport-Security:
42
- - max-age=63072000; includeSubDomains
43
- X-Mailgun-Key-Id:
44
- - c02fd0ba-d8dbad66
45
- X-Xss-Protection:
46
- - 1; mode=block
47
- body:
48
- encoding: UTF-8
49
- string: '{"message":"Route has been created","route":{"actions":["forward(\".*@\")"],"created_at":"Mon,
50
- 27 Jan 2025 17:45:19 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","priority":10}}
51
-
52
- '
53
- http_version:
54
- recorded_at: Mon, 27 Jan 2025 17:45:19 GMT
55
- - request:
56
- method: get
57
- uri: https://api.mailgun.net/v3/routes?limit=50
58
- body:
59
- encoding: US-ASCII
60
- string: ''
61
- headers:
62
- User-Agent:
63
- - mailgun-sdk-ruby/1.3.2
64
- Accept:
65
- - "*/*"
66
- Authorization:
67
- - Basic xxx==
68
- Accept-Encoding:
69
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
70
- response:
71
- status:
72
- code: 200
73
- message: OK
74
- headers:
75
- Access-Control-Allow-Credentials:
76
- - 'true'
77
- Access-Control-Allow-Origin:
78
- - "*"
79
- Cache-Control:
80
- - no-store
81
- Content-Disposition:
82
- - inline
83
- Content-Length:
84
- - '234'
85
- Content-Type:
86
- - application/json
87
- Date:
88
- - Mon, 27 Jan 2025 17:45:20 GMT
89
- Server:
90
- - TwistedWeb/22.10.0
91
- Strict-Transport-Security:
92
- - max-age=63072000; includeSubDomains
93
- X-Mailgun-Key-Id:
94
- - c02fd0ba-d8dbad66
95
- X-Xss-Protection:
96
- - 1; mode=block
97
- body:
98
- encoding: UTF-8
99
- string: '{"items":[{"actions":["forward(\".*@\")"],"created_at":"Mon, 27 Jan
100
- 2025 17:45:19 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","priority":10}],"total_count":1}
101
-
102
- '
103
- http_version:
104
- recorded_at: Mon, 27 Jan 2025 17:45:20 GMT
105
- - request:
106
- method: get
107
- uri: https://api.mailgun.net/v3/routes?limit=1
108
- body:
109
- encoding: US-ASCII
110
- string: ''
111
- headers:
112
- User-Agent:
113
- - mailgun-sdk-ruby/1.3.2
114
- Accept:
115
- - "*/*"
116
- Authorization:
117
- - Basic xxx==
118
- Accept-Encoding:
119
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
120
- response:
121
- status:
122
- code: 200
123
- message: OK
124
- headers:
125
- Access-Control-Allow-Credentials:
126
- - 'true'
127
- Access-Control-Allow-Origin:
128
- - "*"
129
- Cache-Control:
130
- - no-store
131
- Content-Disposition:
132
- - inline
133
- Content-Length:
134
- - '234'
135
- Content-Type:
136
- - application/json
137
- Date:
138
- - Mon, 27 Jan 2025 17:45:20 GMT
139
- Server:
140
- - TwistedWeb/22.10.0
141
- Strict-Transport-Security:
142
- - max-age=63072000; includeSubDomains
143
- X-Mailgun-Key-Id:
144
- - c02fd0ba-d8dbad66
145
- X-Xss-Protection:
146
- - 1; mode=block
147
- body:
148
- encoding: UTF-8
149
- string: '{"items":[{"actions":["forward(\".*@\")"],"created_at":"Mon, 27 Jan
150
- 2025 17:45:19 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","priority":10}],"total_count":1}
151
-
152
- '
153
- http_version:
154
- recorded_at: Mon, 27 Jan 2025 17:45:20 GMT
155
- - request:
156
- method: get
157
- uri: https://api.mailgun.net/v3/routes/6797c62f6ee0a9fcb1ec5eee
158
- body:
159
- encoding: US-ASCII
160
- string: ''
161
- headers:
162
- User-Agent:
163
- - mailgun-sdk-ruby/1.3.2
164
- Accept:
165
- - "*/*"
166
- Authorization:
167
- - Basic xxx==
168
- Accept-Encoding:
169
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
170
- response:
171
- status:
172
- code: 200
173
- message: OK
174
- headers:
175
- Access-Control-Allow-Credentials:
176
- - 'true'
177
- Access-Control-Allow-Origin:
178
- - "*"
179
- Cache-Control:
180
- - no-store
181
- Content-Disposition:
182
- - inline
183
- Content-Length:
184
- - '216'
185
- Content-Type:
186
- - application/json
187
- Date:
188
- - Mon, 27 Jan 2025 17:45:21 GMT
189
- Server:
190
- - TwistedWeb/22.10.0
191
- Strict-Transport-Security:
192
- - max-age=63072000; includeSubDomains
193
- X-Mailgun-Key-Id:
194
- - c02fd0ba-d8dbad66
195
- X-Xss-Protection:
196
- - 1; mode=block
197
- body:
198
- encoding: UTF-8
199
- string: '{"route":{"actions":["forward(\".*@\")"],"created_at":"Mon, 27 Jan
200
- 2025 17:45:19 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","priority":10}}
201
-
202
- '
203
- http_version:
204
- recorded_at: Mon, 27 Jan 2025 17:45:21 GMT
205
- - request:
206
- method: put
207
- uri: https://api.mailgun.net/v3/routes/6797c62f6ee0a9fcb1ec5eee
208
- body:
209
- encoding: UTF-8
210
- string: action=forward%28%22.%2A%40%22%29&description=Integration+Test+Route+Update&expression=match_recipient%28%22alice%40%22%29&priority=10
211
- headers:
212
- User-Agent:
213
- - mailgun-sdk-ruby/1.3.2
214
- Accept:
215
- - "*/*"
216
- Authorization:
217
- - Basic xxx==
218
- Content-Type:
219
- - application/x-www-form-urlencoded
220
- Accept-Encoding:
221
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
222
- response:
223
- status:
224
- code: 200
225
- message: OK
226
- headers:
227
- Access-Control-Allow-Credentials:
228
- - 'true'
229
- Access-Control-Allow-Origin:
230
- - "*"
231
- Cache-Control:
232
- - no-store
233
- Content-Disposition:
234
- - inline
235
- Content-Length:
236
- - '248'
237
- Content-Type:
238
- - application/json
239
- Date:
240
- - Mon, 27 Jan 2025 17:45:22 GMT
241
- Server:
242
- - TwistedWeb/22.10.0
243
- Strict-Transport-Security:
244
- - max-age=63072000; includeSubDomains
245
- X-Mailgun-Key-Id:
246
- - c02fd0ba-d8dbad66
247
- X-Xss-Protection:
248
- - 1; mode=block
249
- body:
250
- encoding: UTF-8
251
- string: '{"actions":["forward(\".*@\")"],"created_at":"Mon, 27 Jan 2025 17:45:19
252
- GMT","description":"Integration Test Route Update","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","message":"Route
253
- has been updated","priority":10}
254
-
255
- '
256
- http_version:
257
- recorded_at: Mon, 27 Jan 2025 17:45:22 GMT
258
- - request:
259
- method: delete
260
- uri: https://api.mailgun.net/v3/routes/6797c62f6ee0a9fcb1ec5eee
261
- body:
262
- encoding: US-ASCII
263
- string: ''
264
- headers:
265
- User-Agent:
266
- - mailgun-sdk-ruby/1.3.2
267
- Accept:
268
- - "*/*"
269
- Authorization:
270
- - Basic xxx==
271
- Accept-Encoding:
272
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
273
- response:
274
- status:
275
- code: 200
276
- message: OK
277
- headers:
278
- Access-Control-Allow-Credentials:
279
- - 'true'
280
- Access-Control-Allow-Origin:
281
- - "*"
282
- Cache-Control:
283
- - no-store
284
- Content-Disposition:
285
- - inline
286
- Content-Length:
287
- - '69'
288
- Content-Type:
289
- - application/json
290
- Date:
291
- - Mon, 27 Jan 2025 17:45:22 GMT
292
- Server:
293
- - TwistedWeb/22.10.0
294
- Strict-Transport-Security:
295
- - max-age=63072000; includeSubDomains
296
- X-Mailgun-Key-Id:
297
- - c02fd0ba-d8dbad66
298
- X-Xss-Protection:
299
- - 1; mode=block
300
- body:
301
- encoding: UTF-8
302
- string: '{"id":"6797c62f6ee0a9fcb1ec5eee","message":"Route has been deleted"}
303
-
304
- '
305
- http_version:
306
- recorded_at: Mon, 27 Jan 2025 17:45:23 GMT
307
- - request:
308
- method: post
309
- uri: https://api.mailgun.net/v3/routes
310
- body:
311
- encoding: UTF-8
312
- string: action=forward%28%22.%2A%40%22%29&action=stop%28%29&description=Integration+Test+Route&expression=match_recipient%28%22alice%40%22%29&priority=10
313
- headers:
314
- User-Agent:
315
- - mailgun-sdk-ruby/1.3.2
316
- Accept:
317
- - "*/*"
318
- Authorization:
319
- - Basic xxx==
320
- Content-Type:
321
- - application/x-www-form-urlencoded
322
- Accept-Encoding:
323
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
324
- response:
325
- status:
326
- code: 200
327
- message: OK
328
- headers:
329
- Access-Control-Allow-Credentials:
330
- - 'true'
331
- Access-Control-Allow-Origin:
332
- - "*"
333
- Cache-Control:
334
- - no-store
335
- Content-Disposition:
336
- - inline
337
- Content-Length:
338
- - '260'
339
- Content-Type:
340
- - application/json
341
- Date:
342
- - Mon, 27 Jan 2025 18:13:42 GMT
343
- Server:
344
- - TwistedWeb/22.10.0
345
- Strict-Transport-Security:
346
- - max-age=63072000; includeSubDomains
347
- X-Mailgun-Key-Id:
348
- - c02fd0ba-d8dbad66
349
- X-Xss-Protection:
350
- - 1; mode=block
351
- body:
352
- encoding: UTF-8
353
- string: '{"message":"Route has been created","route":{"actions":["forward(\".*@\")","stop()"],"created_at":"Mon,
354
- 27 Jan 2025 18:13:42 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797ccd69440716211d9df05","priority":10}}
355
-
356
- '
357
- http_version:
358
- recorded_at: Mon, 27 Jan 2025 18:13:42 GMT
359
- recorded_with: VCR 3.0.3