Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECWID-140946 New Reports: internal API for topOfCategoriesByOrders report #410

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -21,6 +21,7 @@ enum class ReportType {
topOfShippingMethodsByOrders,
topOfPaymentMethodsByOrders,
topOfCouponsByOrders,
topOfCategoriesByOrders,

/** finance */
allRevenue,
Expand Down
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
Loading