namespace SanctionsSearch.Api2.ServiceModel.Operations.Base
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<DataContract>]
[<AllowNullLiteral>]
type Authentication() =
///<summary>
///The API User ID provided by us when you signed up to use our API
///</summary>
[<DataMember>]
[<ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")>]
member val ApiUserId:String = null with get,set
///<summary>
///The API User Key provided by us when you signed up to use our API
///</summary>
[<DataMember>]
[<ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")>]
member val ApiUserKey:String = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type BaseRequest() =
///<summary>
///The authentication credentials
///</summary>
[<DataMember>]
[<ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")>]
member val Authentication:Authentication = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type PagedRequest() =
inherit BaseRequest()
///<summary>
///The maximum number of records to be returned in one page
///</summary>
[<DataMember(Name="page[limit]")>]
[<ApiMember(Description="The maximum number of records to be returned in one page", ParameterType="query")>]
member val PageLimit:Int32 = new Int32() with get,set
///<summary>
///The starting point in the list of records from where the data should be fetched. Zero based index.
///</summary>
[<DataMember(Name="page[offset]")>]
[<ApiMember(Description="The starting point in the list of records from where the data should be fetched. Zero based index.", ParameterType="query")>]
member val PageOffset:Int32 = new Int32() with get,set
///<summary>
///The term to determine the order in which the data is returned
///</summary>
[<DataMember>]
[<ApiMember(Description="The term to determine the order in which the data is returned", ParameterType="query")>]
member val Sort:String = null with get,set
[<DataContract(Name="ClientState", Namespace="http://schemas.servicestack.net/types")>]
type ClientState =
| Undefined = 0
| PendingCompletion = 1
| PendingOcr = 2
| PendingVerification = 3
| Verified = 4
[<DataContract>]
[<AllowNullLiteral>]
type GetClients() =
inherit PagedRequest()
///<summary>
///Filter the results to those that have a State matching the state specified
///</summary>
[<DataMember>]
[<ApiMember(Description="Filter the results to those that have a State matching the state specified", ParameterType="query")>]
member val State:ClientState = new ClientState() with get,set
///<summary>
///Filter the results to those that have a IsValidateMe flag matching the specified value
///</summary>
[<DataMember>]
[<ApiMember(Description="Filter the results to those that have a IsValidateMe flag matching the specified value", ParameterType="query")>]
member val IsValidateMe:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///Filter the results to those that have a Name including the specified value
///</summary>
[<DataMember>]
[<ApiMember(Description="Filter the results to those that have a Name including the specified value", ParameterType="query")>]
member val Name:String = null with get,set
///<summary>
///Filter the results to those that were created after (or on) this date
///</summary>
[<DataMember>]
[<ApiMember(Description="Filter the results to those that were created after (or on) this date", ParameterType="query")>]
member val DateFrom:DateTime = new DateTime() with get,set
///<summary>
///Filter the results to those that were created before this date
///</summary>
[<DataMember>]
[<ApiMember(Description="Filter the results to those that were created before this date", ParameterType="query")>]
member val DateTo:DateTime = new DateTime() with get,set
///<summary>
///If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view
///</summary>
[<DataMember>]
[<ApiMember(Description="If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view", ParameterType="query")>]
member val SubUserName:String = null with get,set
[<AllowNullLiteral>]
type Links() =
[<ApiMember>]
member val Self:String = null with get,set
[<AllowNullLiteral>]
type Image() =
member val Id:Int32 = new Int32() with get,set
member val Name:String = null with get,set
member val OcrId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val Url:String = null with get,set
[<AllowNullLiteral>]
type ClientShort() =
member val Id:Int32 = new Int32() with get,set
member val DateCreated:DateTime = new DateTime() with get,set
member val Name:String = null with get,set
member val Reference:String = null with get,set
member val IsValidateMe:Boolean = new Boolean() with get,set
member val State:ClientState = new ClientState() with get,set
member val Links:Links = null with get,set
member val NumOfDocuments:Int32 = new Int32() with get,set
member val Photo:Image = null with get,set
[<AllowNullLiteral>]
type ArrayOfClientShort() =
inherit ResizeArray<ClientShort>()
[<AllowNullLiteral>]
type GetClientsData() =
inherit PagedResponse<GetClients>()
member val Clients:ArrayOfClientShort = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type GetClientsResponse() =
[<DataMember>]
member val Data:GetClientsData = null with get,set
[<DataContract>]
[<AllowNullLiteral>]
type ResponseError() =
[<DataMember(Order=1)>]
member val ErrorCode:String = null with get,set
[<DataMember(Order=2)>]
member val FieldName:String = null with get,set
[<DataMember(Order=3)>]
member val Message:String = null with get,set
[<DataMember(Order=4)>]
member val Meta:Dictionary<String, String> = new Dictionary<String, String>() with get,set
[<AllowNullLiteral>]
type ArrayOfResponseError() =
inherit ResizeArray<ResponseError>()
[<DataContract>]
[<AllowNullLiteral>]
type ResponseStatus() =
[<DataMember(Order=1)>]
member val ErrorCode:String = null with get,set
[<DataMember(Order=2)>]
member val Message:String = null with get,set
[<DataMember(Order=3)>]
member val StackTrace:String = null with get,set
[<DataMember(Order=4)>]
member val Errors:ArrayOfResponseError = null with get,set
[<DataMember(Order=5)>]
member val Meta:Dictionary<String, String> = new Dictionary<String, String>() with get,set
[<AllowNullLiteral>]
type BaseResponse() =
///<summary>
///The status of the response
///</summary>
[<ApiMember(Description="The status of the response")>]
member val ResponseStatus:ResponseStatus = null with get,set
[<AllowNullLiteral>]
type PagedResponse<T>() =
inherit BaseResponse()
///<summary>
///The response Metadata
///</summary>
[<ApiMember(Description="The response Metadata")>]
member val Meta:Meta<T> = null with get,set
[<AllowNullLiteral>]
type MetaLinks() =
inherit Links()
///<summary>
///The link to the first page of records
///</summary>
[<ApiMember(Description="The link to the first page of records")>]
member val First:String = null with get,set
///<summary>
///The link to the last page of records
///</summary>
[<ApiMember(Description="The link to the last page of records")>]
member val Last:String = null with get,set
///<summary>
///The link to the next page of records, if applicable
///</summary>
[<ApiMember(Description="The link to the next page of records, if applicable")>]
member val Next:String = null with get,set
///<summary>
///The link to the last page of records, if applicable
///</summary>
[<ApiMember(Description="The link to the last page of records, if applicable")>]
member val Prev:String = null with get,set
[<AllowNullLiteral>]
type Meta<T>() =
///<summary>
///Pagination links
///</summary>
[<ApiMember(Description="Pagination links")>]
member val Links:MetaLinks = null with get,set
///<summary>
///The total number of records for the query
///</summary>
[<ApiMember(Description="The total number of records for the query")>]
member val TotalCount:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The maximum number of records to be returned in one page
///</summary>
[<ApiMember(Description="The maximum number of records to be returned in one page")>]
member val PageLimit:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The starting point in the list of records from where the data should be fetched. Zero based index.
///</summary>
[<ApiMember(Description="The starting point in the list of records from where the data should be fetched. Zero based index.")>]
member val PageOffset:Nullable<Int32> = new Nullable<Int32>() with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .soap12 suffix or ?format=soap12
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /soap12 HTTP/1.1
Host: api.sanctionssearch.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetClients xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<Authentication>
<ApiUserId>String</ApiUserId>
<ApiUserKey>String</ApiUserKey>
</Authentication>
<Sort>String</Sort>
<page_x005B_limit_x005D_>0</page_x005B_limit_x005D_>
<page_x005B_offset_x005D_>0</page_x005B_offset_x005D_>
<DateFrom>0001-01-01T00:00:00</DateFrom>
<DateTo>0001-01-01T00:00:00</DateTo>
<IsValidateMe>false</IsValidateMe>
<Name>String</Name>
<State>Undefined</State>
<SubUserName>String</SubUserName>
</GetClients>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetClientsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types"> <Data> <ResponseStatus> <ErrorCode>String</ErrorCode> <Message>String</Message> <StackTrace>String</StackTrace> <Errors> <ResponseError> <ErrorCode>String</ErrorCode> <FieldName>String</FieldName> <Message>String</Message> <Meta xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d6p1:KeyValueOfstringstring> <d6p1:Key>String</d6p1:Key> <d6p1:Value>String</d6p1:Value> </d6p1:KeyValueOfstringstring> </Meta> </ResponseError> </Errors> <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringstring> <d4p1:Key>String</d4p1:Key> <d4p1:Value>String</d4p1:Value> </d4p1:KeyValueOfstringstring> </Meta> </ResponseStatus> <Meta> <Links> <Self>String</Self> <First>String</First> <Last>String</Last> <Next>String</Next> <Prev>String</Prev> </Links> <PageLimit>0</PageLimit> <PageOffset>0</PageOffset> <TotalCount>0</TotalCount> </Meta> <Clients> <ClientShort> <DateCreated>0001-01-01T00:00:00</DateCreated> <Id>0</Id> <IsValidateMe>false</IsValidateMe> <Links> <Self>String</Self> </Links> <Name>String</Name> <NumOfDocuments>0</NumOfDocuments> <Photo> <Id>0</Id> <Name>String</Name> <OcrId>0</OcrId> <Url>String</Url> </Photo> <Reference>String</Reference> <State>Undefined</State> </ClientShort> </Clients> </Data> </GetClientsResponse> </soap12:Body> </soap12:Envelope>