TicketUserServices

<back to all web services

WebshopCategoryListRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:ReadData
The following routes are available for this service:
GET/Webshop/Category/List/{OwnerId}
import 'package:servicestack/servicestack.dart';

class WebshopCategory implements IConvertible
{
    int? id;
    int? ownerId;
    // @StringLength(150)
    String? name;

    // @StringLength(150)
    String? subName;

    int? viewOrder;
    int? legacyId;
    DateTime? createdAt;

    WebshopCategory({this.id,this.ownerId,this.name,this.subName,this.viewOrder,this.legacyId,this.createdAt});
    WebshopCategory.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        ownerId = json['ownerId'];
        name = json['name'];
        subName = json['subName'];
        viewOrder = json['viewOrder'];
        legacyId = json['legacyId'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'ownerId': ownerId,
        'name': name,
        'subName': subName,
        'viewOrder': viewOrder,
        'legacyId': legacyId,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!)
    };

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

class WebshopCategoryListResult implements IConvertible
{
    List<WebshopCategory>? items;
    int? statusCode;
    String? message;

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

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

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

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

class WebshopCategoryListRequest implements IConvertible
{
    int? ownerId;

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

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

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

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

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

Dart WebshopCategoryListRequest 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.

GET /Webshop/Category/List/{OwnerId} HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"items":[{"id":0,"ownerId":0,"name":"String","subName":"String","viewOrder":0,"legacyId":0,"createdAt":"0001-01-01T00:00:00.0000000"}],"statusCode":0,"message":"String"}