GET | /api/History360 |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* History360Requires active-e Customer Service.
*/
@DataContract
public static class History360Request extends BaseSecureRequest
{
@DataMember
public Integer CustomerAccount = null;
@DataMember
public Boolean IncludeInvoices = null;
@DataMember
public Boolean IncludeOrders = null;
@DataMember
public Boolean IncludeWorkOrders = null;
@DataMember
public Boolean IncludeContracts = null;
@DataMember
public Boolean IncludeClosed = null;
@DataMember
public Date ClosedStartDate = null;
public Integer getCustomerAccount() { return CustomerAccount; }
public History360Request setCustomerAccount(Integer value) { this.CustomerAccount = value; return this; }
public Boolean isIncludeInvoices() { return IncludeInvoices; }
public History360Request setIncludeInvoices(Boolean value) { this.IncludeInvoices = value; return this; }
public Boolean isIncludeOrders() { return IncludeOrders; }
public History360Request setIncludeOrders(Boolean value) { this.IncludeOrders = value; return this; }
public Boolean isIncludeWorkOrders() { return IncludeWorkOrders; }
public History360Request setIncludeWorkOrders(Boolean value) { this.IncludeWorkOrders = value; return this; }
public Boolean isIncludeContracts() { return IncludeContracts; }
public History360Request setIncludeContracts(Boolean value) { this.IncludeContracts = value; return this; }
public Boolean isIncludeClosed() { return IncludeClosed; }
public History360Request setIncludeClosed(Boolean value) { this.IncludeClosed = value; return this; }
public Date getClosedStartDate() { return ClosedStartDate; }
public History360Request setClosedStartDate(Date value) { this.ClosedStartDate = 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 History360Response extends BaseResponse
{
@DataMember
public ArrayList<Invoice360> Invoices = null;
@DataMember
public ArrayList<Order360> Orders = null;
@DataMember
public ArrayList<WorkOrder360> WorkOrders = null;
@DataMember
public ArrayList<Contract360> Contracts = null;
public ArrayList<Invoice360> getInvoices() { return Invoices; }
public History360Response setInvoices(ArrayList<Invoice360> value) { this.Invoices = value; return this; }
public ArrayList<Order360> getOrders() { return Orders; }
public History360Response setOrders(ArrayList<Order360> value) { this.Orders = value; return this; }
public ArrayList<WorkOrder360> getWorkOrders() { return WorkOrders; }
public History360Response setWorkOrders(ArrayList<WorkOrder360> value) { this.WorkOrders = value; return this; }
public ArrayList<Contract360> getContracts() { return Contracts; }
public History360Response setContracts(ArrayList<Contract360> value) { this.Contracts = 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 Invoice360
{
@DataMember
public String Id = null;
@DataMember
public Date DueDate = null;
@DataMember
public BigDecimal Total = null;
@DataMember
public String Status = null;
@DataMember
public BigDecimal AmountPaid = null;
@DataMember
public BigDecimal LateFeeAmount = null;
@DataMember
public Date PurchaseDate = null;
@DataMember
public Integer StoreLocationId = null;
@DataMember
public ArrayList<Item360> Items = null;
public String getId() { return Id; }
public Invoice360 setId(String value) { this.Id = value; return this; }
public Date getDueDate() { return DueDate; }
public Invoice360 setDueDate(Date value) { this.DueDate = value; return this; }
public BigDecimal getTotal() { return Total; }
public Invoice360 setTotal(BigDecimal value) { this.Total = value; return this; }
public String getStatus() { return Status; }
public Invoice360 setStatus(String value) { this.Status = value; return this; }
public BigDecimal getAmountPaid() { return AmountPaid; }
public Invoice360 setAmountPaid(BigDecimal value) { this.AmountPaid = value; return this; }
public BigDecimal getLateFeeAmount() { return LateFeeAmount; }
public Invoice360 setLateFeeAmount(BigDecimal value) { this.LateFeeAmount = value; return this; }
public Date getPurchaseDate() { return PurchaseDate; }
public Invoice360 setPurchaseDate(Date value) { this.PurchaseDate = value; return this; }
public Integer getStoreLocationId() { return StoreLocationId; }
public Invoice360 setStoreLocationId(Integer value) { this.StoreLocationId = value; return this; }
public ArrayList<Item360> getItems() { return Items; }
public Invoice360 setItems(ArrayList<Item360> value) { this.Items = value; return this; }
}
@DataContract
public static class Item360
{
@DataMember
public Long PslrId = null;
@DataMember
public BigDecimal Quantity = null;
@DataMember
public BigDecimal Price = null;
@DataMember
public BigDecimal TotalDiscountAmount = null;
@DataMember
public String SerialNumber = null;
@DataMember
public String Condition = null;
public Long getPslrId() { return PslrId; }
public Item360 setPslrId(Long value) { this.PslrId = value; return this; }
public BigDecimal getQuantity() { return Quantity; }
public Item360 setQuantity(BigDecimal value) { this.Quantity = value; return this; }
public BigDecimal getPrice() { return Price; }
public Item360 setPrice(BigDecimal value) { this.Price = value; return this; }
public BigDecimal getTotalDiscountAmount() { return TotalDiscountAmount; }
public Item360 setTotalDiscountAmount(BigDecimal value) { this.TotalDiscountAmount = value; return this; }
public String getSerialNumber() { return SerialNumber; }
public Item360 setSerialNumber(String value) { this.SerialNumber = value; return this; }
public String getCondition() { return Condition; }
public Item360 setCondition(String value) { this.Condition = value; return this; }
}
@DataContract
public static class Order360
{
@DataMember
public Integer Id = null;
@DataMember
public Date Date = null;
@DataMember
public BigDecimal Discount = null;
@DataMember
public String PaymentType = null;
@DataMember
public BigDecimal SubTotal = null;
@DataMember
public BigDecimal Tax = null;
@DataMember
public BigDecimal ShippingAmount = null;
@DataMember
public BigDecimal Total = null;
public Integer getId() { return Id; }
public Order360 setId(Integer value) { this.Id = value; return this; }
public Date getDate() { return Date; }
public Order360 setDate(Date value) { this.Date = value; return this; }
public BigDecimal getDiscount() { return Discount; }
public Order360 setDiscount(BigDecimal value) { this.Discount = value; return this; }
public String getPaymentType() { return PaymentType; }
public Order360 setPaymentType(String value) { this.PaymentType = value; return this; }
public BigDecimal getSubTotal() { return SubTotal; }
public Order360 setSubTotal(BigDecimal value) { this.SubTotal = value; return this; }
public BigDecimal getTax() { return Tax; }
public Order360 setTax(BigDecimal value) { this.Tax = value; return this; }
public BigDecimal getShippingAmount() { return ShippingAmount; }
public Order360 setShippingAmount(BigDecimal value) { this.ShippingAmount = value; return this; }
public BigDecimal getTotal() { return Total; }
public Order360 setTotal(BigDecimal value) { this.Total = value; return this; }
}
@DataContract
public static class WorkOrder360
{
@DataMember
public String Id = null;
@DataMember
public String Status = null;
@DataMember
public BigDecimal Deposit = null;
@DataMember
public Integer StoreLocationId = null;
@DataMember
public Date CreationDate = null;
@DataMember
public Date CompletedDate = null;
@DataMember
public BigDecimal Price = null;
@DataMember
public ArrayList<Job360> Jobs = null;
public String getId() { return Id; }
public WorkOrder360 setId(String value) { this.Id = value; return this; }
public String getStatus() { return Status; }
public WorkOrder360 setStatus(String value) { this.Status = value; return this; }
public BigDecimal getDeposit() { return Deposit; }
public WorkOrder360 setDeposit(BigDecimal value) { this.Deposit = value; return this; }
public Integer getStoreLocationId() { return StoreLocationId; }
public WorkOrder360 setStoreLocationId(Integer value) { this.StoreLocationId = value; return this; }
public Date getCreationDate() { return CreationDate; }
public WorkOrder360 setCreationDate(Date value) { this.CreationDate = value; return this; }
public Date getCompletedDate() { return CompletedDate; }
public WorkOrder360 setCompletedDate(Date value) { this.CompletedDate = value; return this; }
public BigDecimal getPrice() { return Price; }
public WorkOrder360 setPrice(BigDecimal value) { this.Price = value; return this; }
public ArrayList<Job360> getJobs() { return Jobs; }
public WorkOrder360 setJobs(ArrayList<Job360> value) { this.Jobs = value; return this; }
}
@DataContract
public static class Job360
{
@DataMember
public String ItemId = null;
@DataMember
public String ItemType = null;
@DataMember
public String Title = null;
@DataMember
public BigDecimal Quantity = null;
@DataMember
public BigDecimal Price = null;
@DataMember
public BigDecimal TotalDiscountAmount = null;
@DataMember
public String SerialNumber = null;
@DataMember
public String Condition = null;
public String getItemId() { return ItemId; }
public Job360 setItemId(String value) { this.ItemId = value; return this; }
public String getItemType() { return ItemType; }
public Job360 setItemType(String value) { this.ItemType = value; return this; }
public String getTitle() { return Title; }
public Job360 setTitle(String value) { this.Title = value; return this; }
public BigDecimal getQuantity() { return Quantity; }
public Job360 setQuantity(BigDecimal value) { this.Quantity = value; return this; }
public BigDecimal getPrice() { return Price; }
public Job360 setPrice(BigDecimal value) { this.Price = value; return this; }
public BigDecimal getTotalDiscountAmount() { return TotalDiscountAmount; }
public Job360 setTotalDiscountAmount(BigDecimal value) { this.TotalDiscountAmount = value; return this; }
public String getSerialNumber() { return SerialNumber; }
public Job360 setSerialNumber(String value) { this.SerialNumber = value; return this; }
public String getCondition() { return Condition; }
public Job360 setCondition(String value) { this.Condition = value; return this; }
}
@DataContract
public static class Contract360
{
@DataMember
public String Id = null;
@DataMember
public Date PaymentDate = null;
@DataMember
public Integer StoreLocationId = null;
@DataMember
public BigDecimal AmountDue = null;
@DataMember
public BigDecimal LateFee = null;
@DataMember
public String ContractStatus = null;
@DataMember
public BigDecimal Amount = null;
@DataMember
public ArrayList<Item360> ContractItems = null;
public String getId() { return Id; }
public Contract360 setId(String value) { this.Id = value; return this; }
public Date getPaymentDate() { return PaymentDate; }
public Contract360 setPaymentDate(Date value) { this.PaymentDate = value; return this; }
public Integer getStoreLocationId() { return StoreLocationId; }
public Contract360 setStoreLocationId(Integer value) { this.StoreLocationId = value; return this; }
public BigDecimal getAmountDue() { return AmountDue; }
public Contract360 setAmountDue(BigDecimal value) { this.AmountDue = value; return this; }
public BigDecimal getLateFee() { return LateFee; }
public Contract360 setLateFee(BigDecimal value) { this.LateFee = value; return this; }
public String getContractStatus() { return ContractStatus; }
public Contract360 setContractStatus(String value) { this.ContractStatus = value; return this; }
public BigDecimal getAmount() { return Amount; }
public Contract360 setAmount(BigDecimal value) { this.Amount = value; return this; }
public ArrayList<Item360> getContractItems() { return ContractItems; }
public Contract360 setContractItems(ArrayList<Item360> value) { this.ContractItems = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/History360 HTTP/1.1 Host: active-ewebservice.biz Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Invoices":[{"Id":"String","DueDate":"0001-01-01T00:00:00.0000000","Total":0,"Status":"String","AmountPaid":0,"LateFeeAmount":0,"StoreLocationId":0,"Items":[{"PslrId":0,"Quantity":0,"Price":0,"TotalDiscountAmount":0,"SerialNumber":"String","Condition":"String"}]}],"Orders":[{"Id":0,"Discount":0,"PaymentType":"String","SubTotal":0,"Tax":0,"ShippingAmount":0,"Total":0}],"WorkOrders":[{"Id":"String","Status":"String","Deposit":0,"StoreLocationId":0,"CompletedDate":"0001-01-01T00:00:00.0000000","Price":0,"Jobs":[{"ItemId":"String","ItemType":"String","Title":"String","Quantity":0,"Price":0,"TotalDiscountAmount":0,"SerialNumber":"String","Condition":"String"}]}],"Contracts":[{"Id":"String","StoreLocationId":0,"AmountDue":0,"LateFee":0,"ContractStatus":"String","Amount":0,"ContractItems":[{"PslrId":0,"Quantity":0,"Price":0,"TotalDiscountAmount":0,"SerialNumber":"String","Condition":"String"}]}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}