OSZZ API

<back to all web services

AddToCart

import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @DataContract
    public static class AddToCart
    {
        @DataMember
        public Boolean isCash = null;

        @DataMember
        public UUID priceListId = null;

        @DataMember
        public String code = null;

        @DataMember
        public String delivery = null;

        @DataMember
        public UUID productId = null;

        @DataMember
        public Integer quantity = null;

        @DataMember
        public String comment = null;

        @DataMember
        public UUID tokenId = null;
        
        public Boolean getIsCash() { return isCash; }
        public AddToCart setIsCash(Boolean value) { this.isCash = value; return this; }
        public UUID getPriceListId() { return priceListId; }
        public AddToCart setPriceListId(UUID value) { this.priceListId = value; return this; }
        public String getCode() { return code; }
        public AddToCart setCode(String value) { this.code = value; return this; }
        public String getDelivery() { return delivery; }
        public AddToCart setDelivery(String value) { this.delivery = value; return this; }
        public UUID getProductId() { return productId; }
        public AddToCart setProductId(UUID value) { this.productId = value; return this; }
        public Integer getQuantity() { return quantity; }
        public AddToCart setQuantity(Integer value) { this.quantity = value; return this; }
        public String getComment() { return comment; }
        public AddToCart setComment(String value) { this.comment = value; return this; }
        public UUID getTokenId() { return tokenId; }
        public AddToCart setTokenId(UUID value) { this.tokenId = value; return this; }
    }

    @DataContract
    public static class AddToCartResponse
    {
        @DataMember
        public ResponseStatus responseStatus = null;

        @DataMember
        public CartItemModel result = null;
        
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public AddToCartResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
        public CartItemModel getResult() { return result; }
        public AddToCartResponse setResult(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;
    }

}

Java AddToCart DTOs

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

HTTP + SOAP12

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

POST /soap12 HTTP/1.1 
Host: api.oszz.ru 
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>

<AddToCart xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Code>String</Code>
  <Comment>String</Comment>
  <Delivery>String</Delivery>
  <IsCash>false</IsCash>
  <PriceListId>00000000-0000-0000-0000-000000000000</PriceListId>
  <ProductId>00000000-0000-0000-0000-000000000000</ProductId>
  <Quantity>0</Quantity>
  <TokenId>00000000-0000-0000-0000-000000000000</TokenId>
</AddToCart>

    </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>

<AddToCartResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ResponseStatus>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StackTrace>String</StackTrace>
    <Errors>
      <ResponseError>
        <ErrorCode>String</ErrorCode>
        <FieldName>String</FieldName>
        <Message>String</Message>
        <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Meta>
      </ResponseError>
    </Errors>
    <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Meta>
  </ResponseStatus>
  <Result>
    <Comment>String</Comment>
    <Date>0001-01-01T00:00:00</Date>
    <Delivery>String</Delivery>
    <DeliveryDate>0001-01-01T00:00:00</DeliveryDate>
    <ExpectedDeliveryDays>0</ExpectedDeliveryDays>
    <GlobalId>0</GlobalId>
    <GuaranteedDeliveryDays>0</GuaranteedDeliveryDays>
    <IsCash>false</IsCash>
    <ManufacturerTitle>String</ManufacturerTitle>
    <OrderDate>0001-01-01T00:00:00</OrderDate>
    <OrderItemId>00000000-0000-0000-0000-000000000000</OrderItemId>
    <Pack>0</Pack>
    <Price>0</Price>
    <PriceListLogo>String</PriceListLogo>
    <ProductId>00000000-0000-0000-0000-000000000000</ProductId>
    <ProductNumber>String</ProductNumber>
    <ProductTitle>String</ProductTitle>
    <Quantity>0</Quantity>
    <State>Undefined</State>
    <StateTitle>String</StateTitle>
    <SupplierAliasId>00000000-0000-0000-0000-000000000000</SupplierAliasId>
    <UseSchedule>false</UseSchedule>
  </Result>
</AddToCartResponse>

    </soap12:Body>
</soap12:Envelope>