Trendsic Platform Service

<back to all web services

OrderLinesRequest

The following routes are available for this service:
POST,PUT,DELETE,OPTIONS/v1/OrderLines
GET/v1/OrderLines/OrderHeaders/{OrderHeaderUID}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class OrderLinesRequest
    {
        public UUID OrderHeaderUID = null;
        public ArrayList<OrderLine> OrderLines = new ArrayList<OrderLine>();
        
        public UUID getOrderHeaderUID() { return OrderHeaderUID; }
        public OrderLinesRequest setOrderHeaderUID(UUID value) { this.OrderHeaderUID = value; return this; }
        public ArrayList<OrderLine> getOrderLines() { return OrderLines; }
        public OrderLinesRequest setOrderLines(ArrayList<OrderLine> value) { this.OrderLines = value; return this; }
    }

    public static class OrderLine
    {
        public Integer ID = null;
        public UUID OrderHeaderID = null;
        public Short OrderLineNumber = null;
        public Short ProductID = null;
        public String StripeProductId = null;
        public Short ProductCategory = null;
        public Short ProductSubCategory = null;
        public Short Quantity = null;
        public BigDecimal TotalOrderLineCost = null;
        public BigDecimal ProductCost = null;
        public BigDecimal PerUnitProductCost = null;
        public BigDecimal OrderLineTax = null;
        public BigDecimal OrderLineShippingCost = null;
        public BigDecimal PerUnitShippingCost = null;
        public Short OrderLineStatusID = null;
        public Short ShipMethodID = null;
        public Date EstimatedShipDate = null;
        public Date EstimatedDeliveryDate = null;
        public Date ActualShipDate = null;
        public Date ActualDeliveryDate = null;
        public Date OrderLineCreatedDate = null;
        public Date OrderLineModifiedDate = null;
        public UUID UID = null;
        public String ProductName = null;
        public Integer AgentId = null;
        public String Street = null;
        public String City = null;
        public String State = null;
        public String Zip = null;
        public String PhoneNumber = null;
        public Integer AddressId = null;
        public String ShippingAddress = null;
        public String FullName = null;
        
        public Integer getId() { return ID; }
        public OrderLine setId(Integer value) { this.ID = value; return this; }
        public UUID getOrderHeaderID() { return OrderHeaderID; }
        public OrderLine setOrderHeaderID(UUID value) { this.OrderHeaderID = value; return this; }
        public Short getOrderLineNumber() { return OrderLineNumber; }
        public OrderLine setOrderLineNumber(Short value) { this.OrderLineNumber = value; return this; }
        public Short getProductID() { return ProductID; }
        public OrderLine setProductID(Short value) { this.ProductID = value; return this; }
        public String getStripeProductId() { return StripeProductId; }
        public OrderLine setStripeProductId(String value) { this.StripeProductId = value; return this; }
        public Short getProductCategory() { return ProductCategory; }
        public OrderLine setProductCategory(Short value) { this.ProductCategory = value; return this; }
        public Short getProductSubCategory() { return ProductSubCategory; }
        public OrderLine setProductSubCategory(Short value) { this.ProductSubCategory = value; return this; }
        public Short getQuantity() { return Quantity; }
        public OrderLine setQuantity(Short value) { this.Quantity = value; return this; }
        public BigDecimal getTotalOrderLineCost() { return TotalOrderLineCost; }
        public OrderLine setTotalOrderLineCost(BigDecimal value) { this.TotalOrderLineCost = value; return this; }
        public BigDecimal getProductCost() { return ProductCost; }
        public OrderLine setProductCost(BigDecimal value) { this.ProductCost = value; return this; }
        public BigDecimal getPerUnitProductCost() { return PerUnitProductCost; }
        public OrderLine setPerUnitProductCost(BigDecimal value) { this.PerUnitProductCost = value; return this; }
        public BigDecimal getOrderLineTax() { return OrderLineTax; }
        public OrderLine setOrderLineTax(BigDecimal value) { this.OrderLineTax = value; return this; }
        public BigDecimal getOrderLineShippingCost() { return OrderLineShippingCost; }
        public OrderLine setOrderLineShippingCost(BigDecimal value) { this.OrderLineShippingCost = value; return this; }
        public BigDecimal getPerUnitShippingCost() { return PerUnitShippingCost; }
        public OrderLine setPerUnitShippingCost(BigDecimal value) { this.PerUnitShippingCost = value; return this; }
        public Short getOrderLineStatusID() { return OrderLineStatusID; }
        public OrderLine setOrderLineStatusID(Short value) { this.OrderLineStatusID = value; return this; }
        public Short getShipMethodID() { return ShipMethodID; }
        public OrderLine setShipMethodID(Short value) { this.ShipMethodID = value; return this; }
        public Date getEstimatedShipDate() { return EstimatedShipDate; }
        public OrderLine setEstimatedShipDate(Date value) { this.EstimatedShipDate = value; return this; }
        public Date getEstimatedDeliveryDate() { return EstimatedDeliveryDate; }
        public OrderLine setEstimatedDeliveryDate(Date value) { this.EstimatedDeliveryDate = value; return this; }
        public Date getActualShipDate() { return ActualShipDate; }
        public OrderLine setActualShipDate(Date value) { this.ActualShipDate = value; return this; }
        public Date getActualDeliveryDate() { return ActualDeliveryDate; }
        public OrderLine setActualDeliveryDate(Date value) { this.ActualDeliveryDate = value; return this; }
        public Date getOrderLineCreatedDate() { return OrderLineCreatedDate; }
        public OrderLine setOrderLineCreatedDate(Date value) { this.OrderLineCreatedDate = value; return this; }
        public Date getOrderLineModifiedDate() { return OrderLineModifiedDate; }
        public OrderLine setOrderLineModifiedDate(Date value) { this.OrderLineModifiedDate = value; return this; }
        public UUID getUid() { return UID; }
        public OrderLine setUid(UUID value) { this.UID = value; return this; }
        public String getProductName() { return ProductName; }
        public OrderLine setProductName(String value) { this.ProductName = value; return this; }
        public Integer getAgentId() { return AgentId; }
        public OrderLine setAgentId(Integer value) { this.AgentId = value; return this; }
        public String getStreet() { return Street; }
        public OrderLine setStreet(String value) { this.Street = value; return this; }
        public String getCity() { return City; }
        public OrderLine setCity(String value) { this.City = value; return this; }
        public String getState() { return State; }
        public OrderLine setState(String value) { this.State = value; return this; }
        public String getZip() { return Zip; }
        public OrderLine setZip(String value) { this.Zip = value; return this; }
        public String getPhoneNumber() { return PhoneNumber; }
        public OrderLine setPhoneNumber(String value) { this.PhoneNumber = value; return this; }
        public Integer getAddressId() { return AddressId; }
        public OrderLine setAddressId(Integer value) { this.AddressId = value; return this; }
        public String getShippingAddress() { return ShippingAddress; }
        public OrderLine setShippingAddress(String value) { this.ShippingAddress = value; return this; }
        public String getFullName() { return FullName; }
        public OrderLine setFullName(String value) { this.FullName = value; return this; }
    }

    public static class OrderLinesResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ArrayList<OrderLine> OrderLines = new ArrayList<OrderLine>();
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public OrderLinesResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ArrayList<OrderLine> getOrderLines() { return OrderLines; }
        public OrderLinesResponse setOrderLines(ArrayList<OrderLine> value) { this.OrderLines = value; return this; }
    }

}

Java OrderLinesRequest DTOs

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

HTTP + CSV

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

POST /v1/OrderLines HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"OrderHeaderUID":"00000000000000000000000000000000","OrderLines":[{"ID":0,"OrderHeaderID":"00000000000000000000000000000000","OrderLineNumber":0,"ProductID":0,"StripeProductId":"String","ProductCategory":0,"ProductSubCategory":0,"Quantity":0,"TotalOrderLineCost":0,"ProductCost":0,"PerUnitProductCost":0,"OrderLineTax":0,"OrderLineShippingCost":0,"PerUnitShippingCost":0,"OrderLineStatusID":0,"ShipMethodID":0,"EstimatedShipDate":"0001-01-01T00:00:00.0000000","EstimatedDeliveryDate":"0001-01-01T00:00:00.0000000","ActualShipDate":"0001-01-01T00:00:00.0000000","ActualDeliveryDate":"0001-01-01T00:00:00.0000000","OrderLineCreatedDate":"0001-01-01T00:00:00.0000000","OrderLineModifiedDate":"0001-01-01T00:00:00.0000000","UID":"00000000000000000000000000000000","ProductName":"String","AgentId":0,"Street":"String","City":"String","State":"String","Zip":"String","PhoneNumber":"String","AddressId":0,"ShippingAddress":"String","FullName":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"OrderLines":[{"ID":0,"OrderHeaderID":"00000000000000000000000000000000","OrderLineNumber":0,"ProductID":0,"StripeProductId":"String","ProductCategory":0,"ProductSubCategory":0,"Quantity":0,"TotalOrderLineCost":0,"ProductCost":0,"PerUnitProductCost":0,"OrderLineTax":0,"OrderLineShippingCost":0,"PerUnitShippingCost":0,"OrderLineStatusID":0,"ShipMethodID":0,"EstimatedShipDate":"0001-01-01T00:00:00.0000000","EstimatedDeliveryDate":"0001-01-01T00:00:00.0000000","ActualShipDate":"0001-01-01T00:00:00.0000000","ActualDeliveryDate":"0001-01-01T00:00:00.0000000","OrderLineCreatedDate":"0001-01-01T00:00:00.0000000","OrderLineModifiedDate":"0001-01-01T00:00:00.0000000","UID":"00000000000000000000000000000000","ProductName":"String","AgentId":0,"Street":"String","City":"String","State":"String","Zip":"String","PhoneNumber":"String","AddressId":0,"ShippingAddress":"String","FullName":"String"}]}