TicketUserServices

<back to all web services

WebshopVariantUpdateRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequired permission:Tickets.Add
The following routes are available for this service:
PUT/Webshop/Variant
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class WebshopVariantUpdateRequest
    {
        public WebshopProductVariant item = null;
        public Integer ownerId = null;
        
        public WebshopProductVariant getItem() { return item; }
        public WebshopVariantUpdateRequest setItem(WebshopProductVariant value) { this.item = value; return this; }
        public Integer getOwnerId() { return ownerId; }
        public WebshopVariantUpdateRequest setOwnerId(Integer value) { this.ownerId = value; return this; }
    }

    public static class WebshopProductVariant
    {
        public Integer id = null;
        public Integer productId = null;
        @StringLength(50)
        public String size = null;

        @StringLength(50)
        public String color = null;

        public Integer stockOnHand = null;
        public Integer quantitySold = null;
        @StringLength(20)
        public String status = null;

        public Integer version = null;
        public Integer legacyDetailId = null;
        public Date createdAt = null;
        public Date updatedAt = null;
        
        public Integer getId() { return id; }
        public WebshopProductVariant setId(Integer value) { this.id = value; return this; }
        public Integer getProductId() { return productId; }
        public WebshopProductVariant setProductId(Integer value) { this.productId = value; return this; }
        public String getSize() { return size; }
        public WebshopProductVariant setSize(String value) { this.size = value; return this; }
        public String getColor() { return color; }
        public WebshopProductVariant setColor(String value) { this.color = value; return this; }
        public Integer getStockOnHand() { return stockOnHand; }
        public WebshopProductVariant setStockOnHand(Integer value) { this.stockOnHand = value; return this; }
        public Integer getQuantitySold() { return quantitySold; }
        public WebshopProductVariant setQuantitySold(Integer value) { this.quantitySold = value; return this; }
        public String getStatus() { return status; }
        public WebshopProductVariant setStatus(String value) { this.status = value; return this; }
        public Integer getVersion() { return version; }
        public WebshopProductVariant setVersion(Integer value) { this.version = value; return this; }
        public Integer getLegacyDetailId() { return legacyDetailId; }
        public WebshopProductVariant setLegacyDetailId(Integer value) { this.legacyDetailId = value; return this; }
        public Date getCreatedAt() { return createdAt; }
        public WebshopProductVariant setCreatedAt(Date value) { this.createdAt = value; return this; }
        public Date getUpdatedAt() { return updatedAt; }
        public WebshopProductVariant setUpdatedAt(Date value) { this.updatedAt = value; return this; }
    }

    public static class WebshopVariantResult
    {
        public WebshopVariantSummary variant = null;
        public Integer statusCode = null;
        public String message = null;
        
        public WebshopVariantSummary getVariant() { return variant; }
        public WebshopVariantResult setVariant(WebshopVariantSummary value) { this.variant = value; return this; }
        public Integer getStatusCode() { return statusCode; }
        public WebshopVariantResult setStatusCode(Integer value) { this.statusCode = value; return this; }
        public String getMessage() { return message; }
        public WebshopVariantResult setMessage(String value) { this.message = value; return this; }
    }

    public static class WebshopVariantSummary
    {
        public Integer id = null;
        public Integer productId = null;
        public String size = null;
        public String color = null;
        public Integer stockOnHand = null;
        public Integer quantitySold = null;
        public Integer availableQuantity = null;
        public String status = null;
        
        public Integer getId() { return id; }
        public WebshopVariantSummary setId(Integer value) { this.id = value; return this; }
        public Integer getProductId() { return productId; }
        public WebshopVariantSummary setProductId(Integer value) { this.productId = value; return this; }
        public String getSize() { return size; }
        public WebshopVariantSummary setSize(String value) { this.size = value; return this; }
        public String getColor() { return color; }
        public WebshopVariantSummary setColor(String value) { this.color = value; return this; }
        public Integer getStockOnHand() { return stockOnHand; }
        public WebshopVariantSummary setStockOnHand(Integer value) { this.stockOnHand = value; return this; }
        public Integer getQuantitySold() { return quantitySold; }
        public WebshopVariantSummary setQuantitySold(Integer value) { this.quantitySold = value; return this; }
        public Integer getAvailableQuantity() { return availableQuantity; }
        public WebshopVariantSummary setAvailableQuantity(Integer value) { this.availableQuantity = value; return this; }
        public String getStatus() { return status; }
        public WebshopVariantSummary setStatus(String value) { this.status = value; return this; }
    }

}

Java WebshopVariantUpdateRequest DTOs

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

HTTP + XML

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

PUT /Webshop/Variant HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<WebshopVariantUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Item xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types">
    <d2p1:Color>String</d2p1:Color>
    <d2p1:CreatedAt>0001-01-01T00:00:00</d2p1:CreatedAt>
    <d2p1:ID>0</d2p1:ID>
    <d2p1:LegacyDetailId>0</d2p1:LegacyDetailId>
    <d2p1:ProductId>0</d2p1:ProductId>
    <d2p1:QuantitySold>0</d2p1:QuantitySold>
    <d2p1:Size>String</d2p1:Size>
    <d2p1:Status>String</d2p1:Status>
    <d2p1:StockOnHand>0</d2p1:StockOnHand>
    <d2p1:UpdatedAt>0001-01-01T00:00:00</d2p1:UpdatedAt>
    <d2p1:Version>0</d2p1:Version>
  </Item>
  <OwnerId>0</OwnerId>
</WebshopVariantUpdateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<WebshopVariantResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Message>String</Message>
  <StatusCode>0</StatusCode>
  <Variant>
    <AvailableQuantity>0</AvailableQuantity>
    <Color>String</Color>
    <ID>0</ID>
    <ProductId>0</ProductId>
    <QuantitySold>0</QuantitySold>
    <Size>String</Size>
    <Status>String</Status>
    <StockOnHand>0</StockOnHand>
  </Variant>
</WebshopVariantResult>