| GET | /call-center/activities/{AccountNumber}/{TransactionType}/{Page} | ||
|---|---|---|---|
| GET | /call-center/activities/{AccountNumber}/{TransactionType} |
import Foundation
import ServiceStack
public class CallCenterActivityTrackerGetList : IGet, Codable
{
public var accountNumber:Double?
public var transactionType:String?
public var page:Int?
required public init(){}
}
public class CallCenterActivityTrackerGetListResponse : GetListResponse<CallCenterActivityViewModel>
{
public var page:Int?
public var morePages:Bool?
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case page
case morePages
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
page = try container.decodeIfPresent(Int.self, forKey: .page)
morePages = try container.decodeIfPresent(Bool.self, forKey: .morePages)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if page != nil { try container.encode(page, forKey: .page) }
if morePages != nil { try container.encode(morePages, forKey: .morePages) }
}
}
public class GetListResponse<TEntity : Codable> : Codable
{
public var items:[TEntity] = []
public var responseStatus:ResponseStatus?
required public init(){}
}
public class CallCenterActivityViewModel : Codable
{
public var transactionType:String?
public var transactionAmount:Double?
public var transactionDescription:String?
public var transactionDate:String?
public var transactionTime:Date?
public var transactionNet:Double?
public var earningPercentage:Double?
public var totalPaymentAmount:Double?
public var balance:Double?
public var transactionCode:String?
public var campaign:String?
public var freeAmount:Double?
public var bonusAmount:Double?
public var discountPercentage:Double?
public var taxRate:Double?
public var invoiceNumber:String?
public var orderNumber:String?
public var retailAmount:Double?
public var customerServed:Double?
public var customerPrice:Double?
public var operatorId:String?
public var shippingFee:Double?
public var localTax:Double?
public var shipDate:Date?
public var carrier:String?
public var estimatedWeight:Double?
public var cartonNumber:String?
public var valueBefore:String?
public var valueAfter:String?
required public init(){}
}
Swift CallCenterActivityTrackerGetList DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
page: 0,
morePages: False,
items:
[
{
transactionType: String,
transactionAmount: 0,
transactionDescription: String,
transactionDate: String,
transactionTime: 0001-01-01T00:00:00,
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,
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
}
}
}