com.lacunasoftware.signer.webhooks.InvoiceClosedModel 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.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.billing.BillingInformationModel;
import com.lacunasoftware.signer.invoices.InvoiceTotalModel;
import com.lacunasoftware.signer.organizations.OrganizationInfoModel;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* InvoiceClosedModel
*/
public class InvoiceClosedModel {
@JsonProperty("id")
@SerializedName("id")
private Integer id = null;
@JsonProperty("month")
@SerializedName("month")
private Integer month = null;
@JsonProperty("year")
@SerializedName("year")
private Integer year = null;
@JsonProperty("value")
@SerializedName("value")
private Double value = null;
@JsonProperty("invoiceTotals")
@SerializedName("invoiceTotals")
private List invoiceTotals = null;
@JsonProperty("organization")
@SerializedName("organization")
private OrganizationInfoModel organization = null;
@JsonProperty("billingInformation")
@SerializedName("billingInformation")
private BillingInformationModel billingInformation = null;
public InvoiceClosedModel id(Integer id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@Schema(description = "")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public InvoiceClosedModel month(Integer month) {
this.month = month;
return this;
}
/**
* Get month
* @return month
**/
@Schema(description = "")
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public InvoiceClosedModel year(Integer year) {
this.year = year;
return this;
}
/**
* Get year
* @return year
**/
@Schema(description = "")
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
public InvoiceClosedModel value(Double value) {
this.value = value;
return this;
}
/**
* Get value
* @return value
**/
@Schema(description = "")
public Double getValue() {
return value;
}
public void setValue(Double value) {
this.value = value;
}
public InvoiceClosedModel invoiceTotals(List invoiceTotals) {
this.invoiceTotals = invoiceTotals;
return this;
}
public InvoiceClosedModel addInvoiceTotalsItem(InvoiceTotalModel invoiceTotalsItem) {
if (this.invoiceTotals == null) {
this.invoiceTotals = new ArrayList();
}
this.invoiceTotals.add(invoiceTotalsItem);
return this;
}
/**
* Get invoiceTotals
* @return invoiceTotals
**/
@Schema(description = "")
public List getInvoiceTotals() {
return invoiceTotals;
}
public void setInvoiceTotals(List invoiceTotals) {
this.invoiceTotals = invoiceTotals;
}
public InvoiceClosedModel 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 InvoiceClosedModel billingInformation(BillingInformationModel billingInformation) {
this.billingInformation = billingInformation;
return this;
}
/**
* Get billingInformation
* @return billingInformation
**/
@Schema(description = "")
public BillingInformationModel getBillingInformation() {
return billingInformation;
}
public void setBillingInformation(BillingInformationModel billingInformation) {
this.billingInformation = billingInformation;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InvoiceClosedModel webhooksInvoiceClosedModel = (InvoiceClosedModel) o;
return Objects.equals(this.id, webhooksInvoiceClosedModel.id) &&
Objects.equals(this.month, webhooksInvoiceClosedModel.month) &&
Objects.equals(this.year, webhooksInvoiceClosedModel.year) &&
Objects.equals(this.value, webhooksInvoiceClosedModel.value) &&
Objects.equals(this.invoiceTotals, webhooksInvoiceClosedModel.invoiceTotals) &&
Objects.equals(this.organization, webhooksInvoiceClosedModel.organization) &&
Objects.equals(this.billingInformation, webhooksInvoiceClosedModel.billingInformation);
}
@Override
public int hashCode() {
return Objects.hash(id, month, year, value, invoiceTotals, organization, billingInformation);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InvoiceClosedModel {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" month: ").append(toIndentedString(month)).append("\n");
sb.append(" year: ").append(toIndentedString(year)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append(" invoiceTotals: ").append(toIndentedString(invoiceTotals)).append("\n");
sb.append(" organization: ").append(toIndentedString(organization)).append("\n");
sb.append(" billingInformation: ").append(toIndentedString(billingInformation)).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 ");
}
}