TicketUserServices

<back to all web services

WebshopVariantRestockRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequired permission:Tickets.Add
The following routes are available for this service:
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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{"variantId":0,"kind":"String","quantity":0,"note":"String","idempotencyKey":"String","ownerId":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"variant":{"id":0,"productId":0,"size":"String","color":"String","stockOnHand":0,"quantitySold":0,"availableQuantity":0,"status":"String"},"statusCode":0,"message":"String"}