TicketUserServices

<back to all web services

WebshopProductViewOrderRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequired permission:Tickets.Add
The following routes are available for this service:
PUT/Webshop/Product/ViewOrder
import 'package:servicestack/servicestack.dart';

class WebshopSimpleResult implements IConvertible
{
    bool? success;
    String? status;
    int? statusCode;
    String? message;

    WebshopSimpleResult({this.success,this.status,this.statusCode,this.message});
    WebshopSimpleResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        success = json['success'];
        status = json['status'];
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'success': success,
        'status': status,
        'statusCode': statusCode,
        'message': message
    };

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

class WebshopViewOrderItem implements IConvertible
{
    int? productId;
    int? viewOrder;

    WebshopViewOrderItem({this.productId,this.viewOrder});
    WebshopViewOrderItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class WebshopProductViewOrderRequest implements IConvertible
{
    int? ownerId;
    List<WebshopViewOrderItem>? items;

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

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

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

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

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

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

PUT /Webshop/Product/ViewOrder HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ownerId: 0,
	items: 
	[
		{
			productId: 0,
			viewOrder: 0
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	success: False,
	status: String,
	statusCode: 0,
	message: String
}