AIM Web Services

<back to all web services

InvoiceDetailRequest

InvoiceDetail
Requires active-e Customer Service.

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

public class dtos
{

    /**
    * InvoiceDetailRequires active-e Customer Service.
    */
    @DataContract
    public static class InvoiceDetailRequest extends BaseSecureRequest
    {
        @DataMember
        public Integer Acct = null;

        @DataMember
        public Date InvoiceStartDate = null;

        @DataMember
        public Date InvoiceEndDate = null;

        /**
        * The Starting Offset. Defaults to 0 if not sent.
        */
        @DataMember
        @ApiMember(DataType="integer", Description="The Starting Offset. Defaults to 0 if not sent.", Format="int64", Name="StartOffset")
        public Long StartOffset = null;

        /**
        * The # of records to be returned. Defaults to 100 if not sent.
        */
        @DataMember
        @ApiMember(DataType="integer", Description="The # of records to be returned. Defaults to 100 if not sent.", Format="int64", Name="RecordCount")
        public Long RecordCount = null;

        /**
        * The Invoice Ref# to be looked up. If sent, do not send WebRef, Acct, InvoiceStartDate, InvoiceEndDate, StartOffset, or RecordCount
        */
        @DataMember
        @ApiMember(DataType="string", Description="The Invoice Ref# to be looked up. If sent, do not send WebRef, Acct, InvoiceStartDate, InvoiceEndDate, StartOffset, or RecordCount", Name="AIMRef")
        public String AIMRef = null;

        /**
        * The WebRef to be looked up. If sent, do not send AIMRef, Acct, InvoiceStartDate, InvoiceEndDate, StartOffset, or RecordCount
        */
        @DataMember
        @ApiMember(DataType="string", Description="The WebRef to be looked up. If sent, do not send AIMRef, Acct, InvoiceStartDate, InvoiceEndDate, StartOffset, or RecordCount", Name="WebRef")
        public String WebRef = null;
        
        public Integer getAcct() { return Acct; }
        public InvoiceDetailRequest setAcct(Integer value) { this.Acct = value; return this; }
        public Date getInvoiceStartDate() { return InvoiceStartDate; }
        public InvoiceDetailRequest setInvoiceStartDate(Date value) { this.InvoiceStartDate = value; return this; }
        public Date getInvoiceEndDate() { return InvoiceEndDate; }
        public InvoiceDetailRequest setInvoiceEndDate(Date value) { this.InvoiceEndDate = value; return this; }
        public Long getStartOffset() { return StartOffset; }
        public InvoiceDetailRequest setStartOffset(Long value) { this.StartOffset = value; return this; }
        public Long getRecordCount() { return RecordCount; }
        public InvoiceDetailRequest setRecordCount(Long value) { this.RecordCount = value; return this; }
        public String getAimRef() { return AIMRef; }
        public InvoiceDetailRequest setAimRef(String value) { this.AIMRef = value; return this; }
        public String getWebRef() { return WebRef; }
        public InvoiceDetailRequest setWebRef(String value) { this.WebRef = 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 InvoiceDetailResponse extends BaseResponse
    {
        @DataMember
        public ArrayList<InvoiceInfo> Invoices = null;

        @DataMember
        public Long RemainingRecords = null;
        
        public ArrayList<InvoiceInfo> getInvoices() { return Invoices; }
        public InvoiceDetailResponse setInvoices(ArrayList<InvoiceInfo> value) { this.Invoices = value; return this; }
        public Long getRemainingRecords() { return RemainingRecords; }
        public InvoiceDetailResponse setRemainingRecords(Long value) { this.RemainingRecords = 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 InvoiceInfo
    {
        @DataMember
        public String InvoiceNumber = null;

        @DataMember
        public Date DateTime = null;

        @DataMember
        public Integer SoldToAcct = null;

        @DataMember
        public String SoldToName = null;

        @DataMember
        public Integer BillToAcct = null;

        @DataMember
        public String BillToName = null;

        @DataMember
        public String Type = null;

        @DataMember
        public String PO = null;

        @DataMember
        public BigDecimal OriginalAmount = null;

        @DataMember
        public BigDecimal Balance = null;

        @DataMember
        public String Location = null;

        @DataMember
        public String ShipToName = null;

        @DataMember
        public String ShipToAddress = null;

        @DataMember
        public Long ShipToId = null;

        @DataMember
        public ArrayList<InvoiceLineItem> LineItems = null;

        @DataMember
        public ArrayList<InvoicePaymentItem> Payments = null;
        
        public String getInvoiceNumber() { return InvoiceNumber; }
        public InvoiceInfo setInvoiceNumber(String value) { this.InvoiceNumber = value; return this; }
        public Date getDateTime() { return DateTime; }
        public InvoiceInfo setDateTime(Date value) { this.DateTime = value; return this; }
        public Integer getSoldToAcct() { return SoldToAcct; }
        public InvoiceInfo setSoldToAcct(Integer value) { this.SoldToAcct = value; return this; }
        public String getSoldToName() { return SoldToName; }
        public InvoiceInfo setSoldToName(String value) { this.SoldToName = value; return this; }
        public Integer getBillToAcct() { return BillToAcct; }
        public InvoiceInfo setBillToAcct(Integer value) { this.BillToAcct = value; return this; }
        public String getBillToName() { return BillToName; }
        public InvoiceInfo setBillToName(String value) { this.BillToName = value; return this; }
        public String getType() { return Type; }
        public InvoiceInfo setType(String value) { this.Type = value; return this; }
        public String getPo() { return PO; }
        public InvoiceInfo setPo(String value) { this.PO = value; return this; }
        public BigDecimal getOriginalAmount() { return OriginalAmount; }
        public InvoiceInfo setOriginalAmount(BigDecimal value) { this.OriginalAmount = value; return this; }
        public BigDecimal getBalance() { return Balance; }
        public InvoiceInfo setBalance(BigDecimal value) { this.Balance = value; return this; }
        public String getLocation() { return Location; }
        public InvoiceInfo setLocation(String value) { this.Location = value; return this; }
        public String getShipToName() { return ShipToName; }
        public InvoiceInfo setShipToName(String value) { this.ShipToName = value; return this; }
        public String getShipToAddress() { return ShipToAddress; }
        public InvoiceInfo setShipToAddress(String value) { this.ShipToAddress = value; return this; }
        public Long getShipToId() { return ShipToId; }
        public InvoiceInfo setShipToId(Long value) { this.ShipToId = value; return this; }
        public ArrayList<InvoiceLineItem> getLineItems() { return LineItems; }
        public InvoiceInfo setLineItems(ArrayList<InvoiceLineItem> value) { this.LineItems = value; return this; }
        public ArrayList<InvoicePaymentItem> getPayments() { return Payments; }
        public InvoiceInfo setPayments(ArrayList<InvoicePaymentItem> value) { this.Payments = value; return this; }
    }

    @DataContract
    public static class InvoiceLineItem
    {
        @DataMember
        public BigDecimal Quantity = null;

        @DataMember
        public String Sku = null;

        @DataMember
        public String Description = null;

        @DataMember
        public BigDecimal PriceEach = null;

        @DataMember
        public BigDecimal Extended = null;

        @DataMember
        public BigDecimal Discount = null;

        @DataMember
        public BigDecimal Total = null;

        @DataMember
        public String OriginalRef = null;

        @DataMember
        public String Notes = null;

        @DataMember
        public String Source = null;
        
        public BigDecimal getQuantity() { return Quantity; }
        public InvoiceLineItem setQuantity(BigDecimal value) { this.Quantity = value; return this; }
        public String getSku() { return Sku; }
        public InvoiceLineItem setSku(String value) { this.Sku = value; return this; }
        public String getDescription() { return Description; }
        public InvoiceLineItem setDescription(String value) { this.Description = value; return this; }
        public BigDecimal getPriceEach() { return PriceEach; }
        public InvoiceLineItem setPriceEach(BigDecimal value) { this.PriceEach = value; return this; }
        public BigDecimal getExtended() { return Extended; }
        public InvoiceLineItem setExtended(BigDecimal value) { this.Extended = value; return this; }
        public BigDecimal getDiscount() { return Discount; }
        public InvoiceLineItem setDiscount(BigDecimal value) { this.Discount = value; return this; }
        public BigDecimal getTotal() { return Total; }
        public InvoiceLineItem setTotal(BigDecimal value) { this.Total = value; return this; }
        public String getOriginalRef() { return OriginalRef; }
        public InvoiceLineItem setOriginalRef(String value) { this.OriginalRef = value; return this; }
        public String getNotes() { return Notes; }
        public InvoiceLineItem setNotes(String value) { this.Notes = value; return this; }
        public String getSource() { return Source; }
        public InvoiceLineItem setSource(String value) { this.Source = value; return this; }
    }

    @DataContract
    public static class InvoicePaymentItem
    {
        @DataMember
        public String PayRef = null;

        @DataMember
        public Date DateTime = null;

        @DataMember
        public BigDecimal Amount = null;

        @DataMember
        public String Notes = null;

        @DataMember
        public String Source = null;
        
        public String getPayRef() { return PayRef; }
        public InvoicePaymentItem setPayRef(String value) { this.PayRef = value; return this; }
        public Date getDateTime() { return DateTime; }
        public InvoicePaymentItem setDateTime(Date value) { this.DateTime = value; return this; }
        public BigDecimal getAmount() { return Amount; }
        public InvoicePaymentItem setAmount(BigDecimal value) { this.Amount = value; return this; }
        public String getNotes() { return Notes; }
        public InvoicePaymentItem setNotes(String value) { this.Notes = value; return this; }
        public String getSource() { return Source; }
        public InvoicePaymentItem setSource(String value) { this.Source = value; return this; }
    }

}

Java InvoiceDetailRequest 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

HTTP + JSON

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

GET /api/InvoiceDetail HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Invoices":[{"InvoiceNumber":"String","SoldToAcct":0,"SoldToName":"String","BillToAcct":0,"BillToName":"String","Type":"String","PO":"String","OriginalAmount":0,"Balance":0,"Location":"String","ShipToName":"String","ShipToAddress":"String","ShipToId":0,"LineItems":[{"Quantity":0,"Sku":"String","Description":"String","PriceEach":0,"Extended":0,"Discount":0,"Total":0,"OriginalRef":"String","Notes":"String","Source":"String"}],"Payments":[{"PayRef":"String","Amount":0,"Notes":"String","Source":"String"}]}],"RemainingRecords":0,"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}