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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
Content-Length: length

{"ownerCardTypeIds":[0],"isSubscription":false,"discountCode":"String","tenders":[{"kind":"String","code":"String","amountMinor":0,"idempotencyKey":"String","holdId":0,"appliedMinor":0}],"donationAmount":0,"phoneVerificationNumber":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"statusCode":0,"message":"String","reason":"String","isSubscription":false,"priceTotal":0,"discountAmount":0,"giftCardAmount":0,"donationAmount":0,"transactionFee":0,"chargedAmount":0,"chargedAmountMinor":0,"fullyCovered":false}