jp.co.freee.accounting.models.DealPayments Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of freee-accounting-sdk Show documentation
Show all versions of freee-accounting-sdk Show documentation
freee accounting client SDK for Java
/*
* 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;
/**
* DealPayments
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class DealPayments {
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)
*/
@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 static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Long id;
public DealPayments() {
}
public DealPayments amount(Long amount) {
this.amount = amount;
return this;
}
/**
* 支払金額
* minimum: -9223372036854775808
* maximum: 9223372036854775807
* @return amount
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "5250", required = true, value = "支払金額")
public Long getAmount() {
return amount;
}
public void setAmount(Long amount) {
this.amount = amount;
}
public DealPayments 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 DealPayments fromWalletableId(Integer fromWalletableId) {
this.fromWalletableId = fromWalletableId;
return this;
}
/**
* 口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)
* minimum: 1
* maximum: 2147483647
* @return fromWalletableId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "103", value = "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)")
public Integer getFromWalletableId() {
return fromWalletableId;
}
public void setFromWalletableId(Integer fromWalletableId) {
this.fromWalletableId = fromWalletableId;
}
public DealPayments fromWalletableType(FromWalletableTypeEnum fromWalletableType) {
this.fromWalletableType = fromWalletableType;
return this;
}
/**
* 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)
* @return fromWalletableType
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "bank_account", value = "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金(法人の場合は役員借入金もしくは役員借入金、個人の場合は事業主貸もしくは事業主借): private_account_item)")
public FromWalletableTypeEnum getFromWalletableType() {
return fromWalletableType;
}
public void setFromWalletableType(FromWalletableTypeEnum fromWalletableType) {
this.fromWalletableType = fromWalletableType;
}
public DealPayments id(Long id) {
this.id = id;
return this;
}
/**
* 取引行ID
* minimum: 1
* maximum: 9223372036854775807
* @return id
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "202", required = true, value = "取引行ID")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DealPayments dealPayments = (DealPayments) o;
return Objects.equals(this.amount, dealPayments.amount) &&
Objects.equals(this.date, dealPayments.date) &&
Objects.equals(this.fromWalletableId, dealPayments.fromWalletableId) &&
Objects.equals(this.fromWalletableType, dealPayments.fromWalletableType) &&
Objects.equals(this.id, dealPayments.id);
}
@Override
public int hashCode() {
return Objects.hash(amount, date, fromWalletableId, fromWalletableType, id);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DealPayments {\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(" id: ").append(toIndentedString(id)).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 ");
}
}