Skip to content

Commit ff33409

Browse files
committed
[Librarian] Regenerated @ 19c4e5c7e77a6cdb0ca9da7cb52f686e93c8984d
1 parent 9675699 commit ff33409

File tree

1,246 files changed

+24552
-26160
lines changed

Some content is hidden

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

1,246 files changed

+24552
-26160
lines changed

CHANGELOG.md

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

4+
[2024-10-24] Version 7.0.0-rc.2
5+
-------------------------------
6+
**Account provisioning**
7+
- Add Account Provisioning API
8+
9+
**Domain authentication**
10+
- Add Domain Authentication API
11+
12+
413
[2024-10-04] Version 7.0.0-rc.1
514
---------------------------
615
- Releasing autogenerated code for python from sendgrid open api specification.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# TODO
1+
# TODO

sendgrid/rest/api/account_provisioning/v3/authenticate_account.py

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,47 @@
1212
"""
1313

1414
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
1519
from sendgrid.exceptions import ApiException
1620
from sendgrid.http.request import Request
1721
from sendgrid.http.response import ApiResponse
1822

23+
from pydantic import Field, StrictStr
24+
from typing_extensions import Annotated
1925

2026
class AuthenticateAccount:
2127
def __init__(self, client) -> None:
2228
self.client = client
23-
29+
2430
def send(
2531
self,
26-
account_id: str,
32+
account_id: str,
33+
2734
):
28-
path = "/v3/partners/accounts/{accountID}/sso"
35+
path='/v3/partners/accounts/{accountID}/sso'
2936
path = path.format(
30-
account_id=account_id,
37+
account_id=account_id,
3138
)
3239

3340
data = None
34-
request = Request(method="POST", url=path, data=data, headers=headers)
35-
response = self.client.send(request)
41+
request = Request(
42+
method='POST',
43+
url=path,
44+
data=data,
45+
headers=headers
46+
)
47+
response=self.client.send(request)
3648
if response is None:
37-
raise ApiException(
38-
error="CreateAlert creation failed: Unable to connect to server"
39-
)
49+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
4050

4151
if response.text:
4252
text = json.loads(response.text)
4353
else:
4454
text = ""
4555
if response.is_success():
46-
return ApiResponse(
47-
status_code=response.status_code, model=text, headers=response.headers
48-
)
56+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
4957
else:
50-
raise ApiException(
51-
status_code=response.status_code, error=text, headers=response.headers
52-
)
58+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

sendgrid/rest/api/account_provisioning/v3/create_account.py

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,54 +12,55 @@
1212
"""
1313

1414
import json
15-
from typing import Optional
15+
import warnings
16+
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing_extensions import Annotated
1618
from sendgrid.base import values
1719
from sendgrid.exceptions import ApiException
1820
from sendgrid.http.request import Request
1921
from sendgrid.http.response import ApiResponse
2022

23+
from pydantic import Field, StrictStr
2124
from typing import Optional
22-
from sendgrid.rest.api.account_provisioning.v3.models.create_account_params import (
23-
CreateAccountParams,
24-
)
25-
25+
from typing_extensions import Annotated
26+
from sendgrid.rest.api.account_provisioning.v3.models.account_provisioning_account_id import AccountProvisioningAccountId
27+
from sendgrid.rest.api.account_provisioning.v3.models.create_account_params import CreateAccountParams
2628

2729
class CreateAccount:
2830
def __init__(self, client) -> None:
2931
self.client = client
30-
32+
3133
def send(
3234
self,
33-
t_test_account: Optional[str] = None,
34-
create_account_params: Optional[CreateAccountParams] = None,
35+
t_test_account: Optional[str] = None,
36+
create_account_params: Optional[CreateAccountParams] = None,
37+
3538
):
36-
path = "/v3/partners/accounts"
39+
path='/v3/partners/accounts'
3740

3841
headers = values.of(
39-
{
40-
"T-Test-Account": t_test_account,
41-
}
42-
)
42+
{
43+
'T-Test-Account': t_test_account,
44+
})
4345
headers["Content-Type"] = "application/json"
4446
data = None
4547
if create_account_params:
4648
data = create_account_params.to_dict()
47-
request = Request(method="POST", url=path, data=data, headers=headers)
48-
response = self.client.send(request)
49+
request = Request(
50+
method='POST',
51+
url=path,
52+
data=data,
53+
headers=headers
54+
)
55+
response=self.client.send(request)
4956
if response is None:
50-
raise ApiException(
51-
error="CreateAlert creation failed: Unable to connect to server"
52-
)
57+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
5358

5459
if response.text:
5560
text = json.loads(response.text)
5661
else:
5762
text = ""
5863
if response.is_success():
59-
return ApiResponse(
60-
status_code=response.status_code, model=text, headers=response.headers
61-
)
64+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
6265
else:
63-
raise ApiException(
64-
status_code=response.status_code, error=text, headers=response.headers
65-
)
66+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

sendgrid/rest/api/account_provisioning/v3/delete_account.py

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,47 @@
1212
"""
1313

1414
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
1519
from sendgrid.exceptions import ApiException
1620
from sendgrid.http.request import Request
1721
from sendgrid.http.response import ApiResponse
1822

23+
from pydantic import Field, StrictStr
24+
from typing_extensions import Annotated
1925

2026
class DeleteAccount:
2127
def __init__(self, client) -> None:
2228
self.client = client
23-
29+
2430
def send(
2531
self,
26-
account_id: str,
32+
account_id: str,
33+
2734
):
28-
path = "/v3/partners/accounts/{accountID}"
35+
path='/v3/partners/accounts/{accountID}'
2936
path = path.format(
30-
account_id=account_id,
37+
account_id=account_id,
3138
)
3239

3340
data = None
34-
request = Request(method="DELETE", url=path, data=data, headers=headers)
35-
response = self.client.send(request)
41+
request = Request(
42+
method='DELETE',
43+
url=path,
44+
data=data,
45+
headers=headers
46+
)
47+
response=self.client.send(request)
3648
if response is None:
37-
raise ApiException(
38-
error="CreateAlert creation failed: Unable to connect to server"
39-
)
49+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
4050

4151
if response.text:
4252
text = json.loads(response.text)
4353
else:
4454
text = ""
4555
if response.is_success():
46-
return ApiResponse(
47-
status_code=response.status_code, model=text, headers=response.headers
48-
)
56+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
4957
else:
50-
raise ApiException(
51-
status_code=response.status_code, error=text, headers=response.headers
52-
)
58+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

sendgrid/rest/api/account_provisioning/v3/get_account_state.py

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,48 @@
1212
"""
1313

1414
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
1519
from sendgrid.exceptions import ApiException
1620
from sendgrid.http.request import Request
1721
from sendgrid.http.response import ApiResponse
1822

23+
from pydantic import Field, StrictStr
24+
from typing_extensions import Annotated
25+
from sendgrid.rest.api.account_provisioning.v3.models.account_provisioning_state_read import AccountProvisioningStateRead
1926

2027
class GetAccountState:
2128
def __init__(self, client) -> None:
2229
self.client = client
23-
30+
2431
def send(
2532
self,
26-
account_id: str,
33+
account_id: str,
34+
2735
):
28-
path = "/v3/partners/accounts/{accountID}/state"
36+
path='/v3/partners/accounts/{accountID}/state'
2937
path = path.format(
30-
account_id=account_id,
38+
account_id=account_id,
3139
)
3240

3341
data = None
34-
request = Request(method="GET", url=path, data=data, headers=headers)
35-
response = self.client.send(request)
42+
request = Request(
43+
method='GET',
44+
url=path,
45+
data=data,
46+
headers=headers
47+
)
48+
response=self.client.send(request)
3649
if response is None:
37-
raise ApiException(
38-
error="CreateAlert creation failed: Unable to connect to server"
39-
)
50+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
4051

4152
if response.text:
4253
text = json.loads(response.text)
4354
else:
4455
text = ""
4556
if response.is_success():
46-
return ApiResponse(
47-
status_code=response.status_code, model=text, headers=response.headers
48-
)
57+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
4958
else:
50-
raise ApiException(
51-
status_code=response.status_code, error=text, headers=response.headers
52-
)
59+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

sendgrid/rest/api/account_provisioning/v3/list_account.py

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,47 @@
1212
"""
1313

1414
import json
15-
from typing import Optional
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
1619
from sendgrid.exceptions import ApiException
1720
from sendgrid.http.request import Request
1821
from sendgrid.http.response import ApiResponse
1922

23+
from pydantic import Field, StrictStr
2024
from typing import Optional
21-
25+
from typing_extensions import Annotated
26+
from sendgrid.rest.api.account_provisioning.v3.models.account_list import AccountList
2227

2328
class ListAccount:
2429
def __init__(self, client) -> None:
2530
self.client = client
26-
31+
2732
def send(
2833
self,
29-
offset: Optional[str] = None,
30-
limit: Optional[int] = None,
34+
offset: Optional[str] = None,
35+
limit: Optional[int] = None,
36+
3137
):
32-
path = "/v3/partners/accounts"
38+
path='/v3/partners/accounts'
3339

3440
data = None
35-
request = Request(method="GET", url=path, data=data, headers=headers)
36-
response = self.client.send(request)
41+
request = Request(
42+
method='GET',
43+
url=path,
44+
data=data,
45+
headers=headers
46+
)
47+
response=self.client.send(request)
3748
if response is None:
38-
raise ApiException(
39-
error="CreateAlert creation failed: Unable to connect to server"
40-
)
49+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
4150

4251
if response.text:
4352
text = json.loads(response.text)
4453
else:
4554
text = ""
4655
if response.is_success():
47-
return ApiResponse(
48-
status_code=response.status_code, model=text, headers=response.headers
49-
)
56+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
5057
else:
51-
raise ApiException(
52-
status_code=response.status_code, error=text, headers=response.headers
53-
)
58+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

0 commit comments

Comments
 (0)