AIM Web Services

<back to all web services

ContractFulfillmentRequest

ContractFulfillment
Requires active-e Contracts Service.
This API call used to be named C2BSetContractSerial.

The following routes are available for this service:
POST/api/ContractFulfillment
POST/api/C2BSetContractSerial
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * ContractFulfillmentRequires active-e Contracts Service.This API call used to be named C2BSetContractSerial.
    */
    @DataContract
    public static class ContractFulfillmentRequest extends BaseSecureRequest
    {
        @DataMember
        public String Ref = null;

        @DataMember
        public String Serial = null;

        @DataMember
        public Long SerialPk = null;

        @DataMember
        public BigDecimal CashPrice = null;

        @DataMember
        public String NewStatus = null;

        @DataMember
        public String Notes = null;

        @DataMember
        public Date DeliveryDate = null;

        @DataMember
        public ArrayList<DeliveredAccessory> DeliveredAccessories = null;

        @DataMember
        public ArrayList<Long> DeletedAccessoryIds = null;

        @DataMember
        public ArrayList<Accessory> AddedAccessories = null;

        @DataMember
        public Date FirstDue = null;

        @DataMember
        public Integer CustomerAcct = null;

        @DataMember
        public Boolean Unlock = null;

        @DataMember
        public ArrayList<UpdateContractObj> MassUpdateItems = null;
        
        public String getRef() { return Ref; }
        public ContractFulfillmentRequest setRef(String value) { this.Ref = value; return this; }
        public String getSerial() { return Serial; }
        public ContractFulfillmentRequest setSerial(String value) { this.Serial = value; return this; }
        public Long getSerialPk() { return SerialPk; }
        public ContractFulfillmentRequest setSerialPk(Long value) { this.SerialPk = value; return this; }
        public BigDecimal getCashPrice() { return CashPrice; }
        public ContractFulfillmentRequest setCashPrice(BigDecimal value) { this.CashPrice = value; return this; }
        public String getNewStatus() { return NewStatus; }
        public ContractFulfillmentRequest setNewStatus(String value) { this.NewStatus = value; return this; }
        public String getNotes() { return Notes; }
        public ContractFulfillmentRequest setNotes(String value) { this.Notes = value; return this; }
        public Date getDeliveryDate() { return DeliveryDate; }
        public ContractFulfillmentRequest setDeliveryDate(Date value) { this.DeliveryDate = value; return this; }
        public ArrayList<DeliveredAccessory> getDeliveredAccessories() { return DeliveredAccessories; }
        public ContractFulfillmentRequest setDeliveredAccessories(ArrayList<DeliveredAccessory> value) { this.DeliveredAccessories = value; return this; }
        public ArrayList<Long> getDeletedAccessoryIds() { return DeletedAccessoryIds; }
        public ContractFulfillmentRequest setDeletedAccessoryIds(ArrayList<Long> value) { this.DeletedAccessoryIds = value; return this; }
        public ArrayList<Accessory> getAddedAccessories() { return AddedAccessories; }
        public ContractFulfillmentRequest setAddedAccessories(ArrayList<Accessory> value) { this.AddedAccessories = value; return this; }
        public Date getFirstDue() { return FirstDue; }
        public ContractFulfillmentRequest setFirstDue(Date value) { this.FirstDue = value; return this; }
        public Integer getCustomerAcct() { return CustomerAcct; }
        public ContractFulfillmentRequest setCustomerAcct(Integer value) { this.CustomerAcct = value; return this; }
        public Boolean isUnlock() { return Unlock; }
        public ContractFulfillmentRequest setUnlock(Boolean value) { this.Unlock = value; return this; }
        public ArrayList<UpdateContractObj> getMassUpdateItems() { return MassUpdateItems; }
        public ContractFulfillmentRequest setMassUpdateItems(ArrayList<UpdateContractObj> value) { this.MassUpdateItems = value; return this; }
    }

    @DataContract
    public static class BaseSecureRequest extends BaseRequest
    {
        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
        public String Token = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
        public String DeviceId = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
        public String AppId = null;
        
        public String getToken() { return Token; }
        public BaseSecureRequest setToken(String value) { this.Token = value; return this; }
        public String getDeviceId() { return DeviceId; }
        public BaseSecureRequest setDeviceId(String value) { this.DeviceId = value; return this; }
        public String getAppId() { return AppId; }
        public BaseSecureRequest setAppId(String value) { this.AppId = value; return this; }
    }

    @DataContract
    public static class BaseRequest
    {
        /**
        * This is your AIM API Key provided by Tri-Tech
        */
        @DataMember
        @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
        public String ApiKey = null;

        @DataMember
        @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
        public String OAuthToken = null;
        
        public String getApiKey() { return ApiKey; }
        public BaseRequest setApiKey(String value) { this.ApiKey = value; return this; }
        public String getOAuthToken() { return OAuthToken; }
        public BaseRequest setOAuthToken(String value) { this.OAuthToken = value; return this; }
    }

    @DataContract
    public static class DeliveredAccessory
    {
        @DataMember
        public Long Id = null;

        @DataMember
        public Boolean Delivered = null;
        
        public Long getId() { return Id; }
        public DeliveredAccessory setId(Long value) { this.Id = value; return this; }
        public Boolean isDelivered() { return Delivered; }
        public DeliveredAccessory setDelivered(Boolean value) { this.Delivered = value; return this; }
    }

    @DataContract(Name="Accessory")
    public static class Accessory
    {
        @DataMember
        public String Desc = null;

        @DataMember
        public BigDecimal Price = null;

        @DataMember
        public String Type = null;

        @DataMember
        public Integer CatNum = null;

        @DataMember
        public String Sku = null;

        @DataMember
        public Boolean Report = null;
        
        public String getDesc() { return Desc; }
        public Accessory setDesc(String value) { this.Desc = value; return this; }
        public BigDecimal getPrice() { return Price; }
        public Accessory setPrice(BigDecimal value) { this.Price = value; return this; }
        public String getType() { return Type; }
        public Accessory setType(String value) { this.Type = value; return this; }
        public Integer getCatNum() { return CatNum; }
        public Accessory setCatNum(Integer value) { this.CatNum = value; return this; }
        public String getSku() { return Sku; }
        public Accessory setSku(String value) { this.Sku = value; return this; }
        public Boolean isReport() { return Report; }
        public Accessory setReport(Boolean value) { this.Report = value; return this; }
    }

    @DataContract
    public static class UpdateContractObj
    {
        @DataMember
        public String Ref = null;

        @DataMember
        public String Serial = null;

        @DataMember
        public Long SerialPk = null;

        @DataMember
        public BigDecimal CashPrice = null;

        @DataMember
        public String NewStatus = null;

        @DataMember
        public String Notes = null;

        @DataMember
        public Date DeliveryDate = null;

        @DataMember
        public ArrayList<DeliveredAccessory> DeliveredAccessories = null;

        @DataMember
        public ArrayList<Long> DeletedAccessoryIds = null;

        @DataMember
        public ArrayList<Accessory> AddedAccessories = null;

        @DataMember
        public Date FirstDue = null;

        @DataMember
        public Integer NewCustomerAcct = null;

        @DataMember
        public Boolean Unlock = null;
        
        public String getRef() { return Ref; }
        public UpdateContractObj setRef(String value) { this.Ref = value; return this; }
        public String getSerial() { return Serial; }
        public UpdateContractObj setSerial(String value) { this.Serial = value; return this; }
        public Long getSerialPk() { return SerialPk; }
        public UpdateContractObj setSerialPk(Long value) { this.SerialPk = value; return this; }
        public BigDecimal getCashPrice() { return CashPrice; }
        public UpdateContractObj setCashPrice(BigDecimal value) { this.CashPrice = value; return this; }
        public String getNewStatus() { return NewStatus; }
        public UpdateContractObj setNewStatus(String value) { this.NewStatus = value; return this; }
        public String getNotes() { return Notes; }
        public UpdateContractObj setNotes(String value) { this.Notes = value; return this; }
        public Date getDeliveryDate() { return DeliveryDate; }
        public UpdateContractObj setDeliveryDate(Date value) { this.DeliveryDate = value; return this; }
        public ArrayList<DeliveredAccessory> getDeliveredAccessories() { return DeliveredAccessories; }
        public UpdateContractObj setDeliveredAccessories(ArrayList<DeliveredAccessory> value) { this.DeliveredAccessories = value; return this; }
        public ArrayList<Long> getDeletedAccessoryIds() { return DeletedAccessoryIds; }
        public UpdateContractObj setDeletedAccessoryIds(ArrayList<Long> value) { this.DeletedAccessoryIds = value; return this; }
        public ArrayList<Accessory> getAddedAccessories() { return AddedAccessories; }
        public UpdateContractObj setAddedAccessories(ArrayList<Accessory> value) { this.AddedAccessories = value; return this; }
        public Date getFirstDue() { return FirstDue; }
        public UpdateContractObj setFirstDue(Date value) { this.FirstDue = value; return this; }
        public Integer getNewCustomerAcct() { return NewCustomerAcct; }
        public UpdateContractObj setNewCustomerAcct(Integer value) { this.NewCustomerAcct = value; return this; }
        public Boolean isUnlock() { return Unlock; }
        public UpdateContractObj setUnlock(Boolean value) { this.Unlock = value; return this; }
    }

    @DataContract
    public static class ContractFulfillmentResponse extends BaseResponse
    {
        @DataMember
        public ArrayList<UpdateContractErrorObj> MassUpdateErrors = null;
        
        public ArrayList<UpdateContractErrorObj> getMassUpdateErrors() { return MassUpdateErrors; }
        public ContractFulfillmentResponse setMassUpdateErrors(ArrayList<UpdateContractErrorObj> value) { this.MassUpdateErrors = value; return this; }
    }

    @DataContract
    public static class BaseResponse
    {
        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
        public BaseResponseResult Status = null;
        
        public BaseResponseResult getStatus() { return Status; }
        public BaseResponse setStatus(BaseResponseResult value) { this.Status = value; return this; }
    }

    @DataContract
    public static class BaseResponseResult
    {
        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
        public String StatusCode = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
        public String Login = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
        public String ErrorCode = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
        public String ErrorDisplayText = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
        public String ErrorMessage = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
        public String DomainName = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
        public String IpAddress = null;
        
        public String getStatusCode() { return StatusCode; }
        public BaseResponseResult setStatusCode(String value) { this.StatusCode = value; return this; }
        public String getLogin() { return Login; }
        public BaseResponseResult setLogin(String value) { this.Login = value; return this; }
        public String getErrorCode() { return ErrorCode; }
        public BaseResponseResult setErrorCode(String value) { this.ErrorCode = value; return this; }
        public String getErrorDisplayText() { return ErrorDisplayText; }
        public BaseResponseResult setErrorDisplayText(String value) { this.ErrorDisplayText = value; return this; }
        public String getErrorMessage() { return ErrorMessage; }
        public BaseResponseResult setErrorMessage(String value) { this.ErrorMessage = value; return this; }
        public String getDomainName() { return DomainName; }
        public BaseResponseResult setDomainName(String value) { this.DomainName = value; return this; }
        public String getIpAddress() { return IpAddress; }
        public BaseResponseResult setIpAddress(String value) { this.IpAddress = value; return this; }
    }

    @DataContract
    public static class UpdateContractErrorObj
    {
        @DataMember
        public String Ref = null;

        @DataMember
        public String ErrorMessage = null;
        
        public String getRef() { return Ref; }
        public UpdateContractErrorObj setRef(String value) { this.Ref = value; return this; }
        public String getErrorMessage() { return ErrorMessage; }
        public UpdateContractErrorObj setErrorMessage(String value) { this.ErrorMessage = value; return this; }
    }

}

Java ContractFulfillmentRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/ContractFulfillment HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ContractFulfillmentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
  <ApiKey>String</ApiKey>
  <OAuthToken>String</OAuthToken>
  <AppId>String</AppId>
  <DeviceId>String</DeviceId>
  <Token>String</Token>
  <AddedAccessories>
    <Accessory>
      <CatNum>0</CatNum>
      <Desc>String</Desc>
      <Price>0</Price>
      <Report>false</Report>
      <Sku>String</Sku>
      <Type>String</Type>
    </Accessory>
  </AddedAccessories>
  <CashPrice>0</CashPrice>
  <CustomerAcct>0</CustomerAcct>
  <DeletedAccessoryIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:long>0</d2p1:long>
  </DeletedAccessoryIds>
  <DeliveredAccessories>
    <ContractFulfillmentRequest.DeliveredAccessory>
      <Delivered>false</Delivered>
      <Id>0</Id>
    </ContractFulfillmentRequest.DeliveredAccessory>
  </DeliveredAccessories>
  <DeliveryDate>0001-01-01T00:00:00</DeliveryDate>
  <FirstDue>0001-01-01T00:00:00</FirstDue>
  <MassUpdateItems>
    <ContractFulfillmentRequest.UpdateContractObj>
      <AddedAccessories>
        <Accessory>
          <CatNum>0</CatNum>
          <Desc>String</Desc>
          <Price>0</Price>
          <Report>false</Report>
          <Sku>String</Sku>
          <Type>String</Type>
        </Accessory>
      </AddedAccessories>
      <CashPrice>0</CashPrice>
      <DeletedAccessoryIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:long>0</d4p1:long>
      </DeletedAccessoryIds>
      <DeliveredAccessories>
        <ContractFulfillmentRequest.DeliveredAccessory>
          <Delivered>false</Delivered>
          <Id>0</Id>
        </ContractFulfillmentRequest.DeliveredAccessory>
      </DeliveredAccessories>
      <DeliveryDate>0001-01-01T00:00:00</DeliveryDate>
      <FirstDue>0001-01-01T00:00:00</FirstDue>
      <NewCustomerAcct>0</NewCustomerAcct>
      <NewStatus>String</NewStatus>
      <Notes>String</Notes>
      <Ref>String</Ref>
      <Serial>String</Serial>
      <SerialPk>0</SerialPk>
      <Unlock>false</Unlock>
    </ContractFulfillmentRequest.UpdateContractObj>
  </MassUpdateItems>
  <NewStatus>String</NewStatus>
  <Notes>String</Notes>
  <Ref>String</Ref>
  <Serial>String</Serial>
  <SerialPk>0</SerialPk>
  <Unlock>false</Unlock>
</ContractFulfillmentRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ContractFulfillmentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
  <Status>
    <DomainName>String</DomainName>
    <ErrorCode>String</ErrorCode>
    <ErrorDisplayText>String</ErrorDisplayText>
    <ErrorMessage>String</ErrorMessage>
    <IpAddress>String</IpAddress>
    <Login>String</Login>
    <StatusCode>String</StatusCode>
  </Status>
  <MassUpdateErrors>
    <UpdateContractErrorObj>
      <ErrorMessage>String</ErrorMessage>
      <Ref>String</Ref>
    </UpdateContractErrorObj>
  </MassUpdateErrors>
</ContractFulfillmentResponse>