| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| 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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
item:
{
id: 0,
productId: 0,
size: String,
color: String,
stockOnHand: 0,
quantitySold: 0,
status: String,
version: 0,
legacyDetailId: 0,
createdAt: 0001-01-01,
updatedAt: 0001-01-01
},
ownerId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
variant:
{
id: 0,
productId: 0,
size: String,
color: String,
stockOnHand: 0,
quantitySold: 0,
availableQuantity: 0,
status: String
},
statusCode: 0,
message: String
}