Skip to content

Commit 70f1068

Browse files
committed
[Librarian] Regenerated @ 676a89611df798e6e0da2fc2d2f5b953d7144d07
1 parent 450eff4 commit 70f1068

Some content is hidden

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

57 files changed

+1295
-526
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
[2025-08-18] Version 7.0.0-rc.9
5+
-------------------------------
6+
**Email activity**
7+
- Update the API specs for email activity DownloadCsv operation
8+
9+
410
[2025-05-29] Version 7.0.0-rc.8
511
-------------------------------
612
**Domain authentication**

sendgrid/rest/api/email_activity/v3/models/download_csv200_response.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,14 @@
88
class DownloadCsv200Response:
99
def __init__(
1010
self,
11-
presigned_url: Optional[str]=None,
12-
csv: Optional[str]=None
11+
presigned_url: Optional[str]=None
1312
):
1413
self.presigned_url=presigned_url
15-
self.csv=csv
1614

1715
def to_dict(self):
1816
return {key: to_serializable(value)
1917
for key, value in {
20-
"presigned_url": self.presigned_url,
21-
"csv": self.csv
18+
"presigned_url": self.presigned_url
2219
}.items() if value is not None}
2320

2421
@classmethod
@@ -28,7 +25,6 @@ def from_dict(cls, data):
2825
@staticmethod
2926
def generate_model(payload: Dict[str, object]):
3027
return DownloadCsv200Response(
31-
presigned_url=payload.get('presigned_url'),
32-
csv=payload.get('csv')
28+
presigned_url=payload.get('presigned_url')
3329
)
3430

File renamed without changes.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Subusers
7+
The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information.
8+
9+
NOTE: This class is auto generated by OpenAPI Generator.
10+
https://openapi-generator.tech
11+
Do not edit the class manually.
12+
"""
13+
14+
import json
15+
import warnings
16+
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing_extensions import Annotated
18+
from sendgrid.base import values
19+
from sendgrid.exceptions import ApiException
20+
from sendgrid.http.request import Request
21+
from sendgrid.http.response import ApiResponse
22+
23+
from typing import Optional
24+
from sendgrid.rest.api.subusers.v3.models.create_subuser_request import CreateSubuserRequest
25+
from sendgrid.rest.api.subusers.v3.models.subuser_post import SubuserPost
26+
27+
class CreateSubuser:
28+
def __init__(self, client) -> None:
29+
self.client = client
30+
31+
def send(
32+
self,
33+
create_subuser_request: Optional[CreateSubuserRequest] = None,
34+
35+
):
36+
path='/v3/subusers'
37+
38+
data = None
39+
if create_subuser_request:
40+
data = create_subuser_request.to_dict()
41+
request = Request(
42+
method='POST',
43+
url=path,
44+
data=data,
45+
headers=headers
46+
)
47+
response=self.client.send(request)
48+
if response is None:
49+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
50+
51+
if response.text:
52+
text = json.loads(response.text)
53+
else:
54+
text = ""
55+
if response.is_success():
56+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
57+
else:
58+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

sendgrid/rest/api/user/v3/list_account.py renamed to sendgrid/rest/api/subusers/v3/delete_subuser.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
44
SENDGRID-OAI-GENERATOR
55
6-
Twilio SendGrid User API
7-
The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details).
6+
Twilio SendGrid Subusers
7+
The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information.
88
99
NOTE: This class is auto generated by OpenAPI Generator.
1010
https://openapi-generator.tech
@@ -21,28 +21,25 @@
2121
from sendgrid.http.response import ApiResponse
2222

2323
from pydantic import Field, StrictStr
24-
from typing import Optional
2524
from typing_extensions import Annotated
26-
from sendgrid.rest.api.user.v3.models.get_user_account_response import GETUserAccountResponse
2725

28-
class ListAccount:
26+
class DeleteSubuser:
2927
def __init__(self, client) -> None:
3028
self.client = client
3129

3230
def send(
3331
self,
34-
on_behalf_of: Optional[str] = None,
32+
subuser_name: str,
3533

3634
):
37-
path='/v3/user/account'
35+
path='/v3/subusers/{subuser_name}'
36+
path = path.format(
37+
subuser_name=subuser_name,
38+
)
3839

39-
headers = values.of(
40-
{
41-
'on-behalf-of': on_behalf_of,
42-
})
4340
data = None
4441
request = Request(
45-
method='GET',
42+
method='DELETE',
4643
url=path,
4744
data=data,
4845
headers=headers

sendgrid/rest/api/user/v3/list_credit.py renamed to sendgrid/rest/api/subusers/v3/get_subuser_credit.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
44
SENDGRID-OAI-GENERATOR
55
6-
Twilio SendGrid User API
7-
The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details).
6+
Twilio SendGrid Subusers
7+
The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information.
88
99
NOTE: This class is auto generated by OpenAPI Generator.
1010
https://openapi-generator.tech
@@ -21,25 +21,23 @@
2121
from sendgrid.http.response import ApiResponse
2222

2323
from pydantic import Field, StrictStr
24-
from typing import Optional
2524
from typing_extensions import Annotated
26-
from sendgrid.rest.api.user.v3.models.list_credit200_response import ListCredit200Response
25+
from sendgrid.rest.api.subusers.v3.models.subuser_credits import SubuserCredits
2726

28-
class ListCredit:
27+
class GetSubuserCredit:
2928
def __init__(self, client) -> None:
3029
self.client = client
3130

3231
def send(
3332
self,
34-
on_behalf_of: Optional[str] = None,
33+
subuser_name: str,
3534

3635
):
37-
path='/v3/user/credits'
36+
path='/v3/subusers/{subuser_name}/credits'
37+
path = path.format(
38+
subuser_name=subuser_name,
39+
)
3840

39-
headers = values.of(
40-
{
41-
'on-behalf-of': on_behalf_of,
42-
})
4341
data = None
4442
request = Request(
4543
method='GET',
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Subusers
7+
The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information.
8+
9+
NOTE: This class is auto generated by OpenAPI Generator.
10+
https://openapi-generator.tech
11+
Do not edit the class manually.
12+
"""
13+
14+
import json
15+
import warnings
16+
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing_extensions import Annotated
18+
from sendgrid.base import values
19+
from sendgrid.exceptions import ApiException
20+
from sendgrid.http.request import Request
21+
from sendgrid.http.response import ApiResponse
22+
23+
from pydantic import Field, StrictInt, StrictStr
24+
from typing import Optional
25+
from typing_extensions import Annotated
26+
from sendgrid.rest.api.subusers.v3.models.sort_by_direction1 import SortByDirection1
27+
from sendgrid.rest.api.subusers.v3.models.sort_by_metric import SortByMetric
28+
from sendgrid.rest.api.subusers.v3.models.subuser_stats import SubuserStats
29+
30+
class ListMonthlyStat:
31+
def __init__(self, client) -> None:
32+
self.client = client
33+
34+
def send(
35+
self,
36+
var_date: Optional[str] = None,
37+
subuser: Optional[str] = None,
38+
sort_by_metric: Optional[SortByMetric] = None,
39+
sort_by_direction: Optional[SortByDirection1] = None,
40+
limit: Optional[int] = None,
41+
offset: Optional[int] = None,
42+
43+
):
44+
path='/v3/subusers/stats/monthly'
45+
46+
data = None
47+
request = Request(
48+
method='GET',
49+
url=path,
50+
data=data,
51+
headers=headers
52+
)
53+
response=self.client.send(request)
54+
if response is None:
55+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
56+
57+
if response.text:
58+
text = json.loads(response.text)
59+
else:
60+
text = ""
61+
if response.is_success():
62+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
63+
else:
64+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

sendgrid/rest/api/user/v3/list_email.py renamed to sendgrid/rest/api/subusers/v3/list_reputation.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
44
SENDGRID-OAI-GENERATOR
55
6-
Twilio SendGrid User API
7-
The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details).
6+
Twilio SendGrid Subusers
7+
The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information.
88
99
NOTE: This class is auto generated by OpenAPI Generator.
1010
https://openapi-generator.tech
@@ -20,26 +20,21 @@
2020
from sendgrid.http.request import Request
2121
from sendgrid.http.response import ApiResponse
2222

23-
from pydantic import Field, StrictStr
23+
from pydantic import StrictStr
2424
from typing import Optional
25-
from typing_extensions import Annotated
26-
from sendgrid.rest.api.user.v3.models.list_email200_response import ListEmail200Response
25+
from sendgrid.rest.api.subusers.v3.models.list_reputation200_response_inner import ListReputation200ResponseInner
2726

28-
class ListEmail:
27+
class ListReputation:
2928
def __init__(self, client) -> None:
3029
self.client = client
3130

3231
def send(
3332
self,
34-
on_behalf_of: Optional[str] = None,
33+
usernames: Optional[str] = None,
3534

3635
):
37-
path='/v3/user/email'
36+
path='/v3/subusers/reputations'
3837

39-
headers = values.of(
40-
{
41-
'on-behalf-of': on_behalf_of,
42-
})
4338
data = None
4439
request = Request(
4540
method='GET',
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Subusers
7+
The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information.
8+
9+
NOTE: This class is auto generated by OpenAPI Generator.
10+
https://openapi-generator.tech
11+
Do not edit the class manually.
12+
"""
13+
14+
import json
15+
import warnings
16+
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing_extensions import Annotated
18+
from sendgrid.base import values
19+
from sendgrid.exceptions import ApiException
20+
from sendgrid.http.request import Request
21+
from sendgrid.http.response import ApiResponse
22+
23+
from pydantic import Field, StrictInt, StrictStr
24+
from typing import Optional
25+
from typing_extensions import Annotated
26+
from sendgrid.rest.api.subusers.v3.models.aggregated_by import AggregatedBy
27+
from sendgrid.rest.api.subusers.v3.models.category_stats import CategoryStats
28+
29+
class ListStat:
30+
def __init__(self, client) -> None:
31+
self.client = client
32+
33+
def send(
34+
self,
35+
limit: Optional[int] = None,
36+
offset: Optional[int] = None,
37+
aggregated_by: Optional[AggregatedBy] = None,
38+
subusers: Optional[str] = None,
39+
start_date: Optional[str] = None,
40+
end_date: Optional[str] = None,
41+
42+
):
43+
path='/v3/subusers/stats'
44+
45+
data = None
46+
request = Request(
47+
method='GET',
48+
url=path,
49+
data=data,
50+
headers=headers
51+
)
52+
response=self.client.send(request)
53+
if response is None:
54+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
55+
56+
if response.text:
57+
text = json.loads(response.text)
58+
else:
59+
text = ""
60+
if response.is_success():
61+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
62+
else:
63+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

0 commit comments

Comments
 (0)