Skip to content

Commit 8f9c70f

Browse files
Upgrade after onfido-openapi-spec change 1f90650
1 parent f45fc00 commit 8f9c70f

File tree

11 files changed

+393
-21
lines changed

11 files changed

+393
-21
lines changed

.markdownlint.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.release.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"source": {
33
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
4-
"short_sha": "db5a1b5",
5-
"long_sha": "db5a1b59681fa467b324b4116de24d88d56d7452",
6-
"version": "v5.0.0"
4+
"short_sha": "1f90650",
5+
"long_sha": "1f906509f36a1f5056df0c74b774795f8754e4ca",
6+
"version": ""
77
},
8-
"release": "v5.0.0"
8+
"release": "v5.1.0"
99
}

onfido/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "5.0.0"
17+
__version__ = "5.1.0"
1818

1919
# import apis into sdk package
2020
from onfido.api.default_api import DefaultApi
@@ -37,6 +37,7 @@
3737
from onfido.models.addresses_list import AddressesList
3838
from onfido.models.applicant import Applicant
3939
from onfido.models.applicant_builder import ApplicantBuilder
40+
from onfido.models.applicant_consent import ApplicantConsent
4041
from onfido.models.applicant_consent_builder import ApplicantConsentBuilder
4142
from onfido.models.applicant_consent_name import ApplicantConsentName
4243
from onfido.models.applicant_create import ApplicantCreate

onfido/api/default_api.py

Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from onfido.models.addresses_list import AddressesList
2424
from onfido.models.applicant import Applicant
2525
from onfido.models.applicant_builder import ApplicantBuilder
26+
from onfido.models.applicant_consent import ApplicantConsent
2627
from onfido.models.applicant_updater import ApplicantUpdater
2728
from onfido.models.applicants_list import ApplicantsList
2829
from onfido.models.check import Check
@@ -7293,6 +7294,267 @@ def _find_applicant_serialize(
72937294

72947295

72957296

7297+
@validate_call
7298+
def find_applicant_consents(
7299+
self,
7300+
applicant_id: StrictStr,
7301+
_request_timeout: Union[
7302+
None,
7303+
Annotated[StrictFloat, Field(gt=0)],
7304+
Tuple[
7305+
Annotated[StrictFloat, Field(gt=0)],
7306+
Annotated[StrictFloat, Field(gt=0)]
7307+
]
7308+
] = None,
7309+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
7310+
_content_type: Optional[StrictStr] = None,
7311+
_headers: Optional[Dict[StrictStr, Any]] = None,
7312+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7313+
) -> List[ApplicantConsent]:
7314+
"""Retrieve Applicant Consents
7315+
7316+
Retrieves consents for single applicant.
7317+
7318+
:param applicant_id: (required)
7319+
:type applicant_id: str
7320+
:param _request_timeout: timeout setting for this request. If one
7321+
number provided, it will be total request
7322+
timeout. It can also be a pair (tuple) of
7323+
(connection, read) timeouts.
7324+
:type _request_timeout: int, tuple(int, int), optional
7325+
:param _request_auth: set to override the auth_settings for an a single
7326+
request; this effectively ignores the
7327+
authentication in the spec for a single request.
7328+
:type _request_auth: dict, optional
7329+
:param _content_type: force content-type for the request.
7330+
:type _content_type: str, Optional
7331+
:param _headers: set to override the headers for a single
7332+
request; this effectively ignores the headers
7333+
in the spec for a single request.
7334+
:type _headers: dict, optional
7335+
:param _host_index: set to override the host_index for a single
7336+
request; this effectively ignores the host_index
7337+
in the spec for a single request.
7338+
:type _host_index: int, optional
7339+
:return: Returns the result object.
7340+
""" # noqa: E501
7341+
7342+
_param = self._find_applicant_consents_serialize(
7343+
applicant_id=applicant_id,
7344+
_request_auth=_request_auth,
7345+
_content_type=_content_type,
7346+
_headers=_headers,
7347+
_host_index=_host_index
7348+
)
7349+
7350+
_response_types_map: Dict[str, Optional[str]] = {
7351+
'200': "List[ApplicantConsent]",
7352+
}
7353+
response_data = self.api_client.call_api(
7354+
*_param,
7355+
_request_timeout=_request_timeout
7356+
)
7357+
response_data.read()
7358+
return self.api_client.response_deserialize(
7359+
response_data=response_data,
7360+
response_types_map=_response_types_map,
7361+
).data
7362+
7363+
7364+
@validate_call
7365+
def find_applicant_consents_with_http_info(
7366+
self,
7367+
applicant_id: StrictStr,
7368+
_request_timeout: Union[
7369+
None,
7370+
Annotated[StrictFloat, Field(gt=0)],
7371+
Tuple[
7372+
Annotated[StrictFloat, Field(gt=0)],
7373+
Annotated[StrictFloat, Field(gt=0)]
7374+
]
7375+
] = None,
7376+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
7377+
_content_type: Optional[StrictStr] = None,
7378+
_headers: Optional[Dict[StrictStr, Any]] = None,
7379+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7380+
) -> ApiResponse[List[ApplicantConsent]]:
7381+
"""Retrieve Applicant Consents
7382+
7383+
Retrieves consents for single applicant.
7384+
7385+
:param applicant_id: (required)
7386+
:type applicant_id: str
7387+
:param _request_timeout: timeout setting for this request. If one
7388+
number provided, it will be total request
7389+
timeout. It can also be a pair (tuple) of
7390+
(connection, read) timeouts.
7391+
:type _request_timeout: int, tuple(int, int), optional
7392+
:param _request_auth: set to override the auth_settings for an a single
7393+
request; this effectively ignores the
7394+
authentication in the spec for a single request.
7395+
:type _request_auth: dict, optional
7396+
:param _content_type: force content-type for the request.
7397+
:type _content_type: str, Optional
7398+
:param _headers: set to override the headers for a single
7399+
request; this effectively ignores the headers
7400+
in the spec for a single request.
7401+
:type _headers: dict, optional
7402+
:param _host_index: set to override the host_index for a single
7403+
request; this effectively ignores the host_index
7404+
in the spec for a single request.
7405+
:type _host_index: int, optional
7406+
:return: Returns the result object.
7407+
""" # noqa: E501
7408+
7409+
_param = self._find_applicant_consents_serialize(
7410+
applicant_id=applicant_id,
7411+
_request_auth=_request_auth,
7412+
_content_type=_content_type,
7413+
_headers=_headers,
7414+
_host_index=_host_index
7415+
)
7416+
7417+
_response_types_map: Dict[str, Optional[str]] = {
7418+
'200': "List[ApplicantConsent]",
7419+
}
7420+
response_data = self.api_client.call_api(
7421+
*_param,
7422+
_request_timeout=_request_timeout
7423+
)
7424+
response_data.read()
7425+
return self.api_client.response_deserialize(
7426+
response_data=response_data,
7427+
response_types_map=_response_types_map,
7428+
)
7429+
7430+
7431+
@validate_call
7432+
def find_applicant_consents_without_preload_content(
7433+
self,
7434+
applicant_id: StrictStr,
7435+
_request_timeout: Union[
7436+
None,
7437+
Annotated[StrictFloat, Field(gt=0)],
7438+
Tuple[
7439+
Annotated[StrictFloat, Field(gt=0)],
7440+
Annotated[StrictFloat, Field(gt=0)]
7441+
]
7442+
] = None,
7443+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
7444+
_content_type: Optional[StrictStr] = None,
7445+
_headers: Optional[Dict[StrictStr, Any]] = None,
7446+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7447+
) -> RESTResponseType:
7448+
"""Retrieve Applicant Consents
7449+
7450+
Retrieves consents for single applicant.
7451+
7452+
:param applicant_id: (required)
7453+
:type applicant_id: str
7454+
:param _request_timeout: timeout setting for this request. If one
7455+
number provided, it will be total request
7456+
timeout. It can also be a pair (tuple) of
7457+
(connection, read) timeouts.
7458+
:type _request_timeout: int, tuple(int, int), optional
7459+
:param _request_auth: set to override the auth_settings for an a single
7460+
request; this effectively ignores the
7461+
authentication in the spec for a single request.
7462+
:type _request_auth: dict, optional
7463+
:param _content_type: force content-type for the request.
7464+
:type _content_type: str, Optional
7465+
:param _headers: set to override the headers for a single
7466+
request; this effectively ignores the headers
7467+
in the spec for a single request.
7468+
:type _headers: dict, optional
7469+
:param _host_index: set to override the host_index for a single
7470+
request; this effectively ignores the host_index
7471+
in the spec for a single request.
7472+
:type _host_index: int, optional
7473+
:return: Returns the result object.
7474+
""" # noqa: E501
7475+
7476+
_param = self._find_applicant_consents_serialize(
7477+
applicant_id=applicant_id,
7478+
_request_auth=_request_auth,
7479+
_content_type=_content_type,
7480+
_headers=_headers,
7481+
_host_index=_host_index
7482+
)
7483+
7484+
_response_types_map: Dict[str, Optional[str]] = {
7485+
'200': "List[ApplicantConsent]",
7486+
}
7487+
response_data = self.api_client.call_api(
7488+
*_param,
7489+
_request_timeout=_request_timeout
7490+
)
7491+
return response_data.response
7492+
7493+
7494+
def _find_applicant_consents_serialize(
7495+
self,
7496+
applicant_id,
7497+
_request_auth,
7498+
_content_type,
7499+
_headers,
7500+
_host_index,
7501+
) -> RequestSerialized:
7502+
7503+
_host = None
7504+
7505+
_collection_formats: Dict[str, str] = {
7506+
}
7507+
7508+
_path_params: Dict[str, str] = {}
7509+
_query_params: List[Tuple[str, str]] = []
7510+
_header_params: Dict[str, Optional[str]] = _headers or {}
7511+
_form_params: List[Tuple[str, str]] = []
7512+
_files: Dict[
7513+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
7514+
] = {}
7515+
_body_params: Optional[bytes] = None
7516+
7517+
# process the path parameters
7518+
if applicant_id is not None:
7519+
_path_params['applicant_id'] = applicant_id
7520+
# process the query parameters
7521+
# process the header parameters
7522+
# process the form parameters
7523+
# process the body parameter
7524+
7525+
7526+
# set the HTTP header `Accept`
7527+
if 'Accept' not in _header_params:
7528+
_header_params['Accept'] = self.api_client.select_header_accept(
7529+
[
7530+
'application/json'
7531+
]
7532+
)
7533+
7534+
7535+
# authentication setting
7536+
_auth_settings: List[str] = [
7537+
'Token'
7538+
]
7539+
7540+
return self.api_client.param_serialize(
7541+
method='GET',
7542+
resource_path='/applicants/{applicant_id}/consents',
7543+
path_params=_path_params,
7544+
query_params=_query_params,
7545+
header_params=_header_params,
7546+
body=_body_params,
7547+
post_params=_form_params,
7548+
files=_files,
7549+
auth_settings=_auth_settings,
7550+
collection_formats=_collection_formats,
7551+
_host=_host,
7552+
_request_auth=_request_auth
7553+
)
7554+
7555+
7556+
7557+
72967558
@validate_call
72977559
def find_check(
72987560
self,

onfido/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.default_headers[header_name] = header_value
9191
self.cookie = cookie
9292
# Set default User-Agent.
93-
self.user_agent = 'onfido-python/5.0.0'
93+
self.user_agent = 'onfido-python/5.1.0'
9494
self.client_side_validation = configuration.client_side_validation
9595

9696
def __enter__(self):

onfido/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def to_debug_report(self) -> str:
501501
"OS: {env}\n"\
502502
"Python Version: {pyversion}\n"\
503503
"Version of the API: v3.6\n"\
504-
"SDK Package Version: 5.0.0".\
504+
"SDK Package Version: 5.1.0".\
505505
format(env=sys.platform, pyversion=sys.version)
506506

507507
def get_host_settings(self) -> List[HostSetting]:

onfido/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from onfido.models.addresses_list import AddressesList
2121
from onfido.models.applicant import Applicant
2222
from onfido.models.applicant_builder import ApplicantBuilder
23+
from onfido.models.applicant_consent import ApplicantConsent
2324
from onfido.models.applicant_consent_builder import ApplicantConsentBuilder
2425
from onfido.models.applicant_consent_name import ApplicantConsentName
2526
from onfido.models.applicant_create import ApplicantCreate

0 commit comments

Comments
 (0)