GET | /call-center/activities/{AccountNumber}/{TransactionType}/{Page} | ||
---|---|---|---|
GET | /call-center/activities/{AccountNumber}/{TransactionType} |
import 'package:servicestack/servicestack.dart';
class CallCenterActivityViewModel implements IConvertible
{
String? transactionType;
double? transactionAmount;
String? transactionDescription;
String? transactionDate;
DateTime? transactionTime;
double? transactionNet;
double? earningPercentage;
double? totalPaymentAmount;
double? balance;
String? transactionCode;
String? campaign;
double? freeAmount;
double? bonusAmount;
double? discountPercentage;
double? taxRate;
String? invoiceNumber;
String? orderNumber;
double? retailAmount;
double? customerServed;
double? customerPrice;
String? operatorId;
double? shippingFee;
double? localTax;
DateTime? shipDate;
String? carrier;
double? estimatedWeight;
String? cartonNumber;
String? valueBefore;
String? valueAfter;
CallCenterActivityViewModel({this.transactionType,this.transactionAmount,this.transactionDescription,this.transactionDate,this.transactionTime,this.transactionNet,this.earningPercentage,this.totalPaymentAmount,this.balance,this.transactionCode,this.campaign,this.freeAmount,this.bonusAmount,this.discountPercentage,this.taxRate,this.invoiceNumber,this.orderNumber,this.retailAmount,this.customerServed,this.customerPrice,this.operatorId,this.shippingFee,this.localTax,this.shipDate,this.carrier,this.estimatedWeight,this.cartonNumber,this.valueBefore,this.valueAfter});
CallCenterActivityViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
transactionType = json['transactionType'];
transactionAmount = JsonConverters.toDouble(json['transactionAmount']);
transactionDescription = json['transactionDescription'];
transactionDate = json['transactionDate'];
transactionTime = JsonConverters.fromJson(json['transactionTime'],'DateTime',context!);
transactionNet = JsonConverters.toDouble(json['transactionNet']);
earningPercentage = JsonConverters.toDouble(json['earningPercentage']);
totalPaymentAmount = JsonConverters.toDouble(json['totalPaymentAmount']);
balance = JsonConverters.toDouble(json['balance']);
transactionCode = json['transactionCode'];
campaign = json['campaign'];
freeAmount = JsonConverters.toDouble(json['freeAmount']);
bonusAmount = JsonConverters.toDouble(json['bonusAmount']);
discountPercentage = JsonConverters.toDouble(json['discountPercentage']);
taxRate = JsonConverters.toDouble(json['taxRate']);
invoiceNumber = json['invoiceNumber'];
orderNumber = json['orderNumber'];
retailAmount = JsonConverters.toDouble(json['retailAmount']);
customerServed = JsonConverters.toDouble(json['customerServed']);
customerPrice = JsonConverters.toDouble(json['customerPrice']);
operatorId = json['operatorId'];
shippingFee = JsonConverters.toDouble(json['shippingFee']);
localTax = JsonConverters.toDouble(json['localTax']);
shipDate = JsonConverters.fromJson(json['shipDate'],'DateTime',context!);
carrier = json['carrier'];
estimatedWeight = JsonConverters.toDouble(json['estimatedWeight']);
cartonNumber = json['cartonNumber'];
valueBefore = json['valueBefore'];
valueAfter = json['valueAfter'];
return this;
}
Map<String, dynamic> toJson() => {
'transactionType': transactionType,
'transactionAmount': transactionAmount,
'transactionDescription': transactionDescription,
'transactionDate': transactionDate,
'transactionTime': JsonConverters.toJson(transactionTime,'DateTime',context!),
'transactionNet': transactionNet,
'earningPercentage': earningPercentage,
'totalPaymentAmount': totalPaymentAmount,
'balance': balance,
'transactionCode': transactionCode,
'campaign': campaign,
'freeAmount': freeAmount,
'bonusAmount': bonusAmount,
'discountPercentage': discountPercentage,
'taxRate': taxRate,
'invoiceNumber': invoiceNumber,
'orderNumber': orderNumber,
'retailAmount': retailAmount,
'customerServed': customerServed,
'customerPrice': customerPrice,
'operatorId': operatorId,
'shippingFee': shippingFee,
'localTax': localTax,
'shipDate': JsonConverters.toJson(shipDate,'DateTime',context!),
'carrier': carrier,
'estimatedWeight': estimatedWeight,
'cartonNumber': cartonNumber,
'valueBefore': valueBefore,
'valueAfter': valueAfter
};
getTypeName() => "CallCenterActivityViewModel";
TypeContext? context = _ctx;
}
class CallCenterActivityTrackerGetListResponse extends GetListResponse<CallCenterActivityViewModel> implements IConvertible
{
int? page;
bool? morePages;
CallCenterActivityTrackerGetListResponse({this.page,this.morePages});
CallCenterActivityTrackerGetListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
page = json['page'];
morePages = json['morePages'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'page': page,
'morePages': morePages
});
getTypeName() => "CallCenterActivityTrackerGetListResponse";
TypeContext? context = _ctx;
}
class CallCenterActivityTrackerGetList implements IGet, IConvertible
{
double? accountNumber;
String? transactionType;
int? page;
CallCenterActivityTrackerGetList({this.accountNumber,this.transactionType,this.page});
CallCenterActivityTrackerGetList.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
accountNumber = JsonConverters.toDouble(json['accountNumber']);
transactionType = json['transactionType'];
page = json['page'];
return this;
}
Map<String, dynamic> toJson() => {
'accountNumber': accountNumber,
'transactionType': transactionType,
'page': page
};
getTypeName() => "CallCenterActivityTrackerGetList";
TypeContext? context = _ctx;
}
class GetListResponse<TEntity> implements IConvertible
{
List<TEntity>? items;
ResponseStatus? responseStatus;
GetListResponse({this.items,this.responseStatus});
GetListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
items = JsonConverters.fromJson(json['items'],'List<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!);
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'items': JsonConverters.toJson(items,'List<TEntity>',context!),
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetListResponse<$TEntity>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'extensions.avon.ca', types: <String, TypeInfo> {
'CallCenterActivityViewModel': TypeInfo(TypeOf.Class, create:() => CallCenterActivityViewModel()),
'CallCenterActivityTrackerGetListResponse': TypeInfo(TypeOf.Class, create:() => CallCenterActivityTrackerGetListResponse()),
'CallCenterActivityTrackerGetList': TypeInfo(TypeOf.Class, create:() => CallCenterActivityTrackerGetList()),
'GetListResponse<TEntity>': TypeInfo(TypeOf.GenericDef,create:() => GetListResponse()),
});
Dart CallCenterActivityTrackerGetList 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /call-center/activities/{AccountNumber}/{TransactionType}/{Page} HTTP/1.1 Host: extensions.avon.ca Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"page":0,"morePages":false,"items":[{"transactionType":"String","transactionAmount":0,"transactionDescription":"String","transactionDate":"String","transactionTime":"0001-01-01T00:00:00.0000000","transactionNet":0,"earningPercentage":0,"totalPaymentAmount":0,"balance":0,"transactionCode":"String","campaign":"String","freeAmount":0,"bonusAmount":0,"discountPercentage":0,"taxRate":0,"invoiceNumber":"String","orderNumber":"String","retailAmount":0,"customerServed":0,"customerPrice":0,"operatorId":"String","shippingFee":0,"localTax":0,"shipDate":"0001-01-01T00:00:00.0000000","carrier":"String","estimatedWeight":0,"cartonNumber":"String","valueBefore":"String","valueAfter":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}