com.stripe.model.issuing.Transaction Maven / Gradle / Ivy
// Generated by delombok at Sat Feb 16 18:44:45 CET 2019
package com.stripe.model.issuing;
import com.stripe.exception.StripeException;
import com.stripe.model.BalanceTransaction;
import com.stripe.model.ExpandableField;
import com.stripe.model.HasId;
import com.stripe.model.MetadataStore;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import java.util.Map;
public class Transaction extends ApiResource implements MetadataStore, HasId {
String id;
String object;
Long amount;
ExpandableField authorization;
ExpandableField balanceTransaction;
ExpandableField card;
ExpandableField cardholder;
Long created;
String currency;
ExpandableField dispute;
Boolean livemode;
MerchantData merchantData;
Map metadata;
String type;
//
public String getAuthorization() {
return (this.authorization != null) ? this.authorization.getId() : null;
}
public void setAuthorization(String authorizationId) {
this.authorization = setExpandableFieldId(authorizationId, this.authorization);
}
public Authorization getAuthorizationObject() {
return (this.authorization != null) ? this.authorization.getExpanded() : null;
}
public void setAuthorizationObject(Authorization c) {
this.authorization = new ExpandableField(c.getId(), c);
}
//
//
public String getBalanceTransaction() {
return (this.balanceTransaction != null) ? this.balanceTransaction.getId() : null;
}
public void setBalanceTransaction(String balanceTransactionId) {
this.balanceTransaction = setExpandableFieldId(balanceTransactionId, this.balanceTransaction);
}
public BalanceTransaction getBalanceTransactionObject() {
return (this.balanceTransaction != null) ? this.balanceTransaction.getExpanded() : null;
}
public void setBalanceTransactionObject(BalanceTransaction c) {
this.balanceTransaction = new ExpandableField(c.getId(), c);
}
//
//
public String getCard() {
return (this.card != null) ? this.card.getId() : null;
}
public void setCard(String cardId) {
this.card = setExpandableFieldId(cardId, this.card);
}
public Card getCardObject() {
return (this.card != null) ? this.card.getExpanded() : null;
}
public void setCardObject(Card c) {
this.card = new ExpandableField(c.getId(), c);
}
//
//
public String getCardholder() {
return (this.cardholder != null) ? this.cardholder.getId() : null;
}
public void setCardholder(String cardholderId) {
this.cardholder = setExpandableFieldId(cardholderId, this.cardholder);
}
public Cardholder getCardholderObject() {
return (this.cardholder != null) ? this.cardholder.getExpanded() : null;
}
public void setCardholderObject(Cardholder c) {
this.cardholder = new ExpandableField(c.getId(), c);
}
//
//
public String getDispute() {
return (this.dispute != null) ? this.dispute.getId() : null;
}
public void setDispute(String disputeId) {
this.dispute = setExpandableFieldId(disputeId, this.dispute);
}
public Dispute getDisputeObject() {
return (this.dispute != null) ? this.dispute.getExpanded() : null;
}
public void setDisputeObject(Dispute c) {
this.dispute = new ExpandableField(c.getId(), c);
}
//
//
/**
* List all issuing transactions.
*/
public static TransactionCollection list(Map params) throws StripeException {
return list(params, null);
}
/**
* List all issuing transactions.
*/
public static TransactionCollection list(Map params, RequestOptions options) throws StripeException {
return requestCollection(classUrl(Transaction.class), params, TransactionCollection.class, options);
}
//
//
/**
* Retrieve an issuing transaction.
*/
public static Transaction retrieve(String id) throws StripeException {
return retrieve(id, null);
}
/**
* Retrieve an issuing transaction.
*/
public static Transaction retrieve(String id, RequestOptions options) throws StripeException {
return retrieve(id, null, options);
}
/**
* Retrieve an issuing transaction.
*/
public static Transaction retrieve(String id, Map params, RequestOptions options) throws StripeException {
return request(RequestMethod.GET, instanceUrl(Transaction.class, id), params, Transaction.class, options);
}
//
//
/**
* Update an issuing transaction.
*/
@Override
public Transaction update(Map params) throws StripeException {
return update(params, null);
}
/**
* Update an issuing transaction.
*/
@Override
public Transaction update(Map params, RequestOptions options) throws StripeException {
return request(RequestMethod.POST, instanceUrl(Transaction.class, this.id), params, Transaction.class, options);
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getObject() {
return this.object;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getAmount() {
return this.amount;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getCreated() {
return this.created;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getCurrency() {
return this.currency;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getLivemode() {
return this.livemode;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public MerchantData getMerchantData() {
return this.merchantData;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getType() {
return this.type;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setId(final String id) {
this.id = id;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setObject(final String object) {
this.object = object;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setAmount(final Long amount) {
this.amount = amount;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setCreated(final Long created) {
this.created = created;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setCurrency(final String currency) {
this.currency = currency;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setLivemode(final Boolean livemode) {
this.livemode = livemode;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setMerchantData(final MerchantData merchantData) {
this.merchantData = merchantData;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setMetadata(final Map metadata) {
this.metadata = metadata;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setType(final String type) {
this.type = type;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Transaction)) return false;
final Transaction other = (Transaction) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$id = this.getId();
final java.lang.Object other$id = other.getId();
if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
final java.lang.Object this$object = this.getObject();
final java.lang.Object other$object = other.getObject();
if (this$object == null ? other$object != null : !this$object.equals(other$object)) return false;
final java.lang.Object this$amount = this.getAmount();
final java.lang.Object other$amount = other.getAmount();
if (this$amount == null ? other$amount != null : !this$amount.equals(other$amount)) return false;
final java.lang.Object this$authorization = this.getAuthorization();
final java.lang.Object other$authorization = other.getAuthorization();
if (this$authorization == null ? other$authorization != null : !this$authorization.equals(other$authorization)) return false;
final java.lang.Object this$balanceTransaction = this.getBalanceTransaction();
final java.lang.Object other$balanceTransaction = other.getBalanceTransaction();
if (this$balanceTransaction == null ? other$balanceTransaction != null : !this$balanceTransaction.equals(other$balanceTransaction)) return false;
final java.lang.Object this$card = this.getCard();
final java.lang.Object other$card = other.getCard();
if (this$card == null ? other$card != null : !this$card.equals(other$card)) return false;
final java.lang.Object this$cardholder = this.getCardholder();
final java.lang.Object other$cardholder = other.getCardholder();
if (this$cardholder == null ? other$cardholder != null : !this$cardholder.equals(other$cardholder)) return false;
final java.lang.Object this$created = this.getCreated();
final java.lang.Object other$created = other.getCreated();
if (this$created == null ? other$created != null : !this$created.equals(other$created)) return false;
final java.lang.Object this$currency = this.getCurrency();
final java.lang.Object other$currency = other.getCurrency();
if (this$currency == null ? other$currency != null : !this$currency.equals(other$currency)) return false;
final java.lang.Object this$dispute = this.getDispute();
final java.lang.Object other$dispute = other.getDispute();
if (this$dispute == null ? other$dispute != null : !this$dispute.equals(other$dispute)) return false;
final java.lang.Object this$livemode = this.getLivemode();
final java.lang.Object other$livemode = other.getLivemode();
if (this$livemode == null ? other$livemode != null : !this$livemode.equals(other$livemode)) return false;
final java.lang.Object this$merchantData = this.getMerchantData();
final java.lang.Object other$merchantData = other.getMerchantData();
if (this$merchantData == null ? other$merchantData != null : !this$merchantData.equals(other$merchantData)) return false;
final java.lang.Object this$metadata = this.getMetadata();
final java.lang.Object other$metadata = other.getMetadata();
if (this$metadata == null ? other$metadata != null : !this$metadata.equals(other$metadata)) return false;
final java.lang.Object this$type = this.getType();
final java.lang.Object other$type = other.getType();
if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Transaction;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $id = this.getId();
result = result * PRIME + ($id == null ? 43 : $id.hashCode());
final java.lang.Object $object = this.getObject();
result = result * PRIME + ($object == null ? 43 : $object.hashCode());
final java.lang.Object $amount = this.getAmount();
result = result * PRIME + ($amount == null ? 43 : $amount.hashCode());
final java.lang.Object $authorization = this.getAuthorization();
result = result * PRIME + ($authorization == null ? 43 : $authorization.hashCode());
final java.lang.Object $balanceTransaction = this.getBalanceTransaction();
result = result * PRIME + ($balanceTransaction == null ? 43 : $balanceTransaction.hashCode());
final java.lang.Object $card = this.getCard();
result = result * PRIME + ($card == null ? 43 : $card.hashCode());
final java.lang.Object $cardholder = this.getCardholder();
result = result * PRIME + ($cardholder == null ? 43 : $cardholder.hashCode());
final java.lang.Object $created = this.getCreated();
result = result * PRIME + ($created == null ? 43 : $created.hashCode());
final java.lang.Object $currency = this.getCurrency();
result = result * PRIME + ($currency == null ? 43 : $currency.hashCode());
final java.lang.Object $dispute = this.getDispute();
result = result * PRIME + ($dispute == null ? 43 : $dispute.hashCode());
final java.lang.Object $livemode = this.getLivemode();
result = result * PRIME + ($livemode == null ? 43 : $livemode.hashCode());
final java.lang.Object $merchantData = this.getMerchantData();
result = result * PRIME + ($merchantData == null ? 43 : $merchantData.hashCode());
final java.lang.Object $metadata = this.getMetadata();
result = result * PRIME + ($metadata == null ? 43 : $metadata.hashCode());
final java.lang.Object $type = this.getType();
result = result * PRIME + ($type == null ? 43 : $type.hashCode());
return result;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getId() {
return this.id;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getMetadata() {
return this.metadata;
}
//
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy