com.lacunasoftware.signer.webhooks.DocumentConcludedModel 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.webhooks;
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 com.lacunasoftware.signer.documents.CreatorModel;
import com.lacunasoftware.signer.folders.FolderInfoModel;
import com.lacunasoftware.signer.organizations.OrganizationInfoModel;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* DocumentConcludedModel
*/
public class DocumentConcludedModel {
@JsonProperty("id")
@SerializedName("id")
private UUID id = null;
@JsonProperty("name")
@SerializedName("name")
private String name = null;
@JsonProperty("creationDate")
@SerializedName("creationDate")
private OffsetDateTime creationDate = null;
@JsonProperty("updateDate")
@SerializedName("updateDate")
private OffsetDateTime updateDate = null;
@JsonProperty("folder")
@SerializedName("folder")
private FolderInfoModel folder = null;
@JsonProperty("organization")
@SerializedName("organization")
private OrganizationInfoModel organization = null;
@JsonProperty("createdBy")
@SerializedName("createdBy")
private CreatorModel createdBy = null;
public DocumentConcludedModel id(UUID id) {
this.id = id;
return this;
}
/**
* The document's id
* @return id
**/
@Schema(description = "The document's id")
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public DocumentConcludedModel name(String name) {
this.name = name;
return this;
}
/**
* The document's name
* @return name
**/
@Schema(description = "The document's name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public DocumentConcludedModel creationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
return this;
}
/**
* The date the document was created.
* @return creationDate
**/
@Schema(description = "The date the document was created.")
public OffsetDateTime getCreationDate() {
return creationDate;
}
public void setCreationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
}
public DocumentConcludedModel updateDate(OffsetDateTime updateDate) {
this.updateDate = updateDate;
return this;
}
/**
* The date of the last update to the document.
* @return updateDate
**/
@Schema(description = "The date of the last update to the document.")
public OffsetDateTime getUpdateDate() {
return updateDate;
}
public void setUpdateDate(OffsetDateTime updateDate) {
this.updateDate = updateDate;
}
public DocumentConcludedModel folder(FolderInfoModel folder) {
this.folder = folder;
return this;
}
/**
* Get folder
* @return folder
**/
@Schema(description = "")
public FolderInfoModel getFolder() {
return folder;
}
public void setFolder(FolderInfoModel folder) {
this.folder = folder;
}
public DocumentConcludedModel organization(OrganizationInfoModel organization) {
this.organization = organization;
return this;
}
/**
* Get organization
* @return organization
**/
@Schema(description = "")
public OrganizationInfoModel getOrganization() {
return organization;
}
public void setOrganization(OrganizationInfoModel organization) {
this.organization = organization;
}
public DocumentConcludedModel createdBy(CreatorModel createdBy) {
this.createdBy = createdBy;
return this;
}
/**
* Get createdBy
* @return createdBy
**/
@Schema(description = "")
public CreatorModel getCreatedBy() {
return createdBy;
}
public void setCreatedBy(CreatorModel createdBy) {
this.createdBy = createdBy;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DocumentConcludedModel webhooksDocumentConcludedModel = (DocumentConcludedModel) o;
return Objects.equals(this.id, webhooksDocumentConcludedModel.id) &&
Objects.equals(this.name, webhooksDocumentConcludedModel.name) &&
Objects.equals(this.creationDate, webhooksDocumentConcludedModel.creationDate) &&
Objects.equals(this.updateDate, webhooksDocumentConcludedModel.updateDate) &&
Objects.equals(this.folder, webhooksDocumentConcludedModel.folder) &&
Objects.equals(this.organization, webhooksDocumentConcludedModel.organization) &&
Objects.equals(this.createdBy, webhooksDocumentConcludedModel.createdBy);
}
@Override
public int hashCode() {
return Objects.hash(id, name, creationDate, updateDate, folder, organization, createdBy);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DocumentConcludedModel {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n");
sb.append(" updateDate: ").append(toIndentedString(updateDate)).append("\n");
sb.append(" folder: ").append(toIndentedString(folder)).append("\n");
sb.append(" organization: ").append(toIndentedString(organization)).append("\n");
sb.append(" createdBy: ").append(toIndentedString(createdBy)).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 ");
}
}