TicketUserServices

<back to all web services

OwnerCardTypesSearchRequest

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

class OwnerCardType implements IConvertible
{
    int? id;
    int? ownerId;
    int? maxTickets;
    DateTime? timeStampCreatedUTC;
    DateTime? timeStampLastChangedUTC;
    DateTime? saleStartDateUTC;
    DateTime? saleEndDateUTC;
    DateTime? validStartDateForNewCardsUTC;
    DateTime? validEndDateForNewCardsUTC;
    bool? hasStoreCredit;
    bool? isActive;
    bool? onlyForTeamUse;
    double? price;
    double? initialStoreCredit;
    String? description;
    String? name;
    String? imageUrl;
    String? currency;
    int? maxTicketsPerEvent;
    String? backgroundImageUrl;
    bool? validForConnectedOwners;
    int? superOwnerId;

    OwnerCardType({this.id,this.ownerId,this.maxTickets,this.timeStampCreatedUTC,this.timeStampLastChangedUTC,this.saleStartDateUTC,this.saleEndDateUTC,this.validStartDateForNewCardsUTC,this.validEndDateForNewCardsUTC,this.hasStoreCredit,this.isActive,this.onlyForTeamUse,this.price,this.initialStoreCredit,this.description,this.name,this.imageUrl,this.currency,this.maxTicketsPerEvent,this.backgroundImageUrl,this.validForConnectedOwners,this.superOwnerId});
    OwnerCardType.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        ownerId = json['ownerId'];
        maxTickets = json['maxTickets'];
        timeStampCreatedUTC = JsonConverters.fromJson(json['timeStampCreatedUTC'],'DateTime',context!);
        timeStampLastChangedUTC = JsonConverters.fromJson(json['timeStampLastChangedUTC'],'DateTime',context!);
        saleStartDateUTC = JsonConverters.fromJson(json['saleStartDateUTC'],'DateTime',context!);
        saleEndDateUTC = JsonConverters.fromJson(json['saleEndDateUTC'],'DateTime',context!);
        validStartDateForNewCardsUTC = JsonConverters.fromJson(json['validStartDateForNewCardsUTC'],'DateTime',context!);
        validEndDateForNewCardsUTC = JsonConverters.fromJson(json['validEndDateForNewCardsUTC'],'DateTime',context!);
        hasStoreCredit = json['hasStoreCredit'];
        isActive = json['isActive'];
        onlyForTeamUse = json['onlyForTeamUse'];
        price = JsonConverters.toDouble(json['price']);
        initialStoreCredit = JsonConverters.toDouble(json['initialStoreCredit']);
        description = json['description'];
        name = json['name'];
        imageUrl = json['imageUrl'];
        currency = json['currency'];
        maxTicketsPerEvent = json['maxTicketsPerEvent'];
        backgroundImageUrl = json['backgroundImageUrl'];
        validForConnectedOwners = json['validForConnectedOwners'];
        superOwnerId = json['superOwnerId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'ownerId': ownerId,
        'maxTickets': maxTickets,
        'timeStampCreatedUTC': JsonConverters.toJson(timeStampCreatedUTC,'DateTime',context!),
        'timeStampLastChangedUTC': JsonConverters.toJson(timeStampLastChangedUTC,'DateTime',context!),
        'saleStartDateUTC': JsonConverters.toJson(saleStartDateUTC,'DateTime',context!),
        'saleEndDateUTC': JsonConverters.toJson(saleEndDateUTC,'DateTime',context!),
        'validStartDateForNewCardsUTC': JsonConverters.toJson(validStartDateForNewCardsUTC,'DateTime',context!),
        'validEndDateForNewCardsUTC': JsonConverters.toJson(validEndDateForNewCardsUTC,'DateTime',context!),
        'hasStoreCredit': hasStoreCredit,
        'isActive': isActive,
        'onlyForTeamUse': onlyForTeamUse,
        'price': price,
        'initialStoreCredit': initialStoreCredit,
        'description': description,
        'name': name,
        'imageUrl': imageUrl,
        'currency': currency,
        'maxTicketsPerEvent': maxTicketsPerEvent,
        'backgroundImageUrl': backgroundImageUrl,
        'validForConnectedOwners': validForConnectedOwners,
        'superOwnerId': superOwnerId
    };

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

class OwnerCardTypesResult implements IConvertible
{
    List<OwnerCardType>? items;
    int? statusCode;
    String? message;

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

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

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

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

class OwnerCardTypesSearchRequest implements IConvertible
{
    int? ownerId;
    bool? onlyActive;

    OwnerCardTypesSearchRequest({this.ownerId,this.onlyActive});
    OwnerCardTypesSearchRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ownerId = json['ownerId'];
        onlyActive = json['onlyActive'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ownerId': ownerId,
        'onlyActive': onlyActive
    };

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

TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
    'OwnerCardType': TypeInfo(TypeOf.Class, create:() => OwnerCardType()),
    'OwnerCardTypesResult': TypeInfo(TypeOf.Class, create:() => OwnerCardTypesResult()),
    'List<OwnerCardType>': TypeInfo(TypeOf.Class, create:() => <OwnerCardType>[]),
    'OwnerCardTypesSearchRequest': TypeInfo(TypeOf.Class, create:() => OwnerCardTypesSearchRequest()),
});

Dart OwnerCardTypesSearchRequest 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 /OwnerCardTypes HTTP/1.1 
Host: stubbur-autoupdates-live.smartnewapis.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ownerId":0,"onlyActive":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"items":[{"id":0,"ownerId":0,"maxTickets":0,"timeStampCreatedUTC":"0001-01-01T00:00:00.0000000","timeStampLastChangedUTC":"0001-01-01T00:00:00.0000000","saleStartDateUTC":"0001-01-01T00:00:00.0000000","saleEndDateUTC":"0001-01-01T00:00:00.0000000","validStartDateForNewCardsUTC":"0001-01-01T00:00:00.0000000","validEndDateForNewCardsUTC":"0001-01-01T00:00:00.0000000","hasStoreCredit":false,"isActive":false,"onlyForTeamUse":false,"price":0,"initialStoreCredit":0,"description":"String","name":"String","imageUrl":"String","currency":"String","maxTicketsPerEvent":0,"backgroundImageUrl":"String","validForConnectedOwners":false,"superOwnerId":0}],"statusCode":0,"message":"String"}