| GET, POST | /searchCart |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class SearchCart
{
@DataMember
public String q = null;
@DataMember
public UUID tokenId = null;
public String getQ() { return q; }
public SearchCart setQ(String value) { this.q = value; return this; }
public UUID getTokenId() { return tokenId; }
public SearchCart setTokenId(UUID value) { this.tokenId = value; return this; }
}
@DataContract
public static class SearchCartResponse
{
@DataMember
public ResponseStatus responseStatus = null;
@DataMember
public ArrayList<CartItemModel> result = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public SearchCartResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
public ArrayList<CartItemModel> getResult() { return result; }
public SearchCartResponse setResult(ArrayList<CartItemModel> value) { this.result = value; return this; }
}
@DataContract
public static class CartItemModel
{
@DataMember
public UUID supplierAliasId = null;
@DataMember
public UUID orderItemId = null;
@DataMember
public String manufacturerTitle = null;
@DataMember
public UUID productId = null;
@DataMember
public String productNumber = null;
@DataMember
public String productTitle = null;
@DataMember
public Integer quantity = null;
@DataMember
public Integer pack = null;
@DataMember
public BigDecimal price = null;
@DataMember
public String comment = null;
@DataMember
public String priceListLogo = null;
@DataMember
public String delivery = null;
@DataMember
public Integer expectedDeliveryDays = null;
@DataMember
public Integer guaranteedDeliveryDays = null;
@DataMember
public Boolean isCash = null;
@DataMember
public Boolean useSchedule = null;
@DataMember
public Date deliveryDate = null;
@DataMember
public Date orderDate = null;
@DataMember
public Date date = null;
@DataMember
public OrderItemState state = null;
@DataMember
public String stateTitle = null;
@DataMember
public Long globalId = null;
public UUID getSupplierAliasId() { return supplierAliasId; }
public CartItemModel setSupplierAliasId(UUID value) { this.supplierAliasId = value; return this; }
public UUID getOrderItemId() { return orderItemId; }
public CartItemModel setOrderItemId(UUID value) { this.orderItemId = value; return this; }
public String getManufacturerTitle() { return manufacturerTitle; }
public CartItemModel setManufacturerTitle(String value) { this.manufacturerTitle = value; return this; }
public UUID getProductId() { return productId; }
public CartItemModel setProductId(UUID value) { this.productId = value; return this; }
public String getProductNumber() { return productNumber; }
public CartItemModel setProductNumber(String value) { this.productNumber = value; return this; }
public String getProductTitle() { return productTitle; }
public CartItemModel setProductTitle(String value) { this.productTitle = value; return this; }
public Integer getQuantity() { return quantity; }
public CartItemModel setQuantity(Integer value) { this.quantity = value; return this; }
public Integer getPack() { return pack; }
public CartItemModel setPack(Integer value) { this.pack = value; return this; }
public BigDecimal getPrice() { return price; }
public CartItemModel setPrice(BigDecimal value) { this.price = value; return this; }
public String getComment() { return comment; }
public CartItemModel setComment(String value) { this.comment = value; return this; }
public String getPriceListLogo() { return priceListLogo; }
public CartItemModel setPriceListLogo(String value) { this.priceListLogo = value; return this; }
public String getDelivery() { return delivery; }
public CartItemModel setDelivery(String value) { this.delivery = value; return this; }
public Integer getExpectedDeliveryDays() { return expectedDeliveryDays; }
public CartItemModel setExpectedDeliveryDays(Integer value) { this.expectedDeliveryDays = value; return this; }
public Integer getGuaranteedDeliveryDays() { return guaranteedDeliveryDays; }
public CartItemModel setGuaranteedDeliveryDays(Integer value) { this.guaranteedDeliveryDays = value; return this; }
public Boolean getIsCash() { return isCash; }
public CartItemModel setIsCash(Boolean value) { this.isCash = value; return this; }
public Boolean isUseSchedule() { return useSchedule; }
public CartItemModel setUseSchedule(Boolean value) { this.useSchedule = value; return this; }
public Date getDeliveryDate() { return deliveryDate; }
public CartItemModel setDeliveryDate(Date value) { this.deliveryDate = value; return this; }
public Date getOrderDate() { return orderDate; }
public CartItemModel setOrderDate(Date value) { this.orderDate = value; return this; }
public Date getDate() { return date; }
public CartItemModel setDate(Date value) { this.date = value; return this; }
public OrderItemState getState() { return state; }
public CartItemModel setState(OrderItemState value) { this.state = value; return this; }
public String getStateTitle() { return stateTitle; }
public CartItemModel setStateTitle(String value) { this.stateTitle = value; return this; }
public Long getGlobalId() { return globalId; }
public CartItemModel setGlobalId(Long value) { this.globalId = value; return this; }
}
public static enum OrderItemState
{
Undefined,
Sold,
Refused,
InOrder,
InSupplierCart,
Purchased,
NotDistributed,
InCart,
Ready,
Distributed,
SupplierRefused,
Archived,
GivingOutScan,
InProcessing,
Return,
Returned,
RefusedByClient,
PurchasedBySupplier,
InParentCart,
InSupplierWebCart,
WorkInSupplierWebCart,
Deficit;
}
}
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /searchCart HTTP/1.1
Host: api.oszz.ru
Accept: application/json
Content-Type: application/json
Content-Length: length
{"q":"String","tokenId":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"result":[{"supplierAliasId":"00000000000000000000000000000000","orderItemId":"00000000000000000000000000000000","manufacturerTitle":"String","productId":"00000000000000000000000000000000","productNumber":"String","productTitle":"String","quantity":0,"pack":0,"price":0,"comment":"String","priceListLogo":"String","delivery":"String","expectedDeliveryDays":0,"guaranteedDeliveryDays":0,"isCash":false,"useSchedule":false,"deliveryDate":"0001-01-01 00:00:00","orderDate":"0001-01-01 00:00:00","date":"0001-01-01 00:00:00","state":"Undefined","stateTitle":"String","globalId":0}]}