
io.electrum.cardaccount.model.Card Maven / Gradle / Ivy
The newest version!
/*
* Electrum Gateway Card-Account API
* The Electrum Gateway Card-Account API defines an interface for card and account management.
*
* OpenAPI spec version: 0.0.600
* 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 io.electrum.cardaccount.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.validation.constraints.Pattern;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.electrum.sdk.masking2.MaskAll;
import io.electrum.sdk.masking2.MaskPan;
import io.electrum.sdk.masking2.Masked;
import io.electrum.vas.Utils;
import io.electrum.vas.model.LedgerAmount;
import io.swagger.annotations.ApiModelProperty;
/**
* Card
*/
public class Card {
@Masked(MaskPan.class)
@JsonProperty("pan")
private String pan = null;
@JsonProperty("cardSequenceNumber")
private String cardSequenceNumber = null;
@JsonProperty("cardId")
private String cardId = null;
@Masked
@JsonProperty("accountIds")
private List accountIds = new ArrayList();
@JsonProperty("expiryDate")
private Date expiryDate = null;
@Masked(MaskAll.class)
@JsonProperty("clearPin")
private String clearPin = null;
@Masked(MaskAll.class)
@JsonProperty("encryptedPin")
private String encryptedPin = null;
@JsonProperty("availableBalance")
private LedgerAmount availableBalance = null;
@JsonProperty("customerId")
private String customerId = null;
@JsonProperty("stopReason")
private StopCardReason stopReason = null;
public Card pan(String pan) {
this.pan = pan;
return this;
}
/**
* The primary account number of the card. Either the PAN or the cardId must be supplied.
*
* @return pan
**/
@JsonProperty("pan")
@ApiModelProperty(value = "The primary account number of the card. Either the PAN or the cardId must be supplied.")
@Pattern(regexp = "[0-9]{1,19}")
public String getPan() {
return pan;
}
public void setPan(String pan) {
this.pan = pan;
}
public Card cardSequenceNumber(String cardSequenceNumber) {
this.cardSequenceNumber = cardSequenceNumber;
return this;
}
/**
* The card sequence number.
*
* @return cardSequenceNumber
**/
@JsonProperty("cardSequenceNumber")
@ApiModelProperty(value = "The card sequence number.")
public String getCardSequenceNumber() {
return cardSequenceNumber;
}
public void setCardSequenceNumber(String cardSequenceNumber) {
this.cardSequenceNumber = cardSequenceNumber;
}
public Card cardId(String cardId) {
this.cardId = cardId;
return this;
}
/**
* A unique identifier for the card that can be used in place of the PAN if the PAN is not available. E.g. a tracking
* number. Either the cardId or the PAN must be supplied.
*
* @return cardId
**/
@JsonProperty("cardId")
@ApiModelProperty(value = "A unique identifier for the card that can be used in place of the PAN if the PAN is not available. E.g. a tracking number. Either the cardId or the PAN must be supplied.")
public String getCardId() {
return cardId;
}
public void setCardId(String cardId) {
this.cardId = cardId;
}
public Card accountIds(List accountIds) {
this.accountIds = accountIds;
return this;
}
public Card addAccountIdsItem(String accountIdsItem) {
this.accountIds.add(accountIdsItem);
return this;
}
/**
* The accounts linked to this card.
*
* @return accountIds
**/
@JsonProperty("accountIds")
@ApiModelProperty(value = "The accounts linked to this card.")
public List getAccountIds() {
return accountIds;
}
public void setAccountIds(List accountIds) {
this.accountIds = accountIds;
}
public Card expiryDate(Date expiryDate) {
this.expiryDate = expiryDate;
return this;
}
/**
* The date and time at which the card expires in UTC. The format shall be as defined for date-time in [RFC 3339
* section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6).
*
* @return expiryDate
**/
@JsonProperty("expiryDate")
@ApiModelProperty(value = "The date and time at which the card expires in UTC. The format shall be as defined for date-time in [RFC 3339 section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6).")
public Date getExpiryDate() {
return expiryDate;
}
public void setExpiryDate(Date expiryDate) {
this.expiryDate = expiryDate;
}
public Card clearPin(String clearPin) {
this.clearPin = clearPin;
return this;
}
/**
* The unencrypted PIN for the card.
*
* @return clearPin
**/
@JsonProperty("clearPin")
@ApiModelProperty(value = "The unencrypted PIN for the card.")
public String getClearPin() {
return clearPin;
}
public void setClearPin(String clearPin) {
this.clearPin = clearPin;
}
public Card encryptedPin(String encryptedPin) {
this.encryptedPin = encryptedPin;
return this;
}
/**
* The encrypted PIN for the card in HEX format.
*
* @return encryptedPin
**/
@JsonProperty("encryptedPin")
@ApiModelProperty(value = "The encrypted PIN for the card in HEX format.")
@Pattern(regexp = "[0-9ABCDEF]+")
public String getEncryptedPin() {
return encryptedPin;
}
public void setEncryptedPin(String encryptedPin) {
this.encryptedPin = encryptedPin;
}
public Card customerId(String customerId) {
this.customerId = customerId;
return this;
}
public Card availableBalance(LedgerAmount availableBalance) {
this.availableBalance = availableBalance;
return this;
}
/**
* Get availableBalance
*
* @return availableBalance
**/
@JsonProperty("availableBalance")
@ApiModelProperty(value = "")
public LedgerAmount getAvailableBalance() {
return availableBalance;
}
public void setAvailableBalance(LedgerAmount availableBalance) {
this.availableBalance = availableBalance;
}
/**
* The customer ID of the card holder.
*
* @return customerId
**/
@JsonProperty("customerId")
@ApiModelProperty(value = "The customer ID of the card holder.")
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public Card stopReason(StopCardReason stopReason) {
this.stopReason = stopReason;
return this;
}
/**
* Get stopReason
*
* @return stopReason
**/
@JsonProperty("stopReason")
@ApiModelProperty(value = "")
public StopCardReason getStopReason() {
return stopReason;
}
public void setStopReason(StopCardReason stopReason) {
this.stopReason = stopReason;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Card card = (Card) o;
return Objects.equals(this.pan, card.pan) && Objects.equals(this.cardSequenceNumber, card.cardSequenceNumber)
&& Objects.equals(this.cardId, card.cardId) && Objects.equals(this.accountIds, card.accountIds)
&& Objects.equals(this.expiryDate, card.expiryDate) && Objects.equals(this.clearPin, card.clearPin)
&& Objects.equals(this.encryptedPin, card.encryptedPin) && Objects.equals(this.customerId, card.customerId)
&& Objects.equals(this.stopReason, card.stopReason);
}
@Override
public int hashCode() {
return Objects.hash(
pan,
cardSequenceNumber,
cardId,
accountIds,
expiryDate,
clearPin,
encryptedPin,
customerId,
stopReason);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Card {\n");
// TODO should probably use a PAN masker
sb.append(" pan: ").append(Utils.toIndentedString(pan)).append("\n");
sb.append(" cardSequenceNumber: ").append(Utils.toIndentedString(cardSequenceNumber)).append("\n");
sb.append(" cardId: ").append(Utils.toIndentedString(cardId)).append("\n");
sb.append(" accountIds: ").append(Utils.toIndentedString(accountIds)).append("\n");
sb.append(" expiryDate: ").append(Utils.toIndentedString(expiryDate)).append("\n");
sb.append(" clearPin: ").append(Utils.toIndentedString(clearPin)).append("\n");
sb.append(" encryptedPin: ").append(Utils.toIndentedString(encryptedPin)).append("\n");
sb.append(" availableBalance: ").append(Utils.toIndentedString(availableBalance)).append("\n");
sb.append(" customerId: ").append(Utils.toIndentedString(customerId)).append("\n");
sb.append(" stopReason: ").append(Utils.toIndentedString(stopReason)).append("\n");
sb.append("}");
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy