com.lacunasoftware.signer.documentmark.PrePositionedDocumentMarkModel 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.documentmark;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import com.lacunasoftware.signer.DocumentMarkType;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* Model used to set the position of a document mark before it's associated flow action is completed.
*/
@Schema(description = "Model used to set the position of a document mark before it's associated flow action is completed.")
public class PrePositionedDocumentMarkModel {
@JsonProperty("type")
@SerializedName("type")
private DocumentMarkType type = null;
@JsonProperty("uploadId")
@SerializedName("uploadId")
private String uploadId = null;
@JsonProperty("topLeftX")
@SerializedName("topLeftX")
private Double topLeftX = null;
@JsonProperty("topLeftY")
@SerializedName("topLeftY")
private Double topLeftY = null;
@JsonProperty("width")
@SerializedName("width")
private Double width = null;
@JsonProperty("height")
@SerializedName("height")
private Double height = null;
@JsonProperty("pageNumber")
@SerializedName("pageNumber")
private Integer pageNumber = null;
public PrePositionedDocumentMarkModel type(DocumentMarkType type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@Schema(description = "")
public DocumentMarkType getType() {
return type;
}
public void setType(DocumentMarkType type) {
this.type = type;
}
public PrePositionedDocumentMarkModel uploadId(String uploadId) {
this.uploadId = uploadId;
return this;
}
/**
* The file to which this mark should be applied. If null it will be applied to all sent files.
* @return uploadId
**/
@Schema(description = "The file to which this mark should be applied. If null it will be applied to all sent files.")
public String getUploadId() {
return uploadId;
}
public void setUploadId(String uploadId) {
this.uploadId = uploadId;
}
public PrePositionedDocumentMarkModel topLeftX(Double topLeftX) {
this.topLeftX = topLeftX;
return this;
}
/**
* X position of the top left point of the mark (in PDF points).
* @return topLeftX
**/
@Schema(description = "X position of the top left point of the mark (in PDF points).")
public Double getTopLeftX() {
return topLeftX;
}
public void setTopLeftX(Double topLeftX) {
this.topLeftX = topLeftX;
}
public PrePositionedDocumentMarkModel topLeftY(Double topLeftY) {
this.topLeftY = topLeftY;
return this;
}
/**
* Y position of the top left point of the mark (in PDF points).
* @return topLeftY
**/
@Schema(description = "Y position of the top left point of the mark (in PDF points).")
public Double getTopLeftY() {
return topLeftY;
}
public void setTopLeftY(Double topLeftY) {
this.topLeftY = topLeftY;
}
public PrePositionedDocumentMarkModel width(Double width) {
this.width = width;
return this;
}
/**
* Width of the mark (in PDF points).
* @return width
**/
@Schema(description = "Width of the mark (in PDF points).")
public Double getWidth() {
return width;
}
public void setWidth(Double width) {
this.width = width;
}
public PrePositionedDocumentMarkModel height(Double height) {
this.height = height;
return this;
}
/**
* Height of the mark (in PDF points).
* @return height
**/
@Schema(description = "Height of the mark (in PDF points).")
public Double getHeight() {
return height;
}
public void setHeight(Double height) {
this.height = height;
}
public PrePositionedDocumentMarkModel pageNumber(Integer pageNumber) {
this.pageNumber = pageNumber;
return this;
}
/**
* The page number of the mark.
* @return pageNumber
**/
@Schema(description = "The page number of the mark.")
public Integer getPageNumber() {
return pageNumber;
}
public void setPageNumber(Integer pageNumber) {
this.pageNumber = pageNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PrePositionedDocumentMarkModel documentMarkPrePositionedDocumentMarkModel = (PrePositionedDocumentMarkModel) o;
return Objects.equals(this.type, documentMarkPrePositionedDocumentMarkModel.type) &&
Objects.equals(this.uploadId, documentMarkPrePositionedDocumentMarkModel.uploadId) &&
Objects.equals(this.topLeftX, documentMarkPrePositionedDocumentMarkModel.topLeftX) &&
Objects.equals(this.topLeftY, documentMarkPrePositionedDocumentMarkModel.topLeftY) &&
Objects.equals(this.width, documentMarkPrePositionedDocumentMarkModel.width) &&
Objects.equals(this.height, documentMarkPrePositionedDocumentMarkModel.height) &&
Objects.equals(this.pageNumber, documentMarkPrePositionedDocumentMarkModel.pageNumber);
}
@Override
public int hashCode() {
return Objects.hash(type, uploadId, topLeftX, topLeftY, width, height, pageNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PrePositionedDocumentMarkModel {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" uploadId: ").append(toIndentedString(uploadId)).append("\n");
sb.append(" topLeftX: ").append(toIndentedString(topLeftX)).append("\n");
sb.append(" topLeftY: ").append(toIndentedString(topLeftY)).append("\n");
sb.append(" width: ").append(toIndentedString(width)).append("\n");
sb.append(" height: ").append(toIndentedString(height)).append("\n");
sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).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 ");
}
}