| Requires any of the roles: | Admin, TeamAdmin, MobileApp, Admin, TeamAdmin, MobileApp | Requires any of the permissions: | ReadData, ReadData |
| POST | /OrderOwnerCards/previewDiscount |
|---|
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 DiscountLineResult
{
public virtual int? TicketTypeId { get; set; }
public virtual int Count { get; set; }
public virtual bool Applied { get; set; }
public virtual decimal UnitBefore { get; set; }
public virtual decimal UnitAfter { get; set; }
public virtual decimal LineBefore { get; set; }
public virtual decimal LineAfter { get; set; }
}
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 OwnerCardsPreviewDiscountRequest
{
public OwnerCardsPreviewDiscountRequest()
{
OwnerCardTypeIds = new List<int>{};
}
public virtual string Code { get; set; }
public virtual List<int> OwnerCardTypeIds { get; set; }
public virtual string FullPhoneNumber { get; set; }
public virtual bool? IsSubscription { get; set; }
}
public partial class PreviewDiscountResult
{
public PreviewDiscountResult()
{
Lines = new List<DiscountLineResult>{};
}
public virtual string Status { get; set; }
public virtual string Reason { get; set; }
public virtual LocalizedMessage Message { get; set; }
public virtual int? DiscountCodeId { get; set; }
public virtual int? DiscountCodeTypeId { get; set; }
public virtual DiscountSummary Discount { get; set; }
public virtual List<DiscountLineResult> Lines { get; set; }
public virtual decimal SubtotalBefore { get; set; }
public virtual decimal SubtotalAfter { get; set; }
public virtual decimal TotalSavings { get; set; }
public virtual string Currency { get; set; }
public virtual int StatusCode { get; set; }
}
}
C# OwnerCardsPreviewDiscountRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /OrderOwnerCards/previewDiscount HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/json
Content-Type: application/json
Content-Length: length
{"code":"String","ownerCardTypeIds":[0],"fullPhoneNumber":"String","isSubscription":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"status":"String","reason":"String","message":{"is":"String","en":"String"},"discountCodeId":0,"discountCodeTypeId":0,"discount":{"type":"String","value":0},"lines":[{"ticketTypeId":0,"count":0,"applied":false,"unitBefore":0,"unitAfter":0,"lineBefore":0,"lineAfter":0}],"subtotalBefore":0,"subtotalAfter":0,"totalSavings":0,"currency":"String","statusCode":0}