diff --git a/.gitignore b/.gitignore index beceff9..a7e1cf7 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,9 @@ build/ gradle-app.setting !gradle-wrapper.jar +# Kotlin +.kotlin + # IntelliJ out/ .idea/ diff --git a/.manifest.json b/.manifest.json index 60cd391..f051c3f 100644 --- a/.manifest.json +++ b/.manifest.json @@ -1,24 +1,24 @@ { - "liblabVersion": "2.25.46", - "date": "2025-09-17T12:01:32.149Z", + "liblabVersion": "1.1.2", + "date": "2026-05-01T16:11:52.845Z", "config": { - "apiId": 2744, - "sdkName": "signplus", - "sdkVersion": "2.4.0", - "languages": ["java"], - "auth": ["bearer"], - "docs": [], - "liblabVersion": "2", - "deliveryMethods": ["zip"], - "rawConfig": { - "sdkName": "signplus", - "apiVersion": "2.5.0", - "apiName": "signplus-api", - "specFilePath": "openapi.yaml", - "languages": ["csharp", "go", "python", "typescript", "java", "php"], - "auth": ["bearer"], - "customizations": { - "includeOptionalSnippetParameters": true, + "languages": [ + "java" + ], + "deliveryMethods": [ + "zip" + ], + "languageOptions": { + "java": { + "githubRepoName": "signplus-sharp", + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 + }, + "license": { + "type": "MIT" + }, "authentication": { "access": { "prefix": "Bearer" @@ -26,186 +26,244 @@ }, "devContainer": false, "generateEnv": true, + "responseHeaders": false, + "includeOptionalSnippetParameters": true, + "injectedModels": [], "inferServiceNames": false, + "groupId": "com.alohi", + "artifactId": "signplus", + "developers": [ + { + "name": "Alohi SA", + "email": "support@alohi.com", + "organization": "Alohi SA", + "organizationUrl": "https://www.alohi.com" + } + ] + }, + "typescript": { + "githubRepoName": "signplus-typescript", + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 + }, + "license": { + "type": "MIT" + }, + "authentication": { + "access": { + "prefix": "Bearer" + } + }, + "devContainer": false, + "generateEnv": true, + "responseHeaders": false, + "includeOptionalSnippetParameters": true, "injectedModels": [], + "inferServiceNames": false, + "npmOrg": "alohi", + "npmName": "signplus-typescript", + "httpClient": "axios", + "bundle": false, + "exportClassDefault": false + }, + "python": { + "githubRepoName": "signplus-python", + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 + }, "license": { "type": "MIT" }, + "authentication": { + "access": { + "prefix": "Bearer" + } + }, + "devContainer": false, + "generateEnv": true, "responseHeaders": false, + "includeOptionalSnippetParameters": true, + "injectedModels": [], + "inferServiceNames": false, + "pypiPackageName": "signplus-python", + "classifiers": [ + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: MIT License", + "Topic :: Software Development" + ] + }, + "kotlin": { "retry": { "enabled": true, "maxAttempts": 3, "retryDelay": 150 - } + }, + "license": { + "type": "MIT" + }, + "authentication": { + "access": { + "prefix": "Bearer" + } + }, + "devContainer": false, + "generateEnv": true, + "responseHeaders": false, + "includeOptionalSnippetParameters": true, + "injectedModels": [], + "inferServiceNames": false }, - "languageOptions": { - "python": { - "alwaysInitializeOptionals": false, - "pypiPackageName": "signplus-python", - "githubRepoName": "signplus-python", - "ignoreFiles": [], - "sdkVersion": "1.4.0", - "liblabVersion": "2", - "additionalConstructorParameters": [] + "ruby": { + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 }, - "java": { - "githubRepoName": "signplus-java", - "groupId": "com.alohi", - "artifactId": "signplus", - "sdkVersion": "2.4.0", - "liblabVersion": "2", - "developers": [ - { - "name": "Alohi SA", - "email": "support@alohi.com", - "organization": "Alohi SA", - "organizationUrl": "https://www.alohi.com" - } - ], - "additionalConstructorParameters": [] + "license": { + "type": "MIT" }, - "typescript": { - "bundle": false, - "exportClassDefault": false, - "httpClient": "axios", - "npmName": "signplus-typescript", - "npmOrg": "alohi", - "githubRepoName": "signplus-typescript", - "ignoreFiles": [], - "sdkVersion": "2.4.0", - "liblabVersion": "2", - "additionalConstructorParameters": [] + "authentication": { + "access": { + "prefix": "Bearer" + } + }, + "devContainer": false, + "generateEnv": true, + "responseHeaders": false, + "includeOptionalSnippetParameters": true, + "injectedModels": [], + "inferServiceNames": false + }, + "go": { + "githubRepoName": "signplus-sharp", + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 }, - "go": { - "goModuleName": "github.com/alohihq/signplus-go", - "githubRepoName": "signplus-go", - "ignoreFiles": [], - "sdkVersion": "1.4.0", - "liblabVersion": "2", - "additionalConstructorParameters": [] + "license": { + "type": "MIT" }, - "php": { - "packageName": "alohi/signplus", - "githubRepoName": "signplus-php", - "ignoreFiles": [], - "sdkVersion": "2.4.0", - "liblabVersion": "2", - "additionalConstructorParameters": [] + "authentication": { + "access": { + "prefix": "Bearer" + } }, - "csharp": { - "packageId": "Alohi.Signplus", - "githubRepoName": "signplus-sharp", - "ignoreFiles": [], - "sdkVersion": "1.4.0", - "liblabVersion": "2" - } + "devContainer": false, + "generateEnv": true, + "responseHeaders": false, + "includeOptionalSnippetParameters": true, + "injectedModels": [], + "inferServiceNames": false, + "goModuleName": "github.com/alohihq/signplus-go" }, - "publishing": { - "githubOrg": "alohihq" - } - }, - "liblabConfigVersion": "1.0.0", - "apiVersion": "2.5.0", - "apiName": "signplus-api", - "specFilePath": "openapi.yaml", - "createDocs": false, - "languageOptions": { "csharp": { "githubRepoName": "signplus-sharp", - "ignoreFiles": [], - "liblabVersion": "2", - "renameIllegalModelProperties": true, - "sdkVersion": "1.4.0", - "packageId": "Alohi.Signplus" - }, - "go": { - "githubRepoName": "signplus-go", - "ignoreFiles": [], - "liblabVersion": "2", - "renameIllegalModelProperties": true, - "sdkVersion": "1.4.0", - "goModuleName": "github.com/alohihq/signplus-go", - "additionalConstructorParameters": [] - }, - "java": { - "githubRepoName": "signplus-java", - "ignoreFiles": [], - "liblabVersion": "2", - "renameIllegalModelProperties": true, - "sdkVersion": "2.4.0", - "groupId": "com.alohi", - "artifactId": "signplus", - "includeKotlinSnippets": false, - "developers": [ - { - "name": "Alohi SA", - "email": "support@alohi.com", - "organization": "Alohi SA", - "organizationUrl": "https://www.alohi.com" + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 + }, + "license": { + "type": "MIT" + }, + "authentication": { + "access": { + "prefix": "Bearer" } - ], - "additionalConstructorParameters": [] - }, - "python": { - "githubRepoName": "signplus-python", - "ignoreFiles": [], - "liblabVersion": "2", - "renameIllegalModelProperties": true, - "sdkVersion": "1.4.0", - "alwaysInitializeOptionals": false, - "additionalConstructorParameters": [], - "pypiPackageName": "signplus-python" + }, + "devContainer": false, + "generateEnv": true, + "responseHeaders": false, + "includeOptionalSnippetParameters": true, + "injectedModels": [], + "inferServiceNames": false, + "packageId": "Alohi.Signplus" }, "php": { - "githubRepoName": "signplus-php", - "ignoreFiles": [], - "liblabVersion": "2", - "renameIllegalModelProperties": true, - "sdkVersion": "2.4.0", - "additionalConstructorParameters": [], + "githubRepoName": "signplus-sharp", + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 + }, + "license": { + "type": "MIT" + }, + "authentication": { + "access": { + "prefix": "Bearer" + } + }, + "devContainer": false, + "generateEnv": true, + "responseHeaders": false, + "includeOptionalSnippetParameters": true, + "injectedModels": [], + "inferServiceNames": false, "packageName": "alohi/signplus" }, - "typescript": { - "githubRepoName": "signplus-typescript", - "ignoreFiles": [], - "liblabVersion": "2", - "renameIllegalModelProperties": true, - "sdkVersion": "2.4.0", - "additionalConstructorParameters": [], - "bundle": false, - "denoteCommon": false, - "exportClassDefault": false, - "generateEnumAs": "enum", - "httpClient": "axios", - "npmName": "signplus-typescript", - "npmOrg": "alohi" + "cli": { + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 + }, + "license": { + "type": "MIT" + }, + "authentication": { + "access": { + "prefix": "Bearer" + } + }, + "devContainer": false, + "generateEnv": true, + "responseHeaders": false, + "includeOptionalSnippetParameters": true, + "injectedModels": [], + "inferServiceNames": false + }, + "rust": { + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 + }, + "license": { + "type": "MIT" + }, + "authentication": { + "access": { + "prefix": "Bearer" + } + }, + "devContainer": false, + "generateEnv": true, + "responseHeaders": false, + "includeOptionalSnippetParameters": true, + "injectedModels": [], + "inferServiceNames": false } }, - "validationsToIgnore": [], + "includeWatermark": false, + "responseHeaders": false, + "sdkName": "signplus", + "sdkVersion": "3.0.0", + "auth": [ + "bearer" + ], + "apiVersion": "2.5.0", "publishing": { - "githubOrg": "alohihq", - "platform": "github" + "githubOrg": "alohihq" }, - "analytics": { - "streaming": false, - "pagination": false + "customCode": { + "trackChanges": true }, - "authentication": { - "access": { - "prefix": "Bearer" - } - }, - "devContainer": false, - "generateEnv": true, - "includeOptionalSnippetParameters": true, - "license": { - "type": "MIT", - "name": "MIT", - "url": "https://opensource.org/licenses/MIT", - "path": "MIT.ejs" - }, - "responseHeaders": false, - "buildAllModels": false, "retry": { "enabled": true, "maxAttempts": 3, @@ -213,17 +271,35 @@ "maxDelay": 5000, "retryDelayJitter": 50, "backOffFactor": 2, - "httpCodesToRetry": [408, 429, 500, 502, 503, 504], - "httpMethodsToRetry": ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"] + "httpMethodsToRetry": [ + "GET", + "POST", + "PUT", + "DELETE", + "PATCH", + "HEAD", + "OPTIONS" + ] }, - "multiTenant": true, - "includeWatermark": false, - "githubRepoName": "signplus-java", - "ignoreFiles": [], - "renameIllegalModelProperties": true, + "license": { + "type": "MIT", + "name": "MIT", + "url": "https://opensource.org/licenses/MIT", + "path": "MIT.ejs" + }, + "authentication": { + "access": { + "prefix": "Bearer" + } + }, + "devContainer": false, + "generateEnv": true, + "includeOptionalSnippetParameters": true, + "injectedModels": [], + "inferServiceNames": false, + "githubRepoName": "signplus-sharp", "groupId": "com.alohi", "artifactId": "signplus", - "includeKotlinSnippets": false, "developers": [ { "name": "Alohi SA", @@ -232,33 +308,38 @@ "organizationUrl": "https://www.alohi.com" } ], - "additionalConstructorParameters": [], "language": "java", "deliveryMethod": "zip", "hooks": { "enabled": false, "sourceDir": "" }, + "validateResponses": false, "usesFormData": false, "environmentVariables": [], "fileOutput": "/tmp", - "inferServiceNames": false, "httpLibrary": { "name": "axios", "packages": { - "axios": "^1.9.0" + "axios": "^1.13.2" }, - "languages": ["typescript"] + "languages": [ + "typescript" + ] }, + "multiTenant": false, "customQueries": { "paths": [], "rawQueries": [], "queriesData": [] }, "ai": false, - "specType": "openapi", + "specType": "postman", "deprecatedOperations": { "include": true + }, + "multipleResponses": { + "enabled": false } }, "files": [ @@ -276,6 +357,7 @@ "src/main/java/com/alohi/signplus/services/BaseService.java", "src/main/java/com/alohi/signplus/http/HttpMethod.java", "src/main/java/com/alohi/signplus/http/ModelConverter.java", + "src/main/java/com/alohi/signplus/http/util/ContentTypes.java", "src/main/java/com/alohi/signplus/http/util/HttpArgumentConverter.java", "src/main/java/com/alohi/signplus/http/serialization/PathSerializationStyle.java", "src/main/java/com/alohi/signplus/http/serialization/QuerySerializationStyle.java", @@ -283,7 +365,6 @@ "src/main/java/com/alohi/signplus/http/serialization/Serializer.java", "src/main/java/com/alohi/signplus/http/serialization/Util.java", "src/main/java/com/alohi/signplus/http/interceptors/DefaultHeadersInterceptor.java", - "src/main/java/com/alohi/signplus/hook/Hook.java", "src/main/java/com/alohi/signplus/exceptions/ApiError.java", "src/main/java/com/alohi/signplus/http/Environment.java", "src/main/java/com/alohi/signplus/Signplus.java", @@ -291,82 +372,106 @@ "src/main/java/com/alohi/signplus/http/interceptors/RetryInterceptor.java", "src/main/java/com/alohi/signplus/config/RetryConfig.java", "src/main/java/com/alohi/signplus/config/SignplusConfig.java", - "documentation/models/CreateEnvelopeRequest.md", - "documentation/models/Envelope.md", + "src/main/java/com/alohi/signplus/config/RequestConfig.java", + "documentation/snippets/snippets.json", "documentation/models/CreateEnvelopeFromTemplateRequest.md", - "documentation/models/ListEnvelopesRequest.md", - "documentation/models/ListEnvelopesResponse.md", - "documentation/models/Document.md", - "documentation/models/ListEnvelopeDocumentsResponse.md", + "documentation/models/CreateEnvelopeFromTemplateParameters.md", + "documentation/models/DownloadEnvelopeSignedDocumentsParameters.md", + "documentation/models/DownloadEnvelopeCertificateParameters.md", + "documentation/models/GetEnvelopeDocumentParameters.md", "documentation/models/AddEnvelopeDocumentRequest.md", + "documentation/models/AddEnvelopeDocumentParameters.md", + "documentation/models/GetEnvelopeDocumentsParameters.md", "documentation/models/SetEnvelopeDynamicFieldsRequest.md", + "documentation/models/DynamicFields.md", + "documentation/models/SetEnvelopeDynamicFieldsParameters.md", "documentation/models/AddEnvelopeSigningStepsRequest.md", + "documentation/models/AddEnvelopeSigningStepsRequestSigningSteps.md", + "documentation/models/SigningStepsRecipients1.md", + "documentation/models/Verification.md", + "documentation/models/AddEnvelopeSigningStepsParameters.md", "documentation/models/SetEnvelopeAttachmentsSettingsRequest.md", - "documentation/models/EnvelopeAttachments.md", + "documentation/models/SetEnvelopeAttachmentsSettingsRequestSettings.md", + "documentation/models/SetEnvelopeAttachmentsSettingsParameters.md", "documentation/models/SetEnvelopeAttachmentsPlaceholdersRequest.md", + "documentation/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.md", + "documentation/models/SetEnvelopeAttachmentsPlaceholdersParameters.md", + "documentation/models/GetAttachmentFileParameters.md", + "documentation/models/SendEnvelopeParameters.md", + "documentation/models/DuplicateEnvelopeParameters.md", + "documentation/models/VoidEnvelopeParameters.md", "documentation/models/RenameEnvelopeRequest.md", + "documentation/models/RenameEnvelopeParameters.md", "documentation/models/SetEnvelopeCommentRequest.md", - "documentation/models/EnvelopeNotification.md", - "documentation/models/SetEnvelopeExpirationRequest.md", + "documentation/models/SetEnvelopeCommentParameters.md", + "documentation/models/SetEnvelopeNotificationRequest.md", + "documentation/models/SetEnvelopeNotificationParameters.md", + "documentation/models/SetEnvelopeExpirationDateRequest.md", + "documentation/models/SetEnvelopeExpirationDateParameters.md", "documentation/models/SetEnvelopeLegalityLevelRequest.md", - "documentation/models/Annotation.md", - "documentation/models/ListEnvelopeDocumentAnnotationsResponse.md", - "documentation/models/AddAnnotationRequest.md", - "documentation/models/CreateTemplateRequest.md", - "documentation/models/Template.md", - "documentation/models/ListTemplatesRequest.md", - "documentation/models/ListTemplatesResponse.md", + "documentation/models/SetEnvelopeLegalityLevelParameters.md", + "documentation/models/GetEnvelopeDocumentAnnotationsParameters.md", + "documentation/models/GetEnvelopeAnnotationsParameters.md", + "documentation/models/AddEnvelopeAnnotationRequest.md", + "documentation/models/AddEnvelopeAnnotationRequestSignature.md", + "documentation/models/AddEnvelopeAnnotationRequestInitials.md", + "documentation/models/AddEnvelopeAnnotationRequestText.md", + "documentation/models/TextFont1.md", + "documentation/models/AddEnvelopeAnnotationRequestDatetime.md", + "documentation/models/DatetimeFont1.md", + "documentation/models/AddEnvelopeAnnotationRequestCheckbox.md", + "documentation/models/AddEnvelopeAnnotationParameters.md", + "documentation/models/GetEnvelopeParameters.md", + "documentation/models/CreateEnvelopeRequest.md", + "documentation/models/CreateEnvelopeParameters.md", + "documentation/models/ListEnvelopesRequest.md", + "documentation/models/ListEnvelopesParameters.md", + "documentation/models/DuplicateTemplateParameters.md", + "documentation/models/GetTemplateDocumentParameters.md", "documentation/models/AddTemplateDocumentRequest.md", - "documentation/models/ListTemplateDocumentsResponse.md", + "documentation/models/AddTemplateDocumentParameters.md", + "documentation/models/GetTemplateDocumentsParameters.md", "documentation/models/AddTemplateSigningStepsRequest.md", + "documentation/models/AddTemplateSigningStepsRequestSigningSteps.md", + "documentation/models/SigningStepsRecipients2.md", + "documentation/models/AddTemplateSigningStepsParameters.md", "documentation/models/RenameTemplateRequest.md", + "documentation/models/RenameTemplateParameters.md", "documentation/models/SetTemplateCommentRequest.md", - "documentation/models/ListTemplateAnnotationsResponse.md", - "documentation/models/ListTemplateDocumentAnnotationsResponse.md", + "documentation/models/SetTemplateCommentParameters.md", + "documentation/models/SetTemplateNotificationRequest.md", + "documentation/models/SetTemplateNotificationParameters.md", + "documentation/models/GetDocumentTemplateAnnotationsParameters.md", + "documentation/models/GetTemplateAnnotationsParameters.md", + "documentation/models/AddTemplateAnnotationRequest.md", + "documentation/models/AddTemplateAnnotationRequestSignature.md", + "documentation/models/AddTemplateAnnotationRequestInitials.md", + "documentation/models/AddTemplateAnnotationRequestText.md", + "documentation/models/TextFont2.md", + "documentation/models/AddTemplateAnnotationRequestDatetime.md", + "documentation/models/DatetimeFont2.md", + "documentation/models/AddTemplateAnnotationRequestCheckbox.md", + "documentation/models/AddTemplateAnnotationParameters.md", + "documentation/models/SetTemplateAttachmentsSettingsRequest.md", + "documentation/models/SetTemplateAttachmentsSettingsRequestSettings.md", + "documentation/models/SetTemplateAttachmentsSettingsParameters.md", + "documentation/models/SetTemplateAttachmentsPlaceholdersRequest.md", + "documentation/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.md", + "documentation/models/SetTemplateAttachmentsPlaceholdersParameters.md", + "documentation/models/GetTemplateParameters.md", + "documentation/models/CreateTemplateRequest.md", + "documentation/models/CreateTemplateParameters.md", + "documentation/models/ListTemplatesRequest.md", + "documentation/models/ListTemplatesParameters.md", "documentation/models/CreateWebhookRequest.md", - "documentation/models/Webhook.md", + "documentation/models/CreateWebhookParameters.md", "documentation/models/ListWebhooksRequest.md", - "documentation/models/ListWebhooksResponse.md", - "documentation/models/EnvelopeLegalityLevel.md", - "documentation/models/EnvelopeFlowType.md", - "documentation/models/EnvelopeStatus.md", - "documentation/models/SigningStep.md", - "documentation/models/Recipient.md", - "documentation/models/RecipientRole.md", - "documentation/models/RecipientVerification.md", - "documentation/models/RecipientVerificationType.md", - "documentation/models/Page.md", - "documentation/models/AttachmentSettings.md", - "documentation/models/AttachmentPlaceholdersPerRecipient.md", - "documentation/models/AttachmentPlaceholder.md", - "documentation/models/AttachmentPlaceholderFile.md", - "documentation/models/EnvelopeOrderField.md", - "documentation/models/DynamicField.md", - "documentation/models/AttachmentPlaceholderRequest.md", - "documentation/models/AnnotationType.md", - "documentation/models/AnnotationSignature.md", - "documentation/models/AnnotationInitials.md", - "documentation/models/AnnotationText.md", - "documentation/models/AnnotationDateTime.md", - "documentation/models/AnnotationCheckbox.md", - "documentation/models/AnnotationFont.md", - "documentation/models/AnnotationFontFamily.md", - "documentation/models/AnnotationDateTimeFormat.md", - "documentation/models/AnnotationCheckboxStyle.md", - "documentation/models/TemplateSigningStep.md", - "documentation/models/TemplateRecipient.md", - "documentation/models/TemplateRecipientRole.md", - "documentation/models/TemplateOrderField.md", - "documentation/models/WebhookEvent.md", - "documentation/models/DownloadEnvelopeSignedDocumentsParameters.md", + "documentation/models/ListWebhooksParameters.md", "src/main/java/com/alohi/signplus/json/TypeUtils.java", "examples/pom.xml", "examples/run.sh", "examples/src/main/java/com/example/Main.java", "examples/.gitignore", - "src/main/java/com/alohi/signplus/validation/validators/modelValidators/CreateEnvelopeRequestValidator.java", - "src/main/java/com/alohi/signplus/validation/validators/modelValidators/CreateEnvelopeFromTemplateRequestValidator.java", - "src/main/java/com/alohi/signplus/validation/validators/modelValidators/CreateTemplateRequestValidator.java", ".idea/workspace.xml", ".idea/misc.xml", ".idea/compiler.xml", @@ -375,76 +480,517 @@ "src/main/java/com/alohi/signplus/http/util/RequestBuilder.java", "examples/README.md", ".env.example", - "src/main/java/com/alohi/signplus/models/EnvelopeLegalityLevel.java", - "src/main/java/com/alohi/signplus/models/EnvelopeFlowType.java", - "src/main/java/com/alohi/signplus/models/EnvelopeStatus.java", - "src/main/java/com/alohi/signplus/models/RecipientRole.java", - "src/main/java/com/alohi/signplus/models/RecipientVerificationType.java", - "src/main/java/com/alohi/signplus/models/EnvelopeOrderField.java", - "src/main/java/com/alohi/signplus/models/AnnotationType.java", - "src/main/java/com/alohi/signplus/models/AnnotationFontFamily.java", - "src/main/java/com/alohi/signplus/models/AnnotationDateTimeFormat.java", - "src/main/java/com/alohi/signplus/models/AnnotationCheckboxStyle.java", - "src/main/java/com/alohi/signplus/models/TemplateRecipientRole.java", - "src/main/java/com/alohi/signplus/models/TemplateOrderField.java", - "src/main/java/com/alohi/signplus/models/WebhookEvent.java", + "documentation/services/TemplateIdService.md", + "documentation/services/SignedDocumentsService.md", + "documentation/services/CertificateService.md", + "documentation/services/DocumentIdService.md", + "documentation/services/DocumentService.md", + "documentation/services/DocumentsService.md", + "documentation/services/DynamicFieldsService.md", + "documentation/services/SigningStepsService.md", + "documentation/services/SettingsService.md", + "documentation/services/PlaceholdersService.md", + "documentation/services/FileIdService.md", + "documentation/services/SendService.md", + "documentation/services/DuplicateService.md", + "documentation/services/Void_Service.md", + "documentation/services/RenameService.md", + "documentation/services/SetCommentService.md", + "documentation/services/SetNotificationService.md", + "documentation/services/SetExpirationDateService.md", + "documentation/services/SetLegalityLevelService.md", + "documentation/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.md", + "documentation/services/AnnotationsService.md", + "documentation/services/AnnotationIdService.md", + "documentation/services/AnnotationService.md", + "documentation/services/EnvelopeService.md", + "documentation/services/EnvelopesService.md", + "documentation/services/TemplateTemplateIdDuplicateService.md", + "documentation/services/TemplateTemplateIdDocumentDocumentIdService.md", + "documentation/services/TemplateTemplateIdDocumentService.md", + "documentation/services/TemplateTemplateIdDocumentsService.md", + "documentation/services/TemplateTemplateIdSigningStepsService.md", + "documentation/services/TemplateTemplateIdRenameService.md", + "documentation/services/TemplateTemplateIdSetCommentService.md", + "documentation/services/TemplateTemplateIdSetNotificationService.md", + "documentation/services/TemplateTemplateIdAnnotationsDocumentIdService.md", + "documentation/services/TemplateTemplateIdAnnotationsService.md", + "documentation/services/TemplateTemplateIdAnnotationAnnotationIdService.md", + "documentation/services/TemplateTemplateIdAnnotationService.md", + "documentation/services/TemplateTemplateIdAttachmentsSettingsService.md", + "documentation/services/TemplateTemplateIdAttachmentsPlaceholdersService.md", + "documentation/services/TemplateService.md", + "documentation/services/TemplatesService.md", + "documentation/services/WebhookIdService.md", + "documentation/services/WebhookService.md", + "documentation/services/WebhooksService.md", + "src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentRequest.java", "src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsRequest.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequest.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequestSigningSteps.java", "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequest.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequestSettings.java", "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequest.java", + "src/main/java/com/alohi/signplus/models/RenameEnvelopeRequest.java", "src/main/java/com/alohi/signplus/models/SetEnvelopeCommentRequest.java", - "src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationRequest.java", - "src/main/java/com/alohi/signplus/models/CreateTemplateRequest.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateRequest.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelRequest.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestSignature.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestInitials.java", "src/main/java/com/alohi/signplus/models/AddTemplateDocumentRequest.java", "src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequest.java", + "src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequestSigningSteps.java", "src/main/java/com/alohi/signplus/models/RenameTemplateRequest.java", "src/main/java/com/alohi/signplus/models/SetTemplateCommentRequest.java", - "src/main/java/com/alohi/signplus/models/ListEnvelopeDocumentsResponse.java", - "src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentRequest.java", - "src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequest.java", - "src/main/java/com/alohi/signplus/models/RenameEnvelopeRequest.java", - "src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelRequest.java", - "src/main/java/com/alohi/signplus/models/ListEnvelopeDocumentAnnotationsResponse.java", - "src/main/java/com/alohi/signplus/models/ListTemplateDocumentsResponse.java", - "src/main/java/com/alohi/signplus/models/ListTemplateAnnotationsResponse.java", - "src/main/java/com/alohi/signplus/models/ListTemplateDocumentAnnotationsResponse.java", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestSignature.java", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestInitials.java", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequest.java", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequestSettings.java", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequest.java", + "src/main/java/com/alohi/signplus/models/CreateTemplateRequest.java", + "documentation/services/EnvelopeIdService.md", + "documentation/services/TemplateTemplateIdService.md", + "src/main/java/com/alohi/signplus/models/DownloadEnvelopeCertificateParameters.java", + "src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentParameters.java", + "src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentsParameters.java", + "src/main/java/com/alohi/signplus/models/DynamicFields.java", + "src/main/java/com/alohi/signplus/models/Verification.java", + "src/main/java/com/alohi/signplus/models/GetAttachmentFileParameters.java", + "src/main/java/com/alohi/signplus/models/SendEnvelopeParameters.java", + "src/main/java/com/alohi/signplus/models/DuplicateEnvelopeParameters.java", + "src/main/java/com/alohi/signplus/models/VoidEnvelopeParameters.java", + "src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentAnnotationsParameters.java", + "src/main/java/com/alohi/signplus/models/GetEnvelopeAnnotationsParameters.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestCheckbox.java", + "src/main/java/com/alohi/signplus/models/GetEnvelopeParameters.java", + "src/main/java/com/alohi/signplus/models/DuplicateTemplateParameters.java", + "src/main/java/com/alohi/signplus/models/GetTemplateDocumentParameters.java", + "src/main/java/com/alohi/signplus/models/GetTemplateDocumentsParameters.java", + "src/main/java/com/alohi/signplus/models/GetDocumentTemplateAnnotationsParameters.java", + "src/main/java/com/alohi/signplus/models/GetTemplateAnnotationsParameters.java", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestCheckbox.java", + "src/main/java/com/alohi/signplus/models/GetTemplateParameters.java", "src/main/java/com/alohi/signplus/models/CreateWebhookRequest.java", - "src/main/java/com/alohi/signplus/models/ListWebhooksResponse.java", - "src/main/java/com/alohi/signplus/models/SigningStep.java", - "src/main/java/com/alohi/signplus/models/AttachmentSettings.java", - "src/main/java/com/alohi/signplus/models/AnnotationSignature.java", - "src/main/java/com/alohi/signplus/models/AnnotationInitials.java", - "src/main/java/com/alohi/signplus/models/TemplateSigningStep.java", - "src/main/java/com/alohi/signplus/models/DownloadEnvelopeSignedDocumentsParameters.java", - "src/main/java/com/alohi/signplus/models/EnvelopeAttachments.java", "src/main/java/com/alohi/signplus/models/ListWebhooksRequest.java", - "src/main/java/com/alohi/signplus/models/RecipientVerification.java", - "src/main/java/com/alohi/signplus/models/Page.java", - "src/main/java/com/alohi/signplus/models/DynamicField.java", - "src/main/java/com/alohi/signplus/models/AnnotationCheckbox.java", + "src/main/java/com/alohi/signplus/services/TemplateIdService.java", + "src/main/java/com/alohi/signplus/services/SignedDocumentsService.java", + "src/main/java/com/alohi/signplus/services/CertificateService.java", + "src/main/java/com/alohi/signplus/services/DocumentIdService.java", + "src/main/java/com/alohi/signplus/services/DocumentService.java", + "src/main/java/com/alohi/signplus/services/DocumentsService.java", + "src/main/java/com/alohi/signplus/services/DynamicFieldsService.java", + "src/main/java/com/alohi/signplus/services/SigningStepsService.java", + "src/main/java/com/alohi/signplus/services/SettingsService.java", + "src/main/java/com/alohi/signplus/services/PlaceholdersService.java", + "src/main/java/com/alohi/signplus/services/FileIdService.java", + "src/main/java/com/alohi/signplus/services/SendService.java", + "src/main/java/com/alohi/signplus/services/DuplicateService.java", + "src/main/java/com/alohi/signplus/services/Void_Service.java", + "src/main/java/com/alohi/signplus/services/RenameService.java", + "src/main/java/com/alohi/signplus/services/SetCommentService.java", + "src/main/java/com/alohi/signplus/services/SetNotificationService.java", + "src/main/java/com/alohi/signplus/services/SetExpirationDateService.java", + "src/main/java/com/alohi/signplus/services/SetLegalityLevelService.java", + "src/main/java/com/alohi/signplus/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.java", + "src/main/java/com/alohi/signplus/services/AnnotationsService.java", + "src/main/java/com/alohi/signplus/services/AnnotationIdService.java", + "src/main/java/com/alohi/signplus/services/AnnotationService.java", + "src/main/java/com/alohi/signplus/services/EnvelopeService.java", + "src/main/java/com/alohi/signplus/services/EnvelopesService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdDuplicateService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentDocumentIdService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentsService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdSigningStepsService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdRenameService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetCommentService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetNotificationService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsDocumentIdService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationAnnotationIdService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsSettingsService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsPlaceholdersService.java", + "src/main/java/com/alohi/signplus/services/TemplateService.java", + "src/main/java/com/alohi/signplus/services/TemplatesService.java", + "src/main/java/com/alohi/signplus/services/WebhookIdService.java", + "src/main/java/com/alohi/signplus/services/WebhookService.java", + "src/main/java/com/alohi/signplus/services/WebhooksService.java", "src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateRequest.java", - "src/main/java/com/alohi/signplus/models/ListEnvelopesResponse.java", - "src/main/java/com/alohi/signplus/models/EnvelopeNotification.java", - "src/main/java/com/alohi/signplus/models/ListTemplatesResponse.java", - "src/main/java/com/alohi/signplus/models/Webhook.java", - "src/main/java/com/alohi/signplus/models/AttachmentPlaceholdersPerRecipient.java", - "src/main/java/com/alohi/signplus/models/AnnotationFont.java", - "src/main/java/com/alohi/signplus/models/AttachmentPlaceholderFile.java", + "src/main/java/com/alohi/signplus/models/DownloadEnvelopeSignedDocumentsParameters.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationRequest.java", + "src/main/java/com/alohi/signplus/models/TextFont1.java", + "src/main/java/com/alohi/signplus/models/DatetimeFont1.java", + "src/main/java/com/alohi/signplus/models/SetTemplateNotificationRequest.java", + "src/main/java/com/alohi/signplus/models/TextFont2.java", + "src/main/java/com/alohi/signplus/models/DatetimeFont2.java", + "src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateParameters.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentParameters.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsParameters.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsParameters.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsParameters.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersParameters.java", + "src/main/java/com/alohi/signplus/models/RenameEnvelopeParameters.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeCommentParameters.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationParameters.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateParameters.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelParameters.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationParameters.java", + "src/main/java/com/alohi/signplus/models/CreateEnvelopeParameters.java", + "src/main/java/com/alohi/signplus/models/ListEnvelopesParameters.java", + "src/main/java/com/alohi/signplus/models/AddTemplateDocumentParameters.java", + "src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsParameters.java", + "src/main/java/com/alohi/signplus/models/RenameTemplateParameters.java", + "src/main/java/com/alohi/signplus/models/SetTemplateCommentParameters.java", + "src/main/java/com/alohi/signplus/models/SetTemplateNotificationParameters.java", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationParameters.java", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsParameters.java", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersParameters.java", + "src/main/java/com/alohi/signplus/models/CreateTemplateParameters.java", + "src/main/java/com/alohi/signplus/models/ListTemplatesParameters.java", + "src/main/java/com/alohi/signplus/models/CreateWebhookParameters.java", + "src/main/java/com/alohi/signplus/models/ListWebhooksParameters.java", "src/main/java/com/alohi/signplus/models/CreateEnvelopeRequest.java", - "src/main/java/com/alohi/signplus/models/Document.java", - "src/main/java/com/alohi/signplus/models/TemplateRecipient.java", - "src/main/java/com/alohi/signplus/models/Recipient.java", - "src/main/java/com/alohi/signplus/models/AttachmentPlaceholderRequest.java", - "src/main/java/com/alohi/signplus/models/AnnotationText.java", - "src/main/java/com/alohi/signplus/models/AttachmentPlaceholder.java", - "src/main/java/com/alohi/signplus/models/AnnotationDateTime.java", + "src/main/java/com/alohi/signplus/models/SigningStepsRecipients2.java", + "src/main/java/com/alohi/signplus/models/SigningStepsRecipients1.java", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestText.java", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestText.java", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.java", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestDatetime.java", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestDatetime.java", + "src/main/java/com/alohi/signplus/services/EnvelopeIdService.java", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdService.java", "README.md", "src/main/java/com/alohi/signplus/models/ListTemplatesRequest.java", - "src/main/java/com/alohi/signplus/models/AddAnnotationRequest.java", - "src/main/java/com/alohi/signplus/models/Template.java", - "src/main/java/com/alohi/signplus/models/Annotation.java", - "src/main/java/com/alohi/signplus/models/Envelope.java", - "src/main/java/com/alohi/signplus/models/ListEnvelopesRequest.java", - "documentation/services/SignplusService.md", - "src/main/java/com/alohi/signplus/services/SignplusService.java" - ] + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequest.java", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequest.java", + "src/main/java/com/alohi/signplus/models/ListEnvelopesRequest.java" + ], + "fileHashes": { + ".env.example": "deba3e289e64ed2ccb9169d2739d4db6bf8383b6cdfa5f98abd6f76010df80fd", + ".gitignore": "16c2381047d584e96eb9c89da75b41f24abb5df5e1b9b770321ef9bf9f46b7b4", + ".idea/compiler.xml": "d4b3c50d88d994f6b45771590618d6bb974dd4686aee2207f98e4f2d6425f438", + ".idea/encoding.xml": "c08731aff01601ae1dce0f19fe8f058b750a167cdef4fb92b8ba104eeb7ec038", + ".idea/jarRepositories.xml": "9c794caa37d870d809db42aa629d5232e5f1a9a76593a28a55898244ecbc75a2", + ".idea/misc.xml": "042abf22dfaa2dc7e5f3d7956f778c18bdfb7404f4a9bddd388d49e48e00f90e", + ".idea/workspace.xml": "6ff635cc74e6a8bf1618157a9110c7a70a6d78175e0ca9065f07acdbc75aad26", + "LICENSE": "3ec558dc6e9c9355ab4b28c942caa92bf90b0b82c12d7838d2ef92467ad135c1", + "README.md": "785887f5f276d21fcf38611f0755ddef5598b6ae05dadf86a03283496db5bc6b", + "documentation/models/AddEnvelopeAnnotationParameters.md": "3bf8713c0363723f1d0fac5a0c1806fe8ad3f14524f8375899073088bf173cf0", + "documentation/models/AddEnvelopeAnnotationRequest.md": "b62e19d3464ce0b9e02718e4818fe01b1006a8f699f09b4f62cec5a75108a63a", + "documentation/models/AddEnvelopeAnnotationRequestCheckbox.md": "58c988eb7c08a07873b79287a3593aa21c0a4c5ef71eea16270792cf9d4d1403", + "documentation/models/AddEnvelopeAnnotationRequestDatetime.md": "6888953c6c675454afa95a2dde67ab513918dcb6abccfb5b2b88ccc244b5e9ba", + "documentation/models/AddEnvelopeAnnotationRequestInitials.md": "fcdcd24cdd646a7a13c348762df9a18dc503de8632633c3a74561d92db669581", + "documentation/models/AddEnvelopeAnnotationRequestSignature.md": "495e8a0013a083563f933f5e988c200c11730bb5cebcf1c456728fca4b1ce0f1", + "documentation/models/AddEnvelopeAnnotationRequestText.md": "17a389449da92ab31b7ac8605e779577a3be10d929229a784d727a63580bcc16", + "documentation/models/AddEnvelopeDocumentParameters.md": "8252f935913a46d7a79c8ca9860bd73fa84f6822ccd44235db94f64e41f6f41a", + "documentation/models/AddEnvelopeDocumentRequest.md": "6517f6b06febf1059e4612f55084d5831a81e7ba73ced75f7e6bb2864797b33a", + "documentation/models/AddEnvelopeSigningStepsParameters.md": "cbe883a32fab9dcf7f1f25e14ee2cf8b1711fd182e9f2688f18884fd8280274d", + "documentation/models/AddEnvelopeSigningStepsRequest.md": "e9bd5f811615116286de041f6f29926d34302f0b61b30c5b8a870859e5b099ab", + "documentation/models/AddEnvelopeSigningStepsRequestSigningSteps.md": "41ffef4581c0d4dbbd6315d221ac17da19a87409bb9fedcbe55160bdecd701fb", + "documentation/models/AddTemplateAnnotationParameters.md": "4e4862b66bbc2656ec929e7ef9067d0f6e41ee73fffb40c1dcc9f597541904f1", + "documentation/models/AddTemplateAnnotationRequest.md": "0dca59b83adb4f63f83cc46f786467d0cbe08d3212f11862aa050a00a4a70131", + "documentation/models/AddTemplateAnnotationRequestCheckbox.md": "aace8ecb9b8625abce4975cbb538bc17a2e1e05b366c3df47a047f140f6a5272", + "documentation/models/AddTemplateAnnotationRequestDatetime.md": "909991a697698243221d7f0ba26fd6e332a4b5b282cdeaa8f3463526c62c9d94", + "documentation/models/AddTemplateAnnotationRequestInitials.md": "7e1a2e51b9f3bc64f551b4bba3d22637b7574752b9117910873e9556c3c02069", + "documentation/models/AddTemplateAnnotationRequestSignature.md": "e34f95f466d0492a1c0164c2426d613fc5b0641a9a08102d09dc43f24efd2c7e", + "documentation/models/AddTemplateAnnotationRequestText.md": "400399610fd42457ff0abf3ae9498fa7e3258fb32dbe40c0769c2d067044f914", + "documentation/models/AddTemplateDocumentParameters.md": "4d15ad6438e7c2dcd817f50630352d92052b80e7f0be0c6bf43dd06783b7b860", + "documentation/models/AddTemplateDocumentRequest.md": "c9d4c485ba9009e3874066df620198707887a0e3c39ba455ee6aafb95d2ad8c2", + "documentation/models/AddTemplateSigningStepsParameters.md": "3deff56aff50922f05690b08097cf4b2c17b1517b37b5f6b76bc3532c13cf616", + "documentation/models/AddTemplateSigningStepsRequest.md": "2a3b5fb6770fb7c8367f58f27acfbbea241b4c3f44908f817a1b62a0604c29ee", + "documentation/models/AddTemplateSigningStepsRequestSigningSteps.md": "e8f024a77634aa3172c65106e0a3edd168b93c6d4c187e1e0419214618f2606f", + "documentation/models/CreateEnvelopeFromTemplateParameters.md": "208ea18c0e1303bb1bece80564fe9e92472d737933aa1c4db13c8bd06d4355d1", + "documentation/models/CreateEnvelopeFromTemplateRequest.md": "10633cfa9b9c1f4af0c5ee8b73034f595ce3688f1c629471097e6646a1dff516", + "documentation/models/CreateEnvelopeParameters.md": "ff035b165e4c069daf29dde8c4d916797d3bfe327666e64e4372a2c10c8f1659", + "documentation/models/CreateEnvelopeRequest.md": "66315891491ff939e4a62a169ca4f94118c58341eca77b32194840c155dee6c1", + "documentation/models/CreateTemplateParameters.md": "2661b1fa6f5bf53932a8f6e3ea0e9b1d1b2c5405b64ad685aa94c80e65e02906", + "documentation/models/CreateTemplateRequest.md": "6013ded7a3ef0d9ef15a569bc27f3a58965edb11fcfe8e9eff4e9ac166866344", + "documentation/models/CreateWebhookParameters.md": "56569d8fb758a06b9b5128877507e6b34989fd62aeeb64293823dd5081708b49", + "documentation/models/CreateWebhookRequest.md": "a9c37da4e648913ea93065fbecdcbe5c2922cacd4375d08cb8b49463b1b9d879", + "documentation/models/DatetimeFont1.md": "17f9b46c2acd20b5a375d92bc1ee42e3d370dfa2b47d7b057de29025192a0b94", + "documentation/models/DatetimeFont2.md": "ea1043a3eaf89fc3f38a72918dcb5e9e794808c20bbb423c5f7e20281909d455", + "documentation/models/DownloadEnvelopeCertificateParameters.md": "21c869e9e44adf4e1d198fc15f4a31062674dc3967f52d4503e68b6c8198f6eb", + "documentation/models/DownloadEnvelopeSignedDocumentsParameters.md": "c4385bca9494ff00b3769d8c50e7026572baf5eb6014869b793fbc2e878402b6", + "documentation/models/DuplicateEnvelopeParameters.md": "93ca1c435ca7cd631508d5eb7ed1174db45ae2e6c9e5e5f34d7c71f522e5c309", + "documentation/models/DuplicateTemplateParameters.md": "54a4287eaacb68126a0408a0c49e1d17a9d7257839b6ca208832ce29a2379fea", + "documentation/models/DynamicFields.md": "cd4b33e08117e16440ecd59ab635531536b2799a2c19409f44c13ff7ab0d40bf", + "documentation/models/GetAttachmentFileParameters.md": "2413e5853e2f1cd262682275adc947ef0ff395419415abde9b1d2ae2580b6d94", + "documentation/models/GetDocumentTemplateAnnotationsParameters.md": "5a5ed8dedd74ef0d08dece5984857ba4bc9414a5f64d5ef64bfad937f73b0f38", + "documentation/models/GetEnvelopeAnnotationsParameters.md": "5036751833bb20dfcf6033b97a245bb829ff4b0721475afb7015b866d62470d8", + "documentation/models/GetEnvelopeDocumentAnnotationsParameters.md": "4a46fad771c28a43b3d68118efb7554b7a1b5e7f12cbb30645c5f1a2c4ca288d", + "documentation/models/GetEnvelopeDocumentParameters.md": "3eb0968da72c161b515a1f193d34bbfac2784e584f2901d2b75b953ac6865f60", + "documentation/models/GetEnvelopeDocumentsParameters.md": "c88134c9f16b5db0ff2ceea22ee5fa5d9d4b08431fa45e84dd12628204c0c75a", + "documentation/models/GetEnvelopeParameters.md": "c40bad23e9b4427a3913f76037162297371cd0d3e30091d0aa573578db7df835", + "documentation/models/GetTemplateAnnotationsParameters.md": "9cc71c7ec171dae869916a8c159a1274445777ca68421b8db7af2b916e4583f8", + "documentation/models/GetTemplateDocumentParameters.md": "e2332b2d6a8274d68ebdc4ac48e6d4d4e33a7ddbaac55a187f247591374c62f6", + "documentation/models/GetTemplateDocumentsParameters.md": "f08876431994ee7b4ffcbed54430e076b0bd49f379a4bcfade446eecfb6c84e9", + "documentation/models/GetTemplateParameters.md": "a6464475831f4bbe97b506a7073f2f732c3691b8f8165de3eeacf469dd6a27d3", + "documentation/models/ListEnvelopesParameters.md": "8009b5b831be86af2293ca0fc7694b3088dad05f66c7531a0cbd49724f8a649f", + "documentation/models/ListEnvelopesRequest.md": "7463b946ed6a832f82b814518d987373d878216f1c1f64a34b026db977a62959", + "documentation/models/ListTemplatesParameters.md": "fce9ea75cccedc2369d57e5c647da987359a663c365fe55f03cd8d5cfe55e06a", + "documentation/models/ListTemplatesRequest.md": "c9efd2388c6241b7449a1eb11adcd1e1eb4c727e64c3608e964fe61598c0fa9e", + "documentation/models/ListWebhooksParameters.md": "f632c82d4bee992c99e5d72dc7e6b77b012eb7c16a12854de04cac4b377bceb1", + "documentation/models/ListWebhooksRequest.md": "71ed602280833e99461ebcb6e6f8d01e7f16b0094ed3cd9249879f4957bcf5b6", + "documentation/models/RenameEnvelopeParameters.md": "6302bc47af76348db38f50fc9992d3674c6c4abf19adfa49581f800dc5a83c37", + "documentation/models/RenameEnvelopeRequest.md": "52fb616fd3d60be44ba617ab575638c07a0d9e6d1a358924a199f7ab02a1f704", + "documentation/models/RenameTemplateParameters.md": "34d98bad3d63aa3ac86d8317c571a9b42f9c71dbfcc58b0cafd6cfaf45e029b5", + "documentation/models/RenameTemplateRequest.md": "bc51cae7cab5412087e07f053e50f579e848c5e49b147f710755df9a7342d4d7", + "documentation/models/SendEnvelopeParameters.md": "8ce500b9b605013005a8c8786fedb5b30fd062f21ffa09fdc0038c0424be15ed", + "documentation/models/SetEnvelopeAttachmentsPlaceholdersParameters.md": "f4200098e69a741e81a07a9f9d691b08e00b9ffb0e1df4a23f14023c4d53e725", + "documentation/models/SetEnvelopeAttachmentsPlaceholdersRequest.md": "683ef68ff72e51c491e55d678fed3eea0c030163fbd948a1d6c0216a13c9db77", + "documentation/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.md": "6bbfaae79a702839cfc4474ef6e90c2e84a9f189579b97a1d697698db8703c8c", + "documentation/models/SetEnvelopeAttachmentsSettingsParameters.md": "5d2878d64ccd622e1867aa0b4844ff28f8b4026227322639f96ebb3a810e2cbe", + "documentation/models/SetEnvelopeAttachmentsSettingsRequest.md": "7e67c25c61ad10b795fc7dee3890b598913f88da03e10420bebd6b74d4a2937b", + "documentation/models/SetEnvelopeAttachmentsSettingsRequestSettings.md": "9e8964ba2e3e29078044c6c74cc321e8eb6879780664f02d479b126496df828f", + "documentation/models/SetEnvelopeCommentParameters.md": "84c951135d4f52adbcadc5931c5d1a004db1fae3a71806fd1710fd30732bdf20", + "documentation/models/SetEnvelopeCommentRequest.md": "e2c58cf7cf36f2eb47fb43f5c5507eacec178fb4f229864295029872e8e29a43", + "documentation/models/SetEnvelopeDynamicFieldsParameters.md": "1ffe27a85cc97489cf9f5f3216507bd52f0c380fb432b4a3c68f5f30a0cb9636", + "documentation/models/SetEnvelopeDynamicFieldsRequest.md": "d718ef3c2f666cda6cb6e75e6c65c7f11c64a4ebe417d0f7c040e3645f580b6e", + "documentation/models/SetEnvelopeExpirationDateParameters.md": "b953cf918075659e38dad82f9423e56c025301048e7dd66de04eaa03a1e2c928", + "documentation/models/SetEnvelopeExpirationDateRequest.md": "e421c7d6e1d793103a562807c332672910a35b5cbee93a2054d2ebc09b3498ac", + "documentation/models/SetEnvelopeLegalityLevelParameters.md": "29a51a21904e6fdf017924731278c46c131170cadcf1ae6edf3b70d80fe1c7a7", + "documentation/models/SetEnvelopeLegalityLevelRequest.md": "1872fe3aae6e31ce0281880be5ff70698ed15450a8c8ef35a77d5776be846c78", + "documentation/models/SetEnvelopeNotificationParameters.md": "e70bbe0c7cb47b27017c0b9af550db129f00957b8950e6468f7306c8aa94b3be", + "documentation/models/SetEnvelopeNotificationRequest.md": "2c9626fbe2ba11b8825c95ed2de18aa238b1b86ef0b12bfff1744dc87fc6c0f2", + "documentation/models/SetTemplateAttachmentsPlaceholdersParameters.md": "4f6b36c9f7f3e902f0a1984c8fcce5351228e876d3f28b9478bfc3438a8b3591", + "documentation/models/SetTemplateAttachmentsPlaceholdersRequest.md": "edababf9c0ee7d43526e30fb6867b729d484320b6cdba52d2f1ddad2e3ddc6f3", + "documentation/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.md": "2ec59b7db15e91c01df685f9e807d43eb7c94e1a9cead668ee42c63ed880f672", + "documentation/models/SetTemplateAttachmentsSettingsParameters.md": "899f7a39fcd8e1582aa308d458212f280a6cb8b8860d2bfa7ab52077247c9ac3", + "documentation/models/SetTemplateAttachmentsSettingsRequest.md": "608a882492b46c753b765200e55e49a2c82ce8c9b1f3a2d09918b917c7a35f74", + "documentation/models/SetTemplateAttachmentsSettingsRequestSettings.md": "5c2f9d9835f57b382dbc41f75dbfb372bd616501800acb2ee7fb816cbfa82d3f", + "documentation/models/SetTemplateCommentParameters.md": "b0fccd9dbc2fe401b29bc7bab991b0a8923b47e51000f4051a4ec26c549dbae6", + "documentation/models/SetTemplateCommentRequest.md": "2010b1e57828ba830de476b2ded3821c1b1af5b12d8cb29c1fe86524c1164d20", + "documentation/models/SetTemplateNotificationParameters.md": "5fe9343df8b36c4fcecb9fd09e7d509def2b95a2d4bf323331041dfea7ffbf5e", + "documentation/models/SetTemplateNotificationRequest.md": "16ba59668bdb7fecc1a85ca0b40e45a1e3d7979477555c40d8bb40c90999421f", + "documentation/models/SigningStepsRecipients1.md": "019a6cf8cbdc08070d655a5e3509113cec6f1d7f702287c12b6f64483a414892", + "documentation/models/SigningStepsRecipients2.md": "86ba1e1072f38332b86aad4692101ccb60fbd4304dcde71c2ad3104f80509208", + "documentation/models/TextFont1.md": "777269f3e258b36e4c475dfcb46ef4e39a7308d350c7140ad64448a18613d886", + "documentation/models/TextFont2.md": "bee4e3d5f59d77eb0eccb949dc5aee27bd390d69280176e86c46e057bc00c8d4", + "documentation/models/Verification.md": "21717777eb3719eceb3b69a5822b523d5a5400ba10fbf266f854c7034f2d7e4b", + "documentation/models/VoidEnvelopeParameters.md": "1240b0428511857ed5466b7beee776e7455f010fe0e291bdcd81358858fd9659", + "documentation/services/AnnotationIdService.md": "d092543cc545188b5835fd3fb895d0706c14d04448647b7aae3577e858fe83f6", + "documentation/services/AnnotationService.md": "96715168b6be4a88c271dfb111ca5b040df881baf95f156201ed36da8c5d7d81", + "documentation/services/AnnotationsService.md": "2bf895bfb3f0f465109ceb13b19252736e3889330f4cc7ec03f4869bd52d2b19", + "documentation/services/CertificateService.md": "10d81ffd1caa5ec95fafa38e4c43611c64acb9d1a7697e535135809acb21f7e5", + "documentation/services/DocumentIdService.md": "8f566afb9228765d593f948184f42507f6ff32562dd3402fa5b91aec44d16be8", + "documentation/services/DocumentService.md": "cd6faf18ba37f1dee65a15d995340b73f1025530430b43d5d47821d0a0824566", + "documentation/services/DocumentsService.md": "4ae41c9e8b18a9336c5bc31a1d3584c4a37920248fa1a6f49e9c35935503ac56", + "documentation/services/DuplicateService.md": "34b2e8073d7a56903fa87c5493536b2fd0ad8df3795957c35ebda28b0e129fc5", + "documentation/services/DynamicFieldsService.md": "cf24d59cb57e954eb882c5a372c69fe3e062d7e014fddf9c0d14bb3570933a6f", + "documentation/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.md": "260fb136e8b75f74aaffd4c5455bf532b20f4093e18b792b70a9b736bfb6d950", + "documentation/services/EnvelopeIdService.md": "fc4d1451f9e17670e51a64b050aa18ae26252e9986678029dbe95933885e7b15", + "documentation/services/EnvelopeService.md": "5c11914a0d0eb3cf7899631e1443e7a7225366ae95a8fa370f31a326d9f3cc93", + "documentation/services/EnvelopesService.md": "2c0a85f0a86db7225eca840c1a57dad1527a7cbb161500a9c91083a3abd53245", + "documentation/services/FileIdService.md": "b7a44ee76545d53c8c2ecb7d611f74286735bb6893c31766d6715873c67c024c", + "documentation/services/PlaceholdersService.md": "d20c254439209b8628d6cd912d724d1a059c7086a5806e44382e83d1b2e08083", + "documentation/services/RenameService.md": "77f4768718828686b55fb431339c87a4eafe95b3a7aecd0ea4c69c0f785d9c7a", + "documentation/services/SendService.md": "21183766fc197a360ffbd4e99bba9930f53591b8386c4d6609bcf1cb4b0ace6a", + "documentation/services/SetCommentService.md": "9807d6e889b2eaba73810e7e4008768fd729eac7b826caabc0d4d912ddf3f1a1", + "documentation/services/SetExpirationDateService.md": "e562c77c6d1a51b804738b186db7ce13f6d7de412512ca3abc16936e8db67911", + "documentation/services/SetLegalityLevelService.md": "f64d20141f6a6a71789e2c2e158bd9bb019c3abde7d0f865fb8b889dcad77055", + "documentation/services/SetNotificationService.md": "4b2fc82a1294165316b1b2fdcc3d19d6a069ffb1ee0569962a7e98c040c94668", + "documentation/services/SettingsService.md": "46bcd146b2d7a434fe4f0322a1249fa4649785a3a2c885d6bd746460aa0a7878", + "documentation/services/SignedDocumentsService.md": "8b711bc9c4c7ef0b5a62bb201a9f9abaad5c0e444c2d9901eeba4203d9d706a5", + "documentation/services/SigningStepsService.md": "d2940b8e2c41d5a1e1270757723cfbe6d98801bdd591938a1ea79da5ade1bbda", + "documentation/services/TemplateIdService.md": "3a22e00d477623d4930638052600fcd753c7b3160ebf6fc0d4a49d541015a8ae", + "documentation/services/TemplateService.md": "6bceeae57dd680f1eddfcb8f5ceb8c7a549d25f9e54af1d02a89a39a7e65badd", + "documentation/services/TemplateTemplateIdAnnotationAnnotationIdService.md": "9bc34c8fd0a5b7148e622dd20ae8cff8505443fbb3d016c95a265711076518ac", + "documentation/services/TemplateTemplateIdAnnotationService.md": "5cae053974cf4807151ac6219c53318c578cb1ef27d5dd41adb43d7aae2fa9f9", + "documentation/services/TemplateTemplateIdAnnotationsDocumentIdService.md": "409f1ee5af255988d9d80846cabdfc8c62a67d9a89019f4fa23b02b33bbde938", + "documentation/services/TemplateTemplateIdAnnotationsService.md": "4a79839f2cf48ea449abad15437022a232be651011388e42836df153d75175b9", + "documentation/services/TemplateTemplateIdAttachmentsPlaceholdersService.md": "2858acc05b90183b2c73f4ad37cb1b4697636ce7573f9b6bd027ed8cb60cbabc", + "documentation/services/TemplateTemplateIdAttachmentsSettingsService.md": "4bec9a25d6df7f7400c33da6523e4b66efce675e3ea017ae340ec08656fb73fb", + "documentation/services/TemplateTemplateIdDocumentDocumentIdService.md": "9f055c9ae4aa300aa745521ccdd9a505a00418e3457012519bcab58551c317ff", + "documentation/services/TemplateTemplateIdDocumentService.md": "a3fe84d1984ff231f2c7dc21a51e2d5eb08fcbee1cb2f47f1a47fac85dc7b58a", + "documentation/services/TemplateTemplateIdDocumentsService.md": "d86131a7bbd66d80f38c086bf2c1e7797bd4faf0d2891e7a804321f840e83551", + "documentation/services/TemplateTemplateIdDuplicateService.md": "abd57eeabad1fea34c016f9643112821c9cbb2c960eba6da51b009fd958478e7", + "documentation/services/TemplateTemplateIdRenameService.md": "a492c38e46bdb6d17fdd08cf6b45cb153e3a4bdb99797fa2dbc11d68994d0c6b", + "documentation/services/TemplateTemplateIdService.md": "140980c22fb485b6232d0fa3394767fdf427eb25c38140bcced8803759b8c890", + "documentation/services/TemplateTemplateIdSetCommentService.md": "2524d0116e1b27a4b65316cc368661add05ae75d5c08aa93020e212e0c5f40e3", + "documentation/services/TemplateTemplateIdSetNotificationService.md": "0582237de7500c38044a492b4023a575cc5463bfdcabc106ffb144bfb75a1f9d", + "documentation/services/TemplateTemplateIdSigningStepsService.md": "5122898b22e973b40582f0fff6b7f3a315f680fb7efb3fab4b7da14f61cdbfea", + "documentation/services/TemplatesService.md": "2fe28ef50077c1c4ca3d3a2d287982bd64adffb6b60a4fd9090f275652113447", + "documentation/services/Void_Service.md": "e84d631fa4074650ae00ed9a5ec87da5d2d584d7787d1728218e41d5653f189b", + "documentation/services/WebhookIdService.md": "e023f77a99993540d9a97f0bb898452e2225c72c66ed7578b09ea57ef855aa2e", + "documentation/services/WebhookService.md": "9bc8ab79a04f675463e86ed45a59ea55276aa8c92c5334f3dae0848fe512c21b", + "documentation/services/WebhooksService.md": "678ffdc02ae29760f6727b30230c4d4a79b1d041a70b35d9f18b7fdc0a4977e8", + "documentation/snippets/snippets.json": "3fb5157d9df16d3bd154e75bcf0fb62d5537501ae2fdf271a6a20d1425f5445d", + "examples/.gitignore": "16c2381047d584e96eb9c89da75b41f24abb5df5e1b9b770321ef9bf9f46b7b4", + "examples/README.md": "ddd772dbadc462f6282630590c80ef5ffe87b10fc4b03b4d5d83490342efc810", + "examples/pom.xml": "a03c3c794f81bc1f03d065f8f865caab30f245e6d78e75c12663692f774dd95c", + "examples/run.sh": "b421122e2d707b60e35b125a39a47dd9b1bec16d241aec1ba5a7357816e4757b", + "examples/src/main/java/com/example/Main.java": "c83e7c6fb8f9b263c1dd97d9e042d23b5d90bf983d2f53b07c88bb999891e04b", + "pom.xml": "c407aaccd5c76fcc16cd3eab79ec228ecd20cc56fe98c6099b4025b6c965eb83", + "prettier.config.js": "2fe33fda52344779fcf235afa8152cfd356880dc3161da09403dc26231bc72d9", + "src/main/java/com/alohi/signplus/Signplus.java": "51a65f36300c9afee2bc6eecf655f9e020b2e26c26988ed50ee8db04d25b8b80", + "src/main/java/com/alohi/signplus/config/RequestConfig.java": "2597667c8f714cafd98d85059f8dd75dfeea46101b182642a4784348053c2a31", + "src/main/java/com/alohi/signplus/config/RetryConfig.java": "5d6df73c5ea367c9166673a2d44139f97695b45e1e8f8a4d6819fe8925998c0b", + "src/main/java/com/alohi/signplus/config/SignplusConfig.java": "5aa3b3f74f32ab1940b3b084d5f71d0de1a92798eb3d9654e9c8e1c26bd8c3bc", + "src/main/java/com/alohi/signplus/exceptions/ApiError.java": "312f64e9dbfff531ea8b38c0c61b36c3ae712178413281e30b1e7e8e9cf00ca8", + "src/main/java/com/alohi/signplus/http/Environment.java": "e557148eb7d879d3a94c586ad6f4222d07c799d38b0586732a6f3ca824833d4c", + "src/main/java/com/alohi/signplus/http/HttpMethod.java": "c470ae597b5d102ba84f06929b8369dda70bc8a53ae999ffc9adbb69be898a57", + "src/main/java/com/alohi/signplus/http/ModelConverter.java": "8d9e1bea43970262dd801cf0179e7a168ca0f3c0b07439f853dfe869aad877e9", + "src/main/java/com/alohi/signplus/http/interceptors/DefaultHeadersInterceptor.java": "152cf31f575ad923bdd8124e808b86ea991f9ca3f36b2213fb05076c74bbfb52", + "src/main/java/com/alohi/signplus/http/interceptors/RetryInterceptor.java": "7d56f2279b522a1bfc4ec41ec27448fe3cb5d97c5eef7facaf5f93a4990f86d7", + "src/main/java/com/alohi/signplus/http/serialization/PathSerializationStyle.java": "9e905d4790f03ae7ae7feb921a0afda2f5e1256784615c86c33910e2e2914fb2", + "src/main/java/com/alohi/signplus/http/serialization/QuerySerializationStyle.java": "54bff8afe4cf081e5fa7790f55ade53200d6515fec66c362d21fbb85aba0d5b3", + "src/main/java/com/alohi/signplus/http/serialization/SerializationStyle.java": "3ce00d1a99b56278564ec8913ab253cccc161dc8da1a7dfe3dc3104a08895b0d", + "src/main/java/com/alohi/signplus/http/serialization/Serializer.java": "d20a56aca861769ec39376db4f4c7af69fade46c53b14f42072f5912b5716361", + "src/main/java/com/alohi/signplus/http/serialization/Util.java": "cbbb4e6f41b24b3d9dbf809e452818998b7837325f35253b872cd72e3d287fd6", + "src/main/java/com/alohi/signplus/http/util/ContentTypes.java": "62597c440f204b3c474ffe8e8c478c958788d67f3387e0c2a736048b15d06666", + "src/main/java/com/alohi/signplus/http/util/HttpArgumentConverter.java": "9daa5274be889765855bde64871f94c73b23279069f4e4b257cb3b16a39c998c", + "src/main/java/com/alohi/signplus/http/util/RequestBuilder.java": "8db3b4f2e96d81773a0b4bb264e471d4249d10261bc590f4cce9d7db455b7770", + "src/main/java/com/alohi/signplus/json/TypeUtils.java": "3a776d11bef57b42a42fb16082879b5b2928c93aa8cfd2049ea4a2b6eeff6e27", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationParameters.java": "fb8cc7069547ff068f923ff7d63600918902eaf191b12a5ce198b4ecb878a597", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequest.java": "d16b8ff756fafcad9f00a082ab795e47f16999c82a9e12f3aacc9485baee74a7", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestCheckbox.java": "bcb83838937bc65aba02fc38c2be979fe88ab1797d323469997ea3d41f1e05db", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestDatetime.java": "9ad55db2a1e68cd11b1c4338dedbba7797148f0b1fe5e9d46ba1bfee92ba3f07", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestInitials.java": "99626eabb57fd20534f577289f97e0db01b0a39b4d7ca0d4153545c4872a8566", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestSignature.java": "2291678db2ce435135c75bb2634f30e99cb3b220de42ceac13082c55893259d6", + "src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestText.java": "968227a3e9043c7b559a97ea29b36bc8f1069c59785ea06a46cfbfc34ffd1e62", + "src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentParameters.java": "1e261dea51e262830c014edd46281b4aefd9970e409991be38be38baa4762c9f", + "src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentRequest.java": "8342d92fbba96589b5c95e0dbf30fb4d5224f426b71b80feff363d03a11bc881", + "src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsParameters.java": "256857b9e3d7db8a70e98a54d7b7c2a52e900e662207af2c7e0dc5764538a052", + "src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequest.java": "0aad47dfcb10a9c2f9a5f0468facb632b181d3fb9626757624b67583913ee1e0", + "src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequestSigningSteps.java": "cebb52f93469e44ebc9641737936d86ba867c1eb044960757698775e832f10f1", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationParameters.java": "8f587e41c9eaf1da7901f9fb583204450b74c36c4b37e3ebe28e27af5a1c66cb", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequest.java": "bb154dfa78d6b5346fcd1c62c04dc4ad0c5da3baef19b9139dd2bf14dc20a42b", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestCheckbox.java": "7e1c675f5b002c8235156face5ada657ab0c7ef14725f683b0f4228f5a711459", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestDatetime.java": "bfd9b4cb7085cc4f6dabad03430ba8869f6ed7c62679e54d0c48a573e673dc86", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestInitials.java": "e4fda4780c3fc7fedf6cb8d0d5416fb8b5e693ef630820521d993792ad717abd", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestSignature.java": "1f0323385f29554b32010555c90fe4b66920afc0ba094d575711b06c694093f6", + "src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestText.java": "cdcd495ed6f9ff81d18845e6a313acd41e700fa0b7290a4547be3065194b4f14", + "src/main/java/com/alohi/signplus/models/AddTemplateDocumentParameters.java": "1ecf01fb0d5b86c5ae2778bb9f53af240412bc72bd81e0be87e14c242ba135f3", + "src/main/java/com/alohi/signplus/models/AddTemplateDocumentRequest.java": "43c80687a41637026b697b5ea8a3f590c3ee818e8ebdbe54dc7b8151cd1447c4", + "src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsParameters.java": "12f61f0a4947155e4d45e27d36a74f6be9811380c4ab6032a579033a8abc5dd5", + "src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequest.java": "527b0040d67b2794ef970a93deeab35cd47c5f6b85276c8e1ba6cd94dc8ee3fa", + "src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequestSigningSteps.java": "010944f89b471b96ad9d1dc4343906ecd1df2c514041da26cd278f8a374b196e", + "src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateParameters.java": "c60228595adb257275b14f5dc6f07d1b36a52b37577877aebbd24466fe615817", + "src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateRequest.java": "39e5804ef328738a1e36f158de58133d3713b512a10af7316685252c6926ce0b", + "src/main/java/com/alohi/signplus/models/CreateEnvelopeParameters.java": "5c16aba2e1c62b96b4be594789a66233425d9cc06f7e968d34e21a4fb34b90f1", + "src/main/java/com/alohi/signplus/models/CreateEnvelopeRequest.java": "51721370c63ae77950f626a158abf8a1e8b4d5ad31040499d86823e150e16faf", + "src/main/java/com/alohi/signplus/models/CreateTemplateParameters.java": "1cb9d787060fda32eb0af1787fa0464d29a997354595f8929523f08cf12a4266", + "src/main/java/com/alohi/signplus/models/CreateTemplateRequest.java": "06a26ef4c14b47dc2dbe933c7f825d5ab0235ae6983ad3fe6e267c05ba955bda", + "src/main/java/com/alohi/signplus/models/CreateWebhookParameters.java": "42f46e3dcb9b4cc5e13116f76e1bf3d91643a94a5f96953e8a4e30e7a95099e4", + "src/main/java/com/alohi/signplus/models/CreateWebhookRequest.java": "47805f233577e0b7d3a94653a4453a2469bba473242af3420cf18e51375ac8b9", + "src/main/java/com/alohi/signplus/models/DatetimeFont1.java": "57ea4df69e42317a5698ee37a98b6806888078fce1dcdd8c87b7a7b1cf512c15", + "src/main/java/com/alohi/signplus/models/DatetimeFont2.java": "944e94a6c4b193603df1b073a2e56c4eb52b390e06b3c7977cd2f4a8a42cea88", + "src/main/java/com/alohi/signplus/models/DownloadEnvelopeCertificateParameters.java": "22e1edb95ad6a62c5715dbe777bf75098edee335c0c699e37351be1fd1b7d7a8", + "src/main/java/com/alohi/signplus/models/DownloadEnvelopeSignedDocumentsParameters.java": "7de051babc4e51a7b822516e370b057ee68d95930a5de964eddf9a87aa812e9d", + "src/main/java/com/alohi/signplus/models/DuplicateEnvelopeParameters.java": "2bfeba29d0e94d94341ede5d3fdfcbe78d72940d9116e6e42af1357ddc8fe50c", + "src/main/java/com/alohi/signplus/models/DuplicateTemplateParameters.java": "fb7f12963b10410760b14854c4e5d2d92e4fb896fbf48c6498d5d327d6de7598", + "src/main/java/com/alohi/signplus/models/DynamicFields.java": "a716e696538c35d12b4a9ef015c00f26b91d108faeae450e0bd0e7b8d615daa7", + "src/main/java/com/alohi/signplus/models/GetAttachmentFileParameters.java": "e2bae1efa700b28e05e635f859847389688e2f9692a90513d157513e93adc874", + "src/main/java/com/alohi/signplus/models/GetDocumentTemplateAnnotationsParameters.java": "b1f7cbd3b57e070e62d49d3301baa6f7035d831e2bbe74ebb945d4211268418a", + "src/main/java/com/alohi/signplus/models/GetEnvelopeAnnotationsParameters.java": "ce7aaa6b4c807cd504cbfcfef8154b0d8d2b081ad034b1f6d05167577a074545", + "src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentAnnotationsParameters.java": "07aa8b81f448ca03a6eeff8bb9a5ef381197617d6227de9a2444669fe4a244ee", + "src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentParameters.java": "d83997f405f51814f2c9b98e84cf98ac3de3c512bd1c0b3ae43c357e5ea9c9b5", + "src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentsParameters.java": "b4fb488037059c400447c26be8581e95f1e31779213fea6bef0a905c00cf0abc", + "src/main/java/com/alohi/signplus/models/GetEnvelopeParameters.java": "35cf2fe483ee67e06aadd01f1bf3906378ba0b7fd817d96079f80abe88013fe9", + "src/main/java/com/alohi/signplus/models/GetTemplateAnnotationsParameters.java": "821f8c2ebc9ee92a892ab21ed6be2bc011aca774b2264069801464ddfb16f0df", + "src/main/java/com/alohi/signplus/models/GetTemplateDocumentParameters.java": "cb4412c696308c5ef5d0380ad214a4d584fec7f5d4484506fa7614218976b9fc", + "src/main/java/com/alohi/signplus/models/GetTemplateDocumentsParameters.java": "2b250db077f66ebf5cc7e64deb1e84cd6c55d227c1ed7c1df2ffa91f022f435c", + "src/main/java/com/alohi/signplus/models/GetTemplateParameters.java": "7d8798e6f5a9e610ab38f9499f682f7fa1a22fba606d91ae02663b35322549c3", + "src/main/java/com/alohi/signplus/models/ListEnvelopesParameters.java": "ec05297273cb177788f04ae5dc868ed8273eb5e4e8ec68b5edf0c31b38141c58", + "src/main/java/com/alohi/signplus/models/ListEnvelopesRequest.java": "94dc35cab5225c6bfc18b3ecd7b00b78151a889b934505cd8a5bd304be74faf6", + "src/main/java/com/alohi/signplus/models/ListTemplatesParameters.java": "779b94d0a79efe94533104f1cd391c021818adbce31433ed3a2a08a9dbdbb409", + "src/main/java/com/alohi/signplus/models/ListTemplatesRequest.java": "557ebf6be07986006fa78b87ea61ba197aec97b3d47222f84493f1bb0539abfa", + "src/main/java/com/alohi/signplus/models/ListWebhooksParameters.java": "cdf066d518652aee3e39b4585937fe2b7aab9f999dcab0100e59bb07c9029097", + "src/main/java/com/alohi/signplus/models/ListWebhooksRequest.java": "ba3bc0e089c2e61a20b93fe450f1133f680d2e56f9ccdf3d6774f499ba5e5612", + "src/main/java/com/alohi/signplus/models/RenameEnvelopeParameters.java": "a1e71fef2484f3ea1da2c608535a09a839180b696ca60dec0c70533b37c6d2ae", + "src/main/java/com/alohi/signplus/models/RenameEnvelopeRequest.java": "590c550d77595ad5263eb19044fe29fab07b5af803096fa7ea6b29770c24d9fa", + "src/main/java/com/alohi/signplus/models/RenameTemplateParameters.java": "6904356f166181ff34fd71b68f1dcd1995541aadf0a3ffa4c45a64be61db29f5", + "src/main/java/com/alohi/signplus/models/RenameTemplateRequest.java": "25479453aa26b8d343e4a038c1380620bfcf6ec200149b6b856e1f6ba2d80fc6", + "src/main/java/com/alohi/signplus/models/SendEnvelopeParameters.java": "ca3f44512f95fc604b5c7035db9dd99edb6546cc3312dcc88ba5ea8a58d5f663", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersParameters.java": "e5b04b62ce136e3ab4939ce798f333831ba38370ae85fb7fc5f44bb7b1141627", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequest.java": "361faa4e1b0601108cc68079a76e43bd93fe96b2dcdf2a2fb393894b77c01083", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.java": "c98e741cd6aa0745b07bfdb3bff5498e1e25e3d850984169a73705f7288c3332", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsParameters.java": "07c8e97b8b1fbd00d018fcbf161dff3d8956519f2915f61eb79ec779eff8f8da", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequest.java": "f811bc012cfe50ffbfe5d0ad7b2f650d85e882882a1deb2f2aa59b7804a176d6", + "src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequestSettings.java": "cc710949ec1ac6f9a4ebd5d59ff10a5fd7a0823c662543da6dd3db50b30940d6", + "src/main/java/com/alohi/signplus/models/SetEnvelopeCommentParameters.java": "645acf03d6dfecd7a35d417a7537f5ff2e6cfa8149667246eef0a0158e7ea94d", + "src/main/java/com/alohi/signplus/models/SetEnvelopeCommentRequest.java": "e4c3f30014f560b6fb8998076c706c6742e4dc6d8189832d1c7028ad8a7ab183", + "src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsParameters.java": "b3aaf18be665e15eca87c442d04af9c02eefc256d6d43cc4a996442501bdcbe4", + "src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsRequest.java": "e49b65ee514f64cc8ceb97d50c76a7d42d7d0fb0bd5732f507c2b4e8c332e75c", + "src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateParameters.java": "7d62f20954d8e64e8fc8cb2a258582e4f8e0bdff0936cd7fc6da0263cf94b9e5", + "src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateRequest.java": "222993859da2159c698395f2478a9858495c235e50215643579bb82af1fa9d0d", + "src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelParameters.java": "384335350bccb7ba03e79a547c16a5f81c8dfac5a3ac2b283c81d09692d33a55", + "src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelRequest.java": "fb7ba0c874de0dfbbe7a24b4d79df046a7f5d10e1707e0f89a08534e3c6d3881", + "src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationParameters.java": "ae938a14449cc224ea7e84c9f3ff73f8150990948010d8ed405d50c2f27ec646", + "src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationRequest.java": "53a9155d1ffd1aa3258ade60043d0a14462ddb3dba0d9df909b204169ca9d69e", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersParameters.java": "e616f6b874e15964045c5f9266a3ee0b23da0e57d0229391b26ccb0c9409d319", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequest.java": "32e68adbeb24806379a855ebaabb00d95fff6db83dc6f24b703fafc015cfcf54", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.java": "093b43b4a66c6d0963f0c21c04f42b037ab6e5688549752db5aa336173f27132", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsParameters.java": "9b64488ae4e0aaf9eb2bf9a18aa0aca983f482a6a7186a463a8bd8b62a3da444", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequest.java": "aa9fa0aca562ba584afdd6b9a001085f4ac7068ec83dae570829735ba6b12f5e", + "src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequestSettings.java": "ec74f9d3ab070924e63efa9948b4bd92312038f3ed0c9e50fdfea4e8c8f7ca7c", + "src/main/java/com/alohi/signplus/models/SetTemplateCommentParameters.java": "709c84c491e877e9b5da478623c7a92f68fceec913e3e81d13bbe90577efcdd4", + "src/main/java/com/alohi/signplus/models/SetTemplateCommentRequest.java": "5ae81b96e379111b713ccdee07aa9870a0750a88cd844139933f9ad4601e7cac", + "src/main/java/com/alohi/signplus/models/SetTemplateNotificationParameters.java": "cce92f27faee3da621b0d890ffaa675000ae692c05410269082fc8ea2a77d9cf", + "src/main/java/com/alohi/signplus/models/SetTemplateNotificationRequest.java": "d62a1af4b2f91522f72279ebe88a2101d4c063f0f4b6bb5f9b5eda4793f643c2", + "src/main/java/com/alohi/signplus/models/SigningStepsRecipients1.java": "09e667386d3e3e9bddcd6cbc4291b1899a461a263e1f5c8d3c60bfb052660a81", + "src/main/java/com/alohi/signplus/models/SigningStepsRecipients2.java": "5c53a6b07efa2c0e5a5c8e3ab3042ed1d3636dc58fc88ffa1629deb5190e6522", + "src/main/java/com/alohi/signplus/models/TextFont1.java": "a993389d5597b080732024788e8ccd50a32e1d8b463251e1e060e0fb8b92bd63", + "src/main/java/com/alohi/signplus/models/TextFont2.java": "e8d33a17a6dacf39c2fb3cd05a63393e1d525347051a9ae3d68e88b96e6439f3", + "src/main/java/com/alohi/signplus/models/Verification.java": "76a888d55bd0cbf13990c9c5ea3a08225a14cce407f37975df65e9bd161ec1b5", + "src/main/java/com/alohi/signplus/models/VoidEnvelopeParameters.java": "13f4a7602e72e851a143c5d136c83295678c42d6cc72e7765c9a6b5d179b62a2", + "src/main/java/com/alohi/signplus/services/AnnotationIdService.java": "0afcabec6929f2565bdcb0d4eb1e3b8555ae81df9f018326e403a663f0af0864", + "src/main/java/com/alohi/signplus/services/AnnotationService.java": "e0b403feaff1f88683bf3363ae04c80ebb7f677029a95b74a25212ce1b5277b2", + "src/main/java/com/alohi/signplus/services/AnnotationsService.java": "cc067d01f51350cc633b3df754afd7e53c3461e7d98f752c6c0f06a2acd8d84d", + "src/main/java/com/alohi/signplus/services/BaseService.java": "0f2f23ff12bb807440057f4d997538bddbc102ec5c331d606ebd06ae680108a4", + "src/main/java/com/alohi/signplus/services/CertificateService.java": "9d054a5a3dc4f0c6aecb2877680d833a731e92c54ec1e1fcf2bd40b8de44c29c", + "src/main/java/com/alohi/signplus/services/DocumentIdService.java": "326fccf913ec2d477327d57f76797a8bd6d21b8b6d2a27069f476e9bc5978726", + "src/main/java/com/alohi/signplus/services/DocumentService.java": "e2b580c07d783de199836063899522b4f39535632f723c4e86de3782f73242f7", + "src/main/java/com/alohi/signplus/services/DocumentsService.java": "298b3d9dad4a9c154de190ed5470688917e1463be6d637952b1145d8f7288b7e", + "src/main/java/com/alohi/signplus/services/DuplicateService.java": "8671a58789dfef04f6148914e3de40722dbc9ae82b5588f8a1c628672de5b957", + "src/main/java/com/alohi/signplus/services/DynamicFieldsService.java": "a73622a34659628cce2170d85a44f797fb1ce126ee8608baefa9c1702591870e", + "src/main/java/com/alohi/signplus/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.java": "e1d4e544648f2948074f0d7c30b40dee12bb4e39b67fa2a99fbfaaad37a84ba0", + "src/main/java/com/alohi/signplus/services/EnvelopeIdService.java": "5912e921f9179305c82ec8d3ce7e6924414b721bc86e2fa2268731015841826b", + "src/main/java/com/alohi/signplus/services/EnvelopeService.java": "96e7db1f5e307a035397495447a56e571f47fedd668f30698525e01a697f9766", + "src/main/java/com/alohi/signplus/services/EnvelopesService.java": "b70ef9503736586d1cd355f8e8cf7d61bf70da8045ac73edc5977ed181843d94", + "src/main/java/com/alohi/signplus/services/FileIdService.java": "67c0bb259348f5fd96a6eb060338387dd195bcb5c0ccccad9a174d625e0871fc", + "src/main/java/com/alohi/signplus/services/PlaceholdersService.java": "61e1fcf822d1fabb02069a940c22468fe079a115deb329ee8d14e89b09c3eb95", + "src/main/java/com/alohi/signplus/services/RenameService.java": "03bddc36b59127b65c73d2803a372727b7fbad5bede37bd3696da034ae0c7dbd", + "src/main/java/com/alohi/signplus/services/SendService.java": "3ffdcba065d0be099a87f1f178665c51f581dcbf36117fcba7736d2c4a9f38c9", + "src/main/java/com/alohi/signplus/services/SetCommentService.java": "45e91ad28b94f455f27e5a105f4d55b170f69179557445e8dd22cddc648bd191", + "src/main/java/com/alohi/signplus/services/SetExpirationDateService.java": "02b36d6883987f8e145512ec0e9ecd3f2fa27960024b75b011d427e5ac74b389", + "src/main/java/com/alohi/signplus/services/SetLegalityLevelService.java": "f26b105ca6e0db7d887b93dc6541d9d60279b63a13352803c0021600612a8967", + "src/main/java/com/alohi/signplus/services/SetNotificationService.java": "c7dcbe7753be895b6dbeffd520e9508aef70e1333efe018aa3e14787ca73d3b0", + "src/main/java/com/alohi/signplus/services/SettingsService.java": "f7b78ee891f72862f4ea94753cf2e7eb3e04d056664da7307ccf2191d243ee8a", + "src/main/java/com/alohi/signplus/services/SignedDocumentsService.java": "68a2127ca1f991e198c582eb16126c4166f0758e07ee9552d32124daa90c6570", + "src/main/java/com/alohi/signplus/services/SigningStepsService.java": "0fa02dfb975773a1afdf662864ea81b62e254c2a465838790cf0247c5bffe353", + "src/main/java/com/alohi/signplus/services/TemplateIdService.java": "f5aeb69630a82f417b2b4bb9f69071299eb1dde46f0d675ba62538216393bac9", + "src/main/java/com/alohi/signplus/services/TemplateService.java": "d3f4aee6dff8cdd4bf169b6227b2479ae5262b2cc9c039d5209e3a483fad87d9", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationAnnotationIdService.java": "5866d55dbe889ae0f515dc72ded21ca729620c8223aab16965afa2604e7a1339", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationService.java": "e12df2cf25c570b613688fced986ffcd8301d3f5f5acf1ad161f3d40fc5b95d1", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsDocumentIdService.java": "d3764e0328a05e3c277c5b030ea7b95239ad32cc7a50c41294f03820241daf64", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsService.java": "bb1d082fe8f0e7a50d41bce06c5aeff96a015b31d8a015f94e72e9559969f823", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsPlaceholdersService.java": "d4c4b080fd18c4c5d6354cb8d4bd192dbcafd79d1caca9b5ef2dc84f117104c7", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsSettingsService.java": "bc92e7ef00d08ca71935d0af34e09cd0b31fe455a408891465aa024fb2e46a38", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentDocumentIdService.java": "235ca58071f6b753eb1384468f4ef24f6950dd2856589a2e5eb570de3efcf4b8", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentService.java": "6303f29e725c447bebaafa685f241ecb2e0d667a65a932a2886394d83294f366", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentsService.java": "711e55bdfc65303b3b18dab27372542a1ab5703b2d285a6b8ffee96c4bb306ef", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdDuplicateService.java": "8a986e03260bea6f295691d15f5c3f73113edca4c88ef4770b502958c06d117d", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdRenameService.java": "f0bc2849348bdeb70980a7e6801945d6f5dd8460e041a186b82da873439a9f6d", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdService.java": "c16e50bf715958172c510cbd6c509038119f7c2a63ef9c38c3bfe4161be3e804", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetCommentService.java": "c51e296fee9aae414d6e9af2b198dd1817a94a199a92dc8a08b57c85301bb93a", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetNotificationService.java": "db87e108a4a77e6660f275e0fe286e207cec9ffdcc9d10e795eec6f1bdf35a7d", + "src/main/java/com/alohi/signplus/services/TemplateTemplateIdSigningStepsService.java": "548a1ec6d97cef0d0e423677ccfbcd87e362f0ed23741e242d04803e12888cfd", + "src/main/java/com/alohi/signplus/services/TemplatesService.java": "a78ca5bba8deabae64384a35436c565b2b8ff17b6047e5b71365a15a836c7b0d", + "src/main/java/com/alohi/signplus/services/Void_Service.java": "67bb27086516142443ced94bf8296ae4152d004eced0f832d82def5b7c73a470", + "src/main/java/com/alohi/signplus/services/WebhookIdService.java": "ed7f9aa9731079651475e0c9d987a4226ae08f9f53315109d197a89fbcbceb73", + "src/main/java/com/alohi/signplus/services/WebhookService.java": "a1192c8c67cd6a4347796521284fdc9b81249105ab50230b6a99368583702867", + "src/main/java/com/alohi/signplus/services/WebhooksService.java": "36616370395928295eb58a3db8d4b041a31d526c3b437890ac1bb0a9b2fe2a39", + "src/main/java/com/alohi/signplus/validation/Violation.java": "02ca55a4fae380775b3795810ba1ad4d655cd97d5b1bba5acc4f96617ffb6350", + "src/main/java/com/alohi/signplus/validation/ViolationAggregator.java": "945043886a7c657017db23c5cbe18884411c977a7e978bc24489bd0d0d9c59b1", + "src/main/java/com/alohi/signplus/validation/exceptions/ValidationException.java": "9a4a9895a4b6d0d5d5d702c48caded2dbe7a83eed5d137cc551b1d1c67e46172", + "src/main/java/com/alohi/signplus/validation/validators/AbstractValidator.java": "2c2509fd549df9de306d929387e73e32716695976b8627fa3b6561ca656eba85", + "src/main/java/com/alohi/signplus/validation/validators/ListValidator.java": "c03f599639b4707dbec212ff0ade43280dd75e31614cf776ff2507e0d00dbeb6", + "src/main/java/com/alohi/signplus/validation/validators/NumericValidator.java": "b5e24156c72a2c291ef01203d8dfe35ee0596c8696baabc58f845bd768caa915", + "src/main/java/com/alohi/signplus/validation/validators/StringValidator.java": "b560dcbb9b122e32f08cf538c49e09b7f031cd406c3a5fd36b849fe43f3a0721", + "src/main/java/com/alohi/signplus/validation/validators/Validator.java": "0290ff09377dcc295bd63127cc9ce7438033fa3828b73b25127dd3fdf801f04d", + "src/main/java/com/alohi/signplus/validation/validators/modelValidators/AbstractModelValidator.java": "00d24eb9a593324e2c7f9b1f9b46c51759046d528d8898662ee3652de9c13021" + } } diff --git a/LICENSE b/LICENSE index 2be0553..3cef8a0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 +Copyright (c) 2026 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index a83e8ba..12c54b7 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,20 @@ -# Signplus Java SDK 2.4.0 +# Signplus Java SDK 3.0.0 Welcome to the Signplus SDK documentation. This guide will help you get started with integrating and using the Signplus SDK in your project. -[![This SDK was generated by liblab](https://raw.githubusercontent.com/liblaber/liblab-assets/main/assets/built-by-liblab-icon.svg)](https://liblab.com/?utm_source=readme) - ## Versions - API version: `2.5.0` -- SDK version: `2.4.0` +- SDK version: `3.0.0` ## About the API Integrate legally-binding electronic signature to your workflow +Contact Support: +Name: Sign.Plus +Email: support@alohi.com + ## Table of Contents - [Setup & Configuration](#setup--configuration) @@ -40,14 +42,14 @@ If you use Maven, place the following within the _dependency_ tag in your `pom.x com.alohi signplus - 2.4.0 + 3.0.0 ``` If you use Gradle, paste the next line inside the _dependencies_ block of your `build.gradle` file: ```Gradle -implementation group: com.alohi, name: signplus, version: 2.4.0 +implementation("com.alohi:signplus:3.0.0") ``` If you use JAR files, package the SDK by running the following command: @@ -117,7 +119,6 @@ Below is a comprehensive example demonstrating how to authenticate and call a si import com.alohi.signplus.Signplus; import com.alohi.signplus.config.SignplusConfig; import com.alohi.signplus.exceptions.ApiError; -import com.alohi.signplus.models.Envelope; public class Main { @@ -127,7 +128,7 @@ public class Main { Signplus signplus = new Signplus(config); try { - Envelope response = signplus.signplus.getEnvelope("envelope_id"); + Object response = signplus.envelopeId.deleteEnvelope("envelope_id"); System.out.println(response); } catch (ApiError e) { @@ -147,9 +148,54 @@ The SDK provides various services to interact with the API.
Below is a list of all available services with links to their detailed documentation: -| Name | -| :----------------------------------------------------------- | -| [SignplusService](documentation/services/SignplusService.md) | +| Name | +| :----------------------------------------------------------------------------------------------------------------------------- | +| [TemplateIdService](documentation/services/TemplateIdService.md) | +| [SignedDocumentsService](documentation/services/SignedDocumentsService.md) | +| [CertificateService](documentation/services/CertificateService.md) | +| [DocumentIdService](documentation/services/DocumentIdService.md) | +| [DocumentService](documentation/services/DocumentService.md) | +| [DocumentsService](documentation/services/DocumentsService.md) | +| [DynamicFieldsService](documentation/services/DynamicFieldsService.md) | +| [SigningStepsService](documentation/services/SigningStepsService.md) | +| [SettingsService](documentation/services/SettingsService.md) | +| [PlaceholdersService](documentation/services/PlaceholdersService.md) | +| [FileIdService](documentation/services/FileIdService.md) | +| [SendService](documentation/services/SendService.md) | +| [DuplicateService](documentation/services/DuplicateService.md) | +| [Void_Service](documentation/services/Void_Service.md) | +| [RenameService](documentation/services/RenameService.md) | +| [SetCommentService](documentation/services/SetCommentService.md) | +| [SetNotificationService](documentation/services/SetNotificationService.md) | +| [SetExpirationDateService](documentation/services/SetExpirationDateService.md) | +| [SetLegalityLevelService](documentation/services/SetLegalityLevelService.md) | +| [EnvelopeEnvelopeIdAnnotationsDocumentIdService](documentation/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.md) | +| [AnnotationsService](documentation/services/AnnotationsService.md) | +| [AnnotationIdService](documentation/services/AnnotationIdService.md) | +| [AnnotationService](documentation/services/AnnotationService.md) | +| [EnvelopeIdService](documentation/services/EnvelopeIdService.md) | +| [EnvelopeService](documentation/services/EnvelopeService.md) | +| [EnvelopesService](documentation/services/EnvelopesService.md) | +| [TemplateTemplateIdDuplicateService](documentation/services/TemplateTemplateIdDuplicateService.md) | +| [TemplateTemplateIdDocumentDocumentIdService](documentation/services/TemplateTemplateIdDocumentDocumentIdService.md) | +| [TemplateTemplateIdDocumentService](documentation/services/TemplateTemplateIdDocumentService.md) | +| [TemplateTemplateIdDocumentsService](documentation/services/TemplateTemplateIdDocumentsService.md) | +| [TemplateTemplateIdSigningStepsService](documentation/services/TemplateTemplateIdSigningStepsService.md) | +| [TemplateTemplateIdRenameService](documentation/services/TemplateTemplateIdRenameService.md) | +| [TemplateTemplateIdSetCommentService](documentation/services/TemplateTemplateIdSetCommentService.md) | +| [TemplateTemplateIdSetNotificationService](documentation/services/TemplateTemplateIdSetNotificationService.md) | +| [TemplateTemplateIdAnnotationsDocumentIdService](documentation/services/TemplateTemplateIdAnnotationsDocumentIdService.md) | +| [TemplateTemplateIdAnnotationsService](documentation/services/TemplateTemplateIdAnnotationsService.md) | +| [TemplateTemplateIdAnnotationAnnotationIdService](documentation/services/TemplateTemplateIdAnnotationAnnotationIdService.md) | +| [TemplateTemplateIdAnnotationService](documentation/services/TemplateTemplateIdAnnotationService.md) | +| [TemplateTemplateIdAttachmentsSettingsService](documentation/services/TemplateTemplateIdAttachmentsSettingsService.md) | +| [TemplateTemplateIdAttachmentsPlaceholdersService](documentation/services/TemplateTemplateIdAttachmentsPlaceholdersService.md) | +| [TemplateTemplateIdService](documentation/services/TemplateTemplateIdService.md) | +| [TemplateService](documentation/services/TemplateService.md) | +| [TemplatesService](documentation/services/TemplatesService.md) | +| [WebhookIdService](documentation/services/WebhookIdService.md) | +| [WebhookService](documentation/services/WebhookService.md) | +| [WebhooksService](documentation/services/WebhooksService.md) |
@@ -160,76 +206,101 @@ The SDK includes several models that represent the data structures used in API r
Below is a list of all available models with links to their detailed documentation: -| Name | Description | -| :------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [CreateEnvelopeRequest](documentation/models/CreateEnvelopeRequest.md) | | -| [Envelope](documentation/models/Envelope.md) | | -| [CreateEnvelopeFromTemplateRequest](documentation/models/CreateEnvelopeFromTemplateRequest.md) | | -| [ListEnvelopesRequest](documentation/models/ListEnvelopesRequest.md) | | -| [ListEnvelopesResponse](documentation/models/ListEnvelopesResponse.md) | | -| [Document](documentation/models/Document.md) | | -| [ListEnvelopeDocumentsResponse](documentation/models/ListEnvelopeDocumentsResponse.md) | | -| [AddEnvelopeDocumentRequest](documentation/models/AddEnvelopeDocumentRequest.md) | | -| [SetEnvelopeDynamicFieldsRequest](documentation/models/SetEnvelopeDynamicFieldsRequest.md) | | -| [AddEnvelopeSigningStepsRequest](documentation/models/AddEnvelopeSigningStepsRequest.md) | | -| [SetEnvelopeAttachmentsSettingsRequest](documentation/models/SetEnvelopeAttachmentsSettingsRequest.md) | | -| [EnvelopeAttachments](documentation/models/EnvelopeAttachments.md) | | -| [SetEnvelopeAttachmentsPlaceholdersRequest](documentation/models/SetEnvelopeAttachmentsPlaceholdersRequest.md) | | -| [RenameEnvelopeRequest](documentation/models/RenameEnvelopeRequest.md) | | -| [SetEnvelopeCommentRequest](documentation/models/SetEnvelopeCommentRequest.md) | | -| [EnvelopeNotification](documentation/models/EnvelopeNotification.md) | | -| [SetEnvelopeExpirationRequest](documentation/models/SetEnvelopeExpirationRequest.md) | | -| [SetEnvelopeLegalityLevelRequest](documentation/models/SetEnvelopeLegalityLevelRequest.md) | | -| [Annotation](documentation/models/Annotation.md) | | -| [ListEnvelopeDocumentAnnotationsResponse](documentation/models/ListEnvelopeDocumentAnnotationsResponse.md) | | -| [AddAnnotationRequest](documentation/models/AddAnnotationRequest.md) | | -| [CreateTemplateRequest](documentation/models/CreateTemplateRequest.md) | | -| [Template](documentation/models/Template.md) | | -| [ListTemplatesRequest](documentation/models/ListTemplatesRequest.md) | | -| [ListTemplatesResponse](documentation/models/ListTemplatesResponse.md) | | -| [AddTemplateDocumentRequest](documentation/models/AddTemplateDocumentRequest.md) | | -| [ListTemplateDocumentsResponse](documentation/models/ListTemplateDocumentsResponse.md) | | -| [AddTemplateSigningStepsRequest](documentation/models/AddTemplateSigningStepsRequest.md) | | -| [RenameTemplateRequest](documentation/models/RenameTemplateRequest.md) | | -| [SetTemplateCommentRequest](documentation/models/SetTemplateCommentRequest.md) | | -| [ListTemplateAnnotationsResponse](documentation/models/ListTemplateAnnotationsResponse.md) | | -| [ListTemplateDocumentAnnotationsResponse](documentation/models/ListTemplateDocumentAnnotationsResponse.md) | | -| [CreateWebhookRequest](documentation/models/CreateWebhookRequest.md) | | -| [Webhook](documentation/models/Webhook.md) | | -| [ListWebhooksRequest](documentation/models/ListWebhooksRequest.md) | | -| [ListWebhooksResponse](documentation/models/ListWebhooksResponse.md) | | -| [EnvelopeLegalityLevel](documentation/models/EnvelopeLegalityLevel.md) | Legal level of the envelope (SES is Simple Electronic Signature, QES_EIDAS is Qualified Electronic Signature, QES_ZERTES is Qualified Electronic Signature with Zertes) | -| [EnvelopeFlowType](documentation/models/EnvelopeFlowType.md) | Flow type of the envelope (REQUEST_SIGNATURE is a request for signature, SIGN_MYSELF is a self-signing flow) | -| [EnvelopeStatus](documentation/models/EnvelopeStatus.md) | Status of the envelope | -| [SigningStep](documentation/models/SigningStep.md) | | -| [Recipient](documentation/models/Recipient.md) | | -| [RecipientRole](documentation/models/RecipientRole.md) | Role of the recipient (SIGNER signs the document, RECEIVES_COPY receives a copy of the document, IN_PERSON_SIGNER signs the document in person, SENDER sends the document) | -| [RecipientVerification](documentation/models/RecipientVerification.md) | | -| [RecipientVerificationType](documentation/models/RecipientVerificationType.md) | Type of verification the recipient must complete before accessing the envelope. - `PASSCODE`: requires a code to be entered. - `SMS`: sends a code via SMS. - `ID_VERIFICATION`: prompts the recipient to complete an automated ID and selfie check. | -| [Page](documentation/models/Page.md) | | -| [AttachmentSettings](documentation/models/AttachmentSettings.md) | | -| [AttachmentPlaceholdersPerRecipient](documentation/models/AttachmentPlaceholdersPerRecipient.md) | | -| [AttachmentPlaceholder](documentation/models/AttachmentPlaceholder.md) | | -| [AttachmentPlaceholderFile](documentation/models/AttachmentPlaceholderFile.md) | | -| [EnvelopeOrderField](documentation/models/EnvelopeOrderField.md) | Field to order envelopes by | -| [DynamicField](documentation/models/DynamicField.md) | | -| [AttachmentPlaceholderRequest](documentation/models/AttachmentPlaceholderRequest.md) | | -| [AnnotationType](documentation/models/AnnotationType.md) | Type of the annotation | -| [AnnotationSignature](documentation/models/AnnotationSignature.md) | Signature annotation (null if annotation is not a signature) | -| [AnnotationInitials](documentation/models/AnnotationInitials.md) | Initials annotation (null if annotation is not initials) | -| [AnnotationText](documentation/models/AnnotationText.md) | Text annotation (null if annotation is not a text) | -| [AnnotationDateTime](documentation/models/AnnotationDateTime.md) | Date annotation (null if annotation is not a date) | -| [AnnotationCheckbox](documentation/models/AnnotationCheckbox.md) | Checkbox annotation (null if annotation is not a checkbox) | -| [AnnotationFont](documentation/models/AnnotationFont.md) | | -| [AnnotationFontFamily](documentation/models/AnnotationFontFamily.md) | Font family of the text | -| [AnnotationDateTimeFormat](documentation/models/AnnotationDateTimeFormat.md) | Format of the date time (DMY_NUMERIC_SLASH is day/month/year with slashes, MDY_NUMERIC_SLASH is month/day/year with slashes, YMD_NUMERIC_SLASH is year/month/day with slashes, DMY_NUMERIC_DASH_SHORT is day/month/year with dashes, DMY_NUMERIC_DASH is day/month/year with dashes, YMD_NUMERIC_DASH is year/month/day with dashes, MDY_TEXT_DASH_SHORT is month/day/year with dashes, MDY_TEXT_SPACE_SHORT is month/day/year with spaces, MDY_TEXT_SPACE is month/day/year with spaces) | -| [AnnotationCheckboxStyle](documentation/models/AnnotationCheckboxStyle.md) | Style of the checkbox | -| [TemplateSigningStep](documentation/models/TemplateSigningStep.md) | | -| [TemplateRecipient](documentation/models/TemplateRecipient.md) | | -| [TemplateRecipientRole](documentation/models/TemplateRecipientRole.md) | Role of the recipient (SIGNER signs the document, RECEIVES_COPY receives a copy of the document, IN_PERSON_SIGNER signs the document in person, SENDER sends the document) | -| [TemplateOrderField](documentation/models/TemplateOrderField.md) | Field to order templates by | -| [WebhookEvent](documentation/models/WebhookEvent.md) | Event of the webhook | -| [DownloadEnvelopeSignedDocumentsParameters](documentation/models/DownloadEnvelopeSignedDocumentsParameters.md) | | +| Name | Description | +| :------------------------------------------------------------------------------------------------------------------------------------- | :---------- | +| [CreateEnvelopeFromTemplateRequest](documentation/models/CreateEnvelopeFromTemplateRequest.md) | | +| [CreateEnvelopeFromTemplateParameters](documentation/models/CreateEnvelopeFromTemplateParameters.md) | | +| [DownloadEnvelopeSignedDocumentsParameters](documentation/models/DownloadEnvelopeSignedDocumentsParameters.md) | | +| [DownloadEnvelopeCertificateParameters](documentation/models/DownloadEnvelopeCertificateParameters.md) | | +| [GetEnvelopeDocumentParameters](documentation/models/GetEnvelopeDocumentParameters.md) | | +| [AddEnvelopeDocumentRequest](documentation/models/AddEnvelopeDocumentRequest.md) | | +| [AddEnvelopeDocumentParameters](documentation/models/AddEnvelopeDocumentParameters.md) | | +| [GetEnvelopeDocumentsParameters](documentation/models/GetEnvelopeDocumentsParameters.md) | | +| [SetEnvelopeDynamicFieldsRequest](documentation/models/SetEnvelopeDynamicFieldsRequest.md) | | +| [DynamicFields](documentation/models/DynamicFields.md) | | +| [SetEnvelopeDynamicFieldsParameters](documentation/models/SetEnvelopeDynamicFieldsParameters.md) | | +| [AddEnvelopeSigningStepsRequest](documentation/models/AddEnvelopeSigningStepsRequest.md) | | +| [AddEnvelopeSigningStepsRequestSigningSteps](documentation/models/AddEnvelopeSigningStepsRequestSigningSteps.md) | | +| [SigningStepsRecipients1](documentation/models/SigningStepsRecipients1.md) | | +| [Verification](documentation/models/Verification.md) | | +| [AddEnvelopeSigningStepsParameters](documentation/models/AddEnvelopeSigningStepsParameters.md) | | +| [SetEnvelopeAttachmentsSettingsRequest](documentation/models/SetEnvelopeAttachmentsSettingsRequest.md) | | +| [SetEnvelopeAttachmentsSettingsRequestSettings](documentation/models/SetEnvelopeAttachmentsSettingsRequestSettings.md) | | +| [SetEnvelopeAttachmentsSettingsParameters](documentation/models/SetEnvelopeAttachmentsSettingsParameters.md) | | +| [SetEnvelopeAttachmentsPlaceholdersRequest](documentation/models/SetEnvelopeAttachmentsPlaceholdersRequest.md) | | +| [SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders](documentation/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.md) | | +| [SetEnvelopeAttachmentsPlaceholdersParameters](documentation/models/SetEnvelopeAttachmentsPlaceholdersParameters.md) | | +| [GetAttachmentFileParameters](documentation/models/GetAttachmentFileParameters.md) | | +| [SendEnvelopeParameters](documentation/models/SendEnvelopeParameters.md) | | +| [DuplicateEnvelopeParameters](documentation/models/DuplicateEnvelopeParameters.md) | | +| [VoidEnvelopeParameters](documentation/models/VoidEnvelopeParameters.md) | | +| [RenameEnvelopeRequest](documentation/models/RenameEnvelopeRequest.md) | | +| [RenameEnvelopeParameters](documentation/models/RenameEnvelopeParameters.md) | | +| [SetEnvelopeCommentRequest](documentation/models/SetEnvelopeCommentRequest.md) | | +| [SetEnvelopeCommentParameters](documentation/models/SetEnvelopeCommentParameters.md) | | +| [SetEnvelopeNotificationRequest](documentation/models/SetEnvelopeNotificationRequest.md) | | +| [SetEnvelopeNotificationParameters](documentation/models/SetEnvelopeNotificationParameters.md) | | +| [SetEnvelopeExpirationDateRequest](documentation/models/SetEnvelopeExpirationDateRequest.md) | | +| [SetEnvelopeExpirationDateParameters](documentation/models/SetEnvelopeExpirationDateParameters.md) | | +| [SetEnvelopeLegalityLevelRequest](documentation/models/SetEnvelopeLegalityLevelRequest.md) | | +| [SetEnvelopeLegalityLevelParameters](documentation/models/SetEnvelopeLegalityLevelParameters.md) | | +| [GetEnvelopeDocumentAnnotationsParameters](documentation/models/GetEnvelopeDocumentAnnotationsParameters.md) | | +| [GetEnvelopeAnnotationsParameters](documentation/models/GetEnvelopeAnnotationsParameters.md) | | +| [AddEnvelopeAnnotationRequest](documentation/models/AddEnvelopeAnnotationRequest.md) | | +| [AddEnvelopeAnnotationRequestSignature](documentation/models/AddEnvelopeAnnotationRequestSignature.md) | | +| [AddEnvelopeAnnotationRequestInitials](documentation/models/AddEnvelopeAnnotationRequestInitials.md) | | +| [AddEnvelopeAnnotationRequestText](documentation/models/AddEnvelopeAnnotationRequestText.md) | | +| [TextFont1](documentation/models/TextFont1.md) | | +| [AddEnvelopeAnnotationRequestDatetime](documentation/models/AddEnvelopeAnnotationRequestDatetime.md) | | +| [DatetimeFont1](documentation/models/DatetimeFont1.md) | | +| [AddEnvelopeAnnotationRequestCheckbox](documentation/models/AddEnvelopeAnnotationRequestCheckbox.md) | | +| [AddEnvelopeAnnotationParameters](documentation/models/AddEnvelopeAnnotationParameters.md) | | +| [GetEnvelopeParameters](documentation/models/GetEnvelopeParameters.md) | | +| [CreateEnvelopeRequest](documentation/models/CreateEnvelopeRequest.md) | | +| [CreateEnvelopeParameters](documentation/models/CreateEnvelopeParameters.md) | | +| [ListEnvelopesRequest](documentation/models/ListEnvelopesRequest.md) | | +| [ListEnvelopesParameters](documentation/models/ListEnvelopesParameters.md) | | +| [DuplicateTemplateParameters](documentation/models/DuplicateTemplateParameters.md) | | +| [GetTemplateDocumentParameters](documentation/models/GetTemplateDocumentParameters.md) | | +| [AddTemplateDocumentRequest](documentation/models/AddTemplateDocumentRequest.md) | | +| [AddTemplateDocumentParameters](documentation/models/AddTemplateDocumentParameters.md) | | +| [GetTemplateDocumentsParameters](documentation/models/GetTemplateDocumentsParameters.md) | | +| [AddTemplateSigningStepsRequest](documentation/models/AddTemplateSigningStepsRequest.md) | | +| [AddTemplateSigningStepsRequestSigningSteps](documentation/models/AddTemplateSigningStepsRequestSigningSteps.md) | | +| [SigningStepsRecipients2](documentation/models/SigningStepsRecipients2.md) | | +| [AddTemplateSigningStepsParameters](documentation/models/AddTemplateSigningStepsParameters.md) | | +| [RenameTemplateRequest](documentation/models/RenameTemplateRequest.md) | | +| [RenameTemplateParameters](documentation/models/RenameTemplateParameters.md) | | +| [SetTemplateCommentRequest](documentation/models/SetTemplateCommentRequest.md) | | +| [SetTemplateCommentParameters](documentation/models/SetTemplateCommentParameters.md) | | +| [SetTemplateNotificationRequest](documentation/models/SetTemplateNotificationRequest.md) | | +| [SetTemplateNotificationParameters](documentation/models/SetTemplateNotificationParameters.md) | | +| [GetDocumentTemplateAnnotationsParameters](documentation/models/GetDocumentTemplateAnnotationsParameters.md) | | +| [GetTemplateAnnotationsParameters](documentation/models/GetTemplateAnnotationsParameters.md) | | +| [AddTemplateAnnotationRequest](documentation/models/AddTemplateAnnotationRequest.md) | | +| [AddTemplateAnnotationRequestSignature](documentation/models/AddTemplateAnnotationRequestSignature.md) | | +| [AddTemplateAnnotationRequestInitials](documentation/models/AddTemplateAnnotationRequestInitials.md) | | +| [AddTemplateAnnotationRequestText](documentation/models/AddTemplateAnnotationRequestText.md) | | +| [TextFont2](documentation/models/TextFont2.md) | | +| [AddTemplateAnnotationRequestDatetime](documentation/models/AddTemplateAnnotationRequestDatetime.md) | | +| [DatetimeFont2](documentation/models/DatetimeFont2.md) | | +| [AddTemplateAnnotationRequestCheckbox](documentation/models/AddTemplateAnnotationRequestCheckbox.md) | | +| [AddTemplateAnnotationParameters](documentation/models/AddTemplateAnnotationParameters.md) | | +| [SetTemplateAttachmentsSettingsRequest](documentation/models/SetTemplateAttachmentsSettingsRequest.md) | | +| [SetTemplateAttachmentsSettingsRequestSettings](documentation/models/SetTemplateAttachmentsSettingsRequestSettings.md) | | +| [SetTemplateAttachmentsSettingsParameters](documentation/models/SetTemplateAttachmentsSettingsParameters.md) | | +| [SetTemplateAttachmentsPlaceholdersRequest](documentation/models/SetTemplateAttachmentsPlaceholdersRequest.md) | | +| [SetTemplateAttachmentsPlaceholdersRequestPlaceholders](documentation/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.md) | | +| [SetTemplateAttachmentsPlaceholdersParameters](documentation/models/SetTemplateAttachmentsPlaceholdersParameters.md) | | +| [GetTemplateParameters](documentation/models/GetTemplateParameters.md) | | +| [CreateTemplateRequest](documentation/models/CreateTemplateRequest.md) | | +| [CreateTemplateParameters](documentation/models/CreateTemplateParameters.md) | | +| [ListTemplatesRequest](documentation/models/ListTemplatesRequest.md) | | +| [ListTemplatesParameters](documentation/models/ListTemplatesParameters.md) | | +| [CreateWebhookRequest](documentation/models/CreateWebhookRequest.md) | | +| [CreateWebhookParameters](documentation/models/CreateWebhookParameters.md) | | +| [ListWebhooksRequest](documentation/models/ListWebhooksRequest.md) | | +| [ListWebhooksParameters](documentation/models/ListWebhooksParameters.md) | |
diff --git a/documentation/models/AddEnvelopeAnnotationParameters.md b/documentation/models/AddEnvelopeAnnotationParameters.md new file mode 100644 index 0000000..e201731 --- /dev/null +++ b/documentation/models/AddEnvelopeAnnotationParameters.md @@ -0,0 +1,8 @@ +# AddEnvelopeAnnotationParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [AddEnvelopeAnnotationRequest](AddEnvelopeAnnotationRequest.md) | ✅ | | diff --git a/documentation/models/AddEnvelopeAnnotationRequest.md b/documentation/models/AddEnvelopeAnnotationRequest.md new file mode 100644 index 0000000..9130690 --- /dev/null +++ b/documentation/models/AddEnvelopeAnnotationRequest.md @@ -0,0 +1,20 @@ +# AddEnvelopeAnnotationRequest + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------------------------------- | :------- | :---------- | +| documentId | String | ❌ | | +| page | String | ❌ | | +| x | String | ❌ | | +| y | String | ❌ | | +| width | String | ❌ | | +| height | String | ❌ | | +| type | String | ❌ | | +| recipientId | String | ❌ | | +| required | String | ❌ | | +| signature | [AddEnvelopeAnnotationRequestSignature](AddEnvelopeAnnotationRequestSignature.md) | ❌ | | +| initials | [AddEnvelopeAnnotationRequestInitials](AddEnvelopeAnnotationRequestInitials.md) | ❌ | | +| text | [AddEnvelopeAnnotationRequestText](AddEnvelopeAnnotationRequestText.md) | ❌ | | +| datetime | [AddEnvelopeAnnotationRequestDatetime](AddEnvelopeAnnotationRequestDatetime.md) | ❌ | | +| checkbox | [AddEnvelopeAnnotationRequestCheckbox](AddEnvelopeAnnotationRequestCheckbox.md) | ❌ | | diff --git a/documentation/models/AddEnvelopeAnnotationRequestCheckbox.md b/documentation/models/AddEnvelopeAnnotationRequestCheckbox.md new file mode 100644 index 0000000..e1875ca --- /dev/null +++ b/documentation/models/AddEnvelopeAnnotationRequestCheckbox.md @@ -0,0 +1,8 @@ +# AddEnvelopeAnnotationRequestCheckbox + +**Properties** + +| Name | Type | Required | Description | +| :------ | :----- | :------- | :---------- | +| checked | String | ❌ | | +| style | String | ❌ | | diff --git a/documentation/models/AddEnvelopeAnnotationRequestDatetime.md b/documentation/models/AddEnvelopeAnnotationRequestDatetime.md new file mode 100644 index 0000000..89a5c84 --- /dev/null +++ b/documentation/models/AddEnvelopeAnnotationRequestDatetime.md @@ -0,0 +1,13 @@ +# AddEnvelopeAnnotationRequestDatetime + +**Properties** + +| Name | Type | Required | Description | +| :-------- | :-------------------------------- | :------- | :---------- | +| size | String | ❌ | | +| font | [DatetimeFont1](DatetimeFont1.md) | ❌ | | +| color | String | ❌ | | +| autoFill | String | ❌ | | +| timezone | String | ❌ | | +| timestamp | String | ❌ | | +| format | String | ❌ | | diff --git a/documentation/models/AddEnvelopeAnnotationRequestInitials.md b/documentation/models/AddEnvelopeAnnotationRequestInitials.md new file mode 100644 index 0000000..9446591 --- /dev/null +++ b/documentation/models/AddEnvelopeAnnotationRequestInitials.md @@ -0,0 +1,7 @@ +# AddEnvelopeAnnotationRequestInitials + +**Properties** + +| Name | Type | Required | Description | +| :--- | :----- | :------- | :---------- | +| id | String | ❌ | | diff --git a/documentation/models/AddEnvelopeAnnotationRequestSignature.md b/documentation/models/AddEnvelopeAnnotationRequestSignature.md new file mode 100644 index 0000000..1e706ad --- /dev/null +++ b/documentation/models/AddEnvelopeAnnotationRequestSignature.md @@ -0,0 +1,7 @@ +# AddEnvelopeAnnotationRequestSignature + +**Properties** + +| Name | Type | Required | Description | +| :--- | :----- | :------- | :---------- | +| id | String | ❌ | | diff --git a/documentation/models/AddEnvelopeAnnotationRequestText.md b/documentation/models/AddEnvelopeAnnotationRequestText.md new file mode 100644 index 0000000..597182c --- /dev/null +++ b/documentation/models/AddEnvelopeAnnotationRequestText.md @@ -0,0 +1,12 @@ +# AddEnvelopeAnnotationRequestText + +**Properties** + +| Name | Type | Required | Description | +| :--------------- | :------------------------ | :------- | :---------- | +| size | String | ❌ | | +| color | String | ❌ | | +| value | String | ❌ | | +| tooltip | String | ❌ | | +| dynamicFieldName | String | ❌ | | +| font | [TextFont1](TextFont1.md) | ❌ | | diff --git a/documentation/models/AddEnvelopeDocumentParameters.md b/documentation/models/AddEnvelopeDocumentParameters.md new file mode 100644 index 0000000..0df314c --- /dev/null +++ b/documentation/models/AddEnvelopeDocumentParameters.md @@ -0,0 +1,8 @@ +# AddEnvelopeDocumentParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :---------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [AddEnvelopeDocumentRequest](AddEnvelopeDocumentRequest.md) | ✅ | | diff --git a/documentation/models/AddEnvelopeDocumentRequest.md b/documentation/models/AddEnvelopeDocumentRequest.md index 040a3da..eb3360c 100644 --- a/documentation/models/AddEnvelopeDocumentRequest.md +++ b/documentation/models/AddEnvelopeDocumentRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :------------------------------ | -| file | byte[] | ❌ | File to upload in binary format | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :---------- | +| file | byte[] | ❌ | | diff --git a/documentation/models/AddEnvelopeSigningStepsParameters.md b/documentation/models/AddEnvelopeSigningStepsParameters.md new file mode 100644 index 0000000..5cb9bb2 --- /dev/null +++ b/documentation/models/AddEnvelopeSigningStepsParameters.md @@ -0,0 +1,8 @@ +# AddEnvelopeSigningStepsParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :------------------------------------------------------------------ | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [AddEnvelopeSigningStepsRequest](AddEnvelopeSigningStepsRequest.md) | ✅ | | diff --git a/documentation/models/AddEnvelopeSigningStepsRequest.md b/documentation/models/AddEnvelopeSigningStepsRequest.md index d82965f..0a1b06c 100644 --- a/documentation/models/AddEnvelopeSigningStepsRequest.md +++ b/documentation/models/AddEnvelopeSigningStepsRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :----------- | :------------------ | :------- | :-------------------- | -| signingSteps | List\ | ❌ | List of signing steps | +| Name | Type | Required | Description | +| :----------- | :------------------------------------------------------------------------------------------------ | :------- | :---------- | +| signingSteps | List<[AddEnvelopeSigningStepsRequestSigningSteps](AddEnvelopeSigningStepsRequestSigningSteps.md)> | ❌ | | diff --git a/documentation/models/AddEnvelopeSigningStepsRequestSigningSteps.md b/documentation/models/AddEnvelopeSigningStepsRequestSigningSteps.md new file mode 100644 index 0000000..09115b0 --- /dev/null +++ b/documentation/models/AddEnvelopeSigningStepsRequestSigningSteps.md @@ -0,0 +1,7 @@ +# AddEnvelopeSigningStepsRequestSigningSteps + +**Properties** + +| Name | Type | Required | Description | +| :--------- | :---------------------------------------------------------- | :------- | :---------- | +| recipients | List<[SigningStepsRecipients1](SigningStepsRecipients1.md)> | ❌ | | diff --git a/documentation/models/AddTemplateAnnotationParameters.md b/documentation/models/AddTemplateAnnotationParameters.md new file mode 100644 index 0000000..acd196c --- /dev/null +++ b/documentation/models/AddTemplateAnnotationParameters.md @@ -0,0 +1,8 @@ +# AddTemplateAnnotationParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [AddTemplateAnnotationRequest](AddTemplateAnnotationRequest.md) | ✅ | | diff --git a/documentation/models/AddTemplateAnnotationRequest.md b/documentation/models/AddTemplateAnnotationRequest.md new file mode 100644 index 0000000..2d581dd --- /dev/null +++ b/documentation/models/AddTemplateAnnotationRequest.md @@ -0,0 +1,20 @@ +# AddTemplateAnnotationRequest + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------------------------------- | :------- | :---------- | +| documentId | String | ❌ | | +| page | String | ❌ | | +| x | String | ❌ | | +| y | String | ❌ | | +| width | String | ❌ | | +| height | String | ❌ | | +| type | String | ❌ | | +| recipientId | String | ❌ | | +| required | String | ❌ | | +| signature | [AddTemplateAnnotationRequestSignature](AddTemplateAnnotationRequestSignature.md) | ❌ | | +| initials | [AddTemplateAnnotationRequestInitials](AddTemplateAnnotationRequestInitials.md) | ❌ | | +| text | [AddTemplateAnnotationRequestText](AddTemplateAnnotationRequestText.md) | ❌ | | +| datetime | [AddTemplateAnnotationRequestDatetime](AddTemplateAnnotationRequestDatetime.md) | ❌ | | +| checkbox | [AddTemplateAnnotationRequestCheckbox](AddTemplateAnnotationRequestCheckbox.md) | ❌ | | diff --git a/documentation/models/AddTemplateAnnotationRequestCheckbox.md b/documentation/models/AddTemplateAnnotationRequestCheckbox.md new file mode 100644 index 0000000..753a95c --- /dev/null +++ b/documentation/models/AddTemplateAnnotationRequestCheckbox.md @@ -0,0 +1,8 @@ +# AddTemplateAnnotationRequestCheckbox + +**Properties** + +| Name | Type | Required | Description | +| :------ | :----- | :------- | :---------- | +| checked | String | ❌ | | +| style | String | ❌ | | diff --git a/documentation/models/AddTemplateAnnotationRequestDatetime.md b/documentation/models/AddTemplateAnnotationRequestDatetime.md new file mode 100644 index 0000000..d79cbcf --- /dev/null +++ b/documentation/models/AddTemplateAnnotationRequestDatetime.md @@ -0,0 +1,13 @@ +# AddTemplateAnnotationRequestDatetime + +**Properties** + +| Name | Type | Required | Description | +| :-------- | :-------------------------------- | :------- | :---------- | +| size | String | ❌ | | +| font | [DatetimeFont2](DatetimeFont2.md) | ❌ | | +| color | String | ❌ | | +| autoFill | String | ❌ | | +| timezone | String | ❌ | | +| timestamp | String | ❌ | | +| format | String | ❌ | | diff --git a/documentation/models/AddTemplateAnnotationRequestInitials.md b/documentation/models/AddTemplateAnnotationRequestInitials.md new file mode 100644 index 0000000..a16b2c2 --- /dev/null +++ b/documentation/models/AddTemplateAnnotationRequestInitials.md @@ -0,0 +1,7 @@ +# AddTemplateAnnotationRequestInitials + +**Properties** + +| Name | Type | Required | Description | +| :--- | :----- | :------- | :---------- | +| id | String | ❌ | | diff --git a/documentation/models/AddTemplateAnnotationRequestSignature.md b/documentation/models/AddTemplateAnnotationRequestSignature.md new file mode 100644 index 0000000..174f404 --- /dev/null +++ b/documentation/models/AddTemplateAnnotationRequestSignature.md @@ -0,0 +1,7 @@ +# AddTemplateAnnotationRequestSignature + +**Properties** + +| Name | Type | Required | Description | +| :--- | :----- | :------- | :---------- | +| id | String | ❌ | | diff --git a/documentation/models/AddTemplateAnnotationRequestText.md b/documentation/models/AddTemplateAnnotationRequestText.md new file mode 100644 index 0000000..68c0af4 --- /dev/null +++ b/documentation/models/AddTemplateAnnotationRequestText.md @@ -0,0 +1,12 @@ +# AddTemplateAnnotationRequestText + +**Properties** + +| Name | Type | Required | Description | +| :--------------- | :------------------------ | :------- | :---------- | +| size | String | ❌ | | +| color | String | ❌ | | +| value | String | ❌ | | +| tooltip | String | ❌ | | +| dynamicFieldName | String | ❌ | | +| font | [TextFont2](TextFont2.md) | ❌ | | diff --git a/documentation/models/AddTemplateDocumentParameters.md b/documentation/models/AddTemplateDocumentParameters.md new file mode 100644 index 0000000..6bee1f5 --- /dev/null +++ b/documentation/models/AddTemplateDocumentParameters.md @@ -0,0 +1,8 @@ +# AddTemplateDocumentParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :---------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [AddTemplateDocumentRequest](AddTemplateDocumentRequest.md) | ✅ | | diff --git a/documentation/models/AddTemplateDocumentRequest.md b/documentation/models/AddTemplateDocumentRequest.md index 61fb38f..0f51773 100644 --- a/documentation/models/AddTemplateDocumentRequest.md +++ b/documentation/models/AddTemplateDocumentRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :------------------------------ | -| file | byte[] | ✅ | File to upload in binary format | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :---------- | +| file | byte[] | ❌ | | diff --git a/documentation/models/AddTemplateSigningStepsParameters.md b/documentation/models/AddTemplateSigningStepsParameters.md new file mode 100644 index 0000000..35d9441 --- /dev/null +++ b/documentation/models/AddTemplateSigningStepsParameters.md @@ -0,0 +1,8 @@ +# AddTemplateSigningStepsParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :------------------------------------------------------------------ | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [AddTemplateSigningStepsRequest](AddTemplateSigningStepsRequest.md) | ✅ | | diff --git a/documentation/models/AddTemplateSigningStepsRequest.md b/documentation/models/AddTemplateSigningStepsRequest.md index e7e0be5..896319c 100644 --- a/documentation/models/AddTemplateSigningStepsRequest.md +++ b/documentation/models/AddTemplateSigningStepsRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :----------- | :-------------------------- | :------- | :-------------------- | -| signingSteps | List\ | ✅ | List of signing steps | +| Name | Type | Required | Description | +| :----------- | :------------------------------------------------------------------------------------------------ | :------- | :---------- | +| signingSteps | List<[AddTemplateSigningStepsRequestSigningSteps](AddTemplateSigningStepsRequestSigningSteps.md)> | ❌ | | diff --git a/documentation/models/AddTemplateSigningStepsRequestSigningSteps.md b/documentation/models/AddTemplateSigningStepsRequestSigningSteps.md new file mode 100644 index 0000000..62b7f9a --- /dev/null +++ b/documentation/models/AddTemplateSigningStepsRequestSigningSteps.md @@ -0,0 +1,7 @@ +# AddTemplateSigningStepsRequestSigningSteps + +**Properties** + +| Name | Type | Required | Description | +| :--------- | :---------------------------------------------------------- | :------- | :---------- | +| recipients | List<[SigningStepsRecipients2](SigningStepsRecipients2.md)> | ❌ | | diff --git a/documentation/models/CreateEnvelopeFromTemplateParameters.md b/documentation/models/CreateEnvelopeFromTemplateParameters.md new file mode 100644 index 0000000..89c2eb9 --- /dev/null +++ b/documentation/models/CreateEnvelopeFromTemplateParameters.md @@ -0,0 +1,8 @@ +# CreateEnvelopeFromTemplateParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :------------------------------------------------------------------------ | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [CreateEnvelopeFromTemplateRequest](CreateEnvelopeFromTemplateRequest.md) | ✅ | | diff --git a/documentation/models/CreateEnvelopeFromTemplateRequest.md b/documentation/models/CreateEnvelopeFromTemplateRequest.md index bce777f..b408d41 100644 --- a/documentation/models/CreateEnvelopeFromTemplateRequest.md +++ b/documentation/models/CreateEnvelopeFromTemplateRequest.md @@ -2,8 +2,8 @@ **Properties** -| Name | Type | Required | Description | -| :------ | :------ | :------- | :---------------------------------------------- | -| name | String | ✅ | Name of the envelope | -| comment | String | ❌ | Comment for the envelope | -| sandbox | Boolean | ❌ | Whether the envelope is created in sandbox mode | +| Name | Type | Required | Description | +| :------ | :------ | :------- | :---------- | +| name | String | ❌ | | +| comment | String | ❌ | | +| sandbox | Boolean | ❌ | | diff --git a/documentation/models/CreateEnvelopeParameters.md b/documentation/models/CreateEnvelopeParameters.md new file mode 100644 index 0000000..545ec90 --- /dev/null +++ b/documentation/models/CreateEnvelopeParameters.md @@ -0,0 +1,8 @@ +# CreateEnvelopeParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :------------------------------------------------ | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [CreateEnvelopeRequest](CreateEnvelopeRequest.md) | ✅ | | diff --git a/documentation/models/CreateEnvelopeRequest.md b/documentation/models/CreateEnvelopeRequest.md index 72567f4..ee0e15b 100644 --- a/documentation/models/CreateEnvelopeRequest.md +++ b/documentation/models/CreateEnvelopeRequest.md @@ -2,10 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :------------ | :-------------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | String | ✅ | Name of the envelope | -| legalityLevel | EnvelopeLegalityLevel | ✅ | Legal level of the envelope (SES is Simple Electronic Signature, QES_EIDAS is Qualified Electronic Signature, QES_ZERTES is Qualified Electronic Signature with Zertes) | -| expiresAt | Long | ❌ | Unix timestamp of the expiration date | -| comment | String | ❌ | Comment for the envelope | -| sandbox | Boolean | ❌ | Whether the envelope is created in sandbox mode | +| Name | Type | Required | Description | +| :------------ | :------ | :------- | :---------- | +| name | String | ❌ | | +| legalityLevel | String | ❌ | | +| expiresAt | String | ❌ | | +| comment | String | ❌ | | +| sandbox | Boolean | ❌ | | diff --git a/documentation/models/CreateTemplateParameters.md b/documentation/models/CreateTemplateParameters.md new file mode 100644 index 0000000..9708674 --- /dev/null +++ b/documentation/models/CreateTemplateParameters.md @@ -0,0 +1,8 @@ +# CreateTemplateParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :------------------------------------------------ | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [CreateTemplateRequest](CreateTemplateRequest.md) | ✅ | | diff --git a/documentation/models/CreateTemplateRequest.md b/documentation/models/CreateTemplateRequest.md index 679c4e3..59ed484 100644 --- a/documentation/models/CreateTemplateRequest.md +++ b/documentation/models/CreateTemplateRequest.md @@ -4,4 +4,4 @@ | Name | Type | Required | Description | | :--- | :----- | :------- | :---------- | -| name | String | ✅ | | +| name | String | ❌ | | diff --git a/documentation/models/CreateWebhookParameters.md b/documentation/models/CreateWebhookParameters.md new file mode 100644 index 0000000..bdd8d7e --- /dev/null +++ b/documentation/models/CreateWebhookParameters.md @@ -0,0 +1,8 @@ +# CreateWebhookParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :---------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [CreateWebhookRequest](CreateWebhookRequest.md) | ✅ | | diff --git a/documentation/models/CreateWebhookRequest.md b/documentation/models/CreateWebhookRequest.md index 7d96423..f1e8d2b 100644 --- a/documentation/models/CreateWebhookRequest.md +++ b/documentation/models/CreateWebhookRequest.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :----- | :----------- | :------- | :------------------------ | -| event | WebhookEvent | ✅ | Event of the webhook | -| target | String | ✅ | URL of the webhook target | +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| event | String | ❌ | | +| target | String | ❌ | | diff --git a/documentation/models/DatetimeFont1.md b/documentation/models/DatetimeFont1.md new file mode 100644 index 0000000..d7775ef --- /dev/null +++ b/documentation/models/DatetimeFont1.md @@ -0,0 +1,9 @@ +# DatetimeFont1 + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| family | String | ❌ | | +| italic | String | ❌ | | +| bold | String | ❌ | | diff --git a/documentation/models/DatetimeFont2.md b/documentation/models/DatetimeFont2.md new file mode 100644 index 0000000..e6f0771 --- /dev/null +++ b/documentation/models/DatetimeFont2.md @@ -0,0 +1,9 @@ +# DatetimeFont2 + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| family | String | ❌ | | +| italic | String | ❌ | | +| bold | String | ❌ | | diff --git a/documentation/models/DownloadEnvelopeCertificateParameters.md b/documentation/models/DownloadEnvelopeCertificateParameters.md new file mode 100644 index 0000000..beec152 --- /dev/null +++ b/documentation/models/DownloadEnvelopeCertificateParameters.md @@ -0,0 +1,7 @@ +# DownloadEnvelopeCertificateParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/DownloadEnvelopeSignedDocumentsParameters.md b/documentation/models/DownloadEnvelopeSignedDocumentsParameters.md index 7fa01f9..49d9d92 100644 --- a/documentation/models/DownloadEnvelopeSignedDocumentsParameters.md +++ b/documentation/models/DownloadEnvelopeSignedDocumentsParameters.md @@ -2,6 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---------------------- | :------ | :------- | :---------------------------------------------------------------------- | -| certificateOfCompletion | Boolean | ❌ | Whether to include the certificate of completion in the downloaded file | +| Name | Type | Required | Description | +| :---------------------- | :----- | :------- | :---------------------------------------------------------------------- | +| accept | String | ✅ | | +| certificateOfCompletion | String | ❌ | Whether to include the certificate of completion in the downloaded file | diff --git a/documentation/models/DuplicateEnvelopeParameters.md b/documentation/models/DuplicateEnvelopeParameters.md new file mode 100644 index 0000000..5792099 --- /dev/null +++ b/documentation/models/DuplicateEnvelopeParameters.md @@ -0,0 +1,7 @@ +# DuplicateEnvelopeParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/DuplicateTemplateParameters.md b/documentation/models/DuplicateTemplateParameters.md new file mode 100644 index 0000000..e9bb18e --- /dev/null +++ b/documentation/models/DuplicateTemplateParameters.md @@ -0,0 +1,7 @@ +# DuplicateTemplateParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/DynamicFields.md b/documentation/models/DynamicFields.md new file mode 100644 index 0000000..68f9663 --- /dev/null +++ b/documentation/models/DynamicFields.md @@ -0,0 +1,8 @@ +# DynamicFields + +**Properties** + +| Name | Type | Required | Description | +| :---- | :----- | :------- | :---------- | +| name | String | ❌ | | +| value | String | ❌ | | diff --git a/documentation/models/GetAttachmentFileParameters.md b/documentation/models/GetAttachmentFileParameters.md new file mode 100644 index 0000000..d441c1a --- /dev/null +++ b/documentation/models/GetAttachmentFileParameters.md @@ -0,0 +1,7 @@ +# GetAttachmentFileParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetDocumentTemplateAnnotationsParameters.md b/documentation/models/GetDocumentTemplateAnnotationsParameters.md new file mode 100644 index 0000000..9bfc35c --- /dev/null +++ b/documentation/models/GetDocumentTemplateAnnotationsParameters.md @@ -0,0 +1,7 @@ +# GetDocumentTemplateAnnotationsParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetEnvelopeAnnotationsParameters.md b/documentation/models/GetEnvelopeAnnotationsParameters.md new file mode 100644 index 0000000..9b27716 --- /dev/null +++ b/documentation/models/GetEnvelopeAnnotationsParameters.md @@ -0,0 +1,7 @@ +# GetEnvelopeAnnotationsParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetEnvelopeDocumentAnnotationsParameters.md b/documentation/models/GetEnvelopeDocumentAnnotationsParameters.md new file mode 100644 index 0000000..e4b318f --- /dev/null +++ b/documentation/models/GetEnvelopeDocumentAnnotationsParameters.md @@ -0,0 +1,7 @@ +# GetEnvelopeDocumentAnnotationsParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetEnvelopeDocumentParameters.md b/documentation/models/GetEnvelopeDocumentParameters.md new file mode 100644 index 0000000..256d1a5 --- /dev/null +++ b/documentation/models/GetEnvelopeDocumentParameters.md @@ -0,0 +1,7 @@ +# GetEnvelopeDocumentParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetEnvelopeDocumentsParameters.md b/documentation/models/GetEnvelopeDocumentsParameters.md new file mode 100644 index 0000000..9540e01 --- /dev/null +++ b/documentation/models/GetEnvelopeDocumentsParameters.md @@ -0,0 +1,7 @@ +# GetEnvelopeDocumentsParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetEnvelopeParameters.md b/documentation/models/GetEnvelopeParameters.md new file mode 100644 index 0000000..ff027de --- /dev/null +++ b/documentation/models/GetEnvelopeParameters.md @@ -0,0 +1,7 @@ +# GetEnvelopeParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetTemplateAnnotationsParameters.md b/documentation/models/GetTemplateAnnotationsParameters.md new file mode 100644 index 0000000..3295b4b --- /dev/null +++ b/documentation/models/GetTemplateAnnotationsParameters.md @@ -0,0 +1,7 @@ +# GetTemplateAnnotationsParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetTemplateDocumentParameters.md b/documentation/models/GetTemplateDocumentParameters.md new file mode 100644 index 0000000..8635a50 --- /dev/null +++ b/documentation/models/GetTemplateDocumentParameters.md @@ -0,0 +1,7 @@ +# GetTemplateDocumentParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetTemplateDocumentsParameters.md b/documentation/models/GetTemplateDocumentsParameters.md new file mode 100644 index 0000000..3c021d5 --- /dev/null +++ b/documentation/models/GetTemplateDocumentsParameters.md @@ -0,0 +1,7 @@ +# GetTemplateDocumentsParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/GetTemplateParameters.md b/documentation/models/GetTemplateParameters.md new file mode 100644 index 0000000..54415c3 --- /dev/null +++ b/documentation/models/GetTemplateParameters.md @@ -0,0 +1,7 @@ +# GetTemplateParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/ListEnvelopesParameters.md b/documentation/models/ListEnvelopesParameters.md new file mode 100644 index 0000000..63f8457 --- /dev/null +++ b/documentation/models/ListEnvelopesParameters.md @@ -0,0 +1,8 @@ +# ListEnvelopesParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :---------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [ListEnvelopesRequest](ListEnvelopesRequest.md) | ✅ | | diff --git a/documentation/models/ListEnvelopesRequest.md b/documentation/models/ListEnvelopesRequest.md index a9f935d..0e18b35 100644 --- a/documentation/models/ListEnvelopesRequest.md +++ b/documentation/models/ListEnvelopesRequest.md @@ -2,22 +2,22 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :--------------------- | :------- | :------------------------------------------------ | -| name | String | ❌ | Name of the envelope | -| tags | List\ | ❌ | List of tags | -| comment | String | ❌ | Comment of the envelope | -| ids | List\ | ❌ | List of envelope IDs | -| statuses | List\ | ❌ | List of envelope statuses | -| folderIds | List\ | ❌ | List of folder IDs | -| onlyRootFolder | Boolean | ❌ | Whether to only list envelopes in the root folder | -| dateFrom | Long | ❌ | Unix timestamp of the start date | -| dateTo | Long | ❌ | Unix timestamp of the end date | -| uid | String | ❌ | Unique identifier of the user | -| first | Long | ❌ | | -| last | Long | ❌ | | -| after | String | ❌ | | -| before | String | ❌ | | -| orderField | EnvelopeOrderField | ❌ | Field to order envelopes by | -| ascending | Boolean | ❌ | Whether to order envelopes in ascending order | -| includeTrash | Boolean | ❌ | Whether to include envelopes in the trash | +| Name | Type | Required | Description | +| :------------- | :----------- | :------- | :---------- | +| name | String | ❌ | | +| tags | List | ❌ | | +| comment | String | ❌ | | +| ids | List | ❌ | | +| statuses | List | ❌ | | +| folderIds | List | ❌ | | +| onlyRootFolder | String | ❌ | | +| dateFrom | String | ❌ | | +| dateTo | String | ❌ | | +| uid | String | ❌ | | +| first | String | ❌ | | +| last | String | ❌ | | +| after | String | ❌ | | +| before | String | ❌ | | +| orderField | String | ❌ | | +| ascending | String | ❌ | | +| includeTrash | String | ❌ | | diff --git a/documentation/models/ListTemplatesParameters.md b/documentation/models/ListTemplatesParameters.md new file mode 100644 index 0000000..82b4d0e --- /dev/null +++ b/documentation/models/ListTemplatesParameters.md @@ -0,0 +1,8 @@ +# ListTemplatesParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :---------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [ListTemplatesRequest](ListTemplatesRequest.md) | ✅ | | diff --git a/documentation/models/ListTemplatesRequest.md b/documentation/models/ListTemplatesRequest.md index c1ed5c3..321e588 100644 --- a/documentation/models/ListTemplatesRequest.md +++ b/documentation/models/ListTemplatesRequest.md @@ -2,14 +2,14 @@ **Properties** -| Name | Type | Required | Description | -| :--------- | :----------------- | :------- | :-------------------------------------------- | -| name | String | ❌ | Name of the template | -| tags | List\ | ❌ | List of tag templates | -| ids | List\ | ❌ | List of templates IDs | -| first | Long | ❌ | | -| last | Long | ❌ | | -| after | String | ❌ | | -| before | String | ❌ | | -| orderField | TemplateOrderField | ❌ | Field to order templates by | -| ascending | Boolean | ❌ | Whether to order templates in ascending order | +| Name | Type | Required | Description | +| :--------- | :----------- | :------- | :---------- | +| name | String | ❌ | | +| tags | List | ❌ | | +| ids | List | ❌ | | +| first | String | ❌ | | +| last | String | ❌ | | +| after | String | ❌ | | +| before | String | ❌ | | +| orderField | String | ❌ | | +| ascending | String | ❌ | | diff --git a/documentation/models/ListWebhooksParameters.md b/documentation/models/ListWebhooksParameters.md new file mode 100644 index 0000000..3c5d85a --- /dev/null +++ b/documentation/models/ListWebhooksParameters.md @@ -0,0 +1,8 @@ +# ListWebhooksParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [ListWebhooksRequest](ListWebhooksRequest.md) | ✅ | | diff --git a/documentation/models/ListWebhooksRequest.md b/documentation/models/ListWebhooksRequest.md index 5c9e4b1..81a8a25 100644 --- a/documentation/models/ListWebhooksRequest.md +++ b/documentation/models/ListWebhooksRequest.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :-------- | :----------- | :------- | :------------------- | -| webhookId | String | ❌ | ID of the webhook | -| event | WebhookEvent | ❌ | Event of the webhook | +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :---------- | +| webhookId | String | ❌ | | +| event | String | ❌ | | diff --git a/documentation/models/RenameEnvelopeParameters.md b/documentation/models/RenameEnvelopeParameters.md new file mode 100644 index 0000000..6b96a9d --- /dev/null +++ b/documentation/models/RenameEnvelopeParameters.md @@ -0,0 +1,8 @@ +# RenameEnvelopeParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :------------------------------------------------ | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [RenameEnvelopeRequest](RenameEnvelopeRequest.md) | ✅ | | diff --git a/documentation/models/RenameEnvelopeRequest.md b/documentation/models/RenameEnvelopeRequest.md index 157a05a..37d77e0 100644 --- a/documentation/models/RenameEnvelopeRequest.md +++ b/documentation/models/RenameEnvelopeRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :------------------- | -| name | String | ❌ | Name of the envelope | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :---------- | +| name | String | ❌ | | diff --git a/documentation/models/RenameTemplateParameters.md b/documentation/models/RenameTemplateParameters.md new file mode 100644 index 0000000..8a0bb0d --- /dev/null +++ b/documentation/models/RenameTemplateParameters.md @@ -0,0 +1,8 @@ +# RenameTemplateParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :------------------------------------------------ | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [RenameTemplateRequest](RenameTemplateRequest.md) | ✅ | | diff --git a/documentation/models/RenameTemplateRequest.md b/documentation/models/RenameTemplateRequest.md index eafd27b..e7ad2fa 100644 --- a/documentation/models/RenameTemplateRequest.md +++ b/documentation/models/RenameTemplateRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :------------------- | -| name | String | ✅ | Name of the template | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :---------- | +| name | String | ❌ | | diff --git a/documentation/models/SendEnvelopeParameters.md b/documentation/models/SendEnvelopeParameters.md new file mode 100644 index 0000000..3a59ef1 --- /dev/null +++ b/documentation/models/SendEnvelopeParameters.md @@ -0,0 +1,7 @@ +# SendEnvelopeParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/models/SetEnvelopeAttachmentsPlaceholdersParameters.md b/documentation/models/SetEnvelopeAttachmentsPlaceholdersParameters.md new file mode 100644 index 0000000..fc3c437 --- /dev/null +++ b/documentation/models/SetEnvelopeAttachmentsPlaceholdersParameters.md @@ -0,0 +1,8 @@ +# SetEnvelopeAttachmentsPlaceholdersParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :---------------------------------------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetEnvelopeAttachmentsPlaceholdersRequest](SetEnvelopeAttachmentsPlaceholdersRequest.md) | ✅ | | diff --git a/documentation/models/SetEnvelopeAttachmentsPlaceholdersRequest.md b/documentation/models/SetEnvelopeAttachmentsPlaceholdersRequest.md index b81d86e..96cde5a 100644 --- a/documentation/models/SetEnvelopeAttachmentsPlaceholdersRequest.md +++ b/documentation/models/SetEnvelopeAttachmentsPlaceholdersRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :----------- | :----------------------------------- | :------- | :---------- | -| placeholders | List\ | ✅ | | +| Name | Type | Required | Description | +| :----------- | :---------------------------------------------------------------------------------------------------------------------- | :------- | :---------- | +| placeholders | List<[SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders](SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.md)> | ❌ | | diff --git a/documentation/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.md b/documentation/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.md new file mode 100644 index 0000000..9229cf8 --- /dev/null +++ b/documentation/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.md @@ -0,0 +1,12 @@ +# SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :---------- | +| recipientId | String | ❌ | | +| name | String | ❌ | | +| required | String | ❌ | | +| multiple | String | ❌ | | +| id | String | ❌ | | +| hint | String | ❌ | | diff --git a/documentation/models/SetEnvelopeAttachmentsSettingsParameters.md b/documentation/models/SetEnvelopeAttachmentsSettingsParameters.md new file mode 100644 index 0000000..ce64cc4 --- /dev/null +++ b/documentation/models/SetEnvelopeAttachmentsSettingsParameters.md @@ -0,0 +1,8 @@ +# SetEnvelopeAttachmentsSettingsParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetEnvelopeAttachmentsSettingsRequest](SetEnvelopeAttachmentsSettingsRequest.md) | ✅ | | diff --git a/documentation/models/SetEnvelopeAttachmentsSettingsRequest.md b/documentation/models/SetEnvelopeAttachmentsSettingsRequest.md index 214f26e..5ce6219 100644 --- a/documentation/models/SetEnvelopeAttachmentsSettingsRequest.md +++ b/documentation/models/SetEnvelopeAttachmentsSettingsRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :------- | :----------------- | :------- | :---------- | -| settings | AttachmentSettings | ✅ | | +| Name | Type | Required | Description | +| :------- | :------------------------------------------------------------------------------------------------ | :------- | :---------- | +| settings | [SetEnvelopeAttachmentsSettingsRequestSettings](SetEnvelopeAttachmentsSettingsRequestSettings.md) | ❌ | | diff --git a/documentation/models/SetEnvelopeAttachmentsSettingsRequestSettings.md b/documentation/models/SetEnvelopeAttachmentsSettingsRequestSettings.md new file mode 100644 index 0000000..3afb5df --- /dev/null +++ b/documentation/models/SetEnvelopeAttachmentsSettingsRequestSettings.md @@ -0,0 +1,7 @@ +# SetEnvelopeAttachmentsSettingsRequestSettings + +**Properties** + +| Name | Type | Required | Description | +| :------------------ | :----- | :------- | :---------- | +| visibleToRecipients | String | ❌ | | diff --git a/documentation/models/SetEnvelopeCommentParameters.md b/documentation/models/SetEnvelopeCommentParameters.md new file mode 100644 index 0000000..3ef557c --- /dev/null +++ b/documentation/models/SetEnvelopeCommentParameters.md @@ -0,0 +1,8 @@ +# SetEnvelopeCommentParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetEnvelopeCommentRequest](SetEnvelopeCommentRequest.md) | ✅ | | diff --git a/documentation/models/SetEnvelopeCommentRequest.md b/documentation/models/SetEnvelopeCommentRequest.md index 1517797..1447cfc 100644 --- a/documentation/models/SetEnvelopeCommentRequest.md +++ b/documentation/models/SetEnvelopeCommentRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :------ | :----- | :------- | :----------------------- | -| comment | String | ✅ | Comment for the envelope | +| Name | Type | Required | Description | +| :------ | :----- | :------- | :---------- | +| comment | String | ❌ | | diff --git a/documentation/models/SetEnvelopeDynamicFieldsParameters.md b/documentation/models/SetEnvelopeDynamicFieldsParameters.md new file mode 100644 index 0000000..a90cc5d --- /dev/null +++ b/documentation/models/SetEnvelopeDynamicFieldsParameters.md @@ -0,0 +1,8 @@ +# SetEnvelopeDynamicFieldsParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetEnvelopeDynamicFieldsRequest](SetEnvelopeDynamicFieldsRequest.md) | ✅ | | diff --git a/documentation/models/SetEnvelopeDynamicFieldsRequest.md b/documentation/models/SetEnvelopeDynamicFieldsRequest.md index 3216a82..8e9d7f4 100644 --- a/documentation/models/SetEnvelopeDynamicFieldsRequest.md +++ b/documentation/models/SetEnvelopeDynamicFieldsRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :------------ | :------------------- | :------- | :--------------------- | -| dynamicFields | List\ | ✅ | List of dynamic fields | +| Name | Type | Required | Description | +| :------------ | :-------------------------------------- | :------- | :---------- | +| dynamicFields | List<[DynamicFields](DynamicFields.md)> | ❌ | | diff --git a/documentation/models/SetEnvelopeExpirationDateParameters.md b/documentation/models/SetEnvelopeExpirationDateParameters.md new file mode 100644 index 0000000..ff84f3f --- /dev/null +++ b/documentation/models/SetEnvelopeExpirationDateParameters.md @@ -0,0 +1,8 @@ +# SetEnvelopeExpirationDateParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :---------------------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetEnvelopeExpirationDateRequest](SetEnvelopeExpirationDateRequest.md) | ✅ | | diff --git a/documentation/models/SetEnvelopeExpirationDateRequest.md b/documentation/models/SetEnvelopeExpirationDateRequest.md new file mode 100644 index 0000000..5fb9833 --- /dev/null +++ b/documentation/models/SetEnvelopeExpirationDateRequest.md @@ -0,0 +1,7 @@ +# SetEnvelopeExpirationDateRequest + +**Properties** + +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :---------- | +| expiresAt | String | ❌ | | diff --git a/documentation/models/SetEnvelopeLegalityLevelParameters.md b/documentation/models/SetEnvelopeLegalityLevelParameters.md new file mode 100644 index 0000000..9eb35d6 --- /dev/null +++ b/documentation/models/SetEnvelopeLegalityLevelParameters.md @@ -0,0 +1,8 @@ +# SetEnvelopeLegalityLevelParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetEnvelopeLegalityLevelRequest](SetEnvelopeLegalityLevelRequest.md) | ✅ | | diff --git a/documentation/models/SetEnvelopeLegalityLevelRequest.md b/documentation/models/SetEnvelopeLegalityLevelRequest.md index d4af02d..ff3acd6 100644 --- a/documentation/models/SetEnvelopeLegalityLevelRequest.md +++ b/documentation/models/SetEnvelopeLegalityLevelRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :------------ | :-------------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| legalityLevel | EnvelopeLegalityLevel | ❌ | Legal level of the envelope (SES is Simple Electronic Signature, QES_EIDAS is Qualified Electronic Signature, QES_ZERTES is Qualified Electronic Signature with Zertes) | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :---------- | +| legalityLevel | String | ❌ | | diff --git a/documentation/models/SetEnvelopeNotificationParameters.md b/documentation/models/SetEnvelopeNotificationParameters.md new file mode 100644 index 0000000..5e721ab --- /dev/null +++ b/documentation/models/SetEnvelopeNotificationParameters.md @@ -0,0 +1,8 @@ +# SetEnvelopeNotificationParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :------------------------------------------------------------------ | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetEnvelopeNotificationRequest](SetEnvelopeNotificationRequest.md) | ✅ | | diff --git a/documentation/models/SetEnvelopeNotificationRequest.md b/documentation/models/SetEnvelopeNotificationRequest.md new file mode 100644 index 0000000..2708f48 --- /dev/null +++ b/documentation/models/SetEnvelopeNotificationRequest.md @@ -0,0 +1,9 @@ +# SetEnvelopeNotificationRequest + +**Properties** + +| Name | Type | Required | Description | +| :--------------- | :----- | :------- | :---------- | +| subject | String | ❌ | | +| message | String | ❌ | | +| reminderInterval | String | ❌ | | diff --git a/documentation/models/SetTemplateAttachmentsPlaceholdersParameters.md b/documentation/models/SetTemplateAttachmentsPlaceholdersParameters.md new file mode 100644 index 0000000..b5983f9 --- /dev/null +++ b/documentation/models/SetTemplateAttachmentsPlaceholdersParameters.md @@ -0,0 +1,8 @@ +# SetTemplateAttachmentsPlaceholdersParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :---------------------------------------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetTemplateAttachmentsPlaceholdersRequest](SetTemplateAttachmentsPlaceholdersRequest.md) | ✅ | | diff --git a/documentation/models/SetTemplateAttachmentsPlaceholdersRequest.md b/documentation/models/SetTemplateAttachmentsPlaceholdersRequest.md new file mode 100644 index 0000000..681ae27 --- /dev/null +++ b/documentation/models/SetTemplateAttachmentsPlaceholdersRequest.md @@ -0,0 +1,7 @@ +# SetTemplateAttachmentsPlaceholdersRequest + +**Properties** + +| Name | Type | Required | Description | +| :----------- | :---------------------------------------------------------------------------------------------------------------------- | :------- | :---------- | +| placeholders | List<[SetTemplateAttachmentsPlaceholdersRequestPlaceholders](SetTemplateAttachmentsPlaceholdersRequestPlaceholders.md)> | ❌ | | diff --git a/documentation/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.md b/documentation/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.md new file mode 100644 index 0000000..a2ebb60 --- /dev/null +++ b/documentation/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.md @@ -0,0 +1,12 @@ +# SetTemplateAttachmentsPlaceholdersRequestPlaceholders + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :---------- | +| recipientId | String | ❌ | | +| name | String | ❌ | | +| required | String | ❌ | | +| multiple | String | ❌ | | +| id | String | ❌ | | +| hint | String | ❌ | | diff --git a/documentation/models/SetTemplateAttachmentsSettingsParameters.md b/documentation/models/SetTemplateAttachmentsSettingsParameters.md new file mode 100644 index 0000000..60435d2 --- /dev/null +++ b/documentation/models/SetTemplateAttachmentsSettingsParameters.md @@ -0,0 +1,8 @@ +# SetTemplateAttachmentsSettingsParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetTemplateAttachmentsSettingsRequest](SetTemplateAttachmentsSettingsRequest.md) | ✅ | | diff --git a/documentation/models/SetTemplateAttachmentsSettingsRequest.md b/documentation/models/SetTemplateAttachmentsSettingsRequest.md new file mode 100644 index 0000000..5ea42ec --- /dev/null +++ b/documentation/models/SetTemplateAttachmentsSettingsRequest.md @@ -0,0 +1,7 @@ +# SetTemplateAttachmentsSettingsRequest + +**Properties** + +| Name | Type | Required | Description | +| :------- | :------------------------------------------------------------------------------------------------ | :------- | :---------- | +| settings | [SetTemplateAttachmentsSettingsRequestSettings](SetTemplateAttachmentsSettingsRequestSettings.md) | ❌ | | diff --git a/documentation/models/SetTemplateAttachmentsSettingsRequestSettings.md b/documentation/models/SetTemplateAttachmentsSettingsRequestSettings.md new file mode 100644 index 0000000..68862f3 --- /dev/null +++ b/documentation/models/SetTemplateAttachmentsSettingsRequestSettings.md @@ -0,0 +1,7 @@ +# SetTemplateAttachmentsSettingsRequestSettings + +**Properties** + +| Name | Type | Required | Description | +| :------------------ | :----- | :------- | :---------- | +| visibleToRecipients | String | ❌ | | diff --git a/documentation/models/SetTemplateCommentParameters.md b/documentation/models/SetTemplateCommentParameters.md new file mode 100644 index 0000000..2dede4a --- /dev/null +++ b/documentation/models/SetTemplateCommentParameters.md @@ -0,0 +1,8 @@ +# SetTemplateCommentParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :-------------------------------------------------------- | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetTemplateCommentRequest](SetTemplateCommentRequest.md) | ✅ | | diff --git a/documentation/models/SetTemplateCommentRequest.md b/documentation/models/SetTemplateCommentRequest.md index 91fce03..8a8effa 100644 --- a/documentation/models/SetTemplateCommentRequest.md +++ b/documentation/models/SetTemplateCommentRequest.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :------ | :----- | :------- | :----------------------- | -| comment | String | ✅ | Comment for the template | +| Name | Type | Required | Description | +| :------ | :----- | :------- | :---------- | +| comment | String | ❌ | | diff --git a/documentation/models/SetTemplateNotificationParameters.md b/documentation/models/SetTemplateNotificationParameters.md new file mode 100644 index 0000000..c14c2d6 --- /dev/null +++ b/documentation/models/SetTemplateNotificationParameters.md @@ -0,0 +1,8 @@ +# SetTemplateNotificationParameters + +**Properties** + +| Name | Type | Required | Description | +| :---------- | :------------------------------------------------------------------ | :------- | :---------- | +| accept | String | ✅ | | +| requestBody | [SetTemplateNotificationRequest](SetTemplateNotificationRequest.md) | ✅ | | diff --git a/documentation/models/SetTemplateNotificationRequest.md b/documentation/models/SetTemplateNotificationRequest.md new file mode 100644 index 0000000..7c0be8f --- /dev/null +++ b/documentation/models/SetTemplateNotificationRequest.md @@ -0,0 +1,9 @@ +# SetTemplateNotificationRequest + +**Properties** + +| Name | Type | Required | Description | +| :--------------- | :----- | :------- | :---------- | +| subject | String | ❌ | | +| message | String | ❌ | | +| reminderInterval | String | ❌ | | diff --git a/documentation/models/SigningStepsRecipients1.md b/documentation/models/SigningStepsRecipients1.md new file mode 100644 index 0000000..0b99f62 --- /dev/null +++ b/documentation/models/SigningStepsRecipients1.md @@ -0,0 +1,12 @@ +# SigningStepsRecipients1 + +**Properties** + +| Name | Type | Required | Description | +| :----------- | :------------------------------ | :------- | :---------- | +| name | String | ❌ | | +| email | String | ❌ | | +| role | String | ❌ | | +| id | String | ❌ | | +| uid | String | ❌ | | +| verification | [Verification](Verification.md) | ❌ | | diff --git a/documentation/models/SigningStepsRecipients2.md b/documentation/models/SigningStepsRecipients2.md new file mode 100644 index 0000000..7506fe9 --- /dev/null +++ b/documentation/models/SigningStepsRecipients2.md @@ -0,0 +1,11 @@ +# SigningStepsRecipients2 + +**Properties** + +| Name | Type | Required | Description | +| :---- | :----- | :------- | :---------- | +| id | String | ❌ | | +| uid | String | ❌ | | +| name | String | ❌ | | +| email | String | ❌ | | +| role | String | ❌ | | diff --git a/documentation/models/TextFont1.md b/documentation/models/TextFont1.md new file mode 100644 index 0000000..99c6a3a --- /dev/null +++ b/documentation/models/TextFont1.md @@ -0,0 +1,9 @@ +# TextFont1 + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| family | String | ❌ | | +| italic | String | ❌ | | +| bold | String | ❌ | | diff --git a/documentation/models/TextFont2.md b/documentation/models/TextFont2.md new file mode 100644 index 0000000..53f1480 --- /dev/null +++ b/documentation/models/TextFont2.md @@ -0,0 +1,9 @@ +# TextFont2 + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| family | String | ❌ | | +| italic | String | ❌ | | +| bold | String | ❌ | | diff --git a/documentation/models/Verification.md b/documentation/models/Verification.md new file mode 100644 index 0000000..1afb8d8 --- /dev/null +++ b/documentation/models/Verification.md @@ -0,0 +1,8 @@ +# Verification + +**Properties** + +| Name | Type | Required | Description | +| :---- | :----- | :------- | :---------- | +| type | String | ❌ | | +| value | String | ❌ | | diff --git a/documentation/models/VoidEnvelopeParameters.md b/documentation/models/VoidEnvelopeParameters.md new file mode 100644 index 0000000..9d6a29a --- /dev/null +++ b/documentation/models/VoidEnvelopeParameters.md @@ -0,0 +1,7 @@ +# VoidEnvelopeParameters + +**Properties** + +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------- | +| accept | String | ✅ | | diff --git a/documentation/services/AnnotationIdService.md b/documentation/services/AnnotationIdService.md new file mode 100644 index 0000000..9f23c7e --- /dev/null +++ b/documentation/services/AnnotationIdService.md @@ -0,0 +1,49 @@ +# AnnotationIdService + +A list of all methods in the `AnnotationIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------------- | :------------------------- | +| [deleteEnvelopeAnnotation](#deleteenvelopeannotation) | Delete envelope annotation | + +## deleteEnvelopeAnnotation + +Delete envelope annotation + +- HTTP Method: `DELETE` +- Endpoint: `/envelope/{envelope_id}/annotation/{annotation_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :----------- | :----- | :------- | :---------- | +| envelopeId | String | ✅ | | +| annotationId | String | ✅ | | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + Object response = signplus.annotationId.deleteEnvelopeAnnotation( + "envelope_id", + "annotation_id" + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/AnnotationService.md b/documentation/services/AnnotationService.md new file mode 100644 index 0000000..7b759a4 --- /dev/null +++ b/documentation/services/AnnotationService.md @@ -0,0 +1,123 @@ +# AnnotationService + +A list of all methods in the `AnnotationService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------- | :---------------------- | +| [addEnvelopeAnnotation](#addenvelopeannotation) | Add envelope annotation | + +## addEnvelopeAnnotation + +Add envelope annotation + +- HTTP Method: `POST` +- Endpoint: `/envelope/{envelope_id}/annotation` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------ | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [AddEnvelopeAnnotationParameters](../models/AddEnvelopeAnnotationParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.AddEnvelopeAnnotationParameters; +import com.alohi.signplus.models.AddEnvelopeAnnotationRequest; +import com.alohi.signplus.models.AddEnvelopeAnnotationRequestCheckbox; +import com.alohi.signplus.models.AddEnvelopeAnnotationRequestDatetime; +import com.alohi.signplus.models.AddEnvelopeAnnotationRequestInitials; +import com.alohi.signplus.models.AddEnvelopeAnnotationRequestSignature; +import com.alohi.signplus.models.AddEnvelopeAnnotationRequestText; +import com.alohi.signplus.models.DatetimeFont1; +import com.alohi.signplus.models.TextFont1; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + AddEnvelopeAnnotationRequestSignature addEnvelopeAnnotationRequestSignature = + AddEnvelopeAnnotationRequestSignature.builder().id("").build(); + + AddEnvelopeAnnotationRequestInitials addEnvelopeAnnotationRequestInitials = + AddEnvelopeAnnotationRequestInitials.builder().id("").build(); + + TextFont1 textFont1 = TextFont1.builder() + .family("SANS") + .italic("") + .bold("") + .build(); + + AddEnvelopeAnnotationRequestText addEnvelopeAnnotationRequestText = + AddEnvelopeAnnotationRequestText.builder() + .size("") + .color("") + .value("") + .tooltip("") + .dynamicFieldName("") + .font(textFont1) + .build(); + + DatetimeFont1 datetimeFont1 = DatetimeFont1.builder() + .family("UNKNOWN") + .italic("") + .bold("") + .build(); + + AddEnvelopeAnnotationRequestDatetime addEnvelopeAnnotationRequestDatetime = + AddEnvelopeAnnotationRequestDatetime.builder() + .size("") + .font(datetimeFont1) + .color("") + .autoFill("") + .timezone("") + .timestamp("") + .format("YMD_NUMERIC_SLASH") + .build(); + + AddEnvelopeAnnotationRequestCheckbox addEnvelopeAnnotationRequestCheckbox = + AddEnvelopeAnnotationRequestCheckbox.builder() + .checked("") + .style("TIMES_SQUARE") + .build(); + + AddEnvelopeAnnotationRequest addEnvelopeAnnotationRequest = + AddEnvelopeAnnotationRequest.builder() + .documentId("") + .page("") + .x("") + .y("") + .width("") + .height("") + .type("INITIALS") + .recipientId("") + .required("") + .signature(addEnvelopeAnnotationRequestSignature) + .initials(addEnvelopeAnnotationRequestInitials) + .text(addEnvelopeAnnotationRequestText) + .datetime(addEnvelopeAnnotationRequestDatetime) + .checkbox(addEnvelopeAnnotationRequestCheckbox) + .build(); + + AddEnvelopeAnnotationParameters requestParameters = AddEnvelopeAnnotationParameters.builder() + .accept("application/json") + .requestBody(addEnvelopeAnnotationRequest) + .build(); + + Object response = signplus.annotation.addEnvelopeAnnotation("envelope_id", requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/AnnotationsService.md b/documentation/services/AnnotationsService.md new file mode 100644 index 0000000..cea2c49 --- /dev/null +++ b/documentation/services/AnnotationsService.md @@ -0,0 +1,51 @@ +# AnnotationsService + +A list of all methods in the `AnnotationsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------------ | :----------------------- | +| [getEnvelopeAnnotations](#getenvelopeannotations) | Get envelope annotations | + +## getEnvelopeAnnotations + +Get envelope annotations + +- HTTP Method: `GET` +- Endpoint: `/envelope/{envelope_id}/annotations` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [GetEnvelopeAnnotationsParameters](../models/GetEnvelopeAnnotationsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetEnvelopeAnnotationsParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetEnvelopeAnnotationsParameters requestParameters = GetEnvelopeAnnotationsParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.annotations.getEnvelopeAnnotations("envelope_id", requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/CertificateService.md b/documentation/services/CertificateService.md new file mode 100644 index 0000000..f1b0b97 --- /dev/null +++ b/documentation/services/CertificateService.md @@ -0,0 +1,53 @@ +# CertificateService + +A list of all methods in the `CertificateService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------------------- | :------------------------------------------------- | +| [downloadEnvelopeCertificate](#downloadenvelopecertificate) | Download certificate of completion for an envelope | + +## downloadEnvelopeCertificate + +Download certificate of completion for an envelope + +- HTTP Method: `GET` +- Endpoint: `/envelope/{envelope_id}/certificate` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------------ | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [DownloadEnvelopeCertificateParameters](../models/DownloadEnvelopeCertificateParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.DownloadEnvelopeCertificateParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + DownloadEnvelopeCertificateParameters requestParameters = + DownloadEnvelopeCertificateParameters.builder().accept("application/pdf").build(); + + Object response = signplus.certificate.downloadEnvelopeCertificate( + "envelope_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/DocumentIdService.md b/documentation/services/DocumentIdService.md new file mode 100644 index 0000000..d9142ac --- /dev/null +++ b/documentation/services/DocumentIdService.md @@ -0,0 +1,56 @@ +# DocumentIdService + +A list of all methods in the `DocumentIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------ | :-------------------- | +| [getEnvelopeDocument](#getenvelopedocument) | Get envelope document | + +## getEnvelopeDocument + +Get envelope document + +- HTTP Method: `GET` +- Endpoint: `/envelope/{envelope_id}/document/{document_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| documentId | String | ✅ | | +| requestParameters | [GetEnvelopeDocumentParameters](../models/GetEnvelopeDocumentParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetEnvelopeDocumentParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetEnvelopeDocumentParameters requestParameters = GetEnvelopeDocumentParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.documentId.getEnvelopeDocument( + "envelope_id", + "document_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/DocumentService.md b/documentation/services/DocumentService.md new file mode 100644 index 0000000..bee9f92 --- /dev/null +++ b/documentation/services/DocumentService.md @@ -0,0 +1,64 @@ +# DocumentService + +A list of all methods in the `DocumentService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------ | :-------------------- | +| [addEnvelopeDocument](#addenvelopedocument) | Add envelope document | + +## addEnvelopeDocument + +Add envelope document + +- HTTP Method: `POST` +- Endpoint: `/envelope/{envelope_id}/document` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------- | :------- | :----------------------------- | +| envelopeId | String | ✅ | | +| requestParameters | [AddEnvelopeDocumentParameters](../models/AddEnvelopeDocumentParameters.md) | ✅ | Request Parameters Object | +| \_filename | String | ✅ | Filename for the uploaded file | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.AddEnvelopeDocumentParameters; +import com.alohi.signplus.models.AddEnvelopeDocumentRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + byte[] file = new byte[] { 0, 1, 2, 3, 4, 5 }; + + AddEnvelopeDocumentRequest addEnvelopeDocumentRequest = AddEnvelopeDocumentRequest.builder() + .file(file) + .build(); + + AddEnvelopeDocumentParameters requestParameters = AddEnvelopeDocumentParameters.builder() + .accept("application/json") + .requestBody(addEnvelopeDocumentRequest) + .build(); + + Object response = signplus.document.addEnvelopeDocument( + "envelope_id", + requestParameters, + "filename.txt" + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/DocumentsService.md b/documentation/services/DocumentsService.md new file mode 100644 index 0000000..a47e99e --- /dev/null +++ b/documentation/services/DocumentsService.md @@ -0,0 +1,51 @@ +# DocumentsService + +A list of all methods in the `DocumentsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------------- | :--------------------- | +| [getEnvelopeDocuments](#getenvelopedocuments) | Get envelope documents | + +## getEnvelopeDocuments + +Get envelope documents + +- HTTP Method: `GET` +- Endpoint: `/envelope/{envelope_id}/documents` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [GetEnvelopeDocumentsParameters](../models/GetEnvelopeDocumentsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetEnvelopeDocumentsParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetEnvelopeDocumentsParameters requestParameters = GetEnvelopeDocumentsParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.documents.getEnvelopeDocuments("envelope_id", requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/DuplicateService.md b/documentation/services/DuplicateService.md new file mode 100644 index 0000000..fb05160 --- /dev/null +++ b/documentation/services/DuplicateService.md @@ -0,0 +1,51 @@ +# DuplicateService + +A list of all methods in the `DuplicateService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------- | :----------------- | +| [duplicateEnvelope](#duplicateenvelope) | Duplicate envelope | + +## duplicateEnvelope + +Duplicate envelope + +- HTTP Method: `POST` +- Endpoint: `/envelope/{envelope_id}/duplicate` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [DuplicateEnvelopeParameters](../models/DuplicateEnvelopeParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.DuplicateEnvelopeParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + DuplicateEnvelopeParameters requestParameters = DuplicateEnvelopeParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.duplicate.duplicateEnvelope("envelope_id", requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/DynamicFieldsService.md b/documentation/services/DynamicFieldsService.md new file mode 100644 index 0000000..6e12cc0 --- /dev/null +++ b/documentation/services/DynamicFieldsService.md @@ -0,0 +1,70 @@ +# DynamicFieldsService + +A list of all methods in the `DynamicFieldsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------------- | :-------------------------- | +| [setEnvelopeDynamicFields](#setenvelopedynamicfields) | Set envelope dynamic fields | + +## setEnvelopeDynamicFields + +Set envelope dynamic fields + +- HTTP Method: `PUT` +- Endpoint: `/envelope/{envelope_id}/dynamic_fields` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------ | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [SetEnvelopeDynamicFieldsParameters](../models/SetEnvelopeDynamicFieldsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.DynamicFields; +import com.alohi.signplus.models.SetEnvelopeDynamicFieldsParameters; +import com.alohi.signplus.models.SetEnvelopeDynamicFieldsRequest; +import java.util.Arrays; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + DynamicFields dynamicFields = DynamicFields.builder() + .name("") + .value("") + .build(); + + List dynamicFieldsList = Arrays.asList(dynamicFields); + + SetEnvelopeDynamicFieldsRequest setEnvelopeDynamicFieldsRequest = + SetEnvelopeDynamicFieldsRequest.builder().dynamicFields(dynamicFieldsList).build(); + + SetEnvelopeDynamicFieldsParameters requestParameters = + SetEnvelopeDynamicFieldsParameters.builder() + .accept("application/json") + .requestBody(setEnvelopeDynamicFieldsRequest) + .build(); + + Object response = signplus.dynamicFields.setEnvelopeDynamicFields( + "envelope_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.md b/documentation/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.md new file mode 100644 index 0000000..a4ad75b --- /dev/null +++ b/documentation/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.md @@ -0,0 +1,56 @@ +# EnvelopeEnvelopeIdAnnotationsDocumentIdService + +A list of all methods in the `EnvelopeEnvelopeIdAnnotationsDocumentIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------------------------- | :-------------------------------- | +| [getEnvelopeDocumentAnnotations](#getenvelopedocumentannotations) | Get envelope document annotations | + +## getEnvelopeDocumentAnnotations + +Get envelope document annotations + +- HTTP Method: `GET` +- Endpoint: `/envelope/{envelope_id}/annotations/{document_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------------------ | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| documentId | String | ✅ | | +| requestParameters | [GetEnvelopeDocumentAnnotationsParameters](../models/GetEnvelopeDocumentAnnotationsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetEnvelopeDocumentAnnotationsParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetEnvelopeDocumentAnnotationsParameters requestParameters = + GetEnvelopeDocumentAnnotationsParameters.builder().accept("application/json").build(); + + Object response = + signplus.envelopeEnvelopeIdAnnotationsDocumentId.getEnvelopeDocumentAnnotations( + "envelope_id", + "document_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/EnvelopeIdService.md b/documentation/services/EnvelopeIdService.md new file mode 100644 index 0000000..5e16070 --- /dev/null +++ b/documentation/services/EnvelopeIdService.md @@ -0,0 +1,90 @@ +# EnvelopeIdService + +A list of all methods in the `EnvelopeIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------- | :-------------- | +| [getEnvelope](#getenvelope) | Get envelope | +| [deleteEnvelope](#deleteenvelope) | Delete envelope | + +## getEnvelope + +Get envelope + +- HTTP Method: `GET` +- Endpoint: `/envelope/{envelope_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [GetEnvelopeParameters](../models/GetEnvelopeParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetEnvelopeParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetEnvelopeParameters requestParameters = GetEnvelopeParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.envelopeId.getEnvelope("envelope_id", requestParameters); + + System.out.println(response); + } +} + +``` + +## deleteEnvelope + +Delete envelope + +- HTTP Method: `DELETE` +- Endpoint: `/envelope/{envelope_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :--------- | :----- | :------- | :---------- | +| envelopeId | String | ✅ | | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + Object response = signplus.envelopeId.deleteEnvelope("envelope_id"); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/EnvelopeService.md b/documentation/services/EnvelopeService.md new file mode 100644 index 0000000..74ed6f8 --- /dev/null +++ b/documentation/services/EnvelopeService.md @@ -0,0 +1,60 @@ +# EnvelopeService + +A list of all methods in the `EnvelopeService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------- | :------------------ | +| [createEnvelope](#createenvelope) | Create new envelope | + +## createEnvelope + +Create new envelope + +- HTTP Method: `POST` +- Endpoint: `/envelope` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [CreateEnvelopeParameters](../models/CreateEnvelopeParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.CreateEnvelopeParameters; +import com.alohi.signplus.models.CreateEnvelopeRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + CreateEnvelopeRequest createEnvelopeRequest = CreateEnvelopeRequest.builder() + .name("PNeiZUQ9LB9") + .legalityLevel("QES_ZERTES") + .expiresAt("") + .comment("") + .sandbox(false) + .build(); + + CreateEnvelopeParameters requestParameters = CreateEnvelopeParameters.builder() + .accept("application/json") + .requestBody(createEnvelopeRequest) + .build(); + + Object response = signplus.envelope.createEnvelope(requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/EnvelopesService.md b/documentation/services/EnvelopesService.md new file mode 100644 index 0000000..99dce5e --- /dev/null +++ b/documentation/services/EnvelopesService.md @@ -0,0 +1,82 @@ +# EnvelopesService + +A list of all methods in the `EnvelopesService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------ | :------------- | +| [listEnvelopes](#listenvelopes) | List envelopes | + +## listEnvelopes + +List envelopes + +- HTTP Method: `POST` +- Endpoint: `/envelopes` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListEnvelopesParameters](../models/ListEnvelopesParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.ListEnvelopesParameters; +import com.alohi.signplus.models.ListEnvelopesRequest; +import java.util.Arrays; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + List tagsList = Arrays.asList(""); + + List idsList = Arrays.asList(""); + + List statusesList = Arrays.asList("PENDING"); + + List folderIdsList = Arrays.asList(""); + + ListEnvelopesRequest listEnvelopesRequest = ListEnvelopesRequest.builder() + .name("") + .tags(tagsList) + .comment("") + .ids(idsList) + .statuses(statusesList) + .folderIds(folderIdsList) + .onlyRootFolder("") + .dateFrom("") + .dateTo("") + .uid("") + .first("") + .last("") + .after("") + .before("") + .orderField("LAST_DOCUMENT_CHANGE") + .ascending("") + .includeTrash("") + .build(); + + ListEnvelopesParameters requestParameters = ListEnvelopesParameters.builder() + .accept("application/json") + .requestBody(listEnvelopesRequest) + .build(); + + Object response = signplus.envelopes.listEnvelopes(requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/FileIdService.md b/documentation/services/FileIdService.md new file mode 100644 index 0000000..2c4c4e9 --- /dev/null +++ b/documentation/services/FileIdService.md @@ -0,0 +1,56 @@ +# FileIdService + +A list of all methods in the `FileIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------- | :--------------------------- | +| [getAttachmentFile](#getattachmentfile) | Get envelope attachment file | + +## getAttachmentFile + +Get envelope attachment file + +- HTTP Method: `GET` +- Endpoint: `/envelope/{envelope_id}/attachments/{file_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| fileId | String | ✅ | | +| requestParameters | [GetAttachmentFileParameters](../models/GetAttachmentFileParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetAttachmentFileParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetAttachmentFileParameters requestParameters = GetAttachmentFileParameters.builder() + .accept("application/octet-stream") + .build(); + + Object response = signplus.fileId.getAttachmentFile( + "envelope_id", + "file_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/PlaceholdersService.md b/documentation/services/PlaceholdersService.md new file mode 100644 index 0000000..7ac4acf --- /dev/null +++ b/documentation/services/PlaceholdersService.md @@ -0,0 +1,77 @@ +# PlaceholdersService + +A list of all methods in the `PlaceholdersService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------------------------------------ | :-------------------------------------------------------------- | +| [setEnvelopeAttachmentsPlaceholders](#setenvelopeattachmentsplaceholders) | Placeholders to be set, completely replacing the existing ones. | + +## setEnvelopeAttachmentsPlaceholders + +Placeholders to be set, completely replacing the existing ones. + +- HTTP Method: `PUT` +- Endpoint: `/envelope/{envelope_id}/attachments/placeholders` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [SetEnvelopeAttachmentsPlaceholdersParameters](../models/SetEnvelopeAttachmentsPlaceholdersParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetEnvelopeAttachmentsPlaceholdersParameters; +import com.alohi.signplus.models.SetEnvelopeAttachmentsPlaceholdersRequest; +import com.alohi.signplus.models.SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders; +import java.util.Arrays; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders setEnvelopeAttachmentsPlaceholdersRequestPlaceholders = + SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.builder() + .recipientId("") + .name("") + .required("") + .multiple("") + .id("") + .hint("") + .build(); + + List placeholdersList = Arrays.asList( + setEnvelopeAttachmentsPlaceholdersRequestPlaceholders + ); + + SetEnvelopeAttachmentsPlaceholdersRequest setEnvelopeAttachmentsPlaceholdersRequest = + SetEnvelopeAttachmentsPlaceholdersRequest.builder().placeholders(placeholdersList).build(); + + SetEnvelopeAttachmentsPlaceholdersParameters requestParameters = + SetEnvelopeAttachmentsPlaceholdersParameters.builder() + .accept("application/json") + .requestBody(setEnvelopeAttachmentsPlaceholdersRequest) + .build(); + + Object response = signplus.placeholders.setEnvelopeAttachmentsPlaceholders( + "envelope_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/RenameService.md b/documentation/services/RenameService.md new file mode 100644 index 0000000..1003dea --- /dev/null +++ b/documentation/services/RenameService.md @@ -0,0 +1,57 @@ +# RenameService + +A list of all methods in the `RenameService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------- | :-------------- | +| [renameEnvelope](#renameenvelope) | Rename envelope | + +## renameEnvelope + +Rename envelope + +- HTTP Method: `PUT` +- Endpoint: `/envelope/{envelope_id}/rename` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [RenameEnvelopeParameters](../models/RenameEnvelopeParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.RenameEnvelopeParameters; +import com.alohi.signplus.models.RenameEnvelopeRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + RenameEnvelopeRequest renameEnvelopeRequest = RenameEnvelopeRequest.builder() + .name("") + .build(); + + RenameEnvelopeParameters requestParameters = RenameEnvelopeParameters.builder() + .accept("application/json") + .requestBody(renameEnvelopeRequest) + .build(); + + Object response = signplus.rename.renameEnvelope("envelope_id", requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/SendService.md b/documentation/services/SendService.md new file mode 100644 index 0000000..2797b08 --- /dev/null +++ b/documentation/services/SendService.md @@ -0,0 +1,51 @@ +# SendService + +A list of all methods in the `SendService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------- | :-------------------------- | +| [sendEnvelope](#sendenvelope) | Send envelope for signature | + +## sendEnvelope + +Send envelope for signature + +- HTTP Method: `POST` +- Endpoint: `/envelope/{envelope_id}/send` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------ | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [SendEnvelopeParameters](../models/SendEnvelopeParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SendEnvelopeParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SendEnvelopeParameters requestParameters = SendEnvelopeParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.send.sendEnvelope("envelope_id", requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/SetCommentService.md b/documentation/services/SetCommentService.md new file mode 100644 index 0000000..99329b2 --- /dev/null +++ b/documentation/services/SetCommentService.md @@ -0,0 +1,57 @@ +# SetCommentService + +A list of all methods in the `SetCommentService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------- | :------------------- | +| [setEnvelopeComment](#setenvelopecomment) | Set envelope comment | + +## setEnvelopeComment + +Set envelope comment + +- HTTP Method: `PUT` +- Endpoint: `/envelope/{envelope_id}/set_comment` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------ | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [SetEnvelopeCommentParameters](../models/SetEnvelopeCommentParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetEnvelopeCommentParameters; +import com.alohi.signplus.models.SetEnvelopeCommentRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetEnvelopeCommentRequest setEnvelopeCommentRequest = SetEnvelopeCommentRequest.builder() + .comment("") + .build(); + + SetEnvelopeCommentParameters requestParameters = SetEnvelopeCommentParameters.builder() + .accept("application/json") + .requestBody(setEnvelopeCommentRequest) + .build(); + + Object response = signplus.setComment.setEnvelopeComment("envelope_id", requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/SetExpirationDateService.md b/documentation/services/SetExpirationDateService.md new file mode 100644 index 0000000..5d95910 --- /dev/null +++ b/documentation/services/SetExpirationDateService.md @@ -0,0 +1,60 @@ +# SetExpirationDateService + +A list of all methods in the `SetExpirationDateService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------------------ | :--------------------------- | +| [setEnvelopeExpirationDate](#setenvelopeexpirationdate) | Set envelope expiration date | + +## setEnvelopeExpirationDate + +Set envelope expiration date + +- HTTP Method: `PUT` +- Endpoint: `/envelope/{envelope_id}/set_expiration_date` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [SetEnvelopeExpirationDateParameters](../models/SetEnvelopeExpirationDateParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetEnvelopeExpirationDateParameters; +import com.alohi.signplus.models.SetEnvelopeExpirationDateRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetEnvelopeExpirationDateRequest setEnvelopeExpirationDateRequest = + SetEnvelopeExpirationDateRequest.builder().expiresAt("").build(); + + SetEnvelopeExpirationDateParameters requestParameters = + SetEnvelopeExpirationDateParameters.builder() + .accept("application/json") + .requestBody(setEnvelopeExpirationDateRequest) + .build(); + + Object response = signplus.setExpirationDate.setEnvelopeExpirationDate( + "envelope_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/SetLegalityLevelService.md b/documentation/services/SetLegalityLevelService.md new file mode 100644 index 0000000..9c4188b --- /dev/null +++ b/documentation/services/SetLegalityLevelService.md @@ -0,0 +1,60 @@ +# SetLegalityLevelService + +A list of all methods in the `SetLegalityLevelService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------------- | :-------------------------- | +| [setEnvelopeLegalityLevel](#setenvelopelegalitylevel) | Set envelope legality level | + +## setEnvelopeLegalityLevel + +Set envelope legality level + +- HTTP Method: `PUT` +- Endpoint: `/envelope/{envelope_id}/set_legality_level` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------ | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [SetEnvelopeLegalityLevelParameters](../models/SetEnvelopeLegalityLevelParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetEnvelopeLegalityLevelParameters; +import com.alohi.signplus.models.SetEnvelopeLegalityLevelRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetEnvelopeLegalityLevelRequest setEnvelopeLegalityLevelRequest = + SetEnvelopeLegalityLevelRequest.builder().legalityLevel("QES_EIDAS").build(); + + SetEnvelopeLegalityLevelParameters requestParameters = + SetEnvelopeLegalityLevelParameters.builder() + .accept("application/json") + .requestBody(setEnvelopeLegalityLevelRequest) + .build(); + + Object response = signplus.setLegalityLevel.setEnvelopeLegalityLevel( + "envelope_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/SetNotificationService.md b/documentation/services/SetNotificationService.md new file mode 100644 index 0000000..be8d341 --- /dev/null +++ b/documentation/services/SetNotificationService.md @@ -0,0 +1,64 @@ +# SetNotificationService + +A list of all methods in the `SetNotificationService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------------------- | :------------------------ | +| [setEnvelopeNotification](#setenvelopenotification) | Set envelope notification | + +## setEnvelopeNotification + +Set envelope notification + +- HTTP Method: `PUT` +- Endpoint: `/envelope/{envelope_id}/set_notification` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [SetEnvelopeNotificationParameters](../models/SetEnvelopeNotificationParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetEnvelopeNotificationParameters; +import com.alohi.signplus.models.SetEnvelopeNotificationRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetEnvelopeNotificationRequest setEnvelopeNotificationRequest = + SetEnvelopeNotificationRequest.builder() + .subject("") + .message("") + .reminderInterval("") + .build(); + + SetEnvelopeNotificationParameters requestParameters = + SetEnvelopeNotificationParameters.builder() + .accept("application/json") + .requestBody(setEnvelopeNotificationRequest) + .build(); + + Object response = signplus.setNotification.setEnvelopeNotification( + "envelope_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/SettingsService.md b/documentation/services/SettingsService.md new file mode 100644 index 0000000..0fb4981 --- /dev/null +++ b/documentation/services/SettingsService.md @@ -0,0 +1,68 @@ +# SettingsService + +A list of all methods in the `SettingsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------------------------- | :------------------------------- | +| [setEnvelopeAttachmentsSettings](#setenvelopeattachmentssettings) | Set envelope attachment settings | + +## setEnvelopeAttachmentsSettings + +Set envelope attachment settings + +- HTTP Method: `PUT` +- Endpoint: `/envelope/{envelope_id}/attachments/settings` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------------------ | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [SetEnvelopeAttachmentsSettingsParameters](../models/SetEnvelopeAttachmentsSettingsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetEnvelopeAttachmentsSettingsParameters; +import com.alohi.signplus.models.SetEnvelopeAttachmentsSettingsRequest; +import com.alohi.signplus.models.SetEnvelopeAttachmentsSettingsRequestSettings; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetEnvelopeAttachmentsSettingsRequestSettings setEnvelopeAttachmentsSettingsRequestSettings = + SetEnvelopeAttachmentsSettingsRequestSettings.builder() + .visibleToRecipients("") + .build(); + + SetEnvelopeAttachmentsSettingsRequest setEnvelopeAttachmentsSettingsRequest = + SetEnvelopeAttachmentsSettingsRequest.builder() + .settings(setEnvelopeAttachmentsSettingsRequestSettings) + .build(); + + SetEnvelopeAttachmentsSettingsParameters requestParameters = + SetEnvelopeAttachmentsSettingsParameters.builder() + .accept("application/json") + .requestBody(setEnvelopeAttachmentsSettingsRequest) + .build(); + + Object response = signplus.settings.setEnvelopeAttachmentsSettings( + "envelope_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/SignedDocumentsService.md b/documentation/services/SignedDocumentsService.md new file mode 100644 index 0000000..73a9871 --- /dev/null +++ b/documentation/services/SignedDocumentsService.md @@ -0,0 +1,56 @@ +# SignedDocumentsService + +A list of all methods in the `SignedDocumentsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------------------------------ | :---------------------------------------- | +| [downloadEnvelopeSignedDocuments](#downloadenvelopesigneddocuments) | Download signed documents for an envelope | + +## downloadEnvelopeSignedDocuments + +Download signed documents for an envelope + +- HTTP Method: `GET` +- Endpoint: `/envelope/{envelope_id}/signed_documents` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [DownloadEnvelopeSignedDocumentsParameters](../models/DownloadEnvelopeSignedDocumentsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.DownloadEnvelopeSignedDocumentsParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + DownloadEnvelopeSignedDocumentsParameters requestParameters = + DownloadEnvelopeSignedDocumentsParameters.builder() + .accept("application/pdf") + .certificateOfCompletion("true") + .build(); + + Object response = signplus.signedDocuments.downloadEnvelopeSignedDocuments( + "envelope_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/SigningStepsService.md b/documentation/services/SigningStepsService.md new file mode 100644 index 0000000..3bd5251 --- /dev/null +++ b/documentation/services/SigningStepsService.md @@ -0,0 +1,85 @@ +# SigningStepsService + +A list of all methods in the `SigningStepsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------------------- | :------------------------- | +| [addEnvelopeSigningSteps](#addenvelopesigningsteps) | Add envelope signing steps | + +## addEnvelopeSigningSteps + +Add envelope signing steps + +- HTTP Method: `POST` +- Endpoint: `/envelope/{envelope_id}/signing_steps` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [AddEnvelopeSigningStepsParameters](../models/AddEnvelopeSigningStepsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.AddEnvelopeSigningStepsParameters; +import com.alohi.signplus.models.AddEnvelopeSigningStepsRequest; +import com.alohi.signplus.models.AddEnvelopeSigningStepsRequestSigningSteps; +import com.alohi.signplus.models.SigningStepsRecipients1; +import com.alohi.signplus.models.Verification; +import java.util.Arrays; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + Verification verification = Verification.builder().type("SMS").value("").build(); + + SigningStepsRecipients1 signingStepsRecipients1 = SigningStepsRecipients1.builder() + .name("") + .email("") + .role("IN_PERSON_SIGNER") + .id("") + .uid("") + .verification(verification) + .build(); + + List recipientsList = Arrays.asList(signingStepsRecipients1); + + AddEnvelopeSigningStepsRequestSigningSteps addEnvelopeSigningStepsRequestSigningSteps = + AddEnvelopeSigningStepsRequestSigningSteps.builder().recipients(recipientsList).build(); + + List signingStepsList = Arrays.asList( + addEnvelopeSigningStepsRequestSigningSteps + ); + + AddEnvelopeSigningStepsRequest addEnvelopeSigningStepsRequest = + AddEnvelopeSigningStepsRequest.builder().signingSteps(signingStepsList).build(); + + AddEnvelopeSigningStepsParameters requestParameters = + AddEnvelopeSigningStepsParameters.builder() + .accept("application/json") + .requestBody(addEnvelopeSigningStepsRequest) + .build(); + + Object response = signplus.signingSteps.addEnvelopeSigningSteps( + "envelope_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateIdService.md b/documentation/services/TemplateIdService.md new file mode 100644 index 0000000..77c7da3 --- /dev/null +++ b/documentation/services/TemplateIdService.md @@ -0,0 +1,64 @@ +# TemplateIdService + +A list of all methods in the `TemplateIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------------------------- | :-------------------------------- | +| [createEnvelopeFromTemplate](#createenvelopefromtemplate) | Create new envelope from template | + +## createEnvelopeFromTemplate + +Create new envelope from template + +- HTTP Method: `POST` +- Endpoint: `/envelope/from_template/{template_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [CreateEnvelopeFromTemplateParameters](../models/CreateEnvelopeFromTemplateParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.CreateEnvelopeFromTemplateParameters; +import com.alohi.signplus.models.CreateEnvelopeFromTemplateRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + CreateEnvelopeFromTemplateRequest createEnvelopeFromTemplateRequest = + CreateEnvelopeFromTemplateRequest.builder() + .name("fND") + .comment("") + .sandbox(false) + .build(); + + CreateEnvelopeFromTemplateParameters requestParameters = + CreateEnvelopeFromTemplateParameters.builder() + .accept("application/json") + .requestBody(createEnvelopeFromTemplateRequest) + .build(); + + Object response = signplus.templateId.createEnvelopeFromTemplate( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateService.md b/documentation/services/TemplateService.md new file mode 100644 index 0000000..b754e5a --- /dev/null +++ b/documentation/services/TemplateService.md @@ -0,0 +1,56 @@ +# TemplateService + +A list of all methods in the `TemplateService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------- | :------------------ | +| [createTemplate](#createtemplate) | Create new template | + +## createTemplate + +Create new template + +- HTTP Method: `POST` +- Endpoint: `/template` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [CreateTemplateParameters](../models/CreateTemplateParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.CreateTemplateParameters; +import com.alohi.signplus.models.CreateTemplateRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + CreateTemplateRequest createTemplateRequest = CreateTemplateRequest.builder() + .name("9AF5Q5BuJY8") + .build(); + + CreateTemplateParameters requestParameters = CreateTemplateParameters.builder() + .accept("application/json") + .requestBody(createTemplateRequest) + .build(); + + Object response = signplus.template.createTemplate(requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdAnnotationAnnotationIdService.md b/documentation/services/TemplateTemplateIdAnnotationAnnotationIdService.md new file mode 100644 index 0000000..2ec085f --- /dev/null +++ b/documentation/services/TemplateTemplateIdAnnotationAnnotationIdService.md @@ -0,0 +1,49 @@ +# TemplateTemplateIdAnnotationAnnotationIdService + +A list of all methods in the `TemplateTemplateIdAnnotationAnnotationIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------------- | :------------------------- | +| [deleteTemplateAnnotation](#deletetemplateannotation) | Delete template annotation | + +## deleteTemplateAnnotation + +Delete template annotation + +- HTTP Method: `DELETE` +- Endpoint: `/template/{template_id}/annotation/{annotation_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :----------- | :----- | :------- | :---------- | +| templateId | String | ✅ | | +| annotationId | String | ✅ | | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + Object response = signplus.templateTemplateIdAnnotationAnnotationId.deleteTemplateAnnotation( + "template_id", + "annotation_id" + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdAnnotationService.md b/documentation/services/TemplateTemplateIdAnnotationService.md new file mode 100644 index 0000000..3aabb21 --- /dev/null +++ b/documentation/services/TemplateTemplateIdAnnotationService.md @@ -0,0 +1,126 @@ +# TemplateTemplateIdAnnotationService + +A list of all methods in the `TemplateTemplateIdAnnotationService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------- | :---------------------- | +| [addTemplateAnnotation](#addtemplateannotation) | Add template annotation | + +## addTemplateAnnotation + +Add template annotation + +- HTTP Method: `POST` +- Endpoint: `/template/{template_id}/annotation` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------ | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [AddTemplateAnnotationParameters](../models/AddTemplateAnnotationParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.AddTemplateAnnotationParameters; +import com.alohi.signplus.models.AddTemplateAnnotationRequest; +import com.alohi.signplus.models.AddTemplateAnnotationRequestCheckbox; +import com.alohi.signplus.models.AddTemplateAnnotationRequestDatetime; +import com.alohi.signplus.models.AddTemplateAnnotationRequestInitials; +import com.alohi.signplus.models.AddTemplateAnnotationRequestSignature; +import com.alohi.signplus.models.AddTemplateAnnotationRequestText; +import com.alohi.signplus.models.DatetimeFont2; +import com.alohi.signplus.models.TextFont2; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + AddTemplateAnnotationRequestSignature addTemplateAnnotationRequestSignature = + AddTemplateAnnotationRequestSignature.builder().id("").build(); + + AddTemplateAnnotationRequestInitials addTemplateAnnotationRequestInitials = + AddTemplateAnnotationRequestInitials.builder().id("").build(); + + TextFont2 textFont2 = TextFont2.builder() + .family("SANS") + .italic("") + .bold("") + .build(); + + AddTemplateAnnotationRequestText addTemplateAnnotationRequestText = + AddTemplateAnnotationRequestText.builder() + .size("") + .color("") + .value("") + .tooltip("") + .dynamicFieldName("") + .font(textFont2) + .build(); + + DatetimeFont2 datetimeFont2 = DatetimeFont2.builder() + .family("UNKNOWN") + .italic("") + .bold("") + .build(); + + AddTemplateAnnotationRequestDatetime addTemplateAnnotationRequestDatetime = + AddTemplateAnnotationRequestDatetime.builder() + .size("") + .font(datetimeFont2) + .color("") + .autoFill("") + .timezone("") + .timestamp("") + .format("YMD_NUMERIC_SLASH") + .build(); + + AddTemplateAnnotationRequestCheckbox addTemplateAnnotationRequestCheckbox = + AddTemplateAnnotationRequestCheckbox.builder() + .checked("") + .style("TIMES_SQUARE") + .build(); + + AddTemplateAnnotationRequest addTemplateAnnotationRequest = + AddTemplateAnnotationRequest.builder() + .documentId("") + .page("") + .x("") + .y("") + .width("") + .height("") + .type("INITIALS") + .recipientId("") + .required("") + .signature(addTemplateAnnotationRequestSignature) + .initials(addTemplateAnnotationRequestInitials) + .text(addTemplateAnnotationRequestText) + .datetime(addTemplateAnnotationRequestDatetime) + .checkbox(addTemplateAnnotationRequestCheckbox) + .build(); + + AddTemplateAnnotationParameters requestParameters = AddTemplateAnnotationParameters.builder() + .accept("application/json") + .requestBody(addTemplateAnnotationRequest) + .build(); + + Object response = signplus.templateTemplateIdAnnotation.addTemplateAnnotation( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdAnnotationsDocumentIdService.md b/documentation/services/TemplateTemplateIdAnnotationsDocumentIdService.md new file mode 100644 index 0000000..b509671 --- /dev/null +++ b/documentation/services/TemplateTemplateIdAnnotationsDocumentIdService.md @@ -0,0 +1,56 @@ +# TemplateTemplateIdAnnotationsDocumentIdService + +A list of all methods in the `TemplateTemplateIdAnnotationsDocumentIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------------------------- | :-------------------------------- | +| [getDocumentTemplateAnnotations](#getdocumenttemplateannotations) | Get document template annotations | + +## getDocumentTemplateAnnotations + +Get document template annotations + +- HTTP Method: `GET` +- Endpoint: `/template/{template_id}/annotations/{document_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------------------ | :------- | :------------------------ | +| templateId | String | ✅ | | +| documentId | String | ✅ | | +| requestParameters | [GetDocumentTemplateAnnotationsParameters](../models/GetDocumentTemplateAnnotationsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetDocumentTemplateAnnotationsParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetDocumentTemplateAnnotationsParameters requestParameters = + GetDocumentTemplateAnnotationsParameters.builder().accept("application/json").build(); + + Object response = + signplus.templateTemplateIdAnnotationsDocumentId.getDocumentTemplateAnnotations( + "template_id", + "document_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdAnnotationsService.md b/documentation/services/TemplateTemplateIdAnnotationsService.md new file mode 100644 index 0000000..c73cf7d --- /dev/null +++ b/documentation/services/TemplateTemplateIdAnnotationsService.md @@ -0,0 +1,54 @@ +# TemplateTemplateIdAnnotationsService + +A list of all methods in the `TemplateTemplateIdAnnotationsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------------ | :----------------------- | +| [getTemplateAnnotations](#gettemplateannotations) | Get template annotations | + +## getTemplateAnnotations + +Get template annotations + +- HTTP Method: `GET` +- Endpoint: `/template/{template_id}/annotations` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [GetTemplateAnnotationsParameters](../models/GetTemplateAnnotationsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetTemplateAnnotationsParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetTemplateAnnotationsParameters requestParameters = GetTemplateAnnotationsParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.templateTemplateIdAnnotations.getTemplateAnnotations( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdAttachmentsPlaceholdersService.md b/documentation/services/TemplateTemplateIdAttachmentsPlaceholdersService.md new file mode 100644 index 0000000..c88fbd1 --- /dev/null +++ b/documentation/services/TemplateTemplateIdAttachmentsPlaceholdersService.md @@ -0,0 +1,78 @@ +# TemplateTemplateIdAttachmentsPlaceholdersService + +A list of all methods in the `TemplateTemplateIdAttachmentsPlaceholdersService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------------------------------------ | :-------------------------------------------------------------- | +| [setTemplateAttachmentsPlaceholders](#settemplateattachmentsplaceholders) | Placeholders to be set, completely replacing the existing ones. | + +## setTemplateAttachmentsPlaceholders + +Placeholders to be set, completely replacing the existing ones. + +- HTTP Method: `PUT` +- Endpoint: `/template/{template_id}/attachments/placeholders` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [SetTemplateAttachmentsPlaceholdersParameters](../models/SetTemplateAttachmentsPlaceholdersParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetTemplateAttachmentsPlaceholdersParameters; +import com.alohi.signplus.models.SetTemplateAttachmentsPlaceholdersRequest; +import com.alohi.signplus.models.SetTemplateAttachmentsPlaceholdersRequestPlaceholders; +import java.util.Arrays; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetTemplateAttachmentsPlaceholdersRequestPlaceholders setTemplateAttachmentsPlaceholdersRequestPlaceholders = + SetTemplateAttachmentsPlaceholdersRequestPlaceholders.builder() + .recipientId("") + .name("") + .required("") + .multiple("") + .id("") + .hint("") + .build(); + + List placeholdersList = Arrays.asList( + setTemplateAttachmentsPlaceholdersRequestPlaceholders + ); + + SetTemplateAttachmentsPlaceholdersRequest setTemplateAttachmentsPlaceholdersRequest = + SetTemplateAttachmentsPlaceholdersRequest.builder().placeholders(placeholdersList).build(); + + SetTemplateAttachmentsPlaceholdersParameters requestParameters = + SetTemplateAttachmentsPlaceholdersParameters.builder() + .accept("application/json") + .requestBody(setTemplateAttachmentsPlaceholdersRequest) + .build(); + + Object response = + signplus.templateTemplateIdAttachmentsPlaceholders.setTemplateAttachmentsPlaceholders( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdAttachmentsSettingsService.md b/documentation/services/TemplateTemplateIdAttachmentsSettingsService.md new file mode 100644 index 0000000..4113916 --- /dev/null +++ b/documentation/services/TemplateTemplateIdAttachmentsSettingsService.md @@ -0,0 +1,68 @@ +# TemplateTemplateIdAttachmentsSettingsService + +A list of all methods in the `TemplateTemplateIdAttachmentsSettingsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------------------------------- | :------------------------------- | +| [setTemplateAttachmentsSettings](#settemplateattachmentssettings) | Set template attachment settings | + +## setTemplateAttachmentsSettings + +Set template attachment settings + +- HTTP Method: `PUT` +- Endpoint: `/template/{template_id}/attachments/settings` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------------------ | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [SetTemplateAttachmentsSettingsParameters](../models/SetTemplateAttachmentsSettingsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetTemplateAttachmentsSettingsParameters; +import com.alohi.signplus.models.SetTemplateAttachmentsSettingsRequest; +import com.alohi.signplus.models.SetTemplateAttachmentsSettingsRequestSettings; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetTemplateAttachmentsSettingsRequestSettings setTemplateAttachmentsSettingsRequestSettings = + SetTemplateAttachmentsSettingsRequestSettings.builder() + .visibleToRecipients("") + .build(); + + SetTemplateAttachmentsSettingsRequest setTemplateAttachmentsSettingsRequest = + SetTemplateAttachmentsSettingsRequest.builder() + .settings(setTemplateAttachmentsSettingsRequestSettings) + .build(); + + SetTemplateAttachmentsSettingsParameters requestParameters = + SetTemplateAttachmentsSettingsParameters.builder() + .accept("application/json") + .requestBody(setTemplateAttachmentsSettingsRequest) + .build(); + + Object response = signplus.templateTemplateIdAttachmentsSettings.setTemplateAttachmentsSettings( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdDocumentDocumentIdService.md b/documentation/services/TemplateTemplateIdDocumentDocumentIdService.md new file mode 100644 index 0000000..f88dcdf --- /dev/null +++ b/documentation/services/TemplateTemplateIdDocumentDocumentIdService.md @@ -0,0 +1,56 @@ +# TemplateTemplateIdDocumentDocumentIdService + +A list of all methods in the `TemplateTemplateIdDocumentDocumentIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------ | :-------------------- | +| [getTemplateDocument](#gettemplatedocument) | Get template document | + +## getTemplateDocument + +Get template document + +- HTTP Method: `GET` +- Endpoint: `/template/{template_id}/document/{document_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| documentId | String | ✅ | | +| requestParameters | [GetTemplateDocumentParameters](../models/GetTemplateDocumentParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetTemplateDocumentParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetTemplateDocumentParameters requestParameters = GetTemplateDocumentParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.templateTemplateIdDocumentDocumentId.getTemplateDocument( + "template_id", + "document_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdDocumentService.md b/documentation/services/TemplateTemplateIdDocumentService.md new file mode 100644 index 0000000..8ed53f1 --- /dev/null +++ b/documentation/services/TemplateTemplateIdDocumentService.md @@ -0,0 +1,64 @@ +# TemplateTemplateIdDocumentService + +A list of all methods in the `TemplateTemplateIdDocumentService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------------------ | :-------------------- | +| [addTemplateDocument](#addtemplatedocument) | Add template document | + +## addTemplateDocument + +Add template document + +- HTTP Method: `POST` +- Endpoint: `/template/{template_id}/document` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------------------- | :------- | :----------------------------- | +| templateId | String | ✅ | | +| requestParameters | [AddTemplateDocumentParameters](../models/AddTemplateDocumentParameters.md) | ✅ | Request Parameters Object | +| \_filename | String | ✅ | Filename for the uploaded file | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.AddTemplateDocumentParameters; +import com.alohi.signplus.models.AddTemplateDocumentRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + byte[] file = new byte[] { 0, 1, 2, 3, 4, 5 }; + + AddTemplateDocumentRequest addTemplateDocumentRequest = AddTemplateDocumentRequest.builder() + .file(file) + .build(); + + AddTemplateDocumentParameters requestParameters = AddTemplateDocumentParameters.builder() + .accept("application/json") + .requestBody(addTemplateDocumentRequest) + .build(); + + Object response = signplus.templateTemplateIdDocument.addTemplateDocument( + "template_id", + requestParameters, + "filename.txt" + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdDocumentsService.md b/documentation/services/TemplateTemplateIdDocumentsService.md new file mode 100644 index 0000000..849980b --- /dev/null +++ b/documentation/services/TemplateTemplateIdDocumentsService.md @@ -0,0 +1,54 @@ +# TemplateTemplateIdDocumentsService + +A list of all methods in the `TemplateTemplateIdDocumentsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------------- | :--------------------- | +| [getTemplateDocuments](#gettemplatedocuments) | Get template documents | + +## getTemplateDocuments + +Get template documents + +- HTTP Method: `GET` +- Endpoint: `/template/{template_id}/documents` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [GetTemplateDocumentsParameters](../models/GetTemplateDocumentsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetTemplateDocumentsParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetTemplateDocumentsParameters requestParameters = GetTemplateDocumentsParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.templateTemplateIdDocuments.getTemplateDocuments( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdDuplicateService.md b/documentation/services/TemplateTemplateIdDuplicateService.md new file mode 100644 index 0000000..6343a5a --- /dev/null +++ b/documentation/services/TemplateTemplateIdDuplicateService.md @@ -0,0 +1,54 @@ +# TemplateTemplateIdDuplicateService + +A list of all methods in the `TemplateTemplateIdDuplicateService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------- | :----------------- | +| [duplicateTemplate](#duplicatetemplate) | Duplicate template | + +## duplicateTemplate + +Duplicate template + +- HTTP Method: `POST` +- Endpoint: `/template/{template_id}/duplicate` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [DuplicateTemplateParameters](../models/DuplicateTemplateParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.DuplicateTemplateParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + DuplicateTemplateParameters requestParameters = DuplicateTemplateParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.templateTemplateIdDuplicate.duplicateTemplate( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdRenameService.md b/documentation/services/TemplateTemplateIdRenameService.md new file mode 100644 index 0000000..f61d7bb --- /dev/null +++ b/documentation/services/TemplateTemplateIdRenameService.md @@ -0,0 +1,60 @@ +# TemplateTemplateIdRenameService + +A list of all methods in the `TemplateTemplateIdRenameService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------- | :-------------- | +| [renameTemplate](#renametemplate) | Rename template | + +## renameTemplate + +Rename template + +- HTTP Method: `PUT` +- Endpoint: `/template/{template_id}/rename` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [RenameTemplateParameters](../models/RenameTemplateParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.RenameTemplateParameters; +import com.alohi.signplus.models.RenameTemplateRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + RenameTemplateRequest renameTemplateRequest = RenameTemplateRequest.builder() + .name("") + .build(); + + RenameTemplateParameters requestParameters = RenameTemplateParameters.builder() + .accept("application/json") + .requestBody(renameTemplateRequest) + .build(); + + Object response = signplus.templateTemplateIdRename.renameTemplate( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdService.md b/documentation/services/TemplateTemplateIdService.md new file mode 100644 index 0000000..5ad2fa6 --- /dev/null +++ b/documentation/services/TemplateTemplateIdService.md @@ -0,0 +1,90 @@ +# TemplateTemplateIdService + +A list of all methods in the `TemplateTemplateIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------- | :-------------- | +| [getTemplate](#gettemplate) | Get template | +| [deleteTemplate](#deletetemplate) | Delete template | + +## getTemplate + +Get template + +- HTTP Method: `GET` +- Endpoint: `/template/{template_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [GetTemplateParameters](../models/GetTemplateParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.GetTemplateParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + GetTemplateParameters requestParameters = GetTemplateParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.templateTemplateId.getTemplate("template_id", requestParameters); + + System.out.println(response); + } +} + +``` + +## deleteTemplate + +Delete template + +- HTTP Method: `DELETE` +- Endpoint: `/template/{template_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :--------- | :----- | :------- | :---------- | +| templateId | String | ✅ | | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + Object response = signplus.templateTemplateId.deleteTemplate("template_id"); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdSetCommentService.md b/documentation/services/TemplateTemplateIdSetCommentService.md new file mode 100644 index 0000000..31c3de6 --- /dev/null +++ b/documentation/services/TemplateTemplateIdSetCommentService.md @@ -0,0 +1,60 @@ +# TemplateTemplateIdSetCommentService + +A list of all methods in the `TemplateTemplateIdSetCommentService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------------------- | :------------------- | +| [setTemplateComment](#settemplatecomment) | Set template comment | + +## setTemplateComment + +Set template comment + +- HTTP Method: `PUT` +- Endpoint: `/template/{template_id}/set_comment` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------ | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [SetTemplateCommentParameters](../models/SetTemplateCommentParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetTemplateCommentParameters; +import com.alohi.signplus.models.SetTemplateCommentRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetTemplateCommentRequest setTemplateCommentRequest = SetTemplateCommentRequest.builder() + .comment("") + .build(); + + SetTemplateCommentParameters requestParameters = SetTemplateCommentParameters.builder() + .accept("application/json") + .requestBody(setTemplateCommentRequest) + .build(); + + Object response = signplus.templateTemplateIdSetComment.setTemplateComment( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdSetNotificationService.md b/documentation/services/TemplateTemplateIdSetNotificationService.md new file mode 100644 index 0000000..455685e --- /dev/null +++ b/documentation/services/TemplateTemplateIdSetNotificationService.md @@ -0,0 +1,64 @@ +# TemplateTemplateIdSetNotificationService + +A list of all methods in the `TemplateTemplateIdSetNotificationService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------------------- | :------------------------ | +| [setTemplateNotification](#settemplatenotification) | Set template notification | + +## setTemplateNotification + +Set template notification + +- HTTP Method: `PUT` +- Endpoint: `/template/{template_id}/set_notification` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [SetTemplateNotificationParameters](../models/SetTemplateNotificationParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.SetTemplateNotificationParameters; +import com.alohi.signplus.models.SetTemplateNotificationRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SetTemplateNotificationRequest setTemplateNotificationRequest = + SetTemplateNotificationRequest.builder() + .subject("") + .message("") + .reminderInterval("") + .build(); + + SetTemplateNotificationParameters requestParameters = + SetTemplateNotificationParameters.builder() + .accept("application/json") + .requestBody(setTemplateNotificationRequest) + .build(); + + Object response = signplus.templateTemplateIdSetNotification.setTemplateNotification( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplateTemplateIdSigningStepsService.md b/documentation/services/TemplateTemplateIdSigningStepsService.md new file mode 100644 index 0000000..0f2b9b5 --- /dev/null +++ b/documentation/services/TemplateTemplateIdSigningStepsService.md @@ -0,0 +1,81 @@ +# TemplateTemplateIdSigningStepsService + +A list of all methods in the `TemplateTemplateIdSigningStepsService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :-------------------------------------------------- | :------------------------- | +| [addTemplateSigningSteps](#addtemplatesigningsteps) | Add template signing steps | + +## addTemplateSigningSteps + +Add template signing steps + +- HTTP Method: `POST` +- Endpoint: `/template/{template_id}/signing_steps` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | +| templateId | String | ✅ | | +| requestParameters | [AddTemplateSigningStepsParameters](../models/AddTemplateSigningStepsParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.AddTemplateSigningStepsParameters; +import com.alohi.signplus.models.AddTemplateSigningStepsRequest; +import com.alohi.signplus.models.AddTemplateSigningStepsRequestSigningSteps; +import com.alohi.signplus.models.SigningStepsRecipients2; +import java.util.Arrays; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + SigningStepsRecipients2 signingStepsRecipients2 = SigningStepsRecipients2.builder() + .id("") + .uid("") + .name("") + .email("") + .role("SIGNER") + .build(); + + List recipientsList = Arrays.asList(signingStepsRecipients2); + + AddTemplateSigningStepsRequestSigningSteps addTemplateSigningStepsRequestSigningSteps = + AddTemplateSigningStepsRequestSigningSteps.builder().recipients(recipientsList).build(); + + List signingStepsList = Arrays.asList( + addTemplateSigningStepsRequestSigningSteps + ); + + AddTemplateSigningStepsRequest addTemplateSigningStepsRequest = + AddTemplateSigningStepsRequest.builder().signingSteps(signingStepsList).build(); + + AddTemplateSigningStepsParameters requestParameters = + AddTemplateSigningStepsParameters.builder() + .accept("application/json") + .requestBody(addTemplateSigningStepsRequest) + .build(); + + Object response = signplus.templateTemplateIdSigningSteps.addTemplateSigningSteps( + "template_id", + requestParameters + ); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/TemplatesService.md b/documentation/services/TemplatesService.md new file mode 100644 index 0000000..55bbaaa --- /dev/null +++ b/documentation/services/TemplatesService.md @@ -0,0 +1,70 @@ +# TemplatesService + +A list of all methods in the `TemplatesService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------ | :------------- | +| [listTemplates](#listtemplates) | List templates | + +## listTemplates + +List templates + +- HTTP Method: `POST` +- Endpoint: `/templates` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListTemplatesParameters](../models/ListTemplatesParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.ListTemplatesParameters; +import com.alohi.signplus.models.ListTemplatesRequest; +import java.util.Arrays; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + List tagsList = Arrays.asList(""); + + List idsList = Arrays.asList(""); + + ListTemplatesRequest listTemplatesRequest = ListTemplatesRequest.builder() + .name("") + .tags(tagsList) + .ids(idsList) + .first("") + .last("") + .after("") + .before("") + .orderField("TEMPLATE_CREATION_DATE") + .ascending("") + .build(); + + ListTemplatesParameters requestParameters = ListTemplatesParameters.builder() + .accept("application/json") + .requestBody(listTemplatesRequest) + .build(); + + Object response = signplus.templates.listTemplates(requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/Void_Service.md b/documentation/services/Void_Service.md new file mode 100644 index 0000000..ed51d40 --- /dev/null +++ b/documentation/services/Void_Service.md @@ -0,0 +1,51 @@ +# Void_Service + +A list of all methods in the `Void_Service` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------- | :------------ | +| [voidEnvelope](#voidenvelope) | Void envelope | + +## voidEnvelope + +Void envelope + +- HTTP Method: `PUT` +- Endpoint: `/envelope/{envelope_id}/void` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------ | :------- | :------------------------ | +| envelopeId | String | ✅ | | +| requestParameters | [VoidEnvelopeParameters](../models/VoidEnvelopeParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.VoidEnvelopeParameters; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + VoidEnvelopeParameters requestParameters = VoidEnvelopeParameters.builder() + .accept("application/json") + .build(); + + Object response = signplus.void_.voidEnvelope("envelope_id", requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/WebhookIdService.md b/documentation/services/WebhookIdService.md new file mode 100644 index 0000000..db03213 --- /dev/null +++ b/documentation/services/WebhookIdService.md @@ -0,0 +1,45 @@ +# WebhookIdService + +A list of all methods in the `WebhookIdService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------ | :------------- | +| [deleteWebhook](#deletewebhook) | Delete webhook | + +## deleteWebhook + +Delete webhook + +- HTTP Method: `DELETE` +- Endpoint: `/webhook/{webhook_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :---------- | +| webhookId | String | ✅ | | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + Object response = signplus.webhookId.deleteWebhook("webhook_id"); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/WebhookService.md b/documentation/services/WebhookService.md new file mode 100644 index 0000000..05c515d --- /dev/null +++ b/documentation/services/WebhookService.md @@ -0,0 +1,57 @@ +# WebhookService + +A list of all methods in the `WebhookService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :------------------------------ | :------------- | +| [createWebhook](#createwebhook) | Create webhook | + +## createWebhook + +Create webhook + +- HTTP Method: `POST` +- Endpoint: `/webhook` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [CreateWebhookParameters](../models/CreateWebhookParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.CreateWebhookParameters; +import com.alohi.signplus.models.CreateWebhookRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + CreateWebhookRequest createWebhookRequest = CreateWebhookRequest.builder() + .event("ENVELOPE_VOIDED") + .target("") + .build(); + + CreateWebhookParameters requestParameters = CreateWebhookParameters.builder() + .accept("application/json") + .requestBody(createWebhookRequest) + .build(); + + Object response = signplus.webhook.createWebhook(requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/services/WebhooksService.md b/documentation/services/WebhooksService.md new file mode 100644 index 0000000..cfe69df --- /dev/null +++ b/documentation/services/WebhooksService.md @@ -0,0 +1,57 @@ +# WebhooksService + +A list of all methods in the `WebhooksService` service. Click on the method name to view detailed information about that method. + +| Methods | Description | +| :---------------------------- | :------------ | +| [listWebhooks](#listwebhooks) | List webhooks | + +## listWebhooks + +List webhooks + +- HTTP Method: `POST` +- Endpoint: `/webhooks` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [ListWebhooksParameters](../models/ListWebhooksParameters.md) | ✅ | Request Parameters Object | + +**Return Type** + +`Object` + +**Example Usage Code Snippet** + +```java +import com.alohi.signplus.Signplus; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.models.ListWebhooksParameters; +import com.alohi.signplus.models.ListWebhooksRequest; + +public class Main { + + public static void main(String[] args) { + SignplusConfig config = SignplusConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + Signplus signplus = new Signplus(config); + + ListWebhooksRequest listWebhooksRequest = ListWebhooksRequest.builder() + .webhookId("") + .event("ENVELOPE_COMPLETED") + .build(); + + ListWebhooksParameters requestParameters = ListWebhooksParameters.builder() + .accept("application/json") + .requestBody(listWebhooksRequest) + .build(); + + Object response = signplus.webhooks.listWebhooks(requestParameters); + + System.out.println(response); + } +} + +``` diff --git a/documentation/snippets/snippets.json b/documentation/snippets/snippets.json new file mode 100644 index 0000000..4d371ec --- /dev/null +++ b/documentation/snippets/snippets.json @@ -0,0 +1,293 @@ +{ + "endpoints": { + "/envelope/from_template/{template_id}": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.CreateEnvelopeFromTemplateParameters;\nimport com.alohi.signplus.models.CreateEnvelopeFromTemplateRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tCreateEnvelopeFromTemplateRequest createEnvelopeFromTemplateRequest = CreateEnvelopeFromTemplateRequest.builder()\n\t\t\t.name(\"fND\")\n\t\t\t.comment(\"\")\n\t\t\t.sandbox(false)\n\t\t\t.build();\n\t\t\n\t\tCreateEnvelopeFromTemplateParameters requestParameters = CreateEnvelopeFromTemplateParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(createEnvelopeFromTemplateRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templateId.createEnvelopeFromTemplate(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/signed_documents": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.DownloadEnvelopeSignedDocumentsParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tDownloadEnvelopeSignedDocumentsParameters requestParameters = DownloadEnvelopeSignedDocumentsParameters.builder()\n\t\t\t.accept(\"application/pdf\")\n\t\t\t.certificateOfCompletion(\"true\")\n\t\t\t.build();\n\n\t\tObject response = signplus.signedDocuments.downloadEnvelopeSignedDocuments(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/certificate": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.DownloadEnvelopeCertificateParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tDownloadEnvelopeCertificateParameters requestParameters = DownloadEnvelopeCertificateParameters.builder()\n\t\t\t.accept(\"application/pdf\")\n\t\t\t.build();\n\n\t\tObject response = signplus.certificate.downloadEnvelopeCertificate(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/document/{document_id}": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetEnvelopeDocumentParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetEnvelopeDocumentParameters requestParameters = GetEnvelopeDocumentParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.documentId.getEnvelopeDocument(\"envelope_id\", \"document_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/document": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.AddEnvelopeDocumentParameters;\nimport com.alohi.signplus.models.AddEnvelopeDocumentRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tbyte[] file = new byte[] { 0, 1, 2, 3, 4, 5 };\n\t\t\n\t\tAddEnvelopeDocumentRequest addEnvelopeDocumentRequest = AddEnvelopeDocumentRequest.builder()\n\t\t\t.file(file)\n\t\t\t.build();\n\t\t\n\t\tAddEnvelopeDocumentParameters requestParameters = AddEnvelopeDocumentParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(addEnvelopeDocumentRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.document.addEnvelopeDocument(\"envelope_id\", requestParameters, \"filename.txt\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/documents": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetEnvelopeDocumentsParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetEnvelopeDocumentsParameters requestParameters = GetEnvelopeDocumentsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.documents.getEnvelopeDocuments(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/dynamic_fields": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.DynamicFields;\nimport com.alohi.signplus.models.SetEnvelopeDynamicFieldsParameters;\nimport com.alohi.signplus.models.SetEnvelopeDynamicFieldsRequest;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tDynamicFields dynamicFields = DynamicFields.builder()\n\t\t\t.name(\"\")\n\t\t\t.value(\"\")\n\t\t\t.build();\n\t\t\n\t\tList dynamicFieldsList = Arrays.asList(dynamicFields);\n\t\t\n\t\tSetEnvelopeDynamicFieldsRequest setEnvelopeDynamicFieldsRequest = SetEnvelopeDynamicFieldsRequest.builder()\n\t\t\t.dynamicFields(dynamicFieldsList)\n\t\t\t.build();\n\t\t\n\t\tSetEnvelopeDynamicFieldsParameters requestParameters = SetEnvelopeDynamicFieldsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setEnvelopeDynamicFieldsRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.dynamicFields.setEnvelopeDynamicFields(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/signing_steps": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.AddEnvelopeSigningStepsParameters;\nimport com.alohi.signplus.models.AddEnvelopeSigningStepsRequest;\nimport com.alohi.signplus.models.AddEnvelopeSigningStepsRequestSigningSteps;\nimport com.alohi.signplus.models.SigningStepsRecipients1;\nimport com.alohi.signplus.models.Verification;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tVerification verification = Verification.builder()\n\t\t\t.type(\"SMS\")\n\t\t\t.value(\"\")\n\t\t\t.build();\n\t\t\n\t\tSigningStepsRecipients1 signingStepsRecipients1 = SigningStepsRecipients1.builder()\n\t\t\t.name(\"\")\n\t\t\t.email(\"\")\n\t\t\t.role(\"IN_PERSON_SIGNER\")\n\t\t\t.id(\"\")\n\t\t\t.uid(\"\")\n\t\t\t.verification(verification)\n\t\t\t.build();\n\t\t\n\t\tList recipientsList = Arrays.asList(signingStepsRecipients1);\n\t\t\n\t\tAddEnvelopeSigningStepsRequestSigningSteps addEnvelopeSigningStepsRequestSigningSteps = AddEnvelopeSigningStepsRequestSigningSteps.builder()\n\t\t\t.recipients(recipientsList)\n\t\t\t.build();\n\t\t\n\t\tList signingStepsList = Arrays.asList(addEnvelopeSigningStepsRequestSigningSteps);\n\t\t\n\t\tAddEnvelopeSigningStepsRequest addEnvelopeSigningStepsRequest = AddEnvelopeSigningStepsRequest.builder()\n\t\t\t.signingSteps(signingStepsList)\n\t\t\t.build();\n\t\t\n\t\tAddEnvelopeSigningStepsParameters requestParameters = AddEnvelopeSigningStepsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(addEnvelopeSigningStepsRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.signingSteps.addEnvelopeSigningSteps(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/attachments/settings": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetEnvelopeAttachmentsSettingsParameters;\nimport com.alohi.signplus.models.SetEnvelopeAttachmentsSettingsRequest;\nimport com.alohi.signplus.models.SetEnvelopeAttachmentsSettingsRequestSettings;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetEnvelopeAttachmentsSettingsRequestSettings setEnvelopeAttachmentsSettingsRequestSettings = SetEnvelopeAttachmentsSettingsRequestSettings.builder()\n\t\t\t.visibleToRecipients(\"\")\n\t\t\t.build();\n\t\t\n\t\tSetEnvelopeAttachmentsSettingsRequest setEnvelopeAttachmentsSettingsRequest = SetEnvelopeAttachmentsSettingsRequest.builder()\n\t\t\t.settings(setEnvelopeAttachmentsSettingsRequestSettings)\n\t\t\t.build();\n\t\t\n\t\tSetEnvelopeAttachmentsSettingsParameters requestParameters = SetEnvelopeAttachmentsSettingsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setEnvelopeAttachmentsSettingsRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.settings.setEnvelopeAttachmentsSettings(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/attachments/placeholders": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetEnvelopeAttachmentsPlaceholdersParameters;\nimport com.alohi.signplus.models.SetEnvelopeAttachmentsPlaceholdersRequest;\nimport com.alohi.signplus.models.SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetEnvelopeAttachmentsPlaceholdersRequestPlaceholders setEnvelopeAttachmentsPlaceholdersRequestPlaceholders = SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.builder()\n\t\t\t.recipientId(\"\")\n\t\t\t.name(\"\")\n\t\t\t.required(\"\")\n\t\t\t.multiple(\"\")\n\t\t\t.id(\"\")\n\t\t\t.hint(\"\")\n\t\t\t.build();\n\t\t\n\t\tList placeholdersList = Arrays.asList(setEnvelopeAttachmentsPlaceholdersRequestPlaceholders);\n\t\t\n\t\tSetEnvelopeAttachmentsPlaceholdersRequest setEnvelopeAttachmentsPlaceholdersRequest = SetEnvelopeAttachmentsPlaceholdersRequest.builder()\n\t\t\t.placeholders(placeholdersList)\n\t\t\t.build();\n\t\t\n\t\tSetEnvelopeAttachmentsPlaceholdersParameters requestParameters = SetEnvelopeAttachmentsPlaceholdersParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setEnvelopeAttachmentsPlaceholdersRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.placeholders.setEnvelopeAttachmentsPlaceholders(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/attachments/{file_id}": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetAttachmentFileParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetAttachmentFileParameters requestParameters = GetAttachmentFileParameters.builder()\n\t\t\t.accept(\"application/octet-stream\")\n\t\t\t.build();\n\n\t\tObject response = signplus.fileId.getAttachmentFile(\"envelope_id\", \"file_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/send": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SendEnvelopeParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSendEnvelopeParameters requestParameters = SendEnvelopeParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.send.sendEnvelope(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/duplicate": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.DuplicateEnvelopeParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tDuplicateEnvelopeParameters requestParameters = DuplicateEnvelopeParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.duplicate.duplicateEnvelope(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/void": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.VoidEnvelopeParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tVoidEnvelopeParameters requestParameters = VoidEnvelopeParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.void_.voidEnvelope(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/rename": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.RenameEnvelopeParameters;\nimport com.alohi.signplus.models.RenameEnvelopeRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tRenameEnvelopeRequest renameEnvelopeRequest = RenameEnvelopeRequest.builder()\n\t\t\t.name(\"\")\n\t\t\t.build();\n\t\t\n\t\tRenameEnvelopeParameters requestParameters = RenameEnvelopeParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(renameEnvelopeRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.rename.renameEnvelope(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/set_comment": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetEnvelopeCommentParameters;\nimport com.alohi.signplus.models.SetEnvelopeCommentRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetEnvelopeCommentRequest setEnvelopeCommentRequest = SetEnvelopeCommentRequest.builder()\n\t\t\t.comment(\"\")\n\t\t\t.build();\n\t\t\n\t\tSetEnvelopeCommentParameters requestParameters = SetEnvelopeCommentParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setEnvelopeCommentRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.setComment.setEnvelopeComment(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/set_notification": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetEnvelopeNotificationParameters;\nimport com.alohi.signplus.models.SetEnvelopeNotificationRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetEnvelopeNotificationRequest setEnvelopeNotificationRequest = SetEnvelopeNotificationRequest.builder()\n\t\t\t.subject(\"\")\n\t\t\t.message(\"\")\n\t\t\t.reminderInterval(\"\")\n\t\t\t.build();\n\t\t\n\t\tSetEnvelopeNotificationParameters requestParameters = SetEnvelopeNotificationParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setEnvelopeNotificationRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.setNotification.setEnvelopeNotification(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/set_expiration_date": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetEnvelopeExpirationDateParameters;\nimport com.alohi.signplus.models.SetEnvelopeExpirationDateRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetEnvelopeExpirationDateRequest setEnvelopeExpirationDateRequest = SetEnvelopeExpirationDateRequest.builder()\n\t\t\t.expiresAt(\"\")\n\t\t\t.build();\n\t\t\n\t\tSetEnvelopeExpirationDateParameters requestParameters = SetEnvelopeExpirationDateParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setEnvelopeExpirationDateRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.setExpirationDate.setEnvelopeExpirationDate(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/set_legality_level": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetEnvelopeLegalityLevelParameters;\nimport com.alohi.signplus.models.SetEnvelopeLegalityLevelRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetEnvelopeLegalityLevelRequest setEnvelopeLegalityLevelRequest = SetEnvelopeLegalityLevelRequest.builder()\n\t\t\t.legalityLevel(\"QES_EIDAS\")\n\t\t\t.build();\n\t\t\n\t\tSetEnvelopeLegalityLevelParameters requestParameters = SetEnvelopeLegalityLevelParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setEnvelopeLegalityLevelRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.setLegalityLevel.setEnvelopeLegalityLevel(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/annotations/{document_id}": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetEnvelopeDocumentAnnotationsParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetEnvelopeDocumentAnnotationsParameters requestParameters = GetEnvelopeDocumentAnnotationsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.envelopeEnvelopeIdAnnotationsDocumentId.getEnvelopeDocumentAnnotations(\"envelope_id\", \"document_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/annotations": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetEnvelopeAnnotationsParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetEnvelopeAnnotationsParameters requestParameters = GetEnvelopeAnnotationsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.annotations.getEnvelopeAnnotations(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/annotation/{annotation_id}": { + "delete": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tObject response = signplus.annotationId.deleteEnvelopeAnnotation(\"envelope_id\", \"annotation_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}/annotation": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.AddEnvelopeAnnotationParameters;\nimport com.alohi.signplus.models.AddEnvelopeAnnotationRequest;\nimport com.alohi.signplus.models.AddEnvelopeAnnotationRequestCheckbox;\nimport com.alohi.signplus.models.AddEnvelopeAnnotationRequestDatetime;\nimport com.alohi.signplus.models.AddEnvelopeAnnotationRequestInitials;\nimport com.alohi.signplus.models.AddEnvelopeAnnotationRequestSignature;\nimport com.alohi.signplus.models.AddEnvelopeAnnotationRequestText;\nimport com.alohi.signplus.models.DatetimeFont1;\nimport com.alohi.signplus.models.TextFont1;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tAddEnvelopeAnnotationRequestSignature addEnvelopeAnnotationRequestSignature = AddEnvelopeAnnotationRequestSignature.builder()\n\t\t\t.id(\"\")\n\t\t\t.build();\n\t\t\n\t\tAddEnvelopeAnnotationRequestInitials addEnvelopeAnnotationRequestInitials = AddEnvelopeAnnotationRequestInitials.builder()\n\t\t\t.id(\"\")\n\t\t\t.build();\n\t\t\n\t\tTextFont1 textFont1 = TextFont1.builder()\n\t\t\t.family(\"SANS\")\n\t\t\t.italic(\"\")\n\t\t\t.bold(\"\")\n\t\t\t.build();\n\t\t\n\t\tAddEnvelopeAnnotationRequestText addEnvelopeAnnotationRequestText = AddEnvelopeAnnotationRequestText.builder()\n\t\t\t.size(\"\")\n\t\t\t.color(\"\")\n\t\t\t.value(\"\")\n\t\t\t.tooltip(\"\")\n\t\t\t.dynamicFieldName(\"\")\n\t\t\t.font(textFont1)\n\t\t\t.build();\n\t\t\n\t\tDatetimeFont1 datetimeFont1 = DatetimeFont1.builder()\n\t\t\t.family(\"UNKNOWN\")\n\t\t\t.italic(\"\")\n\t\t\t.bold(\"\")\n\t\t\t.build();\n\t\t\n\t\tAddEnvelopeAnnotationRequestDatetime addEnvelopeAnnotationRequestDatetime = AddEnvelopeAnnotationRequestDatetime.builder()\n\t\t\t.size(\"\")\n\t\t\t.font(datetimeFont1)\n\t\t\t.color(\"\")\n\t\t\t.autoFill(\"\")\n\t\t\t.timezone(\"\")\n\t\t\t.timestamp(\"\")\n\t\t\t.format(\"YMD_NUMERIC_SLASH\")\n\t\t\t.build();\n\t\t\n\t\tAddEnvelopeAnnotationRequestCheckbox addEnvelopeAnnotationRequestCheckbox = AddEnvelopeAnnotationRequestCheckbox.builder()\n\t\t\t.checked(\"\")\n\t\t\t.style(\"TIMES_SQUARE\")\n\t\t\t.build();\n\t\t\n\t\tAddEnvelopeAnnotationRequest addEnvelopeAnnotationRequest = AddEnvelopeAnnotationRequest.builder()\n\t\t\t.documentId(\"\")\n\t\t\t.page(\"\")\n\t\t\t.x(\"\")\n\t\t\t.y(\"\")\n\t\t\t.width(\"\")\n\t\t\t.height(\"\")\n\t\t\t.type(\"INITIALS\")\n\t\t\t.recipientId(\"\")\n\t\t\t.required(\"\")\n\t\t\t.signature(addEnvelopeAnnotationRequestSignature)\n\t\t\t.initials(addEnvelopeAnnotationRequestInitials)\n\t\t\t.text(addEnvelopeAnnotationRequestText)\n\t\t\t.datetime(addEnvelopeAnnotationRequestDatetime)\n\t\t\t.checkbox(addEnvelopeAnnotationRequestCheckbox)\n\t\t\t.build();\n\t\t\n\t\tAddEnvelopeAnnotationParameters requestParameters = AddEnvelopeAnnotationParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(addEnvelopeAnnotationRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.annotation.addEnvelopeAnnotation(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope/{envelope_id}": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetEnvelopeParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetEnvelopeParameters requestParameters = GetEnvelopeParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.envelopeId.getEnvelope(\"envelope_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tObject response = signplus.envelopeId.deleteEnvelope(\"envelope_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelope": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.CreateEnvelopeParameters;\nimport com.alohi.signplus.models.CreateEnvelopeRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tCreateEnvelopeRequest createEnvelopeRequest = CreateEnvelopeRequest.builder()\n\t\t\t.name(\"PNeiZUQ9LB9\")\n\t\t\t.legalityLevel(\"QES_ZERTES\")\n\t\t\t.expiresAt(\"\")\n\t\t\t.comment(\"\")\n\t\t\t.sandbox(false)\n\t\t\t.build();\n\t\t\n\t\tCreateEnvelopeParameters requestParameters = CreateEnvelopeParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(createEnvelopeRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.envelope.createEnvelope(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/envelopes": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.ListEnvelopesParameters;\nimport com.alohi.signplus.models.ListEnvelopesRequest;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tList tagsList = Arrays.asList(\"\");\n\t\t\n\t\tList idsList = Arrays.asList(\"\");\n\t\t\n\t\tList statusesList = Arrays.asList(\"PENDING\");\n\t\t\n\t\tList folderIdsList = Arrays.asList(\"\");\n\t\t\n\t\tListEnvelopesRequest listEnvelopesRequest = ListEnvelopesRequest.builder()\n\t\t\t.name(\"\")\n\t\t\t.tags(tagsList)\n\t\t\t.comment(\"\")\n\t\t\t.ids(idsList)\n\t\t\t.statuses(statusesList)\n\t\t\t.folderIds(folderIdsList)\n\t\t\t.onlyRootFolder(\"\")\n\t\t\t.dateFrom(\"\")\n\t\t\t.dateTo(\"\")\n\t\t\t.uid(\"\")\n\t\t\t.first(\"\")\n\t\t\t.last(\"\")\n\t\t\t.after(\"\")\n\t\t\t.before(\"\")\n\t\t\t.orderField(\"LAST_DOCUMENT_CHANGE\")\n\t\t\t.ascending(\"\")\n\t\t\t.includeTrash(\"\")\n\t\t\t.build();\n\t\t\n\t\tListEnvelopesParameters requestParameters = ListEnvelopesParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(listEnvelopesRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.envelopes.listEnvelopes(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/duplicate": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.DuplicateTemplateParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tDuplicateTemplateParameters requestParameters = DuplicateTemplateParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdDuplicate.duplicateTemplate(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/document/{document_id}": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetTemplateDocumentParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetTemplateDocumentParameters requestParameters = GetTemplateDocumentParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdDocumentDocumentId.getTemplateDocument(\"template_id\", \"document_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/document": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.AddTemplateDocumentParameters;\nimport com.alohi.signplus.models.AddTemplateDocumentRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tbyte[] file = new byte[] { 0, 1, 2, 3, 4, 5 };\n\t\t\n\t\tAddTemplateDocumentRequest addTemplateDocumentRequest = AddTemplateDocumentRequest.builder()\n\t\t\t.file(file)\n\t\t\t.build();\n\t\t\n\t\tAddTemplateDocumentParameters requestParameters = AddTemplateDocumentParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(addTemplateDocumentRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdDocument.addTemplateDocument(\"template_id\", requestParameters, \"filename.txt\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/documents": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetTemplateDocumentsParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetTemplateDocumentsParameters requestParameters = GetTemplateDocumentsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdDocuments.getTemplateDocuments(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/signing_steps": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.AddTemplateSigningStepsParameters;\nimport com.alohi.signplus.models.AddTemplateSigningStepsRequest;\nimport com.alohi.signplus.models.AddTemplateSigningStepsRequestSigningSteps;\nimport com.alohi.signplus.models.SigningStepsRecipients2;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSigningStepsRecipients2 signingStepsRecipients2 = SigningStepsRecipients2.builder()\n\t\t\t.id(\"\")\n\t\t\t.uid(\"\")\n\t\t\t.name(\"\")\n\t\t\t.email(\"\")\n\t\t\t.role(\"SIGNER\")\n\t\t\t.build();\n\t\t\n\t\tList recipientsList = Arrays.asList(signingStepsRecipients2);\n\t\t\n\t\tAddTemplateSigningStepsRequestSigningSteps addTemplateSigningStepsRequestSigningSteps = AddTemplateSigningStepsRequestSigningSteps.builder()\n\t\t\t.recipients(recipientsList)\n\t\t\t.build();\n\t\t\n\t\tList signingStepsList = Arrays.asList(addTemplateSigningStepsRequestSigningSteps);\n\t\t\n\t\tAddTemplateSigningStepsRequest addTemplateSigningStepsRequest = AddTemplateSigningStepsRequest.builder()\n\t\t\t.signingSteps(signingStepsList)\n\t\t\t.build();\n\t\t\n\t\tAddTemplateSigningStepsParameters requestParameters = AddTemplateSigningStepsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(addTemplateSigningStepsRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdSigningSteps.addTemplateSigningSteps(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/rename": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.RenameTemplateParameters;\nimport com.alohi.signplus.models.RenameTemplateRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tRenameTemplateRequest renameTemplateRequest = RenameTemplateRequest.builder()\n\t\t\t.name(\"\")\n\t\t\t.build();\n\t\t\n\t\tRenameTemplateParameters requestParameters = RenameTemplateParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(renameTemplateRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdRename.renameTemplate(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/set_comment": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetTemplateCommentParameters;\nimport com.alohi.signplus.models.SetTemplateCommentRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetTemplateCommentRequest setTemplateCommentRequest = SetTemplateCommentRequest.builder()\n\t\t\t.comment(\"\")\n\t\t\t.build();\n\t\t\n\t\tSetTemplateCommentParameters requestParameters = SetTemplateCommentParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setTemplateCommentRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdSetComment.setTemplateComment(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/set_notification": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetTemplateNotificationParameters;\nimport com.alohi.signplus.models.SetTemplateNotificationRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetTemplateNotificationRequest setTemplateNotificationRequest = SetTemplateNotificationRequest.builder()\n\t\t\t.subject(\"\")\n\t\t\t.message(\"\")\n\t\t\t.reminderInterval(\"\")\n\t\t\t.build();\n\t\t\n\t\tSetTemplateNotificationParameters requestParameters = SetTemplateNotificationParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setTemplateNotificationRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdSetNotification.setTemplateNotification(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/annotations/{document_id}": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetDocumentTemplateAnnotationsParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetDocumentTemplateAnnotationsParameters requestParameters = GetDocumentTemplateAnnotationsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdAnnotationsDocumentId.getDocumentTemplateAnnotations(\"template_id\", \"document_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/annotations": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetTemplateAnnotationsParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetTemplateAnnotationsParameters requestParameters = GetTemplateAnnotationsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdAnnotations.getTemplateAnnotations(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/annotation/{annotation_id}": { + "delete": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tObject response = signplus.templateTemplateIdAnnotationAnnotationId.deleteTemplateAnnotation(\"template_id\", \"annotation_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/annotation": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.AddTemplateAnnotationParameters;\nimport com.alohi.signplus.models.AddTemplateAnnotationRequest;\nimport com.alohi.signplus.models.AddTemplateAnnotationRequestCheckbox;\nimport com.alohi.signplus.models.AddTemplateAnnotationRequestDatetime;\nimport com.alohi.signplus.models.AddTemplateAnnotationRequestInitials;\nimport com.alohi.signplus.models.AddTemplateAnnotationRequestSignature;\nimport com.alohi.signplus.models.AddTemplateAnnotationRequestText;\nimport com.alohi.signplus.models.DatetimeFont2;\nimport com.alohi.signplus.models.TextFont2;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tAddTemplateAnnotationRequestSignature addTemplateAnnotationRequestSignature = AddTemplateAnnotationRequestSignature.builder()\n\t\t\t.id(\"\")\n\t\t\t.build();\n\t\t\n\t\tAddTemplateAnnotationRequestInitials addTemplateAnnotationRequestInitials = AddTemplateAnnotationRequestInitials.builder()\n\t\t\t.id(\"\")\n\t\t\t.build();\n\t\t\n\t\tTextFont2 textFont2 = TextFont2.builder()\n\t\t\t.family(\"SANS\")\n\t\t\t.italic(\"\")\n\t\t\t.bold(\"\")\n\t\t\t.build();\n\t\t\n\t\tAddTemplateAnnotationRequestText addTemplateAnnotationRequestText = AddTemplateAnnotationRequestText.builder()\n\t\t\t.size(\"\")\n\t\t\t.color(\"\")\n\t\t\t.value(\"\")\n\t\t\t.tooltip(\"\")\n\t\t\t.dynamicFieldName(\"\")\n\t\t\t.font(textFont2)\n\t\t\t.build();\n\t\t\n\t\tDatetimeFont2 datetimeFont2 = DatetimeFont2.builder()\n\t\t\t.family(\"UNKNOWN\")\n\t\t\t.italic(\"\")\n\t\t\t.bold(\"\")\n\t\t\t.build();\n\t\t\n\t\tAddTemplateAnnotationRequestDatetime addTemplateAnnotationRequestDatetime = AddTemplateAnnotationRequestDatetime.builder()\n\t\t\t.size(\"\")\n\t\t\t.font(datetimeFont2)\n\t\t\t.color(\"\")\n\t\t\t.autoFill(\"\")\n\t\t\t.timezone(\"\")\n\t\t\t.timestamp(\"\")\n\t\t\t.format(\"YMD_NUMERIC_SLASH\")\n\t\t\t.build();\n\t\t\n\t\tAddTemplateAnnotationRequestCheckbox addTemplateAnnotationRequestCheckbox = AddTemplateAnnotationRequestCheckbox.builder()\n\t\t\t.checked(\"\")\n\t\t\t.style(\"TIMES_SQUARE\")\n\t\t\t.build();\n\t\t\n\t\tAddTemplateAnnotationRequest addTemplateAnnotationRequest = AddTemplateAnnotationRequest.builder()\n\t\t\t.documentId(\"\")\n\t\t\t.page(\"\")\n\t\t\t.x(\"\")\n\t\t\t.y(\"\")\n\t\t\t.width(\"\")\n\t\t\t.height(\"\")\n\t\t\t.type(\"INITIALS\")\n\t\t\t.recipientId(\"\")\n\t\t\t.required(\"\")\n\t\t\t.signature(addTemplateAnnotationRequestSignature)\n\t\t\t.initials(addTemplateAnnotationRequestInitials)\n\t\t\t.text(addTemplateAnnotationRequestText)\n\t\t\t.datetime(addTemplateAnnotationRequestDatetime)\n\t\t\t.checkbox(addTemplateAnnotationRequestCheckbox)\n\t\t\t.build();\n\t\t\n\t\tAddTemplateAnnotationParameters requestParameters = AddTemplateAnnotationParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(addTemplateAnnotationRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdAnnotation.addTemplateAnnotation(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/attachments/settings": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetTemplateAttachmentsSettingsParameters;\nimport com.alohi.signplus.models.SetTemplateAttachmentsSettingsRequest;\nimport com.alohi.signplus.models.SetTemplateAttachmentsSettingsRequestSettings;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetTemplateAttachmentsSettingsRequestSettings setTemplateAttachmentsSettingsRequestSettings = SetTemplateAttachmentsSettingsRequestSettings.builder()\n\t\t\t.visibleToRecipients(\"\")\n\t\t\t.build();\n\t\t\n\t\tSetTemplateAttachmentsSettingsRequest setTemplateAttachmentsSettingsRequest = SetTemplateAttachmentsSettingsRequest.builder()\n\t\t\t.settings(setTemplateAttachmentsSettingsRequestSettings)\n\t\t\t.build();\n\t\t\n\t\tSetTemplateAttachmentsSettingsParameters requestParameters = SetTemplateAttachmentsSettingsParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setTemplateAttachmentsSettingsRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdAttachmentsSettings.setTemplateAttachmentsSettings(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}/attachments/placeholders": { + "put": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.SetTemplateAttachmentsPlaceholdersParameters;\nimport com.alohi.signplus.models.SetTemplateAttachmentsPlaceholdersRequest;\nimport com.alohi.signplus.models.SetTemplateAttachmentsPlaceholdersRequestPlaceholders;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tSetTemplateAttachmentsPlaceholdersRequestPlaceholders setTemplateAttachmentsPlaceholdersRequestPlaceholders = SetTemplateAttachmentsPlaceholdersRequestPlaceholders.builder()\n\t\t\t.recipientId(\"\")\n\t\t\t.name(\"\")\n\t\t\t.required(\"\")\n\t\t\t.multiple(\"\")\n\t\t\t.id(\"\")\n\t\t\t.hint(\"\")\n\t\t\t.build();\n\t\t\n\t\tList placeholdersList = Arrays.asList(setTemplateAttachmentsPlaceholdersRequestPlaceholders);\n\t\t\n\t\tSetTemplateAttachmentsPlaceholdersRequest setTemplateAttachmentsPlaceholdersRequest = SetTemplateAttachmentsPlaceholdersRequest.builder()\n\t\t\t.placeholders(placeholdersList)\n\t\t\t.build();\n\t\t\n\t\tSetTemplateAttachmentsPlaceholdersParameters requestParameters = SetTemplateAttachmentsPlaceholdersParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(setTemplateAttachmentsPlaceholdersRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateIdAttachmentsPlaceholders.setTemplateAttachmentsPlaceholders(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template/{template_id}": { + "get": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.GetTemplateParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tGetTemplateParameters requestParameters = GetTemplateParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.build();\n\n\t\tObject response = signplus.templateTemplateId.getTemplate(\"template_id\", requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tObject response = signplus.templateTemplateId.deleteTemplate(\"template_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/template": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.CreateTemplateParameters;\nimport com.alohi.signplus.models.CreateTemplateRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tCreateTemplateRequest createTemplateRequest = CreateTemplateRequest.builder()\n\t\t\t.name(\"9AF5Q5BuJY8\")\n\t\t\t.build();\n\t\t\n\t\tCreateTemplateParameters requestParameters = CreateTemplateParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(createTemplateRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.template.createTemplate(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/templates": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.ListTemplatesParameters;\nimport com.alohi.signplus.models.ListTemplatesRequest;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tList tagsList = Arrays.asList(\"\");\n\t\t\n\t\tList idsList = Arrays.asList(\"\");\n\t\t\n\t\tListTemplatesRequest listTemplatesRequest = ListTemplatesRequest.builder()\n\t\t\t.name(\"\")\n\t\t\t.tags(tagsList)\n\t\t\t.ids(idsList)\n\t\t\t.first(\"\")\n\t\t\t.last(\"\")\n\t\t\t.after(\"\")\n\t\t\t.before(\"\")\n\t\t\t.orderField(\"TEMPLATE_CREATION_DATE\")\n\t\t\t.ascending(\"\")\n\t\t\t.build();\n\t\t\n\t\tListTemplatesParameters requestParameters = ListTemplatesParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(listTemplatesRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.templates.listTemplates(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/webhook/{webhook_id}": { + "delete": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tObject response = signplus.webhookId.deleteWebhook(\"webhook_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/webhook": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.CreateWebhookParameters;\nimport com.alohi.signplus.models.CreateWebhookRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tCreateWebhookRequest createWebhookRequest = CreateWebhookRequest.builder()\n\t\t\t.event(\"ENVELOPE_VOIDED\")\n\t\t\t.target(\"\")\n\t\t\t.build();\n\t\t\n\t\tCreateWebhookParameters requestParameters = CreateWebhookParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(createWebhookRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.webhook.createWebhook(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/webhooks": { + "post": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.models.ListWebhooksParameters;\nimport com.alohi.signplus.models.ListWebhooksRequest;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\n\t\tListWebhooksRequest listWebhooksRequest = ListWebhooksRequest.builder()\n\t\t\t.webhookId(\"\")\n\t\t\t.event(\"ENVELOPE_COMPLETED\")\n\t\t\t.build();\n\t\t\n\t\tListWebhooksParameters requestParameters = ListWebhooksParameters.builder()\n\t\t\t.accept(\"application/json\")\n\t\t\t.requestBody(listWebhooksRequest)\n\t\t\t.build();\n\n\t\tObject response = signplus.webhooks.listWebhooks(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + } + }, + "methodResponses": { + "/envelope/from_template/{template_id}": { + "post": "System.out.println(response);" + }, + "/envelope/{envelope_id}/signed_documents": { + "get": "System.out.println(response);" + }, + "/envelope/{envelope_id}/certificate": { + "get": "System.out.println(response);" + }, + "/envelope/{envelope_id}/document/{document_id}": { + "get": "System.out.println(response);" + }, + "/envelope/{envelope_id}/document": { + "post": "System.out.println(response);" + }, + "/envelope/{envelope_id}/documents": { + "get": "System.out.println(response);" + }, + "/envelope/{envelope_id}/dynamic_fields": { + "put": "System.out.println(response);" + }, + "/envelope/{envelope_id}/signing_steps": { + "post": "System.out.println(response);" + }, + "/envelope/{envelope_id}/attachments/settings": { + "put": "System.out.println(response);" + }, + "/envelope/{envelope_id}/attachments/placeholders": { + "put": "System.out.println(response);" + }, + "/envelope/{envelope_id}/attachments/{file_id}": { + "get": "System.out.println(response);" + }, + "/envelope/{envelope_id}/send": { + "post": "System.out.println(response);" + }, + "/envelope/{envelope_id}/duplicate": { + "post": "System.out.println(response);" + }, + "/envelope/{envelope_id}/void": { + "put": "System.out.println(response);" + }, + "/envelope/{envelope_id}/rename": { + "put": "System.out.println(response);" + }, + "/envelope/{envelope_id}/set_comment": { + "put": "System.out.println(response);" + }, + "/envelope/{envelope_id}/set_notification": { + "put": "System.out.println(response);" + }, + "/envelope/{envelope_id}/set_expiration_date": { + "put": "System.out.println(response);" + }, + "/envelope/{envelope_id}/set_legality_level": { + "put": "System.out.println(response);" + }, + "/envelope/{envelope_id}/annotations/{document_id}": { + "get": "System.out.println(response);" + }, + "/envelope/{envelope_id}/annotations": { + "get": "System.out.println(response);" + }, + "/envelope/{envelope_id}/annotation/{annotation_id}": { + "delete": "System.out.println(response);" + }, + "/envelope/{envelope_id}/annotation": { + "post": "System.out.println(response);" + }, + "/envelope/{envelope_id}": { + "get": "System.out.println(response);", + "delete": "System.out.println(response);" + }, + "/envelope": { + "post": "System.out.println(response);" + }, + "/envelopes": { + "post": "System.out.println(response);" + }, + "/template/{template_id}/duplicate": { + "post": "System.out.println(response);" + }, + "/template/{template_id}/document/{document_id}": { + "get": "System.out.println(response);" + }, + "/template/{template_id}/document": { + "post": "System.out.println(response);" + }, + "/template/{template_id}/documents": { + "get": "System.out.println(response);" + }, + "/template/{template_id}/signing_steps": { + "post": "System.out.println(response);" + }, + "/template/{template_id}/rename": { + "put": "System.out.println(response);" + }, + "/template/{template_id}/set_comment": { + "put": "System.out.println(response);" + }, + "/template/{template_id}/set_notification": { + "put": "System.out.println(response);" + }, + "/template/{template_id}/annotations/{document_id}": { + "get": "System.out.println(response);" + }, + "/template/{template_id}/annotations": { + "get": "System.out.println(response);" + }, + "/template/{template_id}/annotation/{annotation_id}": { + "delete": "System.out.println(response);" + }, + "/template/{template_id}/annotation": { + "post": "System.out.println(response);" + }, + "/template/{template_id}/attachments/settings": { + "put": "System.out.println(response);" + }, + "/template/{template_id}/attachments/placeholders": { + "put": "System.out.println(response);" + }, + "/template/{template_id}": { + "get": "System.out.println(response);", + "delete": "System.out.println(response);" + }, + "/template": { + "post": "System.out.println(response);" + }, + "/templates": { + "post": "System.out.println(response);" + }, + "/webhook/{webhook_id}": { + "delete": "System.out.println(response);" + }, + "/webhook": { + "post": "System.out.println(response);" + }, + "/webhooks": { + "post": "System.out.println(response);" + } + }, + "example": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\nimport com.alohi.signplus.exceptions.ApiError;\n \npublic class Main {\n public static void main(String[] args) {\n SignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n Signplus signplus = new Signplus(config);\n\n\n try {\n Object response = signplus.envelopeId.deleteEnvelope(\"envelope_id\");\n \n System.out.println(response);\n } catch (ApiError e) {\n e.printStackTrace();\n }\n\n System.exit(0);\n }\n}\n", + "authentication": { + "bearer": { + "constructor": "import com.alohi.signplus.Signplus;\nimport com.alohi.signplus.config.SignplusConfig;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tSignplusConfig config = SignplusConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tSignplus signplus = new Signplus(config);\n\t}\n}", + "setter": "signplus.setAccessToken('YOUR_ACCESS_TOKEN');" + } + } +} diff --git a/examples/.gitignore b/examples/.gitignore index beceff9..a7e1cf7 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -29,6 +29,9 @@ build/ gradle-app.setting !gradle-wrapper.jar +# Kotlin +.kotlin + # IntelliJ out/ .idea/ diff --git a/examples/pom.xml b/examples/pom.xml index cdea5a0..7305113 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -22,7 +22,7 @@ com.alohi signplus - 2.4.0 + 3.0.0 @@ -49,7 +49,7 @@ maven-surefire-plugin - 2.22.1 + 2.22.2 maven-jar-plugin diff --git a/examples/src/main/java/com/example/Main.java b/examples/src/main/java/com/example/Main.java index 4db4c0c..a6b376b 100644 --- a/examples/src/main/java/com/example/Main.java +++ b/examples/src/main/java/com/example/Main.java @@ -3,7 +3,6 @@ import com.alohi.signplus.Signplus; import com.alohi.signplus.config.SignplusConfig; import com.alohi.signplus.exceptions.ApiError; -import com.alohi.signplus.models.Envelope; public class Main { @@ -13,7 +12,7 @@ public static void main(String[] args) { Signplus signplus = new Signplus(config); try { - Envelope response = signplus.signplus.getEnvelope("envelope_id"); + Object response = signplus.envelopeId.deleteEnvelope("envelope_id"); System.out.println(response); } catch (ApiError e) { diff --git a/pom.xml b/pom.xml index 4616a63..45c94bc 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ com.alohi signplus - 2.4.0 + 3.0.0 ${project.groupId}:${project.artifactId} @@ -17,9 +17,11 @@ - scm:git:git://github.com/alohihq/signplus-java.git - scm:git:ssh://github.com/alohihq/signplus-java.git - https://github.com/alohihq/signplus-java + scm:git:git://github.com/alohihq/signplus-sharp.git + + scm:git:ssh://github.com/alohihq/signplus-sharp.git + + https://github.com/alohihq/signplus-sharp @@ -54,7 +56,7 @@ org.projectlombok lombok - 1.18.30 + 1.18.42 provided @@ -183,7 +185,7 @@ org.projectlombok lombok - 1.18.30 + 1.18.42 diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..f68d86e --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,41 @@ +// Prettier configuration for code-formatter lambda +// Aligned with sdk-gen/prettier.config.ts + +module.exports = { + printWidth: 100, + tabWidth: 2, + useTabs: false, + semi: true, + singleQuote: true, + quoteProps: 'as-needed', + jsxSingleQuote: false, + trailingComma: 'all', + bracketSpacing: true, + arrowParens: 'always', + overrides: [ + { + files: '.editorconfig', + options: { parser: 'yaml' }, + }, + { + files: 'LICENSE', + options: { parser: 'markdown' }, + }, + { + files: '*.php', + options: { + parser: 'php', + phpVersion: '8.0', + trailingCommaPHP: false, + }, + }, + { + files: '*.md', + options: { + parser: 'markdown', + phpVersion: '8.0', + trailingCommaPHP: false, + }, + }, + ], +}; diff --git a/src/main/java/com/alohi/signplus/Signplus.java b/src/main/java/com/alohi/signplus/Signplus.java index 79ef2a6..7210741 100644 --- a/src/main/java/com/alohi/signplus/Signplus.java +++ b/src/main/java/com/alohi/signplus/Signplus.java @@ -4,22 +4,125 @@ import com.alohi.signplus.http.Environment; import com.alohi.signplus.http.interceptors.DefaultHeadersInterceptor; import com.alohi.signplus.http.interceptors.RetryInterceptor; -import com.alohi.signplus.services.SignplusService; +import com.alohi.signplus.services.AnnotationIdService; +import com.alohi.signplus.services.AnnotationService; +import com.alohi.signplus.services.AnnotationsService; +import com.alohi.signplus.services.CertificateService; +import com.alohi.signplus.services.DocumentIdService; +import com.alohi.signplus.services.DocumentService; +import com.alohi.signplus.services.DocumentsService; +import com.alohi.signplus.services.DuplicateService; +import com.alohi.signplus.services.DynamicFieldsService; +import com.alohi.signplus.services.EnvelopeEnvelopeIdAnnotationsDocumentIdService; +import com.alohi.signplus.services.EnvelopeIdService; +import com.alohi.signplus.services.EnvelopeService; +import com.alohi.signplus.services.EnvelopesService; +import com.alohi.signplus.services.FileIdService; +import com.alohi.signplus.services.PlaceholdersService; +import com.alohi.signplus.services.RenameService; +import com.alohi.signplus.services.SendService; +import com.alohi.signplus.services.SetCommentService; +import com.alohi.signplus.services.SetExpirationDateService; +import com.alohi.signplus.services.SetLegalityLevelService; +import com.alohi.signplus.services.SetNotificationService; +import com.alohi.signplus.services.SettingsService; +import com.alohi.signplus.services.SignedDocumentsService; +import com.alohi.signplus.services.SigningStepsService; +import com.alohi.signplus.services.TemplateIdService; +import com.alohi.signplus.services.TemplateService; +import com.alohi.signplus.services.TemplateTemplateIdAnnotationAnnotationIdService; +import com.alohi.signplus.services.TemplateTemplateIdAnnotationService; +import com.alohi.signplus.services.TemplateTemplateIdAnnotationsDocumentIdService; +import com.alohi.signplus.services.TemplateTemplateIdAnnotationsService; +import com.alohi.signplus.services.TemplateTemplateIdAttachmentsPlaceholdersService; +import com.alohi.signplus.services.TemplateTemplateIdAttachmentsSettingsService; +import com.alohi.signplus.services.TemplateTemplateIdDocumentDocumentIdService; +import com.alohi.signplus.services.TemplateTemplateIdDocumentService; +import com.alohi.signplus.services.TemplateTemplateIdDocumentsService; +import com.alohi.signplus.services.TemplateTemplateIdDuplicateService; +import com.alohi.signplus.services.TemplateTemplateIdRenameService; +import com.alohi.signplus.services.TemplateTemplateIdService; +import com.alohi.signplus.services.TemplateTemplateIdSetCommentService; +import com.alohi.signplus.services.TemplateTemplateIdSetNotificationService; +import com.alohi.signplus.services.TemplateTemplateIdSigningStepsService; +import com.alohi.signplus.services.TemplatesService; +import com.alohi.signplus.services.Void_Service; +import com.alohi.signplus.services.WebhookIdService; +import com.alohi.signplus.services.WebhookService; +import com.alohi.signplus.services.WebhooksService; import java.util.concurrent.TimeUnit; import okhttp3.OkHttpClient; -/** Integrate legally-binding electronic signature to your workflow */ +/** Integrate legally-binding electronic signature to your workflow + +Contact Support: + Name: Sign.Plus + Email: support@alohi.com */ public class Signplus { - public final SignplusService signplus; + public final TemplateIdService templateId; + public final SignedDocumentsService signedDocuments; + public final CertificateService certificate; + public final DocumentIdService documentId; + public final DocumentService document; + public final DocumentsService documents; + public final DynamicFieldsService dynamicFields; + public final SigningStepsService signingSteps; + public final SettingsService settings; + public final PlaceholdersService placeholders; + public final FileIdService fileId; + public final SendService send; + public final DuplicateService duplicate; + public final Void_Service void_; + public final RenameService rename; + public final SetCommentService setComment; + public final SetNotificationService setNotification; + public final SetExpirationDateService setExpirationDate; + public final SetLegalityLevelService setLegalityLevel; + public final EnvelopeEnvelopeIdAnnotationsDocumentIdService envelopeEnvelopeIdAnnotationsDocumentId; + public final AnnotationsService annotations; + public final AnnotationIdService annotationId; + public final AnnotationService annotation; + public final EnvelopeIdService envelopeId; + public final EnvelopeService envelope; + public final EnvelopesService envelopes; + public final TemplateTemplateIdDuplicateService templateTemplateIdDuplicate; + public final TemplateTemplateIdDocumentDocumentIdService templateTemplateIdDocumentDocumentId; + public final TemplateTemplateIdDocumentService templateTemplateIdDocument; + public final TemplateTemplateIdDocumentsService templateTemplateIdDocuments; + public final TemplateTemplateIdSigningStepsService templateTemplateIdSigningSteps; + public final TemplateTemplateIdRenameService templateTemplateIdRename; + public final TemplateTemplateIdSetCommentService templateTemplateIdSetComment; + public final TemplateTemplateIdSetNotificationService templateTemplateIdSetNotification; + public final TemplateTemplateIdAnnotationsDocumentIdService templateTemplateIdAnnotationsDocumentId; + public final TemplateTemplateIdAnnotationsService templateTemplateIdAnnotations; + public final TemplateTemplateIdAnnotationAnnotationIdService templateTemplateIdAnnotationAnnotationId; + public final TemplateTemplateIdAnnotationService templateTemplateIdAnnotation; + public final TemplateTemplateIdAttachmentsSettingsService templateTemplateIdAttachmentsSettings; + public final TemplateTemplateIdAttachmentsPlaceholdersService templateTemplateIdAttachmentsPlaceholders; + public final TemplateTemplateIdService templateTemplateId; + public final TemplateService template; + public final TemplatesService templates; + public final WebhookIdService webhookId; + public final WebhookService webhook; + public final WebhooksService webhooks; private final SignplusConfig config; + /** + * Constructs a new instance of Signplus with default configuration. + */ public Signplus() { // Default configs this(SignplusConfig.builder().build()); } + /** + * Constructs a new instance of Signplus with custom configuration. + * Initializes all services, HTTP client, and optional OAuth token manager. + * + * @param config The SDK configuration including base URL, authentication, timeout, and retry settings + */ public Signplus(SignplusConfig config) { this.config = config; @@ -29,17 +132,96 @@ public Signplus(SignplusConfig config) { .readTimeout(config.getTimeout(), TimeUnit.MILLISECONDS) .build(); - this.signplus = new SignplusService(httpClient, config); + this.templateId = new TemplateIdService(httpClient, config); + this.signedDocuments = new SignedDocumentsService(httpClient, config); + this.certificate = new CertificateService(httpClient, config); + this.documentId = new DocumentIdService(httpClient, config); + this.document = new DocumentService(httpClient, config); + this.documents = new DocumentsService(httpClient, config); + this.dynamicFields = new DynamicFieldsService(httpClient, config); + this.signingSteps = new SigningStepsService(httpClient, config); + this.settings = new SettingsService(httpClient, config); + this.placeholders = new PlaceholdersService(httpClient, config); + this.fileId = new FileIdService(httpClient, config); + this.send = new SendService(httpClient, config); + this.duplicate = new DuplicateService(httpClient, config); + this.void_ = new Void_Service(httpClient, config); + this.rename = new RenameService(httpClient, config); + this.setComment = new SetCommentService(httpClient, config); + this.setNotification = new SetNotificationService(httpClient, config); + this.setExpirationDate = new SetExpirationDateService(httpClient, config); + this.setLegalityLevel = new SetLegalityLevelService(httpClient, config); + this.envelopeEnvelopeIdAnnotationsDocumentId = + new EnvelopeEnvelopeIdAnnotationsDocumentIdService(httpClient, config); + this.annotations = new AnnotationsService(httpClient, config); + this.annotationId = new AnnotationIdService(httpClient, config); + this.annotation = new AnnotationService(httpClient, config); + this.envelopeId = new EnvelopeIdService(httpClient, config); + this.envelope = new EnvelopeService(httpClient, config); + this.envelopes = new EnvelopesService(httpClient, config); + this.templateTemplateIdDuplicate = new TemplateTemplateIdDuplicateService(httpClient, config); + this.templateTemplateIdDocumentDocumentId = new TemplateTemplateIdDocumentDocumentIdService( + httpClient, + config + ); + this.templateTemplateIdDocument = new TemplateTemplateIdDocumentService(httpClient, config); + this.templateTemplateIdDocuments = new TemplateTemplateIdDocumentsService(httpClient, config); + this.templateTemplateIdSigningSteps = new TemplateTemplateIdSigningStepsService( + httpClient, + config + ); + this.templateTemplateIdRename = new TemplateTemplateIdRenameService(httpClient, config); + this.templateTemplateIdSetComment = new TemplateTemplateIdSetCommentService(httpClient, config); + this.templateTemplateIdSetNotification = new TemplateTemplateIdSetNotificationService( + httpClient, + config + ); + this.templateTemplateIdAnnotationsDocumentId = + new TemplateTemplateIdAnnotationsDocumentIdService(httpClient, config); + this.templateTemplateIdAnnotations = new TemplateTemplateIdAnnotationsService( + httpClient, + config + ); + this.templateTemplateIdAnnotationAnnotationId = + new TemplateTemplateIdAnnotationAnnotationIdService(httpClient, config); + this.templateTemplateIdAnnotation = new TemplateTemplateIdAnnotationService(httpClient, config); + this.templateTemplateIdAttachmentsSettings = new TemplateTemplateIdAttachmentsSettingsService( + httpClient, + config + ); + this.templateTemplateIdAttachmentsPlaceholders = + new TemplateTemplateIdAttachmentsPlaceholdersService(httpClient, config); + this.templateTemplateId = new TemplateTemplateIdService(httpClient, config); + this.template = new TemplateService(httpClient, config); + this.templates = new TemplatesService(httpClient, config); + this.webhookId = new WebhookIdService(httpClient, config); + this.webhook = new WebhookService(httpClient, config); + this.webhooks = new WebhooksService(httpClient, config); } + /** + * Sets the environment for all API requests. + * + * @param environment The environment to use (e.g., DEFAULT, PRODUCTION, STAGING) + */ public void setEnvironment(Environment environment) { setBaseUrl(environment.getUrl()); } + /** + * Sets the base URL for all API requests. + * + * @param baseUrl The base URL to use for API requests + */ public void setBaseUrl(String baseUrl) { this.config.setBaseUrl(baseUrl); } + /** + * Sets the access token (Bearer token) for all API requests. + * + * @param token The access token to use for authentication + */ public void setAccessToken(String token) { this.config.setAccessToken(token); } diff --git a/src/main/java/com/alohi/signplus/config/RequestConfig.java b/src/main/java/com/alohi/signplus/config/RequestConfig.java new file mode 100644 index 0000000..b6b451c --- /dev/null +++ b/src/main/java/com/alohi/signplus/config/RequestConfig.java @@ -0,0 +1,60 @@ +package com.alohi.signplus.config; + +import com.alohi.signplus.http.Environment; +import lombok.Builder; +import lombok.Data; + +/** + * Configuration class for request-level, method-level, and service-level overrides. + * + *

Provides a hierarchical configuration override mechanism with the following priority + * (highest to lowest): + *

    + *
  1. Request config - passed directly to a method call
  2. + *
  3. Method config - set via {@code setConfig()} on a service
  4. + *
  5. Service config - set via {@code setConfig()} on a service
  6. + *
  7. SDK config - set at SDK initialization
  8. + *
+ * + *

All fields are optional (nullable). Only non-null fields will override the corresponding + * SDK-level configuration values. + */ +@Builder +@Data +public class RequestConfig { + + /** Override the base URL for API requests. */ + private String baseUrl; + + /** Override the environment for API requests. */ + private Environment environment; + + /** Override the request timeout in milliseconds. */ + private Long timeout; + + /** Override the access token (Bearer token) for authentication. */ + private String accessToken; + + /** Override the retry configuration. */ + private RetryConfig retryConfig; + + /** + * Merges multiple {@link RequestConfig} instances in order. Later configs take precedence + * over earlier ones for any non-null field. + * + * @param configs The configs to merge (in order of increasing priority) + * @return A new merged {@link RequestConfig} + */ + public static RequestConfig merge(RequestConfig... configs) { + RequestConfigBuilder builder = RequestConfig.builder(); + for (RequestConfig cfg : configs) { + if (cfg == null) continue; + if (cfg.getBaseUrl() != null) builder.baseUrl(cfg.getBaseUrl()); + if (cfg.getEnvironment() != null) builder.environment(cfg.getEnvironment()); + if (cfg.getTimeout() != null) builder.timeout(cfg.getTimeout()); + if (cfg.getAccessToken() != null) builder.accessToken(cfg.getAccessToken()); + if (cfg.getRetryConfig() != null) builder.retryConfig(cfg.getRetryConfig()); + } + return builder.build(); + } +} diff --git a/src/main/java/com/alohi/signplus/config/RetryConfig.java b/src/main/java/com/alohi/signplus/config/RetryConfig.java index 99c602c..a2b139f 100644 --- a/src/main/java/com/alohi/signplus/config/RetryConfig.java +++ b/src/main/java/com/alohi/signplus/config/RetryConfig.java @@ -5,10 +5,16 @@ import java.net.SocketException; import java.net.SocketTimeoutException; import java.util.Arrays; +import java.util.Collections; import java.util.List; import lombok.Builder; import lombok.Data; +/** + * Configuration for automatic retry behavior on failed requests. + * Defines retry limits, backoff strategy, and conditions for retrying requests. + * Uses builder pattern for flexible configuration with sensible defaults. + */ @Data @Builder public class RetryConfig { @@ -29,7 +35,7 @@ public class RetryConfig { private int jitter = 50; @Builder.Default - private List statusCodesToRetry = Arrays.asList(408, 429, 500, 502, 503, 504); + private List statusCodesToRetry = Collections.emptyList(); @Builder.Default private List httpMethodsToRetry = Arrays.asList( diff --git a/src/main/java/com/alohi/signplus/config/SignplusConfig.java b/src/main/java/com/alohi/signplus/config/SignplusConfig.java index 3c0ae4c..e9956b8 100644 --- a/src/main/java/com/alohi/signplus/config/SignplusConfig.java +++ b/src/main/java/com/alohi/signplus/config/SignplusConfig.java @@ -6,13 +6,18 @@ import lombok.NonNull; import lombok.Setter; +/** + * Configuration class for SDK client settings. + * Provides builder pattern for configuring base URLs, authentication, timeouts, and retry behavior. + * All configuration options have sensible defaults and can be customized as needed. + */ @Builder @Data public class SignplusConfig { @NonNull @Builder.Default - private String userAgent = "signplus/1.0.0"; + private String userAgent = "postman-codegen/1.1.2 signplus/3.0.0 (java)"; @Setter private String baseUrl; diff --git a/src/main/java/com/alohi/signplus/http/Environment.java b/src/main/java/com/alohi/signplus/http/Environment.java index 983c71b..a2d8a0b 100644 --- a/src/main/java/com/alohi/signplus/http/Environment.java +++ b/src/main/java/com/alohi/signplus/http/Environment.java @@ -4,18 +4,31 @@ import okhttp3.HttpUrl; /** - * SDK Environments + * Predefined environment configurations for the SDK. + * Each environment represents a different base URL (e.g., production, staging, development). + * URLs are validated at construction time to ensure they are well-formed. */ @Getter public enum Environment { - DEFAULT("https://restapi.sign.plus/v2"); + DEFAULT("https://restapi.sign.plus/v2"), + RESTAPI("https://restapi.sign.plus/v2"); private final String url; + /** + * Creates an environment with the specified base URL. + * Validates that the URL is well-formed before accepting it. + * + * @param url The base URL for this environment + * @throws IllegalArgumentException if the URL is invalid + */ Environment(String url) { if (HttpUrl.parse(url) == null) { throw new IllegalArgumentException( - String.format("Environment url [%s] is not valid. Please use the following format https://api.example.com", url) + String.format( + "Environment url [%s] is not valid. Please use the following format https://api.example.com", + url + ) ); } this.url = url; diff --git a/src/main/java/com/alohi/signplus/http/HttpMethod.java b/src/main/java/com/alohi/signplus/http/HttpMethod.java index 1cc6f4c..134e29c 100644 --- a/src/main/java/com/alohi/signplus/http/HttpMethod.java +++ b/src/main/java/com/alohi/signplus/http/HttpMethod.java @@ -3,21 +3,39 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; +/** + * Enum representing HTTP methods (verbs) used in API requests. + * Provides utility methods for determining method characteristics. + */ @Getter @RequiredArgsConstructor public enum HttpMethod { + /** HTTP GET method for retrieving resources */ GET("GET"), + /** HTTP POST method for creating resources */ POST("POST"), + /** HTTP PUT method for updating/replacing resources */ PUT("PUT"), + /** HTTP PATCH method for partially updating resources */ PATCH("PATCH"), + /** HTTP DELETE method for removing resources */ DELETE("DELETE"), + /** HTTP HEAD method for retrieving headers only */ HEAD("HEAD"), + /** HTTP OPTIONS method for describing communication options */ OPTIONS("OPTIONS"), + /** HTTP TRACE method for diagnostic purposes */ TRACE("TRACE"), + /** HTTP CONNECT method for establishing tunnels */ CONNECT("CONNECT"); private final String method; + /** + * Determines if this HTTP method requires a request body. + * + * @return true if POST, PUT, or PATCH; false otherwise + */ public boolean requiresRequestBody() { return method.equals("POST") || method.equals("PUT") || method.equals("PATCH"); } diff --git a/src/main/java/com/alohi/signplus/http/ModelConverter.java b/src/main/java/com/alohi/signplus/http/ModelConverter.java index 4cc126f..9474b88 100644 --- a/src/main/java/com/alohi/signplus/http/ModelConverter.java +++ b/src/main/java/com/alohi/signplus/http/ModelConverter.java @@ -1,16 +1,29 @@ package com.alohi.signplus.http; +import com.alohi.signplus.http.util.ContentTypes; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.exc.MismatchedInputException; +import java.lang.reflect.Method; +import java.nio.charset.StandardCharsets; +import java.util.logging.Level; +import java.util.logging.Logger; +import okhttp3.MediaType; import okhttp3.Response; import okhttp3.ResponseBody; import org.openapitools.jackson.nullable.JsonNullableModule; +/** + * Utility class for converting between JSON and Java models. + * Uses Jackson ObjectMapper with preconfigured settings for SDK serialization/deserialization. + * Handles responses as Class types or TypeReferences with proper error logging. + */ public final class ModelConverter { + private static final Logger logger = Logger.getLogger(ModelConverter.class.getName()); private static final ObjectMapper mapper = new ObjectMapper(); static { @@ -27,39 +40,106 @@ public final class ModelConverter { private ModelConverter() {} + /** + * Converts an HTTP response body to a Java object of the specified class. + * + * @param The type of the model class + * @param response The HTTP response to convert + * @param clazz The target class to deserialize into + * @return The deserialized object, or null if conversion fails + */ public static T convert(final Response response, final Class clazz) { - final ResponseBody body = response.body(); try { - return mapper.readValue(body.string(), clazz); + return convert(response.body().bytes(), clazz); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to read response body: " + e.getMessage(), e); + return null; + } + } + + /** + * Converts raw byte array to a Java object of the specified class. + * + * @param The type of the model class + * @param bodyBytes The response body as bytes + * @param clazz The target class to deserialize into + * @return The deserialized object, or null if conversion fails or body is empty + */ + public static T convert(final byte[] bodyBytes, final Class clazz) { + try { + if (bodyBytes == null || bodyBytes.length == 0) { + logger.log(Level.FINE, "Received empty response body, returning null"); + return null; + } + + return mapper.readValue(bodyBytes, clazz); + } catch (Exception e) { + logger.log(Level.SEVERE, "Failed to read response body: " + e.getMessage(), e); return null; } } public static T convert(final String response, final Class clazz) { try { + // Handle empty responses + if (response == null || response.trim().isEmpty()) { + logger.log(Level.FINE, "Received empty response string, returning null"); + return null; + } return mapper.readValue(response, clazz); + } catch (MismatchedInputException e) { + logger.log( + Level.SEVERE, + "Failed to parse response - invalid or malformed JSON: " + e.getMessage(), + e + ); + return null; } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Unexpected error parsing response: " + e.getMessage(), e); return null; } } public static T convert(Response response, TypeReference typeReference) { try { - return convert(response.body().string(), typeReference); + return convert(response.body().bytes(), typeReference); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to read response body: " + e.getMessage(), e); + return null; + } + } + + public static T convert(byte[] bodyBytes, TypeReference typeReference) { + try { + if (bodyBytes == null || bodyBytes.length == 0) { + logger.log(Level.FINE, "Received empty response body, returning null"); + return null; + } + + return mapper.readValue(bodyBytes, typeReference); + } catch (Exception e) { + logger.log(Level.SEVERE, "Failed to read response body: " + e.getMessage(), e); return null; } } public static T convert(String response, TypeReference typeReference) { try { + // Handle empty responses + if (response == null || response.trim().isEmpty()) { + logger.log(Level.FINE, "Received empty response string, returning null"); + return null; + } return mapper.readValue(response, typeReference); + } catch (MismatchedInputException e) { + logger.log( + Level.SEVERE, + "Failed to parse response - invalid or malformed JSON: " + e.getMessage(), + e + ); + return null; } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Unexpected error parsing response: " + e.getMessage(), e); return null; } } @@ -68,7 +148,7 @@ public static String readString(Response response) { try { return response.body().string(); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to read response body as string: " + e.getMessage(), e); return null; } } @@ -77,17 +157,96 @@ public static byte[] readBytes(Response response) { try { return response.body().bytes(); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to read response body as bytes: " + e.getMessage(), e); return null; } } + public static String toBodyString(byte[] bodyBytes) { + try { + return new String(bodyBytes, StandardCharsets.UTF_8); + } catch (Exception e) { + logger.log(Level.SEVERE, "Failed to convert body bytes to string: " + e.getMessage(), e); + return ""; + } + } + + /** + * Serializes a Java model object to JSON string. + * + * @param model The model object to serialize + * @return The JSON string representation, or null if serialization fails + */ public static String modelToJson(final Object model) { try { return mapper.writeValueAsString(model); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to serialize model to JSON: " + e.getMessage(), e); return null; } } + + /** + * Converts response body bytes to a OneOf type by determining the appropriate factory method + * based on the content type and using reflection to invoke it. + * + * @param The type of the OneOf model class + * @param bodyBytes The response body as bytes + * @param typeReference The target TypeReference to deserialize into + * @param contentType The content type of the response + * @return The deserialized object, or null if conversion fails + */ + public static T convertOneOf( + final byte[] bodyBytes, + final TypeReference typeReference, + final MediaType contentType + ) { + try { + String methodName; + Class parameterType; + Object data; + + if (ContentTypes.isTextual(contentType)) { + methodName = "ofString"; + parameterType = String.class; + data = toBodyString(bodyBytes); + } else if (ContentTypes.isBinary(contentType)) { + methodName = "ofBinary"; + parameterType = byte[].class; + data = bodyBytes; + } else { + return convert(bodyBytes, typeReference); + } + + Class clazz = (Class) typeReference.getType(); + + Method method = clazz.getDeclaredMethod(methodName, parameterType); + method.setAccessible(true); + + return (T) method.invoke(null, data); + } catch (Exception e) { + logger.log(Level.SEVERE, "Failed to convert OneOf response: " + e.getMessage(), e); + return null; + } + } + + /** + * Converts response body string to a OneOf type by determining the appropriate factory method + * based on the content type and using reflection to invoke it. + * + * @param The type of the OneOf model class + * @param body The response body as string + * @param typeReference The target TypeReference to deserialize into + * @param contentType The content type of the response + * @return The deserialized object, or null if conversion fails + */ + public static T convertOneOf( + final String body, + final TypeReference typeReference, + final MediaType contentType + ) { + byte[] bodyBytes = body.getBytes(StandardCharsets.UTF_8); + + return convertOneOf(bodyBytes, typeReference, contentType); + } } diff --git a/src/main/java/com/alohi/signplus/http/interceptors/DefaultHeadersInterceptor.java b/src/main/java/com/alohi/signplus/http/interceptors/DefaultHeadersInterceptor.java index 17b66f8..ab9cc19 100644 --- a/src/main/java/com/alohi/signplus/http/interceptors/DefaultHeadersInterceptor.java +++ b/src/main/java/com/alohi/signplus/http/interceptors/DefaultHeadersInterceptor.java @@ -9,19 +9,41 @@ import okhttp3.Request.Builder; import okhttp3.Response; +/** + * OkHttp interceptor that adds default headers to all requests. + * Currently adds the User-Agent header based on SDK configuration. + */ public class DefaultHeadersInterceptor implements Interceptor { private final Map defaultHeaders = new HashMap<>(); + /** + * Constructs a new DefaultHeadersInterceptor. + * + * @param config The SDK configuration containing default header values + */ public DefaultHeadersInterceptor(SignplusConfig config) { defaultHeaders.put("User-Agent", config.getUserAgent()); } + /** + * Intercepts a request to add default headers before proceeding. + * + * @param chain The OkHttp interceptor chain + * @return The HTTP response + * @throws IOException if an I/O error occurs during request execution + */ @Override public Response intercept(Chain chain) throws IOException { return chain.proceed(addDefaultHeadersToRequest(chain.request())); } + /** + * Adds default headers to a request. + * + * @param request The HTTP request to modify + * @return The modified request with default headers added + */ private Request addDefaultHeadersToRequest(Request request) { if (defaultHeaders.isEmpty()) { return request; diff --git a/src/main/java/com/alohi/signplus/http/interceptors/RetryInterceptor.java b/src/main/java/com/alohi/signplus/http/interceptors/RetryInterceptor.java index 9cf3c8b..bef865e 100644 --- a/src/main/java/com/alohi/signplus/http/interceptors/RetryInterceptor.java +++ b/src/main/java/com/alohi/signplus/http/interceptors/RetryInterceptor.java @@ -8,11 +8,23 @@ import okhttp3.Request; import okhttp3.Response; +/** + * OkHttp interceptor that automatically retries failed HTTP requests. + * Supports configurable retry attempts, backoff delays, and specific status codes or exceptions to retry. + */ @AllArgsConstructor public class RetryInterceptor implements Interceptor { private RetryConfig config; + /** + * Intercepts an HTTP request and retries it according to the configured retry policy. + * Implements exponential backoff between retry attempts. + * + * @param chain The OkHttp interceptor chain + * @return The HTTP response from a successful attempt + * @throws IOException if all retry attempts fail or a non-retryable exception occurs + */ @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); @@ -31,7 +43,10 @@ public Response intercept(Chain chain) throws IOException { } tryCount++; } catch (IOException e) { - if (!config.getExceptionsToRetry().contains(e.getClass()) || tryCount == config.getMaxRetries()) { + if ( + !config.getExceptionsToRetry().contains(e.getClass()) || + tryCount == config.getMaxRetries() + ) { throw e; } } @@ -48,13 +63,31 @@ public Response intercept(Chain chain) throws IOException { return response; } + /** + * Calculates the delay before the next retry attempt using exponential backoff. + * + * @param tryCount The current retry attempt number (1-indexed) + * @return The delay in milliseconds, capped at the configured maximum delay + */ private int calculateDelay(int tryCount) { - final int delay = (int) (config.getInitialDelay() * Math.pow(config.getBackoffFactor(), tryCount - 1)); + final int delay = (int) (config.getInitialDelay() * + Math.pow(config.getBackoffFactor(), tryCount - 1)); return Math.min(delay, config.getMaxDelay()); } + /** + * Determines if a response should be retried based on status code and HTTP method. + * By default, retries all 5xx server errors and specific 4xx client errors (408 Timeout, 429 Rate Limit). + * + * @param response The HTTP response to check + * @return true if the response should be retried, false otherwise + */ private boolean isRetryable(Response response) { - final boolean isRetryableStatusCode = config.getStatusCodesToRetry().contains(response.code()); + final int statusCode = response.code(); + final boolean isRetryableStatusCode = !config.getStatusCodesToRetry().isEmpty() + ? config.getStatusCodesToRetry().contains(statusCode) + : statusCode >= 500 || statusCode == 408 || statusCode == 429; + final boolean isRetryableMethod = config .getHttpMethodsToRetry() .stream() diff --git a/src/main/java/com/alohi/signplus/http/serialization/PathSerializationStyle.java b/src/main/java/com/alohi/signplus/http/serialization/PathSerializationStyle.java index 82ca9a9..2120022 100644 --- a/src/main/java/com/alohi/signplus/http/serialization/PathSerializationStyle.java +++ b/src/main/java/com/alohi/signplus/http/serialization/PathSerializationStyle.java @@ -1,10 +1,18 @@ package com.alohi.signplus.http.serialization; +/** + * Serialization styles supported for path parameters in OpenAPI specifications. + * Defines how values are encoded when embedded in URL paths. + */ public enum PathSerializationStyle { + /** Simple style - comma-separated values (default for path parameters) */ SIMPLE(SerializationStyle.SIMPLE), + /** Label style - dot-prefixed values (.value or .id.name) */ LABEL(SerializationStyle.LABEL), + /** Matrix style - semicolon-prefixed key-value pairs (;key=value) */ MATRIX(SerializationStyle.MATRIX); + /** The underlying serialization style */ public final SerializationStyle style; PathSerializationStyle(SerializationStyle style) { diff --git a/src/main/java/com/alohi/signplus/http/serialization/QuerySerializationStyle.java b/src/main/java/com/alohi/signplus/http/serialization/QuerySerializationStyle.java index 4b58850..0401034 100644 --- a/src/main/java/com/alohi/signplus/http/serialization/QuerySerializationStyle.java +++ b/src/main/java/com/alohi/signplus/http/serialization/QuerySerializationStyle.java @@ -1,11 +1,20 @@ package com.alohi.signplus.http.serialization; +/** + * Serialization styles supported for query parameters in OpenAPI specifications. + * Defines how values are encoded as URL query strings. + */ public enum QuerySerializationStyle { + /** Form style - ampersand-separated key-value pairs (default for query parameters) */ FORM(SerializationStyle.FORM), + /** Space-delimited style - values separated by spaces (encoded as %20) */ SPACE_DELIMITED(SerializationStyle.SPACE_DELIMITED), + /** Pipe-delimited style - values separated by pipe characters (|) */ PIPE_DELIMITED(SerializationStyle.PIPE_DELIMITED), + /** Deep object style - nested objects with bracket notation (obj[field]=value) */ DEEP_OBJECT(SerializationStyle.DEEP_OBJECT); + /** The underlying serialization style */ public final SerializationStyle style; QuerySerializationStyle(SerializationStyle style) { diff --git a/src/main/java/com/alohi/signplus/http/serialization/SerializationStyle.java b/src/main/java/com/alohi/signplus/http/serialization/SerializationStyle.java index 8ae3e00..db39a31 100644 --- a/src/main/java/com/alohi/signplus/http/serialization/SerializationStyle.java +++ b/src/main/java/com/alohi/signplus/http/serialization/SerializationStyle.java @@ -1,11 +1,22 @@ package com.alohi.signplus.http.serialization; +/** + * Enum representing OpenAPI parameter serialization styles. + * Defines how parameters are formatted for different parts of HTTP requests. + */ public enum SerializationStyle { + /** Simple style - comma-separated values (default for path/header parameters) */ SIMPLE, + /** Label style - dot-prefixed values for path parameters (.value or .id.name) */ LABEL, + /** Matrix style - semicolon-prefixed key-value pairs for path parameters (;key=value) */ MATRIX, + /** Form style - ampersand-separated key-value pairs (default for query parameters) */ FORM, + /** Space-delimited style - space-separated values for query parameters */ SPACE_DELIMITED, + /** Pipe-delimited style - pipe-separated values for query parameters */ PIPE_DELIMITED, + /** Deep object style - nested objects with bracket notation (id[key]=value) */ DEEP_OBJECT, } diff --git a/src/main/java/com/alohi/signplus/http/serialization/Serializer.java b/src/main/java/com/alohi/signplus/http/serialization/Serializer.java index 2f13436..4ee6d83 100644 --- a/src/main/java/com/alohi/signplus/http/serialization/Serializer.java +++ b/src/main/java/com/alohi/signplus/http/serialization/Serializer.java @@ -4,21 +4,50 @@ import java.util.Map; import java.util.stream.Collectors; +/** + * Utility class for serializing parameters according to OpenAPI serialization styles. + * Supports simple, label, matrix, form, pipe-delimited, space-delimited, and deep object styles. + * Handles primitives, strings, lists, and complex objects with proper encoding. + */ public class Serializer { + /** + * Serializes a long value to a string with the specified style and encoding. + * + * @param key The parameter name + * @param value The long value to serialize + * @param style The serialization style to use + * @param encode Whether to URL-encode the value + * @return The serialized parameter string + */ public static String serialize(String key, long value, SerializationStyle style, boolean encode) { return serialize(key, String.valueOf(value), style, encode); } - public static String serialize(String key, double value, SerializationStyle style, boolean encode) { + public static String serialize( + String key, + double value, + SerializationStyle style, + boolean encode + ) { return serialize(key, String.valueOf(value), style, encode); } - public static String serialize(String key, boolean value, SerializationStyle style, boolean encode) { + public static String serialize( + String key, + boolean value, + SerializationStyle style, + boolean encode + ) { return serialize(key, String.valueOf(value), style, encode); } - public static String serialize(String key, String value, SerializationStyle style, boolean encode) { + public static String serialize( + String key, + String value, + SerializationStyle style, + boolean encode + ) { if (value == null) { value = "null"; } @@ -35,7 +64,24 @@ public static String serialize(String key, String value, SerializationStyle styl } } - public static String serialize(String key, Object value, SerializationStyle style, boolean explode, boolean encode) { + /** + * Serializes any object value according to the specified serialization style. + * Handles primitives, strings, lists, and complex objects with proper OpenAPI serialization. + * + * @param key The parameter name + * @param value The value to serialize (can be primitive, String, List, or object) + * @param style The serialization style to use (SIMPLE, LABEL, MATRIX, FORM, etc.) + * @param explode Whether to use exploded form for arrays/objects + * @param encode Whether to URL-encode values + * @return The serialized parameter string + */ + public static String serialize( + String key, + Object value, + SerializationStyle style, + boolean explode, + boolean encode + ) { if (value == null) { return serialize(key, "null", style, encode); } @@ -77,7 +123,10 @@ private static String serializeList( return ""; } - List serializedValues = value.stream().map(v -> serializeValue(v, encode)).collect(Collectors.toList()); + List serializedValues = value + .stream() + .map(v -> serializeValue(v, encode)) + .collect(Collectors.toList()); switch (style) { case SIMPLE: return String.join(",", serializedValues); @@ -87,7 +136,10 @@ private static String serializeList( return String.format(".%s", String.join(separator, serializedValues)); case MATRIX: return explode - ? serializedValues.stream().map(v -> String.format(";%s=%s", key, v)).collect(Collectors.joining("")) + ? serializedValues + .stream() + .map(v -> String.format(";%s=%s", key, v)) + .collect(Collectors.joining("")) : String.format(";%s=", key) + String.join(",", serializedValues); } @@ -185,7 +237,22 @@ private static String serializeObject( } } - public static String serializeDeepObject(String key, Object value, boolean topLevel, boolean encode) { + /** + * Serializes an object using deep object style (e.g., id[key]=value&id[key][deepKey]=deepValue). + * Recursively handles nested objects with bracket notation. + * + * @param key The parameter name + * @param value The value to serialize + * @param topLevel Whether this is the top-level call (affects bracket notation) + * @param encode Whether to URL-encode values + * @return The serialized deep object string + */ + public static String serializeDeepObject( + String key, + Object value, + boolean topLevel, + boolean encode + ) { if (!Util.isObject(value)) { return String.format("[%s]=%s", key, serializeValue(value, encode)); } diff --git a/src/main/java/com/alohi/signplus/http/serialization/Util.java b/src/main/java/com/alohi/signplus/http/serialization/Util.java index da7d8b2..b29eff0 100644 --- a/src/main/java/com/alohi/signplus/http/serialization/Util.java +++ b/src/main/java/com/alohi/signplus/http/serialization/Util.java @@ -12,6 +12,10 @@ import lombok.SneakyThrows; import org.openapitools.jackson.nullable.JsonNullableModule; +/** + * Utility class for serialization helper methods. + * Provides functions for type checking, URL encoding, and property extraction. + */ public class Util { private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); @@ -21,8 +25,18 @@ public class Util { OBJECT_MAPPER.registerModule(new JsonNullableModule()); } + /** + * Extracts properties from an object using JSON property names. + * Uses Jackson annotations to determine the correct property names. + * + * @param value The object to extract properties from + * @return A map of JSON property names to their values + */ public static Map getPropertiesWithJsonPropertyNames(Object value) { - Map properties = OBJECT_MAPPER.convertValue(value, new TypeReference>() {}); + Map properties = OBJECT_MAPPER.convertValue( + value, + new TypeReference>() {} + ); // Use the json property name if it exists, otherwise use the regular property name return properties @@ -43,11 +57,23 @@ public static Map getPropertiesWithJsonPropertyNames(Object valu ); } + /** + * URL-encodes a string value using UTF-8 encoding. + * + * @param value The string to encode + * @return The URL-encoded string + */ @SneakyThrows public static String urlEncode(String value) { return URLEncoder.encode(value, StandardCharsets.UTF_8.toString()); } + /** + * Checks if a value is a primitive type (number, boolean, string, or character). + * + * @param value The value to check + * @return true if the value is a primitive type, false otherwise + */ public static boolean isPrimitive(Object value) { return ( value instanceof Long || @@ -60,6 +86,12 @@ public static boolean isPrimitive(Object value) { ); } + /** + * Checks if a value is a complex object (not primitive and not iterable). + * + * @param value The value to check + * @return true if the value is a complex object, false otherwise + */ public static boolean isObject(Object value) { return !isPrimitive(value) && !(value instanceof Iterable); } diff --git a/src/main/java/com/alohi/signplus/http/util/ContentTypes.java b/src/main/java/com/alohi/signplus/http/util/ContentTypes.java new file mode 100644 index 0000000..8bba0f9 --- /dev/null +++ b/src/main/java/com/alohi/signplus/http/util/ContentTypes.java @@ -0,0 +1,85 @@ +package com.alohi.signplus.http.util; + +import okhttp3.MediaType; +import okhttp3.Response; + +public class ContentTypes { + + private static final MediaType FALLBACK_CONTENT_TYPE = MediaType.parse("application/json"); + + /** + * Determines if the given MediaType is textual. + * In this case, JSON is not considered textual. + * @param contentType The MediaType to check + * @return true if the content type is textual, false otherwise + */ + public static boolean isTextual(MediaType contentType) { + if (contentType == null) { + return false; + } + + String type = contentType.type(); + String subtype = contentType.subtype(); + + if ("text".equals(type)) { + return true; + } + + if ("application".equals(type) && (subtype.equals("xml") || subtype.endsWith("+xml"))) { + return true; + } + + if ("image".equals(type) && "svg+xml".equals(subtype)) { + return true; + } + + if ("application".equals(type) && "javascript".equals(subtype)) { + return true; + } + + return false; + } + + /** + * Determines if the given MediaType is binary. + * Binary types include: application/octet-stream, PDFs, images (except svg+xml), and wildcard + * + * @param contentType The MediaType to check + * @return true if the content type is binary, false otherwise + */ + public static boolean isBinary(MediaType contentType) { + if (contentType == null) { + return false; + } + + String type = contentType.type(); + String subtype = contentType.subtype(); + + // wildcard + if ("*".equals(type) && "*".equals(subtype)) { + return true; + } + + if ("application".equals(type) && "octet-stream".equals(subtype)) { + return true; + } + + if ("application".equals(type) && "pdf".equals(subtype)) { + return true; + } + + if ("image".equals(type) && !"svg+xml".equals(subtype)) { + return true; + } + + return false; + } + + public static MediaType readContentType(Response response) { + if (response.body() != null && response.body().contentType() != null) { + return response.body().contentType(); + } + + return FALLBACK_CONTENT_TYPE; + } +} diff --git a/src/main/java/com/alohi/signplus/http/util/HttpArgumentConverter.java b/src/main/java/com/alohi/signplus/http/util/HttpArgumentConverter.java index bc88221..f44ce82 100644 --- a/src/main/java/com/alohi/signplus/http/util/HttpArgumentConverter.java +++ b/src/main/java/com/alohi/signplus/http/util/HttpArgumentConverter.java @@ -21,12 +21,20 @@ public static String toStringArgument(final Object value) { if (value == null) { return ""; } - if (value instanceof String || value instanceof Number || value instanceof Boolean || value instanceof Enum) { + if ( + value instanceof String || + value instanceof Number || + value instanceof Boolean || + value instanceof Enum + ) { return String.valueOf(value); } if (value instanceof List) { List list = (List) value; - return list.stream().map(HttpArgumentConverter::toStringArgument).collect(Collectors.joining(",")); + return list + .stream() + .map(HttpArgumentConverter::toStringArgument) + .collect(Collectors.joining(",")); } return modelToJson(value); diff --git a/src/main/java/com/alohi/signplus/http/util/RequestBuilder.java b/src/main/java/com/alohi/signplus/http/util/RequestBuilder.java index 5027ea6..656044f 100644 --- a/src/main/java/com/alohi/signplus/http/util/RequestBuilder.java +++ b/src/main/java/com/alohi/signplus/http/util/RequestBuilder.java @@ -6,7 +6,12 @@ import com.alohi.signplus.http.serialization.QuerySerializationStyle; import com.alohi.signplus.http.serialization.SerializationStyle; import com.alohi.signplus.http.serialization.Serializer; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; import lombok.NonNull; import okhttp3.HttpUrl; import okhttp3.MediaType; @@ -14,6 +19,11 @@ import okhttp3.RequestBody; import org.jetbrains.annotations.NotNull; +/** + * Fluent builder for constructing OkHttp Request objects with SDK-specific features. + * Handles path/query parameter serialization, header management, authentication, + * and request body construction according to OpenAPI serialization styles. + */ public class RequestBuilder { @NonNull @@ -31,6 +41,8 @@ public class RequestBuilder { private final HashMap headers = new HashMap<>(); + private final List cookies = new ArrayList<>(); + private RequestBody body; /** @@ -39,21 +51,37 @@ public class RequestBuilder { * @param path The path template to use for the request. Should have path parameters as * placeholders surrounded by brackets (Eg. "/users/{id}", where "id" is a path parameter). */ - public RequestBuilder(@NotNull HttpMethod httpMethod, @NotNull String baseUrl, @NotNull String path) { + public RequestBuilder( + @NotNull HttpMethod httpMethod, + @NotNull String baseUrl, + @NotNull String path + ) { this.httpMethod = httpMethod; this.baseUrl = baseUrl; this.path = path; } /** - * Sets a path parameter. If the parameter is not present in the URL template, it will be ignored. + * Sets a path parameter using the default SIMPLE serialization style. + * If the parameter is not present in the URL template, it will be ignored. + * + * @param key The path parameter name + * @param value The parameter value + * @return This builder instance for chaining */ public RequestBuilder setPathParameter(@NonNull String key, @NonNull Object value) { return setPathParameter(key, value, PathSerializationStyle.SIMPLE, false); } /** - * Sets a path parameter. If the parameter is not present in the URL template, it will be ignored. + * Sets a path parameter with custom serialization style and explode option. + * If the parameter is not present in the URL template, it will be ignored. + * + * @param key The path parameter name + * @param value The parameter value + * @param style The serialization style to use + * @param explode Whether to explode arrays/objects into separate values + * @return This builder instance for chaining */ public RequestBuilder setPathParameter( @NonNull String key, @@ -67,14 +95,24 @@ public RequestBuilder setPathParameter( } /** - * Sets a query parameter. + * Sets a query parameter using the default FORM serialization style with explode enabled. + * + * @param key The query parameter name + * @param value The parameter value + * @return This builder instance for chaining */ public RequestBuilder setQueryParameter(@NonNull String key, @NonNull Object value) { return setQueryParameter(key, value, QuerySerializationStyle.FORM, true); } /** - * Sets a query parameter. + * Sets a query parameter with custom serialization style and explode option. + * + * @param key The query parameter name + * @param value The parameter value + * @param style The serialization style to use + * @param explode Whether to explode arrays/objects into separate parameters + * @return This builder instance for chaining */ public RequestBuilder setQueryParameter( @NonNull String key, @@ -87,12 +125,25 @@ public RequestBuilder setQueryParameter( return this; } + /** + * Sets a query parameter using the default FORM style if the value is not null. + * + * @param key The query parameter name + * @param value The parameter value (ignored if null) + * @return This builder instance for chaining + */ public RequestBuilder setOptionalQueryParameter(@NonNull String key, Object value) { return setOptionalQueryParameter(key, value, QuerySerializationStyle.FORM, true); } /** - * Sets a query parameter if the value is not null. + * Sets a query parameter with custom serialization if the value is not null. + * + * @param key The query parameter name + * @param value The parameter value (ignored if null) + * @param style The serialization style to use + * @param explode Whether to explode arrays/objects into separate parameters + * @return This builder instance for chaining */ public RequestBuilder setOptionalQueryParameter( @NonNull String key, @@ -107,30 +158,54 @@ public RequestBuilder setOptionalQueryParameter( } /** - * Sets a header. + * Sets a header using SIMPLE serialization style without explode. + * + * @param key The header name + * @param value The header value + * @return This builder instance for chaining */ public RequestBuilder setHeader(@NonNull String key, @NonNull Object value) { return setHeader(key, value, false); } /** - * Sets a header. + * Sets a header using SIMPLE serialization style with custom explode option. + * + * @param key The header name + * @param value The header value + * @param explode Whether to explode arrays/objects + * @return This builder instance for chaining */ public RequestBuilder setHeader(@NonNull String key, @NonNull Object value, boolean explode) { - String serializedValue = Serializer.serialize(key, value, SerializationStyle.SIMPLE, explode, false); + String serializedValue = Serializer.serialize( + key, + value, + SerializationStyle.SIMPLE, + explode, + false + ); headers.put(key, serializedValue); return this; } /** - * Sets a header if the value is not null. + * Sets a header if the value is not null, using SIMPLE style without explode. + * + * @param key The header name + * @param value The header value (ignored if null) + * @return This builder instance for chaining */ public RequestBuilder setOptionalHeader(@NonNull String key, Object value) { return setOptionalHeader(key, value, false); } /** - * Sets a header if the value is not null. + * Sets a header if the value is not null, with custom explode option. + * + * @param key The header name + * @param value The header value (ignored if null) + * @param explode Whether to explode arrays/objects + * @return This builder instance for chaining */ public RequestBuilder setOptionalHeader(@NonNull String key, Object value, boolean explode) { if (value != null) { @@ -140,7 +215,73 @@ public RequestBuilder setOptionalHeader(@NonNull String key, Object value, boole } /** - * Sets the body of the request. + * Adds a cookie parameter using FORM serialization style with explode enabled. + * Multiple cookies are combined into a single Cookie header at build time. + * + * @param key The cookie name + * @param value The cookie value + * @return This builder instance for chaining + */ + public RequestBuilder setCookie(@NonNull String key, @NonNull Object value) { + return setCookie(key, value, true); + } + + /** + * Adds a cookie parameter using FORM serialization style with custom explode option. + * Multiple cookies are combined into a single Cookie header at build time. + * + * @param key The cookie name + * @param value The cookie value + * @param explode Whether to explode arrays/objects + * @return This builder instance for chaining + */ + public RequestBuilder setCookie(@NonNull String key, @NonNull Object value, boolean explode) { + String serializedValue = Serializer.serialize( + key, + value, + SerializationStyle.FORM, + explode, + false + ); + if (explode && serializedValue.contains("&")) { + Collections.addAll(cookies, serializedValue.split("&")); + } else { + cookies.add(serializedValue); + } + return this; + } + + /** + * Adds a cookie parameter if the value is not null, using FORM style with explode enabled. + * + * @param key The cookie name + * @param value The cookie value (ignored if null) + * @return This builder instance for chaining + */ + public RequestBuilder setOptionalCookie(@NonNull String key, Object value) { + return setOptionalCookie(key, value, true); + } + + /** + * Adds a cookie parameter if the value is not null, with custom explode option. + * + * @param key The cookie name + * @param value The cookie value (ignored if null) + * @param explode Whether to explode arrays/objects + * @return This builder instance for chaining + */ + public RequestBuilder setOptionalCookie(@NonNull String key, Object value, boolean explode) { + if (value != null) { + return setCookie(key, value, explode); + } + return this; + } + + /** + * Sets the raw request body. + * + * @param body The request body + * @return This builder instance for chaining */ public RequestBuilder setBody(RequestBody body) { this.body = body; @@ -148,25 +289,37 @@ public RequestBuilder setBody(RequestBody body) { } /** - * Sets the content of the request as JSON. + * Sets the request body as JSON using the default application/json media type. + * + * @param content The object to serialize as JSON + * @return This builder instance for chaining */ public RequestBuilder setJsonContent(Object content) { return setJsonContent(content, MediaType.parse("application/json; charset=utf-8")); } /** - * Sets the content of the request as JSON. + * Sets the request body as JSON with a custom media type. + * + * @param content The object to serialize as JSON + * @param mediaType The media type to use + * @return This builder instance for chaining */ public RequestBuilder setJsonContent(Object content, MediaType mediaType) { if (content == null) { return this; } - setBody(RequestBody.create(Objects.requireNonNull(ModelConverter.modelToJson(content)), mediaType)); + setBody( + RequestBody.create(Objects.requireNonNull(ModelConverter.modelToJson(content)), mediaType) + ); return this; } - /* + /** * Sets the access token authentication header with a "Bearer" prefix. + * + * @param token The access token + * @return This builder instance for chaining */ public RequestBuilder setAccessTokenAuth(String token) { if (token == null) { @@ -175,8 +328,12 @@ public RequestBuilder setAccessTokenAuth(String token) { return setAccessTokenAuth(token, "Bearer"); } - /* + /** * Sets the access token authentication header with a custom prefix. + * + * @param token The access token + * @param prefix The authorization prefix (e.g., "Bearer", "Token") + * @return This builder instance for chaining */ public RequestBuilder setAccessTokenAuth(String token, String prefix) { if (token == null || prefix == null) { @@ -186,7 +343,10 @@ public RequestBuilder setAccessTokenAuth(String token, String prefix) { } /** - * @return The {@code Request} instance. + * Builds and returns the configured OkHttp Request instance. + * Applies all path parameters, query parameters, headers, and body to create the final request. + * + * @return The configured Request instance ready to execute */ public Request build() { String url = buildUrl(); @@ -196,6 +356,10 @@ public Request build() { requestBuilder.addHeader(entry.getKey(), entry.getValue()); } + if (!cookies.isEmpty()) { + requestBuilder.addHeader("Cookie", String.join("; ", cookies)); + } + if (httpMethod.requiresRequestBody() && this.body == null) { this.body = RequestBody.create(new byte[0]); } @@ -205,6 +369,11 @@ public Request build() { return requestBuilder.build(); } + /** + * Constructs the full URL by combining base URL, path, path parameters, and query parameters. + * + * @return The complete URL string + */ private String buildUrl() { String path = this.path; @@ -214,7 +383,11 @@ private String buildUrl() { path = path.replace("{" + key + "}", value); } - String url = Objects.requireNonNull(HttpUrl.parse(baseUrl)).newBuilder().addPathSegments(path).build().toString(); + String url = Objects.requireNonNull(HttpUrl.parse(baseUrl)) + .newBuilder() + .addPathSegments(path) + .build() + .toString(); if (!queryParameters.isEmpty()) { url += "?" + String.join("&", queryParameters); diff --git a/src/main/java/com/alohi/signplus/json/TypeUtils.java b/src/main/java/com/alohi/signplus/json/TypeUtils.java index 86b31a8..1871304 100644 --- a/src/main/java/com/alohi/signplus/json/TypeUtils.java +++ b/src/main/java/com/alohi/signplus/json/TypeUtils.java @@ -5,8 +5,18 @@ import java.util.ArrayList; import java.util.List; +/** + * Utility methods for type handling and reflection operations in JSON serialization. + * Provides helpers for extracting JSON property names and creating generic lists. + */ public class TypeUtils { + /** + * Extracts the JSON property name from a field, using the @JsonProperty annotation if present. + * + * @param type The field to extract the name from + * @return The JSON property name (from annotation) or the field name + */ public static String getJsonPropertyName(Field type) { JsonProperty annotation = type.getAnnotation(JsonProperty.class); if (annotation != null) { @@ -15,6 +25,15 @@ public static String getJsonPropertyName(Field type) { return type.getName(); } + /** + * Creates a generic list with type safety from an array of objects. + * Used for deserializing JSON arrays to strongly-typed Java lists. + * + * @param The element type of the list + * @param type The class of the element type + * @param params The objects to add to the list + * @return A typed list containing the provided elements + */ public static List createGenericList(Class type, Object... params) { List list = new ArrayList<>(); for (Object param : params) { diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationParameters.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationParameters.java new file mode 100644 index 0000000..0794ca9 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeAnnotationParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private AddEnvelopeAnnotationRequest requestBody; + + // Overwrite lombok builder methods + public static class AddEnvelopeAnnotationParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public AddEnvelopeAnnotationParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public AddEnvelopeAnnotationParametersBuilder requestBody( + AddEnvelopeAnnotationRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public AddEnvelopeAnnotationParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new AddEnvelopeAnnotationParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequest.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequest.java new file mode 100644 index 0000000..da6fef0 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequest.java @@ -0,0 +1,257 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeAnnotationRequest { + + @JsonProperty("document_id") + private JsonNullable documentId; + + @JsonProperty("page") + private JsonNullable page; + + @JsonProperty("x") + private JsonNullable x; + + @JsonProperty("y") + private JsonNullable y; + + @JsonProperty("width") + private JsonNullable width; + + @JsonProperty("height") + private JsonNullable height; + + @JsonProperty("type") + private JsonNullable type; + + @JsonProperty("recipient_id") + private JsonNullable recipientId; + + @JsonProperty("required") + private JsonNullable required; + + @JsonProperty("signature") + private JsonNullable signature; + + @JsonProperty("initials") + private JsonNullable initials; + + @JsonProperty("text") + private JsonNullable text; + + @JsonProperty("datetime") + private JsonNullable datetime; + + @JsonProperty("checkbox") + private JsonNullable checkbox; + + @JsonIgnore + public String getDocumentId() { + return documentId.orElse(null); + } + + @JsonIgnore + public String getPage() { + return page.orElse(null); + } + + @JsonIgnore + public String getX() { + return x.orElse(null); + } + + @JsonIgnore + public String getY() { + return y.orElse(null); + } + + @JsonIgnore + public String getWidth() { + return width.orElse(null); + } + + @JsonIgnore + public String getHeight() { + return height.orElse(null); + } + + @JsonIgnore + public String getType() { + return type.orElse(null); + } + + @JsonIgnore + public String getRecipientId() { + return recipientId.orElse(null); + } + + @JsonIgnore + public String getRequired() { + return required.orElse(null); + } + + @JsonIgnore + public AddEnvelopeAnnotationRequestSignature getSignature() { + return signature.orElse(null); + } + + @JsonIgnore + public AddEnvelopeAnnotationRequestInitials getInitials() { + return initials.orElse(null); + } + + @JsonIgnore + public AddEnvelopeAnnotationRequestText getText() { + return text.orElse(null); + } + + @JsonIgnore + public AddEnvelopeAnnotationRequestDatetime getDatetime() { + return datetime.orElse(null); + } + + @JsonIgnore + public AddEnvelopeAnnotationRequestCheckbox getCheckbox() { + return checkbox.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddEnvelopeAnnotationRequestBuilder { + + private JsonNullable documentId = JsonNullable.undefined(); + + @JsonProperty("document_id") + public AddEnvelopeAnnotationRequestBuilder documentId(String value) { + this.documentId = JsonNullable.of(value); + return this; + } + + private JsonNullable page = JsonNullable.undefined(); + + @JsonProperty("page") + public AddEnvelopeAnnotationRequestBuilder page(String value) { + this.page = JsonNullable.of(value); + return this; + } + + private JsonNullable x = JsonNullable.undefined(); + + @JsonProperty("x") + public AddEnvelopeAnnotationRequestBuilder x(String value) { + this.x = JsonNullable.of(value); + return this; + } + + private JsonNullable y = JsonNullable.undefined(); + + @JsonProperty("y") + public AddEnvelopeAnnotationRequestBuilder y(String value) { + this.y = JsonNullable.of(value); + return this; + } + + private JsonNullable width = JsonNullable.undefined(); + + @JsonProperty("width") + public AddEnvelopeAnnotationRequestBuilder width(String value) { + this.width = JsonNullable.of(value); + return this; + } + + private JsonNullable height = JsonNullable.undefined(); + + @JsonProperty("height") + public AddEnvelopeAnnotationRequestBuilder height(String value) { + this.height = JsonNullable.of(value); + return this; + } + + private JsonNullable type = JsonNullable.undefined(); + + @JsonProperty("type") + public AddEnvelopeAnnotationRequestBuilder type(String value) { + this.type = JsonNullable.of(value); + return this; + } + + private JsonNullable recipientId = JsonNullable.undefined(); + + @JsonProperty("recipient_id") + public AddEnvelopeAnnotationRequestBuilder recipientId(String value) { + this.recipientId = JsonNullable.of(value); + return this; + } + + private JsonNullable required = JsonNullable.undefined(); + + @JsonProperty("required") + public AddEnvelopeAnnotationRequestBuilder required(String value) { + this.required = JsonNullable.of(value); + return this; + } + + private JsonNullable signature = + JsonNullable.undefined(); + + @JsonProperty("signature") + public AddEnvelopeAnnotationRequestBuilder signature( + AddEnvelopeAnnotationRequestSignature value + ) { + this.signature = JsonNullable.of(value); + return this; + } + + private JsonNullable initials = JsonNullable.undefined(); + + @JsonProperty("initials") + public AddEnvelopeAnnotationRequestBuilder initials( + AddEnvelopeAnnotationRequestInitials value + ) { + this.initials = JsonNullable.of(value); + return this; + } + + private JsonNullable text = JsonNullable.undefined(); + + @JsonProperty("text") + public AddEnvelopeAnnotationRequestBuilder text(AddEnvelopeAnnotationRequestText value) { + this.text = JsonNullable.of(value); + return this; + } + + private JsonNullable datetime = JsonNullable.undefined(); + + @JsonProperty("datetime") + public AddEnvelopeAnnotationRequestBuilder datetime( + AddEnvelopeAnnotationRequestDatetime value + ) { + this.datetime = JsonNullable.of(value); + return this; + } + + private JsonNullable checkbox = JsonNullable.undefined(); + + @JsonProperty("checkbox") + public AddEnvelopeAnnotationRequestBuilder checkbox( + AddEnvelopeAnnotationRequestCheckbox value + ) { + this.checkbox = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestCheckbox.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestCheckbox.java new file mode 100644 index 0000000..5993dc8 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestCheckbox.java @@ -0,0 +1,56 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeAnnotationRequestCheckbox { + + @JsonProperty("checked") + private JsonNullable checked; + + @JsonProperty("style") + private JsonNullable style; + + @JsonIgnore + public String getChecked() { + return checked.orElse(null); + } + + @JsonIgnore + public String getStyle() { + return style.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddEnvelopeAnnotationRequestCheckboxBuilder { + + private JsonNullable checked = JsonNullable.undefined(); + + @JsonProperty("checked") + public AddEnvelopeAnnotationRequestCheckboxBuilder checked(String value) { + this.checked = JsonNullable.of(value); + return this; + } + + private JsonNullable style = JsonNullable.undefined(); + + @JsonProperty("style") + public AddEnvelopeAnnotationRequestCheckboxBuilder style(String value) { + this.style = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestDatetime.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestDatetime.java new file mode 100644 index 0000000..af64e9a --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestDatetime.java @@ -0,0 +1,136 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeAnnotationRequestDatetime { + + @JsonProperty("size") + private JsonNullable size; + + @JsonProperty("font") + private JsonNullable font; + + @JsonProperty("color") + private JsonNullable color; + + @JsonProperty("auto_fill") + private JsonNullable autoFill; + + @JsonProperty("timezone") + private JsonNullable timezone; + + @JsonProperty("timestamp") + private JsonNullable timestamp; + + @JsonProperty("format") + private JsonNullable format; + + @JsonIgnore + public String getSize() { + return size.orElse(null); + } + + @JsonIgnore + public DatetimeFont1 getFont() { + return font.orElse(null); + } + + @JsonIgnore + public String getColor() { + return color.orElse(null); + } + + @JsonIgnore + public String getAutoFill() { + return autoFill.orElse(null); + } + + @JsonIgnore + public String getTimezone() { + return timezone.orElse(null); + } + + @JsonIgnore + public String getTimestamp() { + return timestamp.orElse(null); + } + + @JsonIgnore + public String getFormat() { + return format.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddEnvelopeAnnotationRequestDatetimeBuilder { + + private JsonNullable size = JsonNullable.undefined(); + + @JsonProperty("size") + public AddEnvelopeAnnotationRequestDatetimeBuilder size(String value) { + this.size = JsonNullable.of(value); + return this; + } + + private JsonNullable font = JsonNullable.undefined(); + + @JsonProperty("font") + public AddEnvelopeAnnotationRequestDatetimeBuilder font(DatetimeFont1 value) { + this.font = JsonNullable.of(value); + return this; + } + + private JsonNullable color = JsonNullable.undefined(); + + @JsonProperty("color") + public AddEnvelopeAnnotationRequestDatetimeBuilder color(String value) { + this.color = JsonNullable.of(value); + return this; + } + + private JsonNullable autoFill = JsonNullable.undefined(); + + @JsonProperty("auto_fill") + public AddEnvelopeAnnotationRequestDatetimeBuilder autoFill(String value) { + this.autoFill = JsonNullable.of(value); + return this; + } + + private JsonNullable timezone = JsonNullable.undefined(); + + @JsonProperty("timezone") + public AddEnvelopeAnnotationRequestDatetimeBuilder timezone(String value) { + this.timezone = JsonNullable.of(value); + return this; + } + + private JsonNullable timestamp = JsonNullable.undefined(); + + @JsonProperty("timestamp") + public AddEnvelopeAnnotationRequestDatetimeBuilder timestamp(String value) { + this.timestamp = JsonNullable.of(value); + return this; + } + + private JsonNullable format = JsonNullable.undefined(); + + @JsonProperty("format") + public AddEnvelopeAnnotationRequestDatetimeBuilder format(String value) { + this.format = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestInitials.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestInitials.java new file mode 100644 index 0000000..27c5ad9 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestInitials.java @@ -0,0 +1,40 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeAnnotationRequestInitials { + + @JsonProperty("id") + private JsonNullable id; + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddEnvelopeAnnotationRequestInitialsBuilder { + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public AddEnvelopeAnnotationRequestInitialsBuilder id(String value) { + this.id = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestSignature.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestSignature.java new file mode 100644 index 0000000..d1f205c --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestSignature.java @@ -0,0 +1,40 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeAnnotationRequestSignature { + + @JsonProperty("id") + private JsonNullable id; + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddEnvelopeAnnotationRequestSignatureBuilder { + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public AddEnvelopeAnnotationRequestSignatureBuilder id(String value) { + this.id = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestText.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestText.java new file mode 100644 index 0000000..08dabd0 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeAnnotationRequestText.java @@ -0,0 +1,120 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeAnnotationRequestText { + + @JsonProperty("size") + private JsonNullable size; + + @JsonProperty("color") + private JsonNullable color; + + @JsonProperty("value") + private JsonNullable value; + + @JsonProperty("tooltip") + private JsonNullable tooltip; + + @JsonProperty("dynamic_field_name") + private JsonNullable dynamicFieldName; + + @JsonProperty("font") + private JsonNullable font; + + @JsonIgnore + public String getSize() { + return size.orElse(null); + } + + @JsonIgnore + public String getColor() { + return color.orElse(null); + } + + @JsonIgnore + public String getValue() { + return value.orElse(null); + } + + @JsonIgnore + public String getTooltip() { + return tooltip.orElse(null); + } + + @JsonIgnore + public String getDynamicFieldName() { + return dynamicFieldName.orElse(null); + } + + @JsonIgnore + public TextFont1 getFont() { + return font.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddEnvelopeAnnotationRequestTextBuilder { + + private JsonNullable size = JsonNullable.undefined(); + + @JsonProperty("size") + public AddEnvelopeAnnotationRequestTextBuilder size(String value) { + this.size = JsonNullable.of(value); + return this; + } + + private JsonNullable color = JsonNullable.undefined(); + + @JsonProperty("color") + public AddEnvelopeAnnotationRequestTextBuilder color(String value) { + this.color = JsonNullable.of(value); + return this; + } + + private JsonNullable value = JsonNullable.undefined(); + + @JsonProperty("value") + public AddEnvelopeAnnotationRequestTextBuilder value(String value) { + this.value = JsonNullable.of(value); + return this; + } + + private JsonNullable tooltip = JsonNullable.undefined(); + + @JsonProperty("tooltip") + public AddEnvelopeAnnotationRequestTextBuilder tooltip(String value) { + this.tooltip = JsonNullable.of(value); + return this; + } + + private JsonNullable dynamicFieldName = JsonNullable.undefined(); + + @JsonProperty("dynamic_field_name") + public AddEnvelopeAnnotationRequestTextBuilder dynamicFieldName(String value) { + this.dynamicFieldName = JsonNullable.of(value); + return this; + } + + private JsonNullable font = JsonNullable.undefined(); + + @JsonProperty("font") + public AddEnvelopeAnnotationRequestTextBuilder font(TextFont1 value) { + this.font = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentParameters.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentParameters.java new file mode 100644 index 0000000..5b84c49 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeDocumentParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private AddEnvelopeDocumentRequest requestBody; + + // Overwrite lombok builder methods + public static class AddEnvelopeDocumentParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public AddEnvelopeDocumentParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public AddEnvelopeDocumentParametersBuilder requestBody( + AddEnvelopeDocumentRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public AddEnvelopeDocumentParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new AddEnvelopeDocumentParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentRequest.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentRequest.java index db21967..f36fa71 100644 --- a/src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentRequest.java +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeDocumentRequest.java @@ -18,9 +18,6 @@ @Jacksonized public class AddEnvelopeDocumentRequest { - /** - * File to upload in binary format - */ @JsonProperty("file") private JsonNullable file; @@ -36,9 +33,6 @@ public static class AddEnvelopeDocumentRequestBuilder { @JsonProperty("file") public AddEnvelopeDocumentRequestBuilder file(byte[] value) { - if (value == null) { - throw new IllegalStateException("file cannot be null"); - } this.file = JsonNullable.of(value); return this; } diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsParameters.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsParameters.java new file mode 100644 index 0000000..cc9806b --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeSigningStepsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private AddEnvelopeSigningStepsRequest requestBody; + + // Overwrite lombok builder methods + public static class AddEnvelopeSigningStepsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public AddEnvelopeSigningStepsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public AddEnvelopeSigningStepsParametersBuilder requestBody( + AddEnvelopeSigningStepsRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public AddEnvelopeSigningStepsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new AddEnvelopeSigningStepsParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequest.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequest.java index 3b48a43..862cf8b 100644 --- a/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequest.java +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequest.java @@ -19,27 +19,24 @@ @Jacksonized public class AddEnvelopeSigningStepsRequest { - /** - * List of signing steps - */ @JsonProperty("signing_steps") - private JsonNullable> signingSteps; + private JsonNullable> signingSteps; @JsonIgnore - public List getSigningSteps() { + public List getSigningSteps() { return signingSteps.orElse(null); } // Overwrite lombok builder methods public static class AddEnvelopeSigningStepsRequestBuilder { - private JsonNullable> signingSteps = JsonNullable.undefined(); + private JsonNullable> signingSteps = + JsonNullable.undefined(); @JsonProperty("signing_steps") - public AddEnvelopeSigningStepsRequestBuilder signingSteps(List value) { - if (value == null) { - throw new IllegalStateException("signingSteps cannot be null"); - } + public AddEnvelopeSigningStepsRequestBuilder signingSteps( + List value + ) { this.signingSteps = JsonNullable.of(value); return this; } diff --git a/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequestSigningSteps.java b/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequestSigningSteps.java new file mode 100644 index 0000000..f6c2d2d --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddEnvelopeSigningStepsRequestSigningSteps.java @@ -0,0 +1,43 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddEnvelopeSigningStepsRequestSigningSteps { + + @JsonProperty("recipients") + private JsonNullable> recipients; + + @JsonIgnore + public List getRecipients() { + return recipients.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddEnvelopeSigningStepsRequestSigningStepsBuilder { + + private JsonNullable> recipients = JsonNullable.undefined(); + + @JsonProperty("recipients") + public AddEnvelopeSigningStepsRequestSigningStepsBuilder recipients( + List value + ) { + this.recipients = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationParameters.java b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationParameters.java new file mode 100644 index 0000000..6f91b6d --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateAnnotationParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private AddTemplateAnnotationRequest requestBody; + + // Overwrite lombok builder methods + public static class AddTemplateAnnotationParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public AddTemplateAnnotationParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public AddTemplateAnnotationParametersBuilder requestBody( + AddTemplateAnnotationRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public AddTemplateAnnotationParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new AddTemplateAnnotationParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequest.java b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequest.java new file mode 100644 index 0000000..52b1df1 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequest.java @@ -0,0 +1,257 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateAnnotationRequest { + + @JsonProperty("document_id") + private JsonNullable documentId; + + @JsonProperty("page") + private JsonNullable page; + + @JsonProperty("x") + private JsonNullable x; + + @JsonProperty("y") + private JsonNullable y; + + @JsonProperty("width") + private JsonNullable width; + + @JsonProperty("height") + private JsonNullable height; + + @JsonProperty("type") + private JsonNullable type; + + @JsonProperty("recipient_id") + private JsonNullable recipientId; + + @JsonProperty("required") + private JsonNullable required; + + @JsonProperty("signature") + private JsonNullable signature; + + @JsonProperty("initials") + private JsonNullable initials; + + @JsonProperty("text") + private JsonNullable text; + + @JsonProperty("datetime") + private JsonNullable datetime; + + @JsonProperty("checkbox") + private JsonNullable checkbox; + + @JsonIgnore + public String getDocumentId() { + return documentId.orElse(null); + } + + @JsonIgnore + public String getPage() { + return page.orElse(null); + } + + @JsonIgnore + public String getX() { + return x.orElse(null); + } + + @JsonIgnore + public String getY() { + return y.orElse(null); + } + + @JsonIgnore + public String getWidth() { + return width.orElse(null); + } + + @JsonIgnore + public String getHeight() { + return height.orElse(null); + } + + @JsonIgnore + public String getType() { + return type.orElse(null); + } + + @JsonIgnore + public String getRecipientId() { + return recipientId.orElse(null); + } + + @JsonIgnore + public String getRequired() { + return required.orElse(null); + } + + @JsonIgnore + public AddTemplateAnnotationRequestSignature getSignature() { + return signature.orElse(null); + } + + @JsonIgnore + public AddTemplateAnnotationRequestInitials getInitials() { + return initials.orElse(null); + } + + @JsonIgnore + public AddTemplateAnnotationRequestText getText() { + return text.orElse(null); + } + + @JsonIgnore + public AddTemplateAnnotationRequestDatetime getDatetime() { + return datetime.orElse(null); + } + + @JsonIgnore + public AddTemplateAnnotationRequestCheckbox getCheckbox() { + return checkbox.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddTemplateAnnotationRequestBuilder { + + private JsonNullable documentId = JsonNullable.undefined(); + + @JsonProperty("document_id") + public AddTemplateAnnotationRequestBuilder documentId(String value) { + this.documentId = JsonNullable.of(value); + return this; + } + + private JsonNullable page = JsonNullable.undefined(); + + @JsonProperty("page") + public AddTemplateAnnotationRequestBuilder page(String value) { + this.page = JsonNullable.of(value); + return this; + } + + private JsonNullable x = JsonNullable.undefined(); + + @JsonProperty("x") + public AddTemplateAnnotationRequestBuilder x(String value) { + this.x = JsonNullable.of(value); + return this; + } + + private JsonNullable y = JsonNullable.undefined(); + + @JsonProperty("y") + public AddTemplateAnnotationRequestBuilder y(String value) { + this.y = JsonNullable.of(value); + return this; + } + + private JsonNullable width = JsonNullable.undefined(); + + @JsonProperty("width") + public AddTemplateAnnotationRequestBuilder width(String value) { + this.width = JsonNullable.of(value); + return this; + } + + private JsonNullable height = JsonNullable.undefined(); + + @JsonProperty("height") + public AddTemplateAnnotationRequestBuilder height(String value) { + this.height = JsonNullable.of(value); + return this; + } + + private JsonNullable type = JsonNullable.undefined(); + + @JsonProperty("type") + public AddTemplateAnnotationRequestBuilder type(String value) { + this.type = JsonNullable.of(value); + return this; + } + + private JsonNullable recipientId = JsonNullable.undefined(); + + @JsonProperty("recipient_id") + public AddTemplateAnnotationRequestBuilder recipientId(String value) { + this.recipientId = JsonNullable.of(value); + return this; + } + + private JsonNullable required = JsonNullable.undefined(); + + @JsonProperty("required") + public AddTemplateAnnotationRequestBuilder required(String value) { + this.required = JsonNullable.of(value); + return this; + } + + private JsonNullable signature = + JsonNullable.undefined(); + + @JsonProperty("signature") + public AddTemplateAnnotationRequestBuilder signature( + AddTemplateAnnotationRequestSignature value + ) { + this.signature = JsonNullable.of(value); + return this; + } + + private JsonNullable initials = JsonNullable.undefined(); + + @JsonProperty("initials") + public AddTemplateAnnotationRequestBuilder initials( + AddTemplateAnnotationRequestInitials value + ) { + this.initials = JsonNullable.of(value); + return this; + } + + private JsonNullable text = JsonNullable.undefined(); + + @JsonProperty("text") + public AddTemplateAnnotationRequestBuilder text(AddTemplateAnnotationRequestText value) { + this.text = JsonNullable.of(value); + return this; + } + + private JsonNullable datetime = JsonNullable.undefined(); + + @JsonProperty("datetime") + public AddTemplateAnnotationRequestBuilder datetime( + AddTemplateAnnotationRequestDatetime value + ) { + this.datetime = JsonNullable.of(value); + return this; + } + + private JsonNullable checkbox = JsonNullable.undefined(); + + @JsonProperty("checkbox") + public AddTemplateAnnotationRequestBuilder checkbox( + AddTemplateAnnotationRequestCheckbox value + ) { + this.checkbox = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestCheckbox.java b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestCheckbox.java new file mode 100644 index 0000000..52d059e --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestCheckbox.java @@ -0,0 +1,56 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateAnnotationRequestCheckbox { + + @JsonProperty("checked") + private JsonNullable checked; + + @JsonProperty("style") + private JsonNullable style; + + @JsonIgnore + public String getChecked() { + return checked.orElse(null); + } + + @JsonIgnore + public String getStyle() { + return style.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddTemplateAnnotationRequestCheckboxBuilder { + + private JsonNullable checked = JsonNullable.undefined(); + + @JsonProperty("checked") + public AddTemplateAnnotationRequestCheckboxBuilder checked(String value) { + this.checked = JsonNullable.of(value); + return this; + } + + private JsonNullable style = JsonNullable.undefined(); + + @JsonProperty("style") + public AddTemplateAnnotationRequestCheckboxBuilder style(String value) { + this.style = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestDatetime.java b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestDatetime.java new file mode 100644 index 0000000..c00677a --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestDatetime.java @@ -0,0 +1,136 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateAnnotationRequestDatetime { + + @JsonProperty("size") + private JsonNullable size; + + @JsonProperty("font") + private JsonNullable font; + + @JsonProperty("color") + private JsonNullable color; + + @JsonProperty("auto_fill") + private JsonNullable autoFill; + + @JsonProperty("timezone") + private JsonNullable timezone; + + @JsonProperty("timestamp") + private JsonNullable timestamp; + + @JsonProperty("format") + private JsonNullable format; + + @JsonIgnore + public String getSize() { + return size.orElse(null); + } + + @JsonIgnore + public DatetimeFont2 getFont() { + return font.orElse(null); + } + + @JsonIgnore + public String getColor() { + return color.orElse(null); + } + + @JsonIgnore + public String getAutoFill() { + return autoFill.orElse(null); + } + + @JsonIgnore + public String getTimezone() { + return timezone.orElse(null); + } + + @JsonIgnore + public String getTimestamp() { + return timestamp.orElse(null); + } + + @JsonIgnore + public String getFormat() { + return format.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddTemplateAnnotationRequestDatetimeBuilder { + + private JsonNullable size = JsonNullable.undefined(); + + @JsonProperty("size") + public AddTemplateAnnotationRequestDatetimeBuilder size(String value) { + this.size = JsonNullable.of(value); + return this; + } + + private JsonNullable font = JsonNullable.undefined(); + + @JsonProperty("font") + public AddTemplateAnnotationRequestDatetimeBuilder font(DatetimeFont2 value) { + this.font = JsonNullable.of(value); + return this; + } + + private JsonNullable color = JsonNullable.undefined(); + + @JsonProperty("color") + public AddTemplateAnnotationRequestDatetimeBuilder color(String value) { + this.color = JsonNullable.of(value); + return this; + } + + private JsonNullable autoFill = JsonNullable.undefined(); + + @JsonProperty("auto_fill") + public AddTemplateAnnotationRequestDatetimeBuilder autoFill(String value) { + this.autoFill = JsonNullable.of(value); + return this; + } + + private JsonNullable timezone = JsonNullable.undefined(); + + @JsonProperty("timezone") + public AddTemplateAnnotationRequestDatetimeBuilder timezone(String value) { + this.timezone = JsonNullable.of(value); + return this; + } + + private JsonNullable timestamp = JsonNullable.undefined(); + + @JsonProperty("timestamp") + public AddTemplateAnnotationRequestDatetimeBuilder timestamp(String value) { + this.timestamp = JsonNullable.of(value); + return this; + } + + private JsonNullable format = JsonNullable.undefined(); + + @JsonProperty("format") + public AddTemplateAnnotationRequestDatetimeBuilder format(String value) { + this.format = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestInitials.java b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestInitials.java new file mode 100644 index 0000000..647019d --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestInitials.java @@ -0,0 +1,40 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateAnnotationRequestInitials { + + @JsonProperty("id") + private JsonNullable id; + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddTemplateAnnotationRequestInitialsBuilder { + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public AddTemplateAnnotationRequestInitialsBuilder id(String value) { + this.id = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestSignature.java b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestSignature.java new file mode 100644 index 0000000..923ba4e --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestSignature.java @@ -0,0 +1,40 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateAnnotationRequestSignature { + + @JsonProperty("id") + private JsonNullable id; + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddTemplateAnnotationRequestSignatureBuilder { + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public AddTemplateAnnotationRequestSignatureBuilder id(String value) { + this.id = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestText.java b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestText.java new file mode 100644 index 0000000..cc4ba90 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateAnnotationRequestText.java @@ -0,0 +1,120 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateAnnotationRequestText { + + @JsonProperty("size") + private JsonNullable size; + + @JsonProperty("color") + private JsonNullable color; + + @JsonProperty("value") + private JsonNullable value; + + @JsonProperty("tooltip") + private JsonNullable tooltip; + + @JsonProperty("dynamic_field_name") + private JsonNullable dynamicFieldName; + + @JsonProperty("font") + private JsonNullable font; + + @JsonIgnore + public String getSize() { + return size.orElse(null); + } + + @JsonIgnore + public String getColor() { + return color.orElse(null); + } + + @JsonIgnore + public String getValue() { + return value.orElse(null); + } + + @JsonIgnore + public String getTooltip() { + return tooltip.orElse(null); + } + + @JsonIgnore + public String getDynamicFieldName() { + return dynamicFieldName.orElse(null); + } + + @JsonIgnore + public TextFont2 getFont() { + return font.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddTemplateAnnotationRequestTextBuilder { + + private JsonNullable size = JsonNullable.undefined(); + + @JsonProperty("size") + public AddTemplateAnnotationRequestTextBuilder size(String value) { + this.size = JsonNullable.of(value); + return this; + } + + private JsonNullable color = JsonNullable.undefined(); + + @JsonProperty("color") + public AddTemplateAnnotationRequestTextBuilder color(String value) { + this.color = JsonNullable.of(value); + return this; + } + + private JsonNullable value = JsonNullable.undefined(); + + @JsonProperty("value") + public AddTemplateAnnotationRequestTextBuilder value(String value) { + this.value = JsonNullable.of(value); + return this; + } + + private JsonNullable tooltip = JsonNullable.undefined(); + + @JsonProperty("tooltip") + public AddTemplateAnnotationRequestTextBuilder tooltip(String value) { + this.tooltip = JsonNullable.of(value); + return this; + } + + private JsonNullable dynamicFieldName = JsonNullable.undefined(); + + @JsonProperty("dynamic_field_name") + public AddTemplateAnnotationRequestTextBuilder dynamicFieldName(String value) { + this.dynamicFieldName = JsonNullable.of(value); + return this; + } + + private JsonNullable font = JsonNullable.undefined(); + + @JsonProperty("font") + public AddTemplateAnnotationRequestTextBuilder font(TextFont2 value) { + this.font = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateDocumentParameters.java b/src/main/java/com/alohi/signplus/models/AddTemplateDocumentParameters.java new file mode 100644 index 0000000..708c82a --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateDocumentParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateDocumentParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private AddTemplateDocumentRequest requestBody; + + // Overwrite lombok builder methods + public static class AddTemplateDocumentParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public AddTemplateDocumentParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public AddTemplateDocumentParametersBuilder requestBody( + AddTemplateDocumentRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public AddTemplateDocumentParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new AddTemplateDocumentParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateDocumentRequest.java b/src/main/java/com/alohi/signplus/models/AddTemplateDocumentRequest.java index 0b005c1..72d1b27 100644 --- a/src/main/java/com/alohi/signplus/models/AddTemplateDocumentRequest.java +++ b/src/main/java/com/alohi/signplus/models/AddTemplateDocumentRequest.java @@ -1,12 +1,14 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,9 +18,23 @@ @Jacksonized public class AddTemplateDocumentRequest { - /** - * File to upload in binary format - */ - @NonNull - private byte[] file; + @JsonProperty("file") + private JsonNullable file; + + @JsonIgnore + public byte[] getFile() { + return file.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddTemplateDocumentRequestBuilder { + + private JsonNullable file = JsonNullable.undefined(); + + @JsonProperty("file") + public AddTemplateDocumentRequestBuilder file(byte[] value) { + this.file = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsParameters.java b/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsParameters.java new file mode 100644 index 0000000..44a2c77 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateSigningStepsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private AddTemplateSigningStepsRequest requestBody; + + // Overwrite lombok builder methods + public static class AddTemplateSigningStepsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public AddTemplateSigningStepsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public AddTemplateSigningStepsParametersBuilder requestBody( + AddTemplateSigningStepsRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public AddTemplateSigningStepsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new AddTemplateSigningStepsParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequest.java b/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequest.java index 4398d0c..43d622a 100644 --- a/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequest.java +++ b/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequest.java @@ -1,14 +1,15 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,10 +19,26 @@ @Jacksonized public class AddTemplateSigningStepsRequest { - /** - * List of signing steps - */ - @NonNull @JsonProperty("signing_steps") - private List signingSteps; + private JsonNullable> signingSteps; + + @JsonIgnore + public List getSigningSteps() { + return signingSteps.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddTemplateSigningStepsRequestBuilder { + + private JsonNullable> signingSteps = + JsonNullable.undefined(); + + @JsonProperty("signing_steps") + public AddTemplateSigningStepsRequestBuilder signingSteps( + List value + ) { + this.signingSteps = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequestSigningSteps.java b/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequestSigningSteps.java new file mode 100644 index 0000000..c3f210b --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/AddTemplateSigningStepsRequestSigningSteps.java @@ -0,0 +1,43 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class AddTemplateSigningStepsRequestSigningSteps { + + @JsonProperty("recipients") + private JsonNullable> recipients; + + @JsonIgnore + public List getRecipients() { + return recipients.orElse(null); + } + + // Overwrite lombok builder methods + public static class AddTemplateSigningStepsRequestSigningStepsBuilder { + + private JsonNullable> recipients = JsonNullable.undefined(); + + @JsonProperty("recipients") + public AddTemplateSigningStepsRequestSigningStepsBuilder recipients( + List value + ) { + this.recipients = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateParameters.java b/src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateParameters.java new file mode 100644 index 0000000..7008cb3 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class CreateEnvelopeFromTemplateParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private CreateEnvelopeFromTemplateRequest requestBody; + + // Overwrite lombok builder methods + public static class CreateEnvelopeFromTemplateParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public CreateEnvelopeFromTemplateParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public CreateEnvelopeFromTemplateParametersBuilder requestBody( + CreateEnvelopeFromTemplateRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public CreateEnvelopeFromTemplateParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new CreateEnvelopeFromTemplateParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateRequest.java b/src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateRequest.java index b79925d..23faf81 100644 --- a/src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateRequest.java +++ b/src/main/java/com/alohi/signplus/models/CreateEnvelopeFromTemplateRequest.java @@ -5,7 +5,6 @@ import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; @@ -19,24 +18,20 @@ @Jacksonized public class CreateEnvelopeFromTemplateRequest { - /** - * Name of the envelope - */ - @NonNull - private String name; + @JsonProperty("name") + private JsonNullable name; - /** - * Comment for the envelope - */ @JsonProperty("comment") private JsonNullable comment; - /** - * Whether the envelope is created in sandbox mode - */ @JsonProperty("sandbox") private JsonNullable sandbox; + @JsonIgnore + public String getName() { + return name.orElse(null); + } + @JsonIgnore public String getComment() { return comment.orElse(null); @@ -50,13 +45,18 @@ public Boolean getSandbox() { // Overwrite lombok builder methods public static class CreateEnvelopeFromTemplateRequestBuilder { + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public CreateEnvelopeFromTemplateRequestBuilder name(String value) { + this.name = JsonNullable.of(value); + return this; + } + private JsonNullable comment = JsonNullable.undefined(); @JsonProperty("comment") public CreateEnvelopeFromTemplateRequestBuilder comment(String value) { - if (value == null) { - throw new IllegalStateException("comment cannot be null"); - } this.comment = JsonNullable.of(value); return this; } @@ -65,9 +65,6 @@ public CreateEnvelopeFromTemplateRequestBuilder comment(String value) { @JsonProperty("sandbox") public CreateEnvelopeFromTemplateRequestBuilder sandbox(Boolean value) { - if (value == null) { - throw new IllegalStateException("sandbox cannot be null"); - } this.sandbox = JsonNullable.of(value); return this; } diff --git a/src/main/java/com/alohi/signplus/models/CreateEnvelopeParameters.java b/src/main/java/com/alohi/signplus/models/CreateEnvelopeParameters.java new file mode 100644 index 0000000..bf7d9d3 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/CreateEnvelopeParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class CreateEnvelopeParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private CreateEnvelopeRequest requestBody; + + // Overwrite lombok builder methods + public static class CreateEnvelopeParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public CreateEnvelopeParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public CreateEnvelopeParametersBuilder requestBody(CreateEnvelopeRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public CreateEnvelopeParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new CreateEnvelopeParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/CreateEnvelopeRequest.java b/src/main/java/com/alohi/signplus/models/CreateEnvelopeRequest.java index cdc0638..fbce344 100644 --- a/src/main/java/com/alohi/signplus/models/CreateEnvelopeRequest.java +++ b/src/main/java/com/alohi/signplus/models/CreateEnvelopeRequest.java @@ -5,7 +5,6 @@ import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; @@ -19,39 +18,33 @@ @Jacksonized public class CreateEnvelopeRequest { - /** - * Name of the envelope - */ - @NonNull - private String name; + @JsonProperty("name") + private JsonNullable name; - /** - * Legal level of the envelope (SES is Simple Electronic Signature, QES_EIDAS is Qualified Electronic Signature, QES_ZERTES is Qualified Electronic Signature with Zertes) - */ - @NonNull @JsonProperty("legality_level") - private EnvelopeLegalityLevel legalityLevel; + private JsonNullable legalityLevel; - /** - * Unix timestamp of the expiration date - */ @JsonProperty("expires_at") - private JsonNullable expiresAt; + private JsonNullable expiresAt; - /** - * Comment for the envelope - */ @JsonProperty("comment") private JsonNullable comment; - /** - * Whether the envelope is created in sandbox mode - */ @JsonProperty("sandbox") private JsonNullable sandbox; @JsonIgnore - public Long getExpiresAt() { + public String getName() { + return name.orElse(null); + } + + @JsonIgnore + public String getLegalityLevel() { + return legalityLevel.orElse(null); + } + + @JsonIgnore + public String getExpiresAt() { return expiresAt.orElse(null); } @@ -68,13 +61,26 @@ public Boolean getSandbox() { // Overwrite lombok builder methods public static class CreateEnvelopeRequestBuilder { - private JsonNullable expiresAt = JsonNullable.undefined(); + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public CreateEnvelopeRequestBuilder name(String value) { + this.name = JsonNullable.of(value); + return this; + } + + private JsonNullable legalityLevel = JsonNullable.undefined(); + + @JsonProperty("legality_level") + public CreateEnvelopeRequestBuilder legalityLevel(String value) { + this.legalityLevel = JsonNullable.of(value); + return this; + } + + private JsonNullable expiresAt = JsonNullable.undefined(); @JsonProperty("expires_at") - public CreateEnvelopeRequestBuilder expiresAt(Long value) { - if (value == null) { - throw new IllegalStateException("expiresAt cannot be null"); - } + public CreateEnvelopeRequestBuilder expiresAt(String value) { this.expiresAt = JsonNullable.of(value); return this; } @@ -83,9 +89,6 @@ public CreateEnvelopeRequestBuilder expiresAt(Long value) { @JsonProperty("comment") public CreateEnvelopeRequestBuilder comment(String value) { - if (value == null) { - throw new IllegalStateException("comment cannot be null"); - } this.comment = JsonNullable.of(value); return this; } @@ -94,9 +97,6 @@ public CreateEnvelopeRequestBuilder comment(String value) { @JsonProperty("sandbox") public CreateEnvelopeRequestBuilder sandbox(Boolean value) { - if (value == null) { - throw new IllegalStateException("sandbox cannot be null"); - } this.sandbox = JsonNullable.of(value); return this; } diff --git a/src/main/java/com/alohi/signplus/models/CreateTemplateParameters.java b/src/main/java/com/alohi/signplus/models/CreateTemplateParameters.java new file mode 100644 index 0000000..748ef33 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/CreateTemplateParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class CreateTemplateParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private CreateTemplateRequest requestBody; + + // Overwrite lombok builder methods + public static class CreateTemplateParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public CreateTemplateParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public CreateTemplateParametersBuilder requestBody(CreateTemplateRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public CreateTemplateParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new CreateTemplateParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/CreateTemplateRequest.java b/src/main/java/com/alohi/signplus/models/CreateTemplateRequest.java index e7706bf..8a0619a 100644 --- a/src/main/java/com/alohi/signplus/models/CreateTemplateRequest.java +++ b/src/main/java/com/alohi/signplus/models/CreateTemplateRequest.java @@ -1,12 +1,14 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,6 +18,23 @@ @Jacksonized public class CreateTemplateRequest { - @NonNull - private String name; + @JsonProperty("name") + private JsonNullable name; + + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + // Overwrite lombok builder methods + public static class CreateTemplateRequestBuilder { + + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public CreateTemplateRequestBuilder name(String value) { + this.name = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/CreateWebhookParameters.java b/src/main/java/com/alohi/signplus/models/CreateWebhookParameters.java new file mode 100644 index 0000000..eaf4c8f --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/CreateWebhookParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class CreateWebhookParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private CreateWebhookRequest requestBody; + + // Overwrite lombok builder methods + public static class CreateWebhookParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public CreateWebhookParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public CreateWebhookParametersBuilder requestBody(CreateWebhookRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public CreateWebhookParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new CreateWebhookParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/CreateWebhookRequest.java b/src/main/java/com/alohi/signplus/models/CreateWebhookRequest.java index 7a82d9d..5b362ea 100644 --- a/src/main/java/com/alohi/signplus/models/CreateWebhookRequest.java +++ b/src/main/java/com/alohi/signplus/models/CreateWebhookRequest.java @@ -1,12 +1,14 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,15 +18,39 @@ @Jacksonized public class CreateWebhookRequest { - /** - * Event of the webhook - */ - @NonNull - private WebhookEvent event; - - /** - * URL of the webhook target - */ - @NonNull - private String target; + @JsonProperty("event") + private JsonNullable event; + + @JsonProperty("target") + private JsonNullable target; + + @JsonIgnore + public String getEvent() { + return event.orElse(null); + } + + @JsonIgnore + public String getTarget() { + return target.orElse(null); + } + + // Overwrite lombok builder methods + public static class CreateWebhookRequestBuilder { + + private JsonNullable event = JsonNullable.undefined(); + + @JsonProperty("event") + public CreateWebhookRequestBuilder event(String value) { + this.event = JsonNullable.of(value); + return this; + } + + private JsonNullable target = JsonNullable.undefined(); + + @JsonProperty("target") + public CreateWebhookRequestBuilder target(String value) { + this.target = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/DatetimeFont1.java b/src/main/java/com/alohi/signplus/models/DatetimeFont1.java new file mode 100644 index 0000000..1571f4a --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/DatetimeFont1.java @@ -0,0 +1,72 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class DatetimeFont1 { + + @JsonProperty("family") + private JsonNullable family; + + @JsonProperty("italic") + private JsonNullable italic; + + @JsonProperty("bold") + private JsonNullable bold; + + @JsonIgnore + public String getFamily() { + return family.orElse(null); + } + + @JsonIgnore + public String getItalic() { + return italic.orElse(null); + } + + @JsonIgnore + public String getBold() { + return bold.orElse(null); + } + + // Overwrite lombok builder methods + public static class DatetimeFont1Builder { + + private JsonNullable family = JsonNullable.undefined(); + + @JsonProperty("family") + public DatetimeFont1Builder family(String value) { + this.family = JsonNullable.of(value); + return this; + } + + private JsonNullable italic = JsonNullable.undefined(); + + @JsonProperty("italic") + public DatetimeFont1Builder italic(String value) { + this.italic = JsonNullable.of(value); + return this; + } + + private JsonNullable bold = JsonNullable.undefined(); + + @JsonProperty("bold") + public DatetimeFont1Builder bold(String value) { + this.bold = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/DatetimeFont2.java b/src/main/java/com/alohi/signplus/models/DatetimeFont2.java new file mode 100644 index 0000000..03caa78 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/DatetimeFont2.java @@ -0,0 +1,72 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class DatetimeFont2 { + + @JsonProperty("family") + private JsonNullable family; + + @JsonProperty("italic") + private JsonNullable italic; + + @JsonProperty("bold") + private JsonNullable bold; + + @JsonIgnore + public String getFamily() { + return family.orElse(null); + } + + @JsonIgnore + public String getItalic() { + return italic.orElse(null); + } + + @JsonIgnore + public String getBold() { + return bold.orElse(null); + } + + // Overwrite lombok builder methods + public static class DatetimeFont2Builder { + + private JsonNullable family = JsonNullable.undefined(); + + @JsonProperty("family") + public DatetimeFont2Builder family(String value) { + this.family = JsonNullable.of(value); + return this; + } + + private JsonNullable italic = JsonNullable.undefined(); + + @JsonProperty("italic") + public DatetimeFont2Builder italic(String value) { + this.italic = JsonNullable.of(value); + return this; + } + + private JsonNullable bold = JsonNullable.undefined(); + + @JsonProperty("bold") + public DatetimeFont2Builder bold(String value) { + this.bold = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/DownloadEnvelopeCertificateParameters.java b/src/main/java/com/alohi/signplus/models/DownloadEnvelopeCertificateParameters.java new file mode 100644 index 0000000..2e08aaf --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/DownloadEnvelopeCertificateParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class DownloadEnvelopeCertificateParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class DownloadEnvelopeCertificateParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public DownloadEnvelopeCertificateParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public DownloadEnvelopeCertificateParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new DownloadEnvelopeCertificateParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/DownloadEnvelopeSignedDocumentsParameters.java b/src/main/java/com/alohi/signplus/models/DownloadEnvelopeSignedDocumentsParameters.java index 3c8f827..7a975d8 100644 --- a/src/main/java/com/alohi/signplus/models/DownloadEnvelopeSignedDocumentsParameters.java +++ b/src/main/java/com/alohi/signplus/models/DownloadEnvelopeSignedDocumentsParameters.java @@ -1,6 +1,7 @@ package com.alohi.signplus.models; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -18,29 +19,48 @@ @Jacksonized public class DownloadEnvelopeSignedDocumentsParameters { + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + /** * Whether to include the certificate of completion in the downloaded file */ @JsonProperty("certificate_of_completion") - private JsonNullable certificateOfCompletion; + private JsonNullable certificateOfCompletion; @JsonIgnore - public Boolean getCertificateOfCompletion() { + public String getCertificateOfCompletion() { return certificateOfCompletion.orElse(null); } // Overwrite lombok builder methods public static class DownloadEnvelopeSignedDocumentsParametersBuilder { - private JsonNullable certificateOfCompletion = JsonNullable.of(true); + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public DownloadEnvelopeSignedDocumentsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + private JsonNullable certificateOfCompletion = JsonNullable.undefined(); @JsonProperty("certificate_of_completion") - public DownloadEnvelopeSignedDocumentsParametersBuilder certificateOfCompletion(Boolean value) { - if (value == null) { - throw new IllegalStateException("certificateOfCompletion cannot be null"); - } + public DownloadEnvelopeSignedDocumentsParametersBuilder certificateOfCompletion(String value) { this.certificateOfCompletion = JsonNullable.of(value); return this; } + + public DownloadEnvelopeSignedDocumentsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new DownloadEnvelopeSignedDocumentsParameters(accept, certificateOfCompletion); + } } } diff --git a/src/main/java/com/alohi/signplus/models/DuplicateEnvelopeParameters.java b/src/main/java/com/alohi/signplus/models/DuplicateEnvelopeParameters.java new file mode 100644 index 0000000..2d8bf88 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/DuplicateEnvelopeParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class DuplicateEnvelopeParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class DuplicateEnvelopeParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public DuplicateEnvelopeParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public DuplicateEnvelopeParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new DuplicateEnvelopeParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/DuplicateTemplateParameters.java b/src/main/java/com/alohi/signplus/models/DuplicateTemplateParameters.java new file mode 100644 index 0000000..5113a41 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/DuplicateTemplateParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class DuplicateTemplateParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class DuplicateTemplateParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public DuplicateTemplateParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public DuplicateTemplateParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new DuplicateTemplateParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/DynamicFields.java b/src/main/java/com/alohi/signplus/models/DynamicFields.java new file mode 100644 index 0000000..b703f69 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/DynamicFields.java @@ -0,0 +1,56 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class DynamicFields { + + @JsonProperty("name") + private JsonNullable name; + + @JsonProperty("value") + private JsonNullable value; + + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonIgnore + public String getValue() { + return value.orElse(null); + } + + // Overwrite lombok builder methods + public static class DynamicFieldsBuilder { + + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public DynamicFieldsBuilder name(String value) { + this.name = JsonNullable.of(value); + return this; + } + + private JsonNullable value = JsonNullable.undefined(); + + @JsonProperty("value") + public DynamicFieldsBuilder value(String value) { + this.value = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetAttachmentFileParameters.java b/src/main/java/com/alohi/signplus/models/GetAttachmentFileParameters.java new file mode 100644 index 0000000..dd12703 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetAttachmentFileParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetAttachmentFileParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetAttachmentFileParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetAttachmentFileParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetAttachmentFileParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetAttachmentFileParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetDocumentTemplateAnnotationsParameters.java b/src/main/java/com/alohi/signplus/models/GetDocumentTemplateAnnotationsParameters.java new file mode 100644 index 0000000..ff7cb41 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetDocumentTemplateAnnotationsParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetDocumentTemplateAnnotationsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetDocumentTemplateAnnotationsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetDocumentTemplateAnnotationsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetDocumentTemplateAnnotationsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetDocumentTemplateAnnotationsParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetEnvelopeAnnotationsParameters.java b/src/main/java/com/alohi/signplus/models/GetEnvelopeAnnotationsParameters.java new file mode 100644 index 0000000..1cd0cef --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetEnvelopeAnnotationsParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetEnvelopeAnnotationsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetEnvelopeAnnotationsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetEnvelopeAnnotationsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetEnvelopeAnnotationsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetEnvelopeAnnotationsParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentAnnotationsParameters.java b/src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentAnnotationsParameters.java new file mode 100644 index 0000000..4d8b4e9 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentAnnotationsParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetEnvelopeDocumentAnnotationsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetEnvelopeDocumentAnnotationsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetEnvelopeDocumentAnnotationsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetEnvelopeDocumentAnnotationsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetEnvelopeDocumentAnnotationsParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentParameters.java b/src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentParameters.java new file mode 100644 index 0000000..6ec2e0f --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetEnvelopeDocumentParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetEnvelopeDocumentParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetEnvelopeDocumentParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetEnvelopeDocumentParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetEnvelopeDocumentParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentsParameters.java b/src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentsParameters.java new file mode 100644 index 0000000..eb56b9b --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetEnvelopeDocumentsParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetEnvelopeDocumentsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetEnvelopeDocumentsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetEnvelopeDocumentsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetEnvelopeDocumentsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetEnvelopeDocumentsParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetEnvelopeParameters.java b/src/main/java/com/alohi/signplus/models/GetEnvelopeParameters.java new file mode 100644 index 0000000..75bf8a5 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetEnvelopeParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetEnvelopeParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetEnvelopeParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetEnvelopeParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetEnvelopeParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetEnvelopeParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetTemplateAnnotationsParameters.java b/src/main/java/com/alohi/signplus/models/GetTemplateAnnotationsParameters.java new file mode 100644 index 0000000..f3eb466 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetTemplateAnnotationsParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetTemplateAnnotationsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetTemplateAnnotationsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetTemplateAnnotationsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetTemplateAnnotationsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetTemplateAnnotationsParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetTemplateDocumentParameters.java b/src/main/java/com/alohi/signplus/models/GetTemplateDocumentParameters.java new file mode 100644 index 0000000..7935a28 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetTemplateDocumentParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetTemplateDocumentParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetTemplateDocumentParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetTemplateDocumentParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetTemplateDocumentParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetTemplateDocumentParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetTemplateDocumentsParameters.java b/src/main/java/com/alohi/signplus/models/GetTemplateDocumentsParameters.java new file mode 100644 index 0000000..5bde43c --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetTemplateDocumentsParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetTemplateDocumentsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetTemplateDocumentsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetTemplateDocumentsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetTemplateDocumentsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetTemplateDocumentsParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/GetTemplateParameters.java b/src/main/java/com/alohi/signplus/models/GetTemplateParameters.java new file mode 100644 index 0000000..f38ebda --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/GetTemplateParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class GetTemplateParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class GetTemplateParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public GetTemplateParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public GetTemplateParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new GetTemplateParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/ListEnvelopesParameters.java b/src/main/java/com/alohi/signplus/models/ListEnvelopesParameters.java new file mode 100644 index 0000000..af7b4a7 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/ListEnvelopesParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListEnvelopesParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private ListEnvelopesRequest requestBody; + + // Overwrite lombok builder methods + public static class ListEnvelopesParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public ListEnvelopesParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public ListEnvelopesParametersBuilder requestBody(ListEnvelopesRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public ListEnvelopesParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new ListEnvelopesParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/ListEnvelopesRequest.java b/src/main/java/com/alohi/signplus/models/ListEnvelopesRequest.java index c2bb6b5..8fa0098 100644 --- a/src/main/java/com/alohi/signplus/models/ListEnvelopesRequest.java +++ b/src/main/java/com/alohi/signplus/models/ListEnvelopesRequest.java @@ -19,71 +19,41 @@ @Jacksonized public class ListEnvelopesRequest { - /** - * Name of the envelope - */ @JsonProperty("name") private JsonNullable name; - /** - * List of tags - */ @JsonProperty("tags") private JsonNullable> tags; - /** - * Comment of the envelope - */ @JsonProperty("comment") private JsonNullable comment; - /** - * List of envelope IDs - */ @JsonProperty("ids") private JsonNullable> ids; - /** - * List of envelope statuses - */ @JsonProperty("statuses") - private JsonNullable> statuses; + private JsonNullable> statuses; - /** - * List of folder IDs - */ @JsonProperty("folder_ids") private JsonNullable> folderIds; - /** - * Whether to only list envelopes in the root folder - */ @JsonProperty("only_root_folder") - private JsonNullable onlyRootFolder; + private JsonNullable onlyRootFolder; - /** - * Unix timestamp of the start date - */ @JsonProperty("date_from") - private JsonNullable dateFrom; + private JsonNullable dateFrom; - /** - * Unix timestamp of the end date - */ @JsonProperty("date_to") - private JsonNullable dateTo; + private JsonNullable dateTo; - /** - * Unique identifier of the user - */ @JsonProperty("uid") private JsonNullable uid; @JsonProperty("first") - private JsonNullable first; + private JsonNullable first; @JsonProperty("last") - private JsonNullable last; + private JsonNullable last; @JsonProperty("after") private JsonNullable after; @@ -91,23 +61,14 @@ public class ListEnvelopesRequest { @JsonProperty("before") private JsonNullable before; - /** - * Field to order envelopes by - */ @JsonProperty("order_field") - private JsonNullable orderField; + private JsonNullable orderField; - /** - * Whether to order envelopes in ascending order - */ @JsonProperty("ascending") - private JsonNullable ascending; + private JsonNullable ascending; - /** - * Whether to include envelopes in the trash - */ @JsonProperty("include_trash") - private JsonNullable includeTrash; + private JsonNullable includeTrash; @JsonIgnore public String getName() { @@ -130,7 +91,7 @@ public List getIds() { } @JsonIgnore - public List getStatuses() { + public List getStatuses() { return statuses.orElse(null); } @@ -140,17 +101,17 @@ public List getFolderIds() { } @JsonIgnore - public Boolean getOnlyRootFolder() { + public String getOnlyRootFolder() { return onlyRootFolder.orElse(null); } @JsonIgnore - public Long getDateFrom() { + public String getDateFrom() { return dateFrom.orElse(null); } @JsonIgnore - public Long getDateTo() { + public String getDateTo() { return dateTo.orElse(null); } @@ -160,12 +121,12 @@ public String getUid() { } @JsonIgnore - public Long getFirst() { + public String getFirst() { return first.orElse(null); } @JsonIgnore - public Long getLast() { + public String getLast() { return last.orElse(null); } @@ -180,17 +141,17 @@ public String getBefore() { } @JsonIgnore - public EnvelopeOrderField getOrderField() { + public String getOrderField() { return orderField.orElse(null); } @JsonIgnore - public Boolean getAscending() { + public String getAscending() { return ascending.orElse(null); } @JsonIgnore - public Boolean getIncludeTrash() { + public String getIncludeTrash() { return includeTrash.orElse(null); } @@ -201,9 +162,6 @@ public static class ListEnvelopesRequestBuilder { @JsonProperty("name") public ListEnvelopesRequestBuilder name(String value) { - if (value == null) { - throw new IllegalStateException("name cannot be null"); - } this.name = JsonNullable.of(value); return this; } @@ -212,9 +170,6 @@ public ListEnvelopesRequestBuilder name(String value) { @JsonProperty("tags") public ListEnvelopesRequestBuilder tags(List value) { - if (value == null) { - throw new IllegalStateException("tags cannot be null"); - } this.tags = JsonNullable.of(value); return this; } @@ -223,9 +178,6 @@ public ListEnvelopesRequestBuilder tags(List value) { @JsonProperty("comment") public ListEnvelopesRequestBuilder comment(String value) { - if (value == null) { - throw new IllegalStateException("comment cannot be null"); - } this.comment = JsonNullable.of(value); return this; } @@ -234,20 +186,14 @@ public ListEnvelopesRequestBuilder comment(String value) { @JsonProperty("ids") public ListEnvelopesRequestBuilder ids(List value) { - if (value == null) { - throw new IllegalStateException("ids cannot be null"); - } this.ids = JsonNullable.of(value); return this; } - private JsonNullable> statuses = JsonNullable.undefined(); + private JsonNullable> statuses = JsonNullable.undefined(); @JsonProperty("statuses") - public ListEnvelopesRequestBuilder statuses(List value) { - if (value == null) { - throw new IllegalStateException("statuses cannot be null"); - } + public ListEnvelopesRequestBuilder statuses(List value) { this.statuses = JsonNullable.of(value); return this; } @@ -256,42 +202,30 @@ public ListEnvelopesRequestBuilder statuses(List value) { @JsonProperty("folder_ids") public ListEnvelopesRequestBuilder folderIds(List value) { - if (value == null) { - throw new IllegalStateException("folderIds cannot be null"); - } this.folderIds = JsonNullable.of(value); return this; } - private JsonNullable onlyRootFolder = JsonNullable.undefined(); + private JsonNullable onlyRootFolder = JsonNullable.undefined(); @JsonProperty("only_root_folder") - public ListEnvelopesRequestBuilder onlyRootFolder(Boolean value) { - if (value == null) { - throw new IllegalStateException("onlyRootFolder cannot be null"); - } + public ListEnvelopesRequestBuilder onlyRootFolder(String value) { this.onlyRootFolder = JsonNullable.of(value); return this; } - private JsonNullable dateFrom = JsonNullable.undefined(); + private JsonNullable dateFrom = JsonNullable.undefined(); @JsonProperty("date_from") - public ListEnvelopesRequestBuilder dateFrom(Long value) { - if (value == null) { - throw new IllegalStateException("dateFrom cannot be null"); - } + public ListEnvelopesRequestBuilder dateFrom(String value) { this.dateFrom = JsonNullable.of(value); return this; } - private JsonNullable dateTo = JsonNullable.undefined(); + private JsonNullable dateTo = JsonNullable.undefined(); @JsonProperty("date_to") - public ListEnvelopesRequestBuilder dateTo(Long value) { - if (value == null) { - throw new IllegalStateException("dateTo cannot be null"); - } + public ListEnvelopesRequestBuilder dateTo(String value) { this.dateTo = JsonNullable.of(value); return this; } @@ -300,31 +234,22 @@ public ListEnvelopesRequestBuilder dateTo(Long value) { @JsonProperty("uid") public ListEnvelopesRequestBuilder uid(String value) { - if (value == null) { - throw new IllegalStateException("uid cannot be null"); - } this.uid = JsonNullable.of(value); return this; } - private JsonNullable first = JsonNullable.undefined(); + private JsonNullable first = JsonNullable.undefined(); @JsonProperty("first") - public ListEnvelopesRequestBuilder first(Long value) { - if (value == null) { - throw new IllegalStateException("first cannot be null"); - } + public ListEnvelopesRequestBuilder first(String value) { this.first = JsonNullable.of(value); return this; } - private JsonNullable last = JsonNullable.undefined(); + private JsonNullable last = JsonNullable.undefined(); @JsonProperty("last") - public ListEnvelopesRequestBuilder last(Long value) { - if (value == null) { - throw new IllegalStateException("last cannot be null"); - } + public ListEnvelopesRequestBuilder last(String value) { this.last = JsonNullable.of(value); return this; } @@ -333,9 +258,6 @@ public ListEnvelopesRequestBuilder last(Long value) { @JsonProperty("after") public ListEnvelopesRequestBuilder after(String value) { - if (value == null) { - throw new IllegalStateException("after cannot be null"); - } this.after = JsonNullable.of(value); return this; } @@ -344,42 +266,30 @@ public ListEnvelopesRequestBuilder after(String value) { @JsonProperty("before") public ListEnvelopesRequestBuilder before(String value) { - if (value == null) { - throw new IllegalStateException("before cannot be null"); - } this.before = JsonNullable.of(value); return this; } - private JsonNullable orderField = JsonNullable.undefined(); + private JsonNullable orderField = JsonNullable.undefined(); @JsonProperty("order_field") - public ListEnvelopesRequestBuilder orderField(EnvelopeOrderField value) { - if (value == null) { - throw new IllegalStateException("orderField cannot be null"); - } + public ListEnvelopesRequestBuilder orderField(String value) { this.orderField = JsonNullable.of(value); return this; } - private JsonNullable ascending = JsonNullable.undefined(); + private JsonNullable ascending = JsonNullable.undefined(); @JsonProperty("ascending") - public ListEnvelopesRequestBuilder ascending(Boolean value) { - if (value == null) { - throw new IllegalStateException("ascending cannot be null"); - } + public ListEnvelopesRequestBuilder ascending(String value) { this.ascending = JsonNullable.of(value); return this; } - private JsonNullable includeTrash = JsonNullable.undefined(); + private JsonNullable includeTrash = JsonNullable.undefined(); @JsonProperty("include_trash") - public ListEnvelopesRequestBuilder includeTrash(Boolean value) { - if (value == null) { - throw new IllegalStateException("includeTrash cannot be null"); - } + public ListEnvelopesRequestBuilder includeTrash(String value) { this.includeTrash = JsonNullable.of(value); return this; } diff --git a/src/main/java/com/alohi/signplus/models/ListTemplatesParameters.java b/src/main/java/com/alohi/signplus/models/ListTemplatesParameters.java new file mode 100644 index 0000000..d7da261 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/ListTemplatesParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListTemplatesParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private ListTemplatesRequest requestBody; + + // Overwrite lombok builder methods + public static class ListTemplatesParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public ListTemplatesParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public ListTemplatesParametersBuilder requestBody(ListTemplatesRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public ListTemplatesParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new ListTemplatesParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/ListTemplatesRequest.java b/src/main/java/com/alohi/signplus/models/ListTemplatesRequest.java index 2059f59..37dfb7d 100644 --- a/src/main/java/com/alohi/signplus/models/ListTemplatesRequest.java +++ b/src/main/java/com/alohi/signplus/models/ListTemplatesRequest.java @@ -19,29 +19,20 @@ @Jacksonized public class ListTemplatesRequest { - /** - * Name of the template - */ @JsonProperty("name") private JsonNullable name; - /** - * List of tag templates - */ @JsonProperty("tags") private JsonNullable> tags; - /** - * List of templates IDs - */ @JsonProperty("ids") private JsonNullable> ids; @JsonProperty("first") - private JsonNullable first; + private JsonNullable first; @JsonProperty("last") - private JsonNullable last; + private JsonNullable last; @JsonProperty("after") private JsonNullable after; @@ -49,17 +40,11 @@ public class ListTemplatesRequest { @JsonProperty("before") private JsonNullable before; - /** - * Field to order templates by - */ @JsonProperty("order_field") - private JsonNullable orderField; + private JsonNullable orderField; - /** - * Whether to order templates in ascending order - */ @JsonProperty("ascending") - private JsonNullable ascending; + private JsonNullable ascending; @JsonIgnore public String getName() { @@ -77,12 +62,12 @@ public List getIds() { } @JsonIgnore - public Long getFirst() { + public String getFirst() { return first.orElse(null); } @JsonIgnore - public Long getLast() { + public String getLast() { return last.orElse(null); } @@ -97,12 +82,12 @@ public String getBefore() { } @JsonIgnore - public TemplateOrderField getOrderField() { + public String getOrderField() { return orderField.orElse(null); } @JsonIgnore - public Boolean getAscending() { + public String getAscending() { return ascending.orElse(null); } @@ -113,9 +98,6 @@ public static class ListTemplatesRequestBuilder { @JsonProperty("name") public ListTemplatesRequestBuilder name(String value) { - if (value == null) { - throw new IllegalStateException("name cannot be null"); - } this.name = JsonNullable.of(value); return this; } @@ -124,9 +106,6 @@ public ListTemplatesRequestBuilder name(String value) { @JsonProperty("tags") public ListTemplatesRequestBuilder tags(List value) { - if (value == null) { - throw new IllegalStateException("tags cannot be null"); - } this.tags = JsonNullable.of(value); return this; } @@ -135,31 +114,22 @@ public ListTemplatesRequestBuilder tags(List value) { @JsonProperty("ids") public ListTemplatesRequestBuilder ids(List value) { - if (value == null) { - throw new IllegalStateException("ids cannot be null"); - } this.ids = JsonNullable.of(value); return this; } - private JsonNullable first = JsonNullable.undefined(); + private JsonNullable first = JsonNullable.undefined(); @JsonProperty("first") - public ListTemplatesRequestBuilder first(Long value) { - if (value == null) { - throw new IllegalStateException("first cannot be null"); - } + public ListTemplatesRequestBuilder first(String value) { this.first = JsonNullable.of(value); return this; } - private JsonNullable last = JsonNullable.undefined(); + private JsonNullable last = JsonNullable.undefined(); @JsonProperty("last") - public ListTemplatesRequestBuilder last(Long value) { - if (value == null) { - throw new IllegalStateException("last cannot be null"); - } + public ListTemplatesRequestBuilder last(String value) { this.last = JsonNullable.of(value); return this; } @@ -168,9 +138,6 @@ public ListTemplatesRequestBuilder last(Long value) { @JsonProperty("after") public ListTemplatesRequestBuilder after(String value) { - if (value == null) { - throw new IllegalStateException("after cannot be null"); - } this.after = JsonNullable.of(value); return this; } @@ -179,31 +146,22 @@ public ListTemplatesRequestBuilder after(String value) { @JsonProperty("before") public ListTemplatesRequestBuilder before(String value) { - if (value == null) { - throw new IllegalStateException("before cannot be null"); - } this.before = JsonNullable.of(value); return this; } - private JsonNullable orderField = JsonNullable.undefined(); + private JsonNullable orderField = JsonNullable.undefined(); @JsonProperty("order_field") - public ListTemplatesRequestBuilder orderField(TemplateOrderField value) { - if (value == null) { - throw new IllegalStateException("orderField cannot be null"); - } + public ListTemplatesRequestBuilder orderField(String value) { this.orderField = JsonNullable.of(value); return this; } - private JsonNullable ascending = JsonNullable.undefined(); + private JsonNullable ascending = JsonNullable.undefined(); @JsonProperty("ascending") - public ListTemplatesRequestBuilder ascending(Boolean value) { - if (value == null) { - throw new IllegalStateException("ascending cannot be null"); - } + public ListTemplatesRequestBuilder ascending(String value) { this.ascending = JsonNullable.of(value); return this; } diff --git a/src/main/java/com/alohi/signplus/models/ListWebhooksParameters.java b/src/main/java/com/alohi/signplus/models/ListWebhooksParameters.java new file mode 100644 index 0000000..c34d433 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/ListWebhooksParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListWebhooksParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private ListWebhooksRequest requestBody; + + // Overwrite lombok builder methods + public static class ListWebhooksParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public ListWebhooksParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public ListWebhooksParametersBuilder requestBody(ListWebhooksRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public ListWebhooksParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new ListWebhooksParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/ListWebhooksRequest.java b/src/main/java/com/alohi/signplus/models/ListWebhooksRequest.java index 7564966..3520a4e 100644 --- a/src/main/java/com/alohi/signplus/models/ListWebhooksRequest.java +++ b/src/main/java/com/alohi/signplus/models/ListWebhooksRequest.java @@ -18,17 +18,11 @@ @Jacksonized public class ListWebhooksRequest { - /** - * ID of the webhook - */ @JsonProperty("webhook_id") private JsonNullable webhookId; - /** - * Event of the webhook - */ @JsonProperty("event") - private JsonNullable event; + private JsonNullable event; @JsonIgnore public String getWebhookId() { @@ -36,7 +30,7 @@ public String getWebhookId() { } @JsonIgnore - public WebhookEvent getEvent() { + public String getEvent() { return event.orElse(null); } @@ -47,20 +41,14 @@ public static class ListWebhooksRequestBuilder { @JsonProperty("webhook_id") public ListWebhooksRequestBuilder webhookId(String value) { - if (value == null) { - throw new IllegalStateException("webhookId cannot be null"); - } this.webhookId = JsonNullable.of(value); return this; } - private JsonNullable event = JsonNullable.undefined(); + private JsonNullable event = JsonNullable.undefined(); @JsonProperty("event") - public ListWebhooksRequestBuilder event(WebhookEvent value) { - if (value == null) { - throw new IllegalStateException("event cannot be null"); - } + public ListWebhooksRequestBuilder event(String value) { this.event = JsonNullable.of(value); return this; } diff --git a/src/main/java/com/alohi/signplus/models/RenameEnvelopeParameters.java b/src/main/java/com/alohi/signplus/models/RenameEnvelopeParameters.java new file mode 100644 index 0000000..41aa024 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/RenameEnvelopeParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class RenameEnvelopeParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private RenameEnvelopeRequest requestBody; + + // Overwrite lombok builder methods + public static class RenameEnvelopeParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public RenameEnvelopeParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public RenameEnvelopeParametersBuilder requestBody(RenameEnvelopeRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public RenameEnvelopeParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new RenameEnvelopeParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/RenameEnvelopeRequest.java b/src/main/java/com/alohi/signplus/models/RenameEnvelopeRequest.java index 6d1ffed..d9e6688 100644 --- a/src/main/java/com/alohi/signplus/models/RenameEnvelopeRequest.java +++ b/src/main/java/com/alohi/signplus/models/RenameEnvelopeRequest.java @@ -18,9 +18,6 @@ @Jacksonized public class RenameEnvelopeRequest { - /** - * Name of the envelope - */ @JsonProperty("name") private JsonNullable name; @@ -36,9 +33,6 @@ public static class RenameEnvelopeRequestBuilder { @JsonProperty("name") public RenameEnvelopeRequestBuilder name(String value) { - if (value == null) { - throw new IllegalStateException("name cannot be null"); - } this.name = JsonNullable.of(value); return this; } diff --git a/src/main/java/com/alohi/signplus/models/RenameTemplateParameters.java b/src/main/java/com/alohi/signplus/models/RenameTemplateParameters.java new file mode 100644 index 0000000..5d889da --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/RenameTemplateParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class RenameTemplateParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private RenameTemplateRequest requestBody; + + // Overwrite lombok builder methods + public static class RenameTemplateParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public RenameTemplateParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public RenameTemplateParametersBuilder requestBody(RenameTemplateRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public RenameTemplateParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new RenameTemplateParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/RenameTemplateRequest.java b/src/main/java/com/alohi/signplus/models/RenameTemplateRequest.java index b24aeae..3de9d0f 100644 --- a/src/main/java/com/alohi/signplus/models/RenameTemplateRequest.java +++ b/src/main/java/com/alohi/signplus/models/RenameTemplateRequest.java @@ -1,12 +1,14 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,9 +18,23 @@ @Jacksonized public class RenameTemplateRequest { - /** - * Name of the template - */ - @NonNull - private String name; + @JsonProperty("name") + private JsonNullable name; + + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + // Overwrite lombok builder methods + public static class RenameTemplateRequestBuilder { + + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public RenameTemplateRequestBuilder name(String value) { + this.name = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/SendEnvelopeParameters.java b/src/main/java/com/alohi/signplus/models/SendEnvelopeParameters.java new file mode 100644 index 0000000..43d2619 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SendEnvelopeParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SendEnvelopeParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class SendEnvelopeParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public SendEnvelopeParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SendEnvelopeParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new SendEnvelopeParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersParameters.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersParameters.java new file mode 100644 index 0000000..9ad9cd7 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeAttachmentsPlaceholdersParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetEnvelopeAttachmentsPlaceholdersRequest requestBody; + + // Overwrite lombok builder methods + public static class SetEnvelopeAttachmentsPlaceholdersParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetEnvelopeAttachmentsPlaceholdersParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetEnvelopeAttachmentsPlaceholdersParametersBuilder requestBody( + SetEnvelopeAttachmentsPlaceholdersRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetEnvelopeAttachmentsPlaceholdersParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetEnvelopeAttachmentsPlaceholdersParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequest.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequest.java index 1ccc19d..7fbb377 100644 --- a/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequest.java +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequest.java @@ -1,13 +1,15 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -17,6 +19,26 @@ @Jacksonized public class SetEnvelopeAttachmentsPlaceholdersRequest { - @NonNull - private List placeholders; + @JsonProperty("placeholders") + private JsonNullable> placeholders; + + @JsonIgnore + public List getPlaceholders() { + return placeholders.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetEnvelopeAttachmentsPlaceholdersRequestBuilder { + + private JsonNullable> placeholders = + JsonNullable.undefined(); + + @JsonProperty("placeholders") + public SetEnvelopeAttachmentsPlaceholdersRequestBuilder placeholders( + List value + ) { + this.placeholders = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.java new file mode 100644 index 0000000..00f521e --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders.java @@ -0,0 +1,120 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeAttachmentsPlaceholdersRequestPlaceholders { + + @JsonProperty("recipient_id") + private JsonNullable recipientId; + + @JsonProperty("name") + private JsonNullable name; + + @JsonProperty("required") + private JsonNullable required; + + @JsonProperty("multiple") + private JsonNullable multiple; + + @JsonProperty("id") + private JsonNullable id; + + @JsonProperty("hint") + private JsonNullable hint; + + @JsonIgnore + public String getRecipientId() { + return recipientId.orElse(null); + } + + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonIgnore + public String getRequired() { + return required.orElse(null); + } + + @JsonIgnore + public String getMultiple() { + return multiple.orElse(null); + } + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + @JsonIgnore + public String getHint() { + return hint.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetEnvelopeAttachmentsPlaceholdersRequestPlaceholdersBuilder { + + private JsonNullable recipientId = JsonNullable.undefined(); + + @JsonProperty("recipient_id") + public SetEnvelopeAttachmentsPlaceholdersRequestPlaceholdersBuilder recipientId(String value) { + this.recipientId = JsonNullable.of(value); + return this; + } + + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public SetEnvelopeAttachmentsPlaceholdersRequestPlaceholdersBuilder name(String value) { + this.name = JsonNullable.of(value); + return this; + } + + private JsonNullable required = JsonNullable.undefined(); + + @JsonProperty("required") + public SetEnvelopeAttachmentsPlaceholdersRequestPlaceholdersBuilder required(String value) { + this.required = JsonNullable.of(value); + return this; + } + + private JsonNullable multiple = JsonNullable.undefined(); + + @JsonProperty("multiple") + public SetEnvelopeAttachmentsPlaceholdersRequestPlaceholdersBuilder multiple(String value) { + this.multiple = JsonNullable.of(value); + return this; + } + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public SetEnvelopeAttachmentsPlaceholdersRequestPlaceholdersBuilder id(String value) { + this.id = JsonNullable.of(value); + return this; + } + + private JsonNullable hint = JsonNullable.undefined(); + + @JsonProperty("hint") + public SetEnvelopeAttachmentsPlaceholdersRequestPlaceholdersBuilder hint(String value) { + this.hint = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsParameters.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsParameters.java new file mode 100644 index 0000000..23e98bb --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeAttachmentsSettingsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetEnvelopeAttachmentsSettingsRequest requestBody; + + // Overwrite lombok builder methods + public static class SetEnvelopeAttachmentsSettingsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetEnvelopeAttachmentsSettingsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetEnvelopeAttachmentsSettingsParametersBuilder requestBody( + SetEnvelopeAttachmentsSettingsRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetEnvelopeAttachmentsSettingsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetEnvelopeAttachmentsSettingsParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequest.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequest.java index 2c31fda..7fdad39 100644 --- a/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequest.java +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequest.java @@ -1,12 +1,14 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,6 +18,26 @@ @Jacksonized public class SetEnvelopeAttachmentsSettingsRequest { - @NonNull - private AttachmentSettings settings; + @JsonProperty("settings") + private JsonNullable settings; + + @JsonIgnore + public SetEnvelopeAttachmentsSettingsRequestSettings getSettings() { + return settings.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetEnvelopeAttachmentsSettingsRequestBuilder { + + private JsonNullable settings = + JsonNullable.undefined(); + + @JsonProperty("settings") + public SetEnvelopeAttachmentsSettingsRequestBuilder settings( + SetEnvelopeAttachmentsSettingsRequestSettings value + ) { + this.settings = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequestSettings.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequestSettings.java new file mode 100644 index 0000000..82d4c10 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeAttachmentsSettingsRequestSettings.java @@ -0,0 +1,40 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeAttachmentsSettingsRequestSettings { + + @JsonProperty("visible_to_recipients") + private JsonNullable visibleToRecipients; + + @JsonIgnore + public String getVisibleToRecipients() { + return visibleToRecipients.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetEnvelopeAttachmentsSettingsRequestSettingsBuilder { + + private JsonNullable visibleToRecipients = JsonNullable.undefined(); + + @JsonProperty("visible_to_recipients") + public SetEnvelopeAttachmentsSettingsRequestSettingsBuilder visibleToRecipients(String value) { + this.visibleToRecipients = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeCommentParameters.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeCommentParameters.java new file mode 100644 index 0000000..964594f --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeCommentParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeCommentParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetEnvelopeCommentRequest requestBody; + + // Overwrite lombok builder methods + public static class SetEnvelopeCommentParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetEnvelopeCommentParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetEnvelopeCommentParametersBuilder requestBody(SetEnvelopeCommentRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetEnvelopeCommentParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetEnvelopeCommentParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeCommentRequest.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeCommentRequest.java index 91e08af..c7bf225 100644 --- a/src/main/java/com/alohi/signplus/models/SetEnvelopeCommentRequest.java +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeCommentRequest.java @@ -1,12 +1,14 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,9 +18,23 @@ @Jacksonized public class SetEnvelopeCommentRequest { - /** - * Comment for the envelope - */ - @NonNull - private String comment; + @JsonProperty("comment") + private JsonNullable comment; + + @JsonIgnore + public String getComment() { + return comment.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetEnvelopeCommentRequestBuilder { + + private JsonNullable comment = JsonNullable.undefined(); + + @JsonProperty("comment") + public SetEnvelopeCommentRequestBuilder comment(String value) { + this.comment = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsParameters.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsParameters.java new file mode 100644 index 0000000..ab0e036 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeDynamicFieldsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetEnvelopeDynamicFieldsRequest requestBody; + + // Overwrite lombok builder methods + public static class SetEnvelopeDynamicFieldsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetEnvelopeDynamicFieldsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetEnvelopeDynamicFieldsParametersBuilder requestBody( + SetEnvelopeDynamicFieldsRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetEnvelopeDynamicFieldsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetEnvelopeDynamicFieldsParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsRequest.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsRequest.java index 6c31910..acfd9b3 100644 --- a/src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsRequest.java +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeDynamicFieldsRequest.java @@ -1,14 +1,15 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,10 +19,23 @@ @Jacksonized public class SetEnvelopeDynamicFieldsRequest { - /** - * List of dynamic fields - */ - @NonNull @JsonProperty("dynamic_fields") - private List dynamicFields; + private JsonNullable> dynamicFields; + + @JsonIgnore + public List getDynamicFields() { + return dynamicFields.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetEnvelopeDynamicFieldsRequestBuilder { + + private JsonNullable> dynamicFields = JsonNullable.undefined(); + + @JsonProperty("dynamic_fields") + public SetEnvelopeDynamicFieldsRequestBuilder dynamicFields(List value) { + this.dynamicFields = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateParameters.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateParameters.java new file mode 100644 index 0000000..3c2c353 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeExpirationDateParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetEnvelopeExpirationDateRequest requestBody; + + // Overwrite lombok builder methods + public static class SetEnvelopeExpirationDateParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetEnvelopeExpirationDateParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetEnvelopeExpirationDateParametersBuilder requestBody( + SetEnvelopeExpirationDateRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetEnvelopeExpirationDateParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetEnvelopeExpirationDateParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateRequest.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateRequest.java new file mode 100644 index 0000000..8228282 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeExpirationDateRequest.java @@ -0,0 +1,40 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeExpirationDateRequest { + + @JsonProperty("expires_at") + private JsonNullable expiresAt; + + @JsonIgnore + public String getExpiresAt() { + return expiresAt.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetEnvelopeExpirationDateRequestBuilder { + + private JsonNullable expiresAt = JsonNullable.undefined(); + + @JsonProperty("expires_at") + public SetEnvelopeExpirationDateRequestBuilder expiresAt(String value) { + this.expiresAt = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelParameters.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelParameters.java new file mode 100644 index 0000000..16b7071 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeLegalityLevelParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetEnvelopeLegalityLevelRequest requestBody; + + // Overwrite lombok builder methods + public static class SetEnvelopeLegalityLevelParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetEnvelopeLegalityLevelParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetEnvelopeLegalityLevelParametersBuilder requestBody( + SetEnvelopeLegalityLevelRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetEnvelopeLegalityLevelParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetEnvelopeLegalityLevelParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelRequest.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelRequest.java index f596db5..048b5b0 100644 --- a/src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelRequest.java +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeLegalityLevelRequest.java @@ -18,27 +18,21 @@ @Jacksonized public class SetEnvelopeLegalityLevelRequest { - /** - * Legal level of the envelope (SES is Simple Electronic Signature, QES_EIDAS is Qualified Electronic Signature, QES_ZERTES is Qualified Electronic Signature with Zertes) - */ @JsonProperty("legality_level") - private JsonNullable legalityLevel; + private JsonNullable legalityLevel; @JsonIgnore - public EnvelopeLegalityLevel getLegalityLevel() { + public String getLegalityLevel() { return legalityLevel.orElse(null); } // Overwrite lombok builder methods public static class SetEnvelopeLegalityLevelRequestBuilder { - private JsonNullable legalityLevel = JsonNullable.undefined(); + private JsonNullable legalityLevel = JsonNullable.undefined(); @JsonProperty("legality_level") - public SetEnvelopeLegalityLevelRequestBuilder legalityLevel(EnvelopeLegalityLevel value) { - if (value == null) { - throw new IllegalStateException("legalityLevel cannot be null"); - } + public SetEnvelopeLegalityLevelRequestBuilder legalityLevel(String value) { this.legalityLevel = JsonNullable.of(value); return this; } diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationParameters.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationParameters.java new file mode 100644 index 0000000..15a2d0f --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeNotificationParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetEnvelopeNotificationRequest requestBody; + + // Overwrite lombok builder methods + public static class SetEnvelopeNotificationParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetEnvelopeNotificationParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetEnvelopeNotificationParametersBuilder requestBody( + SetEnvelopeNotificationRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetEnvelopeNotificationParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetEnvelopeNotificationParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationRequest.java b/src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationRequest.java new file mode 100644 index 0000000..ccefd5a --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetEnvelopeNotificationRequest.java @@ -0,0 +1,72 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetEnvelopeNotificationRequest { + + @JsonProperty("subject") + private JsonNullable subject; + + @JsonProperty("message") + private JsonNullable message; + + @JsonProperty("reminder_interval") + private JsonNullable reminderInterval; + + @JsonIgnore + public String getSubject() { + return subject.orElse(null); + } + + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonIgnore + public String getReminderInterval() { + return reminderInterval.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetEnvelopeNotificationRequestBuilder { + + private JsonNullable subject = JsonNullable.undefined(); + + @JsonProperty("subject") + public SetEnvelopeNotificationRequestBuilder subject(String value) { + this.subject = JsonNullable.of(value); + return this; + } + + private JsonNullable message = JsonNullable.undefined(); + + @JsonProperty("message") + public SetEnvelopeNotificationRequestBuilder message(String value) { + this.message = JsonNullable.of(value); + return this; + } + + private JsonNullable reminderInterval = JsonNullable.undefined(); + + @JsonProperty("reminder_interval") + public SetEnvelopeNotificationRequestBuilder reminderInterval(String value) { + this.reminderInterval = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersParameters.java b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersParameters.java new file mode 100644 index 0000000..afacaad --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetTemplateAttachmentsPlaceholdersParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetTemplateAttachmentsPlaceholdersRequest requestBody; + + // Overwrite lombok builder methods + public static class SetTemplateAttachmentsPlaceholdersParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetTemplateAttachmentsPlaceholdersParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetTemplateAttachmentsPlaceholdersParametersBuilder requestBody( + SetTemplateAttachmentsPlaceholdersRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetTemplateAttachmentsPlaceholdersParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetTemplateAttachmentsPlaceholdersParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequest.java b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequest.java new file mode 100644 index 0000000..8a82b33 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequest.java @@ -0,0 +1,44 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetTemplateAttachmentsPlaceholdersRequest { + + @JsonProperty("placeholders") + private JsonNullable> placeholders; + + @JsonIgnore + public List getPlaceholders() { + return placeholders.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetTemplateAttachmentsPlaceholdersRequestBuilder { + + private JsonNullable> placeholders = + JsonNullable.undefined(); + + @JsonProperty("placeholders") + public SetTemplateAttachmentsPlaceholdersRequestBuilder placeholders( + List value + ) { + this.placeholders = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.java b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.java new file mode 100644 index 0000000..50dc27d --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsPlaceholdersRequestPlaceholders.java @@ -0,0 +1,120 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetTemplateAttachmentsPlaceholdersRequestPlaceholders { + + @JsonProperty("recipient_id") + private JsonNullable recipientId; + + @JsonProperty("name") + private JsonNullable name; + + @JsonProperty("required") + private JsonNullable required; + + @JsonProperty("multiple") + private JsonNullable multiple; + + @JsonProperty("id") + private JsonNullable id; + + @JsonProperty("hint") + private JsonNullable hint; + + @JsonIgnore + public String getRecipientId() { + return recipientId.orElse(null); + } + + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonIgnore + public String getRequired() { + return required.orElse(null); + } + + @JsonIgnore + public String getMultiple() { + return multiple.orElse(null); + } + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + @JsonIgnore + public String getHint() { + return hint.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetTemplateAttachmentsPlaceholdersRequestPlaceholdersBuilder { + + private JsonNullable recipientId = JsonNullable.undefined(); + + @JsonProperty("recipient_id") + public SetTemplateAttachmentsPlaceholdersRequestPlaceholdersBuilder recipientId(String value) { + this.recipientId = JsonNullable.of(value); + return this; + } + + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public SetTemplateAttachmentsPlaceholdersRequestPlaceholdersBuilder name(String value) { + this.name = JsonNullable.of(value); + return this; + } + + private JsonNullable required = JsonNullable.undefined(); + + @JsonProperty("required") + public SetTemplateAttachmentsPlaceholdersRequestPlaceholdersBuilder required(String value) { + this.required = JsonNullable.of(value); + return this; + } + + private JsonNullable multiple = JsonNullable.undefined(); + + @JsonProperty("multiple") + public SetTemplateAttachmentsPlaceholdersRequestPlaceholdersBuilder multiple(String value) { + this.multiple = JsonNullable.of(value); + return this; + } + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public SetTemplateAttachmentsPlaceholdersRequestPlaceholdersBuilder id(String value) { + this.id = JsonNullable.of(value); + return this; + } + + private JsonNullable hint = JsonNullable.undefined(); + + @JsonProperty("hint") + public SetTemplateAttachmentsPlaceholdersRequestPlaceholdersBuilder hint(String value) { + this.hint = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsParameters.java b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsParameters.java new file mode 100644 index 0000000..30fac80 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetTemplateAttachmentsSettingsParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetTemplateAttachmentsSettingsRequest requestBody; + + // Overwrite lombok builder methods + public static class SetTemplateAttachmentsSettingsParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetTemplateAttachmentsSettingsParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetTemplateAttachmentsSettingsParametersBuilder requestBody( + SetTemplateAttachmentsSettingsRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetTemplateAttachmentsSettingsParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetTemplateAttachmentsSettingsParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequest.java b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequest.java new file mode 100644 index 0000000..8f4c092 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequest.java @@ -0,0 +1,43 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetTemplateAttachmentsSettingsRequest { + + @JsonProperty("settings") + private JsonNullable settings; + + @JsonIgnore + public SetTemplateAttachmentsSettingsRequestSettings getSettings() { + return settings.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetTemplateAttachmentsSettingsRequestBuilder { + + private JsonNullable settings = + JsonNullable.undefined(); + + @JsonProperty("settings") + public SetTemplateAttachmentsSettingsRequestBuilder settings( + SetTemplateAttachmentsSettingsRequestSettings value + ) { + this.settings = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequestSettings.java b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequestSettings.java new file mode 100644 index 0000000..645457a --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetTemplateAttachmentsSettingsRequestSettings.java @@ -0,0 +1,40 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetTemplateAttachmentsSettingsRequestSettings { + + @JsonProperty("visible_to_recipients") + private JsonNullable visibleToRecipients; + + @JsonIgnore + public String getVisibleToRecipients() { + return visibleToRecipients.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetTemplateAttachmentsSettingsRequestSettingsBuilder { + + private JsonNullable visibleToRecipients = JsonNullable.undefined(); + + @JsonProperty("visible_to_recipients") + public SetTemplateAttachmentsSettingsRequestSettingsBuilder visibleToRecipients(String value) { + this.visibleToRecipients = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateCommentParameters.java b/src/main/java/com/alohi/signplus/models/SetTemplateCommentParameters.java new file mode 100644 index 0000000..1fbc060 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetTemplateCommentParameters.java @@ -0,0 +1,62 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetTemplateCommentParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetTemplateCommentRequest requestBody; + + // Overwrite lombok builder methods + public static class SetTemplateCommentParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetTemplateCommentParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetTemplateCommentParametersBuilder requestBody(SetTemplateCommentRequest requestBody) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetTemplateCommentParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetTemplateCommentParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateCommentRequest.java b/src/main/java/com/alohi/signplus/models/SetTemplateCommentRequest.java index 9be02e6..197f3ee 100644 --- a/src/main/java/com/alohi/signplus/models/SetTemplateCommentRequest.java +++ b/src/main/java/com/alohi/signplus/models/SetTemplateCommentRequest.java @@ -1,12 +1,14 @@ package com.alohi.signplus.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NonNull; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,9 +18,23 @@ @Jacksonized public class SetTemplateCommentRequest { - /** - * Comment for the template - */ - @NonNull - private String comment; + @JsonProperty("comment") + private JsonNullable comment; + + @JsonIgnore + public String getComment() { + return comment.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetTemplateCommentRequestBuilder { + + private JsonNullable comment = JsonNullable.undefined(); + + @JsonProperty("comment") + public SetTemplateCommentRequestBuilder comment(String value) { + this.comment = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateNotificationParameters.java b/src/main/java/com/alohi/signplus/models/SetTemplateNotificationParameters.java new file mode 100644 index 0000000..14ded24 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetTemplateNotificationParameters.java @@ -0,0 +1,64 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetTemplateNotificationParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + @JsonInclude(JsonInclude.Include.ALWAYS) + private SetTemplateNotificationRequest requestBody; + + // Overwrite lombok builder methods + public static class SetTemplateNotificationParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + /** + * Flag to track if the requestBody property has been set. + */ + private boolean requestBody$set = false; + + public SetTemplateNotificationParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public SetTemplateNotificationParametersBuilder requestBody( + SetTemplateNotificationRequest requestBody + ) { + this.requestBody$set = true; + this.requestBody = requestBody; + return this; + } + + public SetTemplateNotificationParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + if (!requestBody$set) { + throw new IllegalStateException("requestBody is required"); + } + return new SetTemplateNotificationParameters(accept, requestBody); + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SetTemplateNotificationRequest.java b/src/main/java/com/alohi/signplus/models/SetTemplateNotificationRequest.java new file mode 100644 index 0000000..66fccb7 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SetTemplateNotificationRequest.java @@ -0,0 +1,72 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SetTemplateNotificationRequest { + + @JsonProperty("subject") + private JsonNullable subject; + + @JsonProperty("message") + private JsonNullable message; + + @JsonProperty("reminder_interval") + private JsonNullable reminderInterval; + + @JsonIgnore + public String getSubject() { + return subject.orElse(null); + } + + @JsonIgnore + public String getMessage() { + return message.orElse(null); + } + + @JsonIgnore + public String getReminderInterval() { + return reminderInterval.orElse(null); + } + + // Overwrite lombok builder methods + public static class SetTemplateNotificationRequestBuilder { + + private JsonNullable subject = JsonNullable.undefined(); + + @JsonProperty("subject") + public SetTemplateNotificationRequestBuilder subject(String value) { + this.subject = JsonNullable.of(value); + return this; + } + + private JsonNullable message = JsonNullable.undefined(); + + @JsonProperty("message") + public SetTemplateNotificationRequestBuilder message(String value) { + this.message = JsonNullable.of(value); + return this; + } + + private JsonNullable reminderInterval = JsonNullable.undefined(); + + @JsonProperty("reminder_interval") + public SetTemplateNotificationRequestBuilder reminderInterval(String value) { + this.reminderInterval = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SigningStepsRecipients1.java b/src/main/java/com/alohi/signplus/models/SigningStepsRecipients1.java new file mode 100644 index 0000000..25a386d --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SigningStepsRecipients1.java @@ -0,0 +1,120 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SigningStepsRecipients1 { + + @JsonProperty("name") + private JsonNullable name; + + @JsonProperty("email") + private JsonNullable email; + + @JsonProperty("role") + private JsonNullable role; + + @JsonProperty("id") + private JsonNullable id; + + @JsonProperty("uid") + private JsonNullable uid; + + @JsonProperty("verification") + private JsonNullable verification; + + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonIgnore + public String getEmail() { + return email.orElse(null); + } + + @JsonIgnore + public String getRole() { + return role.orElse(null); + } + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + @JsonIgnore + public String getUid() { + return uid.orElse(null); + } + + @JsonIgnore + public Verification getVerification() { + return verification.orElse(null); + } + + // Overwrite lombok builder methods + public static class SigningStepsRecipients1Builder { + + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public SigningStepsRecipients1Builder name(String value) { + this.name = JsonNullable.of(value); + return this; + } + + private JsonNullable email = JsonNullable.undefined(); + + @JsonProperty("email") + public SigningStepsRecipients1Builder email(String value) { + this.email = JsonNullable.of(value); + return this; + } + + private JsonNullable role = JsonNullable.undefined(); + + @JsonProperty("role") + public SigningStepsRecipients1Builder role(String value) { + this.role = JsonNullable.of(value); + return this; + } + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public SigningStepsRecipients1Builder id(String value) { + this.id = JsonNullable.of(value); + return this; + } + + private JsonNullable uid = JsonNullable.undefined(); + + @JsonProperty("uid") + public SigningStepsRecipients1Builder uid(String value) { + this.uid = JsonNullable.of(value); + return this; + } + + private JsonNullable verification = JsonNullable.undefined(); + + @JsonProperty("verification") + public SigningStepsRecipients1Builder verification(Verification value) { + this.verification = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/SigningStepsRecipients2.java b/src/main/java/com/alohi/signplus/models/SigningStepsRecipients2.java new file mode 100644 index 0000000..0b22aa4 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/SigningStepsRecipients2.java @@ -0,0 +1,104 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class SigningStepsRecipients2 { + + @JsonProperty("id") + private JsonNullable id; + + @JsonProperty("uid") + private JsonNullable uid; + + @JsonProperty("name") + private JsonNullable name; + + @JsonProperty("email") + private JsonNullable email; + + @JsonProperty("role") + private JsonNullable role; + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + @JsonIgnore + public String getUid() { + return uid.orElse(null); + } + + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + @JsonIgnore + public String getEmail() { + return email.orElse(null); + } + + @JsonIgnore + public String getRole() { + return role.orElse(null); + } + + // Overwrite lombok builder methods + public static class SigningStepsRecipients2Builder { + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public SigningStepsRecipients2Builder id(String value) { + this.id = JsonNullable.of(value); + return this; + } + + private JsonNullable uid = JsonNullable.undefined(); + + @JsonProperty("uid") + public SigningStepsRecipients2Builder uid(String value) { + this.uid = JsonNullable.of(value); + return this; + } + + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public SigningStepsRecipients2Builder name(String value) { + this.name = JsonNullable.of(value); + return this; + } + + private JsonNullable email = JsonNullable.undefined(); + + @JsonProperty("email") + public SigningStepsRecipients2Builder email(String value) { + this.email = JsonNullable.of(value); + return this; + } + + private JsonNullable role = JsonNullable.undefined(); + + @JsonProperty("role") + public SigningStepsRecipients2Builder role(String value) { + this.role = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/TextFont1.java b/src/main/java/com/alohi/signplus/models/TextFont1.java new file mode 100644 index 0000000..e829b59 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/TextFont1.java @@ -0,0 +1,72 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class TextFont1 { + + @JsonProperty("family") + private JsonNullable family; + + @JsonProperty("italic") + private JsonNullable italic; + + @JsonProperty("bold") + private JsonNullable bold; + + @JsonIgnore + public String getFamily() { + return family.orElse(null); + } + + @JsonIgnore + public String getItalic() { + return italic.orElse(null); + } + + @JsonIgnore + public String getBold() { + return bold.orElse(null); + } + + // Overwrite lombok builder methods + public static class TextFont1Builder { + + private JsonNullable family = JsonNullable.undefined(); + + @JsonProperty("family") + public TextFont1Builder family(String value) { + this.family = JsonNullable.of(value); + return this; + } + + private JsonNullable italic = JsonNullable.undefined(); + + @JsonProperty("italic") + public TextFont1Builder italic(String value) { + this.italic = JsonNullable.of(value); + return this; + } + + private JsonNullable bold = JsonNullable.undefined(); + + @JsonProperty("bold") + public TextFont1Builder bold(String value) { + this.bold = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/TextFont2.java b/src/main/java/com/alohi/signplus/models/TextFont2.java new file mode 100644 index 0000000..8bb9738 --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/TextFont2.java @@ -0,0 +1,72 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class TextFont2 { + + @JsonProperty("family") + private JsonNullable family; + + @JsonProperty("italic") + private JsonNullable italic; + + @JsonProperty("bold") + private JsonNullable bold; + + @JsonIgnore + public String getFamily() { + return family.orElse(null); + } + + @JsonIgnore + public String getItalic() { + return italic.orElse(null); + } + + @JsonIgnore + public String getBold() { + return bold.orElse(null); + } + + // Overwrite lombok builder methods + public static class TextFont2Builder { + + private JsonNullable family = JsonNullable.undefined(); + + @JsonProperty("family") + public TextFont2Builder family(String value) { + this.family = JsonNullable.of(value); + return this; + } + + private JsonNullable italic = JsonNullable.undefined(); + + @JsonProperty("italic") + public TextFont2Builder italic(String value) { + this.italic = JsonNullable.of(value); + return this; + } + + private JsonNullable bold = JsonNullable.undefined(); + + @JsonProperty("bold") + public TextFont2Builder bold(String value) { + this.bold = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/Verification.java b/src/main/java/com/alohi/signplus/models/Verification.java new file mode 100644 index 0000000..0eb8a0e --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/Verification.java @@ -0,0 +1,56 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class Verification { + + @JsonProperty("type") + private JsonNullable type; + + @JsonProperty("value") + private JsonNullable value; + + @JsonIgnore + public String getType() { + return type.orElse(null); + } + + @JsonIgnore + public String getValue() { + return value.orElse(null); + } + + // Overwrite lombok builder methods + public static class VerificationBuilder { + + private JsonNullable type = JsonNullable.undefined(); + + @JsonProperty("type") + public VerificationBuilder type(String value) { + this.type = JsonNullable.of(value); + return this; + } + + private JsonNullable value = JsonNullable.undefined(); + + @JsonProperty("value") + public VerificationBuilder value(String value) { + this.value = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/alohi/signplus/models/VoidEnvelopeParameters.java b/src/main/java/com/alohi/signplus/models/VoidEnvelopeParameters.java new file mode 100644 index 0000000..3e3d24c --- /dev/null +++ b/src/main/java/com/alohi/signplus/models/VoidEnvelopeParameters.java @@ -0,0 +1,45 @@ +package com.alohi.signplus.models; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class VoidEnvelopeParameters { + + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonProperty("Accept") + private String accept; + + // Overwrite lombok builder methods + public static class VoidEnvelopeParametersBuilder { + + /** + * Flag to track if the accept property has been set. + */ + private boolean accept$set = false; + + public VoidEnvelopeParametersBuilder accept(String accept) { + this.accept$set = true; + this.accept = accept; + return this; + } + + public VoidEnvelopeParameters build() { + if (!accept$set) { + throw new IllegalStateException("accept is required"); + } + return new VoidEnvelopeParameters(accept); + } + } +} diff --git a/src/main/java/com/alohi/signplus/services/AnnotationIdService.java b/src/main/java/com/alohi/signplus/services/AnnotationIdService.java new file mode 100644 index 0000000..9c9f70c --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/AnnotationIdService.java @@ -0,0 +1,135 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * AnnotationIdService Service + */ +public class AnnotationIdService extends BaseService { + + private RequestConfig deleteEnvelopeAnnotationConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of AnnotationIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public AnnotationIdService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code deleteEnvelopeAnnotation}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public AnnotationIdService setDeleteEnvelopeAnnotationConfig(RequestConfig config) { + this.deleteEnvelopeAnnotationConfig = config; + return this; + } + + /** + * Delete envelope annotation + * + * @param envelopeId String + * @param annotationId String + * @return response of {@code Object} + */ + public Object deleteEnvelopeAnnotation(@NonNull String envelopeId, @NonNull String annotationId) + throws ApiError { + return this.deleteEnvelopeAnnotation(envelopeId, annotationId, null); + } + + /** + * Delete envelope annotation + * + * @param envelopeId String + * @param annotationId String + * @return response of {@code Object} + */ + public Object deleteEnvelopeAnnotation( + @NonNull String envelopeId, + @NonNull String annotationId, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.deleteEnvelopeAnnotationConfig, requestConfig); + Request request = + this.buildDeleteEnvelopeAnnotationRequest(envelopeId, annotationId, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Delete envelope annotation + * + * @param envelopeId String + * @param annotationId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteEnvelopeAnnotationAsync( + @NonNull String envelopeId, + @NonNull String annotationId + ) throws ApiError { + return this.deleteEnvelopeAnnotationAsync(envelopeId, annotationId, null); + } + + /** + * Delete envelope annotation + * + * @param envelopeId String + * @param annotationId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteEnvelopeAnnotationAsync( + @NonNull String envelopeId, + @NonNull String annotationId, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.deleteEnvelopeAnnotationConfig, requestConfig); + Request request = + this.buildDeleteEnvelopeAnnotationRequest(envelopeId, annotationId, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildDeleteEnvelopeAnnotationRequest( + @NonNull String envelopeId, + @NonNull String annotationId, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.DELETE, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/annotation/{annotation_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setPathParameter("annotation_id", annotationId) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/AnnotationService.java b/src/main/java/com/alohi/signplus/services/AnnotationService.java new file mode 100644 index 0000000..31e75ee --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/AnnotationService.java @@ -0,0 +1,139 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.AddEnvelopeAnnotationParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * AnnotationService Service + */ +public class AnnotationService extends BaseService { + + private RequestConfig addEnvelopeAnnotationConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of AnnotationService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public AnnotationService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code addEnvelopeAnnotation}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public AnnotationService setAddEnvelopeAnnotationConfig(RequestConfig config) { + this.addEnvelopeAnnotationConfig = config; + return this; + } + + /** + * Add envelope annotation + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeAnnotationParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object addEnvelopeAnnotation( + @NonNull String envelopeId, + @NonNull AddEnvelopeAnnotationParameters requestParameters + ) throws ApiError { + return this.addEnvelopeAnnotation(envelopeId, requestParameters, null); + } + + /** + * Add envelope annotation + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeAnnotationParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object addEnvelopeAnnotation( + @NonNull String envelopeId, + @NonNull AddEnvelopeAnnotationParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addEnvelopeAnnotationConfig, requestConfig); + Request request = + this.buildAddEnvelopeAnnotationRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Add envelope annotation + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeAnnotationParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addEnvelopeAnnotationAsync( + @NonNull String envelopeId, + @NonNull AddEnvelopeAnnotationParameters requestParameters + ) throws ApiError { + return this.addEnvelopeAnnotationAsync(envelopeId, requestParameters, null); + } + + /** + * Add envelope annotation + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeAnnotationParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addEnvelopeAnnotationAsync( + @NonNull String envelopeId, + @NonNull AddEnvelopeAnnotationParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addEnvelopeAnnotationConfig, requestConfig); + Request request = + this.buildAddEnvelopeAnnotationRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildAddEnvelopeAnnotationRequest( + @NonNull String envelopeId, + @NonNull AddEnvelopeAnnotationParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/annotation" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/AnnotationsService.java b/src/main/java/com/alohi/signplus/services/AnnotationsService.java new file mode 100644 index 0000000..5512b1e --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/AnnotationsService.java @@ -0,0 +1,138 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetEnvelopeAnnotationsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * AnnotationsService Service + */ +public class AnnotationsService extends BaseService { + + private RequestConfig getEnvelopeAnnotationsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of AnnotationsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public AnnotationsService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getEnvelopeAnnotations}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public AnnotationsService setGetEnvelopeAnnotationsConfig(RequestConfig config) { + this.getEnvelopeAnnotationsConfig = config; + return this; + } + + /** + * Get envelope annotations + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeAnnotationsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelopeAnnotations( + @NonNull String envelopeId, + @NonNull GetEnvelopeAnnotationsParameters requestParameters + ) throws ApiError { + return this.getEnvelopeAnnotations(envelopeId, requestParameters, null); + } + + /** + * Get envelope annotations + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeAnnotationsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelopeAnnotations( + @NonNull String envelopeId, + @NonNull GetEnvelopeAnnotationsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getEnvelopeAnnotationsConfig, requestConfig); + Request request = + this.buildGetEnvelopeAnnotationsRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get envelope annotations + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeAnnotationsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeAnnotationsAsync( + @NonNull String envelopeId, + @NonNull GetEnvelopeAnnotationsParameters requestParameters + ) throws ApiError { + return this.getEnvelopeAnnotationsAsync(envelopeId, requestParameters, null); + } + + /** + * Get envelope annotations + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeAnnotationsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeAnnotationsAsync( + @NonNull String envelopeId, + @NonNull GetEnvelopeAnnotationsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getEnvelopeAnnotationsConfig, requestConfig); + Request request = + this.buildGetEnvelopeAnnotationsRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetEnvelopeAnnotationsRequest( + @NonNull String envelopeId, + @NonNull GetEnvelopeAnnotationsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/annotations" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/BaseService.java b/src/main/java/com/alohi/signplus/services/BaseService.java index eb02e64..e14c8bb 100644 --- a/src/main/java/com/alohi/signplus/services/BaseService.java +++ b/src/main/java/com/alohi/signplus/services/BaseService.java @@ -1,18 +1,23 @@ package com.alohi.signplus.services; +import com.alohi.signplus.config.RequestConfig; import com.alohi.signplus.config.SignplusConfig; import com.alohi.signplus.exceptions.ApiError; import com.alohi.signplus.http.Environment; import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.interceptors.RetryInterceptor; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.lang.reflect.Constructor; import java.net.SocketTimeoutException; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; import okhttp3.Call; @@ -22,13 +27,27 @@ import okhttp3.Response; import org.jetbrains.annotations.NotNull; +/** + * Base service class that all API service classes extend. + * Provides common functionality including HTTP request execution, error handling, + * and configuration management. + */ public class BaseService { private static final Logger logger = Logger.getLogger(BaseService.class.getName()); protected OkHttpClient httpClient; protected SignplusConfig config; protected Map> errorMappings; + protected ErrorMapping defaultErrorMapping; + /** Service-level configuration overrides */ + protected RequestConfig serviceConfig; + + /** + * Internal class for mapping HTTP status codes to error models and exception types. + * + * @param The error model type + */ private static class ErrorMapping { private final Class modelClass; @@ -40,24 +59,178 @@ public ErrorMapping(Class modelClass, Class exceptionClas } } + /** + * Constructs a new BaseService instance. + * + * @param httpClient The HTTP client to use for making requests + * @param config The SDK configuration + */ public BaseService(OkHttpClient httpClient, SignplusConfig config) { this.httpClient = httpClient; this.config = config; this.errorMappings = new HashMap<>(); } + /** + * Sets the base URL for API requests. + * + * @param baseUrl The base URL to use + */ public void setBaseUrl(String baseUrl) { this.config.setBaseUrl(baseUrl); } + /** + * Sets the environment for API requests. + * + * @param environment The environment to use (e.g., DEFAULT, PRODUCTION, STAGING) + */ public void setEnvironment(Environment environment) { this.config.setEnvironment(environment); } - protected void addErrorMapping(int status, Class modelClass, Class exceptionClass) { + /** + * Sets service-level configuration that applies to all methods in this service. + * Service-level overrides take precedence over SDK-level configuration but are + * overridden by method-level and request-level configurations. + * + * @param config The configuration overrides to apply at the service level + */ + public void setConfig(RequestConfig config) { + this.serviceConfig = config; + } + + /** + * Resolves configuration from the hierarchy: requestConfig > methodConfig > serviceConfig. + * Merges override configs into a single {@link RequestConfig}. SDK defaults are used as + * fallbacks where these overrides are not provided. + * + * @param methodConfig Method-level configuration override (may be null) + * @param requestConfig Request-level configuration override (may be null) + * @return Merged configuration with all overrides applied + */ + protected RequestConfig getResolvedConfig( + RequestConfig methodConfig, + RequestConfig requestConfig + ) { + return RequestConfig.merge(this.serviceConfig, methodConfig, requestConfig); + } + + /** + * Resolves the base URL from the configuration hierarchy. + * Priority: resolvedConfig.baseUrl > sdkConfig.baseUrl > resolvedConfig.environment > defaultEnvironment. + * + * @param resolvedConfig The merged request configuration (may be null) + * @param defaultEnvironment The default environment for this method + * @return The resolved base URL + */ + protected String resolveBaseUrl(RequestConfig resolvedConfig, Environment defaultEnvironment) { + if (resolvedConfig != null && resolvedConfig.getBaseUrl() != null) { + return resolvedConfig.getBaseUrl(); + } + if (this.config.getBaseUrl() != null) { + return this.config.getBaseUrl(); + } + if (resolvedConfig != null && resolvedConfig.getEnvironment() != null) { + return resolvedConfig.getEnvironment().getUrl(); + } + return defaultEnvironment.getUrl(); + } + + /** + * Resolves the access token from the configuration hierarchy. + * + * @param resolvedConfig The merged request configuration (may be null) + * @return The resolved access token + */ + protected String resolveAccessToken(RequestConfig resolvedConfig) { + if (resolvedConfig != null && resolvedConfig.getAccessToken() != null) { + return resolvedConfig.getAccessToken(); + } + return this.config.getAccessToken(); + } + + /** + * Creates an OkHttpClient with per-request overrides from the resolved configuration. + * Applies timeout and/or retry config overrides when present. + * If no overrides are present, returns the original client. + * + * @param resolvedConfig The resolved request configuration + * @return An OkHttpClient with the appropriate overrides applied + */ + protected OkHttpClient getHttpClientForRequest(RequestConfig resolvedConfig) { + if (resolvedConfig == null) { + return this.httpClient; + } + + boolean needsRebuild = resolvedConfig.getTimeout() != null; + needsRebuild = needsRebuild || resolvedConfig.getRetryConfig() != null; + + if (!needsRebuild) { + return this.httpClient; + } + + OkHttpClient.Builder builder = this.httpClient.newBuilder(); + + if (resolvedConfig.getTimeout() != null) { + builder.readTimeout(resolvedConfig.getTimeout(), TimeUnit.MILLISECONDS); + } + + if (resolvedConfig.getRetryConfig() != null) { + List interceptors = new ArrayList<>(builder.interceptors()); + interceptors.replaceAll(i -> + i instanceof RetryInterceptor ? new RetryInterceptor(resolvedConfig.getRetryConfig()) : i + ); + builder.interceptors().clear(); + interceptors.forEach(builder::addInterceptor); + } + + return builder.build(); + } + + /** + * Registers an error mapping for a specific HTTP status code. + * When a response with this status is received, the SDK will deserialize the error + * response to the specified model class and throw the specified exception type. + * + * @param The error model type + * @param status The HTTP status code to map + * @param modelClass The class to deserialize the error response into + * @param exceptionClass The exception class to throw + */ + protected void addErrorMapping( + int status, + Class modelClass, + Class exceptionClass + ) { this.errorMappings.put(status, new ErrorMapping<>(modelClass, exceptionClass)); } + /** + * Registers a default error mapping for unmapped HTTP status codes. + * When a response with an unmapped status is received the SDK will deserialize the error + * response to the specified model class and throw the specified exception type. + * + * @param The error model type + * @param modelClass The class to deserialize the error response into + * @param exceptionClass The exception class to throw + */ + protected void addDefaultErrorMapping( + Class modelClass, + Class exceptionClass + ) { + this.defaultErrorMapping = new ErrorMapping<>(modelClass, exceptionClass); + } + + /** + * Extracts an error message from a response and optional error model. + * Attempts to get the message from the error model's getMessage() method, + * falls back to the response message, or constructs a message from the status code and URL. + * + * @param response The HTTP response + * @param errorModel The deserialized error model (may be null) + * @return The extracted or constructed error message + */ private String extractErrorMessage(Response response, Object errorModel) { String message = null; @@ -74,16 +247,30 @@ private String extractErrorMessage(Response response, Object errorModel) { } if (Objects.isNull(message) || message.trim().isEmpty()) { - message = String.format("%d error in request to: %s", response.code(), response.request().url()); + message = String.format( + "%d error in request to: %s", + response.code(), + response.request().url() + ); } return message; } - protected Response execute(Request request) throws ApiError { + /** + * Executes an HTTP request synchronously. + * Handles error responses by checking error mappings and throwing appropriate exceptions. + * + * @param request The HTTP request to execute + * @param resolvedConfig The resolved request configuration (may contain timeout override) + * @return The HTTP response if successful + * @throws ApiError if the request fails or returns an error status code + */ + protected Response execute(Request request, RequestConfig resolvedConfig) throws ApiError { + OkHttpClient client = this.getHttpClientForRequest(resolvedConfig); Response response; try { - response = this.httpClient.newCall(request).execute(); + response = client.newCall(request).execute(); } catch (IOException e) { if (e instanceof SocketTimeoutException) { throw new ApiError("Request timed out", 408, null); @@ -96,13 +283,18 @@ protected Response execute(Request request) throws ApiError { } // Handle error response - ErrorMapping errorMapping = this.errorMappings.get(response.code()); + ErrorMapping errorMapping = + this.errorMappings.getOrDefault(response.code(), this.defaultErrorMapping); if (errorMapping != null) { Object errorModel = null; try { errorModel = ModelConverter.convert(response, errorMapping.modelClass); } catch (Exception e) { - logger.log(Level.WARNING, "Failed to deserialize error response to " + errorMapping.modelClass.getName(), e); + logger.log( + Level.WARNING, + "Failed to deserialize error response to " + errorMapping.modelClass.getName(), + e + ); } if (errorModel != null) { @@ -129,9 +321,24 @@ protected Response execute(Request request) throws ApiError { throw new ApiError(extractErrorMessage(response, null), response.code(), response); } - protected CompletableFuture executeAsync(Request request) { + /** + * Executes an HTTP request asynchronously. + * Returns a CompletableFuture that completes with the response or completes exceptionally + * if an error occurs. Handles error responses by checking error mappings. + * + * @param request The HTTP request to execute + * @param resolvedConfig The resolved request configuration (may contain timeout override) + * @return A CompletableFuture that completes with the HTTP response + */ + protected CompletableFuture executeAsync( + Request request, + RequestConfig resolvedConfig + ) { + OkHttpClient client = this.getHttpClientForRequest(resolvedConfig); CompletableFuture future = new CompletableFuture<>(); - this.httpClient.newCall(request).enqueue( + client + .newCall(request) + .enqueue( new Callback() { @Override public void onResponse(@NotNull Call call, @NotNull Response response) { @@ -143,12 +350,13 @@ public void onResponse(@NotNull Call call, @NotNull Response response) { Object errorModel = ModelConverter.convert(response, errorMapping.modelClass); if (errorModel != null) { // Use reflection to create the exception - Constructor constructor = errorMapping.exceptionClass.getConstructor( - errorMapping.modelClass, - String.class, - int.class, - Response.class - ); + Constructor constructor = + errorMapping.exceptionClass.getConstructor( + errorMapping.modelClass, + String.class, + int.class, + Response.class + ); String message = extractErrorMessage(response, errorModel); future.completeExceptionally( constructor.newInstance(errorModel, message, response.code(), response) @@ -165,7 +373,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) { } // If no specific error model is mapped or conversion failed, throw generic ApiError - ApiError error = new ApiError(extractErrorMessage(response, null), response.code(), response); + ApiError error = new ApiError( + extractErrorMessage(response, null), + response.code(), + response + ); future.completeExceptionally(error); return; } diff --git a/src/main/java/com/alohi/signplus/services/CertificateService.java b/src/main/java/com/alohi/signplus/services/CertificateService.java new file mode 100644 index 0000000..c9ed7a2 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/CertificateService.java @@ -0,0 +1,138 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.DownloadEnvelopeCertificateParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * CertificateService Service + */ +public class CertificateService extends BaseService { + + private RequestConfig downloadEnvelopeCertificateConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of CertificateService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public CertificateService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code downloadEnvelopeCertificate}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public CertificateService setDownloadEnvelopeCertificateConfig(RequestConfig config) { + this.downloadEnvelopeCertificateConfig = config; + return this; + } + + /** + * Download certificate of completion for an envelope + * + * @param envelopeId String + * @param requestParameters {@link DownloadEnvelopeCertificateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object downloadEnvelopeCertificate( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeCertificateParameters requestParameters + ) throws ApiError { + return this.downloadEnvelopeCertificate(envelopeId, requestParameters, null); + } + + /** + * Download certificate of completion for an envelope + * + * @param envelopeId String + * @param requestParameters {@link DownloadEnvelopeCertificateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object downloadEnvelopeCertificate( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeCertificateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.downloadEnvelopeCertificateConfig, requestConfig); + Request request = + this.buildDownloadEnvelopeCertificateRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Download certificate of completion for an envelope + * + * @param envelopeId String + * @param requestParameters {@link DownloadEnvelopeCertificateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture downloadEnvelopeCertificateAsync( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeCertificateParameters requestParameters + ) throws ApiError { + return this.downloadEnvelopeCertificateAsync(envelopeId, requestParameters, null); + } + + /** + * Download certificate of completion for an envelope + * + * @param envelopeId String + * @param requestParameters {@link DownloadEnvelopeCertificateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture downloadEnvelopeCertificateAsync( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeCertificateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.downloadEnvelopeCertificateConfig, requestConfig); + Request request = + this.buildDownloadEnvelopeCertificateRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildDownloadEnvelopeCertificateRequest( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeCertificateParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/certificate" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/DocumentIdService.java b/src/main/java/com/alohi/signplus/services/DocumentIdService.java new file mode 100644 index 0000000..7bd658d --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/DocumentIdService.java @@ -0,0 +1,158 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetEnvelopeDocumentParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * DocumentIdService Service + */ +public class DocumentIdService extends BaseService { + + private RequestConfig getEnvelopeDocumentConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of DocumentIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public DocumentIdService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getEnvelopeDocument}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public DocumentIdService setGetEnvelopeDocumentConfig(RequestConfig config) { + this.getEnvelopeDocumentConfig = config; + return this; + } + + /** + * Get envelope document + * + * @param envelopeId String + * @param documentId String + * @param requestParameters {@link GetEnvelopeDocumentParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelopeDocument( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentParameters requestParameters + ) throws ApiError { + return this.getEnvelopeDocument(envelopeId, documentId, requestParameters, null); + } + + /** + * Get envelope document + * + * @param envelopeId String + * @param documentId String + * @param requestParameters {@link GetEnvelopeDocumentParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelopeDocument( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getEnvelopeDocumentConfig, requestConfig); + Request request = + this.buildGetEnvelopeDocumentRequest( + envelopeId, + documentId, + requestParameters, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get envelope document + * + * @param envelopeId String + * @param documentId String + * @param requestParameters {@link GetEnvelopeDocumentParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeDocumentAsync( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentParameters requestParameters + ) throws ApiError { + return this.getEnvelopeDocumentAsync(envelopeId, documentId, requestParameters, null); + } + + /** + * Get envelope document + * + * @param envelopeId String + * @param documentId String + * @param requestParameters {@link GetEnvelopeDocumentParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeDocumentAsync( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getEnvelopeDocumentConfig, requestConfig); + Request request = + this.buildGetEnvelopeDocumentRequest( + envelopeId, + documentId, + requestParameters, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetEnvelopeDocumentRequest( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/document/{document_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setPathParameter("document_id", documentId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/DocumentService.java b/src/main/java/com/alohi/signplus/services/DocumentService.java new file mode 100644 index 0000000..b7ab17a --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/DocumentService.java @@ -0,0 +1,173 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.AddEnvelopeDocumentParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.MediaType; +import okhttp3.MultipartBody; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +/** + * DocumentService Service + */ +public class DocumentService extends BaseService { + + private RequestConfig addEnvelopeDocumentConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of DocumentService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public DocumentService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code addEnvelopeDocument}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public DocumentService setAddEnvelopeDocumentConfig(RequestConfig config) { + this.addEnvelopeDocumentConfig = config; + return this; + } + + /** + * Add envelope document + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeDocumentParameters} Request Parameters Object + * @param _filename String Filename for the uploaded file + * @return response of {@code Object} + */ + public Object addEnvelopeDocument( + @NonNull String envelopeId, + @NonNull AddEnvelopeDocumentParameters requestParameters, + @NonNull String _filename + ) throws ApiError { + return this.addEnvelopeDocument(envelopeId, requestParameters, _filename, null); + } + + /** + * Add envelope document + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeDocumentParameters} Request Parameters Object + * @param _filename String Filename for the uploaded file + * @return response of {@code Object} + */ + public Object addEnvelopeDocument( + @NonNull String envelopeId, + @NonNull AddEnvelopeDocumentParameters requestParameters, + @NonNull String _filename, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addEnvelopeDocumentConfig, requestConfig); + Request request = + this.buildAddEnvelopeDocumentRequest( + envelopeId, + requestParameters, + _filename, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Add envelope document + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeDocumentParameters} Request Parameters Object + * @param _filename String Filename for the uploaded file + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addEnvelopeDocumentAsync( + @NonNull String envelopeId, + @NonNull AddEnvelopeDocumentParameters requestParameters, + @NonNull String _filename + ) throws ApiError { + return this.addEnvelopeDocumentAsync(envelopeId, requestParameters, _filename, null); + } + + /** + * Add envelope document + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeDocumentParameters} Request Parameters Object + * @param _filename String Filename for the uploaded file + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addEnvelopeDocumentAsync( + @NonNull String envelopeId, + @NonNull AddEnvelopeDocumentParameters requestParameters, + @NonNull String _filename, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addEnvelopeDocumentConfig, requestConfig); + Request request = + this.buildAddEnvelopeDocumentRequest( + envelopeId, + requestParameters, + _filename, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildAddEnvelopeDocumentRequest( + @NonNull String envelopeId, + @NonNull AddEnvelopeDocumentParameters requestParameters, + @NonNull String _filename, + RequestConfig resolvedConfig + ) { + MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder() + .setType(MultipartBody.FORM); + if (requestParameters.getRequestBody().getFile() != null) { + multipartBodyBuilder.addFormDataPart( + "file", + _filename, + RequestBody.create( + requestParameters.getRequestBody().getFile(), + MediaType.parse("application/octet-stream") + ) + ); + } + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/document" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setBody(multipartBodyBuilder.build()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/DocumentsService.java b/src/main/java/com/alohi/signplus/services/DocumentsService.java new file mode 100644 index 0000000..eeda630 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/DocumentsService.java @@ -0,0 +1,138 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetEnvelopeDocumentsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * DocumentsService Service + */ +public class DocumentsService extends BaseService { + + private RequestConfig getEnvelopeDocumentsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of DocumentsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public DocumentsService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getEnvelopeDocuments}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public DocumentsService setGetEnvelopeDocumentsConfig(RequestConfig config) { + this.getEnvelopeDocumentsConfig = config; + return this; + } + + /** + * Get envelope documents + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeDocumentsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelopeDocuments( + @NonNull String envelopeId, + @NonNull GetEnvelopeDocumentsParameters requestParameters + ) throws ApiError { + return this.getEnvelopeDocuments(envelopeId, requestParameters, null); + } + + /** + * Get envelope documents + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeDocumentsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelopeDocuments( + @NonNull String envelopeId, + @NonNull GetEnvelopeDocumentsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getEnvelopeDocumentsConfig, requestConfig); + Request request = + this.buildGetEnvelopeDocumentsRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get envelope documents + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeDocumentsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeDocumentsAsync( + @NonNull String envelopeId, + @NonNull GetEnvelopeDocumentsParameters requestParameters + ) throws ApiError { + return this.getEnvelopeDocumentsAsync(envelopeId, requestParameters, null); + } + + /** + * Get envelope documents + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeDocumentsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeDocumentsAsync( + @NonNull String envelopeId, + @NonNull GetEnvelopeDocumentsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getEnvelopeDocumentsConfig, requestConfig); + Request request = + this.buildGetEnvelopeDocumentsRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetEnvelopeDocumentsRequest( + @NonNull String envelopeId, + @NonNull GetEnvelopeDocumentsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/documents" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/DuplicateService.java b/src/main/java/com/alohi/signplus/services/DuplicateService.java new file mode 100644 index 0000000..4a3a83f --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/DuplicateService.java @@ -0,0 +1,138 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.DuplicateEnvelopeParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * DuplicateService Service + */ +public class DuplicateService extends BaseService { + + private RequestConfig duplicateEnvelopeConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of DuplicateService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public DuplicateService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code duplicateEnvelope}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public DuplicateService setDuplicateEnvelopeConfig(RequestConfig config) { + this.duplicateEnvelopeConfig = config; + return this; + } + + /** + * Duplicate envelope + * + * @param envelopeId String + * @param requestParameters {@link DuplicateEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object duplicateEnvelope( + @NonNull String envelopeId, + @NonNull DuplicateEnvelopeParameters requestParameters + ) throws ApiError { + return this.duplicateEnvelope(envelopeId, requestParameters, null); + } + + /** + * Duplicate envelope + * + * @param envelopeId String + * @param requestParameters {@link DuplicateEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object duplicateEnvelope( + @NonNull String envelopeId, + @NonNull DuplicateEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.duplicateEnvelopeConfig, requestConfig); + Request request = + this.buildDuplicateEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Duplicate envelope + * + * @param envelopeId String + * @param requestParameters {@link DuplicateEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture duplicateEnvelopeAsync( + @NonNull String envelopeId, + @NonNull DuplicateEnvelopeParameters requestParameters + ) throws ApiError { + return this.duplicateEnvelopeAsync(envelopeId, requestParameters, null); + } + + /** + * Duplicate envelope + * + * @param envelopeId String + * @param requestParameters {@link DuplicateEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture duplicateEnvelopeAsync( + @NonNull String envelopeId, + @NonNull DuplicateEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.duplicateEnvelopeConfig, requestConfig); + Request request = + this.buildDuplicateEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildDuplicateEnvelopeRequest( + @NonNull String envelopeId, + @NonNull DuplicateEnvelopeParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/duplicate" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/DynamicFieldsService.java b/src/main/java/com/alohi/signplus/services/DynamicFieldsService.java new file mode 100644 index 0000000..f6a7d28 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/DynamicFieldsService.java @@ -0,0 +1,139 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetEnvelopeDynamicFieldsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * DynamicFieldsService Service + */ +public class DynamicFieldsService extends BaseService { + + private RequestConfig setEnvelopeDynamicFieldsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of DynamicFieldsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public DynamicFieldsService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setEnvelopeDynamicFields}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public DynamicFieldsService setSetEnvelopeDynamicFieldsConfig(RequestConfig config) { + this.setEnvelopeDynamicFieldsConfig = config; + return this; + } + + /** + * Set envelope dynamic fields + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeDynamicFieldsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeDynamicFields( + @NonNull String envelopeId, + @NonNull SetEnvelopeDynamicFieldsParameters requestParameters + ) throws ApiError { + return this.setEnvelopeDynamicFields(envelopeId, requestParameters, null); + } + + /** + * Set envelope dynamic fields + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeDynamicFieldsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeDynamicFields( + @NonNull String envelopeId, + @NonNull SetEnvelopeDynamicFieldsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeDynamicFieldsConfig, requestConfig); + Request request = + this.buildSetEnvelopeDynamicFieldsRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Set envelope dynamic fields + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeDynamicFieldsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeDynamicFieldsAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeDynamicFieldsParameters requestParameters + ) throws ApiError { + return this.setEnvelopeDynamicFieldsAsync(envelopeId, requestParameters, null); + } + + /** + * Set envelope dynamic fields + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeDynamicFieldsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeDynamicFieldsAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeDynamicFieldsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeDynamicFieldsConfig, requestConfig); + Request request = + this.buildSetEnvelopeDynamicFieldsRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetEnvelopeDynamicFieldsRequest( + @NonNull String envelopeId, + @NonNull SetEnvelopeDynamicFieldsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/dynamic_fields" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.java b/src/main/java/com/alohi/signplus/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.java new file mode 100644 index 0000000..6cb120b --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/EnvelopeEnvelopeIdAnnotationsDocumentIdService.java @@ -0,0 +1,168 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetEnvelopeDocumentAnnotationsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * EnvelopeEnvelopeIdAnnotationsDocumentIdService Service + */ +public class EnvelopeEnvelopeIdAnnotationsDocumentIdService extends BaseService { + + private RequestConfig getEnvelopeDocumentAnnotationsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of EnvelopeEnvelopeIdAnnotationsDocumentIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public EnvelopeEnvelopeIdAnnotationsDocumentIdService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getEnvelopeDocumentAnnotations}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public EnvelopeEnvelopeIdAnnotationsDocumentIdService setGetEnvelopeDocumentAnnotationsConfig( + RequestConfig config + ) { + this.getEnvelopeDocumentAnnotationsConfig = config; + return this; + } + + /** + * Get envelope document annotations + * + * @param envelopeId String + * @param documentId String + * @param requestParameters {@link GetEnvelopeDocumentAnnotationsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelopeDocumentAnnotations( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentAnnotationsParameters requestParameters + ) throws ApiError { + return this.getEnvelopeDocumentAnnotations(envelopeId, documentId, requestParameters, null); + } + + /** + * Get envelope document annotations + * + * @param envelopeId String + * @param documentId String + * @param requestParameters {@link GetEnvelopeDocumentAnnotationsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelopeDocumentAnnotations( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentAnnotationsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getEnvelopeDocumentAnnotationsConfig, requestConfig); + Request request = + this.buildGetEnvelopeDocumentAnnotationsRequest( + envelopeId, + documentId, + requestParameters, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get envelope document annotations + * + * @param envelopeId String + * @param documentId String + * @param requestParameters {@link GetEnvelopeDocumentAnnotationsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeDocumentAnnotationsAsync( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentAnnotationsParameters requestParameters + ) throws ApiError { + return this.getEnvelopeDocumentAnnotationsAsync( + envelopeId, + documentId, + requestParameters, + null + ); + } + + /** + * Get envelope document annotations + * + * @param envelopeId String + * @param documentId String + * @param requestParameters {@link GetEnvelopeDocumentAnnotationsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeDocumentAnnotationsAsync( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentAnnotationsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getEnvelopeDocumentAnnotationsConfig, requestConfig); + Request request = + this.buildGetEnvelopeDocumentAnnotationsRequest( + envelopeId, + documentId, + requestParameters, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetEnvelopeDocumentAnnotationsRequest( + @NonNull String envelopeId, + @NonNull String documentId, + @NonNull GetEnvelopeDocumentAnnotationsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/annotations/{document_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setPathParameter("document_id", documentId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/EnvelopeIdService.java b/src/main/java/com/alohi/signplus/services/EnvelopeIdService.java new file mode 100644 index 0000000..23f6f80 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/EnvelopeIdService.java @@ -0,0 +1,218 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetEnvelopeParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * EnvelopeIdService Service + */ +public class EnvelopeIdService extends BaseService { + + private RequestConfig getEnvelopeConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + private RequestConfig deleteEnvelopeConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of EnvelopeIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public EnvelopeIdService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getEnvelope}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public EnvelopeIdService setGetEnvelopeConfig(RequestConfig config) { + this.getEnvelopeConfig = config; + return this; + } + + /** + * Sets method-level configuration for {@code deleteEnvelope}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public EnvelopeIdService setDeleteEnvelopeConfig(RequestConfig config) { + this.deleteEnvelopeConfig = config; + return this; + } + + /** + * Get envelope + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelope( + @NonNull String envelopeId, + @NonNull GetEnvelopeParameters requestParameters + ) throws ApiError { + return this.getEnvelope(envelopeId, requestParameters, null); + } + + /** + * Get envelope + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getEnvelope( + @NonNull String envelopeId, + @NonNull GetEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.getEnvelopeConfig, requestConfig); + Request request = this.buildGetEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get envelope + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeAsync( + @NonNull String envelopeId, + @NonNull GetEnvelopeParameters requestParameters + ) throws ApiError { + return this.getEnvelopeAsync(envelopeId, requestParameters, null); + } + + /** + * Get envelope + * + * @param envelopeId String + * @param requestParameters {@link GetEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getEnvelopeAsync( + @NonNull String envelopeId, + @NonNull GetEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.getEnvelopeConfig, requestConfig); + Request request = this.buildGetEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetEnvelopeRequest( + @NonNull String envelopeId, + @NonNull GetEnvelopeParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } + + /** + * Delete envelope + * + * @param envelopeId String + * @return response of {@code Object} + */ + public Object deleteEnvelope(@NonNull String envelopeId) throws ApiError { + return this.deleteEnvelope(envelopeId, null); + } + + /** + * Delete envelope + * + * @param envelopeId String + * @return response of {@code Object} + */ + public Object deleteEnvelope(@NonNull String envelopeId, RequestConfig requestConfig) + throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.deleteEnvelopeConfig, requestConfig); + Request request = this.buildDeleteEnvelopeRequest(envelopeId, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Delete envelope + * + * @param envelopeId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteEnvelopeAsync(@NonNull String envelopeId) throws ApiError { + return this.deleteEnvelopeAsync(envelopeId, null); + } + + /** + * Delete envelope + * + * @param envelopeId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteEnvelopeAsync( + @NonNull String envelopeId, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.deleteEnvelopeConfig, requestConfig); + Request request = this.buildDeleteEnvelopeRequest(envelopeId, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildDeleteEnvelopeRequest( + @NonNull String envelopeId, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.DELETE, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/EnvelopeService.java b/src/main/java/com/alohi/signplus/services/EnvelopeService.java new file mode 100644 index 0000000..b5d3faa --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/EnvelopeService.java @@ -0,0 +1,124 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.CreateEnvelopeParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * EnvelopeService Service + */ +public class EnvelopeService extends BaseService { + + private RequestConfig createEnvelopeConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of EnvelopeService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public EnvelopeService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code createEnvelope}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public EnvelopeService setCreateEnvelopeConfig(RequestConfig config) { + this.createEnvelopeConfig = config; + return this; + } + + /** + * Create new envelope + * + * @param requestParameters {@link CreateEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object createEnvelope(@NonNull CreateEnvelopeParameters requestParameters) + throws ApiError { + return this.createEnvelope(requestParameters, null); + } + + /** + * Create new envelope + * + * @param requestParameters {@link CreateEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object createEnvelope( + @NonNull CreateEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.createEnvelopeConfig, requestConfig); + Request request = this.buildCreateEnvelopeRequest(requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Create new envelope + * + * @param requestParameters {@link CreateEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture createEnvelopeAsync( + @NonNull CreateEnvelopeParameters requestParameters + ) throws ApiError { + return this.createEnvelopeAsync(requestParameters, null); + } + + /** + * Create new envelope + * + * @param requestParameters {@link CreateEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture createEnvelopeAsync( + @NonNull CreateEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.createEnvelopeConfig, requestConfig); + Request request = this.buildCreateEnvelopeRequest(requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildCreateEnvelopeRequest( + @NonNull CreateEnvelopeParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/EnvelopesService.java b/src/main/java/com/alohi/signplus/services/EnvelopesService.java new file mode 100644 index 0000000..9fec668 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/EnvelopesService.java @@ -0,0 +1,123 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.ListEnvelopesParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * EnvelopesService Service + */ +public class EnvelopesService extends BaseService { + + private RequestConfig listEnvelopesConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of EnvelopesService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public EnvelopesService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code listEnvelopes}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public EnvelopesService setListEnvelopesConfig(RequestConfig config) { + this.listEnvelopesConfig = config; + return this; + } + + /** + * List envelopes + * + * @param requestParameters {@link ListEnvelopesParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object listEnvelopes(@NonNull ListEnvelopesParameters requestParameters) throws ApiError { + return this.listEnvelopes(requestParameters, null); + } + + /** + * List envelopes + * + * @param requestParameters {@link ListEnvelopesParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object listEnvelopes( + @NonNull ListEnvelopesParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.listEnvelopesConfig, requestConfig); + Request request = this.buildListEnvelopesRequest(requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * List envelopes + * + * @param requestParameters {@link ListEnvelopesParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture listEnvelopesAsync( + @NonNull ListEnvelopesParameters requestParameters + ) throws ApiError { + return this.listEnvelopesAsync(requestParameters, null); + } + + /** + * List envelopes + * + * @param requestParameters {@link ListEnvelopesParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture listEnvelopesAsync( + @NonNull ListEnvelopesParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.listEnvelopesConfig, requestConfig); + Request request = this.buildListEnvelopesRequest(requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildListEnvelopesRequest( + @NonNull ListEnvelopesParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelopes" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/FileIdService.java b/src/main/java/com/alohi/signplus/services/FileIdService.java new file mode 100644 index 0000000..bfb22de --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/FileIdService.java @@ -0,0 +1,148 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetAttachmentFileParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * FileIdService Service + */ +public class FileIdService extends BaseService { + + private RequestConfig getAttachmentFileConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of FileIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public FileIdService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getAttachmentFile}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public FileIdService setGetAttachmentFileConfig(RequestConfig config) { + this.getAttachmentFileConfig = config; + return this; + } + + /** + * Get envelope attachment file + * + * @param envelopeId String + * @param fileId String + * @param requestParameters {@link GetAttachmentFileParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getAttachmentFile( + @NonNull String envelopeId, + @NonNull String fileId, + @NonNull GetAttachmentFileParameters requestParameters + ) throws ApiError { + return this.getAttachmentFile(envelopeId, fileId, requestParameters, null); + } + + /** + * Get envelope attachment file + * + * @param envelopeId String + * @param fileId String + * @param requestParameters {@link GetAttachmentFileParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getAttachmentFile( + @NonNull String envelopeId, + @NonNull String fileId, + @NonNull GetAttachmentFileParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getAttachmentFileConfig, requestConfig); + Request request = + this.buildGetAttachmentFileRequest(envelopeId, fileId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get envelope attachment file + * + * @param envelopeId String + * @param fileId String + * @param requestParameters {@link GetAttachmentFileParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getAttachmentFileAsync( + @NonNull String envelopeId, + @NonNull String fileId, + @NonNull GetAttachmentFileParameters requestParameters + ) throws ApiError { + return this.getAttachmentFileAsync(envelopeId, fileId, requestParameters, null); + } + + /** + * Get envelope attachment file + * + * @param envelopeId String + * @param fileId String + * @param requestParameters {@link GetAttachmentFileParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getAttachmentFileAsync( + @NonNull String envelopeId, + @NonNull String fileId, + @NonNull GetAttachmentFileParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getAttachmentFileConfig, requestConfig); + Request request = + this.buildGetAttachmentFileRequest(envelopeId, fileId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetAttachmentFileRequest( + @NonNull String envelopeId, + @NonNull String fileId, + @NonNull GetAttachmentFileParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/attachments/{file_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setPathParameter("file_id", fileId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/PlaceholdersService.java b/src/main/java/com/alohi/signplus/services/PlaceholdersService.java new file mode 100644 index 0000000..a33e7a7 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/PlaceholdersService.java @@ -0,0 +1,147 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetEnvelopeAttachmentsPlaceholdersParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * PlaceholdersService Service + */ +public class PlaceholdersService extends BaseService { + + private RequestConfig setEnvelopeAttachmentsPlaceholdersConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of PlaceholdersService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public PlaceholdersService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setEnvelopeAttachmentsPlaceholders}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public PlaceholdersService setSetEnvelopeAttachmentsPlaceholdersConfig(RequestConfig config) { + this.setEnvelopeAttachmentsPlaceholdersConfig = config; + return this; + } + + /** + * Placeholders to be set, completely replacing the existing ones. + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeAttachmentsPlaceholdersParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeAttachmentsPlaceholders( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsPlaceholdersParameters requestParameters + ) throws ApiError { + return this.setEnvelopeAttachmentsPlaceholders(envelopeId, requestParameters, null); + } + + /** + * Placeholders to be set, completely replacing the existing ones. + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeAttachmentsPlaceholdersParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeAttachmentsPlaceholders( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsPlaceholdersParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeAttachmentsPlaceholdersConfig, requestConfig); + Request request = + this.buildSetEnvelopeAttachmentsPlaceholdersRequest( + envelopeId, + requestParameters, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Placeholders to be set, completely replacing the existing ones. + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeAttachmentsPlaceholdersParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeAttachmentsPlaceholdersAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsPlaceholdersParameters requestParameters + ) throws ApiError { + return this.setEnvelopeAttachmentsPlaceholdersAsync(envelopeId, requestParameters, null); + } + + /** + * Placeholders to be set, completely replacing the existing ones. + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeAttachmentsPlaceholdersParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeAttachmentsPlaceholdersAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsPlaceholdersParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeAttachmentsPlaceholdersConfig, requestConfig); + Request request = + this.buildSetEnvelopeAttachmentsPlaceholdersRequest( + envelopeId, + requestParameters, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetEnvelopeAttachmentsPlaceholdersRequest( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsPlaceholdersParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/attachments/placeholders" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/RenameService.java b/src/main/java/com/alohi/signplus/services/RenameService.java new file mode 100644 index 0000000..c3b564e --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/RenameService.java @@ -0,0 +1,137 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.RenameEnvelopeParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * RenameService Service + */ +public class RenameService extends BaseService { + + private RequestConfig renameEnvelopeConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of RenameService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public RenameService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code renameEnvelope}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public RenameService setRenameEnvelopeConfig(RequestConfig config) { + this.renameEnvelopeConfig = config; + return this; + } + + /** + * Rename envelope + * + * @param envelopeId String + * @param requestParameters {@link RenameEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object renameEnvelope( + @NonNull String envelopeId, + @NonNull RenameEnvelopeParameters requestParameters + ) throws ApiError { + return this.renameEnvelope(envelopeId, requestParameters, null); + } + + /** + * Rename envelope + * + * @param envelopeId String + * @param requestParameters {@link RenameEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object renameEnvelope( + @NonNull String envelopeId, + @NonNull RenameEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.renameEnvelopeConfig, requestConfig); + Request request = + this.buildRenameEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Rename envelope + * + * @param envelopeId String + * @param requestParameters {@link RenameEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture renameEnvelopeAsync( + @NonNull String envelopeId, + @NonNull RenameEnvelopeParameters requestParameters + ) throws ApiError { + return this.renameEnvelopeAsync(envelopeId, requestParameters, null); + } + + /** + * Rename envelope + * + * @param envelopeId String + * @param requestParameters {@link RenameEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture renameEnvelopeAsync( + @NonNull String envelopeId, + @NonNull RenameEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.renameEnvelopeConfig, requestConfig); + Request request = + this.buildRenameEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildRenameEnvelopeRequest( + @NonNull String envelopeId, + @NonNull RenameEnvelopeParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/rename" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/SendService.java b/src/main/java/com/alohi/signplus/services/SendService.java new file mode 100644 index 0000000..895ed86 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/SendService.java @@ -0,0 +1,134 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SendEnvelopeParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * SendService Service + */ +public class SendService extends BaseService { + + private RequestConfig sendEnvelopeConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of SendService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public SendService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code sendEnvelope}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public SendService setSendEnvelopeConfig(RequestConfig config) { + this.sendEnvelopeConfig = config; + return this; + } + + /** + * Send envelope for signature + * + * @param envelopeId String + * @param requestParameters {@link SendEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object sendEnvelope( + @NonNull String envelopeId, + @NonNull SendEnvelopeParameters requestParameters + ) throws ApiError { + return this.sendEnvelope(envelopeId, requestParameters, null); + } + + /** + * Send envelope for signature + * + * @param envelopeId String + * @param requestParameters {@link SendEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object sendEnvelope( + @NonNull String envelopeId, + @NonNull SendEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.sendEnvelopeConfig, requestConfig); + Request request = this.buildSendEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Send envelope for signature + * + * @param envelopeId String + * @param requestParameters {@link SendEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture sendEnvelopeAsync( + @NonNull String envelopeId, + @NonNull SendEnvelopeParameters requestParameters + ) throws ApiError { + return this.sendEnvelopeAsync(envelopeId, requestParameters, null); + } + + /** + * Send envelope for signature + * + * @param envelopeId String + * @param requestParameters {@link SendEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture sendEnvelopeAsync( + @NonNull String envelopeId, + @NonNull SendEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.sendEnvelopeConfig, requestConfig); + Request request = this.buildSendEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSendEnvelopeRequest( + @NonNull String envelopeId, + @NonNull SendEnvelopeParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/send" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/SetCommentService.java b/src/main/java/com/alohi/signplus/services/SetCommentService.java new file mode 100644 index 0000000..8f97005 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/SetCommentService.java @@ -0,0 +1,139 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetEnvelopeCommentParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * SetCommentService Service + */ +public class SetCommentService extends BaseService { + + private RequestConfig setEnvelopeCommentConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of SetCommentService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public SetCommentService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setEnvelopeComment}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public SetCommentService setSetEnvelopeCommentConfig(RequestConfig config) { + this.setEnvelopeCommentConfig = config; + return this; + } + + /** + * Set envelope comment + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeCommentParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeComment( + @NonNull String envelopeId, + @NonNull SetEnvelopeCommentParameters requestParameters + ) throws ApiError { + return this.setEnvelopeComment(envelopeId, requestParameters, null); + } + + /** + * Set envelope comment + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeCommentParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeComment( + @NonNull String envelopeId, + @NonNull SetEnvelopeCommentParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeCommentConfig, requestConfig); + Request request = + this.buildSetEnvelopeCommentRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Set envelope comment + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeCommentParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeCommentAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeCommentParameters requestParameters + ) throws ApiError { + return this.setEnvelopeCommentAsync(envelopeId, requestParameters, null); + } + + /** + * Set envelope comment + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeCommentParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeCommentAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeCommentParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeCommentConfig, requestConfig); + Request request = + this.buildSetEnvelopeCommentRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetEnvelopeCommentRequest( + @NonNull String envelopeId, + @NonNull SetEnvelopeCommentParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/set_comment" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/SetExpirationDateService.java b/src/main/java/com/alohi/signplus/services/SetExpirationDateService.java new file mode 100644 index 0000000..9cf878e --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/SetExpirationDateService.java @@ -0,0 +1,139 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetEnvelopeExpirationDateParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * SetExpirationDateService Service + */ +public class SetExpirationDateService extends BaseService { + + private RequestConfig setEnvelopeExpirationDateConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of SetExpirationDateService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public SetExpirationDateService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setEnvelopeExpirationDate}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public SetExpirationDateService setSetEnvelopeExpirationDateConfig(RequestConfig config) { + this.setEnvelopeExpirationDateConfig = config; + return this; + } + + /** + * Set envelope expiration date + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeExpirationDateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeExpirationDate( + @NonNull String envelopeId, + @NonNull SetEnvelopeExpirationDateParameters requestParameters + ) throws ApiError { + return this.setEnvelopeExpirationDate(envelopeId, requestParameters, null); + } + + /** + * Set envelope expiration date + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeExpirationDateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeExpirationDate( + @NonNull String envelopeId, + @NonNull SetEnvelopeExpirationDateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeExpirationDateConfig, requestConfig); + Request request = + this.buildSetEnvelopeExpirationDateRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Set envelope expiration date + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeExpirationDateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeExpirationDateAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeExpirationDateParameters requestParameters + ) throws ApiError { + return this.setEnvelopeExpirationDateAsync(envelopeId, requestParameters, null); + } + + /** + * Set envelope expiration date + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeExpirationDateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeExpirationDateAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeExpirationDateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeExpirationDateConfig, requestConfig); + Request request = + this.buildSetEnvelopeExpirationDateRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetEnvelopeExpirationDateRequest( + @NonNull String envelopeId, + @NonNull SetEnvelopeExpirationDateParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/set_expiration_date" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/SetLegalityLevelService.java b/src/main/java/com/alohi/signplus/services/SetLegalityLevelService.java new file mode 100644 index 0000000..0f0e450 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/SetLegalityLevelService.java @@ -0,0 +1,139 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetEnvelopeLegalityLevelParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * SetLegalityLevelService Service + */ +public class SetLegalityLevelService extends BaseService { + + private RequestConfig setEnvelopeLegalityLevelConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of SetLegalityLevelService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public SetLegalityLevelService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setEnvelopeLegalityLevel}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public SetLegalityLevelService setSetEnvelopeLegalityLevelConfig(RequestConfig config) { + this.setEnvelopeLegalityLevelConfig = config; + return this; + } + + /** + * Set envelope legality level + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeLegalityLevelParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeLegalityLevel( + @NonNull String envelopeId, + @NonNull SetEnvelopeLegalityLevelParameters requestParameters + ) throws ApiError { + return this.setEnvelopeLegalityLevel(envelopeId, requestParameters, null); + } + + /** + * Set envelope legality level + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeLegalityLevelParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeLegalityLevel( + @NonNull String envelopeId, + @NonNull SetEnvelopeLegalityLevelParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeLegalityLevelConfig, requestConfig); + Request request = + this.buildSetEnvelopeLegalityLevelRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Set envelope legality level + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeLegalityLevelParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeLegalityLevelAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeLegalityLevelParameters requestParameters + ) throws ApiError { + return this.setEnvelopeLegalityLevelAsync(envelopeId, requestParameters, null); + } + + /** + * Set envelope legality level + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeLegalityLevelParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeLegalityLevelAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeLegalityLevelParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeLegalityLevelConfig, requestConfig); + Request request = + this.buildSetEnvelopeLegalityLevelRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetEnvelopeLegalityLevelRequest( + @NonNull String envelopeId, + @NonNull SetEnvelopeLegalityLevelParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/set_legality_level" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/SetNotificationService.java b/src/main/java/com/alohi/signplus/services/SetNotificationService.java new file mode 100644 index 0000000..0ae9621 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/SetNotificationService.java @@ -0,0 +1,139 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetEnvelopeNotificationParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * SetNotificationService Service + */ +public class SetNotificationService extends BaseService { + + private RequestConfig setEnvelopeNotificationConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of SetNotificationService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public SetNotificationService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setEnvelopeNotification}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public SetNotificationService setSetEnvelopeNotificationConfig(RequestConfig config) { + this.setEnvelopeNotificationConfig = config; + return this; + } + + /** + * Set envelope notification + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeNotificationParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeNotification( + @NonNull String envelopeId, + @NonNull SetEnvelopeNotificationParameters requestParameters + ) throws ApiError { + return this.setEnvelopeNotification(envelopeId, requestParameters, null); + } + + /** + * Set envelope notification + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeNotificationParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeNotification( + @NonNull String envelopeId, + @NonNull SetEnvelopeNotificationParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeNotificationConfig, requestConfig); + Request request = + this.buildSetEnvelopeNotificationRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Set envelope notification + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeNotificationParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeNotificationAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeNotificationParameters requestParameters + ) throws ApiError { + return this.setEnvelopeNotificationAsync(envelopeId, requestParameters, null); + } + + /** + * Set envelope notification + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeNotificationParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeNotificationAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeNotificationParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeNotificationConfig, requestConfig); + Request request = + this.buildSetEnvelopeNotificationRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetEnvelopeNotificationRequest( + @NonNull String envelopeId, + @NonNull SetEnvelopeNotificationParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/set_notification" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/SettingsService.java b/src/main/java/com/alohi/signplus/services/SettingsService.java new file mode 100644 index 0000000..a890890 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/SettingsService.java @@ -0,0 +1,147 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetEnvelopeAttachmentsSettingsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * SettingsService Service + */ +public class SettingsService extends BaseService { + + private RequestConfig setEnvelopeAttachmentsSettingsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of SettingsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public SettingsService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setEnvelopeAttachmentsSettings}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public SettingsService setSetEnvelopeAttachmentsSettingsConfig(RequestConfig config) { + this.setEnvelopeAttachmentsSettingsConfig = config; + return this; + } + + /** + * Set envelope attachment settings + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeAttachmentsSettingsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeAttachmentsSettings( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsSettingsParameters requestParameters + ) throws ApiError { + return this.setEnvelopeAttachmentsSettings(envelopeId, requestParameters, null); + } + + /** + * Set envelope attachment settings + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeAttachmentsSettingsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setEnvelopeAttachmentsSettings( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsSettingsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeAttachmentsSettingsConfig, requestConfig); + Request request = + this.buildSetEnvelopeAttachmentsSettingsRequest( + envelopeId, + requestParameters, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Set envelope attachment settings + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeAttachmentsSettingsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeAttachmentsSettingsAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsSettingsParameters requestParameters + ) throws ApiError { + return this.setEnvelopeAttachmentsSettingsAsync(envelopeId, requestParameters, null); + } + + /** + * Set envelope attachment settings + * + * @param envelopeId String + * @param requestParameters {@link SetEnvelopeAttachmentsSettingsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setEnvelopeAttachmentsSettingsAsync( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsSettingsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setEnvelopeAttachmentsSettingsConfig, requestConfig); + Request request = + this.buildSetEnvelopeAttachmentsSettingsRequest( + envelopeId, + requestParameters, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetEnvelopeAttachmentsSettingsRequest( + @NonNull String envelopeId, + @NonNull SetEnvelopeAttachmentsSettingsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/attachments/settings" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/SignedDocumentsService.java b/src/main/java/com/alohi/signplus/services/SignedDocumentsService.java new file mode 100644 index 0000000..f036801 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/SignedDocumentsService.java @@ -0,0 +1,150 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.DownloadEnvelopeSignedDocumentsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * SignedDocumentsService Service + */ +public class SignedDocumentsService extends BaseService { + + private RequestConfig downloadEnvelopeSignedDocumentsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of SignedDocumentsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public SignedDocumentsService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code downloadEnvelopeSignedDocuments}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public SignedDocumentsService setDownloadEnvelopeSignedDocumentsConfig(RequestConfig config) { + this.downloadEnvelopeSignedDocumentsConfig = config; + return this; + } + + /** + * Download signed documents for an envelope + * + * @param envelopeId String + * @param requestParameters {@link DownloadEnvelopeSignedDocumentsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object downloadEnvelopeSignedDocuments( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeSignedDocumentsParameters requestParameters + ) throws ApiError { + return this.downloadEnvelopeSignedDocuments(envelopeId, requestParameters, null); + } + + /** + * Download signed documents for an envelope + * + * @param envelopeId String + * @param requestParameters {@link DownloadEnvelopeSignedDocumentsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object downloadEnvelopeSignedDocuments( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeSignedDocumentsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.downloadEnvelopeSignedDocumentsConfig, requestConfig); + Request request = + this.buildDownloadEnvelopeSignedDocumentsRequest( + envelopeId, + requestParameters, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Download signed documents for an envelope + * + * @param envelopeId String + * @param requestParameters {@link DownloadEnvelopeSignedDocumentsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture downloadEnvelopeSignedDocumentsAsync( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeSignedDocumentsParameters requestParameters + ) throws ApiError { + return this.downloadEnvelopeSignedDocumentsAsync(envelopeId, requestParameters, null); + } + + /** + * Download signed documents for an envelope + * + * @param envelopeId String + * @param requestParameters {@link DownloadEnvelopeSignedDocumentsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture downloadEnvelopeSignedDocumentsAsync( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeSignedDocumentsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.downloadEnvelopeSignedDocumentsConfig, requestConfig); + Request request = + this.buildDownloadEnvelopeSignedDocumentsRequest( + envelopeId, + requestParameters, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildDownloadEnvelopeSignedDocumentsRequest( + @NonNull String envelopeId, + @NonNull DownloadEnvelopeSignedDocumentsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/signed_documents" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setOptionalQueryParameter( + "certificate_of_completion", + requestParameters.getCertificateOfCompletion() + ) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/SigningStepsService.java b/src/main/java/com/alohi/signplus/services/SigningStepsService.java new file mode 100644 index 0000000..8e8eb07 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/SigningStepsService.java @@ -0,0 +1,139 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.AddEnvelopeSigningStepsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * SigningStepsService Service + */ +public class SigningStepsService extends BaseService { + + private RequestConfig addEnvelopeSigningStepsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of SigningStepsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public SigningStepsService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code addEnvelopeSigningSteps}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public SigningStepsService setAddEnvelopeSigningStepsConfig(RequestConfig config) { + this.addEnvelopeSigningStepsConfig = config; + return this; + } + + /** + * Add envelope signing steps + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeSigningStepsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object addEnvelopeSigningSteps( + @NonNull String envelopeId, + @NonNull AddEnvelopeSigningStepsParameters requestParameters + ) throws ApiError { + return this.addEnvelopeSigningSteps(envelopeId, requestParameters, null); + } + + /** + * Add envelope signing steps + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeSigningStepsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object addEnvelopeSigningSteps( + @NonNull String envelopeId, + @NonNull AddEnvelopeSigningStepsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addEnvelopeSigningStepsConfig, requestConfig); + Request request = + this.buildAddEnvelopeSigningStepsRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Add envelope signing steps + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeSigningStepsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addEnvelopeSigningStepsAsync( + @NonNull String envelopeId, + @NonNull AddEnvelopeSigningStepsParameters requestParameters + ) throws ApiError { + return this.addEnvelopeSigningStepsAsync(envelopeId, requestParameters, null); + } + + /** + * Add envelope signing steps + * + * @param envelopeId String + * @param requestParameters {@link AddEnvelopeSigningStepsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addEnvelopeSigningStepsAsync( + @NonNull String envelopeId, + @NonNull AddEnvelopeSigningStepsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addEnvelopeSigningStepsConfig, requestConfig); + Request request = + this.buildAddEnvelopeSigningStepsRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildAddEnvelopeSigningStepsRequest( + @NonNull String envelopeId, + @NonNull AddEnvelopeSigningStepsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/signing_steps" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateIdService.java b/src/main/java/com/alohi/signplus/services/TemplateIdService.java new file mode 100644 index 0000000..7bc503e --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateIdService.java @@ -0,0 +1,139 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.CreateEnvelopeFromTemplateParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateIdService Service + */ +public class TemplateIdService extends BaseService { + + private RequestConfig createEnvelopeFromTemplateConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateIdService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code createEnvelopeFromTemplate}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateIdService setCreateEnvelopeFromTemplateConfig(RequestConfig config) { + this.createEnvelopeFromTemplateConfig = config; + return this; + } + + /** + * Create new envelope from template + * + * @param templateId String + * @param requestParameters {@link CreateEnvelopeFromTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object createEnvelopeFromTemplate( + @NonNull String templateId, + @NonNull CreateEnvelopeFromTemplateParameters requestParameters + ) throws ApiError { + return this.createEnvelopeFromTemplate(templateId, requestParameters, null); + } + + /** + * Create new envelope from template + * + * @param templateId String + * @param requestParameters {@link CreateEnvelopeFromTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object createEnvelopeFromTemplate( + @NonNull String templateId, + @NonNull CreateEnvelopeFromTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.createEnvelopeFromTemplateConfig, requestConfig); + Request request = + this.buildCreateEnvelopeFromTemplateRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Create new envelope from template + * + * @param templateId String + * @param requestParameters {@link CreateEnvelopeFromTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture createEnvelopeFromTemplateAsync( + @NonNull String templateId, + @NonNull CreateEnvelopeFromTemplateParameters requestParameters + ) throws ApiError { + return this.createEnvelopeFromTemplateAsync(templateId, requestParameters, null); + } + + /** + * Create new envelope from template + * + * @param templateId String + * @param requestParameters {@link CreateEnvelopeFromTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture createEnvelopeFromTemplateAsync( + @NonNull String templateId, + @NonNull CreateEnvelopeFromTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.createEnvelopeFromTemplateConfig, requestConfig); + Request request = + this.buildCreateEnvelopeFromTemplateRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildCreateEnvelopeFromTemplateRequest( + @NonNull String templateId, + @NonNull CreateEnvelopeFromTemplateParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/from_template/{template_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateService.java b/src/main/java/com/alohi/signplus/services/TemplateService.java new file mode 100644 index 0000000..40946af --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateService.java @@ -0,0 +1,124 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.CreateTemplateParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateService Service + */ +public class TemplateService extends BaseService { + + private RequestConfig createTemplateConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code createTemplate}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateService setCreateTemplateConfig(RequestConfig config) { + this.createTemplateConfig = config; + return this; + } + + /** + * Create new template + * + * @param requestParameters {@link CreateTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object createTemplate(@NonNull CreateTemplateParameters requestParameters) + throws ApiError { + return this.createTemplate(requestParameters, null); + } + + /** + * Create new template + * + * @param requestParameters {@link CreateTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object createTemplate( + @NonNull CreateTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.createTemplateConfig, requestConfig); + Request request = this.buildCreateTemplateRequest(requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Create new template + * + * @param requestParameters {@link CreateTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture createTemplateAsync( + @NonNull CreateTemplateParameters requestParameters + ) throws ApiError { + return this.createTemplateAsync(requestParameters, null); + } + + /** + * Create new template + * + * @param requestParameters {@link CreateTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture createTemplateAsync( + @NonNull CreateTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.createTemplateConfig, requestConfig); + Request request = this.buildCreateTemplateRequest(requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildCreateTemplateRequest( + @NonNull CreateTemplateParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationAnnotationIdService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationAnnotationIdService.java new file mode 100644 index 0000000..1d8c3b9 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationAnnotationIdService.java @@ -0,0 +1,140 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdAnnotationAnnotationIdService Service + */ +public class TemplateTemplateIdAnnotationAnnotationIdService extends BaseService { + + private RequestConfig deleteTemplateAnnotationConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdAnnotationAnnotationIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdAnnotationAnnotationIdService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code deleteTemplateAnnotation}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdAnnotationAnnotationIdService setDeleteTemplateAnnotationConfig( + RequestConfig config + ) { + this.deleteTemplateAnnotationConfig = config; + return this; + } + + /** + * Delete template annotation + * + * @param templateId String + * @param annotationId String + * @return response of {@code Object} + */ + public Object deleteTemplateAnnotation(@NonNull String templateId, @NonNull String annotationId) + throws ApiError { + return this.deleteTemplateAnnotation(templateId, annotationId, null); + } + + /** + * Delete template annotation + * + * @param templateId String + * @param annotationId String + * @return response of {@code Object} + */ + public Object deleteTemplateAnnotation( + @NonNull String templateId, + @NonNull String annotationId, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.deleteTemplateAnnotationConfig, requestConfig); + Request request = + this.buildDeleteTemplateAnnotationRequest(templateId, annotationId, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Delete template annotation + * + * @param templateId String + * @param annotationId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteTemplateAnnotationAsync( + @NonNull String templateId, + @NonNull String annotationId + ) throws ApiError { + return this.deleteTemplateAnnotationAsync(templateId, annotationId, null); + } + + /** + * Delete template annotation + * + * @param templateId String + * @param annotationId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteTemplateAnnotationAsync( + @NonNull String templateId, + @NonNull String annotationId, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.deleteTemplateAnnotationConfig, requestConfig); + Request request = + this.buildDeleteTemplateAnnotationRequest(templateId, annotationId, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildDeleteTemplateAnnotationRequest( + @NonNull String templateId, + @NonNull String annotationId, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.DELETE, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/annotation/{annotation_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setPathParameter("annotation_id", annotationId) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationService.java new file mode 100644 index 0000000..3b6bc5c --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationService.java @@ -0,0 +1,142 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.AddTemplateAnnotationParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdAnnotationService Service + */ +public class TemplateTemplateIdAnnotationService extends BaseService { + + private RequestConfig addTemplateAnnotationConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdAnnotationService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdAnnotationService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code addTemplateAnnotation}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdAnnotationService setAddTemplateAnnotationConfig(RequestConfig config) { + this.addTemplateAnnotationConfig = config; + return this; + } + + /** + * Add template annotation + * + * @param templateId String + * @param requestParameters {@link AddTemplateAnnotationParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object addTemplateAnnotation( + @NonNull String templateId, + @NonNull AddTemplateAnnotationParameters requestParameters + ) throws ApiError { + return this.addTemplateAnnotation(templateId, requestParameters, null); + } + + /** + * Add template annotation + * + * @param templateId String + * @param requestParameters {@link AddTemplateAnnotationParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object addTemplateAnnotation( + @NonNull String templateId, + @NonNull AddTemplateAnnotationParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addTemplateAnnotationConfig, requestConfig); + Request request = + this.buildAddTemplateAnnotationRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Add template annotation + * + * @param templateId String + * @param requestParameters {@link AddTemplateAnnotationParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addTemplateAnnotationAsync( + @NonNull String templateId, + @NonNull AddTemplateAnnotationParameters requestParameters + ) throws ApiError { + return this.addTemplateAnnotationAsync(templateId, requestParameters, null); + } + + /** + * Add template annotation + * + * @param templateId String + * @param requestParameters {@link AddTemplateAnnotationParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addTemplateAnnotationAsync( + @NonNull String templateId, + @NonNull AddTemplateAnnotationParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addTemplateAnnotationConfig, requestConfig); + Request request = + this.buildAddTemplateAnnotationRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildAddTemplateAnnotationRequest( + @NonNull String templateId, + @NonNull AddTemplateAnnotationParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/annotation" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsDocumentIdService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsDocumentIdService.java new file mode 100644 index 0000000..949a0ef --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsDocumentIdService.java @@ -0,0 +1,168 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetDocumentTemplateAnnotationsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdAnnotationsDocumentIdService Service + */ +public class TemplateTemplateIdAnnotationsDocumentIdService extends BaseService { + + private RequestConfig getDocumentTemplateAnnotationsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdAnnotationsDocumentIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdAnnotationsDocumentIdService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getDocumentTemplateAnnotations}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdAnnotationsDocumentIdService setGetDocumentTemplateAnnotationsConfig( + RequestConfig config + ) { + this.getDocumentTemplateAnnotationsConfig = config; + return this; + } + + /** + * Get document template annotations + * + * @param templateId String + * @param documentId String + * @param requestParameters {@link GetDocumentTemplateAnnotationsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getDocumentTemplateAnnotations( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetDocumentTemplateAnnotationsParameters requestParameters + ) throws ApiError { + return this.getDocumentTemplateAnnotations(templateId, documentId, requestParameters, null); + } + + /** + * Get document template annotations + * + * @param templateId String + * @param documentId String + * @param requestParameters {@link GetDocumentTemplateAnnotationsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getDocumentTemplateAnnotations( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetDocumentTemplateAnnotationsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getDocumentTemplateAnnotationsConfig, requestConfig); + Request request = + this.buildGetDocumentTemplateAnnotationsRequest( + templateId, + documentId, + requestParameters, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get document template annotations + * + * @param templateId String + * @param documentId String + * @param requestParameters {@link GetDocumentTemplateAnnotationsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getDocumentTemplateAnnotationsAsync( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetDocumentTemplateAnnotationsParameters requestParameters + ) throws ApiError { + return this.getDocumentTemplateAnnotationsAsync( + templateId, + documentId, + requestParameters, + null + ); + } + + /** + * Get document template annotations + * + * @param templateId String + * @param documentId String + * @param requestParameters {@link GetDocumentTemplateAnnotationsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getDocumentTemplateAnnotationsAsync( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetDocumentTemplateAnnotationsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getDocumentTemplateAnnotationsConfig, requestConfig); + Request request = + this.buildGetDocumentTemplateAnnotationsRequest( + templateId, + documentId, + requestParameters, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetDocumentTemplateAnnotationsRequest( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetDocumentTemplateAnnotationsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/annotations/{document_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setPathParameter("document_id", documentId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsService.java new file mode 100644 index 0000000..695e003 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAnnotationsService.java @@ -0,0 +1,143 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetTemplateAnnotationsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdAnnotationsService Service + */ +public class TemplateTemplateIdAnnotationsService extends BaseService { + + private RequestConfig getTemplateAnnotationsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdAnnotationsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdAnnotationsService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getTemplateAnnotations}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdAnnotationsService setGetTemplateAnnotationsConfig( + RequestConfig config + ) { + this.getTemplateAnnotationsConfig = config; + return this; + } + + /** + * Get template annotations + * + * @param templateId String + * @param requestParameters {@link GetTemplateAnnotationsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getTemplateAnnotations( + @NonNull String templateId, + @NonNull GetTemplateAnnotationsParameters requestParameters + ) throws ApiError { + return this.getTemplateAnnotations(templateId, requestParameters, null); + } + + /** + * Get template annotations + * + * @param templateId String + * @param requestParameters {@link GetTemplateAnnotationsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getTemplateAnnotations( + @NonNull String templateId, + @NonNull GetTemplateAnnotationsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getTemplateAnnotationsConfig, requestConfig); + Request request = + this.buildGetTemplateAnnotationsRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get template annotations + * + * @param templateId String + * @param requestParameters {@link GetTemplateAnnotationsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getTemplateAnnotationsAsync( + @NonNull String templateId, + @NonNull GetTemplateAnnotationsParameters requestParameters + ) throws ApiError { + return this.getTemplateAnnotationsAsync(templateId, requestParameters, null); + } + + /** + * Get template annotations + * + * @param templateId String + * @param requestParameters {@link GetTemplateAnnotationsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getTemplateAnnotationsAsync( + @NonNull String templateId, + @NonNull GetTemplateAnnotationsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getTemplateAnnotationsConfig, requestConfig); + Request request = + this.buildGetTemplateAnnotationsRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetTemplateAnnotationsRequest( + @NonNull String templateId, + @NonNull GetTemplateAnnotationsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/annotations" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsPlaceholdersService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsPlaceholdersService.java new file mode 100644 index 0000000..fedf23b --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsPlaceholdersService.java @@ -0,0 +1,152 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetTemplateAttachmentsPlaceholdersParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdAttachmentsPlaceholdersService Service + */ +public class TemplateTemplateIdAttachmentsPlaceholdersService extends BaseService { + + private RequestConfig setTemplateAttachmentsPlaceholdersConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdAttachmentsPlaceholdersService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdAttachmentsPlaceholdersService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setTemplateAttachmentsPlaceholders}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdAttachmentsPlaceholdersService setSetTemplateAttachmentsPlaceholdersConfig( + RequestConfig config + ) { + this.setTemplateAttachmentsPlaceholdersConfig = config; + return this; + } + + /** + * Placeholders to be set, completely replacing the existing ones. + * + * @param templateId String + * @param requestParameters {@link SetTemplateAttachmentsPlaceholdersParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setTemplateAttachmentsPlaceholders( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsPlaceholdersParameters requestParameters + ) throws ApiError { + return this.setTemplateAttachmentsPlaceholders(templateId, requestParameters, null); + } + + /** + * Placeholders to be set, completely replacing the existing ones. + * + * @param templateId String + * @param requestParameters {@link SetTemplateAttachmentsPlaceholdersParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setTemplateAttachmentsPlaceholders( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsPlaceholdersParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setTemplateAttachmentsPlaceholdersConfig, requestConfig); + Request request = + this.buildSetTemplateAttachmentsPlaceholdersRequest( + templateId, + requestParameters, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Placeholders to be set, completely replacing the existing ones. + * + * @param templateId String + * @param requestParameters {@link SetTemplateAttachmentsPlaceholdersParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setTemplateAttachmentsPlaceholdersAsync( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsPlaceholdersParameters requestParameters + ) throws ApiError { + return this.setTemplateAttachmentsPlaceholdersAsync(templateId, requestParameters, null); + } + + /** + * Placeholders to be set, completely replacing the existing ones. + * + * @param templateId String + * @param requestParameters {@link SetTemplateAttachmentsPlaceholdersParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setTemplateAttachmentsPlaceholdersAsync( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsPlaceholdersParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setTemplateAttachmentsPlaceholdersConfig, requestConfig); + Request request = + this.buildSetTemplateAttachmentsPlaceholdersRequest( + templateId, + requestParameters, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetTemplateAttachmentsPlaceholdersRequest( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsPlaceholdersParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/attachments/placeholders" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsSettingsService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsSettingsService.java new file mode 100644 index 0000000..76fc8ef --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdAttachmentsSettingsService.java @@ -0,0 +1,152 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetTemplateAttachmentsSettingsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdAttachmentsSettingsService Service + */ +public class TemplateTemplateIdAttachmentsSettingsService extends BaseService { + + private RequestConfig setTemplateAttachmentsSettingsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdAttachmentsSettingsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdAttachmentsSettingsService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setTemplateAttachmentsSettings}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdAttachmentsSettingsService setSetTemplateAttachmentsSettingsConfig( + RequestConfig config + ) { + this.setTemplateAttachmentsSettingsConfig = config; + return this; + } + + /** + * Set template attachment settings + * + * @param templateId String + * @param requestParameters {@link SetTemplateAttachmentsSettingsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setTemplateAttachmentsSettings( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsSettingsParameters requestParameters + ) throws ApiError { + return this.setTemplateAttachmentsSettings(templateId, requestParameters, null); + } + + /** + * Set template attachment settings + * + * @param templateId String + * @param requestParameters {@link SetTemplateAttachmentsSettingsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setTemplateAttachmentsSettings( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsSettingsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setTemplateAttachmentsSettingsConfig, requestConfig); + Request request = + this.buildSetTemplateAttachmentsSettingsRequest( + templateId, + requestParameters, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Set template attachment settings + * + * @param templateId String + * @param requestParameters {@link SetTemplateAttachmentsSettingsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setTemplateAttachmentsSettingsAsync( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsSettingsParameters requestParameters + ) throws ApiError { + return this.setTemplateAttachmentsSettingsAsync(templateId, requestParameters, null); + } + + /** + * Set template attachment settings + * + * @param templateId String + * @param requestParameters {@link SetTemplateAttachmentsSettingsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setTemplateAttachmentsSettingsAsync( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsSettingsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setTemplateAttachmentsSettingsConfig, requestConfig); + Request request = + this.buildSetTemplateAttachmentsSettingsRequest( + templateId, + requestParameters, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetTemplateAttachmentsSettingsRequest( + @NonNull String templateId, + @NonNull SetTemplateAttachmentsSettingsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/attachments/settings" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentDocumentIdService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentDocumentIdService.java new file mode 100644 index 0000000..406562a --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentDocumentIdService.java @@ -0,0 +1,163 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetTemplateDocumentParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdDocumentDocumentIdService Service + */ +public class TemplateTemplateIdDocumentDocumentIdService extends BaseService { + + private RequestConfig getTemplateDocumentConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdDocumentDocumentIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdDocumentDocumentIdService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getTemplateDocument}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdDocumentDocumentIdService setGetTemplateDocumentConfig( + RequestConfig config + ) { + this.getTemplateDocumentConfig = config; + return this; + } + + /** + * Get template document + * + * @param templateId String + * @param documentId String + * @param requestParameters {@link GetTemplateDocumentParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getTemplateDocument( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetTemplateDocumentParameters requestParameters + ) throws ApiError { + return this.getTemplateDocument(templateId, documentId, requestParameters, null); + } + + /** + * Get template document + * + * @param templateId String + * @param documentId String + * @param requestParameters {@link GetTemplateDocumentParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getTemplateDocument( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetTemplateDocumentParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getTemplateDocumentConfig, requestConfig); + Request request = + this.buildGetTemplateDocumentRequest( + templateId, + documentId, + requestParameters, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get template document + * + * @param templateId String + * @param documentId String + * @param requestParameters {@link GetTemplateDocumentParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getTemplateDocumentAsync( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetTemplateDocumentParameters requestParameters + ) throws ApiError { + return this.getTemplateDocumentAsync(templateId, documentId, requestParameters, null); + } + + /** + * Get template document + * + * @param templateId String + * @param documentId String + * @param requestParameters {@link GetTemplateDocumentParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getTemplateDocumentAsync( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetTemplateDocumentParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getTemplateDocumentConfig, requestConfig); + Request request = + this.buildGetTemplateDocumentRequest( + templateId, + documentId, + requestParameters, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetTemplateDocumentRequest( + @NonNull String templateId, + @NonNull String documentId, + @NonNull GetTemplateDocumentParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/document/{document_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setPathParameter("document_id", documentId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentService.java new file mode 100644 index 0000000..d9d5580 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentService.java @@ -0,0 +1,176 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.AddTemplateDocumentParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.MediaType; +import okhttp3.MultipartBody; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +/** + * TemplateTemplateIdDocumentService Service + */ +public class TemplateTemplateIdDocumentService extends BaseService { + + private RequestConfig addTemplateDocumentConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdDocumentService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdDocumentService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code addTemplateDocument}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdDocumentService setAddTemplateDocumentConfig(RequestConfig config) { + this.addTemplateDocumentConfig = config; + return this; + } + + /** + * Add template document + * + * @param templateId String + * @param requestParameters {@link AddTemplateDocumentParameters} Request Parameters Object + * @param _filename String Filename for the uploaded file + * @return response of {@code Object} + */ + public Object addTemplateDocument( + @NonNull String templateId, + @NonNull AddTemplateDocumentParameters requestParameters, + @NonNull String _filename + ) throws ApiError { + return this.addTemplateDocument(templateId, requestParameters, _filename, null); + } + + /** + * Add template document + * + * @param templateId String + * @param requestParameters {@link AddTemplateDocumentParameters} Request Parameters Object + * @param _filename String Filename for the uploaded file + * @return response of {@code Object} + */ + public Object addTemplateDocument( + @NonNull String templateId, + @NonNull AddTemplateDocumentParameters requestParameters, + @NonNull String _filename, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addTemplateDocumentConfig, requestConfig); + Request request = + this.buildAddTemplateDocumentRequest( + templateId, + requestParameters, + _filename, + resolvedConfig + ); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Add template document + * + * @param templateId String + * @param requestParameters {@link AddTemplateDocumentParameters} Request Parameters Object + * @param _filename String Filename for the uploaded file + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addTemplateDocumentAsync( + @NonNull String templateId, + @NonNull AddTemplateDocumentParameters requestParameters, + @NonNull String _filename + ) throws ApiError { + return this.addTemplateDocumentAsync(templateId, requestParameters, _filename, null); + } + + /** + * Add template document + * + * @param templateId String + * @param requestParameters {@link AddTemplateDocumentParameters} Request Parameters Object + * @param _filename String Filename for the uploaded file + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addTemplateDocumentAsync( + @NonNull String templateId, + @NonNull AddTemplateDocumentParameters requestParameters, + @NonNull String _filename, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addTemplateDocumentConfig, requestConfig); + Request request = + this.buildAddTemplateDocumentRequest( + templateId, + requestParameters, + _filename, + resolvedConfig + ); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildAddTemplateDocumentRequest( + @NonNull String templateId, + @NonNull AddTemplateDocumentParameters requestParameters, + @NonNull String _filename, + RequestConfig resolvedConfig + ) { + MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder() + .setType(MultipartBody.FORM); + if (requestParameters.getRequestBody().getFile() != null) { + multipartBodyBuilder.addFormDataPart( + "file", + _filename, + RequestBody.create( + requestParameters.getRequestBody().getFile(), + MediaType.parse("application/octet-stream") + ) + ); + } + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/document" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .setBody(multipartBodyBuilder.build()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentsService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentsService.java new file mode 100644 index 0000000..0270122 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDocumentsService.java @@ -0,0 +1,141 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetTemplateDocumentsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdDocumentsService Service + */ +public class TemplateTemplateIdDocumentsService extends BaseService { + + private RequestConfig getTemplateDocumentsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdDocumentsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdDocumentsService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getTemplateDocuments}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdDocumentsService setGetTemplateDocumentsConfig(RequestConfig config) { + this.getTemplateDocumentsConfig = config; + return this; + } + + /** + * Get template documents + * + * @param templateId String + * @param requestParameters {@link GetTemplateDocumentsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getTemplateDocuments( + @NonNull String templateId, + @NonNull GetTemplateDocumentsParameters requestParameters + ) throws ApiError { + return this.getTemplateDocuments(templateId, requestParameters, null); + } + + /** + * Get template documents + * + * @param templateId String + * @param requestParameters {@link GetTemplateDocumentsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getTemplateDocuments( + @NonNull String templateId, + @NonNull GetTemplateDocumentsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getTemplateDocumentsConfig, requestConfig); + Request request = + this.buildGetTemplateDocumentsRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get template documents + * + * @param templateId String + * @param requestParameters {@link GetTemplateDocumentsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getTemplateDocumentsAsync( + @NonNull String templateId, + @NonNull GetTemplateDocumentsParameters requestParameters + ) throws ApiError { + return this.getTemplateDocumentsAsync(templateId, requestParameters, null); + } + + /** + * Get template documents + * + * @param templateId String + * @param requestParameters {@link GetTemplateDocumentsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getTemplateDocumentsAsync( + @NonNull String templateId, + @NonNull GetTemplateDocumentsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.getTemplateDocumentsConfig, requestConfig); + Request request = + this.buildGetTemplateDocumentsRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetTemplateDocumentsRequest( + @NonNull String templateId, + @NonNull GetTemplateDocumentsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/documents" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDuplicateService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDuplicateService.java new file mode 100644 index 0000000..66a3da9 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdDuplicateService.java @@ -0,0 +1,141 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.DuplicateTemplateParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdDuplicateService Service + */ +public class TemplateTemplateIdDuplicateService extends BaseService { + + private RequestConfig duplicateTemplateConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdDuplicateService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdDuplicateService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code duplicateTemplate}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdDuplicateService setDuplicateTemplateConfig(RequestConfig config) { + this.duplicateTemplateConfig = config; + return this; + } + + /** + * Duplicate template + * + * @param templateId String + * @param requestParameters {@link DuplicateTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object duplicateTemplate( + @NonNull String templateId, + @NonNull DuplicateTemplateParameters requestParameters + ) throws ApiError { + return this.duplicateTemplate(templateId, requestParameters, null); + } + + /** + * Duplicate template + * + * @param templateId String + * @param requestParameters {@link DuplicateTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object duplicateTemplate( + @NonNull String templateId, + @NonNull DuplicateTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.duplicateTemplateConfig, requestConfig); + Request request = + this.buildDuplicateTemplateRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Duplicate template + * + * @param templateId String + * @param requestParameters {@link DuplicateTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture duplicateTemplateAsync( + @NonNull String templateId, + @NonNull DuplicateTemplateParameters requestParameters + ) throws ApiError { + return this.duplicateTemplateAsync(templateId, requestParameters, null); + } + + /** + * Duplicate template + * + * @param templateId String + * @param requestParameters {@link DuplicateTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture duplicateTemplateAsync( + @NonNull String templateId, + @NonNull DuplicateTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.duplicateTemplateConfig, requestConfig); + Request request = + this.buildDuplicateTemplateRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildDuplicateTemplateRequest( + @NonNull String templateId, + @NonNull DuplicateTemplateParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/duplicate" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdRenameService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdRenameService.java new file mode 100644 index 0000000..cb0938c --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdRenameService.java @@ -0,0 +1,137 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.RenameTemplateParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdRenameService Service + */ +public class TemplateTemplateIdRenameService extends BaseService { + + private RequestConfig renameTemplateConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdRenameService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdRenameService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code renameTemplate}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdRenameService setRenameTemplateConfig(RequestConfig config) { + this.renameTemplateConfig = config; + return this; + } + + /** + * Rename template + * + * @param templateId String + * @param requestParameters {@link RenameTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object renameTemplate( + @NonNull String templateId, + @NonNull RenameTemplateParameters requestParameters + ) throws ApiError { + return this.renameTemplate(templateId, requestParameters, null); + } + + /** + * Rename template + * + * @param templateId String + * @param requestParameters {@link RenameTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object renameTemplate( + @NonNull String templateId, + @NonNull RenameTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.renameTemplateConfig, requestConfig); + Request request = + this.buildRenameTemplateRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Rename template + * + * @param templateId String + * @param requestParameters {@link RenameTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture renameTemplateAsync( + @NonNull String templateId, + @NonNull RenameTemplateParameters requestParameters + ) throws ApiError { + return this.renameTemplateAsync(templateId, requestParameters, null); + } + + /** + * Rename template + * + * @param templateId String + * @param requestParameters {@link RenameTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture renameTemplateAsync( + @NonNull String templateId, + @NonNull RenameTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.renameTemplateConfig, requestConfig); + Request request = + this.buildRenameTemplateRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildRenameTemplateRequest( + @NonNull String templateId, + @NonNull RenameTemplateParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/rename" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdService.java new file mode 100644 index 0000000..993505f --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdService.java @@ -0,0 +1,218 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.GetTemplateParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdService Service + */ +public class TemplateTemplateIdService extends BaseService { + + private RequestConfig getTemplateConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + private RequestConfig deleteTemplateConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code getTemplate}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdService setGetTemplateConfig(RequestConfig config) { + this.getTemplateConfig = config; + return this; + } + + /** + * Sets method-level configuration for {@code deleteTemplate}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdService setDeleteTemplateConfig(RequestConfig config) { + this.deleteTemplateConfig = config; + return this; + } + + /** + * Get template + * + * @param templateId String + * @param requestParameters {@link GetTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getTemplate( + @NonNull String templateId, + @NonNull GetTemplateParameters requestParameters + ) throws ApiError { + return this.getTemplate(templateId, requestParameters, null); + } + + /** + * Get template + * + * @param templateId String + * @param requestParameters {@link GetTemplateParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object getTemplate( + @NonNull String templateId, + @NonNull GetTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.getTemplateConfig, requestConfig); + Request request = this.buildGetTemplateRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Get template + * + * @param templateId String + * @param requestParameters {@link GetTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getTemplateAsync( + @NonNull String templateId, + @NonNull GetTemplateParameters requestParameters + ) throws ApiError { + return this.getTemplateAsync(templateId, requestParameters, null); + } + + /** + * Get template + * + * @param templateId String + * @param requestParameters {@link GetTemplateParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture getTemplateAsync( + @NonNull String templateId, + @NonNull GetTemplateParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.getTemplateConfig, requestConfig); + Request request = this.buildGetTemplateRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildGetTemplateRequest( + @NonNull String templateId, + @NonNull GetTemplateParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.GET, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } + + /** + * Delete template + * + * @param templateId String + * @return response of {@code Object} + */ + public Object deleteTemplate(@NonNull String templateId) throws ApiError { + return this.deleteTemplate(templateId, null); + } + + /** + * Delete template + * + * @param templateId String + * @return response of {@code Object} + */ + public Object deleteTemplate(@NonNull String templateId, RequestConfig requestConfig) + throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.deleteTemplateConfig, requestConfig); + Request request = this.buildDeleteTemplateRequest(templateId, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Delete template + * + * @param templateId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteTemplateAsync(@NonNull String templateId) throws ApiError { + return this.deleteTemplateAsync(templateId, null); + } + + /** + * Delete template + * + * @param templateId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteTemplateAsync( + @NonNull String templateId, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.deleteTemplateConfig, requestConfig); + Request request = this.buildDeleteTemplateRequest(templateId, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildDeleteTemplateRequest( + @NonNull String templateId, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.DELETE, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetCommentService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetCommentService.java new file mode 100644 index 0000000..fc630cf --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetCommentService.java @@ -0,0 +1,142 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetTemplateCommentParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdSetCommentService Service + */ +public class TemplateTemplateIdSetCommentService extends BaseService { + + private RequestConfig setTemplateCommentConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdSetCommentService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdSetCommentService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setTemplateComment}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdSetCommentService setSetTemplateCommentConfig(RequestConfig config) { + this.setTemplateCommentConfig = config; + return this; + } + + /** + * Set template comment + * + * @param templateId String + * @param requestParameters {@link SetTemplateCommentParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setTemplateComment( + @NonNull String templateId, + @NonNull SetTemplateCommentParameters requestParameters + ) throws ApiError { + return this.setTemplateComment(templateId, requestParameters, null); + } + + /** + * Set template comment + * + * @param templateId String + * @param requestParameters {@link SetTemplateCommentParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setTemplateComment( + @NonNull String templateId, + @NonNull SetTemplateCommentParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setTemplateCommentConfig, requestConfig); + Request request = + this.buildSetTemplateCommentRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Set template comment + * + * @param templateId String + * @param requestParameters {@link SetTemplateCommentParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setTemplateCommentAsync( + @NonNull String templateId, + @NonNull SetTemplateCommentParameters requestParameters + ) throws ApiError { + return this.setTemplateCommentAsync(templateId, requestParameters, null); + } + + /** + * Set template comment + * + * @param templateId String + * @param requestParameters {@link SetTemplateCommentParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setTemplateCommentAsync( + @NonNull String templateId, + @NonNull SetTemplateCommentParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setTemplateCommentConfig, requestConfig); + Request request = + this.buildSetTemplateCommentRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetTemplateCommentRequest( + @NonNull String templateId, + @NonNull SetTemplateCommentParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/set_comment" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetNotificationService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetNotificationService.java new file mode 100644 index 0000000..49920b0 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdSetNotificationService.java @@ -0,0 +1,144 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.SetTemplateNotificationParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdSetNotificationService Service + */ +public class TemplateTemplateIdSetNotificationService extends BaseService { + + private RequestConfig setTemplateNotificationConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdSetNotificationService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdSetNotificationService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code setTemplateNotification}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdSetNotificationService setSetTemplateNotificationConfig( + RequestConfig config + ) { + this.setTemplateNotificationConfig = config; + return this; + } + + /** + * Set template notification + * + * @param templateId String + * @param requestParameters {@link SetTemplateNotificationParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setTemplateNotification( + @NonNull String templateId, + @NonNull SetTemplateNotificationParameters requestParameters + ) throws ApiError { + return this.setTemplateNotification(templateId, requestParameters, null); + } + + /** + * Set template notification + * + * @param templateId String + * @param requestParameters {@link SetTemplateNotificationParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object setTemplateNotification( + @NonNull String templateId, + @NonNull SetTemplateNotificationParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setTemplateNotificationConfig, requestConfig); + Request request = + this.buildSetTemplateNotificationRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Set template notification + * + * @param templateId String + * @param requestParameters {@link SetTemplateNotificationParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setTemplateNotificationAsync( + @NonNull String templateId, + @NonNull SetTemplateNotificationParameters requestParameters + ) throws ApiError { + return this.setTemplateNotificationAsync(templateId, requestParameters, null); + } + + /** + * Set template notification + * + * @param templateId String + * @param requestParameters {@link SetTemplateNotificationParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture setTemplateNotificationAsync( + @NonNull String templateId, + @NonNull SetTemplateNotificationParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.setTemplateNotificationConfig, requestConfig); + Request request = + this.buildSetTemplateNotificationRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildSetTemplateNotificationRequest( + @NonNull String templateId, + @NonNull SetTemplateNotificationParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/set_notification" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplateTemplateIdSigningStepsService.java b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdSigningStepsService.java new file mode 100644 index 0000000..d547269 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplateTemplateIdSigningStepsService.java @@ -0,0 +1,144 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.AddTemplateSigningStepsParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplateTemplateIdSigningStepsService Service + */ +public class TemplateTemplateIdSigningStepsService extends BaseService { + + private RequestConfig addTemplateSigningStepsConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplateTemplateIdSigningStepsService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplateTemplateIdSigningStepsService( + @NonNull OkHttpClient httpClient, + SignplusConfig config + ) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code addTemplateSigningSteps}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplateTemplateIdSigningStepsService setAddTemplateSigningStepsConfig( + RequestConfig config + ) { + this.addTemplateSigningStepsConfig = config; + return this; + } + + /** + * Add template signing steps + * + * @param templateId String + * @param requestParameters {@link AddTemplateSigningStepsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object addTemplateSigningSteps( + @NonNull String templateId, + @NonNull AddTemplateSigningStepsParameters requestParameters + ) throws ApiError { + return this.addTemplateSigningSteps(templateId, requestParameters, null); + } + + /** + * Add template signing steps + * + * @param templateId String + * @param requestParameters {@link AddTemplateSigningStepsParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object addTemplateSigningSteps( + @NonNull String templateId, + @NonNull AddTemplateSigningStepsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addTemplateSigningStepsConfig, requestConfig); + Request request = + this.buildAddTemplateSigningStepsRequest(templateId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Add template signing steps + * + * @param templateId String + * @param requestParameters {@link AddTemplateSigningStepsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addTemplateSigningStepsAsync( + @NonNull String templateId, + @NonNull AddTemplateSigningStepsParameters requestParameters + ) throws ApiError { + return this.addTemplateSigningStepsAsync(templateId, requestParameters, null); + } + + /** + * Add template signing steps + * + * @param templateId String + * @param requestParameters {@link AddTemplateSigningStepsParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture addTemplateSigningStepsAsync( + @NonNull String templateId, + @NonNull AddTemplateSigningStepsParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = + this.getResolvedConfig(this.addTemplateSigningStepsConfig, requestConfig); + Request request = + this.buildAddTemplateSigningStepsRequest(templateId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildAddTemplateSigningStepsRequest( + @NonNull String templateId, + @NonNull AddTemplateSigningStepsParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "template/{template_id}/signing_steps" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("template_id", templateId) + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/TemplatesService.java b/src/main/java/com/alohi/signplus/services/TemplatesService.java new file mode 100644 index 0000000..925c3e1 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/TemplatesService.java @@ -0,0 +1,123 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.ListTemplatesParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * TemplatesService Service + */ +public class TemplatesService extends BaseService { + + private RequestConfig listTemplatesConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of TemplatesService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public TemplatesService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code listTemplates}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public TemplatesService setListTemplatesConfig(RequestConfig config) { + this.listTemplatesConfig = config; + return this; + } + + /** + * List templates + * + * @param requestParameters {@link ListTemplatesParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object listTemplates(@NonNull ListTemplatesParameters requestParameters) throws ApiError { + return this.listTemplates(requestParameters, null); + } + + /** + * List templates + * + * @param requestParameters {@link ListTemplatesParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object listTemplates( + @NonNull ListTemplatesParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.listTemplatesConfig, requestConfig); + Request request = this.buildListTemplatesRequest(requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * List templates + * + * @param requestParameters {@link ListTemplatesParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture listTemplatesAsync( + @NonNull ListTemplatesParameters requestParameters + ) throws ApiError { + return this.listTemplatesAsync(requestParameters, null); + } + + /** + * List templates + * + * @param requestParameters {@link ListTemplatesParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture listTemplatesAsync( + @NonNull ListTemplatesParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.listTemplatesConfig, requestConfig); + Request request = this.buildListTemplatesRequest(requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildListTemplatesRequest( + @NonNull ListTemplatesParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "templates" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/Void_Service.java b/src/main/java/com/alohi/signplus/services/Void_Service.java new file mode 100644 index 0000000..5f568d1 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/Void_Service.java @@ -0,0 +1,134 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.VoidEnvelopeParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * Void_Service Service + */ +public class Void_Service extends BaseService { + + private RequestConfig voidEnvelopeConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of Void_Service. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public Void_Service(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code voidEnvelope}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public Void_Service setVoidEnvelopeConfig(RequestConfig config) { + this.voidEnvelopeConfig = config; + return this; + } + + /** + * Void envelope + * + * @param envelopeId String + * @param requestParameters {@link VoidEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object voidEnvelope( + @NonNull String envelopeId, + @NonNull VoidEnvelopeParameters requestParameters + ) throws ApiError { + return this.voidEnvelope(envelopeId, requestParameters, null); + } + + /** + * Void envelope + * + * @param envelopeId String + * @param requestParameters {@link VoidEnvelopeParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object voidEnvelope( + @NonNull String envelopeId, + @NonNull VoidEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.voidEnvelopeConfig, requestConfig); + Request request = this.buildVoidEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Void envelope + * + * @param envelopeId String + * @param requestParameters {@link VoidEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture voidEnvelopeAsync( + @NonNull String envelopeId, + @NonNull VoidEnvelopeParameters requestParameters + ) throws ApiError { + return this.voidEnvelopeAsync(envelopeId, requestParameters, null); + } + + /** + * Void envelope + * + * @param envelopeId String + * @param requestParameters {@link VoidEnvelopeParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture voidEnvelopeAsync( + @NonNull String envelopeId, + @NonNull VoidEnvelopeParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.voidEnvelopeConfig, requestConfig); + Request request = this.buildVoidEnvelopeRequest(envelopeId, requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildVoidEnvelopeRequest( + @NonNull String envelopeId, + @NonNull VoidEnvelopeParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.PUT, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "envelope/{envelope_id}/void" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("envelope_id", envelopeId) + .setHeader("Accept", requestParameters.getAccept()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/WebhookIdService.java b/src/main/java/com/alohi/signplus/services/WebhookIdService.java new file mode 100644 index 0000000..aa2bd65 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/WebhookIdService.java @@ -0,0 +1,117 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * WebhookIdService Service + */ +public class WebhookIdService extends BaseService { + + private RequestConfig deleteWebhookConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of WebhookIdService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public WebhookIdService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code deleteWebhook}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public WebhookIdService setDeleteWebhookConfig(RequestConfig config) { + this.deleteWebhookConfig = config; + return this; + } + + /** + * Delete webhook + * + * @param webhookId String + * @return response of {@code Object} + */ + public Object deleteWebhook(@NonNull String webhookId) throws ApiError { + return this.deleteWebhook(webhookId, null); + } + + /** + * Delete webhook + * + * @param webhookId String + * @return response of {@code Object} + */ + public Object deleteWebhook(@NonNull String webhookId, RequestConfig requestConfig) + throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.deleteWebhookConfig, requestConfig); + Request request = this.buildDeleteWebhookRequest(webhookId, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Delete webhook + * + * @param webhookId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteWebhookAsync(@NonNull String webhookId) throws ApiError { + return this.deleteWebhookAsync(webhookId, null); + } + + /** + * Delete webhook + * + * @param webhookId String + * @return response of {@code CompletableFuture} + */ + public CompletableFuture deleteWebhookAsync( + @NonNull String webhookId, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.deleteWebhookConfig, requestConfig); + Request request = this.buildDeleteWebhookRequest(webhookId, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildDeleteWebhookRequest( + @NonNull String webhookId, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.DELETE, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "webhook/{webhook_id}" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setPathParameter("webhook_id", webhookId) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/WebhookService.java b/src/main/java/com/alohi/signplus/services/WebhookService.java new file mode 100644 index 0000000..893ba3c --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/WebhookService.java @@ -0,0 +1,123 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.CreateWebhookParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * WebhookService Service + */ +public class WebhookService extends BaseService { + + private RequestConfig createWebhookConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of WebhookService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public WebhookService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code createWebhook}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public WebhookService setCreateWebhookConfig(RequestConfig config) { + this.createWebhookConfig = config; + return this; + } + + /** + * Create webhook + * + * @param requestParameters {@link CreateWebhookParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object createWebhook(@NonNull CreateWebhookParameters requestParameters) throws ApiError { + return this.createWebhook(requestParameters, null); + } + + /** + * Create webhook + * + * @param requestParameters {@link CreateWebhookParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object createWebhook( + @NonNull CreateWebhookParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.createWebhookConfig, requestConfig); + Request request = this.buildCreateWebhookRequest(requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * Create webhook + * + * @param requestParameters {@link CreateWebhookParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture createWebhookAsync( + @NonNull CreateWebhookParameters requestParameters + ) throws ApiError { + return this.createWebhookAsync(requestParameters, null); + } + + /** + * Create webhook + * + * @param requestParameters {@link CreateWebhookParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture createWebhookAsync( + @NonNull CreateWebhookParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.createWebhookConfig, requestConfig); + Request request = this.buildCreateWebhookRequest(requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildCreateWebhookRequest( + @NonNull CreateWebhookParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "webhook" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/services/WebhooksService.java b/src/main/java/com/alohi/signplus/services/WebhooksService.java new file mode 100644 index 0000000..c87b4a4 --- /dev/null +++ b/src/main/java/com/alohi/signplus/services/WebhooksService.java @@ -0,0 +1,123 @@ +package com.alohi.signplus.services; + +import com.alohi.signplus.config.RequestConfig; +import com.alohi.signplus.config.SignplusConfig; +import com.alohi.signplus.exceptions.ApiError; +import com.alohi.signplus.http.Environment; +import com.alohi.signplus.http.HttpMethod; +import com.alohi.signplus.http.ModelConverter; +import com.alohi.signplus.http.util.RequestBuilder; +import com.alohi.signplus.models.ListWebhooksParameters; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import lombok.NonNull; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +/** + * WebhooksService Service + */ +public class WebhooksService extends BaseService { + + private RequestConfig listWebhooksConfig = RequestConfig.builder() + .environment(Environment.RESTAPI) + .build(); + + /** + * Constructs a new instance of WebhooksService. + * + * @param httpClient The HTTP client to use for requests + * @param config The SDK configuration + */ + public WebhooksService(@NonNull OkHttpClient httpClient, SignplusConfig config) { + super(httpClient, config); + } + + /** + * Sets method-level configuration for {@code listWebhooks}. + * Method-level overrides take precedence over service-level configuration but are + * overridden by request-level configurations. + * + * @param config The configuration overrides to apply at the method level + * @return This service instance for method chaining + */ + public WebhooksService setListWebhooksConfig(RequestConfig config) { + this.listWebhooksConfig = config; + return this; + } + + /** + * List webhooks + * + * @param requestParameters {@link ListWebhooksParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object listWebhooks(@NonNull ListWebhooksParameters requestParameters) throws ApiError { + return this.listWebhooks(requestParameters, null); + } + + /** + * List webhooks + * + * @param requestParameters {@link ListWebhooksParameters} Request Parameters Object + * @return response of {@code Object} + */ + public Object listWebhooks( + @NonNull ListWebhooksParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.listWebhooksConfig, requestConfig); + Request request = this.buildListWebhooksRequest(requestParameters, resolvedConfig); + Response response = this.execute(request, resolvedConfig); + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + } + + /** + * List webhooks + * + * @param requestParameters {@link ListWebhooksParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture listWebhooksAsync( + @NonNull ListWebhooksParameters requestParameters + ) throws ApiError { + return this.listWebhooksAsync(requestParameters, null); + } + + /** + * List webhooks + * + * @param requestParameters {@link ListWebhooksParameters} Request Parameters Object + * @return response of {@code CompletableFuture} + */ + public CompletableFuture listWebhooksAsync( + @NonNull ListWebhooksParameters requestParameters, + RequestConfig requestConfig + ) throws ApiError { + RequestConfig resolvedConfig = this.getResolvedConfig(this.listWebhooksConfig, requestConfig); + Request request = this.buildListWebhooksRequest(requestParameters, resolvedConfig); + CompletableFuture futureResponse = this.executeAsync(request, resolvedConfig); + return futureResponse.thenApplyAsync(response -> { + byte[] bodyBytes = ModelConverter.readBytes(response); + return ModelConverter.convert(bodyBytes, new TypeReference() {}); + }); + } + + private Request buildListWebhooksRequest( + @NonNull ListWebhooksParameters requestParameters, + RequestConfig resolvedConfig + ) { + return new RequestBuilder( + HttpMethod.POST, + resolveBaseUrl(resolvedConfig, Environment.RESTAPI), + "webhooks" + ) + .setAccessTokenAuth(resolveAccessToken(resolvedConfig), "Bearer") + .setHeader("Accept", requestParameters.getAccept()) + .setJsonContent(requestParameters.getRequestBody()) + .build(); + } +} diff --git a/src/main/java/com/alohi/signplus/validation/Violation.java b/src/main/java/com/alohi/signplus/validation/Violation.java index c421a7f..b172e99 100644 --- a/src/main/java/com/alohi/signplus/validation/Violation.java +++ b/src/main/java/com/alohi/signplus/validation/Violation.java @@ -1,23 +1,48 @@ package com.alohi.signplus.validation; +/** + * Represents a validation constraint violation. + * Contains the path to the violating field and a descriptive error message. + */ public class Violation { private final String path; private final String message; + /** + * Constructs a new Violation. + * + * @param path The JSON path to the field that violated the constraint + * @param message The descriptive error message + */ public Violation(String path, String message) { this.path = path; this.message = message; } + /** + * Gets the path to the violating field. + * + * @return The JSON path (e.g., "user.email") + */ public String getPath() { return path; } + /** + * Gets the error message describing the violation. + * + * @return The error message + */ public String getMessage() { return message; } + /** + * Returns a string representation of the violation in the format "path: message". + * + * @return The formatted violation string + */ @Override public String toString() { return String.format("%s: %s", path, message); diff --git a/src/main/java/com/alohi/signplus/validation/ViolationAggregator.java b/src/main/java/com/alohi/signplus/validation/ViolationAggregator.java index 6932e44..36632da 100644 --- a/src/main/java/com/alohi/signplus/validation/ViolationAggregator.java +++ b/src/main/java/com/alohi/signplus/validation/ViolationAggregator.java @@ -5,19 +5,40 @@ import java.util.Arrays; import java.util.List; +/** + * Aggregates multiple validation violations from different validators. + * Provides a fluent API for collecting violations and throwing a ValidationException if any exist. + */ public class ViolationAggregator { List violations = new ArrayList<>(); + /** + * Adds an array of violations to the aggregator. + * + * @param The type parameter (unused, for API compatibility) + * @param violations The violations to add + * @return This aggregator for method chaining + */ public ViolationAggregator add(Violation[] violations) { this.violations.addAll(Arrays.asList(violations)); return this; } + /** + * Returns all aggregated violations as an array. + * + * @return Array of all collected violations + */ public Violation[] aggregate() { return violations.toArray(new Violation[0]); } + /** + * Throws a ValidationException if any violations have been collected. + * + * @throws ValidationException if violations exist + */ public void validateAll() { if (!violations.isEmpty()) { throw new ValidationException(aggregate()); diff --git a/src/main/java/com/alohi/signplus/validation/exceptions/ValidationException.java b/src/main/java/com/alohi/signplus/validation/exceptions/ValidationException.java index 3b7bf38..62b286e 100644 --- a/src/main/java/com/alohi/signplus/validation/exceptions/ValidationException.java +++ b/src/main/java/com/alohi/signplus/validation/exceptions/ValidationException.java @@ -3,21 +3,40 @@ import com.alohi.signplus.validation.Violation; import lombok.Getter; +/** + * Exception thrown when validation constraints are violated. + * Contains all validation violations that occurred during validation. + */ public class ValidationException extends RuntimeException { @Getter private final Violation[] violations; + /** + * Constructs a new ValidationException with the specified violations. + * + * @param violations The array of validation violations that occurred + */ public ValidationException(Violation[] violations) { super(); this.violations = violations; } + /** + * Returns a formatted message describing all validation violations. + * + * @return A message listing all violations with their paths and messages + */ @Override public String getMessage() { return "Validation failed with the following violations: " + this.buildViolationsString(); } + /** + * Builds a formatted string containing all violations. + * + * @return A newline-separated string of all violations + */ private String buildViolationsString() { StringBuilder sb = new StringBuilder(); for (Violation violation : this.violations) { diff --git a/src/main/java/com/alohi/signplus/validation/validators/AbstractValidator.java b/src/main/java/com/alohi/signplus/validation/validators/AbstractValidator.java index e9ef7c4..97e9fb9 100644 --- a/src/main/java/com/alohi/signplus/validation/validators/AbstractValidator.java +++ b/src/main/java/com/alohi/signplus/validation/validators/AbstractValidator.java @@ -3,6 +3,12 @@ import com.alohi.signplus.validation.Violation; import lombok.Getter; +/** + * Abstract base class for all validators providing common functionality. + * Handles field name tracking and required/optional validation. + * + * @param The type of value to validate + */ public abstract class AbstractValidator implements Validator { @Getter @@ -19,21 +25,43 @@ public AbstractValidator() { this.fieldName = ""; } + /** + * Marks this field as required (must not be null). + * + * @return This validator for method chaining + */ public AbstractValidator required() { this.isRequired = true; return this; } + /** + * Marks this field as optional (may be null). + * + * @return This validator for method chaining + */ public AbstractValidator optional() { this.isRequired = false; return this; } + /** + * Sets the field name for violation messages. + * + * @param fieldName The field name + * @return This validator for method chaining + */ public AbstractValidator setFieldName(String fieldName) { this.fieldName = fieldName; return this; } + /** + * Validates that a required field is not null. + * + * @param value The value to check + * @return A violation if the field is required and null, otherwise null + */ protected Violation validateRequired(T value) { if (isRequired() && value == null) { return new Violation(getFieldName(), "is required"); diff --git a/src/main/java/com/alohi/signplus/validation/validators/ListValidator.java b/src/main/java/com/alohi/signplus/validation/validators/ListValidator.java index b6b157f..13684d3 100644 --- a/src/main/java/com/alohi/signplus/validation/validators/ListValidator.java +++ b/src/main/java/com/alohi/signplus/validation/validators/ListValidator.java @@ -4,6 +4,12 @@ import java.util.ArrayList; import java.util.List; +/** + * Validator for list/array values with size and uniqueness constraints. + * Can also validate individual items within the list using a nested validator. + * + * @param The type of items in the list + */ public class ListValidator extends AbstractValidator> { private AbstractValidator itemValidator; @@ -17,26 +23,56 @@ public ListValidator(String fieldName) { public ListValidator() {} + /** + * Sets the minimum list size constraint. + * + * @param minLength The minimum number of items allowed + * @return This validator for method chaining + */ public ListValidator minLength(Integer minLength) { this.minLength = minLength; return this; } + /** + * Sets the maximum list size constraint. + * + * @param maxLength The maximum number of items allowed + * @return This validator for method chaining + */ public ListValidator maxLength(Integer maxLength) { this.maxLength = maxLength; return this; } + /** + * Sets whether all items in the list must be unique. + * + * @param uniqueItems Whether items must be unique + * @return This validator for method chaining + */ public ListValidator uniqueItems(Boolean uniqueItems) { this.uniqueItems = uniqueItems; return this; } + /** + * Sets a validator to validate each individual item in the list. + * + * @param itemValidator The validator to apply to each list item + * @return This validator for method chaining + */ public ListValidator itemValidator(AbstractValidator itemValidator) { this.itemValidator = itemValidator; return this; } + /** + * Validates a list against configured constraints including size, uniqueness, and item validation. + * + * @param list The list to validate + * @return Array of violations if validation fails, empty array if valid + */ @Override public Violation[] validate(List list) { Violation requiredViolation = validateRequired(list); @@ -50,11 +86,15 @@ public Violation[] validate(List list) { List violations = new ArrayList<>(); if (minLength != null && list.size() < minLength) { - violations.add(new Violation(getFieldName(), String.format("must have at least %d items", minLength))); + violations.add( + new Violation(getFieldName(), String.format("must have at least %d items", minLength)) + ); } if (maxLength != null && list.size() > maxLength) { - violations.add(new Violation(getFieldName(), String.format("must have at most %d items", maxLength))); + violations.add( + new Violation(getFieldName(), String.format("must have at most %d items", maxLength)) + ); } if (uniqueItems != null && list.stream().distinct().count() != list.size()) { diff --git a/src/main/java/com/alohi/signplus/validation/validators/NumericValidator.java b/src/main/java/com/alohi/signplus/validation/validators/NumericValidator.java index 9751568..616ab37 100644 --- a/src/main/java/com/alohi/signplus/validation/validators/NumericValidator.java +++ b/src/main/java/com/alohi/signplus/validation/validators/NumericValidator.java @@ -1,15 +1,23 @@ package com.alohi.signplus.validation.validators; import com.alohi.signplus.validation.Violation; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +/** + * Validator for numeric values with minimum, maximum, and multipleOf constraints. + * Supports inclusive and exclusive bounds for range validation. + * + * @param The numeric type to validate (Integer, Long, Double, etc.) + */ public class NumericValidator extends AbstractValidator { private T minValue; private boolean minInclusive; private T maxValue; private boolean maxInclusive; + private T multipleOfValue; public NumericValidator(String fieldName) { super(fieldName); @@ -17,26 +25,69 @@ public NumericValidator(String fieldName) { public NumericValidator() {} + /** + * Sets the minimum value constraint (inclusive by default). + * + * @param min The minimum allowed value + * @return This validator for method chaining + */ public NumericValidator min(T min) { return min(min, true); } + /** + * Sets the minimum value constraint with inclusive/exclusive option. + * + * @param min The minimum allowed value + * @param inclusive Whether the minimum is inclusive (>=) or exclusive (>) + * @return This validator for method chaining + */ public NumericValidator min(T min, boolean inclusive) { this.minValue = min; this.minInclusive = inclusive; return this; } + /** + * Sets the maximum value constraint (inclusive by default). + * + * @param max The maximum allowed value + * @return This validator for method chaining + */ public NumericValidator max(T max) { return max(max, true); } + /** + * Sets the maximum value constraint with inclusive/exclusive option. + * + * @param max The maximum allowed value + * @param inclusive Whether the maximum is inclusive (<=) or exclusive (<) + * @return This validator for method chaining + */ public NumericValidator max(T max, boolean inclusive) { this.maxValue = max; this.maxInclusive = inclusive; return this; } + /** + * Sets the multipleOf constraint. The value must be an exact multiple of the given divisor. + * + * @param multipleOf The divisor that the value must be a multiple of + * @return This validator for method chaining + */ + public NumericValidator multipleOf(T multipleOf) { + this.multipleOfValue = multipleOf; + return this; + } + + /** + * Validates a numeric value against configured constraints. + * + * @param value The number to validate + * @return Array of violations if validation fails, empty array if valid + */ @Override public Violation[] validate(T value) { Violation requiredViolation = validateRequired(value); @@ -53,12 +104,17 @@ public Violation[] validate(T value) { if (this.minInclusive) { if (value.doubleValue() < this.minValue.doubleValue()) { violations.add( - new Violation(getFieldName(), String.format("must be greater than or equal to %s", this.minValue)) + new Violation( + getFieldName(), + String.format("must be greater than or equal to %s", this.minValue) + ) ); } } else { if (value.doubleValue() <= this.minValue.doubleValue()) { - violations.add(new Violation(getFieldName(), String.format("must be greater than %s", this.minValue))); + violations.add( + new Violation(getFieldName(), String.format("must be greater than %s", this.minValue)) + ); } } } @@ -67,16 +123,34 @@ public Violation[] validate(T value) { if (this.maxInclusive) { if (value.doubleValue() > this.maxValue.doubleValue()) { violations.add( - new Violation(getFieldName(), String.format("must be less than or equal to %s", this.maxValue)) + new Violation( + getFieldName(), + String.format("must be less than or equal to %s", this.maxValue) + ) ); } } else { if (value.doubleValue() >= this.maxValue.doubleValue()) { - violations.add(new Violation(getFieldName(), String.format("must be less than %s", this.maxValue))); + violations.add( + new Violation(getFieldName(), String.format("must be less than %s", this.maxValue)) + ); } } } + if (this.multipleOfValue != null) { + BigDecimal bdValue = new BigDecimal(value.toString()); + BigDecimal bdMultipleOf = new BigDecimal(this.multipleOfValue.toString()); + if (bdValue.remainder(bdMultipleOf).compareTo(BigDecimal.ZERO) != 0) { + violations.add( + new Violation( + getFieldName(), + String.format("must be a multiple of %s", this.multipleOfValue) + ) + ); + } + } + return violations.toArray(new Violation[0]); } } diff --git a/src/main/java/com/alohi/signplus/validation/validators/StringValidator.java b/src/main/java/com/alohi/signplus/validation/validators/StringValidator.java index e71457f..08967a2 100644 --- a/src/main/java/com/alohi/signplus/validation/validators/StringValidator.java +++ b/src/main/java/com/alohi/signplus/validation/validators/StringValidator.java @@ -4,6 +4,10 @@ import java.util.ArrayList; import java.util.List; +/** + * Validator for string values with length and pattern constraints. + * Provides a fluent API for configuring validation rules. + */ public class StringValidator extends AbstractValidator { private Integer minLength; @@ -16,21 +20,45 @@ public StringValidator(String fieldName) { public StringValidator() {} + /** + * Sets the minimum length constraint. + * + * @param minLength The minimum allowed length + * @return This validator for method chaining + */ public StringValidator minLength(Integer minLength) { this.minLength = minLength; return this; } + /** + * Sets the maximum length constraint. + * + * @param maxLength The maximum allowed length + * @return This validator for method chaining + */ public StringValidator maxLength(Integer maxLength) { this.maxLength = maxLength; return this; } + /** + * Sets the regex pattern constraint. + * + * @param pattern The regex pattern the string must match + * @return This validator for method chaining + */ public StringValidator pattern(String pattern) { this.pattern = pattern; return this; } + /** + * Validates a string value against configured constraints. + * + * @param value The string to validate + * @return Array of violations if validation fails, empty array if valid + */ @Override public Violation[] validate(String value) { Violation requiredViolation = validateRequired(value); @@ -44,13 +72,25 @@ public Violation[] validate(String value) { List violations = new ArrayList<>(); if (minLength != null && value.length() < minLength) { - violations.add(new Violation(getFieldName(), String.format("must be at least %d characters long", minLength))); + violations.add( + new Violation( + getFieldName(), + String.format("must be at least %d characters long", minLength) + ) + ); } if (maxLength != null && value.length() > maxLength) { - violations.add(new Violation(getFieldName(), String.format("must be at most %d characters long", maxLength))); + violations.add( + new Violation( + getFieldName(), + String.format("must be at most %d characters long", maxLength) + ) + ); } if (pattern != null && !value.matches(pattern)) { - violations.add(new Violation(getFieldName(), String.format("must match pattern %s", pattern))); + violations.add( + new Violation(getFieldName(), String.format("must match pattern %s", pattern)) + ); } return violations.toArray(new Violation[0]); diff --git a/src/main/java/com/alohi/signplus/validation/validators/Validator.java b/src/main/java/com/alohi/signplus/validation/validators/Validator.java index 9c3db43..3d64415 100644 --- a/src/main/java/com/alohi/signplus/validation/validators/Validator.java +++ b/src/main/java/com/alohi/signplus/validation/validators/Validator.java @@ -2,6 +2,18 @@ import com.alohi.signplus.validation.Violation; +/** + * Interface for validators that check values against constraints. + * Implementations validate specific types and return violations if validation fails. + * + * @param The type of value to validate + */ public interface Validator { + /** + * Validates a value against defined constraints. + * + * @param value The value to validate + * @return An array of violations if validation fails, empty array if valid + */ Violation[] validate(T value); } diff --git a/src/main/java/com/alohi/signplus/validation/validators/modelValidators/AbstractModelValidator.java b/src/main/java/com/alohi/signplus/validation/validators/modelValidators/AbstractModelValidator.java index 85d98ed..1ea9156 100644 --- a/src/main/java/com/alohi/signplus/validation/validators/modelValidators/AbstractModelValidator.java +++ b/src/main/java/com/alohi/signplus/validation/validators/modelValidators/AbstractModelValidator.java @@ -4,16 +4,43 @@ import com.alohi.signplus.validation.validators.AbstractValidator; import java.util.Arrays; +/** + * Abstract base validator for complex model objects. + * Extends AbstractValidator to add model-specific validation with proper path handling. + * Subclasses implement validateModel() to define validation rules for specific model types. + */ public abstract class AbstractModelValidator extends AbstractValidator { + /** + * Creates a validator with a field name for error path construction. + * + * @param fieldName The field name to use in violation paths + */ public AbstractModelValidator(String fieldName) { super(fieldName); } + /** + * Creates a validator without a field name (for root-level validation). + */ public AbstractModelValidator() {} + /** + * Validates the model's internal structure and constraints. + * Subclasses implement this to define model-specific validation rules. + * + * @param value The model instance to validate + * @return Array of violations found during validation + */ protected abstract Violation[] validateModel(T value); + /** + * Validates a model value including required checks and model-specific validation. + * Prepends the field name to all violation paths for proper error reporting. + * + * @param value The value to validate + * @return Array of violations found + */ @Override public Violation[] validate(T value) { Violation requiredViolation = validateRequired(value);