mailgun-ruby 1.1.9 → 1.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -0
- data/.rubocop_todo.yml +0 -0
- data/.ruby-env.yml.example +1 -0
- data/.travis.yml +6 -5
- data/CHANGELOG.md +16 -0
- data/Gemfile +1 -1
- data/README.md +30 -3
- data/docs/Domains.md +3 -0
- data/docs/EmailValidation.md +34 -0
- data/docs/OptInHandler.md +1 -1
- data/docs/Snippets.md +54 -61
- data/docs/Subaccounts.md +68 -0
- data/docs/Suppressions.md +10 -0
- data/docs/Webhooks.md +0 -0
- data/docs/railgun/EmailValidation.md +34 -0
- data/docs/railgun/Overview.md +11 -0
- data/docs/railgun/Parameters.md +83 -0
- data/docs/railgun/Templates.md +92 -0
- data/lib/mailgun/address.rb +3 -28
- data/lib/mailgun/chains.rb +0 -0
- data/lib/mailgun/client.rb +55 -9
- data/lib/mailgun/domains/domains.rb +20 -2
- data/lib/mailgun/events/events.rb +2 -2
- data/lib/mailgun/exceptions/exceptions.rb +28 -1
- data/lib/mailgun/messages/batch_message.rb +1 -0
- data/lib/mailgun/messages/message_builder.rb +56 -8
- data/lib/mailgun/response.rb +7 -0
- data/lib/mailgun/subaccounts/subaccounts.rb +84 -0
- data/lib/mailgun/suppressions.rb +15 -8
- data/lib/mailgun/templates/templates.rb +187 -0
- data/lib/mailgun/version.rb +1 -1
- data/lib/mailgun/webhooks/webhooks.rb +2 -2
- data/lib/mailgun-ruby.rb +1 -1
- data/lib/mailgun.rb +5 -1
- data/lib/railgun/mailer.rb +85 -12
- data/lib/railgun/message.rb +2 -1
- data/lib/railgun/railtie.rb +3 -2
- data/mailgun.gemspec +15 -12
- data/spec/integration/bounces_spec.rb +3 -3
- data/spec/integration/campaign_spec.rb +0 -0
- data/spec/integration/complaints_spec.rb +0 -0
- data/spec/integration/domains_spec.rb +8 -0
- data/spec/integration/email_validation_spec.rb +10 -2
- data/spec/integration/events_spec.rb +1 -1
- data/spec/integration/list_members_spec.rb +0 -0
- data/spec/integration/list_spec.rb +0 -0
- data/spec/integration/mailer_spec.rb +67 -0
- data/spec/integration/mailgun_spec.rb +92 -1
- data/spec/integration/routes_spec.rb +0 -0
- data/spec/integration/stats_spec.rb +0 -0
- data/spec/integration/subaccounts_spec.rb +58 -0
- data/spec/integration/suppressions_spec.rb +18 -2
- data/spec/integration/templates_spec.rb +135 -0
- data/spec/integration/unsubscribes_spec.rb +0 -0
- data/spec/integration/webhook_spec.rb +0 -0
- data/spec/spec_helper.rb +3 -1
- data/spec/unit/connection/test_client.rb +18 -1
- data/spec/unit/events/events_spec.rb +19 -0
- data/spec/unit/mailgun_spec.rb +43 -2
- data/spec/unit/messages/batch_message_spec.rb +56 -40
- data/spec/unit/messages/message_builder_spec.rb +149 -16
- data/spec/unit/messages/sample_data/unknown.type +0 -0
- data/spec/unit/railgun/mailer_spec.rb +388 -0
- data/vcr_cassettes/bounces.yml +12 -12
- data/vcr_cassettes/complaints.yml +0 -0
- data/vcr_cassettes/domains.todo.yml +0 -0
- data/vcr_cassettes/domains.yml +51 -1
- data/vcr_cassettes/email_validation.yml +5 -5
- data/vcr_cassettes/events.yml +0 -0
- data/vcr_cassettes/exceptions-invalid-api-key.yml +52 -0
- data/vcr_cassettes/exceptions-invalid-data.yml +52 -0
- data/vcr_cassettes/exceptions-not-allowed.yml +54 -0
- data/vcr_cassettes/list_members.yml +0 -0
- data/vcr_cassettes/mailer_invalid_domain.yml +109 -0
- data/vcr_cassettes/mailing_list.todo.yml +0 -0
- data/vcr_cassettes/mailing_list.yml +0 -0
- data/vcr_cassettes/message_deliver.yml +149 -0
- data/vcr_cassettes/routes.yml +0 -0
- data/vcr_cassettes/send_message.yml +0 -0
- data/vcr_cassettes/stats.yml +0 -0
- data/vcr_cassettes/subaccounts.yml +270 -0
- data/vcr_cassettes/suppressions.yml +66 -15
- data/vcr_cassettes/templates.yml +1065 -0
- data/vcr_cassettes/unsubscribes.yml +0 -0
- data/vcr_cassettes/webhooks.yml +0 -0
- metadata +56 -29
- data/.ruby-version +0 -1
- /data/spec/unit/{railgun_spec.rb → railgun/content_type_spec.rb} +0 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.mailgun.net/v3/DOMAIN.TEST/messages
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: from=sally%test.com&to=sally%test.com&subject=Exception+Integration+Test&text=INTEGRATION+TESTING
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*"
|
12
|
+
User-Agent:
|
13
|
+
- rest-client/2.1.0 (darwin21.6.0 x86_64) ruby/2.5.1p57
|
14
|
+
Content-Length:
|
15
|
+
- '121'
|
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: 403
|
27
|
+
message: Forbidden
|
28
|
+
headers:
|
29
|
+
Access-Control-Allow-Credentials:
|
30
|
+
- 'true'
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
Cache-Control:
|
34
|
+
- no-store
|
35
|
+
Content-Length:
|
36
|
+
- '219'
|
37
|
+
Content-Type:
|
38
|
+
- application/json; charset=utf-8
|
39
|
+
Date:
|
40
|
+
- Sun, 28 May 2023 11:40:00 GMT
|
41
|
+
Strict-Transport-Security:
|
42
|
+
- max-age=63072000; includeSubDomains
|
43
|
+
X-Xss-Protection:
|
44
|
+
- 1; mode=block
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"message":"Domain DOMAIN.TEST is not allowed to send: Free accounts
|
48
|
+
are for test purposes only. Please upgrade or add the address to authorized
|
49
|
+
recipients in Account Settings."}
|
50
|
+
|
51
|
+
'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Sun, 28 May 2023 11:40:00 GMT
|
54
|
+
recorded_with: VCR 3.0.3
|
File without changes
|
@@ -0,0 +1,109 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.mailgun.net/v3/not-our-doma.in/messages
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: from[]=sally%40not-our-doma.in&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_6098fb5a12edf_78633ff4e00521889696a%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
|
+
- '262'
|
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: 401
|
27
|
+
message: UNAUTHORIZED
|
28
|
+
headers:
|
29
|
+
Access-Control-Allow-Headers:
|
30
|
+
- Content-Type, x-requested-with, Authorization
|
31
|
+
Access-Control-Allow-Methods:
|
32
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- "*"
|
35
|
+
Access-Control-Max-Age:
|
36
|
+
- '600'
|
37
|
+
Cache-Control:
|
38
|
+
- no-store
|
39
|
+
Content-Type:
|
40
|
+
- text/html; charset=utf-8
|
41
|
+
Date:
|
42
|
+
- Mon, 10 May 2021 09:22:34 GMT
|
43
|
+
Server:
|
44
|
+
- nginx
|
45
|
+
Www-Authenticate:
|
46
|
+
- Basic realm="MG API"
|
47
|
+
Content-Length:
|
48
|
+
- '9'
|
49
|
+
Connection:
|
50
|
+
- keep-alive
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: Forbidden
|
54
|
+
http_version:
|
55
|
+
recorded_at: Mon, 10 May 2021 09:22:34 GMT
|
56
|
+
- request:
|
57
|
+
method: post
|
58
|
+
uri: https://api.mailgun.net/v3/not-our-doma.in/messages
|
59
|
+
body:
|
60
|
+
encoding: US-ASCII
|
61
|
+
string: from[]=sally%40not-our-doma.in&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_6098fb5a12edf_78633ff4e00521889696a%22%3B+charset%3DUTF-8
|
62
|
+
headers:
|
63
|
+
Accept:
|
64
|
+
- "*/*"
|
65
|
+
User-Agent:
|
66
|
+
- rest-client/2.1.0 (darwin18.7.0 x86_64) ruby/2.2.2p95
|
67
|
+
Content-Length:
|
68
|
+
- '262'
|
69
|
+
Content-Type:
|
70
|
+
- application/x-www-form-urlencoded
|
71
|
+
Accept-Encoding:
|
72
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
73
|
+
Host:
|
74
|
+
- api.mailgun.net
|
75
|
+
Authorization:
|
76
|
+
- Basic YXBpOmQ5MTViNWNkYjlhNTgzNjg1ZDhmM2ZiMWJlYzBmMjBmLTA3YmM3YjA1LWZhNDgxNmEx
|
77
|
+
response:
|
78
|
+
status:
|
79
|
+
code: 401
|
80
|
+
message: UNAUTHORIZED
|
81
|
+
headers:
|
82
|
+
Access-Control-Allow-Headers:
|
83
|
+
- Content-Type, x-requested-with, Authorization
|
84
|
+
Access-Control-Allow-Methods:
|
85
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
86
|
+
Access-Control-Allow-Origin:
|
87
|
+
- "*"
|
88
|
+
Access-Control-Max-Age:
|
89
|
+
- '600'
|
90
|
+
Cache-Control:
|
91
|
+
- no-store
|
92
|
+
Content-Type:
|
93
|
+
- text/html; charset=utf-8
|
94
|
+
Date:
|
95
|
+
- Mon, 10 May 2021 09:22:40 GMT
|
96
|
+
Server:
|
97
|
+
- nginx
|
98
|
+
Www-Authenticate:
|
99
|
+
- Basic realm="MG API"
|
100
|
+
Content-Length:
|
101
|
+
- '9'
|
102
|
+
Connection:
|
103
|
+
- keep-alive
|
104
|
+
body:
|
105
|
+
encoding: UTF-8
|
106
|
+
string: Forbidden
|
107
|
+
http_version:
|
108
|
+
recorded_at: Mon, 10 May 2021 09:22:40 GMT
|
109
|
+
recorded_with: VCR 3.0.3
|
File without changes
|
File without changes
|
@@ -0,0 +1,149 @@
|
|
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
|
data/vcr_cassettes/routes.yml
CHANGED
File without changes
|
File without changes
|
data/vcr_cassettes/stats.yml
CHANGED
File without changes
|
@@ -0,0 +1,270 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mailgun.net/v5/accounts/subaccounts
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*"
|
12
|
+
User-Agent:
|
13
|
+
- rest-client/2.1.0 (darwin22 x86_64) ruby/2.7.4p191
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Host:
|
17
|
+
- api.mailgun.net
|
18
|
+
Authorization:
|
19
|
+
- Basic xxx
|
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
|
+
- '706'
|
35
|
+
Content-Type:
|
36
|
+
- application/json
|
37
|
+
Date:
|
38
|
+
- Mon, 20 Nov 2023 15:30:55 GMT
|
39
|
+
Server:
|
40
|
+
- TwistedWeb/23.10.0
|
41
|
+
Strict-Transport-Security:
|
42
|
+
- max-age=63072000; includeSubDomains
|
43
|
+
X-Mailgun-Key-Id:
|
44
|
+
- 1c7e8847-e7fad6d2
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"subaccounts":[{"id":"xxx","name":"test-ruby-lib","status":"open"}],"total":1}
|
50
|
+
|
51
|
+
'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Mon, 20 Nov 2023 15:30:55 GMT
|
54
|
+
- request:
|
55
|
+
method: post
|
56
|
+
uri: https://api.mailgun.net/v5/accounts/subaccounts
|
57
|
+
body:
|
58
|
+
encoding: UTF-8
|
59
|
+
string: name=test.subaccount
|
60
|
+
headers:
|
61
|
+
Accept:
|
62
|
+
- "*/*"
|
63
|
+
User-Agent:
|
64
|
+
- rest-client/2.1.0 (darwin22 x86_64) ruby/2.7.4p191
|
65
|
+
Content-Length:
|
66
|
+
- '20'
|
67
|
+
Content-Type:
|
68
|
+
- application/x-www-form-urlencoded
|
69
|
+
Accept-Encoding:
|
70
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
71
|
+
Host:
|
72
|
+
- api.mailgun.net
|
73
|
+
Authorization:
|
74
|
+
- Basic xxx
|
75
|
+
response:
|
76
|
+
status:
|
77
|
+
code: 200
|
78
|
+
message: OK
|
79
|
+
headers:
|
80
|
+
Access-Control-Allow-Credentials:
|
81
|
+
- 'true'
|
82
|
+
Access-Control-Allow-Origin:
|
83
|
+
- "*"
|
84
|
+
Cache-Control:
|
85
|
+
- no-store
|
86
|
+
Content-Disposition:
|
87
|
+
- inline
|
88
|
+
Content-Length:
|
89
|
+
- '90'
|
90
|
+
Content-Type:
|
91
|
+
- application/json
|
92
|
+
Date:
|
93
|
+
- Mon, 20 Nov 2023 15:33:05 GMT
|
94
|
+
Server:
|
95
|
+
- TwistedWeb/23.10.0
|
96
|
+
Strict-Transport-Security:
|
97
|
+
- max-age=63072000; includeSubDomains
|
98
|
+
X-Mailgun-Key-Id:
|
99
|
+
- 1c7e8847-e7fad6d2
|
100
|
+
X-Xss-Protection:
|
101
|
+
- 1; mode=block
|
102
|
+
body:
|
103
|
+
encoding: UTF-8
|
104
|
+
string: '{"subaccount":{"id":"xxx","name":"test.subaccount","status":"open"}}
|
105
|
+
|
106
|
+
'
|
107
|
+
http_version:
|
108
|
+
recorded_at: Mon, 20 Nov 2023 15:33:05 GMT
|
109
|
+
- request:
|
110
|
+
method: get
|
111
|
+
uri: https://api.mailgun.net/v5/accounts/subaccounts/xxx
|
112
|
+
body:
|
113
|
+
encoding: US-ASCII
|
114
|
+
string: ''
|
115
|
+
headers:
|
116
|
+
Accept:
|
117
|
+
- "*/*"
|
118
|
+
User-Agent:
|
119
|
+
- rest-client/2.1.0 (darwin22 x86_64) ruby/2.7.4p191
|
120
|
+
Accept-Encoding:
|
121
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
122
|
+
Host:
|
123
|
+
- api.mailgun.net
|
124
|
+
Authorization:
|
125
|
+
- Basic xxx
|
126
|
+
response:
|
127
|
+
status:
|
128
|
+
code: 200
|
129
|
+
message: OK
|
130
|
+
headers:
|
131
|
+
Access-Control-Allow-Credentials:
|
132
|
+
- 'true'
|
133
|
+
Access-Control-Allow-Origin:
|
134
|
+
- "*"
|
135
|
+
Cache-Control:
|
136
|
+
- no-store
|
137
|
+
Content-Disposition:
|
138
|
+
- inline
|
139
|
+
Content-Length:
|
140
|
+
- '88'
|
141
|
+
Content-Type:
|
142
|
+
- application/json
|
143
|
+
Date:
|
144
|
+
- Mon, 20 Nov 2023 15:33:06 GMT
|
145
|
+
Server:
|
146
|
+
- TwistedWeb/23.10.0
|
147
|
+
Strict-Transport-Security:
|
148
|
+
- max-age=63072000; includeSubDomains
|
149
|
+
X-Mailgun-Key-Id:
|
150
|
+
- 1c7e8847-e7fad6d2
|
151
|
+
X-Xss-Protection:
|
152
|
+
- 1; mode=block
|
153
|
+
body:
|
154
|
+
encoding: UTF-8
|
155
|
+
string: '{"subaccount":{"id":"xxx","name":"test-ruby-lib","status":"open"}}
|
156
|
+
|
157
|
+
'
|
158
|
+
http_version:
|
159
|
+
recorded_at: Mon, 20 Nov 2023 15:33:06 GMT
|
160
|
+
- request:
|
161
|
+
method: post
|
162
|
+
uri: https://api.mailgun.net/v5/accounts/subaccounts/xxx/enable
|
163
|
+
body:
|
164
|
+
encoding: US-ASCII
|
165
|
+
string: ''
|
166
|
+
headers:
|
167
|
+
Accept:
|
168
|
+
- "*/*"
|
169
|
+
User-Agent:
|
170
|
+
- rest-client/2.1.0 (darwin22 x86_64) ruby/2.7.4p191
|
171
|
+
Content-Length:
|
172
|
+
- '0'
|
173
|
+
Content-Type:
|
174
|
+
- application/x-www-form-urlencoded
|
175
|
+
Accept-Encoding:
|
176
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
177
|
+
Host:
|
178
|
+
- api.mailgun.net
|
179
|
+
Authorization:
|
180
|
+
- Basic xxx
|
181
|
+
response:
|
182
|
+
status:
|
183
|
+
code: 200
|
184
|
+
message: OK
|
185
|
+
headers:
|
186
|
+
Access-Control-Allow-Credentials:
|
187
|
+
- 'true'
|
188
|
+
Access-Control-Allow-Origin:
|
189
|
+
- "*"
|
190
|
+
Cache-Control:
|
191
|
+
- no-store
|
192
|
+
Content-Disposition:
|
193
|
+
- inline
|
194
|
+
Content-Length:
|
195
|
+
- '88'
|
196
|
+
Content-Type:
|
197
|
+
- application/json
|
198
|
+
Date:
|
199
|
+
- Mon, 20 Nov 2023 15:33:06 GMT
|
200
|
+
Server:
|
201
|
+
- TwistedWeb/23.10.0
|
202
|
+
Strict-Transport-Security:
|
203
|
+
- max-age=63072000; includeSubDomains
|
204
|
+
X-Mailgun-Key-Id:
|
205
|
+
- 1c7e8847-e7fad6d2
|
206
|
+
X-Xss-Protection:
|
207
|
+
- 1; mode=block
|
208
|
+
body:
|
209
|
+
encoding: UTF-8
|
210
|
+
string: '{"subaccount":{"id":"xxx","name":"test-ruby-lib","status":"open"}}
|
211
|
+
|
212
|
+
'
|
213
|
+
http_version:
|
214
|
+
recorded_at: Mon, 20 Nov 2023 15:33:06 GMT
|
215
|
+
- request:
|
216
|
+
method: post
|
217
|
+
uri: https://api.mailgun.net/v5/accounts/subaccounts/xxx/disable
|
218
|
+
body:
|
219
|
+
encoding: US-ASCII
|
220
|
+
string: ''
|
221
|
+
headers:
|
222
|
+
Accept:
|
223
|
+
- "*/*"
|
224
|
+
User-Agent:
|
225
|
+
- rest-client/2.1.0 (darwin22 x86_64) ruby/2.7.4p191
|
226
|
+
Content-Length:
|
227
|
+
- '0'
|
228
|
+
Content-Type:
|
229
|
+
- application/x-www-form-urlencoded
|
230
|
+
Accept-Encoding:
|
231
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
232
|
+
Host:
|
233
|
+
- api.mailgun.net
|
234
|
+
Authorization:
|
235
|
+
- Basic xxx
|
236
|
+
response:
|
237
|
+
status:
|
238
|
+
code: 200
|
239
|
+
message: OK
|
240
|
+
headers:
|
241
|
+
Access-Control-Allow-Credentials:
|
242
|
+
- 'true'
|
243
|
+
Access-Control-Allow-Origin:
|
244
|
+
- "*"
|
245
|
+
Cache-Control:
|
246
|
+
- no-store
|
247
|
+
Content-Disposition:
|
248
|
+
- inline
|
249
|
+
Content-Length:
|
250
|
+
- '92'
|
251
|
+
Content-Type:
|
252
|
+
- application/json
|
253
|
+
Date:
|
254
|
+
- Mon, 20 Nov 2023 15:33:07 GMT
|
255
|
+
Server:
|
256
|
+
- TwistedWeb/23.10.0
|
257
|
+
Strict-Transport-Security:
|
258
|
+
- max-age=63072000; includeSubDomains
|
259
|
+
X-Mailgun-Key-Id:
|
260
|
+
- 1c7e8847-e7fad6d2
|
261
|
+
X-Xss-Protection:
|
262
|
+
- 1; mode=block
|
263
|
+
body:
|
264
|
+
encoding: UTF-8
|
265
|
+
string: '{"subaccount":{"id":"xxx","name":"test-ruby-lib","status":"disabled"}}
|
266
|
+
|
267
|
+
'
|
268
|
+
http_version:
|
269
|
+
recorded_at: Mon, 20 Nov 2023 15:33:08 GMT
|
270
|
+
recorded_with: VCR 3.0.3
|