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

jp.co.freee.accounting.models.DealCreateParamsPayments 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;

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

  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 DealCreateParamsPayments() { 
  }

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

   /**
   * 支払金額:payments指定時は必須
   * minimum: -9223372036854775808
   * maximum: 9223372036854775807
   * @return amount
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "5250", required = true, value = "支払金額:payments指定時は必須")

  public Long getAmount() {
    return amount;
  }


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


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

   /**
   * 支払日:payments指定時は必須
   * @return date
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "2019-12-17", required = true, value = "支払日:payments指定時は必須")

  public String getDate() {
    return date;
  }


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


  public DealCreateParamsPayments 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 DealCreateParamsPayments 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;
    }
    DealCreateParamsPayments dealCreateParamsPayments = (DealCreateParamsPayments) o;
    return Objects.equals(this.amount, dealCreateParamsPayments.amount) &&
        Objects.equals(this.date, dealCreateParamsPayments.date) &&
        Objects.equals(this.fromWalletableId, dealCreateParamsPayments.fromWalletableId) &&
        Objects.equals(this.fromWalletableType, dealCreateParamsPayments.fromWalletableType);
  }

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

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