com.lacunasoftware.signer.transactions.TransactionPriceModel 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.transactions;
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.TransactionPricingTypes;
import com.lacunasoftware.signer.TransactionTypes;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* TransactionPriceModel
*/
public class TransactionPriceModel {
@JsonProperty("transactionType")
@SerializedName("transactionType")
private TransactionTypes transactionType = null;
@JsonProperty("pricingType")
@SerializedName("pricingType")
private TransactionPricingTypes pricingType = null;
@JsonProperty("price")
@SerializedName("price")
private Double price = null;
@JsonProperty("priceRanges")
@SerializedName("priceRanges")
private List priceRanges = null;
@JsonProperty("limit")
@SerializedName("limit")
private Integer limit = null;
public TransactionPriceModel transactionType(TransactionTypes transactionType) {
this.transactionType = transactionType;
return this;
}
/**
* Get transactionType
* @return transactionType
**/
@Schema(required = true, description = "")
public TransactionTypes getTransactionType() {
return transactionType;
}
public void setTransactionType(TransactionTypes transactionType) {
this.transactionType = transactionType;
}
public TransactionPriceModel pricingType(TransactionPricingTypes pricingType) {
this.pricingType = pricingType;
return this;
}
/**
* Get pricingType
* @return pricingType
**/
@Schema(required = true, description = "")
public TransactionPricingTypes getPricingType() {
return pricingType;
}
public void setPricingType(TransactionPricingTypes pricingType) {
this.pricingType = pricingType;
}
public TransactionPriceModel price(Double price) {
this.price = price;
return this;
}
/**
* Price of the transaction type (if Lacuna.Signer.Api.Transactions.TransactionPriceModel.PricingType is Lacuna.Signer.Api.TransactionPricingTypes.Simple)
* @return price
**/
@Schema(description = "Price of the transaction type (if Lacuna.Signer.Api.Transactions.TransactionPriceModel.PricingType is Lacuna.Signer.Api.TransactionPricingTypes.Simple)")
public Double getPrice() {
return price;
}
public void setPrice(Double price) {
this.price = price;
}
public TransactionPriceModel priceRanges(List priceRanges) {
this.priceRanges = priceRanges;
return this;
}
public TransactionPriceModel addPriceRangesItem(PriceRangeModel priceRangesItem) {
if (this.priceRanges == null) {
this.priceRanges = new ArrayList();
}
this.priceRanges.add(priceRangesItem);
return this;
}
/**
* Price ranges of transaction type (if Lacuna.Signer.Api.Transactions.TransactionPriceModel.PricingType is Lacuna.Signer.Api.TransactionPricingTypes.Range)
* @return priceRanges
**/
@Schema(description = "Price ranges of transaction type (if Lacuna.Signer.Api.Transactions.TransactionPriceModel.PricingType is Lacuna.Signer.Api.TransactionPricingTypes.Range)")
public List getPriceRanges() {
return priceRanges;
}
public void setPriceRanges(List priceRanges) {
this.priceRanges = priceRanges;
}
public TransactionPriceModel limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Get limit
* @return limit
**/
@Schema(description = "")
public Integer getLimit() {
return limit;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TransactionPriceModel transactionsTransactionPriceModel = (TransactionPriceModel) o;
return Objects.equals(this.transactionType, transactionsTransactionPriceModel.transactionType) &&
Objects.equals(this.pricingType, transactionsTransactionPriceModel.pricingType) &&
Objects.equals(this.price, transactionsTransactionPriceModel.price) &&
Objects.equals(this.priceRanges, transactionsTransactionPriceModel.priceRanges) &&
Objects.equals(this.limit, transactionsTransactionPriceModel.limit);
}
@Override
public int hashCode() {
return Objects.hash(transactionType, pricingType, price, priceRanges, limit);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TransactionPriceModel {\n");
sb.append(" transactionType: ").append(toIndentedString(transactionType)).append("\n");
sb.append(" pricingType: ").append(toIndentedString(pricingType)).append("\n");
sb.append(" price: ").append(toIndentedString(price)).append("\n");
sb.append(" priceRanges: ").append(toIndentedString(priceRanges)).append("\n");
sb.append(" limit: ").append(toIndentedString(limit)).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 ");
}
}