Skip to content

Commit d4c9bd6

Browse files
committed
Update mailchimp-transactional-python to v1.0.40
1 parent 6b2e61a commit d4c9bd6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+614
-221
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Transactional
44

5+
### 1.0.40
6+
* Added the new /allowlists/ series of endpoints and the /exports/allowlist endpoint to the API reference
7+
58
### 1.0.39
69
* Fixes the output directory for the Changelog for the php client library
710

@@ -13,6 +16,9 @@
1316

1417
## Marketing
1518

19+
### 3.0.65
20+
* Added a new API endpoint, `/3.0/account-exports`, allowing users to programatically export their account information
21+
1622
### 3.0.64
1723
* Fixes the output directory for the Changelog for the php client library
1824

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ All URIs are relative to *https://mandrillapp.com/api/1.0*
9090

9191
| Method | Endpoint |
9292
| ---------- | -------- |
93+
| **allowlists.add** | /allowlists/add |
94+
| **allowlists.delete** | /allowlists/delete |
95+
| **allowlists.list** | /allowlists/list |
9396
| **exports.activity** | /exports/activity |
97+
| **exports.allowlist** | /exports/allowlist |
9498
| **exports.info** | /exports/info |
9599
| **exports.list** | /exports/list |
96100
| **exports.rejects** | /exports/rejects |

build/lib/mailchimp_transactional/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
99
10-
OpenAPI spec version: 1.0.39
10+
OpenAPI spec version: 1.0.40
1111
1212
Generated by: https://github.com/swagger-api/swagger-codegen.git
1313
"""
@@ -16,6 +16,7 @@
1616
from __future__ import absolute_import
1717

1818
# import apis into sdk package
19+
from mailchimp_transactional.api.allowlists_api import AllowlistsApi
1920
from mailchimp_transactional.api.exports_api import ExportsApi
2021
from mailchimp_transactional.api.inbound_api import InboundApi
2122
from mailchimp_transactional.api.ips_api import IpsApi
@@ -39,6 +40,7 @@ def __init__(self, api_key = ''):
3940
self.api_key = api_key
4041
self.api_client = ApiClient()
4142

43+
self.allowlists = AllowlistsApi(self.api_key, self.api_client)
4244
self.exports = ExportsApi(self.api_key, self.api_client)
4345
self.inbound = InboundApi(self.api_key, self.api_client)
4446
self.ips = IpsApi(self.api_key, self.api_client)
@@ -57,6 +59,7 @@ def __init__(self, api_key = ''):
5759

5860
def set_api_key(self, api_key = ''):
5961
self.api_key = api_key
62+
self.allowlists = AllowlistsApi(self.api_key, self.api_client)
6063
self.exports = ExportsApi(self.api_key, self.api_client)
6164
self.inbound = InboundApi(self.api_key, self.api_client)
6265
self.ips = IpsApi(self.api_key, self.api_client)

build/lib/mailchimp_transactional/api/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# flake8: noqa
44

55
# import apis into api package
6+
from mailchimp_transactional.api.allowlists_api import AllowlistsApi
67
from mailchimp_transactional.api.exports_api import ExportsApi
78
from mailchimp_transactional.api.inbound_api import InboundApi
89
from mailchimp_transactional.api.ips_api import IpsApi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# coding: utf-8
2+
3+
"""
4+
Mailchimp Transactional API
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: 1.0.40
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
from __future__ import absolute_import
15+
16+
import re # noqa: F401
17+
18+
# python 2 and python 3 compatibility library
19+
import six
20+
21+
from mailchimp_transactional.api_client import ApiClient
22+
23+
class AllowlistsApi(object):
24+
"""NOTE: This class is auto generated by the swagger code generator program.
25+
26+
Do not edit the class manually.
27+
Ref: https://github.com/swagger-api/swagger-codegen
28+
"""
29+
30+
def __init__(self, api_key='', api_client = None):
31+
self.api_key = api_key
32+
if api_client:
33+
self.api_client = api_client
34+
else:
35+
self.api_client = ApiClient()
36+
37+
def add(self, body = {}, **kwargs): # noqa: E501
38+
"""Add email to allowlist # noqa: E501
39+
40+
Adds an email to your email rejection allowlist. If the address is currently on your denylist, that denylist entry will be removed automatically. # noqa: E501
41+
"""
42+
(data) = self.add_with_http_info(body, **kwargs) # noqa: E501
43+
return data
44+
45+
def add_with_http_info(self, body, **kwargs): # noqa: E501
46+
"""Add email to allowlist # noqa: E501
47+
48+
Adds an email to your email rejection allowlist. If the address is currently on your denylist, that denylist entry will be removed automatically. # noqa: E501
49+
"""
50+
51+
all_params = ['body'] # noqa: E501
52+
53+
params = locals()
54+
for key, val in six.iteritems(params['kwargs']):
55+
if key not in all_params:
56+
raise TypeError(
57+
"Got an unexpected keyword argument '%s'"
58+
" to method add" % key
59+
)
60+
params[key] = val
61+
del params['kwargs']
62+
63+
# add api_key to body params
64+
params['body']['key'] = self.api_key
65+
66+
body_params = None
67+
if 'body' in params:
68+
body_params = params['body']
69+
70+
return self.api_client.call_api(
71+
'/allowlists/add', 'POST',
72+
body=body_params,
73+
response_type='InlineResponse200') # noqa: E501
74+
75+
def delete(self, body = {}, **kwargs): # noqa: E501
76+
"""Remove email from allowlist # noqa: E501
77+
78+
Removes an email address from the allowlist. # noqa: E501
79+
"""
80+
(data) = self.delete_with_http_info(body, **kwargs) # noqa: E501
81+
return data
82+
83+
def delete_with_http_info(self, body, **kwargs): # noqa: E501
84+
"""Remove email from allowlist # noqa: E501
85+
86+
Removes an email address from the allowlist. # noqa: E501
87+
"""
88+
89+
all_params = ['body'] # noqa: E501
90+
91+
params = locals()
92+
for key, val in six.iteritems(params['kwargs']):
93+
if key not in all_params:
94+
raise TypeError(
95+
"Got an unexpected keyword argument '%s'"
96+
" to method delete" % key
97+
)
98+
params[key] = val
99+
del params['kwargs']
100+
101+
# add api_key to body params
102+
params['body']['key'] = self.api_key
103+
104+
body_params = None
105+
if 'body' in params:
106+
body_params = params['body']
107+
108+
return self.api_client.call_api(
109+
'/allowlists/delete', 'POST',
110+
body=body_params,
111+
response_type='InlineResponse2002') # noqa: E501
112+
113+
def list(self, body = {}, **kwargs): # noqa: E501
114+
"""List allowlisted emails # noqa: E501
115+
116+
Retrieves your email rejection allowlist. You can provide an email address or search prefix to limit the results. Returns up to 1000 results. # noqa: E501
117+
"""
118+
(data) = self.list_with_http_info(body, **kwargs) # noqa: E501
119+
return data
120+
121+
def list_with_http_info(self, body, **kwargs): # noqa: E501
122+
"""List allowlisted emails # noqa: E501
123+
124+
Retrieves your email rejection allowlist. You can provide an email address or search prefix to limit the results. Returns up to 1000 results. # noqa: E501
125+
"""
126+
127+
all_params = ['body'] # noqa: E501
128+
129+
params = locals()
130+
for key, val in six.iteritems(params['kwargs']):
131+
if key not in all_params:
132+
raise TypeError(
133+
"Got an unexpected keyword argument '%s'"
134+
" to method list" % key
135+
)
136+
params[key] = val
137+
del params['kwargs']
138+
139+
# add api_key to body params
140+
params['body']['key'] = self.api_key
141+
142+
body_params = None
143+
if 'body' in params:
144+
body_params = params['body']
145+
146+
return self.api_client.call_api(
147+
'/allowlists/list', 'POST',
148+
body=body_params,
149+
response_type='list[InlineResponse2001]') # noqa: E501

build/lib/mailchimp_transactional/api/exports_api.py

+46-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
77
8-
OpenAPI spec version: 1.0.39
8+
OpenAPI spec version: 1.0.40
99
1010
Generated by: https://github.com/swagger-api/swagger-codegen.git
1111
"""
@@ -70,7 +70,45 @@ def activity_with_http_info(self, body, **kwargs): # noqa: E501
7070
return self.api_client.call_api(
7171
'/exports/activity', 'POST',
7272
body=body_params,
73-
response_type='InlineResponse2004') # noqa: E501
73+
response_type='InlineResponse2007') # noqa: E501
74+
75+
def allowlist(self, body = {}, **kwargs): # noqa: E501
76+
"""Export Allowlist # noqa: E501
77+
78+
Begins an export of your rejection allowlist. The allowlist will be exported to a zip archive containing a single file named allowlist.csv that includes the following fields: email, detail, created_at. # noqa: E501
79+
"""
80+
(data) = self.allowlist_with_http_info(body, **kwargs) # noqa: E501
81+
return data
82+
83+
def allowlist_with_http_info(self, body, **kwargs): # noqa: E501
84+
"""Export Allowlist # noqa: E501
85+
86+
Begins an export of your rejection allowlist. The allowlist will be exported to a zip archive containing a single file named allowlist.csv that includes the following fields: email, detail, created_at. # noqa: E501
87+
"""
88+
89+
all_params = ['body'] # noqa: E501
90+
91+
params = locals()
92+
for key, val in six.iteritems(params['kwargs']):
93+
if key not in all_params:
94+
raise TypeError(
95+
"Got an unexpected keyword argument '%s'"
96+
" to method allowlist" % key
97+
)
98+
params[key] = val
99+
del params['kwargs']
100+
101+
# add api_key to body params
102+
params['body']['key'] = self.api_key
103+
104+
body_params = None
105+
if 'body' in params:
106+
body_params = params['body']
107+
108+
return self.api_client.call_api(
109+
'/exports/allowlist', 'POST',
110+
body=body_params,
111+
response_type='InlineResponse2006') # noqa: E501
74112

75113
def info(self, body = {}, **kwargs): # noqa: E501
76114
"""View export info # noqa: E501
@@ -108,7 +146,7 @@ def info_with_http_info(self, body, **kwargs): # noqa: E501
108146
return self.api_client.call_api(
109147
'/exports/info', 'POST',
110148
body=body_params,
111-
response_type='InlineResponse200') # noqa: E501
149+
response_type='InlineResponse2003') # noqa: E501
112150

113151
def list(self, body = {}, **kwargs): # noqa: E501
114152
"""List exports # noqa: E501
@@ -146,7 +184,7 @@ def list_with_http_info(self, body, **kwargs): # noqa: E501
146184
return self.api_client.call_api(
147185
'/exports/list', 'POST',
148186
body=body_params,
149-
response_type='list[InlineResponse2001]') # noqa: E501
187+
response_type='list[InlineResponse2004]') # noqa: E501
150188

151189
def rejects(self, body = {}, **kwargs): # noqa: E501
152190
"""Export denylist # noqa: E501
@@ -184,20 +222,20 @@ def rejects_with_http_info(self, body, **kwargs): # noqa: E501
184222
return self.api_client.call_api(
185223
'/exports/rejects', 'POST',
186224
body=body_params,
187-
response_type='InlineResponse2002') # noqa: E501
225+
response_type='InlineResponse2005') # noqa: E501
188226

189227
def whitelist(self, body = {}, **kwargs): # noqa: E501
190228
"""Export Allowlist # noqa: E501
191229
192-
Begins an export of your rejection allowlist. The allowlist will be exported to a zip archive containing a single file named whitelist.csv that includes the following fields: email, detail, created_at. # noqa: E501
230+
Begins an export of your rejection allowlist. The allowlist will be exported to a zip archive containing a single file named allowlist.csv that includes the following fields: email, detail, created_at. # noqa: E501
193231
"""
194232
(data) = self.whitelist_with_http_info(body, **kwargs) # noqa: E501
195233
return data
196234

197235
def whitelist_with_http_info(self, body, **kwargs): # noqa: E501
198236
"""Export Allowlist # noqa: E501
199237
200-
Begins an export of your rejection allowlist. The allowlist will be exported to a zip archive containing a single file named whitelist.csv that includes the following fields: email, detail, created_at. # noqa: E501
238+
Begins an export of your rejection allowlist. The allowlist will be exported to a zip archive containing a single file named allowlist.csv that includes the following fields: email, detail, created_at. # noqa: E501
201239
"""
202240

203241
all_params = ['body'] # noqa: E501
@@ -222,4 +260,4 @@ def whitelist_with_http_info(self, body, **kwargs): # noqa: E501
222260
return self.api_client.call_api(
223261
'/exports/whitelist', 'POST',
224262
body=body_params,
225-
response_type='InlineResponse2003') # noqa: E501
263+
response_type='InlineResponse2006') # noqa: E501

0 commit comments

Comments
 (0)