com.plaid.client.model.TransactionsSyncResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plaid-java Show documentation
Show all versions of plaid-java Show documentation
Bindings for the Plaid (plaid.com) API.
/*
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.534.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.plaid.client.model;
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 com.plaid.client.model.AccountBase;
import com.plaid.client.model.RemovedTransaction;
import com.plaid.client.model.Transaction;
import com.plaid.client.model.TransactionsUpdateStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* TransactionsSyncResponse defines the response schema for `/transactions/sync`
*/
@ApiModel(description = "TransactionsSyncResponse defines the response schema for `/transactions/sync`")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-05T19:36:13.426392Z[Etc/UTC]")
public class TransactionsSyncResponse {
public static final String SERIALIZED_NAME_TRANSACTIONS_UPDATE_STATUS = "transactions_update_status";
@SerializedName(SERIALIZED_NAME_TRANSACTIONS_UPDATE_STATUS)
private TransactionsUpdateStatus transactionsUpdateStatus;
public static final String SERIALIZED_NAME_ACCOUNTS = "accounts";
@SerializedName(SERIALIZED_NAME_ACCOUNTS)
private List accounts = new ArrayList<>();
public static final String SERIALIZED_NAME_ADDED = "added";
@SerializedName(SERIALIZED_NAME_ADDED)
private List added = new ArrayList<>();
public static final String SERIALIZED_NAME_MODIFIED = "modified";
@SerializedName(SERIALIZED_NAME_MODIFIED)
private List modified = new ArrayList<>();
public static final String SERIALIZED_NAME_REMOVED = "removed";
@SerializedName(SERIALIZED_NAME_REMOVED)
private List removed = new ArrayList<>();
public static final String SERIALIZED_NAME_NEXT_CURSOR = "next_cursor";
@SerializedName(SERIALIZED_NAME_NEXT_CURSOR)
private String nextCursor;
public static final String SERIALIZED_NAME_HAS_MORE = "has_more";
@SerializedName(SERIALIZED_NAME_HAS_MORE)
private Boolean hasMore;
public static final String SERIALIZED_NAME_REQUEST_ID = "request_id";
@SerializedName(SERIALIZED_NAME_REQUEST_ID)
private String requestId;
public TransactionsSyncResponse transactionsUpdateStatus(TransactionsUpdateStatus transactionsUpdateStatus) {
this.transactionsUpdateStatus = transactionsUpdateStatus;
return this;
}
/**
* Get transactionsUpdateStatus
* @return transactionsUpdateStatus
**/
@ApiModelProperty(required = true, value = "")
public TransactionsUpdateStatus getTransactionsUpdateStatus() {
return transactionsUpdateStatus;
}
public void setTransactionsUpdateStatus(TransactionsUpdateStatus transactionsUpdateStatus) {
this.transactionsUpdateStatus = transactionsUpdateStatus;
}
public TransactionsSyncResponse accounts(List accounts) {
this.accounts = accounts;
return this;
}
public TransactionsSyncResponse addAccountsItem(AccountBase accountsItem) {
this.accounts.add(accountsItem);
return this;
}
/**
* An array of accounts at a financial institution associated with the transactions in this response.
* @return accounts
**/
@ApiModelProperty(required = true, value = "An array of accounts at a financial institution associated with the transactions in this response.")
public List getAccounts() {
return accounts;
}
public void setAccounts(List accounts) {
this.accounts = accounts;
}
public TransactionsSyncResponse added(List added) {
this.added = added;
return this;
}
public TransactionsSyncResponse addAddedItem(Transaction addedItem) {
this.added.add(addedItem);
return this;
}
/**
* Transactions that have been added to the Item since `cursor` ordered by ascending last modified time.
* @return added
**/
@ApiModelProperty(required = true, value = "Transactions that have been added to the Item since `cursor` ordered by ascending last modified time.")
public List getAdded() {
return added;
}
public void setAdded(List added) {
this.added = added;
}
public TransactionsSyncResponse modified(List modified) {
this.modified = modified;
return this;
}
public TransactionsSyncResponse addModifiedItem(Transaction modifiedItem) {
this.modified.add(modifiedItem);
return this;
}
/**
* Transactions that have been modified on the Item since `cursor` ordered by ascending last modified time.
* @return modified
**/
@ApiModelProperty(required = true, value = "Transactions that have been modified on the Item since `cursor` ordered by ascending last modified time.")
public List getModified() {
return modified;
}
public void setModified(List modified) {
this.modified = modified;
}
public TransactionsSyncResponse removed(List removed) {
this.removed = removed;
return this;
}
public TransactionsSyncResponse addRemovedItem(RemovedTransaction removedItem) {
this.removed.add(removedItem);
return this;
}
/**
* Transactions that have been removed from the Item since `cursor` ordered by ascending last modified time.
* @return removed
**/
@ApiModelProperty(required = true, value = "Transactions that have been removed from the Item since `cursor` ordered by ascending last modified time.")
public List getRemoved() {
return removed;
}
public void setRemoved(List removed) {
this.removed = removed;
}
public TransactionsSyncResponse nextCursor(String nextCursor) {
this.nextCursor = nextCursor;
return this;
}
/**
* Cursor used for fetching any future updates after the latest update provided in this response. The cursor obtained after all pages have been pulled (indicated by `has_more` being `false`) will be valid for at least 1 year. This cursor should be persisted for later calls. If transactions are not yet available, this will be an empty string.
* @return nextCursor
**/
@ApiModelProperty(required = true, value = "Cursor used for fetching any future updates after the latest update provided in this response. The cursor obtained after all pages have been pulled (indicated by `has_more` being `false`) will be valid for at least 1 year. This cursor should be persisted for later calls. If transactions are not yet available, this will be an empty string.")
public String getNextCursor() {
return nextCursor;
}
public void setNextCursor(String nextCursor) {
this.nextCursor = nextCursor;
}
public TransactionsSyncResponse hasMore(Boolean hasMore) {
this.hasMore = hasMore;
return this;
}
/**
* Represents if more than requested count of transaction updates exist. If true, the additional updates can be fetched by making an additional request with `cursor` set to `next_cursor`. If `has_more` is true, it’s important to pull all available pages, to make it less likely for underlying data changes to conflict with pagination.
* @return hasMore
**/
@ApiModelProperty(required = true, value = "Represents if more than requested count of transaction updates exist. If true, the additional updates can be fetched by making an additional request with `cursor` set to `next_cursor`. If `has_more` is true, it’s important to pull all available pages, to make it less likely for underlying data changes to conflict with pagination.")
public Boolean getHasMore() {
return hasMore;
}
public void setHasMore(Boolean hasMore) {
this.hasMore = hasMore;
}
public TransactionsSyncResponse requestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
* @return requestId
**/
@ApiModelProperty(required = true, value = "A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.")
public String getRequestId() {
return requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TransactionsSyncResponse transactionsSyncResponse = (TransactionsSyncResponse) o;
return Objects.equals(this.transactionsUpdateStatus, transactionsSyncResponse.transactionsUpdateStatus) &&
Objects.equals(this.accounts, transactionsSyncResponse.accounts) &&
Objects.equals(this.added, transactionsSyncResponse.added) &&
Objects.equals(this.modified, transactionsSyncResponse.modified) &&
Objects.equals(this.removed, transactionsSyncResponse.removed) &&
Objects.equals(this.nextCursor, transactionsSyncResponse.nextCursor) &&
Objects.equals(this.hasMore, transactionsSyncResponse.hasMore) &&
Objects.equals(this.requestId, transactionsSyncResponse.requestId);
}
@Override
public int hashCode() {
return Objects.hash(transactionsUpdateStatus, accounts, added, modified, removed, nextCursor, hasMore, requestId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TransactionsSyncResponse {\n");
sb.append(" transactionsUpdateStatus: ").append(toIndentedString(transactionsUpdateStatus)).append("\n");
sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n");
sb.append(" added: ").append(toIndentedString(added)).append("\n");
sb.append(" modified: ").append(toIndentedString(modified)).append("\n");
sb.append(" removed: ").append(toIndentedString(removed)).append("\n");
sb.append(" nextCursor: ").append(toIndentedString(nextCursor)).append("\n");
sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n");
sb.append(" requestId: ").append(toIndentedString(requestId)).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