All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.conekta.model.PayoutOrderResponse Maven / Gradle / Ivy

Go to download

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.PayoutOrderPayoutsItem;
import com.conekta.model.PayoutOrderResponseCustomerInfo;
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;


/**
 * payout order model response
 */
@JsonPropertyOrder({
  PayoutOrderResponse.JSON_PROPERTY_ALLOWED_PAYOUT_METHODS,
  PayoutOrderResponse.JSON_PROPERTY_AMOUNT,
  PayoutOrderResponse.JSON_PROPERTY_CREATED_AT,
  PayoutOrderResponse.JSON_PROPERTY_CURRENCY,
  PayoutOrderResponse.JSON_PROPERTY_CUSTOMER_INFO,
  PayoutOrderResponse.JSON_PROPERTY_EXPIRES_AT,
  PayoutOrderResponse.JSON_PROPERTY_ID,
  PayoutOrderResponse.JSON_PROPERTY_LIVEMODE,
  PayoutOrderResponse.JSON_PROPERTY_OBJECT,
  PayoutOrderResponse.JSON_PROPERTY_METADATA,
  PayoutOrderResponse.JSON_PROPERTY_PAYOUTS,
  PayoutOrderResponse.JSON_PROPERTY_REASON,
  PayoutOrderResponse.JSON_PROPERTY_STATUS,
  PayoutOrderResponse.JSON_PROPERTY_UPDATED_AT
})
@JsonTypeName("payout_order_response")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0")
public class PayoutOrderResponse {
  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_CREATED_AT = "created_at";
  private Long createdAt;

  public static final String JSON_PROPERTY_CURRENCY = "currency";
  private String currency = "MXN";

  public static final String JSON_PROPERTY_CUSTOMER_INFO = "customer_info";
  private PayoutOrderResponseCustomerInfo customerInfo;

  public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at";
  private Long expiresAt;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_LIVEMODE = "livemode";
  private Boolean livemode;

  public static final String JSON_PROPERTY_OBJECT = "object";
  private String _object;

  public static final String JSON_PROPERTY_METADATA = "metadata";
  private Map metadata = new HashMap<>();

  public static final String JSON_PROPERTY_PAYOUTS = "payouts";
  private List payouts = new ArrayList<>();

  public static final String JSON_PROPERTY_REASON = "reason";
  private String reason;

  public static final String JSON_PROPERTY_STATUS = "status";
  private String status;

  public static final String JSON_PROPERTY_UPDATED_AT = "updated_at";
  private Long updatedAt;

  public PayoutOrderResponse() { 
  }

  public PayoutOrderResponse allowedPayoutMethods(List allowedPayoutMethods) {
    this.allowedPayoutMethods = allowedPayoutMethods;
    return this;
  }

  public PayoutOrderResponse 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 PayoutOrderResponse 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 PayoutOrderResponse createdAt(Long createdAt) {
    this.createdAt = createdAt;
    return this;
  }

   /**
   * The creation date of the payout order.
   * @return createdAt
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_CREATED_AT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Long getCreatedAt() {
    return createdAt;
  }


  @JsonProperty(JSON_PROPERTY_CREATED_AT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCreatedAt(Long createdAt) {
    this.createdAt = createdAt;
  }


  public PayoutOrderResponse 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 PayoutOrderResponse customerInfo(PayoutOrderResponseCustomerInfo customerInfo) {
    this.customerInfo = customerInfo;
    return this;
  }

   /**
   * Get customerInfo
   * @return customerInfo
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_CUSTOMER_INFO)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public PayoutOrderResponseCustomerInfo getCustomerInfo() {
    return customerInfo;
  }


  @JsonProperty(JSON_PROPERTY_CUSTOMER_INFO)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCustomerInfo(PayoutOrderResponseCustomerInfo customerInfo) {
    this.customerInfo = customerInfo;
  }


  public PayoutOrderResponse expiresAt(Long expiresAt) {
    this.expiresAt = expiresAt;
    return this;
  }

   /**
   * The expiration date of the payout order.
   * @return expiresAt
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EXPIRES_AT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Long getExpiresAt() {
    return expiresAt;
  }


  @JsonProperty(JSON_PROPERTY_EXPIRES_AT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExpiresAt(Long expiresAt) {
    this.expiresAt = expiresAt;
  }


  public PayoutOrderResponse id(String id) {
    this.id = id;
    return this;
  }

   /**
   * The id of the payout order.
   * @return id
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getId() {
    return id;
  }


  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setId(String id) {
    this.id = id;
  }


  public PayoutOrderResponse livemode(Boolean livemode) {
    this.livemode = livemode;
    return this;
  }

   /**
   * The live mode of the payout order.
   * @return livemode
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_LIVEMODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Boolean getLivemode() {
    return livemode;
  }


  @JsonProperty(JSON_PROPERTY_LIVEMODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setLivemode(Boolean livemode) {
    this.livemode = livemode;
  }


  public PayoutOrderResponse _object(String _object) {
    this._object = _object;
    return this;
  }

   /**
   * The object of the payout order.
   * @return _object
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_OBJECT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getObject() {
    return _object;
  }


  @JsonProperty(JSON_PROPERTY_OBJECT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setObject(String _object) {
    this._object = _object;
  }


  public PayoutOrderResponse metadata(Map metadata) {
    this.metadata = metadata;
    return this;
  }

  public PayoutOrderResponse 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 PayoutOrderResponse payouts(List payouts) {
    this.payouts = payouts;
    return this;
  }

  public PayoutOrderResponse addPayoutsItem(PayoutOrderPayoutsItem payoutsItem) {
    if (this.payouts == null) {
      this.payouts = new ArrayList<>();
    }
    this.payouts.add(payoutsItem);
    return this;
  }

   /**
   * The payout information of the payout order.
   * @return payouts
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_PAYOUTS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List getPayouts() {
    return payouts;
  }


  @JsonProperty(JSON_PROPERTY_PAYOUTS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setPayouts(List payouts) {
    this.payouts = payouts;
  }


  public PayoutOrderResponse 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;
  }


  public PayoutOrderResponse status(String status) {
    this.status = status;
    return this;
  }

   /**
   * The status of the payout order.
   * @return status
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getStatus() {
    return status;
  }


  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStatus(String status) {
    this.status = status;
  }


  public PayoutOrderResponse updatedAt(Long updatedAt) {
    this.updatedAt = updatedAt;
    return this;
  }

   /**
   * The update date of the payout order.
   * @return updatedAt
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_UPDATED_AT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Long getUpdatedAt() {
    return updatedAt;
  }


  @JsonProperty(JSON_PROPERTY_UPDATED_AT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setUpdatedAt(Long updatedAt) {
    this.updatedAt = updatedAt;
  }


  /**
   * Return true if this payout_order_response object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PayoutOrderResponse payoutOrderResponse = (PayoutOrderResponse) o;
    return Objects.equals(this.allowedPayoutMethods, payoutOrderResponse.allowedPayoutMethods) &&
        Objects.equals(this.amount, payoutOrderResponse.amount) &&
        Objects.equals(this.createdAt, payoutOrderResponse.createdAt) &&
        Objects.equals(this.currency, payoutOrderResponse.currency) &&
        Objects.equals(this.customerInfo, payoutOrderResponse.customerInfo) &&
        Objects.equals(this.expiresAt, payoutOrderResponse.expiresAt) &&
        Objects.equals(this.id, payoutOrderResponse.id) &&
        Objects.equals(this.livemode, payoutOrderResponse.livemode) &&
        Objects.equals(this._object, payoutOrderResponse._object) &&
        Objects.equals(this.metadata, payoutOrderResponse.metadata) &&
        Objects.equals(this.payouts, payoutOrderResponse.payouts) &&
        Objects.equals(this.reason, payoutOrderResponse.reason) &&
        Objects.equals(this.status, payoutOrderResponse.status) &&
        Objects.equals(this.updatedAt, payoutOrderResponse.updatedAt);
  }

  @Override
  public int hashCode() {
    return Objects.hash(allowedPayoutMethods, amount, createdAt, currency, customerInfo, expiresAt, id, livemode, _object, metadata, payouts, reason, status, updatedAt);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PayoutOrderResponse {\n");
    sb.append("    allowedPayoutMethods: ").append(toIndentedString(allowedPayoutMethods)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    createdAt: ").append(toIndentedString(createdAt)).append("\n");
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
    sb.append("    customerInfo: ").append(toIndentedString(customerInfo)).append("\n");
    sb.append("    expiresAt: ").append(toIndentedString(expiresAt)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    livemode: ").append(toIndentedString(livemode)).append("\n");
    sb.append("    _object: ").append(toIndentedString(_object)).append("\n");
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
    sb.append("    payouts: ").append(toIndentedString(payouts)).append("\n");
    sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    updatedAt: ").append(toIndentedString(updatedAt)).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    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy