-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Autogenerating code and RC Release preparation (#1092)
* chore: autogenerating code from open api spec and RC Release preparation
- Loading branch information
Showing
1,264 changed files
with
51,529 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Upgrade Guide | ||
|
||
_`MAJOR` version bumps will have upgrade notes posted here._ | ||
|
||
[2024-10-XX] 6.x.x to 7.x.x-rc.x | ||
-------------------------------- | ||
### Overview | ||
|
||
#### Sendgrid Python Helper Library’s version 7.0.0-rc.x is now available. | ||
|
||
Behind the scenes Python Helper is now auto-generated via OpenAPI with this release. This enables us to rapidly add new features and enhance consistency across versions and languages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# TODO |
52 changes: 52 additions & 0 deletions
52
sendgrid/rest/api/account_provisioning/v3/authenticate_account.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
""" | ||
This code was generated by | ||
SENDGRID-OAI-GENERATOR | ||
Twilio SendGrid Account Provisioning API | ||
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/). | ||
NOTE: This class is auto generated by OpenAPI Generator. | ||
https://openapi-generator.tech | ||
Do not edit the class manually. | ||
""" | ||
|
||
import json | ||
from sendgrid.exceptions import ApiException | ||
from sendgrid.http.request import Request | ||
from sendgrid.http.response import ApiResponse | ||
|
||
|
||
class AuthenticateAccount: | ||
def __init__(self, client) -> None: | ||
self.client = client | ||
|
||
def send( | ||
self, | ||
account_id: str, | ||
): | ||
path = "/v3/partners/accounts/{accountID}/sso" | ||
path = path.format( | ||
account_id=account_id, | ||
) | ||
|
||
data = None | ||
request = Request(method="POST", url=path, data=data, headers=headers) | ||
response = self.client.send(request) | ||
if response is None: | ||
raise ApiException( | ||
error="CreateAlert creation failed: Unable to connect to server" | ||
) | ||
|
||
if response.text: | ||
text = json.loads(response.text) | ||
else: | ||
text = "" | ||
if response.is_success(): | ||
return ApiResponse( | ||
status_code=response.status_code, model=text, headers=response.headers | ||
) | ||
else: | ||
raise ApiException( | ||
status_code=response.status_code, error=text, headers=response.headers | ||
) |
65 changes: 65 additions & 0 deletions
65
sendgrid/rest/api/account_provisioning/v3/create_account.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
""" | ||
This code was generated by | ||
SENDGRID-OAI-GENERATOR | ||
Twilio SendGrid Account Provisioning API | ||
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/). | ||
NOTE: This class is auto generated by OpenAPI Generator. | ||
https://openapi-generator.tech | ||
Do not edit the class manually. | ||
""" | ||
|
||
import json | ||
from typing import Optional | ||
from sendgrid.base import values | ||
from sendgrid.exceptions import ApiException | ||
from sendgrid.http.request import Request | ||
from sendgrid.http.response import ApiResponse | ||
|
||
from typing import Optional | ||
from sendgrid.rest.api.account_provisioning.v3.models.create_account_params import ( | ||
CreateAccountParams, | ||
) | ||
|
||
|
||
class CreateAccount: | ||
def __init__(self, client) -> None: | ||
self.client = client | ||
|
||
def send( | ||
self, | ||
t_test_account: Optional[str] = None, | ||
create_account_params: Optional[CreateAccountParams] = None, | ||
): | ||
path = "/v3/partners/accounts" | ||
|
||
headers = values.of( | ||
{ | ||
"T-Test-Account": t_test_account, | ||
} | ||
) | ||
headers["Content-Type"] = "application/json" | ||
data = None | ||
if create_account_params: | ||
data = create_account_params.to_dict() | ||
request = Request(method="POST", url=path, data=data, headers=headers) | ||
response = self.client.send(request) | ||
if response is None: | ||
raise ApiException( | ||
error="CreateAlert creation failed: Unable to connect to server" | ||
) | ||
|
||
if response.text: | ||
text = json.loads(response.text) | ||
else: | ||
text = "" | ||
if response.is_success(): | ||
return ApiResponse( | ||
status_code=response.status_code, model=text, headers=response.headers | ||
) | ||
else: | ||
raise ApiException( | ||
status_code=response.status_code, error=text, headers=response.headers | ||
) |
52 changes: 52 additions & 0 deletions
52
sendgrid/rest/api/account_provisioning/v3/delete_account.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
""" | ||
This code was generated by | ||
SENDGRID-OAI-GENERATOR | ||
Twilio SendGrid Account Provisioning API | ||
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/). | ||
NOTE: This class is auto generated by OpenAPI Generator. | ||
https://openapi-generator.tech | ||
Do not edit the class manually. | ||
""" | ||
|
||
import json | ||
from sendgrid.exceptions import ApiException | ||
from sendgrid.http.request import Request | ||
from sendgrid.http.response import ApiResponse | ||
|
||
|
||
class DeleteAccount: | ||
def __init__(self, client) -> None: | ||
self.client = client | ||
|
||
def send( | ||
self, | ||
account_id: str, | ||
): | ||
path = "/v3/partners/accounts/{accountID}" | ||
path = path.format( | ||
account_id=account_id, | ||
) | ||
|
||
data = None | ||
request = Request(method="DELETE", url=path, data=data, headers=headers) | ||
response = self.client.send(request) | ||
if response is None: | ||
raise ApiException( | ||
error="CreateAlert creation failed: Unable to connect to server" | ||
) | ||
|
||
if response.text: | ||
text = json.loads(response.text) | ||
else: | ||
text = "" | ||
if response.is_success(): | ||
return ApiResponse( | ||
status_code=response.status_code, model=text, headers=response.headers | ||
) | ||
else: | ||
raise ApiException( | ||
status_code=response.status_code, error=text, headers=response.headers | ||
) |
52 changes: 52 additions & 0 deletions
52
sendgrid/rest/api/account_provisioning/v3/get_account_state.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
""" | ||
This code was generated by | ||
SENDGRID-OAI-GENERATOR | ||
Twilio SendGrid Account Provisioning API | ||
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/). | ||
NOTE: This class is auto generated by OpenAPI Generator. | ||
https://openapi-generator.tech | ||
Do not edit the class manually. | ||
""" | ||
|
||
import json | ||
from sendgrid.exceptions import ApiException | ||
from sendgrid.http.request import Request | ||
from sendgrid.http.response import ApiResponse | ||
|
||
|
||
class GetAccountState: | ||
def __init__(self, client) -> None: | ||
self.client = client | ||
|
||
def send( | ||
self, | ||
account_id: str, | ||
): | ||
path = "/v3/partners/accounts/{accountID}/state" | ||
path = path.format( | ||
account_id=account_id, | ||
) | ||
|
||
data = None | ||
request = Request(method="GET", url=path, data=data, headers=headers) | ||
response = self.client.send(request) | ||
if response is None: | ||
raise ApiException( | ||
error="CreateAlert creation failed: Unable to connect to server" | ||
) | ||
|
||
if response.text: | ||
text = json.loads(response.text) | ||
else: | ||
text = "" | ||
if response.is_success(): | ||
return ApiResponse( | ||
status_code=response.status_code, model=text, headers=response.headers | ||
) | ||
else: | ||
raise ApiException( | ||
status_code=response.status_code, error=text, headers=response.headers | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
""" | ||
This code was generated by | ||
SENDGRID-OAI-GENERATOR | ||
Twilio SendGrid Account Provisioning API | ||
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/). | ||
NOTE: This class is auto generated by OpenAPI Generator. | ||
https://openapi-generator.tech | ||
Do not edit the class manually. | ||
""" | ||
|
||
import json | ||
from typing import Optional | ||
from sendgrid.exceptions import ApiException | ||
from sendgrid.http.request import Request | ||
from sendgrid.http.response import ApiResponse | ||
|
||
from typing import Optional | ||
|
||
|
||
class ListAccount: | ||
def __init__(self, client) -> None: | ||
self.client = client | ||
|
||
def send( | ||
self, | ||
offset: Optional[str] = None, | ||
limit: Optional[int] = None, | ||
): | ||
path = "/v3/partners/accounts" | ||
|
||
data = None | ||
request = Request(method="GET", url=path, data=data, headers=headers) | ||
response = self.client.send(request) | ||
if response is None: | ||
raise ApiException( | ||
error="CreateAlert creation failed: Unable to connect to server" | ||
) | ||
|
||
if response.text: | ||
text = json.loads(response.text) | ||
else: | ||
text = "" | ||
if response.is_success(): | ||
return ApiResponse( | ||
status_code=response.status_code, model=text, headers=response.headers | ||
) | ||
else: | ||
raise ApiException( | ||
status_code=response.status_code, error=text, headers=response.headers | ||
) |
52 changes: 52 additions & 0 deletions
52
sendgrid/rest/api/account_provisioning/v3/list_account_offering.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
""" | ||
This code was generated by | ||
SENDGRID-OAI-GENERATOR | ||
Twilio SendGrid Account Provisioning API | ||
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/). | ||
NOTE: This class is auto generated by OpenAPI Generator. | ||
https://openapi-generator.tech | ||
Do not edit the class manually. | ||
""" | ||
|
||
import json | ||
from sendgrid.exceptions import ApiException | ||
from sendgrid.http.request import Request | ||
from sendgrid.http.response import ApiResponse | ||
|
||
|
||
class ListAccountOffering: | ||
def __init__(self, client) -> None: | ||
self.client = client | ||
|
||
def send( | ||
self, | ||
account_id: str, | ||
): | ||
path = "/v3/partners/accounts/{accountID}/offerings" | ||
path = path.format( | ||
account_id=account_id, | ||
) | ||
|
||
data = None | ||
request = Request(method="GET", url=path, data=data, headers=headers) | ||
response = self.client.send(request) | ||
if response is None: | ||
raise ApiException( | ||
error="CreateAlert creation failed: Unable to connect to server" | ||
) | ||
|
||
if response.text: | ||
text = json.loads(response.text) | ||
else: | ||
text = "" | ||
if response.is_success(): | ||
return ApiResponse( | ||
status_code=response.status_code, model=text, headers=response.headers | ||
) | ||
else: | ||
raise ApiException( | ||
status_code=response.status_code, error=text, headers=response.headers | ||
) |
Oops, something went wrong.