diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 9de89c7..d89e40a 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -22,6 +22,9 @@ jobs: - name: Build SDK run: ./run-build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status diff --git a/README.md b/README.md index 263486d..4b21611 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Python 3.7+ Install using `pip`: ```shell -python3 -m pip install dropbox-sign==1.6.1 +python3 -m pip install dropbox-sign==1.7.0 ``` Alternatively: @@ -115,6 +115,11 @@ Class | Method | HTTP request | Description ```BulkSendJobApi``` | [```bulk_send_job_list```](docs/BulkSendJobApi.md#bulk_send_job_list) | ```GET /bulk_send_job/list``` | List Bulk Send Jobs| |```EmbeddedApi``` | [```embedded_edit_url```](docs/EmbeddedApi.md#embedded_edit_url) | ```POST /embedded/edit_url/{template_id}``` | Get Embedded Template Edit URL| ```EmbeddedApi``` | [```embedded_sign_url```](docs/EmbeddedApi.md#embedded_sign_url) | ```GET /embedded/sign_url/{signature_id}``` | Get Embedded Sign URL| +|```FaxApi``` | [```fax_delete```](docs/FaxApi.md#fax_delete) | ```DELETE /fax/{fax_id}``` | Delete Fax| +```FaxApi``` | [```fax_files```](docs/FaxApi.md#fax_files) | ```GET /fax/files/{fax_id}``` | List Fax Files| +```FaxApi``` | [```fax_get```](docs/FaxApi.md#fax_get) | ```GET /fax/{fax_id}``` | Get Fax| +```FaxApi``` | [```fax_list```](docs/FaxApi.md#fax_list) | ```GET /fax/list``` | Lists Faxes| +```FaxApi``` | [```fax_send```](docs/FaxApi.md#fax_send) | ```POST /fax/send``` | Send Fax| |```FaxLineApi``` | [```fax_line_add_user```](docs/FaxLineApi.md#fax_line_add_user) | ```PUT /fax_line/add_user``` | Add Fax Line User| ```FaxLineApi``` | [```fax_line_area_code_get```](docs/FaxLineApi.md#fax_line_area_code_get) | ```GET /fax_line/area_codes``` | Get Available Fax Line Area Codes| ```FaxLineApi``` | [```fax_line_create```](docs/FaxLineApi.md#fax_line_create) | ```POST /fax_line/create``` | Purchase Fax Line| @@ -152,7 +157,7 @@ Class | Method | HTTP request | Description ```TeamApi``` | [```team_sub_teams```](docs/TeamApi.md#team_sub_teams) | ```GET /team/sub_teams/{team_id}``` | List Sub Teams| ```TeamApi``` | [```team_update```](docs/TeamApi.md#team_update) | ```PUT /team``` | Update Team| |```TemplateApi``` | [```template_add_user```](docs/TemplateApi.md#template_add_user) | ```POST /template/add_user/{template_id}``` | Add User to Template| -```TemplateApi``` | [```template_create```](docs/TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| +```TemplateApi``` | [```template_create```](docs/TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| ```TemplateApi``` | [```template_create_embedded_draft```](docs/TemplateApi.md#template_create_embedded_draft) | ```POST /template/create_embedded_draft``` | Create Embedded Template Draft| ```TemplateApi``` | [```template_delete```](docs/TemplateApi.md#template_delete) | ```POST /template/delete/{template_id}``` | Delete Template| ```TemplateApi``` | [```template_files```](docs/TemplateApi.md#template_files) | ```GET /template/files/{template_id}``` | Get Template Files| @@ -204,6 +209,7 @@ Class | Method | HTTP request | Description - [EventCallbackRequest](docs/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [FaxGetResponse](docs/FaxGetResponse.md) - [FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) - [FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) - [FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) @@ -215,6 +221,10 @@ Class | Method | HTTP request | Description - [FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) - [FaxLineResponse](docs/FaxLineResponse.md) - [FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) + - [FaxListResponse](docs/FaxListResponse.md) + - [FaxResponse](docs/FaxResponse.md) + - [FaxResponseTransmission](docs/FaxResponseTransmission.md) + - [FaxSendRequest](docs/FaxSendRequest.md) - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) @@ -381,6 +391,6 @@ apisupport@hellosign.com This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- Package version: 1.6.1 +- Package version: 1.7.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen diff --git a/VERSION b/VERSION index 9c6d629..bd8bf88 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.1 +1.7.0 diff --git a/docs/AccountResponseQuotas.md b/docs/AccountResponseQuotas.md index 740ad23..1894473 100644 --- a/docs/AccountResponseQuotas.md +++ b/docs/AccountResponseQuotas.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes | `documents_left` | ```int``` | Signature requests remaining. | | | `templates_total` | ```int``` | Total API templates allowed. | | | `templates_left` | ```int``` | API templates remaining. | | -| `sms_verifications_left` | ```int``` | SMS verifications remaining. | | +| `sms_verifications_left` | ```int``` | SMS verifications remaining. | | | `num_fax_pages_left` | ```int``` | Number of fax pages left | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FaxApi.md b/docs/FaxApi.md new file mode 100644 index 0000000..a0b2cbd --- /dev/null +++ b/docs/FaxApi.md @@ -0,0 +1,334 @@ +# ```dropbox_sign.FaxApi``` + +All URIs are relative to *https://api.hellosign.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +|[```fax_delete```](FaxApi.md#fax_delete) | ```DELETE /fax/{fax_id}``` | Delete Fax| +|[```fax_files```](FaxApi.md#fax_files) | ```GET /fax/files/{fax_id}``` | List Fax Files| +|[```fax_get```](FaxApi.md#fax_get) | ```GET /fax/{fax_id}``` | Get Fax| +|[```fax_list```](FaxApi.md#fax_list) | ```GET /fax/list``` | Lists Faxes| +|[```fax_send```](FaxApi.md#fax_send) | ```POST /fax/send``` | Send Fax| + + +# ```fax_delete``` +> ```fax_delete(fax_id)``` + +Delete Fax + +Deletes the specified Fax from the system. + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + try: + fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967") + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **str** | Fax ID | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```fax_files``` +> ```io.IOBase fax_files(fax_id)``` + +List Fax Files + +Returns list of fax files + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + + try: + response = fax_api.fax_files(fax_id) + open("file_response.pdf", "wb").write(response.read()) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **str** | Fax ID | | + +### Return type + +**io.IOBase** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/pdf, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```fax_get``` +> ```FaxGetResponse fax_get(fax_id)``` + +Get Fax + +Returns information about fax + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + + try: + response = fax_api.fax_get(fax_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **str** | Fax ID | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```fax_list``` +> ```FaxListResponse fax_list()``` + +Lists Faxes + +Returns properties of multiple faxes + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + page = 1 + page_size = 2 + + try: + response = fax_api.fax_list( + page=page, + page_size=page_size, + ) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `page` | **int** | Page | [optional][default to 1] | +| `page_size` | **int** | Page size | [optional][default to 20] | + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```fax_send``` +> ```FaxGetResponse fax_send(fax_send_request)``` + +Send Fax + +Action to prepare and send a fax + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + data = models.FaxSendRequest( + files=[open("example_signature_request.pdf", "rb")], + test_mode=True, + recipient="16690000001", + sender="16690000000", + cover_page_to="Jill Fax", + cover_page_message="I'm sending you a fax!", + cover_page_from="Faxer Faxerson", + title="This is what the fax is about!", + ) + + try: + response = fax_api.fax_send(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_send_request` | [**FaxSendRequest**](FaxSendRequest.md) | | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/FaxGetResponse.md b/docs/FaxGetResponse.md new file mode 100644 index 0000000..02b92d6 --- /dev/null +++ b/docs/FaxGetResponse.md @@ -0,0 +1,12 @@ +# FaxGetResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FaxListResponse.md b/docs/FaxListResponse.md new file mode 100644 index 0000000..e57c188 --- /dev/null +++ b/docs/FaxListResponse.md @@ -0,0 +1,12 @@ +# FaxListResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxes`*_required_ | [```List[FaxResponse]```](FaxResponse.md) | | | +| `list_info`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FaxResponse.md b/docs/FaxResponse.md new file mode 100644 index 0000000..d531f5d --- /dev/null +++ b/docs/FaxResponse.md @@ -0,0 +1,20 @@ +# FaxResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `fax_id`*_required_ | ```str``` | Fax ID | | +| `title`*_required_ | ```str``` | Fax Title | | +| `original_title`*_required_ | ```str``` | Fax Original Title | | +| `subject`*_required_ | ```str``` | Fax Subject | | +| `message`*_required_ | ```str``` | Fax Message | | +| `metadata`*_required_ | ```Dict[str, object]``` | Fax Metadata | | +| `created_at`*_required_ | ```int``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```str``` | Fax Sender Email | | +| `transmissions`*_required_ | [```List[FaxResponseTransmission]```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `files_url`*_required_ | ```str``` | Fax Files URL | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FaxResponseTransmission.md b/docs/FaxResponseTransmission.md new file mode 100644 index 0000000..9ba09c1 --- /dev/null +++ b/docs/FaxResponseTransmission.md @@ -0,0 +1,14 @@ +# FaxResponseTransmission + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `recipient`*_required_ | ```str``` | Fax Transmission Recipient | | +| `sender`*_required_ | ```str``` | Fax Transmission Sender | | +| `status_code`*_required_ | ```str``` | Fax Transmission Status Code | | +| `sent_at` | ```int``` | Fax Transmission Sent Timestamp | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FaxSendRequest.md b/docs/FaxSendRequest.md new file mode 100644 index 0000000..cdb4f49 --- /dev/null +++ b/docs/FaxSendRequest.md @@ -0,0 +1,19 @@ +# FaxSendRequest + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `recipient`*_required_ | ```str``` | Fax Send To Recipient | | +| `sender` | ```str``` | Fax Send From Sender (used only with fax number) | | +| `files` | ```List[io.IOBase]``` | Fax File to Send | | +| `file_urls` | ```List[str]``` | Fax File URL to Send | | +| `test_mode` | ```bool``` | API Test Mode Setting | [default to False] | +| `cover_page_to` | ```str``` | Fax Cover Page for Recipient | | +| `cover_page_from` | ```str``` | Fax Cover Page for Sender | | +| `cover_page_message` | ```str``` | Fax Cover Page Message | | +| `title` | ```str``` | Fax Title | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/OAuthApi.md b/docs/OAuthApi.md index 969109c..b267756 100644 --- a/docs/OAuthApi.md +++ b/docs/OAuthApi.md @@ -67,6 +67,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -126,6 +127,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/OAuthTokenRefreshRequest.md b/docs/OAuthTokenRefreshRequest.md index 9322c48..87662c9 100644 --- a/docs/OAuthTokenRefreshRequest.md +++ b/docs/OAuthTokenRefreshRequest.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `grant_type`*_required_ | ```str``` | When refreshing an existing token use `refresh_token`. | [default to 'refresh_token'] | | `refresh_token`*_required_ | ```str``` | The token provided when you got the expired access token. | | +| `client_id` | ```str``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `client_secret` | ```str``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignatureRequestApi.md b/docs/SignatureRequestApi.md index a4554ef..2db45f1 100644 --- a/docs/SignatureRequestApi.md +++ b/docs/SignatureRequestApi.md @@ -253,7 +253,7 @@ with ApiClient(configuration) as api_client: Cancel Incomplete Signature Request -Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. +Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. ### Example diff --git a/docs/SubWhiteLabelingOptions.md b/docs/SubWhiteLabelingOptions.md index ac30153..f911527 100644 --- a/docs/SubWhiteLabelingOptions.md +++ b/docs/SubWhiteLabelingOptions.md @@ -7,20 +7,20 @@ Take a look at our [white labeling guide](https://developers.hellosign.com/api/r ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `header_background_color` | ```str``` | | [default to '#1A1A1A'] | +| `header_background_color` | ```str``` | | [default to '#1a1a1a'] | | `legal_version` | ```str``` | | [default to 'terms1'] | -| `link_color` | ```str``` | | [default to '#00B3E6'] | -| `page_background_color` | ```str``` | | [default to '#F7F8F9'] | -| `primary_button_color` | ```str``` | | [default to '#00B3E6'] | -| `primary_button_color_hover` | ```str``` | | [default to '#00B3E6'] | -| `primary_button_text_color` | ```str``` | | [default to '#FFFFFF'] | -| `primary_button_text_color_hover` | ```str``` | | [default to '#FFFFFF'] | -| `secondary_button_color` | ```str``` | | [default to '#FFFFFF'] | -| `secondary_button_color_hover` | ```str``` | | [default to '#FFFFFF'] | -| `secondary_button_text_color` | ```str``` | | [default to '#00B3E6'] | -| `secondary_button_text_color_hover` | ```str``` | | [default to '#00B3E6'] | +| `link_color` | ```str``` | | [default to '#0061FE'] | +| `page_background_color` | ```str``` | | [default to '#f7f8f9'] | +| `primary_button_color` | ```str``` | | [default to '#0061FE'] | +| `primary_button_color_hover` | ```str``` | | [default to '#0061FE'] | +| `primary_button_text_color` | ```str``` | | [default to '#ffffff'] | +| `primary_button_text_color_hover` | ```str``` | | [default to '#ffffff'] | +| `secondary_button_color` | ```str``` | | [default to '#ffffff'] | +| `secondary_button_color_hover` | ```str``` | | [default to '#ffffff'] | +| `secondary_button_text_color` | ```str``` | | [default to '#0061FE'] | +| `secondary_button_text_color_hover` | ```str``` | | [default to '#0061FE'] | | `text_color1` | ```str``` | | [default to '#808080'] | -| `text_color2` | ```str``` | | [default to '#FFFFFF'] | +| `text_color2` | ```str``` | | [default to '#ffffff'] | | `reset_to_default` | ```bool``` | Resets white labeling options to defaults. Only useful when updating an API App. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateApi.md b/docs/TemplateApi.md index 9adb98a..153be9c 100644 --- a/docs/TemplateApi.md +++ b/docs/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- |[```template_add_user```](TemplateApi.md#template_add_user) | ```POST /template/add_user/{template_id}``` | Add User to Template| -|[```template_create```](TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| +|[```template_create```](TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| |[```template_create_embedded_draft```](TemplateApi.md#template_create_embedded_draft) | ```POST /template/create_embedded_draft``` | Create Embedded Template Draft| |[```template_delete```](TemplateApi.md#template_delete) | ```POST /template/delete/{template_id}``` | Delete Template| |[```template_files```](TemplateApi.md#template_files) | ```GET /template/files/{template_id}``` | Get Template Files| @@ -90,7 +90,7 @@ with ApiClient(configuration) as api_client: # ```template_create``` > ```TemplateCreateResponse template_create(template_create_request)``` -Create Template +Create Template Creates a template that can then be used. diff --git a/docs/TemplateResponse.md b/docs/TemplateResponse.md index 7fb5ced..315cf71 100644 --- a/docs/TemplateResponse.md +++ b/docs/TemplateResponse.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes | `title` | ```str``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `message` | ```str``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `updated_at` | ```int``` | Time the template was last updated. | | -| `is_embedded` | ```bool``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `is_embedded` | ```bool``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | | `is_creator` | ```bool``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | | `can_edit` | ```bool``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | | `is_locked` | ```bool``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | @@ -20,6 +20,7 @@ Name | Type | Description | Notes | `custom_fields` | [```List[TemplateResponseDocumentCustomFieldBase]```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `named_form_fields` | [```List[TemplateResponseDocumentFormFieldBase]```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `accounts` | [```List[TemplateResponseAccount]```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```List[SignatureRequestResponseAttachment]```](SignatureRequestResponseAttachment.md) | Signer attachments. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldBase.md b/docs/TemplateResponseDocumentFormFieldBase.md index b8aecfa..a0c465c 100644 --- a/docs/TemplateResponseDocumentFormFieldBase.md +++ b/docs/TemplateResponseDocumentFormFieldBase.md @@ -14,7 +14,6 @@ Name | Type | Description | Notes | `width` | ```int``` | The width in pixels of this form field. | | | `height` | ```int``` | The height in pixels of this form field. | | | `required` | ```bool``` | Boolean showing whether or not this field is required. | | -| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldCheckbox.md b/docs/TemplateResponseDocumentFormFieldCheckbox.md index 6d35e1c..1a2167a 100644 --- a/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'checkbox'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldDateSigned.md b/docs/TemplateResponseDocumentFormFieldDateSigned.md index 863ed11..a9add1a 100644 --- a/docs/TemplateResponseDocumentFormFieldDateSigned.md +++ b/docs/TemplateResponseDocumentFormFieldDateSigned.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'date_signed'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldDropdown.md b/docs/TemplateResponseDocumentFormFieldDropdown.md index 99d0733..40d2cf2 100644 --- a/docs/TemplateResponseDocumentFormFieldDropdown.md +++ b/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'dropdown'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldHyperlink.md b/docs/TemplateResponseDocumentFormFieldHyperlink.md index dd7db8d..ec6a6e4 100644 --- a/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes | `is_multiline` | ```bool``` | Whether this form field is multiline text. | | | `original_font_size` | ```int``` | Original font size used in this form field's text. | | | `font_family` | ```str``` | Font family used in this form field's text. | | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldInitials.md b/docs/TemplateResponseDocumentFormFieldInitials.md index 80cc522..77acaa8 100644 --- a/docs/TemplateResponseDocumentFormFieldInitials.md +++ b/docs/TemplateResponseDocumentFormFieldInitials.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'initials'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldRadio.md b/docs/TemplateResponseDocumentFormFieldRadio.md index af3e60e..9db9a8d 100644 --- a/docs/TemplateResponseDocumentFormFieldRadio.md +++ b/docs/TemplateResponseDocumentFormFieldRadio.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'radio'] | +| `group`*_required_ | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldSignature.md b/docs/TemplateResponseDocumentFormFieldSignature.md index 304eaf5..adce267 100644 --- a/docs/TemplateResponseDocumentFormFieldSignature.md +++ b/docs/TemplateResponseDocumentFormFieldSignature.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'signature'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldText.md b/docs/TemplateResponseDocumentFormFieldText.md index bafb6e3..9e66042 100644 --- a/docs/TemplateResponseDocumentFormFieldText.md +++ b/docs/TemplateResponseDocumentFormFieldText.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes | `original_font_size` | ```int``` | Original font size used in this form field's text. | | | `font_family` | ```str``` | Font family used in this form field's text. | | | `validation_type` | ```str``` | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/dropbox_sign/__init__.py b/dropbox_sign/__init__.py index 745b9e1..9aa6a40 100644 --- a/dropbox_sign/__init__.py +++ b/dropbox_sign/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.6.1" +__version__ = "1.7.0" # import apis into sdk package from dropbox_sign.apis import * @@ -80,6 +80,7 @@ from dropbox_sign.models.event_callback_request_event_metadata import ( EventCallbackRequestEventMetadata, ) +from dropbox_sign.models.fax_get_response import FaxGetResponse from dropbox_sign.models.fax_line_add_user_request import FaxLineAddUserRequest from dropbox_sign.models.fax_line_area_code_get_country_enum import ( FaxLineAreaCodeGetCountryEnum, @@ -99,6 +100,10 @@ from dropbox_sign.models.fax_line_remove_user_request import FaxLineRemoveUserRequest from dropbox_sign.models.fax_line_response import FaxLineResponse from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine +from dropbox_sign.models.fax_list_response import FaxListResponse +from dropbox_sign.models.fax_response import FaxResponse +from dropbox_sign.models.fax_response_transmission import FaxResponseTransmission +from dropbox_sign.models.fax_send_request import FaxSendRequest from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri from dropbox_sign.models.list_info_response import ListInfoResponse diff --git a/dropbox_sign/api/__init__.py b/dropbox_sign/api/__init__.py index c861b68..f4000e5 100644 --- a/dropbox_sign/api/__init__.py +++ b/dropbox_sign/api/__init__.py @@ -5,6 +5,7 @@ from dropbox_sign.api.api_app_api import ApiAppApi from dropbox_sign.api.bulk_send_job_api import BulkSendJobApi from dropbox_sign.api.embedded_api import EmbeddedApi +from dropbox_sign.api.fax_api import FaxApi from dropbox_sign.api.fax_line_api import FaxLineApi from dropbox_sign.api.o_auth_api import OAuthApi from dropbox_sign.api.report_api import ReportApi diff --git a/dropbox_sign/api/fax_api.py b/dropbox_sign/api/fax_api.py new file mode 100644 index 0000000..3e49a16 --- /dev/null +++ b/dropbox_sign/api/fax_api.py @@ -0,0 +1,1327 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictStr +from typing import Optional, Union +from typing_extensions import Annotated +from dropbox_sign.models.fax_get_response import FaxGetResponse +from dropbox_sign.models.fax_list_response import FaxListResponse +from dropbox_sign.models.fax_send_request import FaxSendRequest + +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io + + +class FaxApi: + """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) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def fax_delete( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete Fax + + Deletes the specified Fax from the system. + + :param fax_id: Fax ID (required) + :type fax_id: str + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_delete_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def fax_delete_with_http_info( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Fax + + Deletes the specified Fax from the system. + + :param fax_id: Fax ID (required) + :type fax_id: str + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_delete_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def fax_delete_without_preload_content( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Fax + + Deletes the specified Fax from the system. + + :param fax_id: Fax ID (required) + :type fax_id: str + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_delete_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_delete_serialize( + self, + fax_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if fax_id is not None: + _path_params["fax_id"] = fax_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["api_key"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/fax/{fax_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def fax_files( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> io.IOBase: + """List Fax Files + + Returns list of fax files + + :param fax_id: Fax ID (required) + :type fax_id: str + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_files_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "io.IOBase", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def fax_files_with_http_info( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[io.IOBase]: + """List Fax Files + + Returns list of fax files + + :param fax_id: Fax ID (required) + :type fax_id: str + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_files_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "io.IOBase", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def fax_files_without_preload_content( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Fax Files + + Returns list of fax files + + :param fax_id: Fax ID (required) + :type fax_id: str + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_files_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "io.IOBase", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_files_serialize( + self, + fax_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if fax_id is not None: + _path_params["fax_id"] = fax_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/pdf", "application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["api_key"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/fax/files/{fax_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def fax_get( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FaxGetResponse: + """Get Fax + + Returns information about fax + + :param fax_id: Fax ID (required) + :type fax_id: str + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_get_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def fax_get_with_http_info( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FaxGetResponse]: + """Get Fax + + Returns information about fax + + :param fax_id: Fax ID (required) + :type fax_id: str + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_get_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def fax_get_without_preload_content( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Fax + + Returns information about fax + + :param fax_id: Fax ID (required) + :type fax_id: str + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_get_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_get_serialize( + self, + fax_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if fax_id is not None: + _path_params["fax_id"] = fax_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["api_key"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/fax/{fax_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def fax_list( + self, + page: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=1)]], + Field(description="Page"), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field(description="Page size"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FaxListResponse: + """Lists Faxes + + Returns properties of multiple faxes + + :param page: Page + :type page: int + :param page_size: Page size + :type page_size: int + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxListResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def fax_list_with_http_info( + self, + page: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=1)]], + Field(description="Page"), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field(description="Page size"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FaxListResponse]: + """Lists Faxes + + Returns properties of multiple faxes + + :param page: Page + :type page: int + :param page_size: Page size + :type page_size: int + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxListResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def fax_list_without_preload_content( + self, + page: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=1)]], + Field(description="Page"), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field(description="Page size"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Lists Faxes + + Returns properties of multiple faxes + + :param page: Page + :type page: int + :param page_size: Page size + :type page_size: int + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxListResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_list_serialize( + self, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(("page", page)) + + if page_size is not None: + + _query_params.append(("page_size", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["api_key"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/fax/list", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def fax_send( + self, + fax_send_request: FaxSendRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FaxGetResponse: + """Send Fax + + Action to prepare and send a fax + + :param fax_send_request: (required) + :type fax_send_request: FaxSendRequest + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_send_serialize( + fax_send_request=fax_send_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def fax_send_with_http_info( + self, + fax_send_request: FaxSendRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FaxGetResponse]: + """Send Fax + + Action to prepare and send a fax + + :param fax_send_request: (required) + :type fax_send_request: FaxSendRequest + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_send_serialize( + fax_send_request=fax_send_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def fax_send_without_preload_content( + self, + fax_send_request: FaxSendRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send Fax + + Action to prepare and send a fax + + :param fax_send_request: (required) + :type fax_send_request: FaxSendRequest + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fax_send_serialize( + fax_send_request=fax_send_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_send_serialize( + self, + fax_send_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = fax_send_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f"{param_name}[{index}]"] = item + else: + _files[param_name] = param_value + + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if fax_send_request is not None and has_files is False: + _body_params = fax_send_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["api_key"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/fax/send", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/dropbox_sign/api/o_auth_api.py b/dropbox_sign/api/o_auth_api.py index d5035a1..bedd1bf 100644 --- a/dropbox_sign/api/o_auth_api.py +++ b/dropbox_sign/api/o_auth_api.py @@ -93,6 +93,7 @@ def oauth_token_generate( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -157,6 +158,7 @@ def oauth_token_generate_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -221,6 +223,7 @@ def oauth_token_generate_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -366,6 +369,7 @@ def oauth_token_refresh( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -430,6 +434,7 @@ def oauth_token_refresh_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -494,6 +499,7 @@ def oauth_token_refresh_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout diff --git a/dropbox_sign/api/signature_request_api.py b/dropbox_sign/api/signature_request_api.py index 4298079..f78d1a2 100644 --- a/dropbox_sign/api/signature_request_api.py +++ b/dropbox_sign/api/signature_request_api.py @@ -649,7 +649,7 @@ def signature_request_cancel( ) -> None: """Cancel Incomplete Signature Request - Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. :param signature_request_id: The id of the incomplete SignatureRequest to cancel. (required) :type signature_request_id: str @@ -717,7 +717,7 @@ def signature_request_cancel_with_http_info( ) -> ApiResponse[None]: """Cancel Incomplete Signature Request - Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. :param signature_request_id: The id of the incomplete SignatureRequest to cancel. (required) :type signature_request_id: str @@ -785,7 +785,7 @@ def signature_request_cancel_without_preload_content( ) -> RESTResponseType: """Cancel Incomplete Signature Request - Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. :param signature_request_id: The id of the incomplete SignatureRequest to cancel. (required) :type signature_request_id: str diff --git a/dropbox_sign/api/template_api.py b/dropbox_sign/api/template_api.py index 9f87978..87be9f0 100644 --- a/dropbox_sign/api/template_api.py +++ b/dropbox_sign/api/template_api.py @@ -372,7 +372,7 @@ def template_create( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TemplateCreateResponse: - """Create Template + """Create Template Creates a template that can then be used. @@ -437,7 +437,7 @@ def template_create_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TemplateCreateResponse]: - """Create Template + """Create Template Creates a template that can then be used. @@ -502,7 +502,7 @@ def template_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Template + """Create Template Creates a template that can then be used. diff --git a/dropbox_sign/api_client.py b/dropbox_sign/api_client.py index 1e4ece7..bf8122b 100644 --- a/dropbox_sign/api_client.py +++ b/dropbox_sign/api_client.py @@ -89,7 +89,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.6.1/python" + self.user_agent = "OpenAPI-Generator/1.7.0/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/dropbox_sign/apis/__init__.py b/dropbox_sign/apis/__init__.py index 16344f3..0df6380 100644 --- a/dropbox_sign/apis/__init__.py +++ b/dropbox_sign/apis/__init__.py @@ -5,6 +5,7 @@ from dropbox_sign.api.api_app_api import ApiAppApi from dropbox_sign.api.bulk_send_job_api import BulkSendJobApi from dropbox_sign.api.embedded_api import EmbeddedApi +from dropbox_sign.api.fax_api import FaxApi from dropbox_sign.api.fax_line_api import FaxLineApi from dropbox_sign.api.o_auth_api import OAuthApi from dropbox_sign.api.report_api import ReportApi diff --git a/dropbox_sign/configuration.py b/dropbox_sign/configuration.py index 948f96c..6a812ba 100644 --- a/dropbox_sign/configuration.py +++ b/dropbox_sign/configuration.py @@ -432,7 +432,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 3.0.0\n" - "SDK Version: 1.6.1".format(env=sys.platform, pyversion=sys.version) + "SDK Version: 1.7.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/dropbox_sign/models/__init__.py b/dropbox_sign/models/__init__.py index 919a66d..97af402 100644 --- a/dropbox_sign/models/__init__.py +++ b/dropbox_sign/models/__init__.py @@ -63,6 +63,7 @@ from dropbox_sign.models.event_callback_request_event_metadata import ( EventCallbackRequestEventMetadata, ) +from dropbox_sign.models.fax_get_response import FaxGetResponse from dropbox_sign.models.fax_line_add_user_request import FaxLineAddUserRequest from dropbox_sign.models.fax_line_area_code_get_country_enum import ( FaxLineAreaCodeGetCountryEnum, @@ -82,6 +83,10 @@ from dropbox_sign.models.fax_line_remove_user_request import FaxLineRemoveUserRequest from dropbox_sign.models.fax_line_response import FaxLineResponse from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine +from dropbox_sign.models.fax_list_response import FaxListResponse +from dropbox_sign.models.fax_response import FaxResponse +from dropbox_sign.models.fax_response_transmission import FaxResponseTransmission +from dropbox_sign.models.fax_send_request import FaxSendRequest from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri from dropbox_sign.models.list_info_response import ListInfoResponse diff --git a/dropbox_sign/models/account_response_quotas.py b/dropbox_sign/models/account_response_quotas.py index 1b90d41..a584445 100644 --- a/dropbox_sign/models/account_response_quotas.py +++ b/dropbox_sign/models/account_response_quotas.py @@ -45,7 +45,7 @@ class AccountResponseQuotas(BaseModel): default=None, description="API templates remaining." ) sms_verifications_left: Optional[StrictInt] = Field( - default=None, description="SMS verifications remaining." + default=None, description="SMS verifications remaining." ) num_fax_pages_left: Optional[StrictInt] = Field( default=None, description="Number of fax pages left" diff --git a/dropbox_sign/models/fax_get_response.py b/dropbox_sign/models/fax_get_response.py new file mode 100644 index 0000000..8c2b224 --- /dev/null +++ b/dropbox_sign/models/fax_get_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.fax_response import FaxResponse +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxGetResponse(BaseModel): + """ + FaxGetResponse + """ # noqa: E501 + + fax: FaxResponse + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) + __properties: ClassVar[List[str]] = ["fax", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of fax + if self.fax: + _dict["fax"] = self.fax.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) + _items = [] + if self.warnings: + for _item_warnings in self.warnings: + if _item_warnings: + _items.append(_item_warnings.to_dict()) + _dict["warnings"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "fax": ( + FaxResponse.from_dict(obj["fax"]) + if obj.get("fax") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "fax": "(FaxResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "warnings", + ] diff --git a/dropbox_sign/models/fax_list_response.py b/dropbox_sign/models/fax_list_response.py new file mode 100644 index 0000000..b62b406 --- /dev/null +++ b/dropbox_sign/models/fax_list_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dropbox_sign.models.fax_response import FaxResponse +from dropbox_sign.models.list_info_response import ListInfoResponse +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxListResponse(BaseModel): + """ + FaxListResponse + """ # noqa: E501 + + faxes: List[FaxResponse] + list_info: ListInfoResponse + __properties: ClassVar[List[str]] = ["faxes", "list_info"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in faxes (list) + _items = [] + if self.faxes: + for _item_faxes in self.faxes: + if _item_faxes: + _items.append(_item_faxes.to_dict()) + _dict["faxes"] = _items + # override the default output from pydantic by calling `to_dict()` of list_info + if self.list_info: + _dict["list_info"] = self.list_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "faxes": ( + [FaxResponse.from_dict(_item) for _item in obj["faxes"]] + if obj.get("faxes") is not None + else None + ), + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "faxes": "(List[FaxResponse],)", + "list_info": "(ListInfoResponse,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "faxes", + ] diff --git a/dropbox_sign/models/fax_response.py b/dropbox_sign/models/fax_response.py new file mode 100644 index 0000000..035993f --- /dev/null +++ b/dropbox_sign/models/fax_response.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from dropbox_sign.models.fax_response_transmission import FaxResponseTransmission +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxResponse(BaseModel): + """ + FaxResponse + """ # noqa: E501 + + fax_id: StrictStr = Field(description="Fax ID") + title: StrictStr = Field(description="Fax Title") + original_title: StrictStr = Field(description="Fax Original Title") + subject: StrictStr = Field(description="Fax Subject") + message: StrictStr = Field(description="Fax Message") + metadata: Dict[str, Any] = Field(description="Fax Metadata") + created_at: StrictInt = Field(description="Fax Created At Timestamp") + sender: StrictStr = Field(description="Fax Sender Email") + transmissions: List[FaxResponseTransmission] = Field( + description="Fax Transmissions List" + ) + files_url: StrictStr = Field(description="Fax Files URL") + __properties: ClassVar[List[str]] = [ + "fax_id", + "title", + "original_title", + "subject", + "message", + "metadata", + "created_at", + "sender", + "transmissions", + "files_url", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in transmissions (list) + _items = [] + if self.transmissions: + for _item_transmissions in self.transmissions: + if _item_transmissions: + _items.append(_item_transmissions.to_dict()) + _dict["transmissions"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "fax_id": obj.get("fax_id"), + "title": obj.get("title"), + "original_title": obj.get("original_title"), + "subject": obj.get("subject"), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "created_at": obj.get("created_at"), + "sender": obj.get("sender"), + "transmissions": ( + [ + FaxResponseTransmission.from_dict(_item) + for _item in obj["transmissions"] + ] + if obj.get("transmissions") is not None + else None + ), + "files_url": obj.get("files_url"), + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "fax_id": "(str,)", + "title": "(str,)", + "original_title": "(str,)", + "subject": "(str,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "created_at": "(int,)", + "sender": "(str,)", + "transmissions": "(List[FaxResponseTransmission],)", + "files_url": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "transmissions", + ] diff --git a/dropbox_sign/models/fax_response_transmission.py b/dropbox_sign/models/fax_response_transmission.py new file mode 100644 index 0000000..c34d2e9 --- /dev/null +++ b/dropbox_sign/models/fax_response_transmission.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxResponseTransmission(BaseModel): + """ + FaxResponseTransmission + """ # noqa: E501 + + recipient: StrictStr = Field(description="Fax Transmission Recipient") + sender: StrictStr = Field(description="Fax Transmission Sender") + status_code: StrictStr = Field(description="Fax Transmission Status Code") + sent_at: Optional[StrictInt] = Field( + default=None, description="Fax Transmission Sent Timestamp" + ) + __properties: ClassVar[List[str]] = [ + "recipient", + "sender", + "status_code", + "sent_at", + ] + + @field_validator("status_code") + def status_code_validate_enum(cls, value): + """Validates the enum""" + if value not in set( + [ + "success", + "transmitting", + "error_could_not_fax", + "error_unknown", + "error_busy", + "error_no_answer", + "error_disconnected", + "error_bad_destination", + ] + ): + raise ValueError( + "must be one of enum values ('success', 'transmitting', 'error_could_not_fax', 'error_unknown', 'error_busy', 'error_no_answer', 'error_disconnected', 'error_bad_destination')" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxResponseTransmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxResponseTransmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "recipient": obj.get("recipient"), + "sender": obj.get("sender"), + "status_code": obj.get("status_code"), + "sent_at": obj.get("sent_at"), + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "recipient": "(str,)", + "sender": "(str,)", + "status_code": "(str,)", + "sent_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/dropbox_sign/models/fax_send_request.py b/dropbox_sign/models/fax_send_request.py new file mode 100644 index 0000000..9fe6c54 --- /dev/null +++ b/dropbox_sign/models/fax_send_request.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Dropbox Sign API + + Dropbox Sign v3 API + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxSendRequest(BaseModel): + """ + FaxSendRequest + """ # noqa: E501 + + recipient: StrictStr = Field(description="Fax Send To Recipient") + sender: Optional[StrictStr] = Field( + default=None, description="Fax Send From Sender (used only with fax number)" + ) + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, description="Fax File to Send" + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, description="Fax File URL to Send" + ) + test_mode: Optional[StrictBool] = Field( + default=False, description="API Test Mode Setting" + ) + cover_page_to: Optional[StrictStr] = Field( + default=None, description="Fax Cover Page for Recipient" + ) + cover_page_from: Optional[StrictStr] = Field( + default=None, description="Fax Cover Page for Sender" + ) + cover_page_message: Optional[StrictStr] = Field( + default=None, description="Fax Cover Page Message" + ) + title: Optional[StrictStr] = Field(default=None, description="Fax Title") + __properties: ClassVar[List[str]] = [ + "recipient", + "sender", + "files", + "file_urls", + "test_mode", + "cover_page_to", + "cover_page_from", + "cover_page_message", + "title", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FaxSendRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxSendRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "recipient": obj.get("recipient"), + "sender": obj.get("sender"), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "cover_page_to": obj.get("cover_page_to"), + "cover_page_from": obj.get("cover_page_from"), + "cover_page_message": obj.get("cover_page_message"), + "title": obj.get("title"), + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "recipient": "(str,)", + "sender": "(str,)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "test_mode": "(bool,)", + "cover_page_to": "(str,)", + "cover_page_from": "(str,)", + "cover_page_message": "(str,)", + "title": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "files", + "file_urls", + ] diff --git a/dropbox_sign/models/o_auth_token_refresh_request.py b/dropbox_sign/models/o_auth_token_refresh_request.py index 09535d9..5730363 100644 --- a/dropbox_sign/models/o_auth_token_refresh_request.py +++ b/dropbox_sign/models/o_auth_token_refresh_request.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set, Tuple from typing_extensions import Self import io @@ -38,7 +38,20 @@ class OAuthTokenRefreshRequest(BaseModel): refresh_token: StrictStr = Field( description="The token provided when you got the expired access token." ) - __properties: ClassVar[List[str]] = ["grant_type", "refresh_token"] + client_id: Optional[StrictStr] = Field( + default=None, + description='The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.', + ) + client_secret: Optional[StrictStr] = Field( + default=None, + description='The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.', + ) + __properties: ClassVar[List[str]] = [ + "grant_type", + "refresh_token", + "client_id", + "client_secret", + ] model_config = ConfigDict( populate_by_name=True, @@ -109,6 +122,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: else "refresh_token" ), "refresh_token": obj.get("refresh_token"), + "client_id": obj.get("client_id"), + "client_secret": obj.get("client_secret"), } ) return _obj @@ -128,6 +143,8 @@ def openapi_types(cls) -> Dict[str, str]: return { "grant_type": "(str,)", "refresh_token": "(str,)", + "client_id": "(str,)", + "client_secret": "(str,)", } @classmethod diff --git a/dropbox_sign/models/sub_white_labeling_options.py b/dropbox_sign/models/sub_white_labeling_options.py index 63b8b6f..218da2a 100644 --- a/dropbox_sign/models/sub_white_labeling_options.py +++ b/dropbox_sign/models/sub_white_labeling_options.py @@ -39,20 +39,20 @@ class SubWhiteLabelingOptions(BaseModel): An array of elements and values serialized to a string, to be used to customize the app's signer page. (Only applies to some API plans) Take a look at our [white labeling guide](https://developers.hellosign.com/api/reference/premium-branding/) to learn more. """ # noqa: E501 - header_background_color: Optional[StrictStr] = "#1A1A1A" + header_background_color: Optional[StrictStr] = "#1a1a1a" legal_version: Optional[StrictStr] = "terms1" - link_color: Optional[StrictStr] = "#00B3E6" - page_background_color: Optional[StrictStr] = "#F7F8F9" - primary_button_color: Optional[StrictStr] = "#00B3E6" - primary_button_color_hover: Optional[StrictStr] = "#00B3E6" - primary_button_text_color: Optional[StrictStr] = "#FFFFFF" - primary_button_text_color_hover: Optional[StrictStr] = "#FFFFFF" - secondary_button_color: Optional[StrictStr] = "#FFFFFF" - secondary_button_color_hover: Optional[StrictStr] = "#FFFFFF" - secondary_button_text_color: Optional[StrictStr] = "#00B3E6" - secondary_button_text_color_hover: Optional[StrictStr] = "#00B3E6" + link_color: Optional[StrictStr] = "#0061FE" + page_background_color: Optional[StrictStr] = "#f7f8f9" + primary_button_color: Optional[StrictStr] = "#0061FE" + primary_button_color_hover: Optional[StrictStr] = "#0061FE" + primary_button_text_color: Optional[StrictStr] = "#ffffff" + primary_button_text_color_hover: Optional[StrictStr] = "#ffffff" + secondary_button_color: Optional[StrictStr] = "#ffffff" + secondary_button_color_hover: Optional[StrictStr] = "#ffffff" + secondary_button_text_color: Optional[StrictStr] = "#0061FE" + secondary_button_text_color_hover: Optional[StrictStr] = "#0061FE" text_color1: Optional[StrictStr] = "#808080" - text_color2: Optional[StrictStr] = "#FFFFFF" + text_color2: Optional[StrictStr] = "#ffffff" reset_to_default: Optional[StrictBool] = Field( default=None, description="Resets white labeling options to defaults. Only useful when updating an API App.", @@ -151,7 +151,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "header_background_color": ( obj.get("header_background_color") if obj.get("header_background_color") is not None - else "#1A1A1A" + else "#1a1a1a" ), "legal_version": ( obj.get("legal_version") @@ -161,52 +161,52 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "link_color": ( obj.get("link_color") if obj.get("link_color") is not None - else "#00B3E6" + else "#0061FE" ), "page_background_color": ( obj.get("page_background_color") if obj.get("page_background_color") is not None - else "#F7F8F9" + else "#f7f8f9" ), "primary_button_color": ( obj.get("primary_button_color") if obj.get("primary_button_color") is not None - else "#00B3E6" + else "#0061FE" ), "primary_button_color_hover": ( obj.get("primary_button_color_hover") if obj.get("primary_button_color_hover") is not None - else "#00B3E6" + else "#0061FE" ), "primary_button_text_color": ( obj.get("primary_button_text_color") if obj.get("primary_button_text_color") is not None - else "#FFFFFF" + else "#ffffff" ), "primary_button_text_color_hover": ( obj.get("primary_button_text_color_hover") if obj.get("primary_button_text_color_hover") is not None - else "#FFFFFF" + else "#ffffff" ), "secondary_button_color": ( obj.get("secondary_button_color") if obj.get("secondary_button_color") is not None - else "#FFFFFF" + else "#ffffff" ), "secondary_button_color_hover": ( obj.get("secondary_button_color_hover") if obj.get("secondary_button_color_hover") is not None - else "#FFFFFF" + else "#ffffff" ), "secondary_button_text_color": ( obj.get("secondary_button_text_color") if obj.get("secondary_button_text_color") is not None - else "#00B3E6" + else "#0061FE" ), "secondary_button_text_color_hover": ( obj.get("secondary_button_text_color_hover") if obj.get("secondary_button_text_color_hover") is not None - else "#00B3E6" + else "#0061FE" ), "text_color1": ( obj.get("text_color1") @@ -216,7 +216,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "text_color2": ( obj.get("text_color2") if obj.get("text_color2") is not None - else "#FFFFFF" + else "#ffffff" ), "reset_to_default": obj.get("reset_to_default"), } diff --git a/dropbox_sign/models/template_response.py b/dropbox_sign/models/template_response.py index 12d203c..da77294 100644 --- a/dropbox_sign/models/template_response.py +++ b/dropbox_sign/models/template_response.py @@ -20,6 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.signature_request_response_attachment import ( + SignatureRequestResponseAttachment, +) from dropbox_sign.models.template_response_account import TemplateResponseAccount from dropbox_sign.models.template_response_cc_role import TemplateResponseCCRole from dropbox_sign.models.template_response_document import TemplateResponseDocument @@ -58,7 +61,7 @@ class TemplateResponse(BaseModel): ) is_embedded: Optional[StrictBool] = Field( default=None, - description="`true` if this template was created using an embedded flow, `false` if it was created on our website.", + description="`true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.", ) is_creator: Optional[StrictBool] = Field( default=None, @@ -98,6 +101,9 @@ class TemplateResponse(BaseModel): accounts: Optional[List[TemplateResponseAccount]] = Field( default=None, description="An array of the Accounts that can use this Template." ) + attachments: Optional[List[SignatureRequestResponseAttachment]] = Field( + default=None, description="Signer attachments." + ) __properties: ClassVar[List[str]] = [ "template_id", "title", @@ -114,6 +120,7 @@ class TemplateResponse(BaseModel): "custom_fields", "named_form_fields", "accounts", + "attachments", ] model_config = ConfigDict( @@ -208,6 +215,13 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: if _item_accounts: _items.append(_item_accounts.to_dict()) _dict["accounts"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict["attachments"] = _items return _dict @classmethod @@ -278,6 +292,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("accounts") is not None else None ), + "attachments": ( + [ + SignatureRequestResponseAttachment.from_dict(_item) + for _item in obj["attachments"] + ] + if obj.get("attachments") is not None + else None + ), } ) return _obj @@ -310,6 +332,7 @@ def openapi_types(cls) -> Dict[str, str]: "custom_fields": "(List[TemplateResponseDocumentCustomFieldBase],)", "named_form_fields": "(List[TemplateResponseDocumentFormFieldBase],)", "accounts": "(List[TemplateResponseAccount],)", + "attachments": "(List[SignatureRequestResponseAttachment],)", } @classmethod @@ -321,4 +344,5 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "custom_fields", "named_form_fields", "accounts", + "attachments", ] diff --git a/dropbox_sign/models/template_response_document_form_field_base.py b/dropbox_sign/models/template_response_document_form_field_base.py index a8052fd..62f6d5f 100644 --- a/dropbox_sign/models/template_response_document_form_field_base.py +++ b/dropbox_sign/models/template_response_document_form_field_base.py @@ -87,10 +87,6 @@ class TemplateResponseDocumentFormFieldBase(BaseModel): default=None, description="Boolean showing whether or not this field is required.", ) - group: Optional[StrictStr] = Field( - default=None, - description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", - ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -101,7 +97,6 @@ class TemplateResponseDocumentFormFieldBase(BaseModel): "width", "height", "required", - "group", ] model_config = ConfigDict( @@ -261,7 +256,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod diff --git a/dropbox_sign/models/template_response_document_form_field_checkbox.py b/dropbox_sign/models/template_response_document_form_field_checkbox.py index 9804d50..29c4ff1 100644 --- a/dropbox_sign/models/template_response_document_form_field_checkbox.py +++ b/dropbox_sign/models/template_response_document_form_field_checkbox.py @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldCheckbox(TemplateResponseDocumentFormFiel type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -142,6 +146,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -150,7 +155,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod diff --git a/dropbox_sign/models/template_response_document_form_field_date_signed.py b/dropbox_sign/models/template_response_document_form_field_date_signed.py index 14a9a2a..9b466fa 100644 --- a/dropbox_sign/models/template_response_document_form_field_date_signed.py +++ b/dropbox_sign/models/template_response_document_form_field_date_signed.py @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -40,6 +40,10 @@ class TemplateResponseDocumentFormFieldDateSigned( type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -146,6 +150,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -154,7 +159,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod diff --git a/dropbox_sign/models/template_response_document_form_field_dropdown.py b/dropbox_sign/models/template_response_document_form_field_dropdown.py index 89351e1..65b253c 100644 --- a/dropbox_sign/models/template_response_document_form_field_dropdown.py +++ b/dropbox_sign/models/template_response_document_form_field_dropdown.py @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldDropdown(TemplateResponseDocumentFormFiel type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -142,6 +146,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -150,7 +155,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod diff --git a/dropbox_sign/models/template_response_document_form_field_hyperlink.py b/dropbox_sign/models/template_response_document_form_field_hyperlink.py index 2c75298..90f0c1f 100644 --- a/dropbox_sign/models/template_response_document_form_field_hyperlink.py +++ b/dropbox_sign/models/template_response_document_form_field_hyperlink.py @@ -57,6 +57,10 @@ class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFie description="Font family used in this form field's text.", alias="fontFamily", ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -67,11 +71,11 @@ class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFie "width", "height", "required", - "group", "avg_text_length", "isMultiline", "originalFontSize", "fontFamily", + "group", ] model_config = ConfigDict( @@ -149,7 +153,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "width": obj.get("width"), "height": obj.get("height"), "required": obj.get("required"), - "group": obj.get("group"), "avg_text_length": ( TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) if obj.get("avg_text_length") is not None @@ -158,6 +161,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isMultiline": obj.get("isMultiline"), "originalFontSize": obj.get("originalFontSize"), "fontFamily": obj.get("fontFamily"), + "group": obj.get("group"), } ) return _obj @@ -180,6 +184,7 @@ def openapi_types(cls) -> Dict[str, str]: "is_multiline": "(bool,)", "original_font_size": "(int,)", "font_family": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -188,7 +193,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod diff --git a/dropbox_sign/models/template_response_document_form_field_initials.py b/dropbox_sign/models/template_response_document_form_field_initials.py index bded1e5..bc8512b 100644 --- a/dropbox_sign/models/template_response_document_form_field_initials.py +++ b/dropbox_sign/models/template_response_document_form_field_initials.py @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldInitials(TemplateResponseDocumentFormFiel type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -142,6 +146,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -150,7 +155,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod diff --git a/dropbox_sign/models/template_response_document_form_field_radio.py b/dropbox_sign/models/template_response_document_form_field_radio.py index dd394e1..7e76f9e 100644 --- a/dropbox_sign/models/template_response_document_form_field_radio.py +++ b/dropbox_sign/models/template_response_document_form_field_radio.py @@ -38,6 +38,9 @@ class TemplateResponseDocumentFormFieldRadio(TemplateResponseDocumentFormFieldBa type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: StrictStr = Field( + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields." + ) __properties: ClassVar[List[str]] = [ "type", "group", diff --git a/dropbox_sign/models/template_response_document_form_field_signature.py b/dropbox_sign/models/template_response_document_form_field_signature.py index fd82759..7e742ce 100644 --- a/dropbox_sign/models/template_response_document_form_field_signature.py +++ b/dropbox_sign/models/template_response_document_form_field_signature.py @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldSignature(TemplateResponseDocumentFormFie type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -142,6 +146,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -150,7 +155,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod diff --git a/dropbox_sign/models/template_response_document_form_field_text.py b/dropbox_sign/models/template_response_document_form_field_text.py index 752e9a2..c04d1b5 100644 --- a/dropbox_sign/models/template_response_document_form_field_text.py +++ b/dropbox_sign/models/template_response_document_form_field_text.py @@ -68,6 +68,10 @@ class TemplateResponseDocumentFormFieldText(TemplateResponseDocumentFormFieldBas default=None, description="Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.", ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -78,12 +82,12 @@ class TemplateResponseDocumentFormFieldText(TemplateResponseDocumentFormFieldBas "width", "height", "required", - "group", "avg_text_length", "isMultiline", "originalFontSize", "fontFamily", "validation_type", + "group", ] @field_validator("validation_type") @@ -186,7 +190,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "width": obj.get("width"), "height": obj.get("height"), "required": obj.get("required"), - "group": obj.get("group"), "avg_text_length": ( TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) if obj.get("avg_text_length") is not None @@ -196,6 +199,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "originalFontSize": obj.get("originalFontSize"), "fontFamily": obj.get("fontFamily"), "validation_type": obj.get("validation_type"), + "group": obj.get("group"), } ) return _obj @@ -219,6 +223,7 @@ def openapi_types(cls) -> Dict[str, str]: "original_font_size": "(int,)", "font_family": "(str,)", "validation_type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -227,7 +232,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod diff --git a/examples/FaxDelete.py b/examples/FaxDelete.py new file mode 100644 index 0000000..adf2a5d --- /dev/null +++ b/examples/FaxDelete.py @@ -0,0 +1,16 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + try: + fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967") + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxFiles.py b/examples/FaxFiles.py new file mode 100644 index 0000000..110a0f7 --- /dev/null +++ b/examples/FaxFiles.py @@ -0,0 +1,19 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + + try: + response = fax_api.fax_files(fax_id) + open("file_response.pdf", "wb").write(response.read()) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxGet.py b/examples/FaxGet.py new file mode 100644 index 0000000..c566568 --- /dev/null +++ b/examples/FaxGet.py @@ -0,0 +1,19 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + + try: + response = fax_api.fax_get(fax_id) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxList.py b/examples/FaxList.py new file mode 100644 index 0000000..6b71f79 --- /dev/null +++ b/examples/FaxList.py @@ -0,0 +1,23 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + page = 1 + page_size = 2 + + try: + response = fax_api.fax_list( + page=page, + page_size=page_size, + ) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxSend.py b/examples/FaxSend.py new file mode 100644 index 0000000..c24d6ad --- /dev/null +++ b/examples/FaxSend.py @@ -0,0 +1,28 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_api = apis.FaxApi(api_client) + + data = models.FaxSendRequest( + files=[open("example_signature_request.pdf", "rb")], + test_mode=True, + recipient="16690000001", + sender="16690000000", + cover_page_to="Jill Fax", + cover_page_message="I'm sending you a fax!", + cover_page_from="Faxer Faxerson", + title="This is what the fax is about!", + ) + + try: + response = fax_api.fax_send(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/openapi-config.yaml b/openapi-config.yaml index 6114ceb..95bd53b 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -5,7 +5,7 @@ additionalProperties: generatorLanguageVersion: ">=3.7" packageName: dropbox_sign projectName: dropbox-sign - packageVersion: 1.6.1 + packageVersion: 1.7.0 sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true packageAuthor: Dropbox Sign API Team diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index c7189fd..fe81aca 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -1409,6 +1409,304 @@ paths: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a signature url, click here.' + '/fax/{fax_id}': + get: + tags: + - Fax + summary: 'Get Fax' + description: 'Returns information about fax' + operationId: faxGet + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxGet.sh + x-meta: + seo: + title: 'Get Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax, click here.' + delete: + tags: + - Fax + summary: 'Delete Fax' + description: 'Deletes the specified Fax from the system.' + operationId: faxDelete + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 204: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxDelete.sh + x-meta: + seo: + title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax, click here.' + '/fax/files/{fax_id}': + get: + tags: + - Fax + summary: 'List Fax Files' + description: 'Returns list of fax files' + operationId: faxFiles + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/pdf: + schema: + type: string + format: binary + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxFiles.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxFiles.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxFiles.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxFiles.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxFiles.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxFiles.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxFiles.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxFiles.sh + x-meta: + seo: + title: 'Fax Files | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list fax files, click here.' /fax_line/add_user: put: tags: @@ -1977,31 +2275,243 @@ paths: lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: 'List Fax Lines' + description: 'Returns the properties and settings of multiple Fax Lines.' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: 'Account ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: Page + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Page size' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: 'Show team lines' + schema: + type: boolean + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: 'Remove Fax Line Access' + description: 'Removes a user''s access to the specified Fax Line.' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineRemoveUser.sh x-meta: seo: - title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' - /fax_line/list: + title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + /fax/list: get: tags: - - 'Fax Line' - summary: 'List Fax Lines' - description: 'Returns the properties and settings of multiple Fax Lines.' - operationId: faxLineList + - Fax + summary: 'Lists Faxes' + description: 'Returns properties of multiple faxes' + operationId: faxList parameters: - - - name: account_id - in: query - description: 'Account ID' - schema: - type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query @@ -2009,6 +2519,7 @@ paths: schema: type: integer default: 1 + minimum: 1 example: 1 - name: page_size @@ -2017,13 +2528,9 @@ paths: schema: type: integer default: 20 + maximum: 100 + minimum: 1 example: 20 - - - name: show_team_lines - in: query - description: 'Show team lines' - schema: - type: boolean responses: 200: description: 'successful operation' @@ -2037,10 +2544,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineListResponse' + $ref: '#/components/schemas/FaxListResponse' examples: default_example: - $ref: '#/components/examples/FaxLineListResponseExample' + $ref: '#/components/examples/FaxListResponseExample' 4XX: description: failed_operation content: @@ -2066,62 +2573,65 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxList.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs + $ref: examples/FaxList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineList.js + $ref: examples/FaxList.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxList.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxList.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxList.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxList.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxList.sh x-meta: seo: - title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' - /fax_line/remove_user: - put: + title: 'List Faxes | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your faxes, click here.' + /fax/send: + post: tags: - - 'Fax Line' - summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' - operationId: faxLineRemoveUser + - Fax + summary: 'Send Fax' + description: 'Action to prepare and send a fax' + operationId: faxSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/FaxLineRemoveUserRequest' + $ref: '#/components/schemas/FaxSendRequest' examples: default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + $ref: '#/components/examples/FaxSendRequestExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/FaxSendRequest' responses: 200: description: 'successful operation' @@ -2135,10 +2645,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineResponse' + $ref: '#/components/schemas/FaxGetResponse' examples: default_example: - $ref: '#/components/examples/FaxLineResponseExample' + $ref: '#/components/examples/FaxGetResponseExample' 4XX: description: failed_operation content: @@ -2156,6 +2666,8 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2166,46 +2678,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxSend.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs + $ref: examples/FaxSend.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxSend.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxSend.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxSend.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxSend.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxSend.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxSend.sh x-meta: seo: - title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to send a fax, click here.' /oauth/token: post: tags: @@ -2239,6 +2751,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenGenerateResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2322,6 +2851,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenRefreshResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2703,7 +3249,7 @@ paths: The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. - This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. + This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. @@ -4617,7 +5163,7 @@ paths: 403_example: $ref: '#/components/examples/Error403ResponseExample' 404_example: - $ref: '#/components/examples/TeamDoesNotExistResponseExample' + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5440,7 +5986,7 @@ paths: post: tags: - Template - summary: 'Create Template' + summary: 'Create Template' description: 'Creates a template that can then be used.' operationId: templateCreate requestBody: @@ -7345,6 +7891,50 @@ components: type: string format: email type: object + FaxSendRequest: + required: + - recipient + properties: + recipient: + description: 'Fax Send To Recipient' + type: string + example: recipient@example.com + sender: + description: 'Fax Send From Sender (used only with fax number)' + type: string + example: sender@example.com + files: + description: 'Fax File to Send' + type: array + items: + type: string + format: binary + file_urls: + description: 'Fax File URL to Send' + type: array + items: + type: string + test_mode: + description: 'API Test Mode Setting' + type: boolean + default: false + cover_page_to: + description: 'Fax Cover Page for Recipient' + type: string + example: 'Recipient Name' + cover_page_from: + description: 'Fax Cover Page for Sender' + type: string + example: 'Sender Name' + cover_page_message: + description: 'Fax Cover Page Message' + type: string + example: 'Please find the attached documents.' + title: + description: 'Fax Title' + type: string + example: 'Fax Title' + type: object OAuthTokenGenerateRequest: required: - client_id @@ -7382,6 +7972,12 @@ components: refresh_token: description: 'The token provided when you got the expired access token.' type: string + client_id: + description: 'The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string + client_secret: + description: 'The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string type: object ReportCreateRequest: required: @@ -9091,7 +9687,7 @@ components: properties: header_background_color: type: string - default: '#1A1A1A' + default: '#1a1a1a' legal_version: type: string default: terms1 @@ -9100,40 +9696,40 @@ components: - terms2 link_color: type: string - default: '#00B3E6' + default: '#0061FE' page_background_color: type: string - default: '#F7F8F9' + default: '#f7f8f9' primary_button_color: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_text_color: type: string - default: '#FFFFFF' + default: '#ffffff' primary_button_text_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_text_color: type: string - default: '#00B3E6' + default: '#0061FE' secondary_button_text_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' text_color1: type: string default: '#808080' text_color2: type: string - default: '#FFFFFF' + default: '#ffffff' reset_to_default: description: 'Resets white labeling options to defaults. Only useful when updating an API App.' type: boolean @@ -10211,6 +10807,19 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxGetResponse: + required: + - fax + properties: + fax: + $ref: '#/components/schemas/FaxResponse' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FaxLineResponse: required: - fax_line @@ -10246,6 +10855,19 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + FaxListResponse: + required: + - faxes + - list_info + properties: + faxes: + type: array + items: + $ref: '#/components/schemas/FaxResponse' + list_info: + $ref: '#/components/schemas/ListInfoResponse' + type: object + x-internal-class: true FileResponse: required: - file_url @@ -10388,7 +11010,7 @@ components: type: integer nullable: true sms_verifications_left: - description: 'SMS verifications remaining.' + description: 'SMS verifications remaining.' type: integer nullable: true num_fax_pages_left: @@ -10456,6 +11078,7 @@ components: secret: description: 'The app''s OAuth secret, or null if the app does not belong to user.' type: string + nullable: true scopes: description: 'Array of OAuth scopes used by the app.' type: array @@ -10589,6 +11212,54 @@ components: description: 'Name of the error.' type: string type: object + FaxResponse: + required: + - fax_id + - title + - original_title + - subject + - message + - metadata + - created_at + - sender + - transmissions + - files_url + properties: + fax_id: + description: 'Fax ID' + type: string + title: + description: 'Fax Title' + type: string + original_title: + description: 'Fax Original Title' + type: string + subject: + description: 'Fax Subject' + type: string + message: + description: 'Fax Message' + type: string + metadata: + description: 'Fax Metadata' + type: object + additionalProperties: {} + created_at: + description: 'Fax Created At Timestamp' + type: integer + sender: + description: 'Fax Sender Email' + type: string + transmissions: + description: 'Fax Transmissions List' + type: array + items: + $ref: '#/components/schemas/FaxResponseTransmission' + files_url: + description: 'Fax Files URL' + type: string + type: object + x-internal-class: true FaxLineResponseFaxLine: properties: number: @@ -10606,6 +11277,35 @@ components: $ref: '#/components/schemas/AccountResponse' type: object x-internal-class: true + FaxResponseTransmission: + required: + - recipient + - sender + - status_code + properties: + recipient: + description: 'Fax Transmission Recipient' + type: string + sender: + description: 'Fax Transmission Sender' + type: string + status_code: + description: 'Fax Transmission Status Code' + type: string + enum: + - success + - transmitting + - error_could_not_fax + - error_unknown + - error_busy + - error_no_answer + - error_disconnected + - error_bad_destination + sent_at: + description: 'Fax Transmission Sent Timestamp' + type: integer + type: object + x-internal-class: true ListInfoResponse: description: 'Contains pagination information about the data returned.' properties: @@ -11218,24 +11918,21 @@ components: description: 'Time the template was last updated.' type: integer is_embedded: - description: '`true` if this template was created using an embedded flow, `false` if it was created on our website.' + description: '`true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.' type: boolean nullable: true is_creator: description: '`true` if you are the owner of this template, `false` if it''s been shared with you by a team member.' type: boolean - nullable: true can_edit: description: 'Indicates whether edit rights have been granted to you by the owner (always `true` if that''s you).' type: boolean - nullable: true is_locked: description: |- Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. type: boolean - nullable: true metadata: description: 'The metadata attached to the template.' type: object @@ -11273,7 +11970,11 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseAccount' - nullable: true + attachments: + description: 'Signer attachments.' + type: array + items: + $ref: '#/components/schemas/SignatureRequestResponseAttachment' type: object x-internal-class: true TemplateResponseAccount: @@ -11377,7 +12078,6 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - nullable: true type: object x-internal-class: true TemplateResponseDocumentCustomFieldBase: @@ -11529,10 +12229,6 @@ components: required: description: 'Boolean showing whether or not this field is required.' type: boolean - group: - description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' - type: string - nullable: true type: object discriminator: propertyName: type @@ -11549,12 +12245,12 @@ components: x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' + required: + - type allOf: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11570,6 +12266,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: checkbox + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDateSigned: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11579,8 +12279,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11596,6 +12294,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: date_signed + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDropdown: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11605,8 +12307,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11622,6 +12322,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: dropdown + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldHyperlink: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11631,8 +12335,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11659,6 +12361,10 @@ components: fontFamily: description: 'Font family used in this form field''s text.' type: string + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldInitials: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11668,8 +12374,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11685,6 +12389,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: initials + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldRadio: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11695,8 +12403,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11712,6 +12418,9 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: radio + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string type: object TemplateResponseDocumentFormFieldSignature: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11721,8 +12430,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11738,6 +12445,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: signature + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldText: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11747,8 +12458,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11790,6 +12499,10 @@ components: - employer_identification_number - custom_regex nullable: true + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentStaticFieldBase: description: 'An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.' @@ -11849,8 +12562,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11875,8 +12586,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11901,8 +12610,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11927,8 +12634,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11953,8 +12658,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11979,8 +12682,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12005,8 +12706,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12031,8 +12730,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12418,6 +13115,10 @@ components: summary: 'Default Example' value: $ref: examples/json/FaxLineRemoveUserRequestExample.json + FaxSendRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxSendRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -12662,6 +13363,10 @@ components: summary: 'Error 4XX failed_operation' value: $ref: examples/json/Error4XXResponseExample.json + FaxGetResponseExample: + summary: 'Fax Response' + value: + $ref: examples/json/FaxGetResponseExample.json FaxLineResponseExample: summary: 'Sample Fax Line Response' value: @@ -12674,6 +13379,10 @@ components: summary: 'Sample Fax Line List Response' value: $ref: examples/json/FaxLineListResponseExample.json + FaxListResponseExample: + summary: 'Returns the properties and settings of multiple Faxes.' + value: + $ref: examples/json/FaxListResponseExample.json ReportCreateResponseExample: summary: Report value: diff --git a/pyproject.toml b/pyproject.toml index a852849..6b765e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dropbox_sign" -version = "1.6.1" +version = "1.7.0" description = "Dropbox Sign API" authors = ["Official Python SDK for the Dropbox Sign API "] license = "MIT" diff --git a/run-build b/run-build index 08a15aa..bfa3008 100755 --- a/run-build +++ b/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/python" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/dropbox_sign/api/"*.py +rm -f "${DIR}/dropbox_sign/models/"*.py + docker run --rm \ -v "${DIR}/:/local" \ openapitools/openapi-generator-cli:v7.8.0 generate \ diff --git a/setup.py b/setup.py index 98d613d..73b4f58 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "dropbox-sign" -VERSION = "1.6.1" +VERSION = "1.7.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/test_fixtures/ApiAppCreateRequest.json b/test_fixtures/ApiAppCreateRequest.json index ac9729d..2ee8e41 100644 --- a/test_fixtures/ApiAppCreateRequest.json +++ b/test_fixtures/ApiAppCreateRequest.json @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppGetResponse.json b/test_fixtures/ApiAppGetResponse.json index 07843c3..f7d799f 100644 --- a/test_fixtures/ApiAppGetResponse.json +++ b/test_fixtures/ApiAppGetResponse.json @@ -7,7 +7,7 @@ "is_approved": false, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -15,13 +15,28 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" }, "white_labeling_options": { - "primary_button_color": "#00b3e6", - "primary_button_text_color": "#ffffff" + "header_background_color": "#1A1A1A", + "legal_version": "terms1", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", + "primary_button_text_color": "#ffffff", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", + "text_color1": "#808080", + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppListResponse.json b/test_fixtures/ApiAppListResponse.json index 6bbacb4..cc17d45 100644 --- a/test_fixtures/ApiAppListResponse.json +++ b/test_fixtures/ApiAppListResponse.json @@ -8,7 +8,7 @@ "is_approved": true, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -16,6 +16,9 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" @@ -27,6 +30,9 @@ "domains": ["example.com"], "is_approved": false, "name": "My Other App", + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" diff --git a/test_fixtures/ApiAppUpdateRequest.json b/test_fixtures/ApiAppUpdateRequest.json index 4744e05..ee4e9ff 100644 --- a/test_fixtures/ApiAppUpdateRequest.json +++ b/test_fixtures/ApiAppUpdateRequest.json @@ -4,7 +4,7 @@ "domains": [ "example.com" ], - "callback_url": "http://example.com/dropboxsign", + "callback_url": "https://example.com/dropboxsign", "oauth": { "callback_url": "https://example.com/oauth", "scopes": [ @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/FaxGetResponse.json b/test_fixtures/FaxGetResponse.json new file mode 100644 index 0000000..5892719 --- /dev/null +++ b/test_fixtures/FaxGetResponse.json @@ -0,0 +1,23 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + } +} diff --git a/test_fixtures/FaxListResponse.json b/test_fixtures/FaxListResponse.json new file mode 100644 index 0000000..bfa69cd --- /dev/null +++ b/test_fixtures/FaxListResponse.json @@ -0,0 +1,31 @@ +{ + "default": { + "list_info": { + "num_pages": 1, + "num_results": 1, + "page": 1, + "page_size": 1 + }, + "faxes": [ + { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + ] + } +} diff --git a/test_fixtures/FaxSendRequest.json b/test_fixtures/FaxSendRequest.json new file mode 100644 index 0000000..4c418cb --- /dev/null +++ b/test_fixtures/FaxSendRequest.json @@ -0,0 +1,14 @@ +{ + "default": { + "file_url": [ + "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + ], + "test_mode": "true", + "recipient": "16690000001", + "sender": "16690000000", + "cover_page_to": "Jill Fax", + "cover_page_message": "I'm sending you a fax!", + "cover_page_from": "Faxer Faxerson", + "title": "This is what the fax is about!" + } +} diff --git a/test_fixtures/FaxSendResponse.json b/test_fixtures/FaxSendResponse.json new file mode 100644 index 0000000..b651c78 --- /dev/null +++ b/test_fixtures/FaxSendResponse.json @@ -0,0 +1,16 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [ ], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + } + } +} diff --git a/test_fixtures/TeamGetResponse.json b/test_fixtures/TeamGetResponse.json index 2ed1d16..327d26c 100644 --- a/test_fixtures/TeamGetResponse.json +++ b/test_fixtures/TeamGetResponse.json @@ -28,6 +28,11 @@ "api_signature_requests_left": 0 } } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" ] } } diff --git a/test_fixtures/TemplateGetResponse.json b/test_fixtures/TemplateGetResponse.json index 52ff622..b025913 100644 --- a/test_fixtures/TemplateGetResponse.json +++ b/test_fixtures/TemplateGetResponse.json @@ -5,7 +5,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -566,496 +569,40 @@ ] } ], - "custom_fields": [ - { - "name": "merge_field_1", - "type": "text", - "x": 417, - "y": 219, - "width": 72, - "height": 15, - "required": false, - "api_id": "967c3e5f-2912-4f53-8ea3-c750652d29fc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "merge_field_2", - "type": "checkbox", - "x": 515, - "y": 346, - "width": 18, - "height": 18, - "required": false, - "api_id": "5e8fe02f-51cf-4f0b-b1d9-2b1e4f6ad07f" - } - ], - "named_form_fields": [ - { - "name": "Signature1", - "type": "signature", - "signer": "1", - "x": 136, - "y": 17, - "width": 108, - "height": 27, - "required": true, - "api_id": "8b6d78a5-0870-4f46-af9c-b78b54a49348" - }, - { - "name": "Textbox1", - "type": "text", - "signer": "1", - "x": 328, - "y": 17, - "width": 144, - "height": 14, - "required": true, - "api_id": "7ec10d80-53c9-433b-b252-0b8daa90a8e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox2", - "type": "text", - "signer": "1", - "x": 328, - "y": 48, - "width": 144, - "height": 14, - "required": true, - "api_id": "6574e6ad-7dac-49a2-9d56-650d7c5ade6e", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Initial1", - "type": "initials", - "signer": "1", - "x": 148, - "y": 66, - "width": 72, - "height": 27, - "required": true, - "api_id": "30f41f54-c7f3-46c3-a29a-bb76ec40b552" - }, - { - "name": "Checkbox1", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 111, - "width": 18, - "height": 18, - "required": false, - "api_id": "d4d6ada9-e1dc-419e-bc0d-1478da694449", - "group": "75a6e4b5fea47" - }, - { - "name": "Dropdown1", - "type": "dropdown", - "signer": "1", - "x": 423, - "y": 108, - "width": 70, - "height": 14, - "required": true, - "api_id": "5863be5e-ce5a-4c9d-aabe-c221914d73c2" - }, - { - "name": "DateSigned1", - "type": "date_signed", - "signer": "1", - "x": 150, - "y": 119, - "width": 105, - "height": 18, - "required": true, - "api_id": "9f6d3722-6db7-46da-8fac-3bc09f510262" - }, - { - "name": "Checkbox2", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 135, - "width": 18, - "height": 18, - "required": false, - "api_id": "edd732b8-b158-4714-a87b-503637d09ded", - "group": "75a6e4b5fea47" - }, - { - "name": "FullName1", - "type": "text", - "signer": "1", - "x": 144, - "y": 158, - "width": 72, - "height": 14, - "required": true, - "api_id": "62fd3f85-4808-4011-8eae-a14ebe9105ef", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Email1", - "type": "text", - "signer": "1", - "x": 133, - "y": 191, - "width": 144, - "height": 14, - "required": true, - "api_id": "a1c9bc6b-d498-4787-86e0-30ea779f06a7", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "RadioItem1", - "type": "radio", - "signer": "1", - "x": 307, - "y": 211, - "width": 18, - "height": 18, - "required": false, - "api_id": "fc8a1277-f757-47a2-aeea-5113fa81f2d5", - "group": "0831822584086" - }, - { - "name": "Company1", - "type": "text", - "signer": "1", - "x": 128, - "y": 221, - "width": 144, - "height": 14, - "required": true, - "api_id": "279b4e7f-e71f-426d-845c-6308cddde379", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Title1", - "type": "text", - "signer": "1", - "x": 127, - "y": 250, - "width": 144, - "height": 14, - "required": true, - "api_id": "8809e39a-a46c-4dae-aaf9-06fc6355d80f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "RadioItem2", - "type": "radio", - "signer": "1", - "x": 307, - "y": 253, - "width": 18, - "height": 18, - "required": false, - "api_id": "f7b6b70d-0522-4ab7-bfec-b86f147c8be3", - "group": "0831822584086" - }, - { - "name": "Textbox3", - "type": "text", - "signer": "1", - "x": 410, - "y": 279, - "width": 144, - "height": 14, - "required": true, - "api_id": "bad7512a-e22b-46ed-ba03-123db0eda932", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox4", - "type": "text", - "signer": "1", - "x": 101, - "y": 314, - "width": 72, - "height": 14, - "required": true, - "api_id": "368ed029-bc93-4f92-8f7a-14c3bf8109b5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "custom_regex" - }, - { - "name": "Textbox8", - "type": "text", - "signer": "1", - "x": 218, - "y": 313, - "width": 72, - "height": 14, - "required": true, - "api_id": "ecf2ae95-d2e6-41b2-819a-836a6fa8c7c5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_routing_number" - }, - { - "name": "Textbox12", - "type": "text", - "signer": "1", - "x": 339, - "y": 315, - "width": 72, - "height": 14, - "required": true, - "api_id": "3cb90a0a-a433-4f30-8af8-8fb4c747b704", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "social_security_number" - }, - { - "name": "Textbox9", - "type": "text", - "signer": "1", - "x": 224, - "y": 343, - "width": 72, - "height": 14, - "required": true, - "api_id": "5b9eb331-c97d-435b-a563-d936a9b930c0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_account_number" - }, - { - "name": "Textbox13", - "type": "text", - "signer": "1", - "x": 339, - "y": 345, - "width": 72, - "height": 14, - "required": true, - "api_id": "2b98ce7e-e53a-4cf8-a9f3-d7fb18d88631", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "employer_identification_number" - }, - { - "name": "Textbox5", - "type": "text", - "signer": "1", - "x": 113, - "y": 350, - "width": 72, - "height": 14, - "required": true, - "api_id": "5f52c011-2c5f-4143-bf04-4694fb4a0d3f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "numbers_only" - }, - { - "name": "Textbox6", - "type": "text", - "signer": "1", - "x": 122, - "y": 374, - "width": 72, - "height": 14, - "required": true, - "api_id": "47457b7d-b1e8-41a0-93ad-60ba30e64bb1", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "letters_only" - }, - { - "name": "Textbox10", - "type": "text", - "signer": "1", - "x": 234, - "y": 373, - "width": 72, - "height": 14, - "required": true, - "api_id": "18e3f994-1675-4d58-9b4a-4f92a2614551", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "Textbox14", - "type": "text", - "signer": "1", - "x": 339, - "y": 376, - "width": 72, - "height": 14, - "required": true, - "api_id": "9ad4b8cc-bac9-432b-8836-9f80f86fc7e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox7", - "type": "text", - "signer": "1", - "x": 130, - "y": 401, - "width": 72, - "height": 14, - "required": true, - "api_id": "58c5f942-04fb-45f1-9703-5e8411f3a3bb", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "phone_number" - }, - { - "name": "me_now_hyperlink_1", - "type": "hyperlink", - "signer": "me_now", - "x": 434, - "y": 400, - "width": 112, - "height": 14, - "required": false, - "api_id": "fd928b56-cf59-40a4-9a90-62f97ffd0ddc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 30 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "helvetica" - }, - { - "name": "Textbox11", - "type": "text", - "signer": "1", - "x": 237, - "y": 405, - "width": 72, - "height": 14, - "required": true, - "api_id": "e48c388d-8c26-4f20-848e-f8587a631746", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "zip_code" - } - ], "accounts": [ { "account_id": "5008b25c7f67153e57d5a357b1687968068fb465", "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } }, { "account_id": "", "email_address": "teammate@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] } diff --git a/test_fixtures/TemplateListResponse.json b/test_fixtures/TemplateListResponse.json index 7c4768b..caa5e6d 100644 --- a/test_fixtures/TemplateListResponse.json +++ b/test_fixtures/TemplateListResponse.json @@ -12,7 +12,10 @@ "title": "Purchase order", "message": "", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -49,7 +52,8 @@ "originalFontSize": 12, "fontFamily": "arial" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -58,7 +62,21 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] }, @@ -67,7 +85,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1329478947, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -564,7 +585,8 @@ "fontFamily": "arial", "validation_type": "zip_code" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -573,9 +595,16 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } } - ] + ], + "attachments": [] } ] }