Skip to content
This repository was archived by the owner on Nov 16, 2021. It is now read-only.

Commit 5785e99

Browse files
author
Engineering at Onfido
committed
New client release: 4.0.0
1 parent b83be92 commit 5785e99

File tree

9 files changed

+46
-11
lines changed

9 files changed

+46
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Onfido API is used to submit check requests.
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 2.0.0
7-
- Package version: 3.1.0
7+
- Package version: 4.0.0
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.

docs/DefaultApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ Name | Type | Description | Notes
15881588
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
15891589

15901590
# **upload_document**
1591-
> Document upload_document(applicant_id, type, file, side=side)
1591+
> Document upload_document(applicant_id, type, file, side=side, issuing_country=issuing_country)
15921592
15931593
Upload a document
15941594

@@ -1613,10 +1613,11 @@ applicant_id = 'applicant_id_example' # str |
16131613
type = 'type_example' # str | The type of document.
16141614
file = '/path/to/file' # file | The file to be uploaded.
16151615
side = 'side_example' # str | Either the `front` or `back` of the document. (optional)
1616+
issuing_country = 'issuing_country_example' # str | The issuing country of the document, a 3-letter ISO code. (optional)
16161617

16171618
try:
16181619
# Upload a document
1619-
api_response = api_instance.upload_document(applicant_id, type, file, side=side)
1620+
api_response = api_instance.upload_document(applicant_id, type, file, side=side, issuing_country=issuing_country)
16201621
pprint(api_response)
16211622
except ApiException as e:
16221623
print("Exception when calling DefaultApi->upload_document: %s\n" % e)
@@ -1630,6 +1631,7 @@ Name | Type | Description | Notes
16301631
**type** | **str**| The type of document. |
16311632
**file** | **file**| The file to be uploaded. |
16321633
**side** | **str**| Either the `front` or `back` of the document. | [optional]
1634+
**issuing_country** | **str**| The issuing country of the document, a 3-letter ISO code. | [optional]
16331635

16341636
### Return type
16351637

docs/Document.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**file_type** | **str** | The file type of the uploaded file | [optional]
1111
**type** | **str** | The type of document | [optional]
1212
**side** | **str** | The side of the document, if applicable. The possible values are front and back | [optional]
13+
**issuing_country** | **str** | The issuing country of the document, a 3-letter ISO code. | [optional]
1314
**href** | **str** | The uri of this resource | [optional]
1415
**download_href** | **str** | The uri that can be used to download the document | [optional]
1516

onfido/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "3.1.0"
17+
__version__ = "4.0.0"
1818

1919
# import apis into sdk package
2020
from onfido.api.default_api import DefaultApi

onfido/api/default_api.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2954,6 +2954,7 @@ def upload_document(self, applicant_id, type, file, **kwargs): # noqa: E501
29542954
:param str type: The type of document. (required)
29552955
:param file file: The file to be uploaded. (required)
29562956
:param str side: Either the `front` or `back` of the document.
2957+
:param str issuing_country: The issuing country of the document, a 3-letter ISO code.
29572958
:return: Document
29582959
If the method is called asynchronously,
29592960
returns the request thread.
@@ -2979,14 +2980,15 @@ def upload_document_with_http_info(self, applicant_id, type, file, **kwargs): #
29792980
:param str type: The type of document. (required)
29802981
:param file file: The file to be uploaded. (required)
29812982
:param str side: Either the `front` or `back` of the document.
2983+
:param str issuing_country: The issuing country of the document, a 3-letter ISO code.
29822984
:return: Document
29832985
If the method is called asynchronously,
29842986
returns the request thread.
29852987
"""
29862988

29872989
local_var_params = locals()
29882990

2989-
all_params = ['applicant_id', 'type', 'file', 'side'] # noqa: E501
2991+
all_params = ['applicant_id', 'type', 'file', 'side', 'issuing_country'] # noqa: E501
29902992
all_params.append('async_req')
29912993
all_params.append('_return_http_data_only')
29922994
all_params.append('_preload_content')
@@ -3027,10 +3029,12 @@ def upload_document_with_http_info(self, applicant_id, type, file, **kwargs): #
30273029
local_var_files = {}
30283030
if 'type' in local_var_params:
30293031
form_params.append(('type', local_var_params['type'])) # noqa: E501
3030-
if 'side' in local_var_params:
3031-
form_params.append(('side', local_var_params['side'])) # noqa: E501
30323032
if 'file' in local_var_params:
30333033
local_var_files['file'] = local_var_params['file'] # noqa: E501
3034+
if 'side' in local_var_params:
3035+
form_params.append(('side', local_var_params['side'])) # noqa: E501
3036+
if 'issuing_country' in local_var_params:
3037+
form_params.append(('issuing_country', local_var_params['issuing_country'])) # noqa: E501
30343038

30353039
body_params = None
30363040
# HTTP header `Accept`

onfido/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7575
self.default_headers[header_name] = header_value
7676
self.cookie = cookie
7777
# Set default User-Agent.
78-
self.user_agent = 'OpenAPI-Generator/3.1.0/python'
78+
self.user_agent = 'OpenAPI-Generator/4.0.0/python'
7979

8080
def __del__(self):
8181
if self._pool:

onfido/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def to_debug_report(self):
229229
"OS: {env}\n"\
230230
"Python Version: {pyversion}\n"\
231231
"Version of the API: 2.0.0\n"\
232-
"SDK Package Version: 3.1.0".\
232+
"SDK Package Version: 4.0.0".\
233233
format(env=sys.platform, pyversion=sys.version)
234234

235235
def get_host_settings(self):

onfido/models/document.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class Document(object):
3838
'file_type': 'str',
3939
'type': 'str',
4040
'side': 'str',
41+
'issuing_country': 'str',
4142
'href': 'str',
4243
'download_href': 'str'
4344
}
@@ -50,11 +51,12 @@ class Document(object):
5051
'file_type': 'file_type',
5152
'type': 'type',
5253
'side': 'side',
54+
'issuing_country': 'issuing_country',
5355
'href': 'href',
5456
'download_href': 'download_href'
5557
}
5658

57-
def __init__(self, id=None, created_at=None, file_name=None, file_size=None, file_type=None, type=None, side=None, href=None, download_href=None): # noqa: E501
59+
def __init__(self, id=None, created_at=None, file_name=None, file_size=None, file_type=None, type=None, side=None, issuing_country=None, href=None, download_href=None): # noqa: E501
5860
"""Document - a model defined in OpenAPI""" # noqa: E501
5961

6062
self._id = None
@@ -64,6 +66,7 @@ def __init__(self, id=None, created_at=None, file_name=None, file_size=None, fil
6466
self._file_type = None
6567
self._type = None
6668
self._side = None
69+
self._issuing_country = None
6770
self._href = None
6871
self._download_href = None
6972
self.discriminator = None
@@ -82,6 +85,8 @@ def __init__(self, id=None, created_at=None, file_name=None, file_size=None, fil
8285
self.type = type
8386
if side is not None:
8487
self.side = side
88+
if issuing_country is not None:
89+
self.issuing_country = issuing_country
8590
if href is not None:
8691
self.href = href
8792
if download_href is not None:
@@ -248,6 +253,29 @@ def side(self, side):
248253

249254
self._side = side
250255

256+
@property
257+
def issuing_country(self):
258+
"""Gets the issuing_country of this Document. # noqa: E501
259+
260+
The issuing country of the document, a 3-letter ISO code. # noqa: E501
261+
262+
:return: The issuing_country of this Document. # noqa: E501
263+
:rtype: str
264+
"""
265+
return self._issuing_country
266+
267+
@issuing_country.setter
268+
def issuing_country(self, issuing_country):
269+
"""Sets the issuing_country of this Document.
270+
271+
The issuing country of the document, a 3-letter ISO code. # noqa: E501
272+
273+
:param issuing_country: The issuing_country of this Document. # noqa: E501
274+
:type: str
275+
"""
276+
277+
self._issuing_country = issuing_country
278+
251279
@property
252280
def href(self):
253281
"""Gets the href of this Document. # noqa: E501

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from setuptools import setup, find_packages # noqa: H301
1414

1515
NAME = "onfido"
16-
VERSION = "3.1.0"
16+
VERSION = "4.0.0"
1717
# To install the library, run the following
1818
#
1919
# python setup.py install

0 commit comments

Comments
 (0)