| GET | /call-center/profiles/{AccountNumber}/sales-history/{Campaign} | ||
|---|---|---|---|
| GET | /call-center/profiles/{AccountNumber}/sales-history |
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CallCenterProfileSalesHistoryGetListViewModel:
account_number: Optional[Decimal] = None
year: Optional[int] = None
campaign: Optional[str] = None
campaign_sales: Optional[Decimal] = None
award_sales: Optional[Decimal] = None
net_sales: Optional[Decimal] = None
order_builders: Optional[Decimal] = None
sales_aids: Optional[Decimal] = None
demo_sales: Optional[Decimal] = None
returns: Optional[Decimal] = None
leadership: Optional[Decimal] = None
earnings_percent: Optional[Decimal] = None
free_amount: Optional[Decimal] = None
customer_price: Optional[Decimal] = None
sales_aids_order: Optional[Decimal] = None
order_size: Optional[Decimal] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CallCenterProfileSalesHistoryGetListResponse(GetListResponse[CallCenterProfileSalesHistoryGetListViewModel]):
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CallCenterProfileSalesHistoryGetList(IGet):
account_number: Optional[Decimal] = None
campaign: Optional[str] = None
TEntity = TypeVar('TEntity')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetListResponse(Generic[TEntity]):
items: Optional[List[TEntity]] = None
response_status: Optional[ResponseStatus] = None
Python CallCenterProfileSalesHistoryGetList 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/profiles/{AccountNumber}/sales-history/{Campaign} HTTP/1.1
Host: extensions.avon.ca
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
items:
[
{
accountNumber: 0,
year: 0,
campaign: String,
campaignSales: 0,
awardSales: 0,
netSales: 0,
orderBuilders: 0,
salesAids: 0,
demoSales: 0,
returns: 0,
leadership: 0,
earningsPercent: 0,
freeAmount: 0,
customerPrice: 0,
salesAidsOrder: 0,
orderSize: 0
}
],
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}