Skip to content

Commit

Permalink
ECWID-140946 New Reports: internal API for topOfCategoriesByOrders re…
Browse files Browse the repository at this point in the history
…port:

- added AdditionalCategoryData
  • Loading branch information
filka96 committed May 28, 2024
1 parent dafb3e9 commit 2651a69
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/kotlin/com/ecwid/apiclient/v3/ApiClientHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ private fun createAdditionalDataPolymorphicType(): PolymorphicType<FetchedReport
ABANDONED_CARTS.name.lowercase() to AdditionalAbandonedCartData::class.java,
SHIPPING.name.lowercase() to AdditionalShippingData::class.java,
LANDING.name.lowercase() to AdditionalLandingData::class.java,
CATEGORY.name.lowercase() to AdditionalCategoryData::class.java,
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ data class FetchedReportResponse(
val landingUrl: String? = null,
) : FetchedAdditionalData(AdditionalDataType.LANDING)

data class AdditionalCategoryData(
val categoryName: String? = null,
) : FetchedAdditionalData(AdditionalDataType.CATEGORY)

enum class AdditionalDataType {
UTM,
ORDERS,
Expand All @@ -101,6 +105,7 @@ data class FetchedReportResponse(
ABANDONED_CARTS,
SHIPPING,
LANDING,
CATEGORY,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(

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

AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalCategoryData::categoryName),

AllowNullable(CreateBatchRequest::groupId),
AllowNullable(CreateBatchRequestWithIds::groupId),

Expand Down

0 comments on commit 2651a69

Please sign in to comment.