GET, POST | /BankAccount |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class BankAccountRequest
{
/**
* The bank sort code.
*/
@Required()
var Sortcode:String? = null
/**
* The bank account number.
*/
@Required()
var AccountNumber:String? = null
/**
* The Csr of the application (if available).
*/
var Csr:String? = null
}
open class BankAccountResponse
{
/**
* Contains the bank account lookup result when successful.
*/
var Result:BankAccountResult? = null
/**
* Contains response status, details and errors.
*/
var ResponseStatus:ResponseStatus? = null
}
open class BankAccountResult
{
var AccountName:String? = null
var BankName:String? = null
var SortCode:String? = null
var IsValid:Boolean? = null
var IsDirectDebitCapable:Boolean? = null
var AccountNumber:String? = null
}
Kotlin BankAccountRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /BankAccount HTTP/1.1
Host: wpcdd-featuretest-ws.worldpay.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Sortcode":"String","AccountNumber":"String","Csr":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Result":{"AccountName":"String","BankName":"String","SortCode":"String","IsValid":false,"IsDirectDebitCapable":false,"AccountNumber":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}