jp.co.freee.accounting.models.WalletTxn 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;
/**
* WalletTxn
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class WalletTxn {
public static final String SERIALIZED_NAME_AMOUNT = "amount";
@SerializedName(SERIALIZED_NAME_AMOUNT)
private Long amount;
public static final String SERIALIZED_NAME_BALANCE = "balance";
@SerializedName(SERIALIZED_NAME_BALANCE)
private Integer balance;
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_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
public static final String SERIALIZED_NAME_DUE_AMOUNT = "due_amount";
@SerializedName(SERIALIZED_NAME_DUE_AMOUNT)
private Integer dueAmount;
/**
* 入金/出金 (入金: income, 出金: expense)
*/
@JsonAdapter(EntrySideEnum.Adapter.class)
public enum EntrySideEnum {
INCOME("income"),
EXPENSE("expense");
private String value;
EntrySideEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EntrySideEnum fromValue(String value) {
for (EntrySideEnum b : EntrySideEnum.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 EntrySideEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public EntrySideEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return EntrySideEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_ENTRY_SIDE = "entry_side";
@SerializedName(SERIALIZED_NAME_ENTRY_SIDE)
private EntrySideEnum entrySide;
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Integer id;
public static final String SERIALIZED_NAME_RULE_MATCHED = "rule_matched";
@SerializedName(SERIALIZED_NAME_RULE_MATCHED)
private Boolean ruleMatched;
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
private Integer status;
public static final String SERIALIZED_NAME_WALLETABLE_ID = "walletable_id";
@SerializedName(SERIALIZED_NAME_WALLETABLE_ID)
private Integer walletableId;
/**
* 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)
*/
@JsonAdapter(WalletableTypeEnum.Adapter.class)
public enum WalletableTypeEnum {
BANK_ACCOUNT("bank_account"),
CREDIT_CARD("credit_card"),
WALLET("wallet");
private String value;
WalletableTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static WalletableTypeEnum fromValue(String value) {
for (WalletableTypeEnum b : WalletableTypeEnum.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 WalletableTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public WalletableTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return WalletableTypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_WALLETABLE_TYPE = "walletable_type";
@SerializedName(SERIALIZED_NAME_WALLETABLE_TYPE)
private WalletableTypeEnum walletableType;
public WalletTxn() {
}
public WalletTxn amount(Long amount) {
this.amount = amount;
return this;
}
/**
* 取引金額
* minimum: -9223372036854775808
* maximum: 9223372036854775807
* @return amount
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "5000", required = true, value = "取引金額")
public Long getAmount() {
return amount;
}
public void setAmount(Long amount) {
this.amount = amount;
}
public WalletTxn balance(Integer balance) {
this.balance = balance;
return this;
}
/**
* 残高(銀行口座等)
* @return balance
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "10000", required = true, value = "残高(銀行口座等)")
public Integer getBalance() {
return balance;
}
public void setBalance(Integer balance) {
this.balance = balance;
}
public WalletTxn 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 WalletTxn date(String date) {
this.date = date;
return this;
}
/**
* 取引日(yyyy-mm-dd)
* @return date
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "2019-12-17", required = true, value = "取引日(yyyy-mm-dd)")
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public WalletTxn description(String description) {
this.description = description;
return this;
}
/**
* 取引内容
* @return description
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "振込 カ)ABC", required = true, value = "取引内容")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public WalletTxn dueAmount(Integer dueAmount) {
this.dueAmount = dueAmount;
return this;
}
/**
* 未決済金額
* @return dueAmount
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "0", required = true, value = "未決済金額")
public Integer getDueAmount() {
return dueAmount;
}
public void setDueAmount(Integer dueAmount) {
this.dueAmount = dueAmount;
}
public WalletTxn entrySide(EntrySideEnum entrySide) {
this.entrySide = entrySide;
return this;
}
/**
* 入金/出金 (入金: income, 出金: expense)
* @return entrySide
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "income", required = true, value = "入金/出金 (入金: income, 出金: expense)")
public EntrySideEnum getEntrySide() {
return entrySide;
}
public void setEntrySide(EntrySideEnum entrySide) {
this.entrySide = entrySide;
}
public WalletTxn id(Integer id) {
this.id = id;
return this;
}
/**
* 明細ID
* minimum: 1
* maximum: 2147483647
* @return id
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1", required = true, value = "明細ID")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public WalletTxn ruleMatched(Boolean ruleMatched) {
this.ruleMatched = ruleMatched;
return this;
}
/**
* 登録時に<a href=\"https://support.freee.co.jp/hc/ja/articles/202848350-明細の自動登録ルールを設定する\" target=\"_blank\">自動登録ルールの設定</a>が適用され、登録処理が実行された場合、 trueになります。〜を推測する、〜の消込をするの条件の場合は一致してもfalseになります。
* @return ruleMatched
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "true", required = true, value = "登録時に自動登録ルールの設定が適用され、登録処理が実行された場合、 trueになります。〜を推測する、〜の消込をするの条件の場合は一致してもfalseになります。 ")
public Boolean getRuleMatched() {
return ruleMatched;
}
public void setRuleMatched(Boolean ruleMatched) {
this.ruleMatched = ruleMatched;
}
public WalletTxn status(Integer status) {
this.status = status;
return this;
}
/**
* 明細のステータス(消込待ち: 1, 消込済み: 2, 無視: 3, 消込中: 4, 対象外: 6)
* minimum: 1
* maximum: 6
* @return status
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "明細のステータス(消込待ち: 1, 消込済み: 2, 無視: 3, 消込中: 4, 対象外: 6)")
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public WalletTxn walletableId(Integer walletableId) {
this.walletableId = walletableId;
return this;
}
/**
* 口座ID
* minimum: 1
* maximum: 2147483647
* @return walletableId
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1", required = true, value = "口座ID")
public Integer getWalletableId() {
return walletableId;
}
public void setWalletableId(Integer walletableId) {
this.walletableId = walletableId;
}
public WalletTxn walletableType(WalletableTypeEnum walletableType) {
this.walletableType = walletableType;
return this;
}
/**
* 口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)
* @return walletableType
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "bank_account", required = true, value = "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)")
public WalletableTypeEnum getWalletableType() {
return walletableType;
}
public void setWalletableType(WalletableTypeEnum walletableType) {
this.walletableType = walletableType;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WalletTxn walletTxn = (WalletTxn) o;
return Objects.equals(this.amount, walletTxn.amount) &&
Objects.equals(this.balance, walletTxn.balance) &&
Objects.equals(this.companyId, walletTxn.companyId) &&
Objects.equals(this.date, walletTxn.date) &&
Objects.equals(this.description, walletTxn.description) &&
Objects.equals(this.dueAmount, walletTxn.dueAmount) &&
Objects.equals(this.entrySide, walletTxn.entrySide) &&
Objects.equals(this.id, walletTxn.id) &&
Objects.equals(this.ruleMatched, walletTxn.ruleMatched) &&
Objects.equals(this.status, walletTxn.status) &&
Objects.equals(this.walletableId, walletTxn.walletableId) &&
Objects.equals(this.walletableType, walletTxn.walletableType);
}
@Override
public int hashCode() {
return Objects.hash(amount, balance, companyId, date, description, dueAmount, entrySide, id, ruleMatched, status, walletableId, walletableType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class WalletTxn {\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" balance: ").append(toIndentedString(balance)).append("\n");
sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" dueAmount: ").append(toIndentedString(dueAmount)).append("\n");
sb.append(" entrySide: ").append(toIndentedString(entrySide)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" ruleMatched: ").append(toIndentedString(ruleMatched)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" walletableId: ").append(toIndentedString(walletableId)).append("\n");
sb.append(" walletableType: ").append(toIndentedString(walletableType)).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 ");
}
}