Tests for Time Format (#87)
This commit is contained in:
@@ -13,10 +13,10 @@ type Analytics struct {
|
||||
|
||||
type GetAnalyticsDataParams struct {
|
||||
// Date from which the data will be in the report
|
||||
DateFrom *core.RequestDate `json:"date_from"`
|
||||
DateFrom *core.TimeFormat `json:"date_from"`
|
||||
|
||||
// Date up to which the data will be in the report
|
||||
DateTo *core.RequestDate `json:"date_to"`
|
||||
DateTo *core.TimeFormat `json:"date_to"`
|
||||
|
||||
// Items Enum: "unknownDimension" "sku" "spu" "day" "week" "month" "year" "category1" "category2" "category3" "category4" "brand" "modelID"
|
||||
// Data grouping available to all sellers:
|
||||
|
||||
@@ -23,8 +23,8 @@ func TestGetAnalyticsData(t *testing.T) {
|
||||
http.StatusOK,
|
||||
map[string]string{"Client-Id": "my-client-id", "Api-Key": "my-api-key"},
|
||||
&GetAnalyticsDataParams{
|
||||
DateFrom: core.NewRequestDate(time.Now().Add(time.Duration(30)*24*time.Hour), core.LayoutRequestDateDefault),
|
||||
DateTo: core.NewRequestDate(time.Now(), core.LayoutRequestDateDefault),
|
||||
DateFrom: core.NewTimeFormat(time.Now().Add(time.Duration(30)*24*time.Hour), core.ShortDateLayout),
|
||||
DateTo: core.NewTimeFormat(time.Now(), core.ShortDateLayout),
|
||||
Dimension: []GetAnalyticsDataDimension{SKUDimension, DayDimension},
|
||||
Metrics: []GetAnalyticsDataFilterMetric{HistViewPDP},
|
||||
Sort: []GetAnalyticsDataSort{
|
||||
|
||||
Reference in New Issue
Block a user