AIM Web Services

<back to all web services

GetCustomerHistoryRequest

GetCustomerHistory
Requires active-e Customer Service.

The following routes are available for this service:
POST, GET/api/GetCustomerHistory
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 CustomerHistoryGeneric implements IConvertible
{
    // @DataMember
    DateTime? Date;

    // @DataMember
    String? DateStr;

    // @DataMember
    String? Ref;

    // @DataMember
    String? Desc;

    // @DataMember
    double? Amount;

    // @DataMember
    double? OrigAmount;

    // @DataMember
    bool? Late;

    // @DataMember
    String? RefType;

    // @DataMember
    String? PO;

    // @DataMember
    DateTime? EstReceivedDate;

    CustomerHistoryGeneric({this.Date,this.DateStr,this.Ref,this.Desc,this.Amount,this.OrigAmount,this.Late,this.RefType,this.PO,this.EstReceivedDate});
    CustomerHistoryGeneric.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Date = JsonConverters.fromJson(json['Date'],'DateTime',context!);
        DateStr = json['DateStr'];
        Ref = json['Ref'];
        Desc = json['Desc'];
        Amount = JsonConverters.toDouble(json['Amount']);
        OrigAmount = JsonConverters.toDouble(json['OrigAmount']);
        Late = json['Late'];
        RefType = json['RefType'];
        PO = json['PO'];
        EstReceivedDate = JsonConverters.fromJson(json['EstReceivedDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Date': JsonConverters.toJson(Date,'DateTime',context!),
        'DateStr': DateStr,
        'Ref': Ref,
        'Desc': Desc,
        'Amount': Amount,
        'OrigAmount': OrigAmount,
        'Late': Late,
        'RefType': RefType,
        'PO': PO,
        'EstReceivedDate': JsonConverters.toJson(EstReceivedDate,'DateTime',context!)
    };

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

// @DataContract
class GetCustomerHistoryResponse extends BaseResponse implements IConvertible
{
    // @DataMember
    List<CustomerHistoryGeneric>? CustomerHistory;

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'CustomerHistory': JsonConverters.toJson(CustomerHistory,'List<CustomerHistoryGeneric>',context!)
    });

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

/**
* GetCustomerHistoryRequires active-e Customer Service.
*/
// @DataContract
class GetCustomerHistoryRequest extends BaseSecureRequest implements IConvertible
{
    // @DataMember
    bool? GetInvoices;

    // @DataMember
    bool? GetTickets;

    // @DataMember
    bool? GetProposals;

    // @DataMember
    bool? GetContracts;

    // @DataMember
    bool? GetOrders;

    // @DataMember
    bool? GetShortTermRentals;

    // @DataMember
    bool? GetWebPayments;

    // @DataMember
    bool? ShowClosed;

    // @DataMember
    bool? GetPaymentsDue;

    // @DataMember
    String? DateFrom;

    // @DataMember
    String? DateTo;

    // @DataMember
    int? Acct;

    // @DataMember
    bool? GetMemberships;

    // @DataMember
    bool? GetPendingWebOrders;

    // @DataMember
    bool? GetFutureTeeTimes;

    // @DataMember
    bool? GetStationReservations;

    // @DataMember
    bool? GetPendingWebRentals;

    // @DataMember
    bool? GetValuePacks;

    // @DataMember
    bool? IncludeUninvoicedScheduling;

    // @DataMember
    bool? IncludeOnHold;

    // @DataMember
    bool? GetConsignments;

    // @DataMember
    bool? GetRecurringHeaderInfo;

    GetCustomerHistoryRequest({this.GetInvoices,this.GetTickets,this.GetProposals,this.GetContracts,this.GetOrders,this.GetShortTermRentals,this.GetWebPayments,this.ShowClosed,this.GetPaymentsDue,this.DateFrom,this.DateTo,this.Acct,this.GetMemberships,this.GetPendingWebOrders,this.GetFutureTeeTimes,this.GetStationReservations,this.GetPendingWebRentals,this.GetValuePacks,this.IncludeUninvoicedScheduling,this.IncludeOnHold,this.GetConsignments,this.GetRecurringHeaderInfo});
    GetCustomerHistoryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        GetInvoices = json['GetInvoices'];
        GetTickets = json['GetTickets'];
        GetProposals = json['GetProposals'];
        GetContracts = json['GetContracts'];
        GetOrders = json['GetOrders'];
        GetShortTermRentals = json['GetShortTermRentals'];
        GetWebPayments = json['GetWebPayments'];
        ShowClosed = json['ShowClosed'];
        GetPaymentsDue = json['GetPaymentsDue'];
        DateFrom = json['DateFrom'];
        DateTo = json['DateTo'];
        Acct = json['Acct'];
        GetMemberships = json['GetMemberships'];
        GetPendingWebOrders = json['GetPendingWebOrders'];
        GetFutureTeeTimes = json['GetFutureTeeTimes'];
        GetStationReservations = json['GetStationReservations'];
        GetPendingWebRentals = json['GetPendingWebRentals'];
        GetValuePacks = json['GetValuePacks'];
        IncludeUninvoicedScheduling = json['IncludeUninvoicedScheduling'];
        IncludeOnHold = json['IncludeOnHold'];
        GetConsignments = json['GetConsignments'];
        GetRecurringHeaderInfo = json['GetRecurringHeaderInfo'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'GetInvoices': GetInvoices,
        'GetTickets': GetTickets,
        'GetProposals': GetProposals,
        'GetContracts': GetContracts,
        'GetOrders': GetOrders,
        'GetShortTermRentals': GetShortTermRentals,
        'GetWebPayments': GetWebPayments,
        'ShowClosed': ShowClosed,
        'GetPaymentsDue': GetPaymentsDue,
        'DateFrom': DateFrom,
        'DateTo': DateTo,
        'Acct': Acct,
        'GetMemberships': GetMemberships,
        'GetPendingWebOrders': GetPendingWebOrders,
        'GetFutureTeeTimes': GetFutureTeeTimes,
        'GetStationReservations': GetStationReservations,
        'GetPendingWebRentals': GetPendingWebRentals,
        'GetValuePacks': GetValuePacks,
        'IncludeUninvoicedScheduling': IncludeUninvoicedScheduling,
        'IncludeOnHold': IncludeOnHold,
        'GetConsignments': GetConsignments,
        'GetRecurringHeaderInfo': GetRecurringHeaderInfo
    });

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

Dart GetCustomerHistoryRequest DTOs

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

HTTP + OTHER

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

POST /api/GetCustomerHistory HTTP/1.1 
Host: active-ewebservice.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"GetInvoices":false,"GetTickets":false,"GetProposals":false,"GetContracts":false,"GetOrders":false,"GetShortTermRentals":false,"GetWebPayments":false,"ShowClosed":false,"GetPaymentsDue":false,"DateFrom":"String","DateTo":"String","Acct":0,"GetMemberships":false,"GetPendingWebOrders":false,"GetFutureTeeTimes":false,"GetStationReservations":false,"GetPendingWebRentals":false,"GetValuePacks":false,"IncludeUninvoicedScheduling":false,"IncludeOnHold":false,"GetConsignments":false,"GetRecurringHeaderInfo":false,"Token":"String","DeviceId":"String","AppId":"String","ApiKey":"String","OAuthToken":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"CustomerHistory":[{}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}