OSZZ API

<back to all web services

SearchOrder

import 'package:servicestack/servicestack.dart';

// @DataContract
class SearchOrderResponse implements IConvertible
{
    // @DataMember
    ResponseStatus? responseStatus;

    // @DataMember
    int? totalResultsCount;

    // @DataMember
    List<OrderItemModel>? result;

    SearchOrderResponse({this.responseStatus,this.totalResultsCount,this.result});
    SearchOrderResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        totalResultsCount = json['totalResultsCount'];
        result = JsonConverters.fromJson(json['result'],'List<OrderItemModel>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
        'totalResultsCount': totalResultsCount,
        'result': JsonConverters.toJson(result,'List<OrderItemModel>',context!)
    };

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

// @DataContract
class SearchOrder implements IConvertible
{
    // @DataMember
    String? comment;

    // @DataMember
    int? fromGlobalId;

    // @DataMember
    int? toGlobalId;

    // @DataMember
    int? page;

    // @DataMember
    DateTime? fromDate;

    // @DataMember
    DateTime? toDate;

    // @DataMember
    String? tokenId;

    SearchOrder({this.comment,this.fromGlobalId,this.toGlobalId,this.page,this.fromDate,this.toDate,this.tokenId});
    SearchOrder.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        comment = json['comment'];
        fromGlobalId = json['fromGlobalId'];
        toGlobalId = json['toGlobalId'];
        page = json['page'];
        fromDate = JsonConverters.fromJson(json['fromDate'],'DateTime',context!);
        toDate = JsonConverters.fromJson(json['toDate'],'DateTime',context!);
        tokenId = json['tokenId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'comment': comment,
        'fromGlobalId': fromGlobalId,
        'toGlobalId': toGlobalId,
        'page': page,
        'fromDate': JsonConverters.toJson(fromDate,'DateTime',context!),
        'toDate': JsonConverters.toJson(toDate,'DateTime',context!),
        'tokenId': tokenId
    };

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

// @DataContract
class OrderItemModel implements IConvertible
{
    // @DataMember
    String? orderItemId;

    // @DataMember
    int? globalId;

    // @DataMember
    DateTime? date;

    // @DataMember
    DateTime? lastUpdate;

    // @DataMember
    String? productId;

    // @DataMember
    String? productNumber;

    // @DataMember
    String? productTitle;

    // @DataMember
    String? manufacturerTitle;

    // @DataMember
    String? replacementProductId;

    // @DataMember
    String? replacementProductNumber;

    // @DataMember
    String? replacementProductTitle;

    // @DataMember
    String? replacementManufacturerTitle;

    // @DataMember
    int? quantity;

    // @DataMember
    double? price;

    // @DataMember
    double? initialPrice;

    // @DataMember
    String? comment;

    // @DataMember
    int? expectedDeliveryDays;

    // @DataMember
    int? guaranteedDeliveryDays;

    // @DataMember
    DateTime? guaranteedDeliveryTime;

    // @DataMember
    DateTime? expectedDeliveryTime;

    // @DataMember
    String? priceListLogo;

    // @DataMember
    String? delivery;

    // @DataMember
    bool? isCash;

    // @DataMember
    DateTime? deliveryDate;

    // @DataMember
    bool? priceListUseSchedule;

    // @DataMember
    String? supplierAliasId;

    // @DataMember
    String? subcustomerId;

    // @DataMember
    bool? isCashSubcustomer;

    // @DataMember
    String? subcustomerLogo;

    // @DataMember
    double? initialSubcustomerPrice;

    // @DataMember
    double? subcustomerPrice;

    // @DataMember
    List<OrderItemMotionModel>? motions;

    OrderItemModel({this.orderItemId,this.globalId,this.date,this.lastUpdate,this.productId,this.productNumber,this.productTitle,this.manufacturerTitle,this.replacementProductId,this.replacementProductNumber,this.replacementProductTitle,this.replacementManufacturerTitle,this.quantity,this.price,this.initialPrice,this.comment,this.expectedDeliveryDays,this.guaranteedDeliveryDays,this.guaranteedDeliveryTime,this.expectedDeliveryTime,this.priceListLogo,this.delivery,this.isCash,this.deliveryDate,this.priceListUseSchedule,this.supplierAliasId,this.subcustomerId,this.isCashSubcustomer,this.subcustomerLogo,this.initialSubcustomerPrice,this.subcustomerPrice,this.motions});
    OrderItemModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        orderItemId = json['orderItemId'];
        globalId = json['globalId'];
        date = JsonConverters.fromJson(json['date'],'DateTime',context!);
        lastUpdate = JsonConverters.fromJson(json['lastUpdate'],'DateTime',context!);
        productId = json['productId'];
        productNumber = json['productNumber'];
        productTitle = json['productTitle'];
        manufacturerTitle = json['manufacturerTitle'];
        replacementProductId = json['replacementProductId'];
        replacementProductNumber = json['replacementProductNumber'];
        replacementProductTitle = json['replacementProductTitle'];
        replacementManufacturerTitle = json['replacementManufacturerTitle'];
        quantity = json['quantity'];
        price = JsonConverters.toDouble(json['price']);
        initialPrice = JsonConverters.toDouble(json['initialPrice']);
        comment = json['comment'];
        expectedDeliveryDays = json['expectedDeliveryDays'];
        guaranteedDeliveryDays = json['guaranteedDeliveryDays'];
        guaranteedDeliveryTime = JsonConverters.fromJson(json['guaranteedDeliveryTime'],'DateTime',context!);
        expectedDeliveryTime = JsonConverters.fromJson(json['expectedDeliveryTime'],'DateTime',context!);
        priceListLogo = json['priceListLogo'];
        delivery = json['delivery'];
        isCash = json['isCash'];
        deliveryDate = JsonConverters.fromJson(json['deliveryDate'],'DateTime',context!);
        priceListUseSchedule = json['priceListUseSchedule'];
        supplierAliasId = json['supplierAliasId'];
        subcustomerId = json['subcustomerId'];
        isCashSubcustomer = json['isCashSubcustomer'];
        subcustomerLogo = json['subcustomerLogo'];
        initialSubcustomerPrice = JsonConverters.toDouble(json['initialSubcustomerPrice']);
        subcustomerPrice = JsonConverters.toDouble(json['subcustomerPrice']);
        motions = JsonConverters.fromJson(json['motions'],'List<OrderItemMotionModel>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'orderItemId': orderItemId,
        'globalId': globalId,
        'date': JsonConverters.toJson(date,'DateTime',context!),
        'lastUpdate': JsonConverters.toJson(lastUpdate,'DateTime',context!),
        'productId': productId,
        'productNumber': productNumber,
        'productTitle': productTitle,
        'manufacturerTitle': manufacturerTitle,
        'replacementProductId': replacementProductId,
        'replacementProductNumber': replacementProductNumber,
        'replacementProductTitle': replacementProductTitle,
        'replacementManufacturerTitle': replacementManufacturerTitle,
        'quantity': quantity,
        'price': price,
        'initialPrice': initialPrice,
        'comment': comment,
        'expectedDeliveryDays': expectedDeliveryDays,
        'guaranteedDeliveryDays': guaranteedDeliveryDays,
        'guaranteedDeliveryTime': JsonConverters.toJson(guaranteedDeliveryTime,'DateTime',context!),
        'expectedDeliveryTime': JsonConverters.toJson(expectedDeliveryTime,'DateTime',context!),
        'priceListLogo': priceListLogo,
        'delivery': delivery,
        'isCash': isCash,
        'deliveryDate': JsonConverters.toJson(deliveryDate,'DateTime',context!),
        'priceListUseSchedule': priceListUseSchedule,
        'supplierAliasId': supplierAliasId,
        'subcustomerId': subcustomerId,
        'isCashSubcustomer': isCashSubcustomer,
        'subcustomerLogo': subcustomerLogo,
        'initialSubcustomerPrice': initialSubcustomerPrice,
        'subcustomerPrice': subcustomerPrice,
        'motions': JsonConverters.toJson(motions,'List<OrderItemMotionModel>',context!)
    };

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

enum OrderItemState
{
    Undefined,
    Sold,
    Refused,
    InOrder,
    InSupplierCart,
    Purchased,
    NotDistributed,
    InCart,
    Ready,
    Distributed,
    SupplierRefused,
    Archived,
    GivingOutScan,
    InProcessing,
    Return,
    Returned,
    RefusedByClient,
    PurchasedBySupplier,
    InParentCart,
    InSupplierWebCart,
    WorkInSupplierWebCart,
    Deficit,
}

// @DataContract
class OrderItemMotionModel implements IConvertible
{
    // @DataMember
    String? motionId;

    // @DataMember
    String? parentId;

    // @DataMember
    OrderItemState? state;

    // @DataMember
    String? stateTitle;

    // @DataMember
    DateTime? date;

    // @DataMember
    int? initialQuantity;

    // @DataMember
    int? quantity;

    // @DataMember
    DateTime? plannedDeliveryDate;

    OrderItemMotionModel({this.motionId,this.parentId,this.state,this.stateTitle,this.date,this.initialQuantity,this.quantity,this.plannedDeliveryDate});
    OrderItemMotionModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        motionId = json['motionId'];
        parentId = json['parentId'];
        state = JsonConverters.fromJson(json['state'],'OrderItemState',context!);
        stateTitle = json['stateTitle'];
        date = JsonConverters.fromJson(json['date'],'DateTime',context!);
        initialQuantity = json['initialQuantity'];
        quantity = json['quantity'];
        plannedDeliveryDate = JsonConverters.fromJson(json['plannedDeliveryDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'motionId': motionId,
        'parentId': parentId,
        'state': JsonConverters.toJson(state,'OrderItemState',context!),
        'stateTitle': stateTitle,
        'date': JsonConverters.toJson(date,'DateTime',context!),
        'initialQuantity': initialQuantity,
        'quantity': quantity,
        'plannedDeliveryDate': JsonConverters.toJson(plannedDeliveryDate,'DateTime',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'api.oszz.ru', types: <String, TypeInfo> {
    'SearchOrderResponse': TypeInfo(TypeOf.Class, create:() => SearchOrderResponse()),
    'List<OrderItemModel>': TypeInfo(TypeOf.Class, create:() => <OrderItemModel>[]),
    'OrderItemModel': TypeInfo(TypeOf.Class, create:() => OrderItemModel()),
    'SearchOrder': TypeInfo(TypeOf.Class, create:() => SearchOrder()),
    'List<OrderItemMotionModel>': TypeInfo(TypeOf.Class, create:() => <OrderItemMotionModel>[]),
    'OrderItemMotionModel': TypeInfo(TypeOf.Class, create:() => OrderItemMotionModel()),
    'OrderItemState': TypeInfo(TypeOf.Enum, enumValues:OrderItemState.values),
});

Dart SearchOrder DTOs

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

HTTP + SOAP12

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

POST /soap12 HTTP/1.1 
Host: api.oszz.ru 
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>

<SearchOrder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Comment>String</Comment>
  <FromDate>0001-01-01T00:00:00</FromDate>
  <FromGlobalId>0</FromGlobalId>
  <Page>0</Page>
  <ToDate>0001-01-01T00:00:00</ToDate>
  <ToGlobalId>0</ToGlobalId>
  <TokenId>00000000-0000-0000-0000-000000000000</TokenId>
</SearchOrder>

    </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>

<SearchOrderResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ResponseStatus>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StackTrace>String</StackTrace>
    <Errors>
      <ResponseError>
        <ErrorCode>String</ErrorCode>
        <FieldName>String</FieldName>
        <Message>String</Message>
        <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Meta>
      </ResponseError>
    </Errors>
    <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Meta>
  </ResponseStatus>
  <Result>
    <OrderItemModel>
      <Comment>String</Comment>
      <Date>0001-01-01T00:00:00</Date>
      <Delivery>String</Delivery>
      <DeliveryDate>0001-01-01T00:00:00</DeliveryDate>
      <ExpectedDeliveryDays>0</ExpectedDeliveryDays>
      <ExpectedDeliveryTime>0001-01-01T00:00:00</ExpectedDeliveryTime>
      <GlobalId>0</GlobalId>
      <GuaranteedDeliveryDays>0</GuaranteedDeliveryDays>
      <GuaranteedDeliveryTime>0001-01-01T00:00:00</GuaranteedDeliveryTime>
      <InitialPrice>0</InitialPrice>
      <InitialSubcustomerPrice>0</InitialSubcustomerPrice>
      <IsCash>false</IsCash>
      <IsCashSubcustomer>false</IsCashSubcustomer>
      <LastUpdate>0001-01-01T00:00:00</LastUpdate>
      <ManufacturerTitle>String</ManufacturerTitle>
      <Motions>
        <OrderItemMotionModel>
          <Date>0001-01-01T00:00:00</Date>
          <InitialQuantity>0</InitialQuantity>
          <MotionId>00000000-0000-0000-0000-000000000000</MotionId>
          <ParentId>00000000-0000-0000-0000-000000000000</ParentId>
          <PlannedDeliveryDate>0001-01-01T00:00:00</PlannedDeliveryDate>
          <Quantity>0</Quantity>
          <State>Undefined</State>
          <StateTitle>String</StateTitle>
        </OrderItemMotionModel>
      </Motions>
      <OrderItemId>00000000-0000-0000-0000-000000000000</OrderItemId>
      <Price>0</Price>
      <PriceListLogo>String</PriceListLogo>
      <PriceListUseSchedule>false</PriceListUseSchedule>
      <ProductId>00000000-0000-0000-0000-000000000000</ProductId>
      <ProductNumber>String</ProductNumber>
      <ProductTitle>String</ProductTitle>
      <Quantity>0</Quantity>
      <ReplacementManufacturerTitle>String</ReplacementManufacturerTitle>
      <ReplacementProductId>00000000-0000-0000-0000-000000000000</ReplacementProductId>
      <ReplacementProductNumber>String</ReplacementProductNumber>
      <ReplacementProductTitle>String</ReplacementProductTitle>
      <SubcustomerId>00000000-0000-0000-0000-000000000000</SubcustomerId>
      <SubcustomerLogo>String</SubcustomerLogo>
      <SubcustomerPrice>0</SubcustomerPrice>
      <SupplierAliasId>00000000-0000-0000-0000-000000000000</SupplierAliasId>
    </OrderItemModel>
  </Result>
  <TotalResultsCount>0</TotalResultsCount>
</SearchOrderResponse>

    </soap12:Body>
</soap12:Envelope>