GET | /sales/agreement/contract | Get a contracts HTML verbiage | Get the agreements contract in HTML. Uses the Incomplete Agreements Token to identify the contract verbiage, and converts it into HTML, and returns it to the requestor. The header `X-Forwarded-For` is NOT required. It can be set to the IP address of the end user, or left blank. |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@ApiResponse(Description="", ResponseType=ContractTextResponse.class, StatusCode=200)
public static class ContractTextEndpoint implements IContractTextEndpoint, IRestrictedApiRequest
{
/**
* IP address of the end user
*/
@ApiMember(Description="IP address of the end user", Name="X-Forwarded-For", ParameterType="header")
public String XForwardedFor = null;
/**
* Api Authentication Key
*/
@ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query")
public String ApiKey = null;
/**
* ID# of the store to get contract for.
*/
@ApiMember(DataType="int", Description="ID# of the store to get contract for.", IsRequired=true, Name="StoreId", ParameterType="query")
public Integer StoreId = null;
public Integer ChainId = null;
/**
* Token for Incomplete Agreement to get details for
*/
@ApiMember(DataType="string", Description="Token for Incomplete Agreement to get details for", IsRequired=true, Name="IncompleteAgreementToken", ParameterType="query")
public String IncompleteAgreementToken = null;
public Integer RestrictedId = null;
public RestrictedResourceType RestrictedResourceType = null;
public String getXForwardedFor() { return XForwardedFor; }
public ContractTextEndpoint setXForwardedFor(String value) { this.XForwardedFor = value; return this; }
public String getApiKey() { return ApiKey; }
public ContractTextEndpoint setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getStoreId() { return StoreId; }
public ContractTextEndpoint setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getChainId() { return ChainId; }
public ContractTextEndpoint setChainId(Integer value) { this.ChainId = value; return this; }
public String getIncompleteAgreementToken() { return IncompleteAgreementToken; }
public ContractTextEndpoint setIncompleteAgreementToken(String value) { this.IncompleteAgreementToken = value; return this; }
public Integer getRestrictedId() { return RestrictedId; }
public ContractTextEndpoint setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
public ContractTextEndpoint setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
}
public static enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined;
}
public static class ContractTextResponse extends ApiResponse2Base
{
public String contractHtml = null;
public String incompleteAgreementToken = null;
public String getContractHtml() { return contractHtml; }
public ContractTextResponse setContractHtml(String value) { this.contractHtml = value; return this; }
public String getIncompleteAgreementToken() { return incompleteAgreementToken; }
public ContractTextResponse setIncompleteAgreementToken(String value) { this.incompleteAgreementToken = value; return this; }
}
public static class ApiResponse2Base
{
public Boolean success = null;
public String message = null;
public Boolean isSuccess() { return success; }
public ApiResponse2Base setSuccess(Boolean value) { this.success = value; return this; }
public String getMessage() { return message; }
public ApiResponse2Base setMessage(String value) { this.message = value; return this; }
}
}
Java ContractTextEndpoint DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /sales/agreement/contract HTTP/1.1 Host: www.clubready.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ContractTextResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Sales.Agreement"> <message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api">String</message> <success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api">false</success> <contractHtml>String</contractHtml> <incompleteAgreementToken>String</incompleteAgreementToken> </ContractTextResponse>