Skip to content

Commit a707c54

Browse files
authored
Added 'separete_files' GET parameter for document download endpoint; Added 'id' field to linked_objects (#12)
1 parent 3efb942 commit a707c54

File tree

8 files changed

+39
-5
lines changed

8 files changed

+39
-5
lines changed

docs/DocumentDetailsResponseLinkedObjects.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**provider** | **str** | | [optional]
88
**entity_type** | **str** | | [optional]
99
**entity_id** | **str** | | [optional]
10+
**id** | **str** | | [optional]
1011
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1112

1213
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/DocumentsApi.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ with pandadoc_client.ApiClient(configuration) as api_client:
789789
watermark_font_size = 12 # int | Font size of the watermark. (optional)
790790
watermark_opacity = 0.5 # float | In range 0.0-1.0 (optional)
791791
watermark_text = "John Doe inc." # str | Specify watermark text. (optional)
792+
separate_files = True # bool | Set as `true` if you want to receive a zip file with all documents in separate when document transaction contains more than 1. (optional)
792793

793794
# example passing only required values which don't have defaults set
794795
try:
@@ -808,6 +809,7 @@ with pandadoc_client.ApiClient(configuration) as api_client:
808809
watermark_font_size=watermark_font_size,
809810
watermark_opacity=watermark_opacity,
810811
watermark_text=watermark_text,
812+
separate_files=separate_files,
811813
)
812814
pprint(api_response)
813815
except pandadoc_client.ApiException as e:
@@ -823,6 +825,7 @@ Name | Type | Description | Notes
823825
**watermark_font_size** | **int**| Font size of the watermark. | [optional]
824826
**watermark_opacity** | **float**| In range 0.0-1.0 | [optional]
825827
**watermark_text** | **str**| Specify watermark text. | [optional]
828+
**separate_files** | **bool**| Set as `true` if you want to receive a zip file with all documents in separate when document transaction contains more than 1. | [optional]
826829

827830
### Return type
828831

@@ -895,6 +898,7 @@ with pandadoc_client.ApiClient(configuration) as api_client:
895898
# Create an instance of the API class
896899
api_instance = documents_api.DocumentsApi(api_client)
897900
id = "Mebvyy3NGsGBnY2rPLkH84" # str | Specify document ID.
901+
separate_files = True # bool | Set as `true` if you want to receive a zip file with all documents in separate when document transaction contains more than 1. (optional)
898902

899903
# example passing only required values which don't have defaults set
900904
try:
@@ -903,13 +907,26 @@ with pandadoc_client.ApiClient(configuration) as api_client:
903907
pprint(api_response)
904908
except pandadoc_client.ApiException as e:
905909
print("Exception when calling DocumentsApi->download_protected_document: %s\n" % e)
910+
911+
# example passing only required values which don't have defaults set
912+
# and optional values
913+
try:
914+
# Download document protected
915+
api_response = api_instance.download_protected_document(
916+
id,
917+
separate_files=separate_files,
918+
)
919+
pprint(api_response)
920+
except pandadoc_client.ApiException as e:
921+
print("Exception when calling DocumentsApi->download_protected_document: %s\n" % e)
906922
```
907923

908924
### Parameters
909925

910926
Name | Type | Description | Notes
911927
------------- | ------------- | ------------- | -------------
912928
**id** | **str**| Specify document ID. |
929+
**separate_files** | **bool**| Set as `true` if you want to receive a zip file with all documents in separate when document transaction contains more than 1. | [optional]
913930

914931
### Return type
915932

pandadoc_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"""
1010

1111

12-
__version__ = "5.0.1"
12+
__version__ = "5.1.0"
1313

1414
# import ApiClient
1515
from pandadoc_client.api_client import ApiClient

pandadoc_client/api/documents_api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ def __init__(self, api_client=None):
468468
'watermark_font_size',
469469
'watermark_opacity',
470470
'watermark_text',
471+
'separate_files',
471472
],
472473
'required': [
473474
'id',
@@ -495,20 +496,24 @@ def __init__(self, api_client=None):
495496
(float,),
496497
'watermark_text':
497498
(str,),
499+
'separate_files':
500+
(bool,),
498501
},
499502
'attribute_map': {
500503
'id': 'id',
501504
'watermark_color': 'watermark_color',
502505
'watermark_font_size': 'watermark_font_size',
503506
'watermark_opacity': 'watermark_opacity',
504507
'watermark_text': 'watermark_text',
508+
'separate_files': 'separate_files',
505509
},
506510
'location_map': {
507511
'id': 'path',
508512
'watermark_color': 'query',
509513
'watermark_font_size': 'query',
510514
'watermark_opacity': 'query',
511515
'watermark_text': 'query',
516+
'separate_files': 'query',
512517
},
513518
'collection_format_map': {
514519
}
@@ -537,6 +542,7 @@ def __init__(self, api_client=None):
537542
params_map={
538543
'all': [
539544
'id',
545+
'separate_files',
540546
],
541547
'required': [
542548
'id',
@@ -556,12 +562,16 @@ def __init__(self, api_client=None):
556562
'openapi_types': {
557563
'id':
558564
(str,),
565+
'separate_files':
566+
(bool,),
559567
},
560568
'attribute_map': {
561569
'id': 'id',
570+
'separate_files': 'separate_files',
562571
},
563572
'location_map': {
564573
'id': 'path',
574+
'separate_files': 'query',
565575
},
566576
'collection_format_map': {
567577
}
@@ -1584,6 +1594,7 @@ def download_document(
15841594
watermark_font_size (int): Font size of the watermark.. [optional]
15851595
watermark_opacity (float): In range 0.0-1.0. [optional]
15861596
watermark_text (str): Specify watermark text.. [optional]
1597+
separate_files (bool): Set as `true` if you want to receive a zip file with all documents in separate when document transaction contains more than 1.. [optional]
15871598
_return_http_data_only (bool): response data without head status
15881599
code and headers. Default is True.
15891600
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -1662,6 +1673,7 @@ def download_protected_document(
16621673
id (str): Specify document ID.
16631674
16641675
Keyword Args:
1676+
separate_files (bool): Set as `true` if you want to receive a zip file with all documents in separate when document transaction contains more than 1.. [optional]
16651677
_return_http_data_only (bool): response data without head status
16661678
code and headers. Default is True.
16671679
_preload_content (bool): if False, the urllib3.HTTPResponse object

pandadoc_client/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 = 'pandadoc_python_client/5.0.1'
78+
self.user_agent = 'pandadoc_python_client/5.1.0'
7979

8080
def __enter__(self):
8181
return self

pandadoc_client/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,8 @@ def to_debug_report(self):
414414
return "Python SDK Debug Report:\n"\
415415
"OS: {env}\n"\
416416
"Python Version: {pyversion}\n"\
417-
"Version of the API: 5.0.1\n"\
418-
"SDK Package Version: 5.0.1".\
417+
"Version of the API: 5.1.0\n"\
418+
"SDK Package Version: 5.1.0".\
419419
format(env=sys.platform, pyversion=sys.version)
420420

421421
def get_host_settings(self):

pandadoc_client/model/document_details_response_linked_objects.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def openapi_types():
8383
'provider': (str,), # noqa: E501
8484
'entity_type': (str,), # noqa: E501
8585
'entity_id': (str,), # noqa: E501
86+
'id': (str,), # noqa: E501
8687
}
8788

8889
@cached_property
@@ -94,6 +95,7 @@ def discriminator():
9495
'provider': 'provider', # noqa: E501
9596
'entity_type': 'entity_type', # noqa: E501
9697
'entity_id': 'entity_id', # noqa: E501
98+
'id': 'id', # noqa: E501
9799
}
98100

99101
read_only_vars = {
@@ -140,6 +142,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
140142
provider (str): [optional] # noqa: E501
141143
entity_type (str): [optional] # noqa: E501
142144
entity_id (str): [optional] # noqa: E501
145+
id (str): [optional] # noqa: E501
143146
"""
144147

145148
_check_type = kwargs.pop('_check_type', True)
@@ -224,6 +227,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
224227
provider (str): [optional] # noqa: E501
225228
entity_type (str): [optional] # noqa: E501
226229
entity_id (str): [optional] # noqa: E501
230+
id (str): [optional] # noqa: E501
227231
"""
228232

229233
_check_type = kwargs.pop('_check_type', True)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
description = full_description[0:from_index] + full_description[to_index::]
1818

1919
NAME = "pandadoc-python-client"
20-
VERSION = "5.0.1"
20+
VERSION = "5.1.0"
2121
# To install the library, run the following
2222
#
2323
# python setup.py install

0 commit comments

Comments
 (0)