| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
| GET POST | /ticketOrder/CalculatePrices |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using TicketUserServices.ServiceModel;
using TicketUserServices.ServiceModel.Types;
namespace TicketUserServices.ServiceModel
{
public partial class CalculateDiscountPricesRequest
{
public CalculateDiscountPricesRequest()
{
OrderDetails = new List<TicketDetails>{};
}
public virtual string DiscountCode { get; set; }
public virtual string FullPhoneNumber { get; set; }
public virtual int? EventId { get; set; }
public virtual List<TicketDetails> OrderDetails { get; set; }
}
public partial class CalculateDiscountPricesResult
{
public CalculateDiscountPricesResult()
{
OrderDetails = new List<TicketDetails>{};
}
public virtual List<TicketDetails> OrderDetails { get; set; }
public virtual int StatusCode { get; set; }
public virtual string Message { get; set; }
}
}
namespace TicketUserServices.ServiceModel.Types
{
public partial class TicketDetails
{
public virtual int ID { get; set; }
public virtual int TicketId { get; set; }
public virtual int? EventSeriesTicketType { get; set; }
public virtual int? EventSeriesOwnerTicketType { get; set; }
public virtual decimal TicketPrice { get; set; }
public virtual decimal TotalPrice { get; set; }
public virtual int Count { get; set; }
public virtual string TicketColor { get; set; }
public virtual bool? ShowUsedTickets { get; set; }
public virtual string TicketName { get; set; }
public virtual string TicketDisplayString { get; set; }
public virtual int? TicketDetailsTransferredFrom { get; set; }
public virtual int? TeamPassId { get; set; }
public virtual bool? IsSpecialTicket { get; set; }
public virtual string SpecialTicketId { get; set; }
public virtual bool? JustChangedBySQL { get; set; }
public virtual DateTime? SQLJustChangedTimeStamp { get; set; }
public virtual string Currency { get; set; }
public virtual string DiscountCode { get; set; }
public virtual decimal? TotalDiscount { get; set; }
public virtual decimal? TotalAmountBeforeDiscount { get; set; }
public virtual decimal? TicketPriceBeforeDiscount { get; set; }
}
}
C# CalculateDiscountPricesRequest 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.
POST /ticketOrder/CalculatePrices HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
discountCode: String,
fullPhoneNumber: String,
eventId: 0,
orderDetails:
[
{
id: 0,
ticketId: 0,
eventSeriesTicketType: 0,
eventSeriesOwnerTicketType: 0,
ticketPrice: 0,
totalPrice: 0,
count: 0,
ticketColor: String,
showUsedTickets: False,
ticketName: String,
ticketDisplayString: String,
ticketDetailsTransferredFrom: 0,
teamPassId: 0,
isSpecialTicket: False,
specialTicketId: String,
justChangedBySQL: False,
sqlJustChangedTimeStamp: 0001-01-01,
currency: String,
discountCode: String,
totalDiscount: 0,
totalAmountBeforeDiscount: 0,
ticketPriceBeforeDiscount: 0
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
orderDetails:
[
{
id: 0,
ticketId: 0,
eventSeriesTicketType: 0,
eventSeriesOwnerTicketType: 0,
ticketPrice: 0,
totalPrice: 0,
count: 0,
ticketColor: String,
showUsedTickets: False,
ticketName: String,
ticketDisplayString: String,
ticketDetailsTransferredFrom: 0,
teamPassId: 0,
isSpecialTicket: False,
specialTicketId: String,
justChangedBySQL: False,
sqlJustChangedTimeStamp: 0001-01-01,
currency: String,
discountCode: String,
totalDiscount: 0,
totalAmountBeforeDiscount: 0,
ticketPriceBeforeDiscount: 0
}
],
statusCode: 0,
message: String
}