Skip to content

Commit 341eff2

Browse files
committed
ECWID-140946 New Reports: internal API for topOfCategoriesByOrders report:
- added AdditionalCategoryData - added topOfCategoriesByOrders report type
1 parent dafb3e9 commit 341eff2

4 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/ApiClientHelper.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ private fun createAdditionalDataPolymorphicType(): PolymorphicType<FetchedReport
549549
ABANDONED_CARTS.name.lowercase() to AdditionalAbandonedCartData::class.java,
550550
SHIPPING.name.lowercase() to AdditionalShippingData::class.java,
551551
LANDING.name.lowercase() to AdditionalLandingData::class.java,
552+
CATEGORY.name.lowercase() to AdditionalCategoryData::class.java,
552553
)
553554
)
554555
}

src/main/kotlin/com/ecwid/apiclient/v3/dto/report/enums/ReportType.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ enum class ReportType {
2121
topOfShippingMethodsByOrders,
2222
topOfPaymentMethodsByOrders,
2323
topOfCouponsByOrders,
24+
topOfCategoriesByOrders,
2425

2526
/** finance */
2627
allRevenue,

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ data class FetchedReportResponse(
9191
val landingUrl: String? = null,
9292
) : FetchedAdditionalData(AdditionalDataType.LANDING)
9393

94+
data class AdditionalCategoryData(
95+
val categoryName: String? = null,
96+
) : FetchedAdditionalData(AdditionalDataType.CATEGORY)
97+
9498
enum class AdditionalDataType {
9599
UTM,
96100
ORDERS,
@@ -101,6 +105,7 @@ data class FetchedReportResponse(
101105
ABANDONED_CARTS,
102106
SHIPPING,
103107
LANDING,
108+
CATEGORY,
104109
}
105110
}
106111

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(
127127

128128
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalLandingData::landingUrl),
129129

130+
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalCategoryData::categoryName),
131+
130132
AllowNullable(CreateBatchRequest::groupId),
131133
AllowNullable(CreateBatchRequestWithIds::groupId),
132134

0 commit comments

Comments
 (0)