com.conekta.model.PayoutOrder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ct-conekta-java Show documentation
Show all versions of ct-conekta-java Show documentation
This is a java library that allows interaction with https://api.conekta.io API.
The newest version!
/*
* Conekta API
* Conekta sdk
*
* The version of the OpenAPI document: 2.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.conekta.model;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.conekta.model.CustomerInfoJustCustomerId;
import com.conekta.model.Payout;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.conekta.JSON;
/**
* a payout order
*/
@JsonPropertyOrder({
PayoutOrder.JSON_PROPERTY_ALLOWED_PAYOUT_METHODS,
PayoutOrder.JSON_PROPERTY_AMOUNT,
PayoutOrder.JSON_PROPERTY_CURRENCY,
PayoutOrder.JSON_PROPERTY_CUSTOMER_INFO,
PayoutOrder.JSON_PROPERTY_METADATA,
PayoutOrder.JSON_PROPERTY_PAYOUT,
PayoutOrder.JSON_PROPERTY_REASON
})
@JsonTypeName("payout_order")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0")
public class PayoutOrder {
public static final String JSON_PROPERTY_ALLOWED_PAYOUT_METHODS = "allowed_payout_methods";
private List allowedPayoutMethods = new ArrayList<>();
public static final String JSON_PROPERTY_AMOUNT = "amount";
private Integer amount;
public static final String JSON_PROPERTY_CURRENCY = "currency";
private String currency = "MXN";
public static final String JSON_PROPERTY_CUSTOMER_INFO = "customer_info";
private CustomerInfoJustCustomerId customerInfo;
public static final String JSON_PROPERTY_METADATA = "metadata";
private Map metadata = new HashMap<>();
public static final String JSON_PROPERTY_PAYOUT = "payout";
private Payout payout;
public static final String JSON_PROPERTY_REASON = "reason";
private String reason;
public PayoutOrder() {
}
public PayoutOrder allowedPayoutMethods(List allowedPayoutMethods) {
this.allowedPayoutMethods = allowedPayoutMethods;
return this;
}
public PayoutOrder addAllowedPayoutMethodsItem(String allowedPayoutMethodsItem) {
if (this.allowedPayoutMethods == null) {
this.allowedPayoutMethods = new ArrayList<>();
}
this.allowedPayoutMethods.add(allowedPayoutMethodsItem);
return this;
}
/**
* The payout methods that are allowed for the payout order.
* @return allowedPayoutMethods
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_ALLOWED_PAYOUT_METHODS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getAllowedPayoutMethods() {
return allowedPayoutMethods;
}
@JsonProperty(JSON_PROPERTY_ALLOWED_PAYOUT_METHODS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setAllowedPayoutMethods(List allowedPayoutMethods) {
this.allowedPayoutMethods = allowedPayoutMethods;
}
public PayoutOrder amount(Integer amount) {
this.amount = amount;
return this;
}
/**
* The amount of the payout order.
* @return amount
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getAmount() {
return amount;
}
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setAmount(Integer amount) {
this.amount = amount;
}
public PayoutOrder currency(String currency) {
this.currency = currency;
return this;
}
/**
* The currency in which the payout order is made.
* @return currency
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getCurrency() {
return currency;
}
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCurrency(String currency) {
this.currency = currency;
}
public PayoutOrder customerInfo(CustomerInfoJustCustomerId customerInfo) {
this.customerInfo = customerInfo;
return this;
}
/**
* Get customerInfo
* @return customerInfo
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_CUSTOMER_INFO)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public CustomerInfoJustCustomerId getCustomerInfo() {
return customerInfo;
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_INFO)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCustomerInfo(CustomerInfoJustCustomerId customerInfo) {
this.customerInfo = customerInfo;
}
public PayoutOrder metadata(Map metadata) {
this.metadata = metadata;
return this;
}
public PayoutOrder putMetadataItem(String key, Object metadataItem) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.put(key, metadataItem);
return this;
}
/**
* The metadata of the payout order.
* @return metadata
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_METADATA)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public Map getMetadata() {
return metadata;
}
@JsonProperty(JSON_PROPERTY_METADATA)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public void setMetadata(Map metadata) {
this.metadata = metadata;
}
public PayoutOrder payout(Payout payout) {
this.payout = payout;
return this;
}
/**
* Get payout
* @return payout
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_PAYOUT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Payout getPayout() {
return payout;
}
@JsonProperty(JSON_PROPERTY_PAYOUT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setPayout(Payout payout) {
this.payout = payout;
}
public PayoutOrder reason(String reason) {
this.reason = reason;
return this;
}
/**
* The reason for the payout order.
* @return reason
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_REASON)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getReason() {
return reason;
}
@JsonProperty(JSON_PROPERTY_REASON)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setReason(String reason) {
this.reason = reason;
}
/**
* Return true if this payout_order object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PayoutOrder payoutOrder = (PayoutOrder) o;
return Objects.equals(this.allowedPayoutMethods, payoutOrder.allowedPayoutMethods) &&
Objects.equals(this.amount, payoutOrder.amount) &&
Objects.equals(this.currency, payoutOrder.currency) &&
Objects.equals(this.customerInfo, payoutOrder.customerInfo) &&
Objects.equals(this.metadata, payoutOrder.metadata) &&
Objects.equals(this.payout, payoutOrder.payout) &&
Objects.equals(this.reason, payoutOrder.reason);
}
@Override
public int hashCode() {
return Objects.hash(allowedPayoutMethods, amount, currency, customerInfo, metadata, payout, reason);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PayoutOrder {\n");
sb.append(" allowedPayoutMethods: ").append(toIndentedString(allowedPayoutMethods)).append("\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" customerInfo: ").append(toIndentedString(customerInfo)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" payout: ").append(toIndentedString(payout)).append("\n");
sb.append(" reason: ").append(toIndentedString(reason)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}