Skip to content

Commit

Permalink
Updated on 2020-09-21 19:09:14. Version: 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Sep 21, 2020
1 parent 6014d9c commit 14f04c0
Show file tree
Hide file tree
Showing 49 changed files with 6,766 additions and 151 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.2.0 [September 21, 2020]

- Renamed some internal models for template creation API endpoints. (CreateTemplateData / CreateTemplateData1 renamed to CreateHtmlTemplateData and CreateTemplateFromUploadData)

### 1.1.0 [September 12, 2020]

- **BREAKING CHANGE**: Renamed createTemplate operation to createPDFTemplate
Expand Down
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DocSpring is a service that helps you fill out and sign PDF templates.
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: v1
- Package version: 1.1.0
- Package version: 1.2.0
- Build package: com.docspring.codegen.DocSpringPhpClientCodegen

## Requirements
Expand Down Expand Up @@ -68,14 +68,14 @@ $apiInstance = new DocSpring\Api\PDFApi(
new GuzzleHttp\Client(),
$config
);
$template_id = tpl_000000000000000001; // string |
$request_body = array(new \DocSpring\Model\array()); // object[] |
$template_id = tpl_000000000000000002; // string |
$add_fields_data = new \DocSpring\Model\AddFieldsData(); // \DocSpring\Model\AddFieldsData |

try {
$result = $apiInstance->batchGeneratePdfV1($template_id, $request_body);
$result = $apiInstance->addFieldsToTemplate($template_id, $add_fields_data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PDFApi->batchGeneratePdfV1: ', $e->getMessage(), PHP_EOL;
echo 'Exception when calling PDFApi->addFieldsToTemplate: ', $e->getMessage(), PHP_EOL;
}

?>
Expand All @@ -87,6 +87,7 @@ All URIs are relative to *https://api.docspring.com/api/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PDFApi* | [**addFieldsToTemplate**](docs/Api/PDFApi.md#addfieldstotemplate) | **PUT** /templates/{template_id}/add_fields | Add new fields to a Template
*PDFApi* | [**batchGeneratePdfV1**](docs/Api/PDFApi.md#batchgeneratepdfv1) | **POST** /templates/{template_id}/submissions/batch | Generates multiple PDFs
*PDFApi* | [**batchGeneratePdfs**](docs/Api/PDFApi.md#batchgeneratepdfs) | **POST** /submissions/batches | Generates multiple PDFs
*PDFApi* | [**combinePdfs**](docs/Api/PDFApi.md#combinepdfs) | **POST** /combined_submissions?v=2 | Merge submission PDFs, template PDFs, or custom files
Expand Down Expand Up @@ -120,6 +121,8 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [AddFieldsData](docs/Model/AddFieldsData.md)
- [AddFieldsTemplateResponse](docs/Model/AddFieldsTemplateResponse.md)
- [AuthenticationError](docs/Model/AuthenticationError.md)
- [AuthenticationSuccessResponse](docs/Model/AuthenticationSuccessResponse.md)
- [CombinePdfsData](docs/Model/CombinePdfsData.md)
Expand All @@ -130,18 +133,19 @@ Class | Method | HTTP request | Description
- [CreateCustomFileData](docs/Model/CreateCustomFileData.md)
- [CreateCustomFileResponse](docs/Model/CreateCustomFileResponse.md)
- [CreateFolderData](docs/Model/CreateFolderData.md)
- [CreateHtmlTemplateData](docs/Model/CreateHtmlTemplateData.md)
- [CreateSubmissionBatchResponse](docs/Model/CreateSubmissionBatchResponse.md)
- [CreateSubmissionBatchSubmissionsResponse](docs/Model/CreateSubmissionBatchSubmissionsResponse.md)
- [CreateSubmissionDataRequestData](docs/Model/CreateSubmissionDataRequestData.md)
- [CreateSubmissionDataRequestTokenResponse](docs/Model/CreateSubmissionDataRequestTokenResponse.md)
- [CreateSubmissionDataRequestTokenResponseToken](docs/Model/CreateSubmissionDataRequestTokenResponseToken.md)
- [CreateSubmissionResponse](docs/Model/CreateSubmissionResponse.md)
- [CreateTemplateData](docs/Model/CreateTemplateData.md)
- [CreateTemplateData1](docs/Model/CreateTemplateData1.md)
- [CreateTemplateFromUploadData](docs/Model/CreateTemplateFromUploadData.md)
- [CustomFile](docs/Model/CustomFile.md)
- [Error](docs/Model/Error.md)
- [Folder](docs/Model/Folder.md)
- [FoldersFolder](docs/Model/FoldersFolder.md)
- [HtmlTemplateData](docs/Model/HtmlTemplateData.md)
- [InvalidRequest](docs/Model/InvalidRequest.md)
- [MoveFolderData](docs/Model/MoveFolderData.md)
- [MoveTemplateData](docs/Model/MoveTemplateData.md)
Expand All @@ -155,14 +159,15 @@ Class | Method | HTTP request | Description
- [SubmissionDataBatchRequest](docs/Model/SubmissionDataBatchRequest.md)
- [SubmissionDataRequest](docs/Model/SubmissionDataRequest.md)
- [Template](docs/Model/Template.md)
- [TemplatesdesccachedUploadTemplate](docs/Model/TemplatesdesccachedUploadTemplate.md)
- [TemplatesdesccachedUploadTemplateDocument](docs/Model/TemplatesdesccachedUploadTemplateDocument.md)
- [TemplatesdesccachedUploadTemplateDocumentMetadata](docs/Model/TemplatesdesccachedUploadTemplateDocumentMetadata.md)
- [TemplatestemplateIdTemplate](docs/Model/TemplatestemplateIdTemplate.md)
- [TemplateData](docs/Model/TemplateData.md)
- [TemplatestemplateIdaddFieldsFields](docs/Model/TemplatestemplateIdaddFieldsFields.md)
- [UpdateDataRequestResponse](docs/Model/UpdateDataRequestResponse.md)
- [UpdateSubmissionDataRequestData](docs/Model/UpdateSubmissionDataRequestData.md)
- [UpdateTemplateData](docs/Model/UpdateTemplateData.md)
- [UpdateTemplateResponse](docs/Model/UpdateTemplateResponse.md)
- [UploadTemplateData](docs/Model/UploadTemplateData.md)
- [UploadTemplateDataDocument](docs/Model/UploadTemplateDataDocument.md)
- [UploadTemplateDataDocumentMetadata](docs/Model/UploadTemplateDataDocumentMetadata.md)


## Documentation For Authorization
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docspring/docspring",
"version": "1.1.0",
"version": "1.2.0",
"description": "",
"keywords": [
"openapitools",
Expand Down
73 changes: 65 additions & 8 deletions docs/Api/PDFApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All URIs are relative to *https://api.docspring.com/api/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**addFieldsToTemplate**](PDFApi.md#addFieldsToTemplate) | **PUT** /templates/{template_id}/add_fields | Add new fields to a Template
[**batchGeneratePdfV1**](PDFApi.md#batchGeneratePdfV1) | **POST** /templates/{template_id}/submissions/batch | Generates multiple PDFs
[**batchGeneratePdfs**](PDFApi.md#batchGeneratePdfs) | **POST** /submissions/batches | Generates multiple PDFs
[**combinePdfs**](PDFApi.md#combinePdfs) | **POST** /combined_submissions?v=2 | Merge submission PDFs, template PDFs, or custom files
Expand Down Expand Up @@ -35,6 +36,62 @@ Method | HTTP request | Description
[**updateTemplate**](PDFApi.md#updateTemplate) | **PUT** /templates/{template_id} | Update a Template


# **addFieldsToTemplate**
> \DocSpring\Model\AddFieldsTemplateResponse addFieldsToTemplate($template_id, $add_fields_data)
Add new fields to a Template

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\Api\PDFApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$template_id = tpl_000000000000000002; // string |
$add_fields_data = new \DocSpring\Model\AddFieldsData(); // \DocSpring\Model\AddFieldsData |

try {
$result = $apiInstance->addFieldsToTemplate($template_id, $add_fields_data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PDFApi->addFieldsToTemplate: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**template_id** | **string**| |
**add_fields_data** | [**\DocSpring\Model\AddFieldsData**](../Model/AddFieldsData.md)| |

### Return type

[**\DocSpring\Model\AddFieldsTemplateResponse**](../Model/AddFieldsTemplateResponse.md)

### Authorization

[api_token_basic](../../README.md#api_token_basic)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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)

# **batchGeneratePdfV1**
> \DocSpring\Model\CreateSubmissionResponse[] batchGeneratePdfV1($template_id, $request_body)
Expand Down Expand Up @@ -416,7 +473,7 @@ Name | Type | Description | Notes
[[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)

# **createHTMLTemplate**
> \DocSpring\Model\PendingTemplate createHTMLTemplate($create_template_data1)
> \DocSpring\Model\PendingTemplate createHTMLTemplate($create_html_template_data)
Create a new HTML template

Expand All @@ -437,10 +494,10 @@ $apiInstance = new DocSpring\Api\PDFApi(
new GuzzleHttp\Client(),
$config
);
$create_template_data1 = new \DocSpring\Model\CreateTemplateData1(); // \DocSpring\Model\CreateTemplateData1 |
$create_html_template_data = new \DocSpring\Model\CreateHtmlTemplateData(); // \DocSpring\Model\CreateHtmlTemplateData |

try {
$result = $apiInstance->createHTMLTemplate($create_template_data1);
$result = $apiInstance->createHTMLTemplate($create_html_template_data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PDFApi->createHTMLTemplate: ', $e->getMessage(), PHP_EOL;
Expand All @@ -452,7 +509,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**create_template_data1** | [**\DocSpring\Model\CreateTemplateData1**](../Model/CreateTemplateData1.md)| |
**create_html_template_data** | [**\DocSpring\Model\CreateHtmlTemplateData**](../Model/CreateHtmlTemplateData.md)| |

### Return type

Expand Down Expand Up @@ -528,7 +585,7 @@ Name | Type | Description | Notes
[[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)

# **createPDFTemplateFromUpload**
> \DocSpring\Model\PendingTemplate createPDFTemplateFromUpload($create_template_data)
> \DocSpring\Model\PendingTemplate createPDFTemplateFromUpload($create_template_from_upload_data)
Create a new PDF template from a cached presign upload

Expand All @@ -549,10 +606,10 @@ $apiInstance = new DocSpring\Api\PDFApi(
new GuzzleHttp\Client(),
$config
);
$create_template_data = new \DocSpring\Model\CreateTemplateData(); // \DocSpring\Model\CreateTemplateData |
$create_template_from_upload_data = new \DocSpring\Model\CreateTemplateFromUploadData(); // \DocSpring\Model\CreateTemplateFromUploadData |

try {
$result = $apiInstance->createPDFTemplateFromUpload($create_template_data);
$result = $apiInstance->createPDFTemplateFromUpload($create_template_from_upload_data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PDFApi->createPDFTemplateFromUpload: ', $e->getMessage(), PHP_EOL;
Expand All @@ -564,7 +621,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**create_template_data** | [**\DocSpring\Model\CreateTemplateData**](../Model/CreateTemplateData.md)| |
**create_template_from_upload_data** | [**\DocSpring\Model\CreateTemplateFromUploadData**](../Model/CreateTemplateFromUploadData.md)| |

### Return type

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# CreateTemplateData
# AddFieldsData

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**template** | [**\DocSpring\Model\TemplatesdesccachedUploadTemplate**](TemplatesdesccachedUploadTemplate.md) | |
**fields** | [**\DocSpring\Model\TemplatestemplateIdaddFieldsFields[]**](TemplatestemplateIdaddFieldsFields.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)

Expand Down
12 changes: 12 additions & 0 deletions docs/Model/AddFieldsTemplateResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AddFieldsTemplateResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**new_field_ids** | **int[]** | | [optional]
**errors** | **string[]** | | [optional]
**status** | **string** | | [optional]

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


Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# CreateTemplateData1
# CreateHtmlTemplateData

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**template** | [**\DocSpring\Model\TemplatesdesccachedUploadTemplate**](TemplatesdesccachedUploadTemplate.md) | |
**template** | [**\DocSpring\Model\HtmlTemplateData**](HtmlTemplateData.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)

Expand Down
10 changes: 10 additions & 0 deletions docs/Model/CreateTemplateFromUploadData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CreateTemplateFromUploadData

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**template** | [**\DocSpring\Model\UploadTemplateData**](UploadTemplateData.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)


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TemplatesdesccachedUploadTemplate
# HtmlTemplateData

## Properties
Name | Type | Description | Notes
Expand All @@ -8,7 +8,6 @@ Name | Type | Description | Notes
**scss** | **string** | | [optional]
**expire_after** | **float** | | [optional]
**allow_additional_properties** | **bool** | | [optional]
**document** | [**\DocSpring\Model\TemplatesdesccachedUploadTemplateDocument**](TemplatesdesccachedUploadTemplateDocument.md) | | [optional]
**description** | **string** | | [optional]
**public_submissions** | **bool** | | [optional]
**slack_webhook_url** | **string** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/Model/PendingTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Name | Type | Description | Notes
**name** | **string** | | [optional]
**template_type** | **string** | | [optional]
**id** | **string** | | [optional]
**locked** | **bool** | | [optional]
**redirect_url** | **string** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
1 change: 1 addition & 0 deletions docs/Model/Submission.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**processed_at** | **string** | | [optional]
**state** | **string** | |
**metadata** | **object** | | [optional]
**truncated_text** | **object** | | [optional]
**pdf_hash** | **string** | | [optional]
**download_url** | **string** | | [optional]
**permanent_download_url** | **string** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/Model/Template.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Name | Type | Description | Notes
**template_type** | **string** | | [optional]
**id** | **string** | | [optional]
**page_dimensions** | [**float[][]**](array.md) | | [optional]
**locked** | **bool** | | [optional]
**redirect_url** | **string** | | [optional]
**document_url** | **string** | | [optional]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TemplatestemplateIdTemplate
# TemplateData

## Properties
Name | Type | Description | Notes
Expand Down
Loading

0 comments on commit 14f04c0

Please sign in to comment.