com.lacunasoftware.signer.documentflows.DocumentFlowCreateRequest 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.documentflows;
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.flowactions.FlowActionCreateModel;
import com.lacunasoftware.signer.observers.ObserverCreateModel;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* DocumentFlowCreateRequest
*/
public class DocumentFlowCreateRequest {
@JsonProperty("name")
@SerializedName("name")
private String name = null;
@JsonProperty("areActionsOrdered")
@SerializedName("areActionsOrdered")
private Boolean areActionsOrdered = null;
@JsonProperty("flowActions")
@SerializedName("flowActions")
private List flowActions = new ArrayList();
@JsonProperty("observers")
@SerializedName("observers")
private List observers = null;
public DocumentFlowCreateRequest name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@Schema(required = true, description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public DocumentFlowCreateRequest areActionsOrdered(Boolean areActionsOrdered) {
this.areActionsOrdered = areActionsOrdered;
return this;
}
/**
* Get areActionsOrdered
* @return areActionsOrdered
**/
@Schema(description = "")
public Boolean isAreActionsOrdered() {
return areActionsOrdered;
}
public void setAreActionsOrdered(Boolean areActionsOrdered) {
this.areActionsOrdered = areActionsOrdered;
}
public DocumentFlowCreateRequest flowActions(List flowActions) {
this.flowActions = flowActions;
return this;
}
public DocumentFlowCreateRequest addFlowActionsItem(FlowActionCreateModel flowActionsItem) {
this.flowActions.add(flowActionsItem);
return this;
}
/**
* Get flowActions
* @return flowActions
**/
@Schema(required = true, description = "")
public List getFlowActions() {
return flowActions;
}
public void setFlowActions(List flowActions) {
this.flowActions = flowActions;
}
public DocumentFlowCreateRequest observers(List observers) {
this.observers = observers;
return this;
}
public DocumentFlowCreateRequest addObserversItem(ObserverCreateModel observersItem) {
if (this.observers == null) {
this.observers = new ArrayList();
}
this.observers.add(observersItem);
return this;
}
/**
* Get observers
* @return observers
**/
@Schema(description = "")
public List getObservers() {
return observers;
}
public void setObservers(List observers) {
this.observers = observers;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DocumentFlowCreateRequest documentFlowsDocumentFlowCreateRequest = (DocumentFlowCreateRequest) o;
return Objects.equals(this.name, documentFlowsDocumentFlowCreateRequest.name) &&
Objects.equals(this.areActionsOrdered, documentFlowsDocumentFlowCreateRequest.areActionsOrdered) &&
Objects.equals(this.flowActions, documentFlowsDocumentFlowCreateRequest.flowActions) &&
Objects.equals(this.observers, documentFlowsDocumentFlowCreateRequest.observers);
}
@Override
public int hashCode() {
return Objects.hash(name, areActionsOrdered, flowActions, observers);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DocumentFlowCreateRequest {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" areActionsOrdered: ").append(toIndentedString(areActionsOrdered)).append("\n");
sb.append(" flowActions: ").append(toIndentedString(flowActions)).append("\n");
sb.append(" observers: ").append(toIndentedString(observers)).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 ");
}
}