TicketUserServices

<back to all web services

OwnerCardPurchaseQuoteRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequired permission:ReadData
The following routes are available for this service:
POST/OwnerCards/Purchase/Quote
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 LocalizedMessage:
    is_: Optional[str] = field(metadata=config(field_name='is'), default=None)
    en: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OwnerCardPurchaseQuoteResult:
    owner_card_type_id: Optional[int] = None
    owner_id: Optional[int] = None
    currency: Optional[str] = None
    price_minor: Optional[int] = None
    gift_applied_minor: Optional[int] = None
    remaining_minor: Optional[int] = None
    gift_hold_id: Optional[int] = None
    fully_covered_by_gift_card: Optional[bool] = None
    requires_card_mandate: Optional[bool] = None
    gift_rejected_reason: Optional[str] = None
    gift_message: Optional[LocalizedMessage] = None
    status_code: Optional[int] = None
    message: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OwnerCardPurchaseQuoteRequest:
    owner_card_type_id: Optional[int] = None
    gift_card_code: Optional[str] = None
    idempotency_key: Optional[str] = None
    is_recurring: Optional[bool] = None

Python OwnerCardPurchaseQuoteRequest 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 /OwnerCards/Purchase/Quote HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"ownerCardTypeId":0,"giftCardCode":"String","idempotencyKey":"String","isRecurring":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ownerCardTypeId":0,"ownerId":0,"currency":"String","priceMinor":0,"giftAppliedMinor":0,"remainingMinor":0,"giftHoldId":0,"fullyCoveredByGiftCard":false,"requiresCardMandate":false,"giftRejectedReason":"String","giftMessage":{"is":"String","en":"String"},"statusCode":0,"message":"String"}