Requires the role: | Admin | Requires the permission: | ReadData |
POST | /borgunServices/token/single | Test 3D |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class BorgunServicesGetSingleTokenRequest
{
public BorgunTokenSingleRequest request = null;
public BorgunTokenSingleRequest getRequest() { return request; }
public BorgunServicesGetSingleTokenRequest setRequest(BorgunTokenSingleRequest value) { this.request = value; return this; }
}
public static class BorgunTokenSingleRequest
{
public String pan = null;
public String expMonth = null;
public String expYear = null;
public Integer tokenLifetime = null;
public BorgunVerifyCardRequest verifyCard = null;
public BorgunMetadata metadata = null;
public String getPan() { return pan; }
public BorgunTokenSingleRequest setPan(String value) { this.pan = value; return this; }
public String getExpMonth() { return expMonth; }
public BorgunTokenSingleRequest setExpMonth(String value) { this.expMonth = value; return this; }
public String getExpYear() { return expYear; }
public BorgunTokenSingleRequest setExpYear(String value) { this.expYear = value; return this; }
public Integer getTokenLifetime() { return tokenLifetime; }
public BorgunTokenSingleRequest setTokenLifetime(Integer value) { this.tokenLifetime = value; return this; }
public BorgunVerifyCardRequest getVerifyCard() { return verifyCard; }
public BorgunTokenSingleRequest setVerifyCard(BorgunVerifyCardRequest value) { this.verifyCard = value; return this; }
public BorgunMetadata getMetadata() { return metadata; }
public BorgunTokenSingleRequest setMetadata(BorgunMetadata value) { this.metadata = value; return this; }
}
public static class BorgunVerifyCardRequest
{
public Integer checkAmount = null;
public String currency = null;
public String cvc = null;
public Integer getCheckAmount() { return checkAmount; }
public BorgunVerifyCardRequest setCheckAmount(Integer value) { this.checkAmount = value; return this; }
public String getCurrency() { return currency; }
public BorgunVerifyCardRequest setCurrency(String value) { this.currency = value; return this; }
public String getCvc() { return cvc; }
public BorgunVerifyCardRequest setCvc(String value) { this.cvc = value; return this; }
}
public static class BorgunMetadata
{
public String payload = null;
public String getPayload() { return payload; }
public BorgunMetadata setPayload(String value) { this.payload = value; return this; }
}
public static class BorgunServicesGetSingleTokenResponse
{
public BorgunTokenSingleResponse response = null;
public Boolean success = null;
public Integer httpStatusCode = null;
public String message = null;
public BorgunTokenSingleResponse getResponse() { return response; }
public BorgunServicesGetSingleTokenResponse setResponse(BorgunTokenSingleResponse value) { this.response = value; return this; }
public Boolean isSuccess() { return success; }
public BorgunServicesGetSingleTokenResponse setSuccess(Boolean value) { this.success = value; return this; }
public Integer getHttpStatusCode() { return httpStatusCode; }
public BorgunServicesGetSingleTokenResponse setHttpStatusCode(Integer value) { this.httpStatusCode = value; return this; }
public String getMessage() { return message; }
public BorgunServicesGetSingleTokenResponse setMessage(String value) { this.message = value; return this; }
}
public static class BorgunTokenSingleResponse
{
public Integer statusCode = null;
public BorgunTokenSingleInfo token = null;
public String uri = null;
public String message = null;
public Integer getStatusCode() { return statusCode; }
public BorgunTokenSingleResponse setStatusCode(Integer value) { this.statusCode = value; return this; }
public BorgunTokenSingleInfo getToken() { return token; }
public BorgunTokenSingleResponse setToken(BorgunTokenSingleInfo value) { this.token = value; return this; }
public String getUri() { return uri; }
public BorgunTokenSingleResponse setUri(String value) { this.uri = value; return this; }
public String getMessage() { return message; }
public BorgunTokenSingleResponse setMessage(String value) { this.message = value; return this; }
}
public static class BorgunTokenSingleInfo
{
public String virtualNumber = null;
public String token = null;
public String pan = null;
public String expYear = null;
public String expMonth = null;
public Boolean enabled = null;
public BorgunVerifyCardResult verifyCardResult = null;
public BorgunMetadata metadata = null;
public String getVirtualNumber() { return virtualNumber; }
public BorgunTokenSingleInfo setVirtualNumber(String value) { this.virtualNumber = value; return this; }
public String getToken() { return token; }
public BorgunTokenSingleInfo setToken(String value) { this.token = value; return this; }
public String getPan() { return pan; }
public BorgunTokenSingleInfo setPan(String value) { this.pan = value; return this; }
public String getExpYear() { return expYear; }
public BorgunTokenSingleInfo setExpYear(String value) { this.expYear = value; return this; }
public String getExpMonth() { return expMonth; }
public BorgunTokenSingleInfo setExpMonth(String value) { this.expMonth = value; return this; }
public Boolean isEnabled() { return enabled; }
public BorgunTokenSingleInfo setEnabled(Boolean value) { this.enabled = value; return this; }
public BorgunVerifyCardResult getVerifyCardResult() { return verifyCardResult; }
public BorgunTokenSingleInfo setVerifyCardResult(BorgunVerifyCardResult value) { this.verifyCardResult = value; return this; }
public BorgunMetadata getMetadata() { return metadata; }
public BorgunTokenSingleInfo setMetadata(BorgunMetadata value) { this.metadata = value; return this; }
}
public static class BorgunVerifyCardResult
{
public String transactionId = null;
public String actionCode = null;
public String getTransactionId() { return transactionId; }
public BorgunVerifyCardResult setTransactionId(String value) { this.transactionId = value; return this; }
public String getActionCode() { return actionCode; }
public BorgunVerifyCardResult setActionCode(String value) { this.actionCode = value; return this; }
}
}
Java BorgunServicesGetSingleTokenRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /borgunServices/token/single HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
request:
{
pan: String,
expMonth: String,
expYear: String,
tokenLifetime: 0,
verifyCard:
{
checkAmount: 0,
currency: String,
cvc: String
},
metadata:
{
payload: String
}
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { response: { statusCode: 0, token: { virtualNumber: String, token: String, pan: String, expYear: String, expMonth: String, enabled: False, verifyCardResult: { transactionId: String, actionCode: String }, metadata: { payload: String } }, uri: String, message: String }, success: False, httpStatusCode: 0, message: String }