Skip to content

Add new endpoints and some parameters; Improve openapi schema #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 10, 2021
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
34 changes: 25 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
PandaDoc SDK spans a broad range of functionality to help you build incredible documents automation experiences inside your product.

## Docs
[Official public API documentation](https://developers.pandadoc.com/reference/about)
- [Official public API documentation](https://developers.pandadoc.com/reference/about)

## Requirements
python >= 3.6
Python >= 3.6

## Installation
#### pip install
If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/PandaDoc/pandadoc-api-python-client.git
pip install pandadoc-python-client
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/PandaDoc/pandadoc-api-python-client.git`)
(you may need to run `pip` with root permission: `sudo pip install pandadoc-python-client`)

Then import the package:
```python
Expand Down Expand Up @@ -55,18 +55,17 @@ with pandadoc_client.ApiClient(cfg) as api_client:
- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header

### oauth2
- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://app.pandadoc.com/oauth2/authorize
- **Scopes**:
- **read+write**: default
- **read+write**: Use `read+write` to create, send, delete, and download documents, and `read` to view templates and document details.

## Examples

- [Create and send document from a template](examples/create_from_template_and_send.py)
- [Create and send document from the pdf url](examples/create_from_pdf_by_url_and_send.py)
- [Create and send document from a template](https://github.com/PandaDoc/pandadoc-api-python-client/blob/main/examples/create_from_template_and_send.py)
- [Create and send document from the pdf url](https://github.com/PandaDoc/pandadoc-api-python-client/blob/main/examples/create_from_pdf_by_url_and_send.py)

## Docs
### Official PandaDoc public API docs
Expand All @@ -80,31 +79,48 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*APILogsApi* | [**details_api_log**](docs/APILogsApi.md#details_api_log) | **GET** /public/v1/logs/{id} | Details API Log
*APILogsApi* | [**list_api_logs**](docs/APILogsApi.md#list_api_logs) | **GET** /public/v1/logs | List API Log
*ContactsApi* | [**contact_create**](docs/ContactsApi.md#contact_create) | **POST** /public/v1/contacts | Create contact
*ContactsApi* | [**contact_delete**](docs/ContactsApi.md#contact_delete) | **DELETE** /public/v1/contacts/{id} | Delete contact by id
*ContactsApi* | [**contact_details**](docs/ContactsApi.md#contact_details) | **GET** /public/v1/contacts/{id} | Get contact details by id
*ContactsApi* | [**contact_list**](docs/ContactsApi.md#contact_list) | **GET** /public/v1/contacts | List contacts
*ContactsApi* | [**contact_update**](docs/ContactsApi.md#contact_update) | **PATCH** /public/v1/contacts/{id} | Update contact by id
*ContentLibraryItemsApi* | [**details_content_library_item**](docs/ContentLibraryItemsApi.md#details_content_library_item) | **GET** /public/v1/content-library-items/{id}/details | Details Content Library Item
*ContentLibraryItemsApi* | [**list_content_library_items**](docs/ContentLibraryItemsApi.md#list_content_library_items) | **GET** /public/v1/content-library-items | List Content Library Item
*DocumentAttachmentsApi* | [**document_attachment_create**](docs/DocumentAttachmentsApi.md#document_attachment_create) | **POST** /public/v1/documents/{id}/attachments | Document Attachment Create
*DocumentAttachmentsApi* | [**document_attachment_delete**](docs/DocumentAttachmentsApi.md#document_attachment_delete) | **DELETE** /public/v1/documents/{id}/attachments/{attachment_id} | Document Attachment Delete
*DocumentAttachmentsApi* | [**document_attachment_details**](docs/DocumentAttachmentsApi.md#document_attachment_details) | **GET** /public/v1/documents/{id}/attachments/{attachment_id} | Document Attachment Details
*DocumentAttachmentsApi* | [**document_attachment_download**](docs/DocumentAttachmentsApi.md#document_attachment_download) | **GET** /public/v1/documents/{id}/attachments/{attachment_id}/download | Document Attachment Download
*DocumentAttachmentsApi* | [**document_attachments_list**](docs/DocumentAttachmentsApi.md#document_attachments_list) | **GET** /public/v1/documents/{id}/attachments | Document Attachment List
*DocumentsApi* | [**delete_document**](docs/DocumentsApi.md#delete_document) | **DELETE** /public/v1/documents/{id} | Delete document by id
*DocumentsApi* | [**document_create**](docs/DocumentsApi.md#document_create) | **POST** /public/v1/documents | Create document
*DocumentsApi* | [**document_create_link**](docs/DocumentsApi.md#document_create_link) | **POST** /public/v1/documents/{id}/session | Create a Document Link
*DocumentsApi* | [**document_details**](docs/DocumentsApi.md#document_details) | **GET** /public/v1/documents/{id}/details | Document details
*DocumentsApi* | [**document_list**](docs/DocumentsApi.md#document_list) | **GET** /public/v1/documents | List documents
*DocumentsApi* | [**document_status**](docs/DocumentsApi.md#document_status) | **GET** /public/v1/documents/{id} | Document status
*DocumentsApi* | [**document_status_change**](docs/DocumentsApi.md#document_status_change) | **PATCH** /public/v1/documents/{id}/status | Document status change
*DocumentsApi* | [**download_document**](docs/DocumentsApi.md#download_document) | **GET** /public/v1/documents/{id}/download | Document download
*DocumentsApi* | [**download_protected_document**](docs/DocumentsApi.md#download_protected_document) | **GET** /public/v1/documents/{id}/download-protected | Download document protected
*DocumentsApi* | [**linked_object_delete**](docs/DocumentsApi.md#linked_object_delete) | **DELETE** /public/v1/documents/{id}/linked-objects/{linked_object_id} | Delete Linked Object
*DocumentsApi* | [**linked_object_list**](docs/DocumentsApi.md#linked_object_list) | **GET** /public/v1/documents/{id}/linked-objects | List Linked Objects
*DocumentsApi* | [**linked_objects_create**](docs/DocumentsApi.md#linked_objects_create) | **POST** /public/v1/documents/{id}/linked-objects | Create Linked Object
*DocumentsApi* | [**send_document**](docs/DocumentsApi.md#send_document) | **POST** /public/v1/documents/{id}/send | Send Document
*DocumentsApi* | [**transfer_all_documents_ownership**](docs/DocumentsApi.md#transfer_all_documents_ownership) | **PATCH** /public/v1/documents/ownership | Transfer all documents ownership
*DocumentsApi* | [**transfer_document_ownership**](docs/DocumentsApi.md#transfer_document_ownership) | **PATCH** /public/v1/documents/{id}/ownership | Update document ownership
*FoldersAPIApi* | [**create_document_folder**](docs/FoldersAPIApi.md#create_document_folder) | **POST** /public/v1/documents/folders | Create Documents Folder
*FoldersAPIApi* | [**create_template_folder**](docs/FoldersAPIApi.md#create_template_folder) | **POST** /public/v1/templates/folders | Create Templates Folder
*FoldersAPIApi* | [**list_document_folders**](docs/FoldersAPIApi.md#list_document_folders) | **GET** /public/v1/documents/folders | List Documents Folders
*FoldersAPIApi* | [**list_template_folders**](docs/FoldersAPIApi.md#list_template_folders) | **GET** /public/v1/templates/folders | List Templates Folders
*FoldersAPIApi* | [**rename_document_folder**](docs/FoldersAPIApi.md#rename_document_folder) | **PUT** /public/v1/documents/folders/{id} | Rename Documents Folder
*FoldersAPIApi* | [**rename_template_folder**](docs/FoldersAPIApi.md#rename_template_folder) | **PUT** /public/v1/templates/folders/{id} | Rename Templates Folder
*FormsApi* | [**list_form**](docs/FormsApi.md#list_form) | **GET** /public/v1/forms | Forms
*MembersApi* | [**current_member_details**](docs/MembersApi.md#current_member_details) | **GET** /public/v1/members/current | Current member details
*MembersApi* | [**member_details**](docs/MembersApi.md#member_details) | **GET** /public/v1/members/{id} | Member details
*MembersApi* | [**member_list**](docs/MembersApi.md#member_list) | **GET** /public/v1/members | List members
*OAuth20AuthenticationApi* | [**access_token**](docs/OAuth20AuthenticationApi.md#access_token) | **POST** /oauth2/access_token | Create/Refresh Access Token
*TemplatesApi* | [**delete_template**](docs/TemplatesApi.md#delete_template) | **DELETE** /public/v1/templates/{id} | Delete Template
*TemplatesApi* | [**details_temaplate**](docs/TemplatesApi.md#details_temaplate) | **GET** /public/v1/templates/{id}/details | Details Template
*TemplatesApi* | [**list_templates**](docs/TemplatesApi.md#list_templates) | **GET** /public/v1/templates | List Templates


## License
SDK is licensed under the following [License](LICENSE).
SDK is licensed under the following [License](https://github.com/PandaDoc/pandadoc-api-python-client/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion docs/APILogDetailsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Name | Type | Description | Notes
**user_id** | **str** | | [optional]
**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]

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


2 changes: 1 addition & 1 deletion docs/APILogListResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Name | Type | Description | Notes
**results** | [**[APILogListResponseResults]**](APILogListResponseResults.md) | | [optional]
**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]

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


2 changes: 1 addition & 1 deletion docs/APILogListResponseResults.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ Name | Type | Description | Notes
**response_time** | **str** | | [optional]
**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]

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


71 changes: 35 additions & 36 deletions docs/APILogsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Returns details of the specific API log event.
* OAuth Authentication (oauth2):

```python
import time
import pandadoc_client
from pandadoc_client.api import api_logs_api
from pandadoc_client.model.api_log_details_response import APILogDetailsResponse
from pprint import pprint

# Defining the host is optional and defaults to https://api.pandadoc.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pandadoc_client.Configuration(
host = "https://api.pandadoc.com"
host="https://api.pandadoc.com",
)

# The client must configure the authentication and authorization parameters
Expand All @@ -39,21 +39,19 @@ configuration = pandadoc_client.Configuration(

# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
configuration.api_key_prefix['apiKey'] = 'API-Key'

# Configure OAuth2 access token for authorization: oauth2
configuration = pandadoc_client.Configuration(
host = "https://api.pandadoc.com"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# configuration = pandadoc_client.Configuration(
# host="https://api.pandadoc.com",
# )
# configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with pandadoc_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = api_logs_api.APILogsApi(api_client)
id = "id_example" # str | Log event id.
id = "AXp2jrHMK2MKv_lRqmQ" # str | Log event id.

# example passing only required values which don't have defaults set
try:
Expand All @@ -64,7 +62,6 @@ with pandadoc_client.ApiClient(configuration) as api_client:
print("Exception when calling APILogsApi->details_api_log: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
Expand Down Expand Up @@ -94,7 +91,7 @@ Name | Type | Description | Notes
**404** | Not found | - |
**429** | Too Many Requests | - |

[[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)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

# **list_api_logs**
> APILogListResponse list_api_logs()
Expand All @@ -109,15 +106,15 @@ Get the list of all logs within the selected workspace. Optionally filter by dat
* OAuth Authentication (oauth2):

```python
import time
import pandadoc_client
from pandadoc_client.api import api_logs_api
from pandadoc_client.model.api_log_list_response import APILogListResponse
from pprint import pprint

# Defining the host is optional and defaults to https://api.pandadoc.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pandadoc_client.Configuration(
host = "https://api.pandadoc.com"
host="https://api.pandadoc.com",
)

# The client must configure the authentication and authorization parameters
Expand All @@ -127,44 +124,46 @@ configuration = pandadoc_client.Configuration(

# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
configuration.api_key_prefix['apiKey'] = 'API-Key'

# Configure OAuth2 access token for authorization: oauth2
configuration = pandadoc_client.Configuration(
host = "https://api.pandadoc.com"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# configuration = pandadoc_client.Configuration(
# host="https://api.pandadoc.com",
# )
# configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with pandadoc_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = api_logs_api.APILogsApi(api_client)
since = "since_example" # str | Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as \"-90d\" (for past 90 days). (optional)
to = "to_example" # str | Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as \"-10d\" (for past 10 days) or a special \"now\" value. (optional)
count = 1 # int | The amount of items on each page. (optional)
page = 1 # int | Page number of the results returned. (optional)
statuses = [
100,
] # [int] | Returns only the predefined status codes. Allows 1xx, 2xx, 3xx, 4xx, and 5xx. (optional)
methods = [
"GET",
] # [str] | Returns only the predefined HTTP methods. Allows GET, POST, PUT, PATCH, and DELETE. (optional)
search = "search_example" # str | Returns the results containing a string. (optional)
environment_type = "PRODUCTION" # str | Returns logs for production/sandbox. (optional)
since = "-7d" # str | Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as \"-90d\" (for past 90 days). (optional)
to = "now" # str | Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as \"-10d\" (for past 10 days) or a special \"now\" value. (optional)
count = 10 # int | The amount of items on each page. (optional)
page = 1 # int | Page number of the results returned. (optional)
statuses = [400,500] # [int] | Returns only the predefined status codes. Allows 1xx, 2xx, 3xx, 4xx, and 5xx. (optional)
methods = ["GET","POST"] # [str] | Returns only the predefined HTTP methods. Allows GET, POST, PUT, PATCH, and DELETE. (optional)
search = "documents/hryJY9mqYZHjQCYQuSjRQg/send" # str | Returns the results containing a string. (optional)
environment_type = "PRODUCTION" # str | Returns logs for production/sandbox. (optional)

# example passing only required values which don't have defaults set
# and optional values
try:
# List API Log
api_response = api_instance.list_api_logs(since=since, to=to, count=count, page=page, statuses=statuses, methods=methods, search=search, environment_type=environment_type)
api_response = api_instance.list_api_logs(
since=since,
to=to,
count=count,
page=page,
statuses=statuses,
methods=methods,
search=search,
environment_type=environment_type,
)
pprint(api_response)
except pandadoc_client.ApiException as e:
print("Exception when calling APILogsApi->list_api_logs: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
Expand Down Expand Up @@ -201,5 +200,5 @@ Name | Type | Description | Notes
**401** | Authentication error | - |
**429** | Too Many Requests | - |

[[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)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

21 changes: 21 additions & 0 deletions docs/ContactCreateRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ContactCreateRequest


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **str** | |
**first_name** | **str, none_type** | | [optional]
**last_name** | **str, none_type** | | [optional]
**company** | **str, none_type** | | [optional]
**job_title** | **str, none_type** | | [optional]
**phone** | **str, none_type** | | [optional]
**state** | **str, none_type** | | [optional]
**street_address** | **str, none_type** | | [optional]
**city** | **str, none_type** | | [optional]
**postal_code** | **str, none_type** | | [optional]
**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]

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


22 changes: 22 additions & 0 deletions docs/ContactDetailsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ContactDetailsResponse


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]
**email** | **str** | | [optional]
**first_name** | **str, none_type** | | [optional]
**last_name** | **str, none_type** | | [optional]
**company** | **str, none_type** | | [optional]
**job_title** | **str, none_type** | | [optional]
**phone** | **str, none_type** | | [optional]
**state** | **str, none_type** | | [optional]
**street_address** | **str, none_type** | | [optional]
**city** | **str, none_type** | | [optional]
**postal_code** | **str, none_type** | | [optional]
**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]

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


11 changes: 11 additions & 0 deletions docs/ContactListResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ContactListResponse


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | [**[ContactDetailsResponse]**](ContactDetailsResponse.md) | |

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


Loading