TicketUserServices

<back to all web services

WebshopOrderLedgerRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:ReadData
The following routes are available for this service:
GET/Webshop/Order/Ledger/{OrderId}
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 WebshopOrderTransaction implements IConvertible
{
    int? id;
    int? orderId;
    // @StringLength(20)
    String? kind;

    int? amountMinor;
    // @StringLength(50)
    String? paymentReference;

    // @StringLength(300)
    String? note;

    // @StringLength(100)
    String? idempotencyKey;

    DateTime? createdAt;
    // @StringLength(100)
    String? createdBy;

    WebshopOrderTransaction({this.id,this.orderId,this.kind,this.amountMinor,this.paymentReference,this.note,this.idempotencyKey,this.createdAt,this.createdBy});
    WebshopOrderTransaction.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        orderId = json['orderId'];
        kind = json['kind'];
        amountMinor = json['amountMinor'];
        paymentReference = json['paymentReference'];
        note = json['note'];
        idempotencyKey = json['idempotencyKey'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        createdBy = json['createdBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'orderId': orderId,
        'kind': kind,
        'amountMinor': amountMinor,
        'paymentReference': paymentReference,
        'note': note,
        'idempotencyKey': idempotencyKey,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'createdBy': createdBy
    };

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

class WebshopOrderLedgerResult implements IConvertible
{
    WebshopOrderSummary? order;
    List<WebshopOrderTransaction>? transactions;
    int? statusCode;
    String? message;

    WebshopOrderLedgerResult({this.order,this.transactions,this.statusCode,this.message});
    WebshopOrderLedgerResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'order': JsonConverters.toJson(order,'WebshopOrderSummary',context!),
        'transactions': JsonConverters.toJson(transactions,'List<WebshopOrderTransaction>',context!),
        'statusCode': statusCode,
        'message': message
    };

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

class WebshopOrderLedgerRequest implements IConvertible
{
    int? orderId;
    int? ownerId;

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

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

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

    getTypeName() => "WebshopOrderLedgerRequest";
    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>[]),
    'WebshopOrderTransaction': TypeInfo(TypeOf.Class, create:() => WebshopOrderTransaction()),
    'WebshopOrderLedgerResult': TypeInfo(TypeOf.Class, create:() => WebshopOrderLedgerResult()),
    'List<WebshopOrderTransaction>': TypeInfo(TypeOf.Class, create:() => <WebshopOrderTransaction>[]),
    'WebshopOrderLedgerRequest': TypeInfo(TypeOf.Class, create:() => WebshopOrderLedgerRequest()),
});

Dart WebshopOrderLedgerRequest 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/Order/Ledger/{OrderId} HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<WebshopOrderLedgerResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Message>String</Message>
  <Order>
    <Address>String</Address>
    <BuyerEmail>String</BuyerEmail>
    <BuyerName>String</BuyerName>
    <BuyerPhone>String</BuyerPhone>
    <City>String</City>
    <Country>String</Country>
    <CreatedAt>0001-01-01T00:00:00</CreatedAt>
    <Currency>String</Currency>
    <DeliveryFeeMinor>0</DeliveryFeeMinor>
    <DeliveryType>String</DeliveryType>
    <DiscountCode>String</DiscountCode>
    <DroppLocationId>String</DroppLocationId>
    <DroppOrderId>String</DroppOrderId>
    <GiftPaidMinor>0</GiftPaidMinor>
    <ID>0</ID>
    <Lines>
      <WebshopOrderLineSummary>
        <Color>String</Color>
        <ID>0</ID>
        <LineTotalMinor>0</LineTotalMinor>
        <PayoutInfoId>0</PayoutInfoId>
        <PayoutTag>String</PayoutTag>
        <ProductId>0</ProductId>
        <ProductName>String</ProductName>
        <Quantity>0</Quantity>
        <Size>String</Size>
        <Status>String</Status>
        <UnitPriceMinor>0</UnitPriceMinor>
        <VariantId>0</VariantId>
      </WebshopOrderLineSummary>
    </Lines>
    <NeedsDeliveryAttention>false</NeedsDeliveryAttention>
    <OrderReference>String</OrderReference>
    <OwnerId>0</OwnerId>
    <PaymentId>String</PaymentId>
    <PaymentMethodId>String</PaymentMethodId>
    <PaymentReference>String</PaymentReference>
    <Status>String</Status>
    <TotalDiscountMinor>0</TotalDiscountMinor>
    <TotalMinor>0</TotalMinor>
    <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
    <ZipCode>String</ZipCode>
  </Order>
  <StatusCode>0</StatusCode>
  <Transactions xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types">
    <d2p1:WebshopOrderTransaction>
      <d2p1:AmountMinor>0</d2p1:AmountMinor>
      <d2p1:CreatedAt>0001-01-01T00:00:00</d2p1:CreatedAt>
      <d2p1:CreatedBy>String</d2p1:CreatedBy>
      <d2p1:ID>0</d2p1:ID>
      <d2p1:IdempotencyKey>String</d2p1:IdempotencyKey>
      <d2p1:Kind>String</d2p1:Kind>
      <d2p1:Note>String</d2p1:Note>
      <d2p1:OrderId>0</d2p1:OrderId>
      <d2p1:PaymentReference>String</d2p1:PaymentReference>
    </d2p1:WebshopOrderTransaction>
  </Transactions>
</WebshopOrderLedgerResult>