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

jp.co.freee.accounting.models.PaymentParams Maven / Gradle / Ivy

There is a newer version: 2.29.0
Show newest version
/*
 * freee API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package jp.co.freee.accounting.models;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
 * PaymentParams
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PaymentParams {
  public static final String SERIALIZED_NAME_AMOUNT = "amount";
  @SerializedName(SERIALIZED_NAME_AMOUNT)
  private Long amount;

  public static final String SERIALIZED_NAME_COMPANY_ID = "company_id";
  @SerializedName(SERIALIZED_NAME_COMPANY_ID)
  private Integer companyId;

  public static final String SERIALIZED_NAME_DATE = "date";
  @SerializedName(SERIALIZED_NAME_DATE)
  private String date;

  public static final String SERIALIZED_NAME_FROM_WALLETABLE_ID = "from_walletable_id";
  @SerializedName(SERIALIZED_NAME_FROM_WALLETABLE_ID)
  private Integer fromWalletableId;

  /**
   * 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item):payments指定時は必須
   */
  @JsonAdapter(FromWalletableTypeEnum.Adapter.class)
  public enum FromWalletableTypeEnum {
    BANK_ACCOUNT("bank_account"),
    
    CREDIT_CARD("credit_card"),
    
    WALLET("wallet"),
    
    PRIVATE_ACCOUNT_ITEM("private_account_item");

    private String value;

    FromWalletableTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static FromWalletableTypeEnum fromValue(String value) {
      for (FromWalletableTypeEnum b : FromWalletableTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final FromWalletableTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public FromWalletableTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return FromWalletableTypeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_FROM_WALLETABLE_TYPE = "from_walletable_type";
  @SerializedName(SERIALIZED_NAME_FROM_WALLETABLE_TYPE)
  private FromWalletableTypeEnum fromWalletableType;

  public PaymentParams() { 
  }

  public PaymentParams amount(Long amount) {
    
    this.amount = amount;
    return this;
  }

   /**
   * 金額
   * minimum: 1
   * maximum: 9223372036854775807
   * @return amount
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "10000", required = true, value = "金額")

  public Long getAmount() {
    return amount;
  }


  public void setAmount(Long amount) {
    this.amount = amount;
  }


  public PaymentParams companyId(Integer companyId) {
    
    this.companyId = companyId;
    return this;
  }

   /**
   * 事業所ID
   * minimum: 1
   * maximum: 2147483647
   * @return companyId
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "1", required = true, value = "事業所ID")

  public Integer getCompanyId() {
    return companyId;
  }


  public void setCompanyId(Integer companyId) {
    this.companyId = companyId;
  }


  public PaymentParams date(String date) {
    
    this.date = date;
    return this;
  }

   /**
   * 支払日
   * @return date
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "2019-12-17", required = true, value = "支払日")

  public String getDate() {
    return date;
  }


  public void setDate(String date) {
    this.date = date;
  }


  public PaymentParams fromWalletableId(Integer fromWalletableId) {
    
    this.fromWalletableId = fromWalletableId;
    return this;
  }

   /**
   * 口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID):payments指定時は必須
   * minimum: 1
   * maximum: 2147483647
   * @return fromWalletableId
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "1", required = true, value = "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID):payments指定時は必須")

  public Integer getFromWalletableId() {
    return fromWalletableId;
  }


  public void setFromWalletableId(Integer fromWalletableId) {
    this.fromWalletableId = fromWalletableId;
  }


  public PaymentParams fromWalletableType(FromWalletableTypeEnum fromWalletableType) {
    
    this.fromWalletableType = fromWalletableType;
    return this;
  }

   /**
   * 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item):payments指定時は必須
   * @return fromWalletableType
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "bank_account", required = true, value = "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item):payments指定時は必須")

  public FromWalletableTypeEnum getFromWalletableType() {
    return fromWalletableType;
  }


  public void setFromWalletableType(FromWalletableTypeEnum fromWalletableType) {
    this.fromWalletableType = fromWalletableType;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentParams paymentParams = (PaymentParams) o;
    return Objects.equals(this.amount, paymentParams.amount) &&
        Objects.equals(this.companyId, paymentParams.companyId) &&
        Objects.equals(this.date, paymentParams.date) &&
        Objects.equals(this.fromWalletableId, paymentParams.fromWalletableId) &&
        Objects.equals(this.fromWalletableType, paymentParams.fromWalletableType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(amount, companyId, date, fromWalletableId, fromWalletableType);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentParams {\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    companyId: ").append(toIndentedString(companyId)).append("\n");
    sb.append("    date: ").append(toIndentedString(date)).append("\n");
    sb.append("    fromWalletableId: ").append(toIndentedString(fromWalletableId)).append("\n");
    sb.append("    fromWalletableType: ").append(toIndentedString(fromWalletableType)).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