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 .xml suffix or ?format=xml
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/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <C2BGetUnfinishedContractsResponse 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> <BaseUrl>String</BaseUrl> <Topic>String</Topic> <UnfinishedContracts> <C2BGetUnfinishedContractsResponse.UnfinishedContract> <Accessories> <C2BGetUnfinishedContractsResponse.UnfinishedContract.C2BAccessory> <Category>0</Category> <Delivered>false</Delivered> <Description>String</Description> <Id>0</Id> <Price>0</Price> <Sku>String</Sku> <Type>String</Type> </C2BGetUnfinishedContractsResponse.UnfinishedContract.C2BAccessory> </Accessories> <Address>String</Address> <Address2>String</Address2> <City>String</City> <ContractCreated>false</ContractCreated> <Country>String</Country> <CustomerAcct>0</CustomerAcct> <CustomerName>String</CustomerName> <DateTime>0001-01-01T00:00:00</DateTime> <DeliveryDate>0001-01-01T00:00:00</DeliveryDate> <District>String</District> <DownLease>0</DownLease> <DownMaint>0</DownMaint> <DownPay>0</DownPay> <DownTotal>0</DownTotal> <Email>String</Email> <FirstDue>0001-01-01T00:00:00</FirstDue> <Instrument>String</Instrument> <InstrumentGrade>String</InstrumentGrade> <InvoiceCreated>false</InvoiceCreated> <Location xmlns:d4p1="http://schemas.datacontract.org/2004/07/AIM"> <d4p1:Active>false</d4p1:Active> <d4p1:CashSaleAcct>0</d4p1:CashSaleAcct> <d4p1:Desc>String</d4p1:Desc> <d4p1:Id>0</d4p1:Id> <d4p1:InStorePickup>String</d4p1:InStorePickup> <d4p1:Latitude>0</d4p1:Latitude> <d4p1:Longitude>0</d4p1:Longitude> <d4p1:Region>String</d4p1:Region> <d4p1:ShortDesc>String</d4p1:ShortDesc> </Location> <LockedBy>String</LockedBy> <MonthlyLease>0</MonthlyLease> <MonthlyMaint>0</MonthlyMaint> <MonthlyPay>0</MonthlyPay> <Notes>String</Notes> <Phone>String</Phone> <Ref>String</Ref> <Salesperson>String</Salesperson> <School>String</School> <Serial>String</Serial> <State>String</State> <Status>String</Status> <StudentName>String</StudentName> <Teacher>String</Teacher> <WebNotes>String</WebNotes> <Zip>String</Zip> </C2BGetUnfinishedContractsResponse.UnfinishedContract> </UnfinishedContracts> </C2BGetUnfinishedContractsResponse>