Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .markdownlint.json

This file was deleted.

8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"source": {
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
"short_sha": "db5a1b5",
"long_sha": "db5a1b59681fa467b324b4116de24d88d56d7452",
"version": "v5.0.0"
"short_sha": "1f90650",
"long_sha": "1f906509f36a1f5056df0c74b774795f8754e4ca",
"version": ""
},
"release": "v5.0.0"
"release": "v5.1.0"
}
3 changes: 2 additions & 1 deletion onfido/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
""" # noqa: E501


__version__ = "5.0.0"
__version__ = "5.1.0"

# import apis into sdk package
from onfido.api.default_api import DefaultApi
Expand All @@ -37,6 +37,7 @@
from onfido.models.addresses_list import AddressesList
from onfido.models.applicant import Applicant
from onfido.models.applicant_builder import ApplicantBuilder
from onfido.models.applicant_consent import ApplicantConsent
from onfido.models.applicant_consent_builder import ApplicantConsentBuilder
from onfido.models.applicant_consent_name import ApplicantConsentName
from onfido.models.applicant_create import ApplicantCreate
Expand Down
262 changes: 262 additions & 0 deletions onfido/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from onfido.models.addresses_list import AddressesList
from onfido.models.applicant import Applicant
from onfido.models.applicant_builder import ApplicantBuilder
from onfido.models.applicant_consent import ApplicantConsent
from onfido.models.applicant_updater import ApplicantUpdater
from onfido.models.applicants_list import ApplicantsList
from onfido.models.check import Check
Expand Down Expand Up @@ -7293,6 +7294,267 @@ def _find_applicant_serialize(



@validate_call
def find_applicant_consents(
self,
applicant_id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[ApplicantConsent]:
"""Retrieve Applicant Consents

Retrieves consents for single applicant.

:param applicant_id: (required)
:type applicant_id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._find_applicant_consents_serialize(
applicant_id=applicant_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)

_response_types_map: Dict[str, Optional[str]] = {
'200': "List[ApplicantConsent]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data


@validate_call
def find_applicant_consents_with_http_info(
self,
applicant_id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[ApplicantConsent]]:
"""Retrieve Applicant Consents

Retrieves consents for single applicant.

:param applicant_id: (required)
:type applicant_id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._find_applicant_consents_serialize(
applicant_id=applicant_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)

_response_types_map: Dict[str, Optional[str]] = {
'200': "List[ApplicantConsent]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)


@validate_call
def find_applicant_consents_without_preload_content(
self,
applicant_id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Retrieve Applicant Consents

Retrieves consents for single applicant.

:param applicant_id: (required)
:type applicant_id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._find_applicant_consents_serialize(
applicant_id=applicant_id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)

_response_types_map: Dict[str, Optional[str]] = {
'200': "List[ApplicantConsent]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response


def _find_applicant_consents_serialize(
self,
applicant_id,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:

_host = None

_collection_formats: Dict[str, str] = {
}

_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None

# process the path parameters
if applicant_id is not None:
_path_params['applicant_id'] = applicant_id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter


# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)


# authentication setting
_auth_settings: List[str] = [
'Token'
]

return self.api_client.param_serialize(
method='GET',
resource_path='/applicants/{applicant_id}/consents',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)




@validate_call
def find_check(
self,
Expand Down
2 changes: 1 addition & 1 deletion onfido/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'onfido-python/5.0.0'
self.user_agent = 'onfido-python/5.1.0'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion onfido/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def to_debug_report(self) -> str:
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v3.6\n"\
"SDK Package Version: 5.0.0".\
"SDK Package Version: 5.1.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
1 change: 1 addition & 0 deletions onfido/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from onfido.models.addresses_list import AddressesList
from onfido.models.applicant import Applicant
from onfido.models.applicant_builder import ApplicantBuilder
from onfido.models.applicant_consent import ApplicantConsent
from onfido.models.applicant_consent_builder import ApplicantConsentBuilder
from onfido.models.applicant_consent_name import ApplicantConsentName
from onfido.models.applicant_create import ApplicantCreate
Expand Down
Loading