TicketUserServices

<back to all web services

WebshopCatalogRequest

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

class WebshopVariantSummary implements IConvertible
{
    int? id;
    int? productId;
    String? size;
    String? color;
    int? stockOnHand;
    int? quantitySold;
    int? availableQuantity;
    String? status;

    WebshopVariantSummary({this.id,this.productId,this.size,this.color,this.stockOnHand,this.quantitySold,this.availableQuantity,this.status});
    WebshopVariantSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        productId = json['productId'];
        size = json['size'];
        color = json['color'];
        stockOnHand = json['stockOnHand'];
        quantitySold = json['quantitySold'];
        availableQuantity = json['availableQuantity'];
        status = json['status'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'productId': productId,
        'size': size,
        'color': color,
        'stockOnHand': stockOnHand,
        'quantitySold': quantitySold,
        'availableQuantity': availableQuantity,
        'status': status
    };

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

class WebshopProductSummary implements IConvertible
{
    int? id;
    int? ownerId;
    String? name;
    String? description;
    String? category;
    String? subCategory;
    int? defaultPriceMinor;
    String? imageUrl;
    int? viewOrder;
    String? status;
    int? payoutInfoId;
    int? legacyItemId;
    List<WebshopVariantSummary>? variants;

    WebshopProductSummary({this.id,this.ownerId,this.name,this.description,this.category,this.subCategory,this.defaultPriceMinor,this.imageUrl,this.viewOrder,this.status,this.payoutInfoId,this.legacyItemId,this.variants});
    WebshopProductSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        ownerId = json['ownerId'];
        name = json['name'];
        description = json['description'];
        category = json['category'];
        subCategory = json['subCategory'];
        defaultPriceMinor = json['defaultPriceMinor'];
        imageUrl = json['imageUrl'];
        viewOrder = json['viewOrder'];
        status = json['status'];
        payoutInfoId = json['payoutInfoId'];
        legacyItemId = json['legacyItemId'];
        variants = JsonConverters.fromJson(json['variants'],'List<WebshopVariantSummary>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'ownerId': ownerId,
        'name': name,
        'description': description,
        'category': category,
        'subCategory': subCategory,
        'defaultPriceMinor': defaultPriceMinor,
        'imageUrl': imageUrl,
        'viewOrder': viewOrder,
        'status': status,
        'payoutInfoId': payoutInfoId,
        'legacyItemId': legacyItemId,
        'variants': JsonConverters.toJson(variants,'List<WebshopVariantSummary>',context!)
    };

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

class WebshopDeliveryOptions implements IConvertible
{
    bool? pickupAllowed;
    bool? droppAllowed;
    bool? shippedAllowed;
    String? pickupAddress;
    String? pickupDescription;
    int? droppFeeMinor;
    int? shippedFeeMinor;
    String? orderEmail;

    WebshopDeliveryOptions({this.pickupAllowed,this.droppAllowed,this.shippedAllowed,this.pickupAddress,this.pickupDescription,this.droppFeeMinor,this.shippedFeeMinor,this.orderEmail});
    WebshopDeliveryOptions.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        pickupAllowed = json['pickupAllowed'];
        droppAllowed = json['droppAllowed'];
        shippedAllowed = json['shippedAllowed'];
        pickupAddress = json['pickupAddress'];
        pickupDescription = json['pickupDescription'];
        droppFeeMinor = json['droppFeeMinor'];
        shippedFeeMinor = json['shippedFeeMinor'];
        orderEmail = json['orderEmail'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'pickupAllowed': pickupAllowed,
        'droppAllowed': droppAllowed,
        'shippedAllowed': shippedAllowed,
        'pickupAddress': pickupAddress,
        'pickupDescription': pickupDescription,
        'droppFeeMinor': droppFeeMinor,
        'shippedFeeMinor': shippedFeeMinor,
        'orderEmail': orderEmail
    };

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

class WebshopCatalogResult implements IConvertible
{
    int? ownerId;
    List<WebshopProductSummary>? products;
    WebshopDeliveryOptions? delivery;
    int? statusCode;
    String? message;

    WebshopCatalogResult({this.ownerId,this.products,this.delivery,this.statusCode,this.message});
    WebshopCatalogResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ownerId = json['ownerId'];
        products = JsonConverters.fromJson(json['products'],'List<WebshopProductSummary>',context!);
        delivery = JsonConverters.fromJson(json['delivery'],'WebshopDeliveryOptions',context!);
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ownerId': ownerId,
        'products': JsonConverters.toJson(products,'List<WebshopProductSummary>',context!),
        'delivery': JsonConverters.toJson(delivery,'WebshopDeliveryOptions',context!),
        'statusCode': statusCode,
        'message': message
    };

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

class WebshopCatalogRequest implements IConvertible
{
    int? ownerId;
    String? externalId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'WebshopVariantSummary': TypeInfo(TypeOf.Class, create:() => WebshopVariantSummary()),
    'WebshopProductSummary': TypeInfo(TypeOf.Class, create:() => WebshopProductSummary()),
    'List<WebshopVariantSummary>': TypeInfo(TypeOf.Class, create:() => <WebshopVariantSummary>[]),
    'WebshopDeliveryOptions': TypeInfo(TypeOf.Class, create:() => WebshopDeliveryOptions()),
    'WebshopCatalogResult': TypeInfo(TypeOf.Class, create:() => WebshopCatalogResult()),
    'List<WebshopProductSummary>': TypeInfo(TypeOf.Class, create:() => <WebshopProductSummary>[]),
    'WebshopCatalogRequest': TypeInfo(TypeOf.Class, create:() => WebshopCatalogRequest()),
});

Dart WebshopCatalogRequest DTOs

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

HTTP + XML

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

GET /Webshop/Catalog/{OwnerId} HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<WebshopCatalogResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Delivery>
    <DroppAllowed>false</DroppAllowed>
    <DroppFeeMinor>0</DroppFeeMinor>
    <OrderEmail>String</OrderEmail>
    <PickupAddress>String</PickupAddress>
    <PickupAllowed>false</PickupAllowed>
    <PickupDescription>String</PickupDescription>
    <ShippedAllowed>false</ShippedAllowed>
    <ShippedFeeMinor>0</ShippedFeeMinor>
  </Delivery>
  <Message>String</Message>
  <OwnerId>0</OwnerId>
  <Products>
    <WebshopProductSummary>
      <Category>String</Category>
      <DefaultPriceMinor>0</DefaultPriceMinor>
      <Description>String</Description>
      <ID>0</ID>
      <ImageUrl>String</ImageUrl>
      <LegacyItemId>0</LegacyItemId>
      <Name>String</Name>
      <OwnerId>0</OwnerId>
      <PayoutInfoId>0</PayoutInfoId>
      <Status>String</Status>
      <SubCategory>String</SubCategory>
      <Variants>
        <WebshopVariantSummary>
          <AvailableQuantity>0</AvailableQuantity>
          <Color>String</Color>
          <ID>0</ID>
          <ProductId>0</ProductId>
          <QuantitySold>0</QuantitySold>
          <Size>String</Size>
          <Status>String</Status>
          <StockOnHand>0</StockOnHand>
        </WebshopVariantSummary>
      </Variants>
      <ViewOrder>0</ViewOrder>
    </WebshopProductSummary>
  </Products>
  <StatusCode>0</StatusCode>
</WebshopCatalogResult>