GET, POST | /BankAccount |
---|
namespace CDD_Engine_WS.dto.Requests
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type BankAccountResult() =
member val AccountName:String = null with get,set
member val BankName:String = null with get,set
member val SortCode:String = null with get,set
member val IsValid:Boolean = new Boolean() with get,set
member val IsDirectDebitCapable:Nullable<Boolean> = new Nullable<Boolean>() with get,set
member val AccountNumber:String = null with get,set
[<AllowNullLiteral>]
type BankAccountResponse() =
///<summary>
///Contains the bank account lookup result when successful.
///</summary>
member val Result:BankAccountResult = null with get,set
///<summary>
///Contains response status, details and errors.
///</summary>
member val ResponseStatus:ResponseStatus = null with get,set
[<AllowNullLiteral>]
type BankAccountRequest() =
///<summary>
///The bank sort code.
///</summary>
[<Required>]
member val Sortcode:String = null with get,set
///<summary>
///The bank account number.
///</summary>
[<Required>]
member val AccountNumber:String = null with get,set
///<summary>
///The Csr of the application (if available).
///</summary>
member val Csr:String = null with get,set
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 /BankAccount HTTP/1.1
Host: wpcdd-featuretest-ws.worldpay.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Sortcode: String,
AccountNumber: String,
Csr: String
}
HTTP/1.1 200 OK Content-Type: text/jsv 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 } } }