com.lacunasoftware.signer.documentmark.FlowActionPositionModel Maven / Gradle / Ivy
/*
* Lacuna Signer
* 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.70.0
*
*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import com.lacunasoftware.signer.FlowActionType;
import com.lacunasoftware.signer.SignatureInitialsModes;
import com.lacunasoftware.signer.users.ParticipantUserModel;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* FlowActionPositionModel
*/
public class FlowActionPositionModel {
@JsonProperty("id")
@SerializedName("id")
private String id = null;
@JsonProperty("type")
@SerializedName("type")
private FlowActionType type = null;
@JsonProperty("user")
@SerializedName("user")
private ParticipantUserModel user = null;
@JsonProperty("signatureInitialsMode")
@SerializedName("signatureInitialsMode")
private SignatureInitialsModes signatureInitialsMode = null;
@JsonProperty("ruleName")
@SerializedName("ruleName")
private String ruleName = null;
@JsonProperty("numberRequiredSignatures")
@SerializedName("numberRequiredSignatures")
private Integer numberRequiredSignatures = null;
@JsonProperty("prePositionedMarks")
@SerializedName("prePositionedMarks")
private List prePositionedMarks = null;
public FlowActionPositionModel id(String id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@Schema(description = "")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public FlowActionPositionModel type(FlowActionType type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@Schema(description = "")
public FlowActionType getType() {
return type;
}
public void setType(FlowActionType type) {
this.type = type;
}
public FlowActionPositionModel user(ParticipantUserModel user) {
this.user = user;
return this;
}
/**
* Get user
* @return user
**/
@Schema(description = "")
public ParticipantUserModel getUser() {
return user;
}
public void setUser(ParticipantUserModel user) {
this.user = user;
}
public FlowActionPositionModel signatureInitialsMode(SignatureInitialsModes signatureInitialsMode) {
this.signatureInitialsMode = signatureInitialsMode;
return this;
}
/**
* Get signatureInitialsMode
* @return signatureInitialsMode
**/
@Schema(description = "")
public SignatureInitialsModes getSignatureInitialsMode() {
return signatureInitialsMode;
}
public void setSignatureInitialsMode(SignatureInitialsModes signatureInitialsMode) {
this.signatureInitialsMode = signatureInitialsMode;
}
public FlowActionPositionModel ruleName(String ruleName) {
this.ruleName = ruleName;
return this;
}
/**
* Get ruleName
* @return ruleName
**/
@Schema(description = "")
public String getRuleName() {
return ruleName;
}
public void setRuleName(String ruleName) {
this.ruleName = ruleName;
}
public FlowActionPositionModel numberRequiredSignatures(Integer numberRequiredSignatures) {
this.numberRequiredSignatures = numberRequiredSignatures;
return this;
}
/**
* Get numberRequiredSignatures
* @return numberRequiredSignatures
**/
@Schema(description = "")
public Integer getNumberRequiredSignatures() {
return numberRequiredSignatures;
}
public void setNumberRequiredSignatures(Integer numberRequiredSignatures) {
this.numberRequiredSignatures = numberRequiredSignatures;
}
public FlowActionPositionModel prePositionedMarks(List prePositionedMarks) {
this.prePositionedMarks = prePositionedMarks;
return this;
}
public FlowActionPositionModel addPrePositionedMarksItem(PrePositionedDocumentMarkModel prePositionedMarksItem) {
if (this.prePositionedMarks == null) {
this.prePositionedMarks = new ArrayList();
}
this.prePositionedMarks.add(prePositionedMarksItem);
return this;
}
/**
* Get prePositionedMarks
* @return prePositionedMarks
**/
@Schema(description = "")
public List getPrePositionedMarks() {
return prePositionedMarks;
}
public void setPrePositionedMarks(List prePositionedMarks) {
this.prePositionedMarks = prePositionedMarks;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FlowActionPositionModel documentMarkFlowActionPositionModel = (FlowActionPositionModel) o;
return Objects.equals(this.id, documentMarkFlowActionPositionModel.id) &&
Objects.equals(this.type, documentMarkFlowActionPositionModel.type) &&
Objects.equals(this.user, documentMarkFlowActionPositionModel.user) &&
Objects.equals(this.signatureInitialsMode, documentMarkFlowActionPositionModel.signatureInitialsMode) &&
Objects.equals(this.ruleName, documentMarkFlowActionPositionModel.ruleName) &&
Objects.equals(this.numberRequiredSignatures, documentMarkFlowActionPositionModel.numberRequiredSignatures) &&
Objects.equals(this.prePositionedMarks, documentMarkFlowActionPositionModel.prePositionedMarks);
}
@Override
public int hashCode() {
return Objects.hash(id, type, user, signatureInitialsMode, ruleName, numberRequiredSignatures, prePositionedMarks);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FlowActionPositionModel {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append(" signatureInitialsMode: ").append(toIndentedString(signatureInitialsMode)).append("\n");
sb.append(" ruleName: ").append(toIndentedString(ruleName)).append("\n");
sb.append(" numberRequiredSignatures: ").append(toIndentedString(numberRequiredSignatures)).append("\n");
sb.append(" prePositionedMarks: ").append(toIndentedString(prePositionedMarks)).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 ");
}
}