| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
| POST | /DiscountCodeType/Search |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DiscountCodeType:
id: Optional[int] = None
name: Optional[str] = None
is_for_event_id: Optional[bool] = None
event_id: Optional[int] = None
event_owner_id: Optional[int] = None
is_for_ticket_type: Optional[bool] = None
ticket_type_id: Optional[int] = None
is_fixed_amount: Optional[bool] = None
fixed_amount: Optional[Decimal] = None
is_percent: Optional[bool] = None
percent: Optional[Decimal] = None
is_valid: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DiscountCodeTypesResult:
items: Optional[List[DiscountCodeType]] = None
status_code: Optional[int] = None
message: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DiscountCodeTypesSearchRequest:
event_id: Optional[int] = None
event_owner_id: Optional[int] = None
ticket_type_id: Optional[int] = None
Python DiscountCodeTypesSearchRequest 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 /DiscountCodeType/Search HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
eventId: 0,
eventOwnerId: 0,
ticketTypeId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
items:
[
{
id: 0,
name: String,
isForEventId: False,
eventId: 0,
eventOwnerId: 0,
isForTicketType: False,
ticketTypeId: 0,
isFixedAmount: False,
fixedAmount: 0,
isPercent: False,
percent: 0,
isValid: False
}
],
statusCode: 0,
message: String
}