mailgun-ruby 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +22 -0
- data/.ruby-env.yml.example +12 -0
- data/.travis.yml +6 -12
- data/Domains.md +36 -0
- data/MessageBuilder.md +14 -14
- data/Messages.md +44 -30
- data/OptInHandler.md +34 -34
- data/README.md +74 -24
- data/Rakefile +22 -20
- data/Snippets.md +26 -26
- data/Webhooks.md +40 -0
- data/lib/mailgun.rb +26 -228
- data/lib/mailgun/chains.rb +16 -0
- data/lib/mailgun/client.rb +143 -0
- data/lib/mailgun/domains/domains.rb +84 -0
- data/lib/mailgun/events/events.rb +53 -35
- data/lib/mailgun/exceptions/exceptions.rb +43 -10
- data/lib/mailgun/lists/opt_in_handler.rb +18 -19
- data/lib/mailgun/messages/batch_message.rb +31 -48
- data/lib/mailgun/messages/message_builder.rb +160 -144
- data/lib/mailgun/response.rb +55 -0
- data/lib/mailgun/version.rb +2 -3
- data/lib/mailgun/webhooks/webhooks.rb +101 -0
- data/mailgun.gemspec +16 -10
- data/spec/integration/bounces_spec.rb +44 -0
- data/spec/integration/campaign_spec.rb +60 -0
- data/spec/integration/complaints_spec.rb +38 -0
- data/spec/integration/domains_spec.rb +39 -0
- data/spec/integration/email_validation_spec.rb +29 -0
- data/spec/integration/events_spec.rb +20 -0
- data/spec/integration/list_members_spec.rb +63 -0
- data/spec/integration/list_spec.rb +58 -0
- data/spec/integration/mailgun_spec.rb +26 -550
- data/spec/integration/routes_spec.rb +74 -0
- data/spec/integration/stats_spec.rb +15 -0
- data/spec/integration/unsubscribes_spec.rb +42 -0
- data/spec/integration/webhook_spec.rb +54 -0
- data/spec/spec_helper.rb +37 -7
- data/spec/unit/connection/test_client.rb +15 -95
- data/spec/unit/events/events_spec.rb +9 -6
- data/spec/unit/lists/opt_in_handler_spec.rb +6 -4
- data/spec/unit/mailgun_spec.rb +25 -19
- data/spec/unit/messages/batch_message_spec.rb +47 -38
- data/spec/unit/messages/message_builder_spec.rb +282 -111
- data/vcr_cassettes/bounces.yml +175 -0
- data/vcr_cassettes/complaints.yml +175 -0
- data/vcr_cassettes/domains.todo.yml +42 -0
- data/vcr_cassettes/domains.yml +360 -0
- data/vcr_cassettes/email_validation.yml +104 -0
- data/vcr_cassettes/events.yml +61 -0
- data/vcr_cassettes/list_members.yml +320 -0
- data/vcr_cassettes/mailing_list.todo.yml +43 -0
- data/vcr_cassettes/mailing_list.yml +390 -0
- data/vcr_cassettes/routes.yml +359 -0
- data/vcr_cassettes/send_message.yml +107 -0
- data/vcr_cassettes/stats.yml +44 -0
- data/vcr_cassettes/unsubscribes.yml +191 -0
- data/vcr_cassettes/webhooks.yml +276 -0
- metadata +114 -10
@@ -0,0 +1,104 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api:<PUBKEY>@api.mailgun.net/v3/address/validate?address=test@DOMAIN.TEST
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Thu, 07 Jan 2016 22:08:10 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Content-Length:
|
28
|
+
- '247'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
Access-Control-Max-Age:
|
34
|
+
- '600'
|
35
|
+
Access-Control-Allow-Methods:
|
36
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
37
|
+
Access-Control-Allow-Headers:
|
38
|
+
- Content-Type, x-requested-with
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: |-
|
42
|
+
{
|
43
|
+
"address": "test@DOMAIN.TEST",
|
44
|
+
"did_you_mean": null,
|
45
|
+
"is_valid": true,
|
46
|
+
"parts": {
|
47
|
+
"display_name": null,
|
48
|
+
"domain": "DOMAIN.TEST",
|
49
|
+
"local_part": "test"
|
50
|
+
}
|
51
|
+
}
|
52
|
+
http_version:
|
53
|
+
recorded_at: Thu, 07 Jan 2016 22:08:10 GMT
|
54
|
+
- request:
|
55
|
+
method: get
|
56
|
+
uri: https://api:<PUBKEY>@api.mailgun.net/v3/address/parse?addresses=Alice%20%3Calice@DOMAIN.TEST%3E,bob@DOMAIN.TEST,DOMAIN.TEST
|
57
|
+
body:
|
58
|
+
encoding: US-ASCII
|
59
|
+
string: ''
|
60
|
+
headers:
|
61
|
+
Accept:
|
62
|
+
- "*/*"
|
63
|
+
Accept-Encoding:
|
64
|
+
- gzip, deflate
|
65
|
+
User-Agent:
|
66
|
+
- Ruby
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 200
|
70
|
+
message: OK
|
71
|
+
headers:
|
72
|
+
Server:
|
73
|
+
- nginx
|
74
|
+
Date:
|
75
|
+
- Thu, 07 Jan 2016 22:08:10 GMT
|
76
|
+
Content-Type:
|
77
|
+
- application/json
|
78
|
+
Content-Length:
|
79
|
+
- '223'
|
80
|
+
Connection:
|
81
|
+
- keep-alive
|
82
|
+
Access-Control-Allow-Origin:
|
83
|
+
- "*"
|
84
|
+
Access-Control-Max-Age:
|
85
|
+
- '600'
|
86
|
+
Access-Control-Allow-Methods:
|
87
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
88
|
+
Access-Control-Allow-Headers:
|
89
|
+
- Content-Type, x-requested-with
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: |-
|
93
|
+
{
|
94
|
+
"parsed": [
|
95
|
+
"Alice <alice@DOMAIN.TEST>",
|
96
|
+
"bob@DOMAIN.TEST"
|
97
|
+
],
|
98
|
+
"unparseable": [
|
99
|
+
"DOMAIN.TEST"
|
100
|
+
]
|
101
|
+
}
|
102
|
+
http_version:
|
103
|
+
recorded_at: Thu, 07 Jan 2016 22:08:10 GMT
|
104
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/events?limit=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Thu, 07 Jan 2016 22:08:06 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Content-Length:
|
28
|
+
- '3336'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
Access-Control-Max-Age:
|
34
|
+
- '600'
|
35
|
+
Access-Control-Allow-Methods:
|
36
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
37
|
+
Access-Control-Allow-Headers:
|
38
|
+
- Content-Type, x-requested-with
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: "{\n \"items\": [\n {\n \"tags\": [], \n \"timestamp\":
|
42
|
+
1452204483.41958, \n \"envelope\": {\n \"targets\": \"sally@DOMAIN.TEST\",
|
43
|
+
\n \"transport\": \"smtp\", \n \"sender\": \"bob@DOMAIN.TEST\"\n
|
44
|
+
\ }, \n \"recipient-domain\": \"DOMAIN.TEST\", \n \"method\":
|
45
|
+
\"http\", \n \"campaigns\": [], \n \"user-variables\": {}, \n \"flags\":
|
46
|
+
{\n \"is-routed\": null, \n \"is-authenticated\": true, \n \"is-system-test\":
|
47
|
+
false, \n \"is-test-mode\": true\n }, \n \"log-level\": \"info\",
|
48
|
+
\n \"id\": \"JAx9z641TuGGUyaJlD9sCQ\", \n \"message\": {\n \"headers\":
|
49
|
+
{\n \"to\": \"sally@DOMAIN.TEST\", \n \"message-id\": \"20160107220803.53710.46802@DOMAIN.TEST\",
|
50
|
+
\n \"from\": \"bob@DOMAIN.TEST\", \n \"subject\": \"Hash
|
51
|
+
Integration Test\"\n }, \n \"attachments\": [], \n \"recipients\":
|
52
|
+
[\n \"sally@DOMAIN.TEST\"\n ], \n \"size\": 457\n },
|
53
|
+
\n \"recipient\": \"sally@DOMAIN.TEST\", \n \"event\": \"accepted\"\n
|
54
|
+
\ }\n ], \n \"paging\": {\n \"next\": \"https://api.mailgun.net/v3/DOMAIN.TEST/events/W3siYiI6ICIyMDE2LTAxLTA3VDIyOjA4OjA2LjQ1MiswMDowMCIsICJlIjogIjIwMTYtMDEtMDVUMjI6MDg6MDYuNDUzKzAwOjAwIn0sIHsiYiI6ICIyMDE2LTAxLTA3VDIyOjA4OjAzLjQxOSswMDowMCIsICJlIjogIjIwMTYtMDEtMDVUMjI6MDg6MDYuNDUzKzAwOjAwIn0sIFsiZiJdLCBudWxsLCBbWyJhY2NvdW50LmlkIiwgIjU1ZTA0ZWRlMDQ1Y2E0MzY0MTNiN2I0YSJdLCBbImRvbWFpbi5uYW1lIiwgInJzOTBiNjhmZDM5Y2UyNDE1NjlmZDEwZjUzNGVmOWMwNjUubWFpbGd1bi5vcmciXV0sIDEsICJtZXNzYWdlI0pBeDl6NjQxVHVHR1V5YUpsRDlzQ1EiXQ==\",
|
55
|
+
\n \"last\": \"https://api.mailgun.net/v3/DOMAIN.TEST/events/W3siYiI6ICIyMDE2LTAxLTA3VDIyOjA4OjA2LjQ1MiswMDowMCIsICJlIjogIjIwMTYtMDEtMDVUMjI6MDg6MDYuNDUzKzAwOjAwIn0sIHsiYiI6ICIyMDE2LTAxLTA1VDIyOjA4OjA2LjQ1MyswMDowMCIsICJlIjogIjIwMTYtMDEtMDdUMjI6MDg6MDYuNDUyKzAwOjAwIn0sIFsicCIsICJmIl0sIG51bGwsIFtbImFjY291bnQuaWQiLCAiNTVlMDRlZGUwNDVjYTQzNjQxM2I3YjRhIl0sIFsiZG9tYWluLm5hbWUiLCAicnM5MGI2OGZkMzljZTI0MTU2OWZkMTBmNTM0ZWY5YzA2NS5tYWlsZ3VuLm9yZyJdXSwgMSwgbnVsbF0=\",
|
56
|
+
\n \"first\": \"https://api.mailgun.net/v3/DOMAIN.TEST/events/W3siYiI6ICIyMDE2LTAxLTA3VDIyOjA4OjA2LjQ1MiswMDowMCIsICJlIjogIjIwMTYtMDEtMDVUMjI6MDg6MDYuNDUzKzAwOjAwIn0sIHsiYiI6ICIyMDE2LTAxLTA3VDIyOjA4OjA2LjQ1MiswMDowMCIsICJlIjogIjIwMTYtMDEtMDVUMjI6MDg6MDYuNDUzKzAwOjAwIn0sIFsiZiJdLCBudWxsLCBbWyJhY2NvdW50LmlkIiwgIjU1ZTA0ZWRlMDQ1Y2E0MzY0MTNiN2I0YSJdLCBbImRvbWFpbi5uYW1lIiwgInJzOTBiNjhmZDM5Y2UyNDE1NjlmZDEwZjUzNGVmOWMwNjUubWFpbGd1bi5vcmciXV0sIDEsIG51bGxd\",
|
57
|
+
\n \"previous\": \"https://api.mailgun.net/v3/DOMAIN.TEST/events/W3siYiI6ICIyMDE2LTAxLTA3VDIyOjA4OjA2LjQ1MiswMDowMCIsICJlIjogIjIwMTYtMDEtMDVUMjI6MDg6MDYuNDUzKzAwOjAwIn0sIHsiYiI6ICIyMDE2LTAxLTA3VDIyOjA4OjAzLjQxOSswMDowMCIsICJlIjogIjIwMTYtMDEtMDdUMjI6MDg6MDYuNDUzKzAwOjAwIn0sIFsicCIsICJmIl0sIG51bGwsIFtbImFjY291bnQuaWQiLCAiNTVlMDRlZGUwNDVjYTQzNjQxM2I3YjRhIl0sIFsiZG9tYWluLm5hbWUiLCAicnM5MGI2OGZkMzljZTI0MTU2OWZkMTBmNTM0ZWY5YzA2NS5tYWlsZ3VuLm9yZyJdXSwgMSwgIm1lc3NhZ2UjSkF4OXo2NDFUdUdHVXlhSmxEOXNDUSJd\"\n
|
58
|
+
\ }\n}"
|
59
|
+
http_version:
|
60
|
+
recorded_at: Thu, 07 Jan 2016 22:08:06 GMT
|
61
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,320 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/lists
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: address=integration_test_list%40DOMAIN.TEST&name=Integration%20Test%20List&description=This%20list%20should%20be%20deleted%20automatically.&access_level=members
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Length:
|
15
|
+
- '195'
|
16
|
+
Content-Type:
|
17
|
+
- application/x-www-form-urlencoded
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Fri, 08 Jan 2016 20:20:43 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json
|
31
|
+
Content-Length:
|
32
|
+
- '361'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Content-Disposition:
|
36
|
+
- inline
|
37
|
+
Access-Control-Allow-Origin:
|
38
|
+
- "*"
|
39
|
+
Access-Control-Max-Age:
|
40
|
+
- '600'
|
41
|
+
Access-Control-Allow-Methods:
|
42
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
43
|
+
Access-Control-Allow-Headers:
|
44
|
+
- Content-Type, x-requested-with
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: |-
|
48
|
+
{
|
49
|
+
"list": {
|
50
|
+
"access_level": "members",
|
51
|
+
"address": "integration_test_list@DOMAIN.TEST",
|
52
|
+
"created_at": "Fri, 08 Jan 2016 20:20:43 -0000",
|
53
|
+
"description": "This list should be deleted automatically.",
|
54
|
+
"members_count": 0,
|
55
|
+
"name": "Integration Test List"
|
56
|
+
},
|
57
|
+
"message": "Mailing list has been created"
|
58
|
+
}
|
59
|
+
http_version:
|
60
|
+
recorded_at: Fri, 08 Jan 2016 20:20:43 GMT
|
61
|
+
- request:
|
62
|
+
method: post
|
63
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/lists/integration_test_list@DOMAIN.TEST/members
|
64
|
+
body:
|
65
|
+
encoding: US-ASCII
|
66
|
+
string: address=integration_test_member_member%40DOMAIN.TEST&name=Jane%20Doe&subscribed=true&upsert=no
|
67
|
+
headers:
|
68
|
+
Accept:
|
69
|
+
- "*/*; q=0.5, application/xml"
|
70
|
+
Accept-Encoding:
|
71
|
+
- gzip, deflate
|
72
|
+
Content-Length:
|
73
|
+
- '129'
|
74
|
+
Content-Type:
|
75
|
+
- application/x-www-form-urlencoded
|
76
|
+
User-Agent:
|
77
|
+
- Ruby
|
78
|
+
response:
|
79
|
+
status:
|
80
|
+
code: 200
|
81
|
+
message: OK
|
82
|
+
headers:
|
83
|
+
Server:
|
84
|
+
- nginx
|
85
|
+
Date:
|
86
|
+
- Fri, 08 Jan 2016 20:20:43 GMT
|
87
|
+
Content-Type:
|
88
|
+
- application/json
|
89
|
+
Content-Length:
|
90
|
+
- '233'
|
91
|
+
Connection:
|
92
|
+
- keep-alive
|
93
|
+
Content-Disposition:
|
94
|
+
- inline
|
95
|
+
Access-Control-Allow-Origin:
|
96
|
+
- "*"
|
97
|
+
Access-Control-Max-Age:
|
98
|
+
- '600'
|
99
|
+
Access-Control-Allow-Methods:
|
100
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
101
|
+
Access-Control-Allow-Headers:
|
102
|
+
- Content-Type, x-requested-with
|
103
|
+
body:
|
104
|
+
encoding: UTF-8
|
105
|
+
string: |-
|
106
|
+
{
|
107
|
+
"member": {
|
108
|
+
"address": "integration_test_member_member@DOMAIN.TEST",
|
109
|
+
"name": "Jane Doe",
|
110
|
+
"subscribed": true,
|
111
|
+
"vars": {}
|
112
|
+
},
|
113
|
+
"message": "Mailing list member has been created"
|
114
|
+
}
|
115
|
+
http_version:
|
116
|
+
recorded_at: Fri, 08 Jan 2016 20:20:44 GMT
|
117
|
+
- request:
|
118
|
+
method: get
|
119
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/lists/integration_test_list@DOMAIN.TEST/members/integration_test_member_member@DOMAIN.TEST
|
120
|
+
body:
|
121
|
+
encoding: US-ASCII
|
122
|
+
string: ''
|
123
|
+
headers:
|
124
|
+
Accept:
|
125
|
+
- "*/*"
|
126
|
+
Accept-Encoding:
|
127
|
+
- gzip, deflate
|
128
|
+
User-Agent:
|
129
|
+
- Ruby
|
130
|
+
response:
|
131
|
+
status:
|
132
|
+
code: 200
|
133
|
+
message: OK
|
134
|
+
headers:
|
135
|
+
Server:
|
136
|
+
- nginx
|
137
|
+
Date:
|
138
|
+
- Fri, 08 Jan 2016 20:20:43 GMT
|
139
|
+
Content-Type:
|
140
|
+
- application/json
|
141
|
+
Content-Length:
|
142
|
+
- '180'
|
143
|
+
Connection:
|
144
|
+
- keep-alive
|
145
|
+
Content-Disposition:
|
146
|
+
- inline
|
147
|
+
Access-Control-Allow-Origin:
|
148
|
+
- "*"
|
149
|
+
Access-Control-Max-Age:
|
150
|
+
- '600'
|
151
|
+
Access-Control-Allow-Methods:
|
152
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
153
|
+
Access-Control-Allow-Headers:
|
154
|
+
- Content-Type, x-requested-with
|
155
|
+
body:
|
156
|
+
encoding: UTF-8
|
157
|
+
string: |-
|
158
|
+
{
|
159
|
+
"member": {
|
160
|
+
"address": "integration_test_member_member@DOMAIN.TEST",
|
161
|
+
"name": "Jane Doe",
|
162
|
+
"subscribed": true,
|
163
|
+
"vars": {}
|
164
|
+
}
|
165
|
+
}
|
166
|
+
http_version:
|
167
|
+
recorded_at: Fri, 08 Jan 2016 20:20:44 GMT
|
168
|
+
- request:
|
169
|
+
method: put
|
170
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/lists/integration_test_list@DOMAIN.TEST/members/integration_test_member_member@DOMAIN.TEST
|
171
|
+
body:
|
172
|
+
encoding: US-ASCII
|
173
|
+
string: name=Jane%20Doe%20Update&subscribed=false
|
174
|
+
headers:
|
175
|
+
Accept:
|
176
|
+
- "*/*; q=0.5, application/xml"
|
177
|
+
Accept-Encoding:
|
178
|
+
- gzip, deflate
|
179
|
+
Content-Length:
|
180
|
+
- '41'
|
181
|
+
Content-Type:
|
182
|
+
- application/x-www-form-urlencoded
|
183
|
+
User-Agent:
|
184
|
+
- Ruby
|
185
|
+
response:
|
186
|
+
status:
|
187
|
+
code: 200
|
188
|
+
message: OK
|
189
|
+
headers:
|
190
|
+
Server:
|
191
|
+
- nginx
|
192
|
+
Date:
|
193
|
+
- Fri, 08 Jan 2016 20:20:44 GMT
|
194
|
+
Content-Type:
|
195
|
+
- application/json
|
196
|
+
Content-Length:
|
197
|
+
- '241'
|
198
|
+
Connection:
|
199
|
+
- keep-alive
|
200
|
+
Content-Disposition:
|
201
|
+
- inline
|
202
|
+
Access-Control-Allow-Origin:
|
203
|
+
- "*"
|
204
|
+
Access-Control-Max-Age:
|
205
|
+
- '600'
|
206
|
+
Access-Control-Allow-Methods:
|
207
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
208
|
+
Access-Control-Allow-Headers:
|
209
|
+
- Content-Type, x-requested-with
|
210
|
+
body:
|
211
|
+
encoding: UTF-8
|
212
|
+
string: |-
|
213
|
+
{
|
214
|
+
"member": {
|
215
|
+
"address": "integration_test_member_member@DOMAIN.TEST",
|
216
|
+
"name": "Jane Doe Update",
|
217
|
+
"subscribed": false,
|
218
|
+
"vars": {}
|
219
|
+
},
|
220
|
+
"message": "Mailing list member has been updated"
|
221
|
+
}
|
222
|
+
http_version:
|
223
|
+
recorded_at: Fri, 08 Jan 2016 20:20:44 GMT
|
224
|
+
- request:
|
225
|
+
method: delete
|
226
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/lists/integration_test_list@DOMAIN.TEST/members/integration_test_member_member@DOMAIN.TEST
|
227
|
+
body:
|
228
|
+
encoding: US-ASCII
|
229
|
+
string: ''
|
230
|
+
headers:
|
231
|
+
Accept:
|
232
|
+
- "*/*; q=0.5, application/xml"
|
233
|
+
Accept-Encoding:
|
234
|
+
- gzip, deflate
|
235
|
+
User-Agent:
|
236
|
+
- Ruby
|
237
|
+
response:
|
238
|
+
status:
|
239
|
+
code: 200
|
240
|
+
message: OK
|
241
|
+
headers:
|
242
|
+
Server:
|
243
|
+
- nginx
|
244
|
+
Date:
|
245
|
+
- Fri, 08 Jan 2016 20:20:44 GMT
|
246
|
+
Content-Type:
|
247
|
+
- application/json
|
248
|
+
Content-Length:
|
249
|
+
- '169'
|
250
|
+
Connection:
|
251
|
+
- keep-alive
|
252
|
+
Content-Disposition:
|
253
|
+
- inline
|
254
|
+
Access-Control-Allow-Origin:
|
255
|
+
- "*"
|
256
|
+
Access-Control-Max-Age:
|
257
|
+
- '600'
|
258
|
+
Access-Control-Allow-Methods:
|
259
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
260
|
+
Access-Control-Allow-Headers:
|
261
|
+
- Content-Type, x-requested-with
|
262
|
+
body:
|
263
|
+
encoding: UTF-8
|
264
|
+
string: |-
|
265
|
+
{
|
266
|
+
"member": {
|
267
|
+
"address": "integration_test_member_member@DOMAIN.TEST"
|
268
|
+
},
|
269
|
+
"message": "Mailing list member has been deleted"
|
270
|
+
}
|
271
|
+
http_version:
|
272
|
+
recorded_at: Fri, 08 Jan 2016 20:20:44 GMT
|
273
|
+
- request:
|
274
|
+
method: delete
|
275
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/lists/integration_test_list@DOMAIN.TEST
|
276
|
+
body:
|
277
|
+
encoding: US-ASCII
|
278
|
+
string: ''
|
279
|
+
headers:
|
280
|
+
Accept:
|
281
|
+
- "*/*; q=0.5, application/xml"
|
282
|
+
Accept-Encoding:
|
283
|
+
- gzip, deflate
|
284
|
+
User-Agent:
|
285
|
+
- Ruby
|
286
|
+
response:
|
287
|
+
status:
|
288
|
+
code: 200
|
289
|
+
message: OK
|
290
|
+
headers:
|
291
|
+
Server:
|
292
|
+
- nginx
|
293
|
+
Date:
|
294
|
+
- Fri, 08 Jan 2016 20:20:44 GMT
|
295
|
+
Content-Type:
|
296
|
+
- application/json
|
297
|
+
Content-Length:
|
298
|
+
- '133'
|
299
|
+
Connection:
|
300
|
+
- keep-alive
|
301
|
+
Content-Disposition:
|
302
|
+
- inline
|
303
|
+
Access-Control-Allow-Origin:
|
304
|
+
- "*"
|
305
|
+
Access-Control-Max-Age:
|
306
|
+
- '600'
|
307
|
+
Access-Control-Allow-Methods:
|
308
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
309
|
+
Access-Control-Allow-Headers:
|
310
|
+
- Content-Type, x-requested-with
|
311
|
+
body:
|
312
|
+
encoding: UTF-8
|
313
|
+
string: |-
|
314
|
+
{
|
315
|
+
"address": "integration_test_list@DOMAIN.TEST",
|
316
|
+
"message": "Mailing list has been removed"
|
317
|
+
}
|
318
|
+
http_version:
|
319
|
+
recorded_at: Fri, 08 Jan 2016 20:20:45 GMT
|
320
|
+
recorded_with: VCR 3.0.1
|