Skip to content

Commit

Permalink
[Librarian] Regenerated @ 19c4e5c7e77a6cdb0ca9da7cb52f686e93c8984d
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Oct 24, 2024
1 parent 9675699 commit ff33409
Show file tree
Hide file tree
Showing 1,246 changed files with 24,552 additions and 26,160 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Change Log
All notable changes to this project will be documented in this file.

[2024-10-24] Version 7.0.0-rc.2
-------------------------------
**Account provisioning**
- Add Account Provisioning API

**Domain authentication**
- Add Domain Authentication API


[2024-10-04] Version 7.0.0-rc.1
---------------------------
- Releasing autogenerated code for python from sendgrid open api specification.
Expand Down
2 changes: 1 addition & 1 deletion sendgrid/rest/api/account_provisioning/v3/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# TODO
# TODO
36 changes: 21 additions & 15 deletions sendgrid/rest/api/account_provisioning/v3/authenticate_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,47 @@
"""

import json
import warnings
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from sendgrid.base import values
from sendgrid.exceptions import ApiException
from sendgrid.http.request import Request
from sendgrid.http.response import ApiResponse

from pydantic import Field, StrictStr
from typing_extensions import Annotated

class AuthenticateAccount:
def __init__(self, client) -> None:
self.client = client

def send(
self,
account_id: str,
account_id: str,

):
path = "/v3/partners/accounts/{accountID}/sso"
path='/v3/partners/accounts/{accountID}/sso'
path = path.format(
account_id=account_id,
account_id=account_id,
)

data = None
request = Request(method="POST", url=path, data=data, headers=headers)
response = self.client.send(request)
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"
)
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
)
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
)
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
49 changes: 25 additions & 24 deletions sendgrid/rest/api/account_provisioning/v3/create_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,55 @@
"""

import json
from typing import Optional
import warnings
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from sendgrid.base import values
from sendgrid.exceptions import ApiException
from sendgrid.http.request import Request
from sendgrid.http.response import ApiResponse

from pydantic import Field, StrictStr
from typing import Optional
from sendgrid.rest.api.account_provisioning.v3.models.create_account_params import (
CreateAccountParams,
)

from typing_extensions import Annotated
from sendgrid.rest.api.account_provisioning.v3.models.account_provisioning_account_id import AccountProvisioningAccountId
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,
t_test_account: Optional[str] = None,
create_account_params: Optional[CreateAccountParams] = None,

):
path = "/v3/partners/accounts"
path='/v3/partners/accounts'

headers = values.of(
{
"T-Test-Account": t_test_account,
}
)
{
'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)
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"
)
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
)
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
)
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
36 changes: 21 additions & 15 deletions sendgrid/rest/api/account_provisioning/v3/delete_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,47 @@
"""

import json
import warnings
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from sendgrid.base import values
from sendgrid.exceptions import ApiException
from sendgrid.http.request import Request
from sendgrid.http.response import ApiResponse

from pydantic import Field, StrictStr
from typing_extensions import Annotated

class DeleteAccount:
def __init__(self, client) -> None:
self.client = client

def send(
self,
account_id: str,
account_id: str,

):
path = "/v3/partners/accounts/{accountID}"
path='/v3/partners/accounts/{accountID}'
path = path.format(
account_id=account_id,
account_id=account_id,
)

data = None
request = Request(method="DELETE", url=path, data=data, headers=headers)
response = self.client.send(request)
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"
)
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
)
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
)
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
37 changes: 22 additions & 15 deletions sendgrid/rest/api/account_provisioning/v3/get_account_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,48 @@
"""

import json
import warnings
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from sendgrid.base import values
from sendgrid.exceptions import ApiException
from sendgrid.http.request import Request
from sendgrid.http.response import ApiResponse

from pydantic import Field, StrictStr
from typing_extensions import Annotated
from sendgrid.rest.api.account_provisioning.v3.models.account_provisioning_state_read import AccountProvisioningStateRead

class GetAccountState:
def __init__(self, client) -> None:
self.client = client

def send(
self,
account_id: str,
account_id: str,

):
path = "/v3/partners/accounts/{accountID}/state"
path='/v3/partners/accounts/{accountID}/state'
path = path.format(
account_id=account_id,
account_id=account_id,
)

data = None
request = Request(method="GET", url=path, data=data, headers=headers)
response = self.client.send(request)
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"
)
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
)
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
)
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
39 changes: 22 additions & 17 deletions sendgrid/rest/api/account_provisioning/v3/list_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,47 @@
"""

import json
from typing import Optional
import warnings
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from sendgrid.base import values
from sendgrid.exceptions import ApiException
from sendgrid.http.request import Request
from sendgrid.http.response import ApiResponse

from pydantic import Field, StrictStr
from typing import Optional

from typing_extensions import Annotated
from sendgrid.rest.api.account_provisioning.v3.models.account_list import AccountList

class ListAccount:
def __init__(self, client) -> None:
self.client = client

def send(
self,
offset: Optional[str] = None,
limit: Optional[int] = None,
offset: Optional[str] = None,
limit: Optional[int] = None,

):
path = "/v3/partners/accounts"
path='/v3/partners/accounts'

data = None
request = Request(method="GET", url=path, data=data, headers=headers)
response = self.client.send(request)
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"
)
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
)
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
)
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
Loading

0 comments on commit ff33409

Please sign in to comment.