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 .xml suffix or ?format=xml
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/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CallCenterActivityTrackerGetListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NAV.ServiceModel"> <Items> <CallCenterActivityViewModel> <Balance>0</Balance> <BonusAmount>0</BonusAmount> <Campaign>String</Campaign> <Carrier>String</Carrier> <CartonNumber>String</CartonNumber> <CustomerPrice>0</CustomerPrice> <CustomerServed>0</CustomerServed> <DiscountPercentage>0</DiscountPercentage> <EarningPercentage>0</EarningPercentage> <EstimatedWeight>0</EstimatedWeight> <FreeAmount>0</FreeAmount> <InvoiceNumber>String</InvoiceNumber> <LocalTax>0</LocalTax> <OperatorId>String</OperatorId> <OrderNumber>String</OrderNumber> <RetailAmount>0</RetailAmount> <ShipDate>0001-01-01T00:00:00</ShipDate> <ShippingFee>0</ShippingFee> <TaxRate>0</TaxRate> <TotalPaymentAmount>0</TotalPaymentAmount> <TransactionAmount>0</TransactionAmount> <TransactionCode>String</TransactionCode> <TransactionDate>String</TransactionDate> <TransactionDescription>String</TransactionDescription> <TransactionNet>0</TransactionNet> <TransactionTime>0001-01-01T00:00:00</TransactionTime> <TransactionType>String</TransactionType> <ValueAfter>String</ValueAfter> <ValueBefore>String</ValueBefore> </CallCenterActivityViewModel> </Items> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <MorePages>false</MorePages> <Page>0</Page> </CallCenterActivityTrackerGetListResponse>