POST, GET | /api/GetCustomerTokens |
---|
namespace AIM.WebService
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<DataContract>]
[<AllowNullLiteral>]
type BaseResponseResult() =
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")>]
member val StatusCode:String = null with get,set
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")>]
member val Login:String = null with get,set
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")>]
member val ErrorCode:String = null with get,set
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")>]
member val ErrorDisplayText:String = null with get,set
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")>]
member val ErrorMessage:String = null with get,set
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")>]
member val DomainName:String = null with get,set
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")>]
member val IpAddress:String = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type BaseResponse() =
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")>]
member val Status:BaseResponseResult = null with get,set
[<DataContract(Name="CCInfo")>]
[<AllowNullLiteral>]
type CcInfo() =
///<summary>
///Token returned from processor
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="Token returned from processor", IsRequired=true, Name="TokenStr", ParameterType="query")>]
member val TokenStr:String = null with get,set
///<summary>
///Card Type (VISA, MCARD, AMEX, DSCVR)
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="Card Type (VISA, MCARD, AMEX, DSCVR)", IsRequired=true, Name="CardType", ParameterType="query")>]
member val CardType:String = null with get,set
///<summary>
///Last four of the card
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="Last four of the card", IsRequired=true, Name="LastFour", ParameterType="query")>]
member val LastFour:String = null with get,set
///<summary>
///Expiration Date of the Card. (MM/YY)
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="Expiration Date of the Card. (MM/YY)", Name="Expiration", ParameterType="query")>]
member val Expiration:String = null with get,set
///<summary>
///Reason the card is on file.
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="Reason the card is on file.", Name="ReasonOnFile", ParameterType="query")>]
member val ReasonOnFile:String = null with get,set
///<summary>
///ID of the existing Token Record in AIM, if applicable
///</summary>
[<DataMember>]
[<ApiMember(DataType="integer", Description="ID of the existing Token Record in AIM, if applicable", Format="int64", Name="TokenPk", ParameterType="query")>]
member val TokenPk:Nullable<Int64> = new Nullable<Int64>() with get,set
///<summary>
///Is this the customer's primary card? Defaults to false.
///</summary>
[<DataMember>]
[<ApiMember(DataType="boolean", Description="Is this the customer's primary card? Defaults to false.", Name="Primary", ParameterType="query")>]
member val Primary:Nullable<Boolean> = new Nullable<Boolean>() with get,set
[<DataContract>]
[<AllowNullLiteral>]
type AchDetail() =
[<DataMember>]
member val Name:String = null with get,set
[<DataMember>]
member val BankNumber:String = null with get,set
[<DataMember>]
member val Routing:String = null with get,set
[<DataMember>]
member val Type:String = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type GetCustomerTokensResponse() =
inherit BaseResponse()
[<DataMember>]
member val CustomerTokens:ResizeArray<CcInfo> = new ResizeArray<CcInfo>() with get,set
[<DataMember>]
member val Ach:AchDetail = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type BaseRequest() =
///<summary>
///This is your AIM API Key provided by Tri-Tech
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")>]
member val ApiKey:String = null with get,set
[<DataMember>]
[<ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")>]
member val OAuthToken:String = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type BaseSecureRequest() =
inherit BaseRequest()
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")>]
member val Token:String = null with get,set
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")>]
member val DeviceId:String = null with get,set
///<summary>
///
///</summary>
[<DataMember>]
[<ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")>]
member val AppId:String = null with get,set
///<summary>
///GetCustomerTokensRequires active-e Customer Service.
///</summary>
[<DataContract>]
[<AllowNullLiteral>]
type GetCustomerTokensRequest() =
inherit BaseSecureRequest()
[<DataMember>]
member val GetExpiredCards:Nullable<Boolean> = new Nullable<Boolean>() with get,set
[<DataMember>]
member val GetInactiveCards:Nullable<Boolean> = new Nullable<Boolean>() with get,set
[<DataMember>]
member val Acct:Nullable<Int32> = new Nullable<Int32>() with get,set
F# GetCustomerTokensRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/GetCustomerTokens HTTP/1.1
Host: active-ewebservice.biz
Accept: application/json
Content-Type: application/json
Content-Length: length
{"GetExpiredCards":false,"GetInactiveCards":false,"Acct":0,"Token":"String","DeviceId":"String","AppId":"String","ApiKey":"String","OAuthToken":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"CustomerTokens":[{"TokenStr":"String","CardType":"String","LastFour":"String","Expiration":"String","ReasonOnFile":"String","TokenPk":0,"Primary":false}],"Ach":{"Name":"String","BankNumber":"String","Routing":"String","Type":"String"},"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}