| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| POST | /Webshop/Variant/Restock |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class WebshopVariantRestockRequest
{
public Integer variantId = null;
public String kind = null;
public Integer quantity = null;
public String note = null;
public String idempotencyKey = null;
public Integer ownerId = null;
public Integer getVariantId() { return variantId; }
public WebshopVariantRestockRequest setVariantId(Integer value) { this.variantId = value; return this; }
public String getKind() { return kind; }
public WebshopVariantRestockRequest setKind(String value) { this.kind = value; return this; }
public Integer getQuantity() { return quantity; }
public WebshopVariantRestockRequest setQuantity(Integer value) { this.quantity = value; return this; }
public String getNote() { return note; }
public WebshopVariantRestockRequest setNote(String value) { this.note = value; return this; }
public String getIdempotencyKey() { return idempotencyKey; }
public WebshopVariantRestockRequest setIdempotencyKey(String value) { this.idempotencyKey = value; return this; }
public Integer getOwnerId() { return ownerId; }
public WebshopVariantRestockRequest setOwnerId(Integer value) { this.ownerId = 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 WebshopVariantRestockRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Webshop/Variant/Restock HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<WebshopVariantRestockRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<IdempotencyKey>String</IdempotencyKey>
<Kind>String</Kind>
<Note>String</Note>
<OwnerId>0</OwnerId>
<Quantity>0</Quantity>
<VariantId>0</VariantId>
</WebshopVariantRestockRequest>
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>