Skip to content

Commit af034b5

Browse files
authored
Merge pull request #376 from Ecwid/inventory_report
Add new request parameters
2 parents 81ac542 + 26bf19e commit af034b5

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/dto/report/request/ReportRequest.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ data class ReportRequest(
1515
val timeScaleValue: TimeScaleValue? = null,
1616
val comparePeriod: ComparePeriod? = null,
1717
val firstDayOfWeek: FirstDayOfWeek? = null,
18+
val orderByMetric: String? = null,
19+
val orderDirection: String? = null,
20+
val limit: Int? = null,
21+
val offset: Int? = null,
1822
val responseFields: ResponseFields = ResponseFields.All,
1923
) : ApiRequest {
2024

src/main/kotlin/com/ecwid/apiclient/v3/dto/report/result/FetchedReportResponse.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ data class FetchedReportResponse(
1111
val endedAt: Long = 0,
1212
val timeScaleValue: TimeScaleValue? = null,
1313
val comparePeriod: ComparePeriod? = null,
14+
val firstDayOfWeek: String? = null,
15+
val orderByMetric: String? = null,
16+
val orderDirection: String? = null,
17+
val limit: Int? = null,
18+
val offset: Int? = null,
19+
val itemCount: Int? = null,
1420
val aggregatedData: List<FetchedDataItem> = listOf(),
1521
val dataset: List<FetchedDataset>? = null,
1622
val comparePeriodAggregatedData: List<FetchedDataItem>? = null,

src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,19 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(
7575
AllowNullable(ReportRequest::timeScaleValue),
7676
AllowNullable(ReportRequest::comparePeriod),
7777
AllowNullable(ReportRequest::firstDayOfWeek),
78+
AllowNullable(ReportRequest::orderByMetric),
79+
AllowNullable(ReportRequest::orderDirection),
80+
AllowNullable(ReportRequest::limit),
81+
AllowNullable(ReportRequest::offset),
7882

7983
AllowNullable(FetchedReportResponse::timeScaleValue),
8084
AllowNullable(FetchedReportResponse::comparePeriod),
85+
AllowNullable(FetchedReportResponse::firstDayOfWeek),
86+
AllowNullable(FetchedReportResponse::orderByMetric),
87+
AllowNullable(FetchedReportResponse::orderDirection),
88+
AllowNullable(FetchedReportResponse::limit),
89+
AllowNullable(FetchedReportResponse::offset),
90+
AllowNullable(FetchedReportResponse::itemCount),
8191
AllowNullable(FetchedReportResponse::dataset),
8292
AllowNullable(FetchedReportResponse::comparePeriodAggregatedData),
8393
AllowNullable(FetchedReportResponse::comparePeriodDataset),

0 commit comments

Comments
 (0)