AIM Web Services

<back to all web services

GetPOSTotalsRequest

In development, not yet for public use.

The following routes are available for this service:
POST/api/GetPOSTotals
import 'package:servicestack/servicestack.dart';

// @DataContract
class BaseRequest implements IConvertible
{
    /**
    * This is your AIM API Key provided by Tri-Tech
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
    String? ApiKey;

    // @DataMember
    // @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
    String? OAuthToken;

    BaseRequest({this.ApiKey,this.OAuthToken});
    BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

// @DataContract
class BaseSecureRequest extends BaseRequest implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
    String? Token;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
    String? DeviceId;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
    String? AppId;

    BaseSecureRequest({this.Token,this.DeviceId,this.AppId});
    BaseSecureRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Token = json['Token'];
        DeviceId = json['DeviceId'];
        AppId = json['AppId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Token': Token,
        'DeviceId': DeviceId,
        'AppId': AppId
    });

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

// @DataContract
class BaseResponseResult implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
    String? StatusCode;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
    String? Login;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
    String? ErrorCode;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
    String? ErrorDisplayText;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
    String? ErrorMessage;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
    String? DomainName;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
    String? IpAddress;

    BaseResponseResult({this.StatusCode,this.Login,this.ErrorCode,this.ErrorDisplayText,this.ErrorMessage,this.DomainName,this.IpAddress});
    BaseResponseResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        StatusCode = json['StatusCode'];
        Login = json['Login'];
        ErrorCode = json['ErrorCode'];
        ErrorDisplayText = json['ErrorDisplayText'];
        ErrorMessage = json['ErrorMessage'];
        DomainName = json['DomainName'];
        IpAddress = json['IpAddress'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'StatusCode': StatusCode,
        'Login': Login,
        'ErrorCode': ErrorCode,
        'ErrorDisplayText': ErrorDisplayText,
        'ErrorMessage': ErrorMessage,
        'DomainName': DomainName,
        'IpAddress': IpAddress
    };

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

// @DataContract
class BaseResponse implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
    BaseResponseResult? Status;

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

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

    Map<String, dynamic> toJson() => {
        'Status': JsonConverters.toJson(Status,'BaseResponseResult',context!)
    };

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

// @DataContract
class ExceptionInfo implements IConvertible
{
    // @DataMember
    String? Barcode;

    // @DataMember
    String? Description;

    // @DataMember
    String? Base64Image;

    // @DataMember
    int? Category;

    // @DataMember
    int? SubCategory;

    ExceptionInfo({this.Barcode,this.Description,this.Base64Image,this.Category,this.SubCategory});
    ExceptionInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Barcode = json['Barcode'];
        Description = json['Description'];
        Base64Image = json['Base64Image'];
        Category = json['Category'];
        SubCategory = json['SubCategory'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Barcode': Barcode,
        'Description': Description,
        'Base64Image': Base64Image,
        'Category': Category,
        'SubCategory': SubCategory
    };

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

// @DataContract
class PosLineItem implements IScanItem, IConvertible
{
    // @DataMember
    int? SkuPk;

    // @DataMember
    int? SasPk;

    // @DataMember
    String? Sku;

    // @DataMember
    String? Serial;

    // @DataMember
    double? Quantity;

    // @DataMember
    ExceptionInfo? ExceptionInfo;

    // @DataMember
    double? Discount;

    // @DataMember
    int? NicsCat;

    // @DataMember
    int? NicsSub;

    // @DataMember
    double? PriceOverride;

    // @DataMember
    bool? AllowPriceOverrideToIgnoreMinPrice;

    // @DataMember
    String? Notes;

    PosLineItem({this.SkuPk,this.SasPk,this.Sku,this.Serial,this.Quantity,this.ExceptionInfo,this.Discount,this.NicsCat,this.NicsSub,this.PriceOverride,this.AllowPriceOverrideToIgnoreMinPrice,this.Notes});
    PosLineItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        SkuPk = json['SkuPk'];
        SasPk = json['SasPk'];
        Sku = json['Sku'];
        Serial = json['Serial'];
        Quantity = JsonConverters.toDouble(json['Quantity']);
        ExceptionInfo = JsonConverters.fromJson(json['ExceptionInfo'],'ExceptionInfo',context!);
        Discount = JsonConverters.toDouble(json['Discount']);
        NicsCat = json['NicsCat'];
        NicsSub = json['NicsSub'];
        PriceOverride = JsonConverters.toDouble(json['PriceOverride']);
        AllowPriceOverrideToIgnoreMinPrice = json['AllowPriceOverrideToIgnoreMinPrice'];
        Notes = json['Notes'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'SkuPk': SkuPk,
        'SasPk': SasPk,
        'Sku': Sku,
        'Serial': Serial,
        'Quantity': Quantity,
        'ExceptionInfo': JsonConverters.toJson(ExceptionInfo,'ExceptionInfo',context!),
        'Discount': Discount,
        'NicsCat': NicsCat,
        'NicsSub': NicsSub,
        'PriceOverride': PriceOverride,
        'AllowPriceOverrideToIgnoreMinPrice': AllowPriceOverrideToIgnoreMinPrice,
        'Notes': Notes
    };

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

// @DataContract
class PosResponseItem extends PosLineItem implements IConvertible
{
    // @DataMember
    double? PriceEach;

    // @DataMember
    double? Price;

    // @DataMember
    bool? Discountable;

    // @DataMember
    String? ErrorMessage;

    PosResponseItem({this.PriceEach,this.Price,this.Discountable,this.ErrorMessage});
    PosResponseItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        PriceEach = JsonConverters.toDouble(json['PriceEach']);
        Price = JsonConverters.toDouble(json['Price']);
        Discountable = json['Discountable'];
        ErrorMessage = json['ErrorMessage'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'PriceEach': PriceEach,
        'Price': Price,
        'Discountable': Discountable,
        'ErrorMessage': ErrorMessage
    });

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

// @DataContract
class GetPOSTotalsResponse extends BaseResponse implements IConvertible
{
    // @DataMember
    double? SubTotal;

    // @DataMember
    double? TaxTotal;

    // @DataMember
    double? Total;

    // @DataMember
    List<PosResponseItem>? Items;

    GetPOSTotalsResponse({this.SubTotal,this.TaxTotal,this.Total,this.Items});
    GetPOSTotalsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        SubTotal = JsonConverters.toDouble(json['SubTotal']);
        TaxTotal = JsonConverters.toDouble(json['TaxTotal']);
        Total = JsonConverters.toDouble(json['Total']);
        Items = JsonConverters.fromJson(json['Items'],'List<PosResponseItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'SubTotal': SubTotal,
        'TaxTotal': TaxTotal,
        'Total': Total,
        'Items': JsonConverters.toJson(Items,'List<PosResponseItem>',context!)
    });

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

/**
* In development, not yet for public use.
*/
// @DataContract
class GetPOSTotalsRequest extends BaseSecureRequest implements IConvertible
{
    // @DataMember
    int? Acct;

    // @DataMember
    int? LocId;

    // @DataMember
    int? TaxId;

    // @DataMember
    List<PosLineItem>? Items;

    /**
    * MANUAL, BLANKET_PERCENT, BLANKET_AMOUNT, BACK_INTO_TOTAL, or BACK_INTO_TOTAL_WITH_TAX. Defaults to Manual. No line item discounts can be set unless this is MANUAL.
    */
    // @DataMember
    // @ApiMember(Description="MANUAL, BLANKET_PERCENT, BLANKET_AMOUNT, BACK_INTO_TOTAL, or BACK_INTO_TOTAL_WITH_TAX. Defaults to Manual. No line item discounts can be set unless this is MANUAL.", Name="DiscountMode", ParameterType="query")
    String? DiscountMode;

    // @DataMember
    double? DiscountDetail;

    GetPOSTotalsRequest({this.Acct,this.LocId,this.TaxId,this.Items,this.DiscountMode,this.DiscountDetail});
    GetPOSTotalsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Acct = json['Acct'];
        LocId = json['LocId'];
        TaxId = json['TaxId'];
        Items = JsonConverters.fromJson(json['Items'],'List<PosLineItem>',context!);
        DiscountMode = json['DiscountMode'];
        DiscountDetail = JsonConverters.toDouble(json['DiscountDetail']);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Acct': Acct,
        'LocId': LocId,
        'TaxId': TaxId,
        'Items': JsonConverters.toJson(Items,'List<PosLineItem>',context!),
        'DiscountMode': DiscountMode,
        'DiscountDetail': DiscountDetail
    });

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

TypeContext _ctx = TypeContext(library: 'active_ewebservice.biz', types: <String, TypeInfo> {
    'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()),
    'BaseSecureRequest': TypeInfo(TypeOf.Class, create:() => BaseSecureRequest()),
    'BaseResponseResult': TypeInfo(TypeOf.Class, create:() => BaseResponseResult()),
    'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
    'ExceptionInfo': TypeInfo(TypeOf.Class, create:() => ExceptionInfo()),
    'PosLineItem': TypeInfo(TypeOf.Class, create:() => PosLineItem()),
    'PosResponseItem': TypeInfo(TypeOf.Class, create:() => PosResponseItem()),
    'GetPOSTotalsResponse': TypeInfo(TypeOf.Class, create:() => GetPOSTotalsResponse()),
    'List<PosResponseItem>': TypeInfo(TypeOf.Class, create:() => <PosResponseItem>[]),
    'GetPOSTotalsRequest': TypeInfo(TypeOf.Class, create:() => GetPOSTotalsRequest()),
    'List<PosLineItem>': TypeInfo(TypeOf.Class, create:() => <PosLineItem>[]),
});

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

POST /api/GetPOSTotals HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetPOSTotalsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
  <ApiKey>String</ApiKey>
  <OAuthToken>String</OAuthToken>
  <AppId>String</AppId>
  <DeviceId>String</DeviceId>
  <Token>String</Token>
  <Acct>0</Acct>
  <DiscountDetail>0</DiscountDetail>
  <DiscountMode>String</DiscountMode>
  <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM">
    <d2p1:PosLineItem>
      <d2p1:AllowPriceOverrideToIgnoreMinPrice>false</d2p1:AllowPriceOverrideToIgnoreMinPrice>
      <d2p1:Discount>0</d2p1:Discount>
      <d2p1:ExceptionInfo>
        <d2p1:Barcode>String</d2p1:Barcode>
        <d2p1:Base64Image>String</d2p1:Base64Image>
        <d2p1:Category>0</d2p1:Category>
        <d2p1:Description>String</d2p1:Description>
        <d2p1:SubCategory>0</d2p1:SubCategory>
      </d2p1:ExceptionInfo>
      <d2p1:NicsCat>0</d2p1:NicsCat>
      <d2p1:NicsSub>0</d2p1:NicsSub>
      <d2p1:Notes>String</d2p1:Notes>
      <d2p1:PriceOverride>0</d2p1:PriceOverride>
      <d2p1:Quantity>0</d2p1:Quantity>
      <d2p1:SasPk>0</d2p1:SasPk>
      <d2p1:Serial>String</d2p1:Serial>
      <d2p1:Sku>String</d2p1:Sku>
      <d2p1:SkuPk>0</d2p1:SkuPk>
    </d2p1:PosLineItem>
  </Items>
  <LocId>0</LocId>
  <TaxId>0</TaxId>
</GetPOSTotalsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetPOSTotalsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
  <Status>
    <DomainName>String</DomainName>
    <ErrorCode>String</ErrorCode>
    <ErrorDisplayText>String</ErrorDisplayText>
    <ErrorMessage>String</ErrorMessage>
    <IpAddress>String</IpAddress>
    <Login>String</Login>
    <StatusCode>String</StatusCode>
  </Status>
  <Items>
    <PosResponseItem>
      <AllowPriceOverrideToIgnoreMinPrice xmlns="http://schemas.datacontract.org/2004/07/AIM">false</AllowPriceOverrideToIgnoreMinPrice>
      <Discount xmlns="http://schemas.datacontract.org/2004/07/AIM">0</Discount>
      <ExceptionInfo xmlns="http://schemas.datacontract.org/2004/07/AIM">
        <Barcode>String</Barcode>
        <Base64Image>String</Base64Image>
        <Category>0</Category>
        <Description>String</Description>
        <SubCategory>0</SubCategory>
      </ExceptionInfo>
      <NicsCat xmlns="http://schemas.datacontract.org/2004/07/AIM">0</NicsCat>
      <NicsSub xmlns="http://schemas.datacontract.org/2004/07/AIM">0</NicsSub>
      <Notes xmlns="http://schemas.datacontract.org/2004/07/AIM">String</Notes>
      <PriceOverride xmlns="http://schemas.datacontract.org/2004/07/AIM">0</PriceOverride>
      <Quantity xmlns="http://schemas.datacontract.org/2004/07/AIM">0</Quantity>
      <SasPk xmlns="http://schemas.datacontract.org/2004/07/AIM">0</SasPk>
      <Serial xmlns="http://schemas.datacontract.org/2004/07/AIM">String</Serial>
      <Sku xmlns="http://schemas.datacontract.org/2004/07/AIM">String</Sku>
      <SkuPk xmlns="http://schemas.datacontract.org/2004/07/AIM">0</SkuPk>
      <Discountable>false</Discountable>
      <ErrorMessage>String</ErrorMessage>
      <Price>0</Price>
      <PriceEach>0</PriceEach>
    </PosResponseItem>
  </Items>
  <SubTotal>0</SubTotal>
  <TaxTotal>0</TaxTotal>
  <Total>0</Total>
</GetPOSTotalsResponse>