com.klarna.rest.api.settlements.model.SettlementsTransactionCollection Maven / Gradle / Ivy
The newest version!
/*
* Klarna Settlements API
* This API gives you access to your payouts and transactions. Resources are split into two broad types: * Collections, including pagination information: collections are queryable, typically by the attributes of the sub-resource as well as pagination. * Entity resources containing a single entity.
*
* OpenAPI spec version: 1.0.0-rc2
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.klarna.rest.api.settlements.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.klarna.rest.api.settlements.model.SettlementsPagination;
import com.klarna.rest.api.settlements.model.SettlementsTransaction;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
* SettlementsTransactionCollection
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-20T11:18:02.332Z")
public class SettlementsTransactionCollection {
@JsonProperty("transactions")
private List transactions = new ArrayList();
@JsonProperty("pagination")
private SettlementsPagination pagination = null;
public SettlementsTransactionCollection transactions(List transactions) {
this.transactions = transactions;
return this;
}
public SettlementsTransactionCollection addTransactionsItem(SettlementsTransaction transactionsItem) {
this.transactions.add(transactionsItem);
return this;
}
/**
* Get transactions
* @return transactions
**/
@ApiModelProperty(required = true, value = "")
public List getTransactions() {
return transactions;
}
public void setTransactions(List transactions) {
this.transactions = transactions;
}
public SettlementsTransactionCollection pagination(SettlementsPagination pagination) {
this.pagination = pagination;
return this;
}
/**
* Get pagination
* @return pagination
**/
@ApiModelProperty(required = true, value = "")
public SettlementsPagination getPagination() {
return pagination;
}
public void setPagination(SettlementsPagination pagination) {
this.pagination = pagination;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SettlementsTransactionCollection transactionCollection = (SettlementsTransactionCollection) o;
return Objects.equals(this.transactions, transactionCollection.transactions) &&
Objects.equals(this.pagination, transactionCollection.pagination);
}
@Override
public int hashCode() {
return Objects.hash(transactions, pagination);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SettlementsTransactionCollection {\n");
sb.append(" transactions: ").append(toIndentedString(transactions)).append("\n");
sb.append(" pagination: ").append(toIndentedString(pagination)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}