TicketUserServices

<back to all web services

OwnerCardsCreateRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequired permission:Tickets.Add
The following routes are available for this service:
POST/OwnerCards
import 'package:servicestack/servicestack.dart';

class OwnerCards implements IConvertible
{
    int? id;
    int? ownerId;
    int? ownerCardTypeId;
    int? phoneVerificationId;
    int? initialMaxTickets;
    int? currentAvailableTickets;
    DateTime? timeStampCreatedUTC;
    DateTime? timeStampLastChangedUTC;
    DateTime? timeStampBoughtUTC;
    DateTime? timeStampOrderedUTC;
    DateTime? cardValidFromUTC;
    DateTime? cardValidToUTC;
    bool? hasStoreCredit;
    double? cardPrice;
    double? pricePaid;
    double? initialStoreCredit;
    double? currentStoreCredit;
    String? phoneFullVerificationNumber;
    String? holderId;
    String? holderName;
    String? holderEmail;
    String? cardPriceCurrency;
    String? pricePaidCurrency;
    String? deviceId;
    String? paymentMethodId;
    String? paymentReference;
    String? phoneVerificationNumber;
    String? paymentPhoneNumber;
    String? paymentId;
    String? paymentStatus;
    String? paymentTokenId;
    int? maxTicketsPerEvent;
    String? multiplePaymentsId;
    String? imageUrl;
    String? backgroundImageUrl;

    OwnerCards({this.id,this.ownerId,this.ownerCardTypeId,this.phoneVerificationId,this.initialMaxTickets,this.currentAvailableTickets,this.timeStampCreatedUTC,this.timeStampLastChangedUTC,this.timeStampBoughtUTC,this.timeStampOrderedUTC,this.cardValidFromUTC,this.cardValidToUTC,this.hasStoreCredit,this.cardPrice,this.pricePaid,this.initialStoreCredit,this.currentStoreCredit,this.phoneFullVerificationNumber,this.holderId,this.holderName,this.holderEmail,this.cardPriceCurrency,this.pricePaidCurrency,this.deviceId,this.paymentMethodId,this.paymentReference,this.phoneVerificationNumber,this.paymentPhoneNumber,this.paymentId,this.paymentStatus,this.paymentTokenId,this.maxTicketsPerEvent,this.multiplePaymentsId,this.imageUrl,this.backgroundImageUrl});
    OwnerCards.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        ownerId = json['ownerId'];
        ownerCardTypeId = json['ownerCardTypeId'];
        phoneVerificationId = json['phoneVerificationId'];
        initialMaxTickets = json['initialMaxTickets'];
        currentAvailableTickets = json['currentAvailableTickets'];
        timeStampCreatedUTC = JsonConverters.fromJson(json['timeStampCreatedUTC'],'DateTime',context!);
        timeStampLastChangedUTC = JsonConverters.fromJson(json['timeStampLastChangedUTC'],'DateTime',context!);
        timeStampBoughtUTC = JsonConverters.fromJson(json['timeStampBoughtUTC'],'DateTime',context!);
        timeStampOrderedUTC = JsonConverters.fromJson(json['timeStampOrderedUTC'],'DateTime',context!);
        cardValidFromUTC = JsonConverters.fromJson(json['cardValidFromUTC'],'DateTime',context!);
        cardValidToUTC = JsonConverters.fromJson(json['cardValidToUTC'],'DateTime',context!);
        hasStoreCredit = json['hasStoreCredit'];
        cardPrice = JsonConverters.toDouble(json['cardPrice']);
        pricePaid = JsonConverters.toDouble(json['pricePaid']);
        initialStoreCredit = JsonConverters.toDouble(json['initialStoreCredit']);
        currentStoreCredit = JsonConverters.toDouble(json['currentStoreCredit']);
        phoneFullVerificationNumber = json['phoneFullVerificationNumber'];
        holderId = json['holderId'];
        holderName = json['holderName'];
        holderEmail = json['holderEmail'];
        cardPriceCurrency = json['cardPriceCurrency'];
        pricePaidCurrency = json['pricePaidCurrency'];
        deviceId = json['deviceId'];
        paymentMethodId = json['paymentMethodId'];
        paymentReference = json['paymentReference'];
        phoneVerificationNumber = json['phoneVerificationNumber'];
        paymentPhoneNumber = json['paymentPhoneNumber'];
        paymentId = json['paymentId'];
        paymentStatus = json['paymentStatus'];
        paymentTokenId = json['paymentTokenId'];
        maxTicketsPerEvent = json['maxTicketsPerEvent'];
        multiplePaymentsId = json['multiplePaymentsId'];
        imageUrl = json['imageUrl'];
        backgroundImageUrl = json['backgroundImageUrl'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'ownerId': ownerId,
        'ownerCardTypeId': ownerCardTypeId,
        'phoneVerificationId': phoneVerificationId,
        'initialMaxTickets': initialMaxTickets,
        'currentAvailableTickets': currentAvailableTickets,
        'timeStampCreatedUTC': JsonConverters.toJson(timeStampCreatedUTC,'DateTime',context!),
        'timeStampLastChangedUTC': JsonConverters.toJson(timeStampLastChangedUTC,'DateTime',context!),
        'timeStampBoughtUTC': JsonConverters.toJson(timeStampBoughtUTC,'DateTime',context!),
        'timeStampOrderedUTC': JsonConverters.toJson(timeStampOrderedUTC,'DateTime',context!),
        'cardValidFromUTC': JsonConverters.toJson(cardValidFromUTC,'DateTime',context!),
        'cardValidToUTC': JsonConverters.toJson(cardValidToUTC,'DateTime',context!),
        'hasStoreCredit': hasStoreCredit,
        'cardPrice': cardPrice,
        'pricePaid': pricePaid,
        'initialStoreCredit': initialStoreCredit,
        'currentStoreCredit': currentStoreCredit,
        'phoneFullVerificationNumber': phoneFullVerificationNumber,
        'holderId': holderId,
        'holderName': holderName,
        'holderEmail': holderEmail,
        'cardPriceCurrency': cardPriceCurrency,
        'pricePaidCurrency': pricePaidCurrency,
        'deviceId': deviceId,
        'paymentMethodId': paymentMethodId,
        'paymentReference': paymentReference,
        'phoneVerificationNumber': phoneVerificationNumber,
        'paymentPhoneNumber': paymentPhoneNumber,
        'paymentId': paymentId,
        'paymentStatus': paymentStatus,
        'paymentTokenId': paymentTokenId,
        'maxTicketsPerEvent': maxTicketsPerEvent,
        'multiplePaymentsId': multiplePaymentsId,
        'imageUrl': imageUrl,
        'backgroundImageUrl': backgroundImageUrl
    };

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

class OwnerCardsResult implements IConvertible
{
    OwnerCards? item;
    int? statusCode;
    String? message;

    OwnerCardsResult({this.item,this.statusCode,this.message});
    OwnerCardsResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        item = JsonConverters.fromJson(json['item'],'OwnerCards',context!);
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'item': JsonConverters.toJson(item,'OwnerCards',context!),
        'statusCode': statusCode,
        'message': message
    };

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

class OwnerCardsCreateRequest implements IConvertible
{
    OwnerCards? item;

    OwnerCardsCreateRequest({this.item});
    OwnerCardsCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        item = JsonConverters.fromJson(json['item'],'OwnerCards',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'item': JsonConverters.toJson(item,'OwnerCards',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
    'OwnerCards': TypeInfo(TypeOf.Class, create:() => OwnerCards()),
    'OwnerCardsResult': TypeInfo(TypeOf.Class, create:() => OwnerCardsResult()),
    'OwnerCardsCreateRequest': TypeInfo(TypeOf.Class, create:() => OwnerCardsCreateRequest()),
});

Dart OwnerCardsCreateRequest DTOs

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

HTTP + JSV

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

POST /OwnerCards HTTP/1.1 
Host: stubbur-autoupdates-live.smartnewapis.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	item: 
	{
		id: 0,
		ownerId: 0,
		ownerCardTypeId: 0,
		phoneVerificationId: 0,
		initialMaxTickets: 0,
		currentAvailableTickets: 0,
		timeStampCreatedUTC: 0001-01-01,
		timeStampLastChangedUTC: 0001-01-01,
		timeStampBoughtUTC: 0001-01-01,
		timeStampOrderedUTC: 0001-01-01,
		cardValidFromUTC: 0001-01-01,
		cardValidToUTC: 0001-01-01,
		hasStoreCredit: False,
		cardPrice: 0,
		pricePaid: 0,
		initialStoreCredit: 0,
		currentStoreCredit: 0,
		phoneFullVerificationNumber: String,
		holderId: String,
		holderName: String,
		holderEmail: String,
		cardPriceCurrency: String,
		pricePaidCurrency: String,
		deviceId: String,
		paymentMethodId: String,
		paymentReference: String,
		phoneVerificationNumber: String,
		paymentPhoneNumber: String,
		paymentId: String,
		paymentStatus: String,
		paymentTokenId: String,
		maxTicketsPerEvent: 0,
		multiplePaymentsId: String,
		imageUrl: String,
		backgroundImageUrl: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	item: 
	{
		id: 0,
		ownerId: 0,
		ownerCardTypeId: 0,
		phoneVerificationId: 0,
		initialMaxTickets: 0,
		currentAvailableTickets: 0,
		timeStampCreatedUTC: 0001-01-01,
		timeStampLastChangedUTC: 0001-01-01,
		timeStampBoughtUTC: 0001-01-01,
		timeStampOrderedUTC: 0001-01-01,
		cardValidFromUTC: 0001-01-01,
		cardValidToUTC: 0001-01-01,
		hasStoreCredit: False,
		cardPrice: 0,
		pricePaid: 0,
		initialStoreCredit: 0,
		currentStoreCredit: 0,
		phoneFullVerificationNumber: String,
		holderId: String,
		holderName: String,
		holderEmail: String,
		cardPriceCurrency: String,
		pricePaidCurrency: String,
		deviceId: String,
		paymentMethodId: String,
		paymentReference: String,
		phoneVerificationNumber: String,
		paymentPhoneNumber: String,
		paymentId: String,
		paymentStatus: String,
		paymentTokenId: String,
		maxTicketsPerEvent: 0,
		multiplePaymentsId: String,
		imageUrl: String,
		backgroundImageUrl: String
	},
	statusCode: 0,
	message: String
}