AIM Web Services

<back to all web services

C2BGetUnfinishedContractsRequest

C2BGetUnfinishedContracts
Requires active-e Contracts Service.

The following routes are available for this service:
GET/api/C2BGetUnfinishedContracts
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 LocationInfo implements IConvertible
{
    // @DataMember
    int? Id;

    // @DataMember
    String? Desc;

    // @DataMember
    String? ShortDesc;

    // @DataMember
    String? Region;

    // @DataMember
    double? Latitude;

    // @DataMember
    double? Longitude;

    // @DataMember
    String? InStorePickup;

    // @DataMember
    bool? Active;

    // @DataMember
    int? CashSaleAcct;

    LocationInfo({this.Id,this.Desc,this.ShortDesc,this.Region,this.Latitude,this.Longitude,this.InStorePickup,this.Active,this.CashSaleAcct});
    LocationInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Desc = json['Desc'];
        ShortDesc = json['ShortDesc'];
        Region = json['Region'];
        Latitude = JsonConverters.toDouble(json['Latitude']);
        Longitude = JsonConverters.toDouble(json['Longitude']);
        InStorePickup = json['InStorePickup'];
        Active = json['Active'];
        CashSaleAcct = json['CashSaleAcct'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Desc': Desc,
        'ShortDesc': ShortDesc,
        'Region': Region,
        'Latitude': Latitude,
        'Longitude': Longitude,
        'InStorePickup': InStorePickup,
        'Active': Active,
        'CashSaleAcct': CashSaleAcct
    };

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

// @DataContract
class C2BAccessory implements IConvertible
{
    // @DataMember
    int? Id;

    // @DataMember
    String? Description;

    // @DataMember
    double? Price;

    // @DataMember
    String? Type;

    // @DataMember
    String? Sku;

    // @DataMember
    int? Category;

    // @DataMember
    bool? Delivered;

    C2BAccessory({this.Id,this.Description,this.Price,this.Type,this.Sku,this.Category,this.Delivered});
    C2BAccessory.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Description = json['Description'];
        Price = JsonConverters.toDouble(json['Price']);
        Type = json['Type'];
        Sku = json['Sku'];
        Category = json['Category'];
        Delivered = json['Delivered'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Description': Description,
        'Price': Price,
        'Type': Type,
        'Sku': Sku,
        'Category': Category,
        'Delivered': Delivered
    };

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

// @DataContract
class UnfinishedContract implements IConvertible
{
    // @DataMember
    String? CustomerName;

    // @DataMember
    int? CustomerAcct;

    // @DataMember
    String? StudentName;

    // @DataMember
    String? Ref;

    // @DataMember
    DateTime? DateTime;

    // @DataMember
    LocationInfo? Location;

    // @DataMember
    String? District;

    // @DataMember
    String? School;

    // @DataMember
    String? Teacher;

    // @DataMember
    String? Instrument;

    // @DataMember
    String? Status;

    // @DataMember
    String? Notes;

    // @DataMember
    String? LockedBy;

    // @DataMember
    String? InstrumentGrade;

    // @DataMember
    String? Serial;

    // @DataMember
    String? Salesperson;

    // @DataMember
    String? WebNotes;

    // @DataMember
    String? Email;

    // @DataMember
    String? Phone;

    // @DataMember
    DateTime? DeliveryDate;

    // @DataMember
    DateTime? FirstDue;

    // @DataMember
    List<C2BAccessory>? Accessories;

    // @DataMember
    double? DownPay;

    // @DataMember
    double? MonthlyPay;

    // @DataMember
    double? DownMaint;

    // @DataMember
    double? MonthlyMaint;

    // @DataMember
    double? DownLease;

    // @DataMember
    double? MonthlyLease;

    // @DataMember
    double? DownTotal;

    // @DataMember
    String? Address;

    // @DataMember
    String? Address2;

    // @DataMember
    String? City;

    // @DataMember
    String? State;

    // @DataMember
    String? Zip;

    // @DataMember
    String? Country;

    // @DataMember
    bool? InvoiceCreated;

    // @DataMember
    bool? ContractCreated;

    UnfinishedContract({this.CustomerName,this.CustomerAcct,this.StudentName,this.Ref,this.DateTime,this.Location,this.District,this.School,this.Teacher,this.Instrument,this.Status,this.Notes,this.LockedBy,this.InstrumentGrade,this.Serial,this.Salesperson,this.WebNotes,this.Email,this.Phone,this.DeliveryDate,this.FirstDue,this.Accessories,this.DownPay,this.MonthlyPay,this.DownMaint,this.MonthlyMaint,this.DownLease,this.MonthlyLease,this.DownTotal,this.Address,this.Address2,this.City,this.State,this.Zip,this.Country,this.InvoiceCreated,this.ContractCreated});
    UnfinishedContract.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CustomerName = json['CustomerName'];
        CustomerAcct = json['CustomerAcct'];
        StudentName = json['StudentName'];
        Ref = json['Ref'];
        DateTime = JsonConverters.fromJson(json['DateTime'],'DateTime',context!);
        Location = JsonConverters.fromJson(json['Location'],'LocationInfo',context!);
        District = json['District'];
        School = json['School'];
        Teacher = json['Teacher'];
        Instrument = json['Instrument'];
        Status = json['Status'];
        Notes = json['Notes'];
        LockedBy = json['LockedBy'];
        InstrumentGrade = json['InstrumentGrade'];
        Serial = json['Serial'];
        Salesperson = json['Salesperson'];
        WebNotes = json['WebNotes'];
        Email = json['Email'];
        Phone = json['Phone'];
        DeliveryDate = JsonConverters.fromJson(json['DeliveryDate'],'DateTime',context!);
        FirstDue = JsonConverters.fromJson(json['FirstDue'],'DateTime',context!);
        Accessories = JsonConverters.fromJson(json['Accessories'],'List<C2BAccessory>',context!);
        DownPay = JsonConverters.toDouble(json['DownPay']);
        MonthlyPay = JsonConverters.toDouble(json['MonthlyPay']);
        DownMaint = JsonConverters.toDouble(json['DownMaint']);
        MonthlyMaint = JsonConverters.toDouble(json['MonthlyMaint']);
        DownLease = JsonConverters.toDouble(json['DownLease']);
        MonthlyLease = JsonConverters.toDouble(json['MonthlyLease']);
        DownTotal = JsonConverters.toDouble(json['DownTotal']);
        Address = json['Address'];
        Address2 = json['Address2'];
        City = json['City'];
        State = json['State'];
        Zip = json['Zip'];
        Country = json['Country'];
        InvoiceCreated = json['InvoiceCreated'];
        ContractCreated = json['ContractCreated'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CustomerName': CustomerName,
        'CustomerAcct': CustomerAcct,
        'StudentName': StudentName,
        'Ref': Ref,
        'DateTime': JsonConverters.toJson(DateTime,'DateTime',context!),
        'Location': JsonConverters.toJson(Location,'LocationInfo',context!),
        'District': District,
        'School': School,
        'Teacher': Teacher,
        'Instrument': Instrument,
        'Status': Status,
        'Notes': Notes,
        'LockedBy': LockedBy,
        'InstrumentGrade': InstrumentGrade,
        'Serial': Serial,
        'Salesperson': Salesperson,
        'WebNotes': WebNotes,
        'Email': Email,
        'Phone': Phone,
        'DeliveryDate': JsonConverters.toJson(DeliveryDate,'DateTime',context!),
        'FirstDue': JsonConverters.toJson(FirstDue,'DateTime',context!),
        'Accessories': JsonConverters.toJson(Accessories,'List<C2BAccessory>',context!),
        'DownPay': DownPay,
        'MonthlyPay': MonthlyPay,
        'DownMaint': DownMaint,
        'MonthlyMaint': MonthlyMaint,
        'DownLease': DownLease,
        'MonthlyLease': MonthlyLease,
        'DownTotal': DownTotal,
        'Address': Address,
        'Address2': Address2,
        'City': City,
        'State': State,
        'Zip': Zip,
        'Country': Country,
        'InvoiceCreated': InvoiceCreated,
        'ContractCreated': ContractCreated
    };

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

// @DataContract
class C2BGetUnfinishedContractsResponse extends BaseResponse implements IConvertible
{
    // @DataMember
    List<UnfinishedContract>? UnfinishedContracts;

    // @DataMember
    String? Topic;

    // @DataMember
    String? BaseUrl;

    C2BGetUnfinishedContractsResponse({this.UnfinishedContracts,this.Topic,this.BaseUrl});
    C2BGetUnfinishedContractsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'UnfinishedContracts': JsonConverters.toJson(UnfinishedContracts,'List<UnfinishedContract>',context!),
        'Topic': Topic,
        'BaseUrl': BaseUrl
    });

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

/**
* C2BGetUnfinishedContractsRequires active-e Contracts Service.
*/
// @DataContract
class C2BGetUnfinishedContractsRequest extends BaseSecureRequest implements IConvertible
{
    // @DataMember
    String? Type;

    // @DataMember
    int? StartOffset;

    // @DataMember
    int? RecordCount;

    // @DataMember
    String? SearchStr;

    // @DataMember
    bool? IncludeContractsEnteredByOtherUsers;

    // @DataMember
    int? DistrictId;

    // @DataMember
    int? SchoolId;

    // @DataMember
    int? TeacherId;

    // @DataMember
    String? DeliveryDesc;

    // @DataMember
    String? Status;

    C2BGetUnfinishedContractsRequest({this.Type,this.StartOffset,this.RecordCount,this.SearchStr,this.IncludeContractsEnteredByOtherUsers,this.DistrictId,this.SchoolId,this.TeacherId,this.DeliveryDesc,this.Status});
    C2BGetUnfinishedContractsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Type = json['Type'];
        StartOffset = json['StartOffset'];
        RecordCount = json['RecordCount'];
        SearchStr = json['SearchStr'];
        IncludeContractsEnteredByOtherUsers = json['IncludeContractsEnteredByOtherUsers'];
        DistrictId = json['DistrictId'];
        SchoolId = json['SchoolId'];
        TeacherId = json['TeacherId'];
        DeliveryDesc = json['DeliveryDesc'];
        Status = json['Status'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Type': Type,
        'StartOffset': StartOffset,
        'RecordCount': RecordCount,
        'SearchStr': SearchStr,
        'IncludeContractsEnteredByOtherUsers': IncludeContractsEnteredByOtherUsers,
        'DistrictId': DistrictId,
        'SchoolId': SchoolId,
        'TeacherId': TeacherId,
        'DeliveryDesc': DeliveryDesc,
        'Status': Status
    });

    getTypeName() => "C2BGetUnfinishedContractsRequest";
    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()),
    'LocationInfo': TypeInfo(TypeOf.Class, create:() => LocationInfo()),
    'C2BAccessory': TypeInfo(TypeOf.Class, create:() => C2BAccessory()),
    'UnfinishedContract': TypeInfo(TypeOf.Class, create:() => UnfinishedContract()),
    'List<C2BAccessory>': TypeInfo(TypeOf.Class, create:() => <C2BAccessory>[]),
    'C2BGetUnfinishedContractsResponse': TypeInfo(TypeOf.Class, create:() => C2BGetUnfinishedContractsResponse()),
    'List<UnfinishedContract>': TypeInfo(TypeOf.Class, create:() => <UnfinishedContract>[]),
    'C2BGetUnfinishedContractsRequest': TypeInfo(TypeOf.Class, create:() => C2BGetUnfinishedContractsRequest()),
});

Dart C2BGetUnfinishedContractsRequest 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

HTTP + JSON

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

GET /api/C2BGetUnfinishedContracts HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"UnfinishedContracts":[{"CustomerName":"String","CustomerAcct":0,"StudentName":"String","Ref":"String","Location":{"Id":0,"Desc":"String","ShortDesc":"String","Region":"String","Latitude":0,"Longitude":0,"InStorePickup":"String","Active":false,"CashSaleAcct":0},"District":"String","School":"String","Teacher":"String","Instrument":"String","Status":"String","Notes":"String","LockedBy":"String","InstrumentGrade":"String","Serial":"String","Salesperson":"String","WebNotes":"String","Email":"String","Phone":"String","DeliveryDate":"0001-01-01T00:00:00.0000000","FirstDue":"0001-01-01T00:00:00.0000000","Accessories":[{"Id":0,"Description":"String","Price":0,"Type":"String","Sku":"String","Category":0,"Delivered":false}],"DownPay":0,"MonthlyPay":0,"DownMaint":0,"MonthlyMaint":0,"DownLease":0,"MonthlyLease":0,"DownTotal":0,"Address":"String","Address2":"String","City":"String","State":"String","Zip":"String","Country":"String","InvoiceCreated":false,"ContractCreated":false}],"Topic":"String","BaseUrl":"String","Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}