jp.co.freee.accounting.models.Transfer 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;
/**
* Transfer
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Transfer {
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_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
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)
*/
@JsonAdapter(FromWalletableTypeEnum.Adapter.class)
public enum FromWalletableTypeEnum {
BANK_ACCOUNT("bank_account"),
WALLET("wallet"),
CREDIT_CARD("credit_card");
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;
}
}
return null;
}
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 Integer id;
public static final String SERIALIZED_NAME_TO_WALLETABLE_ID = "to_walletable_id";
@SerializedName(SERIALIZED_NAME_TO_WALLETABLE_ID)
private Integer toWalletableId;
/**
* 振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)
*/
@JsonAdapter(ToWalletableTypeEnum.Adapter.class)
public enum ToWalletableTypeEnum {
BANK_ACCOUNT("bank_account"),
WALLET("wallet"),
CREDIT_CARD("credit_card");
private String value;
ToWalletableTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ToWalletableTypeEnum fromValue(String value) {
for (ToWalletableTypeEnum b : ToWalletableTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final ToWalletableTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ToWalletableTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ToWalletableTypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_TO_WALLETABLE_TYPE = "to_walletable_type";
@SerializedName(SERIALIZED_NAME_TO_WALLETABLE_TYPE)
private ToWalletableTypeEnum toWalletableType;
public Transfer() {
}
public Transfer 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 Transfer 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 Transfer 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 Transfer description(String description) {
this.description = description;
return this;
}
/**
* 備考
* @return description
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "備考", required = true, value = "備考")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Transfer fromWalletableId(Integer fromWalletableId) {
this.fromWalletableId = fromWalletableId;
return this;
}
/**
* 振替元口座ID
* minimum: 1
* maximum: 2147483647
* @return fromWalletableId
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "101", required = true, value = "振替元口座ID")
public Integer getFromWalletableId() {
return fromWalletableId;
}
public void setFromWalletableId(Integer fromWalletableId) {
this.fromWalletableId = fromWalletableId;
}
public Transfer fromWalletableType(FromWalletableTypeEnum fromWalletableType) {
this.fromWalletableType = fromWalletableType;
return this;
}
/**
* 振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)
* @return fromWalletableType
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "credit_card", required = true, value = "振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)")
public FromWalletableTypeEnum getFromWalletableType() {
return fromWalletableType;
}
public void setFromWalletableType(FromWalletableTypeEnum fromWalletableType) {
this.fromWalletableType = fromWalletableType;
}
public Transfer 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 Transfer toWalletableId(Integer toWalletableId) {
this.toWalletableId = toWalletableId;
return this;
}
/**
* 振替先口座ID
* minimum: 1
* maximum: 2147483647
* @return toWalletableId
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "201", required = true, value = "振替先口座ID")
public Integer getToWalletableId() {
return toWalletableId;
}
public void setToWalletableId(Integer toWalletableId) {
this.toWalletableId = toWalletableId;
}
public Transfer toWalletableType(ToWalletableTypeEnum toWalletableType) {
this.toWalletableType = toWalletableType;
return this;
}
/**
* 振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)
* @return toWalletableType
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "bank_account", required = true, value = "振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)")
public ToWalletableTypeEnum getToWalletableType() {
return toWalletableType;
}
public void setToWalletableType(ToWalletableTypeEnum toWalletableType) {
this.toWalletableType = toWalletableType;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Transfer transfer = (Transfer) o;
return Objects.equals(this.amount, transfer.amount) &&
Objects.equals(this.companyId, transfer.companyId) &&
Objects.equals(this.date, transfer.date) &&
Objects.equals(this.description, transfer.description) &&
Objects.equals(this.fromWalletableId, transfer.fromWalletableId) &&
Objects.equals(this.fromWalletableType, transfer.fromWalletableType) &&
Objects.equals(this.id, transfer.id) &&
Objects.equals(this.toWalletableId, transfer.toWalletableId) &&
Objects.equals(this.toWalletableType, transfer.toWalletableType);
}
@Override
public int hashCode() {
return Objects.hash(amount, companyId, date, description, fromWalletableId, fromWalletableType, id, toWalletableId, toWalletableType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Transfer {\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(" description: ").append(toIndentedString(description)).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(" toWalletableId: ").append(toIndentedString(toWalletableId)).append("\n");
sb.append(" toWalletableType: ").append(toIndentedString(toWalletableType)).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 ");
}
}