| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
| POST | /Webshop/Order/Preview |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using TicketUserServices.ServiceModel;
namespace TicketUserServices.ServiceModel
{
public partial class DiscountSummary
{
public virtual string Type { get; set; }
public virtual decimal Value { get; set; }
}
public partial class LocalizedMessage
{
public virtual string Is { get; set; }
public virtual string En { get; set; }
}
public partial class OrderTender
{
public virtual string Kind { get; set; }
public virtual string Code { get; set; }
public virtual int? AmountMinor { get; set; }
public virtual string IdempotencyKey { get; set; }
public virtual int? HoldId { get; set; }
public virtual int? AppliedMinor { get; set; }
}
public partial class WebshopOrderPreviewRequest
{
public WebshopOrderPreviewRequest()
{
Lines = new List<WebshopPurchaseLine>{};
Tenders = new List<OrderTender>{};
}
public virtual int OwnerId { get; set; }
public virtual string ExternalId { get; set; }
public virtual List<WebshopPurchaseLine> Lines { get; set; }
public virtual string DeliveryType { get; set; }
public virtual string DiscountCode { get; set; }
public virtual string BuyerPhone { get; set; }
public virtual List<OrderTender> Tenders { get; set; }
}
public partial class WebshopOrderPreviewResult
{
public WebshopOrderPreviewResult()
{
Lines = new List<WebshopPreviewLine>{};
Tenders = new List<WebshopPreviewTender>{};
}
public virtual int StatusCode { get; set; }
public virtual bool Success { get; set; }
public virtual LocalizedMessage Message { get; set; }
public virtual string Reason { get; set; }
public virtual List<WebshopPreviewLine> Lines { get; set; }
public virtual int SubtotalMinor { get; set; }
public virtual int DeliveryFeeMinor { get; set; }
public virtual int DiscountMinor { get; set; }
public virtual int GiftAppliedMinor { get; set; }
public virtual int CardRemainderMinor { get; set; }
public virtual List<WebshopPreviewTender> Tenders { get; set; }
public virtual DiscountSummary Discount { get; set; }
}
public partial class WebshopPreviewLine
{
public virtual int VariantId { get; set; }
public virtual int ProductId { get; set; }
public virtual string ProductName { get; set; }
public virtual string Size { get; set; }
public virtual string Color { get; set; }
public virtual int Quantity { get; set; }
public virtual int UnitBeforeMinor { get; set; }
public virtual int UnitAfterMinor { get; set; }
public virtual int LineBeforeMinor { get; set; }
public virtual int LineAfterMinor { get; set; }
public virtual bool Discounted { get; set; }
}
public partial class WebshopPreviewTender
{
public virtual string Code { get; set; }
public virtual int AppliedMinor { get; set; }
public virtual bool Ok { get; set; }
public virtual string Reason { get; set; }
public virtual LocalizedMessage Message { get; set; }
}
public partial class WebshopPurchaseLine
{
public virtual int VariantId { get; set; }
public virtual int Quantity { get; set; }
}
}
C# WebshopOrderPreviewRequest 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/Order/Preview HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<WebshopOrderPreviewRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<BuyerPhone>String</BuyerPhone>
<DeliveryType>String</DeliveryType>
<DiscountCode>String</DiscountCode>
<ExternalId>String</ExternalId>
<Lines>
<WebshopPurchaseLine>
<Quantity>0</Quantity>
<VariantId>0</VariantId>
</WebshopPurchaseLine>
</Lines>
<OwnerId>0</OwnerId>
<Tenders>
<OrderTender>
<AmountMinor>0</AmountMinor>
<AppliedMinor>0</AppliedMinor>
<Code>String</Code>
<HoldId>0</HoldId>
<IdempotencyKey>String</IdempotencyKey>
<Kind>String</Kind>
</OrderTender>
</Tenders>
</WebshopOrderPreviewRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<WebshopOrderPreviewResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<CardRemainderMinor>0</CardRemainderMinor>
<DeliveryFeeMinor>0</DeliveryFeeMinor>
<Discount>
<Type>String</Type>
<Value>0</Value>
</Discount>
<DiscountMinor>0</DiscountMinor>
<GiftAppliedMinor>0</GiftAppliedMinor>
<Lines>
<WebshopPreviewLine>
<Color>String</Color>
<Discounted>false</Discounted>
<LineAfterMinor>0</LineAfterMinor>
<LineBeforeMinor>0</LineBeforeMinor>
<ProductId>0</ProductId>
<ProductName>String</ProductName>
<Quantity>0</Quantity>
<Size>String</Size>
<UnitAfterMinor>0</UnitAfterMinor>
<UnitBeforeMinor>0</UnitBeforeMinor>
<VariantId>0</VariantId>
</WebshopPreviewLine>
</Lines>
<Message>
<En>String</En>
<Is>String</Is>
</Message>
<Reason>String</Reason>
<StatusCode>0</StatusCode>
<SubtotalMinor>0</SubtotalMinor>
<Success>false</Success>
<Tenders>
<WebshopPreviewTender>
<AppliedMinor>0</AppliedMinor>
<Code>String</Code>
<Message>
<En>String</En>
<Is>String</Is>
</Message>
<Ok>false</Ok>
<Reason>String</Reason>
</WebshopPreviewTender>
</Tenders>
</WebshopOrderPreviewResult>