TicketUserServices

<back to all web services

WebshopSettingsGetRequest

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

class WebshopSettings implements IConvertible
{
    int? id;
    int? ownerId;
    // @StringLength(200)
    String? orderEmail;

    bool? pickupAllowed;
    bool? droppAllowed;
    bool? shippedAllowed;
    // @StringLength(300)
    String? pickupAddress;

    // @StringLength(500)
    String? pickupDescription;

    int? droppFeeMinor;
    int? shippedFeeMinor;
    // @StringLength(50)
    String? legacyTeamNumber;

    DateTime? createdAt;
    DateTime? updatedAt;

    WebshopSettings({this.id,this.ownerId,this.orderEmail,this.pickupAllowed,this.droppAllowed,this.shippedAllowed,this.pickupAddress,this.pickupDescription,this.droppFeeMinor,this.shippedFeeMinor,this.legacyTeamNumber,this.createdAt,this.updatedAt});
    WebshopSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        ownerId = json['ownerId'];
        orderEmail = json['orderEmail'];
        pickupAllowed = json['pickupAllowed'];
        droppAllowed = json['droppAllowed'];
        shippedAllowed = json['shippedAllowed'];
        pickupAddress = json['pickupAddress'];
        pickupDescription = json['pickupDescription'];
        droppFeeMinor = json['droppFeeMinor'];
        shippedFeeMinor = json['shippedFeeMinor'];
        legacyTeamNumber = json['legacyTeamNumber'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'ownerId': ownerId,
        'orderEmail': orderEmail,
        'pickupAllowed': pickupAllowed,
        'droppAllowed': droppAllowed,
        'shippedAllowed': shippedAllowed,
        'pickupAddress': pickupAddress,
        'pickupDescription': pickupDescription,
        'droppFeeMinor': droppFeeMinor,
        'shippedFeeMinor': shippedFeeMinor,
        'legacyTeamNumber': legacyTeamNumber,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!)
    };

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

class WebshopSettingsResult implements IConvertible
{
    WebshopSettings? item;
    int? statusCode;
    String? message;

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

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

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

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

class WebshopSettingsGetRequest implements IConvertible
{
    int? ownerId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'WebshopSettings': TypeInfo(TypeOf.Class, create:() => WebshopSettings()),
    'WebshopSettingsResult': TypeInfo(TypeOf.Class, create:() => WebshopSettingsResult()),
    'WebshopSettingsGetRequest': TypeInfo(TypeOf.Class, create:() => WebshopSettingsGetRequest()),
});

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

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

{"item":{"id":0,"ownerId":0,"orderEmail":"String","pickupAllowed":false,"droppAllowed":false,"shippedAllowed":false,"pickupAddress":"String","pickupDescription":"String","droppFeeMinor":0,"shippedFeeMinor":0,"legacyTeamNumber":"String","createdAt":"0001-01-01T00:00:00.0000000","updatedAt":"0001-01-01T00:00:00.0000000"},"statusCode":0,"message":"String"}