jp.co.freee.accounting.models.TransferParams 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;
/**
* TransferParams
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class TransferParams {
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"),
CREDIT_CARD("credit_card"),
WALLET("wallet");
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_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"),
CREDIT_CARD("credit_card"),
WALLET("wallet");
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;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
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 TransferParams() {
}
public TransferParams 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 TransferParams 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 TransferParams 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 TransferParams description(String description) {
this.description = description;
return this;
}
/**
* 備考
* @return description
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "備考", value = "備考")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public TransferParams fromWalletableId(Integer fromWalletableId) {
this.fromWalletableId = fromWalletableId;
return this;
}
/**
* 振替元口座ID
* minimum: 1
* maximum: 2147483647
* @return fromWalletableId
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1", required = true, value = "振替元口座ID")
public Integer getFromWalletableId() {
return fromWalletableId;
}
public void setFromWalletableId(Integer fromWalletableId) {
this.fromWalletableId = fromWalletableId;
}
public TransferParams fromWalletableType(FromWalletableTypeEnum fromWalletableType) {
this.fromWalletableType = fromWalletableType;
return this;
}
/**
* 振替元口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)
* @return fromWalletableType
**/
@javax.annotation.Nonnull
@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 TransferParams toWalletableId(Integer toWalletableId) {
this.toWalletableId = toWalletableId;
return this;
}
/**
* 振替先口座ID
* minimum: 1
* maximum: 2147483647
* @return toWalletableId
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1", required = true, value = "振替先口座ID")
public Integer getToWalletableId() {
return toWalletableId;
}
public void setToWalletableId(Integer toWalletableId) {
this.toWalletableId = toWalletableId;
}
public TransferParams toWalletableType(ToWalletableTypeEnum toWalletableType) {
this.toWalletableType = toWalletableType;
return this;
}
/**
* 振替先口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet)
* @return toWalletableType
**/
@javax.annotation.Nonnull
@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;
}
TransferParams transferParams = (TransferParams) o;
return Objects.equals(this.amount, transferParams.amount) &&
Objects.equals(this.companyId, transferParams.companyId) &&
Objects.equals(this.date, transferParams.date) &&
Objects.equals(this.description, transferParams.description) &&
Objects.equals(this.fromWalletableId, transferParams.fromWalletableId) &&
Objects.equals(this.fromWalletableType, transferParams.fromWalletableType) &&
Objects.equals(this.toWalletableId, transferParams.toWalletableId) &&
Objects.equals(this.toWalletableType, transferParams.toWalletableType);
}
@Override
public int hashCode() {
return Objects.hash(amount, companyId, date, description, fromWalletableId, fromWalletableType, toWalletableId, toWalletableType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TransferParams {\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(" 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 ");
}
}