Skip to content
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