Skip to content

Commit 1ef2140

Browse files
committed
chore: generated code from open api spec
1 parent 058bb90 commit 1ef2140

File tree

1,095 files changed

+46110
-0
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,095 files changed

+46110
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TODO
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 Account Provisioning API
7+
The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/).
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, StrictStr
24+
from typing_extensions import Annotated
25+
26+
class AuthenticateAccount:
27+
def __init__(self, client) -> None:
28+
self.client = client
29+
30+
def send(
31+
self,
32+
account_id: str,
33+
34+
):
35+
path='/v3/partners/accounts/{accountID}/sso'
36+
path = path.format(
37+
account_id=account_id,
38+
)
39+
40+
data = None
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)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Account Provisioning API
7+
The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/).
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, StrictStr
24+
from typing import Optional
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
28+
29+
class CreateAccount:
30+
def __init__(self, client) -> None:
31+
self.client = client
32+
33+
def send(
34+
self,
35+
t_test_account: Optional[str] = None,
36+
create_account_params: Optional[CreateAccountParams] = None,
37+
38+
):
39+
path='/v3/partners/accounts'
40+
41+
headers = values.of(
42+
{
43+
'T-Test-Account': t_test_account,
44+
})
45+
headers["Content-Type"] = "application/json"
46+
data = None
47+
if create_account_params:
48+
data = create_account_params.to_dict()
49+
request = Request(
50+
method='POST',
51+
url=path,
52+
data=data,
53+
headers=headers
54+
)
55+
response=self.client.send(request)
56+
if response is None:
57+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
58+
59+
if response.text:
60+
text = json.loads(response.text)
61+
else:
62+
text = ""
63+
if response.is_success():
64+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
65+
else:
66+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
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 Account Provisioning API
7+
The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/).
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, StrictStr
24+
from typing_extensions import Annotated
25+
26+
class DeleteAccount:
27+
def __init__(self, client) -> None:
28+
self.client = client
29+
30+
def send(
31+
self,
32+
account_id: str,
33+
34+
):
35+
path='/v3/partners/accounts/{accountID}'
36+
path = path.format(
37+
account_id=account_id,
38+
)
39+
40+
data = None
41+
request = Request(
42+
method='DELETE',
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)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Account Provisioning API
7+
The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/).
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, StrictStr
24+
from typing_extensions import Annotated
25+
from sendgrid.rest.api.account_provisioning.v3.models.account_provisioning_state_read import AccountProvisioningStateRead
26+
27+
class GetAccountState:
28+
def __init__(self, client) -> None:
29+
self.client = client
30+
31+
def send(
32+
self,
33+
account_id: str,
34+
35+
):
36+
path='/v3/partners/accounts/{accountID}/state'
37+
path = path.format(
38+
account_id=account_id,
39+
)
40+
41+
data = None
42+
request = Request(
43+
method='GET',
44+
url=path,
45+
data=data,
46+
headers=headers
47+
)
48+
response=self.client.send(request)
49+
if response is None:
50+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
51+
52+
if response.text:
53+
text = json.loads(response.text)
54+
else:
55+
text = ""
56+
if response.is_success():
57+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
58+
else:
59+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
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 Account Provisioning API
7+
The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/).
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, StrictStr
24+
from typing import Optional
25+
from typing_extensions import Annotated
26+
from sendgrid.rest.api.account_provisioning.v3.models.account_list import AccountList
27+
28+
class ListAccount:
29+
def __init__(self, client) -> None:
30+
self.client = client
31+
32+
def send(
33+
self,
34+
offset: Optional[str] = None,
35+
limit: Optional[int] = None,
36+
37+
):
38+
path='/v3/partners/accounts'
39+
40+
data = None
41+
request = Request(
42+
method='GET',
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)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Account Provisioning API
7+
The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/).
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, StrictStr
24+
from typing_extensions import Annotated
25+
from sendgrid.rest.api.account_provisioning.v3.models.account_provisioning_offering_list import AccountProvisioningOfferingList
26+
27+
class ListAccountOffering:
28+
def __init__(self, client) -> None:
29+
self.client = client
30+
31+
def send(
32+
self,
33+
account_id: str,
34+
35+
):
36+
path='/v3/partners/accounts/{accountID}/offerings'
37+
path = path.format(
38+
account_id=account_id,
39+
)
40+
41+
data = None
42+
request = Request(
43+
method='GET',
44+
url=path,
45+
data=data,
46+
headers=headers
47+
)
48+
response=self.client.send(request)
49+
if response is None:
50+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
51+
52+
if response.text:
53+
text = json.loads(response.text)
54+
else:
55+
text = ""
56+
if response.is_success():
57+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
58+
else:
59+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

0 commit comments

Comments
 (0)