com.lacunasoftware.signer.documents.DocumentFileModel Maven / Gradle / Ivy
/*
* Dropsigner (HML)
* Authentication
In order to call this APIs, you will need an API key. Set the API key in the header X-Api-Key:
X-Api-Key: your-app|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HTTP Codes
The APIs will return the following HTTP codes:
Code Description 200 (OK) Request processed successfully. The response is different for each API, please refer to the operation's documentation 400 (Bad Request) Syntax error. For instance, when a required field was not provided 401 (Unauthorized) API key not provided or invalid 403 (Forbidden) API key is valid, but the application has insufficient permissions to complete the requested operation 422 (Unprocessable Entity) API error. The response is as defined in ErrorModel
Error Codes
Some of the error codes returned in a 422 response are provided bellow*:
- CertificateNotFound
- DocumentNotFound
- FolderNotFound
- CpfMismatch
- CpfNotExpected
- InvalidFlowAction
- DocumentInvalidKey
*The codes shown above are the main error codes. Nonetheless, this list is not comprehensive. New codes may be added anytime without previous warning.
Webhooks
It is recomended to subscribe to Webhook events instead of polling APIs. To do so, enable webhooks and register an URL that will receive a POST request whenever one of the events bellow occur.
All requests have the format described in Webhooks.WebhookModel. The data field varies according to the webhook event type:
Event type Description Payload DocumentSigned Triggered when a document is signed. Webhooks.DocumentSignedModel DocumentApproved Triggered when a document is approved. Webhooks.DocumentApprovedModel DocumentRefused Triggered when a document is refused. Webhooks.DocumentRefusedModel DocumentConcluded Triggered when the flow of a document is concluded. Webhooks.DocumentConcludedModel DocumentCanceled Triggered when the document is canceled. Webhooks.DocumentCanceledModel DocumentsCreated (v1.50.0) Triggered when one or more documents are created. Webhooks.DocumentsCreatedModel
To register your application URL and enable Webhooks, access the integrations section in your organization's details page.
*
* OpenAPI spec version: 1.55.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.lacunasoftware.signer.documents;
import java.util.Objects;
import java.util.UUID;
import org.threeten.bp.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* DocumentFileModel
*/
public class DocumentFileModel {
@JsonProperty("id")
@SerializedName("id")
private UUID id = null;
@JsonProperty("name")
@SerializedName("name")
private String name = null;
@JsonProperty("isSigned")
@SerializedName("isSigned")
private Boolean isSigned = null;
@JsonProperty("isEnvelopePart")
@SerializedName("isEnvelopePart")
private Boolean isEnvelopePart = null;
@JsonProperty("envelopeStartPage")
@SerializedName("envelopeStartPage")
private Integer envelopeStartPage = null;
@JsonProperty("numberPages")
@SerializedName("numberPages")
private Integer numberPages = null;
@JsonProperty("mimeType")
@SerializedName("mimeType")
private String mimeType = null;
@JsonProperty("filename")
@SerializedName("filename")
private String filename = null;
@JsonProperty("creationDate")
@SerializedName("creationDate")
private OffsetDateTime creationDate = null;
public DocumentFileModel id(UUID id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@Schema(description = "")
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public DocumentFileModel name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public DocumentFileModel isSigned(Boolean isSigned) {
this.isSigned = isSigned;
return this;
}
/**
* Get isSigned
* @return isSigned
**/
@Schema(description = "")
public Boolean isIsSigned() {
return isSigned;
}
public void setIsSigned(Boolean isSigned) {
this.isSigned = isSigned;
}
public DocumentFileModel isEnvelopePart(Boolean isEnvelopePart) {
this.isEnvelopePart = isEnvelopePart;
return this;
}
/**
* Get isEnvelopePart
* @return isEnvelopePart
**/
@Schema(description = "")
public Boolean isIsEnvelopePart() {
return isEnvelopePart;
}
public void setIsEnvelopePart(Boolean isEnvelopePart) {
this.isEnvelopePart = isEnvelopePart;
}
public DocumentFileModel envelopeStartPage(Integer envelopeStartPage) {
this.envelopeStartPage = envelopeStartPage;
return this;
}
/**
* Get envelopeStartPage
* @return envelopeStartPage
**/
@Schema(description = "")
public Integer getEnvelopeStartPage() {
return envelopeStartPage;
}
public void setEnvelopeStartPage(Integer envelopeStartPage) {
this.envelopeStartPage = envelopeStartPage;
}
public DocumentFileModel numberPages(Integer numberPages) {
this.numberPages = numberPages;
return this;
}
/**
* Get numberPages
* @return numberPages
**/
@Schema(description = "")
public Integer getNumberPages() {
return numberPages;
}
public void setNumberPages(Integer numberPages) {
this.numberPages = numberPages;
}
public DocumentFileModel mimeType(String mimeType) {
this.mimeType = mimeType;
return this;
}
/**
* Get mimeType
* @return mimeType
**/
@Schema(description = "")
public String getMimeType() {
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public DocumentFileModel filename(String filename) {
this.filename = filename;
return this;
}
/**
* Get filename
* @return filename
**/
@Schema(description = "")
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public DocumentFileModel creationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
return this;
}
/**
* Get creationDate
* @return creationDate
**/
@Schema(description = "")
public OffsetDateTime getCreationDate() {
return creationDate;
}
public void setCreationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DocumentFileModel documentsDocumentFileModel = (DocumentFileModel) o;
return Objects.equals(this.id, documentsDocumentFileModel.id) &&
Objects.equals(this.name, documentsDocumentFileModel.name) &&
Objects.equals(this.isSigned, documentsDocumentFileModel.isSigned) &&
Objects.equals(this.isEnvelopePart, documentsDocumentFileModel.isEnvelopePart) &&
Objects.equals(this.envelopeStartPage, documentsDocumentFileModel.envelopeStartPage) &&
Objects.equals(this.numberPages, documentsDocumentFileModel.numberPages) &&
Objects.equals(this.mimeType, documentsDocumentFileModel.mimeType) &&
Objects.equals(this.filename, documentsDocumentFileModel.filename) &&
Objects.equals(this.creationDate, documentsDocumentFileModel.creationDate);
}
@Override
public int hashCode() {
return Objects.hash(id, name, isSigned, isEnvelopePart, envelopeStartPage, numberPages, mimeType, filename, creationDate);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DocumentFileModel {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" isSigned: ").append(toIndentedString(isSigned)).append("\n");
sb.append(" isEnvelopePart: ").append(toIndentedString(isEnvelopePart)).append("\n");
sb.append(" envelopeStartPage: ").append(toIndentedString(envelopeStartPage)).append("\n");
sb.append(" numberPages: ").append(toIndentedString(numberPages)).append("\n");
sb.append(" mimeType: ").append(toIndentedString(mimeType)).append("\n");
sb.append(" filename: ").append(toIndentedString(filename)).append("\n");
sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}