TicketUserServices

<back to all web services

OwnerCardsQuoteRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileApp, Admin, TeamAdmin, MobileAppRequires any of the permissions:ReadData, ReadData
The following routes are available for this service:
POST/OrderOwnerCards/quote
import 'package:servicestack/servicestack.dart';

class OwnerCardsQuoteResult implements IConvertible
{
    int? statusCode;
    String? message;
    String? reason;
    bool? isSubscription;
    int? priceTotal;
    int? discountAmount;
    int? giftCardAmount;
    int? donationAmount;
    int? transactionFee;
    int? chargedAmount;
    int? chargedAmountMinor;
    bool? fullyCovered;

    OwnerCardsQuoteResult({this.statusCode,this.message,this.reason,this.isSubscription,this.priceTotal,this.discountAmount,this.giftCardAmount,this.donationAmount,this.transactionFee,this.chargedAmount,this.chargedAmountMinor,this.fullyCovered});
    OwnerCardsQuoteResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        statusCode = json['statusCode'];
        message = json['message'];
        reason = json['reason'];
        isSubscription = json['isSubscription'];
        priceTotal = json['priceTotal'];
        discountAmount = json['discountAmount'];
        giftCardAmount = json['giftCardAmount'];
        donationAmount = json['donationAmount'];
        transactionFee = json['transactionFee'];
        chargedAmount = json['chargedAmount'];
        chargedAmountMinor = json['chargedAmountMinor'];
        fullyCovered = json['fullyCovered'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'statusCode': statusCode,
        'message': message,
        'reason': reason,
        'isSubscription': isSubscription,
        'priceTotal': priceTotal,
        'discountAmount': discountAmount,
        'giftCardAmount': giftCardAmount,
        'donationAmount': donationAmount,
        'transactionFee': transactionFee,
        'chargedAmount': chargedAmount,
        'chargedAmountMinor': chargedAmountMinor,
        'fullyCovered': fullyCovered
    };

    getTypeName() => "OwnerCardsQuoteResult";
    TypeContext? context = _ctx;
}

class OrderTender implements IConvertible
{
    String? kind;
    String? code;
    int? amountMinor;
    String? idempotencyKey;
    int? holdId;
    int? appliedMinor;

    OrderTender({this.kind,this.code,this.amountMinor,this.idempotencyKey,this.holdId,this.appliedMinor});
    OrderTender.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        kind = json['kind'];
        code = json['code'];
        amountMinor = json['amountMinor'];
        idempotencyKey = json['idempotencyKey'];
        holdId = json['holdId'];
        appliedMinor = json['appliedMinor'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'kind': kind,
        'code': code,
        'amountMinor': amountMinor,
        'idempotencyKey': idempotencyKey,
        'holdId': holdId,
        'appliedMinor': appliedMinor
    };

    getTypeName() => "OrderTender";
    TypeContext? context = _ctx;
}

class OwnerCardsQuoteRequest implements IConvertible
{
    List<int>? ownerCardTypeIds;
    bool? isSubscription;
    String? discountCode;
    List<OrderTender>? tenders;
    int? donationAmount;
    String? phoneVerificationNumber;

    OwnerCardsQuoteRequest({this.ownerCardTypeIds,this.isSubscription,this.discountCode,this.tenders,this.donationAmount,this.phoneVerificationNumber});
    OwnerCardsQuoteRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ownerCardTypeIds = JsonConverters.fromJson(json['ownerCardTypeIds'],'List<int>',context!);
        isSubscription = json['isSubscription'];
        discountCode = json['discountCode'];
        tenders = JsonConverters.fromJson(json['tenders'],'List<OrderTender>',context!);
        donationAmount = json['donationAmount'];
        phoneVerificationNumber = json['phoneVerificationNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ownerCardTypeIds': JsonConverters.toJson(ownerCardTypeIds,'List<int>',context!),
        'isSubscription': isSubscription,
        'discountCode': discountCode,
        'tenders': JsonConverters.toJson(tenders,'List<OrderTender>',context!),
        'donationAmount': donationAmount,
        'phoneVerificationNumber': phoneVerificationNumber
    };

    getTypeName() => "OwnerCardsQuoteRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'OwnerCardsQuoteResult': TypeInfo(TypeOf.Class, create:() => OwnerCardsQuoteResult()),
    'OrderTender': TypeInfo(TypeOf.Class, create:() => OrderTender()),
    'OwnerCardsQuoteRequest': TypeInfo(TypeOf.Class, create:() => OwnerCardsQuoteRequest()),
    'List<OrderTender>': TypeInfo(TypeOf.Class, create:() => <OrderTender>[]),
});

Dart OwnerCardsQuoteRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /OrderOwnerCards/quote HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<OwnerCardsQuoteRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <DiscountCode>String</DiscountCode>
  <DonationAmount>0</DonationAmount>
  <IsSubscription>false</IsSubscription>
  <OwnerCardTypeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </OwnerCardTypeIds>
  <PhoneVerificationNumber>String</PhoneVerificationNumber>
  <Tenders>
    <OrderTender>
      <AmountMinor>0</AmountMinor>
      <AppliedMinor>0</AppliedMinor>
      <Code>String</Code>
      <HoldId>0</HoldId>
      <IdempotencyKey>String</IdempotencyKey>
      <Kind>String</Kind>
    </OrderTender>
  </Tenders>
</OwnerCardsQuoteRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<OwnerCardsQuoteResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <ChargedAmount>0</ChargedAmount>
  <ChargedAmountMinor>0</ChargedAmountMinor>
  <DiscountAmount>0</DiscountAmount>
  <DonationAmount>0</DonationAmount>
  <FullyCovered>false</FullyCovered>
  <GiftCardAmount>0</GiftCardAmount>
  <IsSubscription>false</IsSubscription>
  <Message>String</Message>
  <PriceTotal>0</PriceTotal>
  <Reason>String</Reason>
  <StatusCode>0</StatusCode>
  <TransactionFee>0</TransactionFee>
</OwnerCardsQuoteResult>