diff --git a/README.md b/README.md index a801e44..4904af5 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,10 @@ Class | Method | HTTP request | Description *DocumentAttachmentsApi* | [**details_document_attachment**](docs/DocumentAttachmentsApi.md#details_document_attachment) | **GET** /public/v1/documents/{id}/attachments/{attachment_id} | Document Attachment Details *DocumentAttachmentsApi* | [**download_document_attachment**](docs/DocumentAttachmentsApi.md#download_document_attachment) | **GET** /public/v1/documents/{id}/attachments/{attachment_id}/download | Document Attachment Download *DocumentAttachmentsApi* | [**list_document_attachments**](docs/DocumentAttachmentsApi.md#list_document_attachments) | **GET** /public/v1/documents/{id}/attachments | Document Attachment List +*DocumentRecipientsApi* | [**add_document_recipient**](docs/DocumentRecipientsApi.md#add_document_recipient) | **POST** /public/v1/documents/{id}/recipients | Add Document Recipient +*DocumentRecipientsApi* | [**delete_document_recipient**](docs/DocumentRecipientsApi.md#delete_document_recipient) | **DELETE** /public/v1/documents/{id}/recipients/{recipient_id} | Delete Document Recipient +*DocumentRecipientsApi* | [**edit_document_recipient**](docs/DocumentRecipientsApi.md#edit_document_recipient) | **PATCH** /public/v1/documents/{id}/recipients/{recipient_id} | Edit Document Recipient +*DocumentRecipientsApi* | [**reassign_document_recipient**](docs/DocumentRecipientsApi.md#reassign_document_recipient) | **POST** /public/v1/documents/{id}/recipients/{recipient_id}/reassign | Reassign Document Recipient *DocumentsApi* | [**change_document_status**](docs/DocumentsApi.md#change_document_status) | **PATCH** /public/v1/documents/{id}/status | Document status change *DocumentsApi* | [**create_document**](docs/DocumentsApi.md#create_document) | **POST** /public/v1/documents | Create document *DocumentsApi* | [**create_document_link**](docs/DocumentsApi.md#create_document_link) | **POST** /public/v1/documents/{id}/session | Create a Document Link diff --git a/docs/DocumentRecipientCreateRequest.md b/docs/DocumentRecipientCreateRequest.md new file mode 100644 index 0000000..46b073f --- /dev/null +++ b/docs/DocumentRecipientCreateRequest.md @@ -0,0 +1,13 @@ +# DocumentRecipientCreateRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**kind** | **str** | | +**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) + + diff --git a/docs/DocumentRecipientEditRequest.md b/docs/DocumentRecipientEditRequest.md new file mode 100644 index 0000000..f4f9d70 --- /dev/null +++ b/docs/DocumentRecipientEditRequest.md @@ -0,0 +1,21 @@ +# DocumentRecipientEditRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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) + + diff --git a/docs/DocumentRecipientsApi.md b/docs/DocumentRecipientsApi.md new file mode 100644 index 0000000..0ff6d13 --- /dev/null +++ b/docs/DocumentRecipientsApi.md @@ -0,0 +1,383 @@ +# pandadoc_client.DocumentRecipientsApi + +All URIs are relative to *https://api.pandadoc.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_document_recipient**](DocumentRecipientsApi.md#add_document_recipient) | **POST** /public/v1/documents/{id}/recipients | Add Document Recipient +[**delete_document_recipient**](DocumentRecipientsApi.md#delete_document_recipient) | **DELETE** /public/v1/documents/{id}/recipients/{recipient_id} | Delete Document Recipient +[**edit_document_recipient**](DocumentRecipientsApi.md#edit_document_recipient) | **PATCH** /public/v1/documents/{id}/recipients/{recipient_id} | Edit Document Recipient +[**reassign_document_recipient**](DocumentRecipientsApi.md#reassign_document_recipient) | **POST** /public/v1/documents/{id}/recipients/{recipient_id}/reassign | Reassign Document Recipient + + +# **add_document_recipient** +> add_document_recipient(id, document_recipient_create_request) + +Add Document Recipient + +Adds recipient as CC to document + +### Example + +* Api Key Authentication (apiKey): +* OAuth Authentication (oauth2): + +```python +import pandadoc_client +from pandadoc_client.api import document_recipients_api +from pandadoc_client.model.document_recipient_create_request import DocumentRecipientCreateRequest +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", +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = 'YOUR_API_KEY' +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' + +# 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 = document_recipients_api.DocumentRecipientsApi(api_client) + id = "BhVzRcxH9Z2LgfPPGXFUBa" # str | Document UUID + document_recipient_create_request = DocumentRecipientCreateRequest( + id="2eWSKSvVqmuVCnuUK3iWwD", + kind="contact", + ) # DocumentRecipientCreateRequest | + + # example passing only required values which don't have defaults set + try: + # Add Document Recipient + api_instance.add_document_recipient(id, document_recipient_create_request) + except pandadoc_client.ApiException as e: + print("Exception when calling DocumentRecipientsApi->add_document_recipient: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Document UUID | + **document_recipient_create_request** | [**DocumentRecipientCreateRequest**](DocumentRecipientCreateRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | Bad Request | - | +**401** | Authentication error | - | +**403** | Permission error | - | +**404** | Not found | - | +**429** | Too Many Requests | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +# **delete_document_recipient** +> delete_document_recipient(id, recipient_id) + +Delete Document Recipient + +Deleted recipient from document + +### Example + +* Api Key Authentication (apiKey): +* OAuth Authentication (oauth2): + +```python +import pandadoc_client +from pandadoc_client.api import document_recipients_api +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", +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = 'YOUR_API_KEY' +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' + +# 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 = document_recipients_api.DocumentRecipientsApi(api_client) + id = "BhVzRcxH9Z2LgfPPGXFUBa" # str | Document UUID + recipient_id = "tf5dGS3Tmu3cj228ao6fnc" # str | Recipient UUID + + # example passing only required values which don't have defaults set + try: + # Delete Document Recipient + api_instance.delete_document_recipient(id, recipient_id) + except pandadoc_client.ApiException as e: + print("Exception when calling DocumentRecipientsApi->delete_document_recipient: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Document UUID | + **recipient_id** | **str**| Recipient UUID | + +### Return type + +void (empty response body) + +### Authorization + +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Authentication error | - | +**403** | Permission error | - | +**404** | Not found | - | +**429** | Too Many Requests | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +# **edit_document_recipient** +> edit_document_recipient(id, recipient_id, document_recipient_edit_request) + +Edit Document Recipient + +Edit document recipient's details + +### Example + +* Api Key Authentication (apiKey): +* OAuth Authentication (oauth2): + +```python +import pandadoc_client +from pandadoc_client.api import document_recipients_api +from pandadoc_client.model.document_recipient_edit_request import DocumentRecipientEditRequest +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", +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = 'YOUR_API_KEY' +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' + +# 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 = document_recipients_api.DocumentRecipientsApi(api_client) + id = "BhVzRcxH9Z2LgfPPGXFUBa" # str | Document UUID + recipient_id = "tf5dGS3Tmu3cj228ao6fnc" # str | Recipient UUID + document_recipient_edit_request = DocumentRecipientEditRequest( + email="user01@pandadoc.com", + first_name="John", + last_name="Doe", + company="John Doe Inc.", + job_title="CTO", + phone="+14842634627", + state="Texas", + street_address="1313 Mockingbird Lane", + city="Austin", + postal_code="75001", + ) # DocumentRecipientEditRequest | + + # example passing only required values which don't have defaults set + try: + # Edit Document Recipient + api_instance.edit_document_recipient(id, recipient_id, document_recipient_edit_request) + except pandadoc_client.ApiException as e: + print("Exception when calling DocumentRecipientsApi->edit_document_recipient: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Document UUID | + **recipient_id** | **str**| Recipient UUID | + **document_recipient_edit_request** | [**DocumentRecipientEditRequest**](DocumentRecipientEditRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | Bad Request | - | +**401** | Authentication error | - | +**403** | Permission error | - | +**404** | Not found | - | +**429** | Too Many Requests | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +# **reassign_document_recipient** +> reassign_document_recipient(id, recipient_id, document_recipient_create_request) + +Reassign Document Recipient + +Replace document recipient with another contact + +### Example + +* Api Key Authentication (apiKey): +* OAuth Authentication (oauth2): + +```python +import pandadoc_client +from pandadoc_client.api import document_recipients_api +from pandadoc_client.model.document_recipient_create_request import DocumentRecipientCreateRequest +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", +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = 'YOUR_API_KEY' +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' + +# 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 = document_recipients_api.DocumentRecipientsApi(api_client) + id = "BhVzRcxH9Z2LgfPPGXFUBa" # str | Document UUID + recipient_id = "tf5dGS3Tmu3cj228ao6fnc" # str | Recipient UUID + document_recipient_create_request = DocumentRecipientCreateRequest( + id="2eWSKSvVqmuVCnuUK3iWwD", + kind="contact", + ) # DocumentRecipientCreateRequest | + + # example passing only required values which don't have defaults set + try: + # Reassign Document Recipient + api_instance.reassign_document_recipient(id, recipient_id, document_recipient_create_request) + except pandadoc_client.ApiException as e: + print("Exception when calling DocumentRecipientsApi->reassign_document_recipient: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Document UUID | + **recipient_id** | **str**| Recipient UUID | + **document_recipient_create_request** | [**DocumentRecipientCreateRequest**](DocumentRecipientCreateRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | Bad Request | - | +**401** | Authentication error | - | +**403** | Permission error | - | +**404** | Not found | - | +**429** | Too Many Requests | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/DocumentSendRequest.md b/docs/DocumentSendRequest.md index 95c6769..80c833a 100644 --- a/docs/DocumentSendRequest.md +++ b/docs/DocumentSendRequest.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **subject** | **str** | Value that will be used as the email subject. | [optional] **silent** | **bool** | Disables sent, viewed, comment, and completed email notifications for document recipients and the document sender. By default, notifications emails are sent for specific actions. If set as true, it won't affect the \"Approve document\" email notification sent to the Approver. | [optional] **sender** | **{str: (str,)}** | You can set a sender of a document as an `email` or `membership_id` | [optional] +**forwarding_settings** | [**DocumentSendRequestForwardingSettings**](DocumentSendRequestForwardingSettings.md) | | [optional] +**selected_approvers** | [**DocumentSendRequestSelectedApprovers**](DocumentSendRequestSelectedApprovers.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 API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DocumentSendRequestForwardingSettings.md b/docs/DocumentSendRequestForwardingSettings.md new file mode 100644 index 0000000..ddc8218 --- /dev/null +++ b/docs/DocumentSendRequestForwardingSettings.md @@ -0,0 +1,14 @@ +# DocumentSendRequestForwardingSettings + +Forwarding settings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**forwarding_allowed** | **bool** | Allow forwarding | [optional] +**forwarding_with_reassigning_allowed** | **bool** | Allow forwarding with reassigning | [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) + + diff --git a/docs/DocumentSendRequestSelectedApprovers.md b/docs/DocumentSendRequestSelectedApprovers.md new file mode 100644 index 0000000..50861ed --- /dev/null +++ b/docs/DocumentSendRequestSelectedApprovers.md @@ -0,0 +1,13 @@ +# DocumentSendRequestSelectedApprovers + +Configuration for selected approvers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**steps** | [**[DocumentSendRequestSelectedApproversSteps]**](DocumentSendRequestSelectedApproversSteps.md) | Approval steps | [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) + + diff --git a/docs/DocumentSendRequestSelectedApproversGroup.md b/docs/DocumentSendRequestSelectedApproversGroup.md new file mode 100644 index 0000000..b1d3040 --- /dev/null +++ b/docs/DocumentSendRequestSelectedApproversGroup.md @@ -0,0 +1,15 @@ +# DocumentSendRequestSelectedApproversGroup + +Group information + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Group ID | +**type** | **str** | Group type | +**assignees** | [**[DocumentSendRequestSelectedApproversGroupAssignees]**](DocumentSendRequestSelectedApproversGroupAssignees.md) | Assignees for the group | +**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) + + diff --git a/docs/DocumentSendRequestSelectedApproversGroupAssignees.md b/docs/DocumentSendRequestSelectedApproversGroupAssignees.md new file mode 100644 index 0000000..8fc74f4 --- /dev/null +++ b/docs/DocumentSendRequestSelectedApproversGroupAssignees.md @@ -0,0 +1,13 @@ +# DocumentSendRequestSelectedApproversGroupAssignees + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | User ID | [optional] +**is_selected** | **bool** | Whether the user is selected | [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) + + diff --git a/docs/DocumentSendRequestSelectedApproversSteps.md b/docs/DocumentSendRequestSelectedApproversSteps.md new file mode 100644 index 0000000..0fca54e --- /dev/null +++ b/docs/DocumentSendRequestSelectedApproversSteps.md @@ -0,0 +1,13 @@ +# DocumentSendRequestSelectedApproversSteps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Step ID | +**group** | [**DocumentSendRequestSelectedApproversGroup**](DocumentSendRequestSelectedApproversGroup.md) | | +**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) + + diff --git a/docs/DocumentsApi.md b/docs/DocumentsApi.md index 260a2bd..80200d8 100644 --- a/docs/DocumentsApi.md +++ b/docs/DocumentsApi.md @@ -1325,6 +1325,27 @@ with pandadoc_client.ApiClient(configuration) as api_client: sender={ "key": "key_example", }, + forwarding_settings=DocumentSendRequestForwardingSettings( + forwarding_allowed=True, + forwarding_with_reassigning_allowed=True, + ), + selected_approvers=DocumentSendRequestSelectedApprovers( + steps=[ + DocumentSendRequestSelectedApproversSteps( + id="LzWmancTxrgfTMpsJP9Eqd", + group=DocumentSendRequestSelectedApproversGroup( + id="op9MA75HygJHiV4aeVHXCH", + type="selectable", + assignees=[ + DocumentSendRequestSelectedApproversGroupAssignees( + user="tpBLrk3vJoLggypMSRt92i", + is_selected=True, + ), + ], + ), + ), + ], + ), ) # DocumentSendRequest | # example passing only required values which don't have defaults set diff --git a/pandadoc_client/__init__.py b/pandadoc_client/__init__.py index 98f17c5..1dd409e 100644 --- a/pandadoc_client/__init__.py +++ b/pandadoc_client/__init__.py @@ -9,7 +9,7 @@ """ -__version__ = "5.5.0" +__version__ = "5.7.0" # import ApiClient from pandadoc_client.api_client import ApiClient diff --git a/pandadoc_client/api/document_recipients_api.py b/pandadoc_client/api/document_recipients_api.py new file mode 100644 index 0000000..899b1c5 --- /dev/null +++ b/pandadoc_client/api/document_recipients_api.py @@ -0,0 +1,621 @@ +""" + PandaDoc Public API + + PandaDoc Public API documentation # noqa: E501 + + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from pandadoc_client.api_client import ApiClient, Endpoint as _Endpoint +from pandadoc_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from pandadoc_client.model.document_recipient_create_request import DocumentRecipientCreateRequest +from pandadoc_client.model.document_recipient_edit_request import DocumentRecipientEditRequest + + +class DocumentRecipientsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.add_document_recipient_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'apiKey', + 'oauth2' + ], + 'endpoint_path': '/public/v1/documents/{id}/recipients', + 'operation_id': 'add_document_recipient', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'document_recipient_create_request', + ], + 'required': [ + 'id', + 'document_recipient_create_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'document_recipient_create_request': + (DocumentRecipientCreateRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'document_recipient_create_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_document_recipient_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'apiKey', + 'oauth2' + ], + 'endpoint_path': '/public/v1/documents/{id}/recipients/{recipient_id}', + 'operation_id': 'delete_document_recipient', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'recipient_id', + ], + 'required': [ + 'id', + 'recipient_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'recipient_id': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'recipient_id': 'recipient_id', + }, + 'location_map': { + 'id': 'path', + 'recipient_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.edit_document_recipient_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'apiKey', + 'oauth2' + ], + 'endpoint_path': '/public/v1/documents/{id}/recipients/{recipient_id}', + 'operation_id': 'edit_document_recipient', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'recipient_id', + 'document_recipient_edit_request', + ], + 'required': [ + 'id', + 'recipient_id', + 'document_recipient_edit_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'recipient_id': + (str,), + 'document_recipient_edit_request': + (DocumentRecipientEditRequest,), + }, + 'attribute_map': { + 'id': 'id', + 'recipient_id': 'recipient_id', + }, + 'location_map': { + 'id': 'path', + 'recipient_id': 'path', + 'document_recipient_edit_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.reassign_document_recipient_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'apiKey', + 'oauth2' + ], + 'endpoint_path': '/public/v1/documents/{id}/recipients/{recipient_id}/reassign', + 'operation_id': 'reassign_document_recipient', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'recipient_id', + 'document_recipient_create_request', + ], + 'required': [ + 'id', + 'recipient_id', + 'document_recipient_create_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'recipient_id': + (str,), + 'document_recipient_create_request': + (DocumentRecipientCreateRequest,), + }, + 'attribute_map': { + 'id': 'id', + 'recipient_id': 'recipient_id', + }, + 'location_map': { + 'id': 'path', + 'recipient_id': 'path', + 'document_recipient_create_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def add_document_recipient( + self, + id, + document_recipient_create_request, + **kwargs + ): + """Add Document Recipient # noqa: E501 + + Adds recipient as CC to document # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_document_recipient(id, document_recipient_create_request, async_req=True) + >>> result = thread.get() + + Args: + id (str): Document UUID + document_recipient_create_request (DocumentRecipientCreateRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['document_recipient_create_request'] = \ + document_recipient_create_request + return self.add_document_recipient_endpoint.call_with_http_info(**kwargs) + + def delete_document_recipient( + self, + id, + recipient_id, + **kwargs + ): + """Delete Document Recipient # noqa: E501 + + Deleted recipient from document # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_document_recipient(id, recipient_id, async_req=True) + >>> result = thread.get() + + Args: + id (str): Document UUID + recipient_id (str): Recipient UUID + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['recipient_id'] = \ + recipient_id + return self.delete_document_recipient_endpoint.call_with_http_info(**kwargs) + + def edit_document_recipient( + self, + id, + recipient_id, + document_recipient_edit_request, + **kwargs + ): + """Edit Document Recipient # noqa: E501 + + Edit document recipient's details # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.edit_document_recipient(id, recipient_id, document_recipient_edit_request, async_req=True) + >>> result = thread.get() + + Args: + id (str): Document UUID + recipient_id (str): Recipient UUID + document_recipient_edit_request (DocumentRecipientEditRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['recipient_id'] = \ + recipient_id + kwargs['document_recipient_edit_request'] = \ + document_recipient_edit_request + return self.edit_document_recipient_endpoint.call_with_http_info(**kwargs) + + def reassign_document_recipient( + self, + id, + recipient_id, + document_recipient_create_request, + **kwargs + ): + """Reassign Document Recipient # noqa: E501 + + Replace document recipient with another contact # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.reassign_document_recipient(id, recipient_id, document_recipient_create_request, async_req=True) + >>> result = thread.get() + + Args: + id (str): Document UUID + recipient_id (str): Recipient UUID + document_recipient_create_request (DocumentRecipientCreateRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['recipient_id'] = \ + recipient_id + kwargs['document_recipient_create_request'] = \ + document_recipient_create_request + return self.reassign_document_recipient_endpoint.call_with_http_info(**kwargs) + diff --git a/pandadoc_client/api_client.py b/pandadoc_client/api_client.py index f395e04..8bd3f2f 100644 --- a/pandadoc_client/api_client.py +++ b/pandadoc_client/api_client.py @@ -75,7 +75,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'pandadoc_python_client/5.5.0' + self.user_agent = 'pandadoc_python_client/5.7.0' def __enter__(self): return self diff --git a/pandadoc_client/apis/__init__.py b/pandadoc_client/apis/__init__.py index 07a83f3..3a5d969 100644 --- a/pandadoc_client/apis/__init__.py +++ b/pandadoc_client/apis/__init__.py @@ -18,6 +18,7 @@ from pandadoc_client.api.contacts_api import ContactsApi from pandadoc_client.api.content_library_items_api import ContentLibraryItemsApi from pandadoc_client.api.document_attachments_api import DocumentAttachmentsApi +from pandadoc_client.api.document_recipients_api import DocumentRecipientsApi from pandadoc_client.api.documents_api import DocumentsApi from pandadoc_client.api.folders_api_api import FoldersAPIApi from pandadoc_client.api.forms_api import FormsApi diff --git a/pandadoc_client/configuration.py b/pandadoc_client/configuration.py index cc7f289..77e337f 100644 --- a/pandadoc_client/configuration.py +++ b/pandadoc_client/configuration.py @@ -414,8 +414,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 5.5.0\n"\ - "SDK Package Version: 5.5.0".\ + "Version of the API: 5.7.0\n"\ + "SDK Package Version: 5.7.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/pandadoc_client/model/document_recipient_create_request.py b/pandadoc_client/model/document_recipient_create_request.py new file mode 100644 index 0000000..282ea46 --- /dev/null +++ b/pandadoc_client/model/document_recipient_create_request.py @@ -0,0 +1,270 @@ +""" + PandaDoc Public API + + PandaDoc Public API documentation # noqa: E501 + + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from pandadoc_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from pandadoc_client.exceptions import ApiAttributeError + + + +class DocumentRecipientCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('kind',): { + 'CONTACT': "contact", + 'CONTACT_GROUP': "contact_group", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'kind': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'kind': 'kind', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, kind, *args, **kwargs): # noqa: E501 + """DocumentRecipientCreateRequest - a model defined in OpenAPI + + Args: + id (str): + kind (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.kind = kind + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, kind, *args, **kwargs): # noqa: E501 + """DocumentRecipientCreateRequest - a model defined in OpenAPI + + Args: + id (str): + kind (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.kind = kind + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pandadoc_client/model/document_recipient_edit_request.py b/pandadoc_client/model/document_recipient_edit_request.py new file mode 100644 index 0000000..747955f --- /dev/null +++ b/pandadoc_client/model/document_recipient_edit_request.py @@ -0,0 +1,290 @@ +""" + PandaDoc Public API + + PandaDoc Public API documentation # noqa: E501 + + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from pandadoc_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from pandadoc_client.exceptions import ApiAttributeError + + + +class DocumentRecipientEditRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'email': (str,), # noqa: E501 + 'first_name': (str, none_type,), # noqa: E501 + 'last_name': (str, none_type,), # noqa: E501 + 'company': (str, none_type,), # noqa: E501 + 'job_title': (str, none_type,), # noqa: E501 + 'phone': (str, none_type,), # noqa: E501 + 'state': (str, none_type,), # noqa: E501 + 'street_address': (str, none_type,), # noqa: E501 + 'city': (str, none_type,), # noqa: E501 + 'postal_code': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'email': 'email', # noqa: E501 + 'first_name': 'first_name', # noqa: E501 + 'last_name': 'last_name', # noqa: E501 + 'company': 'company', # noqa: E501 + 'job_title': 'job_title', # noqa: E501 + 'phone': 'phone', # noqa: E501 + 'state': 'state', # noqa: E501 + 'street_address': 'street_address', # noqa: E501 + 'city': 'city', # noqa: E501 + 'postal_code': 'postal_code', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DocumentRecipientEditRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): [optional] # noqa: E501 + first_name (str, none_type): [optional] # noqa: E501 + last_name (str, none_type): [optional] # noqa: E501 + company (str, none_type): [optional] # noqa: E501 + job_title (str, none_type): [optional] # noqa: E501 + phone (str, none_type): [optional] # noqa: E501 + state (str, none_type): [optional] # noqa: E501 + street_address (str, none_type): [optional] # noqa: E501 + city (str, none_type): [optional] # noqa: E501 + postal_code (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DocumentRecipientEditRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): [optional] # noqa: E501 + first_name (str, none_type): [optional] # noqa: E501 + last_name (str, none_type): [optional] # noqa: E501 + company (str, none_type): [optional] # noqa: E501 + job_title (str, none_type): [optional] # noqa: E501 + phone (str, none_type): [optional] # noqa: E501 + state (str, none_type): [optional] # noqa: E501 + street_address (str, none_type): [optional] # noqa: E501 + city (str, none_type): [optional] # noqa: E501 + postal_code (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pandadoc_client/model/document_send_request.py b/pandadoc_client/model/document_send_request.py index 5777fcc..b2c5073 100644 --- a/pandadoc_client/model/document_send_request.py +++ b/pandadoc_client/model/document_send_request.py @@ -28,6 +28,12 @@ from pandadoc_client.exceptions import ApiAttributeError +def lazy_import(): + from pandadoc_client.model.document_send_request_forwarding_settings import DocumentSendRequestForwardingSettings + from pandadoc_client.model.document_send_request_selected_approvers import DocumentSendRequestSelectedApprovers + globals()['DocumentSendRequestForwardingSettings'] = DocumentSendRequestForwardingSettings + globals()['DocumentSendRequestSelectedApprovers'] = DocumentSendRequestSelectedApprovers + class DocumentSendRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -65,6 +71,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ + lazy_import() return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -79,11 +86,14 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { 'message': (str,), # noqa: E501 'subject': (str,), # noqa: E501 'silent': (bool,), # noqa: E501 'sender': ({str: (str,)},), # noqa: E501 + 'forwarding_settings': (DocumentSendRequestForwardingSettings,), # noqa: E501 + 'selected_approvers': (DocumentSendRequestSelectedApprovers,), # noqa: E501 } @cached_property @@ -96,6 +106,8 @@ def discriminator(): 'subject': 'subject', # noqa: E501 'silent': 'silent', # noqa: E501 'sender': 'sender', # noqa: E501 + 'forwarding_settings': 'forwarding_settings', # noqa: E501 + 'selected_approvers': 'selected_approvers', # noqa: E501 } read_only_vars = { @@ -143,6 +155,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 subject (str): Value that will be used as the email subject.. [optional] # noqa: E501 silent (bool): Disables sent, viewed, comment, and completed email notifications for document recipients and the document sender. By default, notifications emails are sent for specific actions. If set as true, it won't affect the \"Approve document\" email notification sent to the Approver.. [optional] # noqa: E501 sender ({str: (str,)}): You can set a sender of a document as an `email` or `membership_id`. [optional] # noqa: E501 + forwarding_settings (DocumentSendRequestForwardingSettings): [optional] # noqa: E501 + selected_approvers (DocumentSendRequestSelectedApprovers): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -228,6 +242,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 subject (str): Value that will be used as the email subject.. [optional] # noqa: E501 silent (bool): Disables sent, viewed, comment, and completed email notifications for document recipients and the document sender. By default, notifications emails are sent for specific actions. If set as true, it won't affect the \"Approve document\" email notification sent to the Approver.. [optional] # noqa: E501 sender ({str: (str,)}): You can set a sender of a document as an `email` or `membership_id`. [optional] # noqa: E501 + forwarding_settings (DocumentSendRequestForwardingSettings): [optional] # noqa: E501 + selected_approvers (DocumentSendRequestSelectedApprovers): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/pandadoc_client/model/document_send_request_forwarding_settings.py b/pandadoc_client/model/document_send_request_forwarding_settings.py new file mode 100644 index 0000000..b70bc76 --- /dev/null +++ b/pandadoc_client/model/document_send_request_forwarding_settings.py @@ -0,0 +1,258 @@ +""" + PandaDoc Public API + + PandaDoc Public API documentation # noqa: E501 + + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from pandadoc_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from pandadoc_client.exceptions import ApiAttributeError + + + +class DocumentSendRequestForwardingSettings(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'forwarding_allowed': (bool,), # noqa: E501 + 'forwarding_with_reassigning_allowed': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'forwarding_allowed': 'forwarding_allowed', # noqa: E501 + 'forwarding_with_reassigning_allowed': 'forwarding_with_reassigning_allowed', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DocumentSendRequestForwardingSettings - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + forwarding_allowed (bool): Allow forwarding. [optional] # noqa: E501 + forwarding_with_reassigning_allowed (bool): Allow forwarding with reassigning. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DocumentSendRequestForwardingSettings - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + forwarding_allowed (bool): Allow forwarding. [optional] # noqa: E501 + forwarding_with_reassigning_allowed (bool): Allow forwarding with reassigning. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pandadoc_client/model/document_send_request_selected_approvers.py b/pandadoc_client/model/document_send_request_selected_approvers.py new file mode 100644 index 0000000..d6ca62f --- /dev/null +++ b/pandadoc_client/model/document_send_request_selected_approvers.py @@ -0,0 +1,260 @@ +""" + PandaDoc Public API + + PandaDoc Public API documentation # noqa: E501 + + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from pandadoc_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from pandadoc_client.exceptions import ApiAttributeError + + +def lazy_import(): + from pandadoc_client.model.document_send_request_selected_approvers_steps import DocumentSendRequestSelectedApproversSteps + globals()['DocumentSendRequestSelectedApproversSteps'] = DocumentSendRequestSelectedApproversSteps + + +class DocumentSendRequestSelectedApprovers(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'steps': ([DocumentSendRequestSelectedApproversSteps],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'steps': 'steps', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DocumentSendRequestSelectedApprovers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + steps ([DocumentSendRequestSelectedApproversSteps]): Approval steps. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DocumentSendRequestSelectedApprovers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + steps ([DocumentSendRequestSelectedApproversSteps]): Approval steps. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pandadoc_client/model/document_send_request_selected_approvers_group.py b/pandadoc_client/model/document_send_request_selected_approvers_group.py new file mode 100644 index 0000000..2ee55b6 --- /dev/null +++ b/pandadoc_client/model/document_send_request_selected_approvers_group.py @@ -0,0 +1,278 @@ +""" + PandaDoc Public API + + PandaDoc Public API documentation # noqa: E501 + + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from pandadoc_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from pandadoc_client.exceptions import ApiAttributeError + + +def lazy_import(): + from pandadoc_client.model.document_send_request_selected_approvers_group_assignees import DocumentSendRequestSelectedApproversGroupAssignees + globals()['DocumentSendRequestSelectedApproversGroupAssignees'] = DocumentSendRequestSelectedApproversGroupAssignees + + +class DocumentSendRequestSelectedApproversGroup(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'assignees': ([DocumentSendRequestSelectedApproversGroupAssignees],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'assignees': 'assignees', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, type, assignees, *args, **kwargs): # noqa: E501 + """DocumentSendRequestSelectedApproversGroup - a model defined in OpenAPI + + Args: + id (str): Group ID + type (str): Group type + assignees ([DocumentSendRequestSelectedApproversGroupAssignees]): Assignees for the group + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.assignees = assignees + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, type, assignees, *args, **kwargs): # noqa: E501 + """DocumentSendRequestSelectedApproversGroup - a model defined in OpenAPI + + Args: + id (str): Group ID + type (str): Group type + assignees ([DocumentSendRequestSelectedApproversGroupAssignees]): Assignees for the group + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.assignees = assignees + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pandadoc_client/model/document_send_request_selected_approvers_group_assignees.py b/pandadoc_client/model/document_send_request_selected_approvers_group_assignees.py new file mode 100644 index 0000000..54324ac --- /dev/null +++ b/pandadoc_client/model/document_send_request_selected_approvers_group_assignees.py @@ -0,0 +1,258 @@ +""" + PandaDoc Public API + + PandaDoc Public API documentation # noqa: E501 + + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from pandadoc_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from pandadoc_client.exceptions import ApiAttributeError + + + +class DocumentSendRequestSelectedApproversGroupAssignees(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'user': (str,), # noqa: E501 + 'is_selected': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'user': 'user', # noqa: E501 + 'is_selected': 'is_selected', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DocumentSendRequestSelectedApproversGroupAssignees - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + user (str): User ID. [optional] # noqa: E501 + is_selected (bool): Whether the user is selected. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """DocumentSendRequestSelectedApproversGroupAssignees - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + user (str): User ID. [optional] # noqa: E501 + is_selected (bool): Whether the user is selected. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pandadoc_client/model/document_send_request_selected_approvers_steps.py b/pandadoc_client/model/document_send_request_selected_approvers_steps.py new file mode 100644 index 0000000..fbdba40 --- /dev/null +++ b/pandadoc_client/model/document_send_request_selected_approvers_steps.py @@ -0,0 +1,272 @@ +""" + PandaDoc Public API + + PandaDoc Public API documentation # noqa: E501 + + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from pandadoc_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from pandadoc_client.exceptions import ApiAttributeError + + +def lazy_import(): + from pandadoc_client.model.document_send_request_selected_approvers_group import DocumentSendRequestSelectedApproversGroup + globals()['DocumentSendRequestSelectedApproversGroup'] = DocumentSendRequestSelectedApproversGroup + + +class DocumentSendRequestSelectedApproversSteps(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'group': (DocumentSendRequestSelectedApproversGroup,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'group': 'group', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, group, *args, **kwargs): # noqa: E501 + """DocumentSendRequestSelectedApproversSteps - a model defined in OpenAPI + + Args: + id (str): Step ID + group (DocumentSendRequestSelectedApproversGroup): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.group = group + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, group, *args, **kwargs): # noqa: E501 + """DocumentSendRequestSelectedApproversSteps - a model defined in OpenAPI + + Args: + id (str): Step ID + group (DocumentSendRequestSelectedApproversGroup): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.group = group + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/pandadoc_client/models/__init__.py b/pandadoc_client/models/__init__.py index 55209c4..25631ba 100644 --- a/pandadoc_client/models/__init__.py +++ b/pandadoc_client/models/__init__.py @@ -47,7 +47,14 @@ from pandadoc_client.model.document_list_response import DocumentListResponse from pandadoc_client.model.document_list_response_results import DocumentListResponseResults from pandadoc_client.model.document_ordering_fields_enum import DocumentOrderingFieldsEnum +from pandadoc_client.model.document_recipient_create_request import DocumentRecipientCreateRequest +from pandadoc_client.model.document_recipient_edit_request import DocumentRecipientEditRequest from pandadoc_client.model.document_send_request import DocumentSendRequest +from pandadoc_client.model.document_send_request_forwarding_settings import DocumentSendRequestForwardingSettings +from pandadoc_client.model.document_send_request_selected_approvers import DocumentSendRequestSelectedApprovers +from pandadoc_client.model.document_send_request_selected_approvers_group import DocumentSendRequestSelectedApproversGroup +from pandadoc_client.model.document_send_request_selected_approvers_group_assignees import DocumentSendRequestSelectedApproversGroupAssignees +from pandadoc_client.model.document_send_request_selected_approvers_steps import DocumentSendRequestSelectedApproversSteps from pandadoc_client.model.document_send_response import DocumentSendResponse from pandadoc_client.model.document_status_change_request import DocumentStatusChangeRequest from pandadoc_client.model.document_status_enum import DocumentStatusEnum diff --git a/setup.py b/setup.py index be62f42..294325a 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ description = full_description[0:from_index] + full_description[to_index::] NAME = "pandadoc-python-client" -VERSION = "5.5.0" +VERSION = "5.7.0" # To install the library, run the following # # python setup.py install