
com.wallee.sdk.mdes.model.Token Maven / Gradle / Ivy
/*
* MDES for Merchants
* The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously.
__Authentication__ Mastercard uses OAuth 1.0a with body hash extension for authenticating the API clients. This requires every request that you send to Mastercard to be signed with an RSA private key. A private-public RSA key pair must be generated consisting of:
1 . A private key for the OAuth signature for API requests. It is recommended to keep the private key in a password-protected or hardware keystore.
2. A public key is shared with Mastercard during the project setup process through either a certificate signing request (CSR) or the API Key Generator. Mastercard will use the public key to verify the OAuth signature that is provided on every API call.
An OAUTH1.0a signer library is available on [GitHub](https://github.com/Mastercard/oauth1-signer-java)
__Encryption__
All communications between Issuer web service and the Mastercard gateway is encrypted using TLS.
__Additional Encryption of Sensitive Data__ In addition to the OAuth authentication, when using MDES Digital Enablement Service, any PCI sensitive and all account holder Personally Identifiable Information (PII) data must be encrypted. This requirement applies to the API fields containing encryptedData. Sensitive data is encrypted using a symmetric session (one-time-use) key. The symmetric session key is then wrapped with an RSA Public Key supplied by Mastercard during API setup phase (the Customer Encryption Key).
Java Client Encryption Library available on [GitHub](https://github.com/Mastercard/client-encryption-java)
*
* OpenAPI spec version: 1.2.10
*
*
* 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.wallee.sdk.mdes.model;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
import com.wallee.sdk.mdes.model.ProductConfig;
import com.wallee.sdk.mdes.model.TokenInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
* Token
*/
public class Token {
@SerializedName("tokenUniqueReference")
private String tokenUniqueReference = null;
@SerializedName("status")
private String status = null;
@SerializedName("suspendedBy")
private List suspendedBy = null;
@SerializedName("statusTimestamp")
private String statusTimestamp = null;
@SerializedName("productConfig")
private ProductConfig productConfig = null;
@SerializedName("tokenInfo")
private TokenInfo tokenInfo = null;
public Token tokenUniqueReference(String tokenUniqueReference) {
this.tokenUniqueReference = tokenUniqueReference;
return this;
}
/**
* The unique reference allocated to the Token which is always present even if an error occurs. <br> __Max Length:64__
* @return tokenUniqueReference
**/
public String getTokenUniqueReference() {
return tokenUniqueReference;
}
public void setTokenUniqueReference(String tokenUniqueReference) {
this.tokenUniqueReference = tokenUniqueReference;
}
public Token status(String status) {
this.status = status;
return this;
}
/**
* The current status of Token. Must be either: * 'INACTIVE' (Token has not yet been activated) * 'ACTIVE' (Token is active and ready to transact) * 'SUSPENDED' (Token is suspended and unable to transact) * 'DEACTIVATED' (Token has been permanently deactivated).<br> __Max Length:32__
* @return status
**/
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Token suspendedBy(List suspendedBy) {
this.suspendedBy = suspendedBy;
return this;
}
public Token addSuspendedByItem(String suspendedByItem) {
if (this.suspendedBy == null) {
this.suspendedBy = new ArrayList();
}
this.suspendedBy.add(suspendedByItem);
return this;
}
/**
* (CONDITIONAL only supplied if status is SUSPENDED) Who or what caused the Token to be suspended One or more values of: * ISSUER - Suspended by the Issuer. * TOKEN_REQUESTOR - Suspended by the Token Requestor * MOBILE_PIN_LOCKED - Suspended due to the Mobile PIN being locked * CARDHOLDER - Suspended by the Cardholder <br> __Max Length__: N/A
* @return suspendedBy
**/
public List getSuspendedBy() {
return suspendedBy;
}
public void setSuspendedBy(List suspendedBy) {
this.suspendedBy = suspendedBy;
}
public Token statusTimestamp(String statusTimestamp) {
this.statusTimestamp = statusTimestamp;
return this;
}
/**
* The date and time the token status was last updated. Expressed in ISO 8601 extended format as one of the following: * YYYY-MM-DDThh:mm:ss[.sss]Z * YYYY-MM-DDThh:mm:ss[.sss]�hh:mm * Where [.sss] is optional and can be 1 to 3 digits. <br> __Max Length:29__
* @return statusTimestamp
**/
public String getStatusTimestamp() {
return statusTimestamp;
}
public void setStatusTimestamp(String statusTimestamp) {
this.statusTimestamp = statusTimestamp;
}
public Token productConfig(ProductConfig productConfig) {
this.productConfig = productConfig;
return this;
}
/**
* Get productConfig
* @return productConfig
**/
public ProductConfig getProductConfig() {
return productConfig;
}
public void setProductConfig(ProductConfig productConfig) {
this.productConfig = productConfig;
}
public Token tokenInfo(TokenInfo tokenInfo) {
this.tokenInfo = tokenInfo;
return this;
}
/**
* Get tokenInfo
* @return tokenInfo
**/
public TokenInfo getTokenInfo() {
return tokenInfo;
}
public void setTokenInfo(TokenInfo tokenInfo) {
this.tokenInfo = tokenInfo;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Token token = (Token) o;
return Objects.equals(this.tokenUniqueReference, token.tokenUniqueReference) &&
Objects.equals(this.status, token.status) &&
Objects.equals(this.suspendedBy, token.suspendedBy) &&
Objects.equals(this.statusTimestamp, token.statusTimestamp) &&
Objects.equals(this.productConfig, token.productConfig) &&
Objects.equals(this.tokenInfo, token.tokenInfo);
}
@Override
public int hashCode() {
return Objects.hash(tokenUniqueReference, status, suspendedBy, statusTimestamp, productConfig, tokenInfo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Token {\n");
sb.append(" tokenUniqueReference: ").append(toIndentedString(tokenUniqueReference)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" suspendedBy: ").append(toIndentedString(suspendedBy)).append("\n");
sb.append(" statusTimestamp: ").append(toIndentedString(statusTimestamp)).append("\n");
sb.append(" productConfig: ").append(toIndentedString(productConfig)).append("\n");
sb.append(" tokenInfo: ").append(toIndentedString(tokenInfo)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy