using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using SanctionsSearch.Api2.ServiceModel.Operations.Account;
using SanctionsSearch.Api2.ServiceModel.Operations.Base;
using SanctionsSearch.Api2.ServiceModel.Types;
namespace SanctionsSearch.Api2.ServiceModel.Operations.Account
{
[DataContract]
public partial class GetAccountStatus
: BaseRequest
{
}
public partial class GetAccountStatusData
: BaseResponse
{
///<summary>
///The account status information
///</summary>
[ApiMember(Description="The account status information")]
public virtual AccountStatus AccountStatus { get; set; }
}
[DataContract]
public partial class GetAccountStatusResponse
{
///<summary>
///The response data
///</summary>
[DataMember]
[ApiMember(Description="The response data")]
public virtual GetAccountStatusData Data { get; set; }
}
}
namespace SanctionsSearch.Api2.ServiceModel.Operations.Base
{
public partial class ArrayOfResponseError
: List<ResponseError>
{
}
[DataContract]
public partial class BaseRequest
: IBaseRequest
{
///<summary>
///The authentication credentials
///</summary>
[DataMember]
[ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")]
public virtual Authentication Authentication { get; set; }
}
public partial class BaseResponse
: IBaseDataResponse, IHasResponseStatus
{
///<summary>
///The status of the response
///</summary>
[ApiMember(Description="The status of the response")]
public virtual ResponseStatus ResponseStatus { get; set; }
}
[DataContract]
public partial class ResponseError
{
[DataMember(Order=1)]
public virtual string ErrorCode { get; set; }
[DataMember(Order=2)]
public virtual string FieldName { get; set; }
[DataMember(Order=3)]
public virtual string Message { get; set; }
[DataMember(Order=4)]
public virtual Dictionary<string, string> Meta { get; set; }
}
[DataContract]
public partial class ResponseStatus
{
[DataMember(Order=1)]
public virtual string ErrorCode { get; set; }
[DataMember(Order=2)]
public virtual string Message { get; set; }
[DataMember(Order=3)]
public virtual string StackTrace { get; set; }
[DataMember(Order=4)]
public virtual ArrayOfResponseError Errors { get; set; }
[DataMember(Order=5)]
public virtual Dictionary<string, string> Meta { get; set; }
}
}
namespace SanctionsSearch.Api2.ServiceModel.Types
{
public partial class AccountStatus
{
///<summary>
///The account status (e.g. Unpaid, Active, Expired)
///</summary>
[ApiMember(Description="The account status (e.g. Unpaid, Active, Expired)")]
public virtual string Status { get; set; }
///<summary>
///The account type (e.g. live, developer, demo)
///</summary>
[ApiMember(Description="The account type (e.g. live, developer, demo)")]
public virtual string Type { get; set; }
///<summary>
///The account Expiry Date
///</summary>
[ApiMember(Description="The account Expiry Date")]
public virtual DateTime? ExpiryDate { get; set; }
///<summary>
///The account Expiry Date as a string in ISO 8601 format
///</summary>
[ApiMember(Description="The account Expiry Date as a string in ISO 8601 format")]
public virtual string ExpiryDateUniversal { get; set; }
///<summary>
///The account balance
///</summary>
[ApiMember(Description="The account balance")]
public virtual decimal Balance { get; set; }
///<summary>
///The account search credit balance
///</summary>
[ApiMember(Description="The account search credit balance")]
public virtual long CreditBalance { get; set; }
///<summary>
///The account DBS credit balance
///</summary>
[ApiMember(Description="The account DBS credit balance")]
public virtual int DBSBasicCreditBalance { get; set; }
///<summary>
///The list of enabled products for this account
///</summary>
[ApiMember(Description="The list of enabled products for this account")]
public virtual List<string> Products { get; set; }
///<summary>
///The list of enabled capabilities for this account
///</summary>
[ApiMember(Description="The list of enabled capabilities for this account")]
public virtual List<string> Capabilities { get; set; }
}
[DataContract]
public partial class Authentication
{
///<summary>
///The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)
///</summary>
[DataMember]
[ApiMember(Description="The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)", IsRequired=true, ParameterType="header, body")]
public virtual string ApiUserId { get; set; }
///<summary>
///The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)
///</summary>
[DataMember]
[ApiMember(Description="The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)", IsRequired=true, ParameterType="header, body")]
public virtual string ApiUserKey { get; set; }
///<summary>
///The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).
///</summary>
[DataMember]
[ApiMember(Description="The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).", ParameterType="header, body")]
public virtual string UserId { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .soap11 suffix or ?format=soap11
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /soap11 HTTP/1.1
Host: api.simplified.id
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: GetAccountStatus
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetAccountStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<Authentication>
<ApiUserId>String</ApiUserId>
<ApiUserKey>String</ApiUserKey>
<UserId>String</UserId>
</Authentication>
</GetAccountStatus>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetAccountStatusResponse 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>
<AccountStatus>
<Balance>0</Balance>
<Capabilities xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Capabilities>
<CreditBalance>0</CreditBalance>
<DBSBasicCreditBalance>0</DBSBasicCreditBalance>
<ExpiryDate>0001-01-01T00:00:00</ExpiryDate>
<ExpiryDateUniversal>String</ExpiryDateUniversal>
<Products xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Products>
<Status>String</Status>
<Type>String</Type>
</AccountStatus>
</Data>
</GetAccountStatusResponse>
</soap:Body>
</soap:Envelope>