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

Commit 5f3ad57

Browse files
author
Engineering at Onfido
committed
New client release: 1.3.0
1 parent 8c3e676 commit 5f3ad57

File tree

6 files changed

+43
-16
lines changed

6 files changed

+43
-16
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ The Onfido API is used to submit check requests.
44
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
55

66
- API version: 2.0.0
7-
- Package version: 1.2.0
8-
- Build date: 2018-04-16T08:37:44.590Z
7+
- Package version: 1.3.0
8+
- Build date: 2018-06-18T15:35:27.640Z
99
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
1010

1111
## Requirements.
@@ -24,7 +24,7 @@ pip install git+https://github.com/onfido/api-python-client.git
2424

2525
Then import the package:
2626
```python
27-
import onfido
27+
import onfido
2828
```
2929

3030
### Setuptools
@@ -72,7 +72,7 @@ address.town = 'London'
7272
address.postcode = 'SW4 6EH'
7373
address.country = 'GBR'
7474

75-
applicant.addresses = [address];
75+
applicant.addresses = [address]
7676

7777
# setting check request details
7878
check = onfido.CheckCreationRequest()
@@ -81,9 +81,9 @@ check.type = 'express'
8181
report = onfido.Report()
8282
report.name = 'identity'
8383

84-
check.reports = [report];
84+
check.reports = [report]
8585

86-
try:
86+
try:
8787
# Create Applicant
8888
api_response = api_instance.create_applicant(data=applicant)
8989
applicant_id = api_response.id
@@ -153,3 +153,4 @@ Class | Method | HTTP request | Description
153153
- [ReportsList](docs/ReportsList.md)
154154
- [Webhook](docs/Webhook.md)
155155
- [WebhooksList](docs/WebhooksList.md)
156+

docs/DefaultApi.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ Name | Type | Description | Notes
631631
[**Webhook**](Webhook.md)
632632

633633
# **list_applicants**
634-
> ApplicantsList list_applicants()
634+
> ApplicantsList list_applicants(page=page, per_page=per_page)
635635
636636
List Applicants
637637

@@ -649,24 +649,30 @@ onfido.configuration.api_key_prefix['Authorization'] = 'Token'
649649

650650
# create an instance of the API class
651651
api_instance = onfido.DefaultApi()
652+
page = 'page_example' # str | The page to return. Defaults to the first page if omitted. The first page is `page=1` (optional)
653+
per_page = 'per_page_example' # str | The number of objects per page. Defaults to 20 if omitted. (optional)
652654

653655
try:
654656
# List Applicants
655-
api_response = api_instance.list_applicants()
657+
api_response = api_instance.list_applicants(page=page, per_page=per_page)
656658
pprint(api_response)
657659
except ApiException as e:
658660
pprint(e.body)
659661
```
660662

661663
### Parameters
662-
This endpoint does not need any parameter.
664+
665+
Name | Type | Description | Notes
666+
------------- | ------------- | ------------- | -------------
667+
**page** | **str**| The page to return. Defaults to the first page if omitted. The first page is `page=1` | [optional]
668+
**per_page** | **str**| The number of objects per page. Defaults to 20 if omitted. | [optional]
663669

664670
### Return type
665671

666672
[**ApplicantsList**](ApplicantsList.md)
667673

668674
# **list_checks**
669-
> ChecksList list_checks(applicant_id)
675+
> ChecksList list_checks(applicant_id, page=page, per_page=per_page)
670676
671677
Retrieve Checks
672678

@@ -685,10 +691,12 @@ onfido.configuration.api_key_prefix['Authorization'] = 'Token'
685691
# create an instance of the API class
686692
api_instance = onfido.DefaultApi()
687693
applicant_id = 'applicant_id_example' # str |
694+
page = 'page_example' # str | The page to return. Defaults to the first page if omitted. The first page is `page=1` (optional)
695+
per_page = 'per_page_example' # str | The number of objects per page. Defaults to 20 if omitted. (optional)
688696

689697
try:
690698
# Retrieve Checks
691-
api_response = api_instance.list_checks(applicant_id)
699+
api_response = api_instance.list_checks(applicant_id, page=page, per_page=per_page)
692700
pprint(api_response)
693701
except ApiException as e:
694702
pprint(e.body)
@@ -699,6 +707,8 @@ except ApiException as e:
699707
Name | Type | Description | Notes
700708
------------- | ------------- | ------------- | -------------
701709
**applicant_id** | **str**| |
710+
**page** | **str**| The page to return. Defaults to the first page if omitted. The first page is `page=1` | [optional]
711+
**per_page** | **str**| The number of objects per page. Defaults to 20 if omitted. | [optional]
702712

703713
### Return type
704714

onfido/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(self, host=None, header_name=None, header_value=None, cookie=None):
7373
self.host = host
7474
self.cookie = cookie
7575
# Set default User-Agent.
76-
self.user_agent = 'Swagger-Codegen/1.2.0/python'
76+
self.user_agent = 'Swagger-Codegen/1.3.0/python'
7777

7878
@property
7979
def user_agent(self):

onfido/apis/default_api.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,8 @@ def list_applicants(self, **kwargs):
17491749
17501750
:param callback function: The callback function
17511751
for asynchronous request. (optional)
1752+
:param str page: The page to return. Defaults to the first page if omitted. The first page is `page=1`
1753+
:param str per_page: The number of objects per page. Defaults to 20 if omitted.
17521754
:return: ApplicantsList
17531755
If the method is called asynchronously,
17541756
returns the request thread.
@@ -1775,12 +1777,14 @@ def list_applicants_with_http_info(self, **kwargs):
17751777
17761778
:param callback function: The callback function
17771779
for asynchronous request. (optional)
1780+
:param str page: The page to return. Defaults to the first page if omitted. The first page is `page=1`
1781+
:param str per_page: The number of objects per page. Defaults to 20 if omitted.
17781782
:return: ApplicantsList
17791783
If the method is called asynchronously,
17801784
returns the request thread.
17811785
"""
17821786

1783-
all_params = []
1787+
all_params = ['page', 'per_page']
17841788
all_params.append('callback')
17851789
all_params.append('_return_http_data_only')
17861790
all_params.append('_preload_content')
@@ -1802,6 +1806,10 @@ def list_applicants_with_http_info(self, **kwargs):
18021806
path_params = {}
18031807

18041808
query_params = {}
1809+
if 'page' in params:
1810+
query_params['page'] = params['page']
1811+
if 'per_page' in params:
1812+
query_params['per_page'] = params['per_page']
18051813

18061814
header_params = {}
18071815

@@ -1853,6 +1861,8 @@ def list_checks(self, applicant_id, **kwargs):
18531861
:param callback function: The callback function
18541862
for asynchronous request. (optional)
18551863
:param str applicant_id: (required)
1864+
:param str page: The page to return. Defaults to the first page if omitted. The first page is `page=1`
1865+
:param str per_page: The number of objects per page. Defaults to 20 if omitted.
18561866
:return: ChecksList
18571867
If the method is called asynchronously,
18581868
returns the request thread.
@@ -1880,12 +1890,14 @@ def list_checks_with_http_info(self, applicant_id, **kwargs):
18801890
:param callback function: The callback function
18811891
for asynchronous request. (optional)
18821892
:param str applicant_id: (required)
1893+
:param str page: The page to return. Defaults to the first page if omitted. The first page is `page=1`
1894+
:param str per_page: The number of objects per page. Defaults to 20 if omitted.
18831895
:return: ChecksList
18841896
If the method is called asynchronously,
18851897
returns the request thread.
18861898
"""
18871899

1888-
all_params = ['applicant_id']
1900+
all_params = ['applicant_id', 'page', 'per_page']
18891901
all_params.append('callback')
18901902
all_params.append('_return_http_data_only')
18911903
all_params.append('_preload_content')
@@ -1912,6 +1924,10 @@ def list_checks_with_http_info(self, applicant_id, **kwargs):
19121924
path_params['applicant_id'] = params['applicant_id']
19131925

19141926
query_params = {}
1927+
if 'page' in params:
1928+
query_params['page'] = params['page']
1929+
if 'per_page' in params:
1930+
query_params['per_page'] = params['per_page']
19151931

19161932
header_params = {}
19171933

onfido/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,5 +233,5 @@ def to_debug_report(self):
233233
"OS: {env}\n"\
234234
"Python Version: {pyversion}\n"\
235235
"Version of the API: 2.0.0\n"\
236-
"SDK Package Version: 1.2.0".\
236+
"SDK Package Version: 1.3.0".\
237237
format(env=sys.platform, pyversion=sys.version)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from setuptools import setup, find_packages
2727

2828
NAME = "onfido"
29-
VERSION = "1.2.0"
29+
VERSION = "1.3.0"
3030

3131
# To install the library, run the following
3232
#

0 commit comments

Comments
 (0)