| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | ReadData |
| POST | /Webshop/Order/Search |
|---|
import 'package:servicestack/servicestack.dart';
class WebshopOrderLineSummary implements IConvertible
{
int? id;
int? productId;
int? variantId;
String? productName;
String? size;
String? color;
int? unitPriceMinor;
int? quantity;
int? lineTotalMinor;
String? status;
int? payoutInfoId;
String? payoutTag;
WebshopOrderLineSummary({this.id,this.productId,this.variantId,this.productName,this.size,this.color,this.unitPriceMinor,this.quantity,this.lineTotalMinor,this.status,this.payoutInfoId,this.payoutTag});
WebshopOrderLineSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
productId = json['productId'];
variantId = json['variantId'];
productName = json['productName'];
size = json['size'];
color = json['color'];
unitPriceMinor = json['unitPriceMinor'];
quantity = json['quantity'];
lineTotalMinor = json['lineTotalMinor'];
status = json['status'];
payoutInfoId = json['payoutInfoId'];
payoutTag = json['payoutTag'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'productId': productId,
'variantId': variantId,
'productName': productName,
'size': size,
'color': color,
'unitPriceMinor': unitPriceMinor,
'quantity': quantity,
'lineTotalMinor': lineTotalMinor,
'status': status,
'payoutInfoId': payoutInfoId,
'payoutTag': payoutTag
};
getTypeName() => "WebshopOrderLineSummary";
TypeContext? context = _ctx;
}
class WebshopOrderSummary implements IConvertible
{
int? id;
String? orderReference;
int? ownerId;
String? status;
int? totalMinor;
int? deliveryFeeMinor;
int? totalDiscountMinor;
String? currency;
String? buyerName;
String? buyerEmail;
String? buyerPhone;
String? address;
String? city;
String? zipCode;
String? country;
String? deliveryType;
String? droppOrderId;
String? droppLocationId;
bool? needsDeliveryAttention;
String? paymentMethodId;
String? paymentId;
String? paymentReference;
String? discountCode;
int? giftPaidMinor;
DateTime? createdAt;
DateTime? updatedAt;
List<WebshopOrderLineSummary>? lines;
WebshopOrderSummary({this.id,this.orderReference,this.ownerId,this.status,this.totalMinor,this.deliveryFeeMinor,this.totalDiscountMinor,this.currency,this.buyerName,this.buyerEmail,this.buyerPhone,this.address,this.city,this.zipCode,this.country,this.deliveryType,this.droppOrderId,this.droppLocationId,this.needsDeliveryAttention,this.paymentMethodId,this.paymentId,this.paymentReference,this.discountCode,this.giftPaidMinor,this.createdAt,this.updatedAt,this.lines});
WebshopOrderSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
orderReference = json['orderReference'];
ownerId = json['ownerId'];
status = json['status'];
totalMinor = json['totalMinor'];
deliveryFeeMinor = json['deliveryFeeMinor'];
totalDiscountMinor = json['totalDiscountMinor'];
currency = json['currency'];
buyerName = json['buyerName'];
buyerEmail = json['buyerEmail'];
buyerPhone = json['buyerPhone'];
address = json['address'];
city = json['city'];
zipCode = json['zipCode'];
country = json['country'];
deliveryType = json['deliveryType'];
droppOrderId = json['droppOrderId'];
droppLocationId = json['droppLocationId'];
needsDeliveryAttention = json['needsDeliveryAttention'];
paymentMethodId = json['paymentMethodId'];
paymentId = json['paymentId'];
paymentReference = json['paymentReference'];
discountCode = json['discountCode'];
giftPaidMinor = json['giftPaidMinor'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!);
lines = JsonConverters.fromJson(json['lines'],'List<WebshopOrderLineSummary>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'orderReference': orderReference,
'ownerId': ownerId,
'status': status,
'totalMinor': totalMinor,
'deliveryFeeMinor': deliveryFeeMinor,
'totalDiscountMinor': totalDiscountMinor,
'currency': currency,
'buyerName': buyerName,
'buyerEmail': buyerEmail,
'buyerPhone': buyerPhone,
'address': address,
'city': city,
'zipCode': zipCode,
'country': country,
'deliveryType': deliveryType,
'droppOrderId': droppOrderId,
'droppLocationId': droppLocationId,
'needsDeliveryAttention': needsDeliveryAttention,
'paymentMethodId': paymentMethodId,
'paymentId': paymentId,
'paymentReference': paymentReference,
'discountCode': discountCode,
'giftPaidMinor': giftPaidMinor,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!),
'lines': JsonConverters.toJson(lines,'List<WebshopOrderLineSummary>',context!)
};
getTypeName() => "WebshopOrderSummary";
TypeContext? context = _ctx;
}
class WebshopOrderSearchResult implements IConvertible
{
List<WebshopOrderSummary>? items;
int? totalCount;
int? statusCode;
String? message;
WebshopOrderSearchResult({this.items,this.totalCount,this.statusCode,this.message});
WebshopOrderSearchResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
items = JsonConverters.fromJson(json['items'],'List<WebshopOrderSummary>',context!);
totalCount = json['totalCount'];
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'items': JsonConverters.toJson(items,'List<WebshopOrderSummary>',context!),
'totalCount': totalCount,
'statusCode': statusCode,
'message': message
};
getTypeName() => "WebshopOrderSearchResult";
TypeContext? context = _ctx;
}
class WebshopOrderSearchRequest implements IConvertible
{
int? ownerId;
String? status;
DateTime? from;
DateTime? to;
int? skip;
int? take;
WebshopOrderSearchRequest({this.ownerId,this.status,this.from,this.to,this.skip,this.take});
WebshopOrderSearchRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ownerId = json['ownerId'];
status = json['status'];
from = JsonConverters.fromJson(json['from'],'DateTime',context!);
to = JsonConverters.fromJson(json['to'],'DateTime',context!);
skip = json['skip'];
take = json['take'];
return this;
}
Map<String, dynamic> toJson() => {
'ownerId': ownerId,
'status': status,
'from': JsonConverters.toJson(from,'DateTime',context!),
'to': JsonConverters.toJson(to,'DateTime',context!),
'skip': skip,
'take': take
};
getTypeName() => "WebshopOrderSearchRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'WebshopOrderLineSummary': TypeInfo(TypeOf.Class, create:() => WebshopOrderLineSummary()),
'WebshopOrderSummary': TypeInfo(TypeOf.Class, create:() => WebshopOrderSummary()),
'List<WebshopOrderLineSummary>': TypeInfo(TypeOf.Class, create:() => <WebshopOrderLineSummary>[]),
'WebshopOrderSearchResult': TypeInfo(TypeOf.Class, create:() => WebshopOrderSearchResult()),
'List<WebshopOrderSummary>': TypeInfo(TypeOf.Class, create:() => <WebshopOrderSummary>[]),
'WebshopOrderSearchRequest': TypeInfo(TypeOf.Class, create:() => WebshopOrderSearchRequest()),
});
Dart WebshopOrderSearchRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Webshop/Order/Search HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ownerId":0,"status":"String","from":"0001-01-01T00:00:00.0000000","to":"0001-01-01T00:00:00.0000000","skip":0,"take":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"items":[{"id":0,"orderReference":"String","ownerId":0,"status":"String","totalMinor":0,"deliveryFeeMinor":0,"totalDiscountMinor":0,"currency":"String","buyerName":"String","buyerEmail":"String","buyerPhone":"String","address":"String","city":"String","zipCode":"String","country":"String","deliveryType":"String","droppOrderId":"String","droppLocationId":"String","needsDeliveryAttention":false,"paymentMethodId":"String","paymentId":"String","paymentReference":"String","discountCode":"String","giftPaidMinor":0,"createdAt":"0001-01-01T00:00:00.0000000","updatedAt":"0001-01-01T00:00:00.0000000","lines":[{"id":0,"productId":0,"variantId":0,"productName":"String","size":"String","color":"String","unitPriceMinor":0,"quantity":0,"lineTotalMinor":0,"status":"String","payoutInfoId":0,"payoutTag":"String"}]}],"totalCount":0,"statusCode":0,"message":"String"}