All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mastercard.masterpass.merchant.model.Card Maven / Gradle / Ivy

Go to download

Masterpass Merchant Checkout SDK on MasterCard Developer Zone (https://developer.mastercard.com)

There is a newer version: 1.3.1
Show newest version
package com.mastercard.masterpass.merchant.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.mastercard.masterpass.merchant.model.Address;
import com.mastercard.masterpass.merchant.model.BaseCard;
import com.mastercard.masterpass.merchant.model.ExtensionPoint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;



@Root(name = "Card")
@XmlRootElement (name = "Card")
public class Card   {
  
  @SerializedName("BrandId")
  @Element(name = "BrandId", required = false)
  private String brandId = null;
  
  @SerializedName("ExpiryMonth")
  @Element(name = "ExpiryMonth", required = false)
  private Integer expiryMonth = null;
  
  @SerializedName("AccountNumber")
  @Element(name = "AccountNumber", required = false)
  private String accountNumber = null;
  
  @SerializedName("CardHolderName")
  @Element(name = "CardHolderName")
  private String cardHolderName = null;
  
  @SerializedName("ExtensionPoint")
  @Element(name = "ExtensionPoint", required = false)
  private ExtensionPoint extensionPoint = null;
  
  @SerializedName("BillingAddress")
  @Element(name = "BillingAddress", required = false)
  private Address billingAddress = null;
  
  @SerializedName("BrandName")
  @Element(name = "BrandName", required = false)
  private String brandName = null;
  
  @SerializedName("ExpiryYear")
  @Element(name = "ExpiryYear", required = false)
  private Integer expiryYear = null;
  
  
  /**
   * Gets the card brand id, for example, master for MasterCard.
   * 
   * @return	the card brand id, for example, master for MasterCard.
   **/
  @XmlElement(name = "BrandId")
  public String getBrandId() {
    return brandId;
  }
  
  /**
  * Sets the card brand id, for example, master for MasterCard.
  *
  * @param brandId the card brand id, for example, master for MasterCard.
  */
    public Card brandId(String brandId) {
    this.brandId = brandId;
    return this;
  }
  
  
    

  
  /**
   * Gets the expiration month displayed on the payment card.
   * 
   * @return	the expiration month displayed on the payment card.
   **/
  @XmlElement(name = "ExpiryMonth")
  public Integer getExpiryMonth() {
    return expiryMonth;
  }
  
  /**
  * Sets the expiration month displayed on the payment card.
  *
  * @param expiryMonth the expiration month displayed on the payment card.
  */
    public Card expiryMonth(Integer expiryMonth) {
    this.expiryMonth = expiryMonth;
    return this;
  }
  
  
    

  
  /**
   * Gets the account number.
   * 
   * @return	the account number.
   **/
  @XmlElement(name = "AccountNumber")
  public String getAccountNumber() {
    return accountNumber;
  }
  
  /**
  * Sets the account number.
  *
  * @param accountNumber the account number.
  */
    public Card accountNumber(String accountNumber) {
    this.accountNumber = accountNumber;
    return this;
  }
  
  
    

  
  /**
   * Gets the cardholder name.
   * 
   * @return	the cardholder name.
   **/
  @XmlElement(name = "CardHolderName")
  public String getCardHolderName() {
    return cardHolderName;
  }
  
  /**
  * Sets the cardholder name.
  *
  * @param cardHolderName the cardholder name.
  */
    public Card cardHolderName(String cardHolderName) {
    this.cardHolderName = cardHolderName;
    return this;
  }
  
  
    

  
  /**
   * Gets the ExtensionPoint for future enhancement.
   * 
   * @return	the ExtensionPoint for future enhancement.
   **/
  @XmlElement(name = "ExtensionPoint")
  public ExtensionPoint getExtensionPoint() {
    return extensionPoint;
  }
  
  /**
  * Sets the ExtensionPoint for future enhancement.
  *
  * @param extensionPoint the ExtensionPoint for future enhancement.
  */
    public Card extensionPoint(ExtensionPoint extensionPoint) {
    this.extensionPoint = extensionPoint;
    return this;
  }
  
  
    

  
  /**
   * Gets the billing address for the card holder.
   * 
   * @return	the billing address for the card holder.
   **/
  @XmlElement(name = "BillingAddress")
  public Address getBillingAddress() {
    return billingAddress;
  }
  
  /**
  * Sets the billing address for the card holder.
  *
  * @param billingAddress the billing address for the card holder.
  */
    public Card billingAddress(Address billingAddress) {
    this.billingAddress = billingAddress;
    return this;
  }
  
  
    

  
  /**
   * Gets the card brand name, for example, MasterCard.
   * 
   * @return	the card brand name, for example, MasterCard.
   **/
  @XmlElement(name = "BrandName")
  public String getBrandName() {
    return brandName;
  }
  
  /**
  * Sets the card brand name, for example, MasterCard.
  *
  * @param brandName the card brand name, for example, MasterCard.
  */
    public Card brandName(String brandName) {
    this.brandName = brandName;
    return this;
  }
  
  
    

  
  /**
   * Gets the expiration year displayed on the payment card.
   * 
   * @return	the expiration year displayed on the payment card.
   **/
  @XmlElement(name = "ExpiryYear")
  public Integer getExpiryYear() {
    return expiryYear;
  }
  
  /**
  * Sets the expiration year displayed on the payment card.
  *
  * @param expiryYear the expiration year displayed on the payment card.
  */
    public Card expiryYear(Integer expiryYear) {
    this.expiryYear = expiryYear;
    return this;
  }
  
  
    

  
  /**
   * Returns true if the arguments are equal to each other and false
   * otherwise. Consequently, if both arguments are null, true is returned and
   * if exactly one argument is null, false is returned. Otherwise, equality
   * is determined by using the equals method of the first argument.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Card card = (Card) o;
    return Objects.equals(brandId, card.brandId) &&
        Objects.equals(expiryMonth, card.expiryMonth) &&
        Objects.equals(accountNumber, card.accountNumber) &&
        Objects.equals(cardHolderName, card.cardHolderName) &&
        Objects.equals(extensionPoint, card.extensionPoint) &&
        Objects.equals(billingAddress, card.billingAddress) &&
        Objects.equals(brandName, card.brandName) &&
        Objects.equals(expiryYear, card.expiryYear);
  }
  
  /**
  *	Generates a hash code for a sequence of input values.
  */
  @Override
  public int hashCode() {
    return Objects.hash(brandId, expiryMonth, accountNumber, cardHolderName, extensionPoint, billingAddress, brandName, expiryYear);
  }
  
  /**
  *	Returns the result of calling toString for a non-null argument and "null" for a null argument.
  */	
  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Card {\n");
    sb.append("    ").append(toIndentedString(super.toString())).append("\n");
    sb.append("    brandId: ").append(toIndentedString(brandId)).append("\n");
    sb.append("    expiryMonth: ").append(toIndentedString(expiryMonth)).append("\n");
    sb.append("    accountNumber: ").append(toIndentedString(accountNumber)).append("\n");
    sb.append("    cardHolderName: ").append(toIndentedString(cardHolderName)).append("\n");
    sb.append("    extensionPoint: ").append(toIndentedString(extensionPoint)).append("\n");
    sb.append("    billingAddress: ").append(toIndentedString(billingAddress)).append("\n");
    sb.append("    brandName: ").append(toIndentedString(brandName)).append("\n");
    sb.append("    expiryYear: ").append(toIndentedString(expiryYear)).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