Skip to content

Commit 419c271

Browse files
committed
ECWID-136271 New reports: internal API for abandonedCarts report
- added abandonedCarts report
1 parent 5f6f7e6 commit 419c271

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
@@ -533,6 +533,7 @@ private fun createAdditionalDataPolymorphicType(): PolymorphicType<FetchedReport
533533
"inventory_product" to FetchedReportResponse.FetchedAdditionalData.AdditionalInventoryData::class.java,
534534
"product" to FetchedReportResponse.FetchedAdditionalData.AdditionalProductData::class.java,
535535
"coupon" to FetchedReportResponse.FetchedAdditionalData.AdditionalCouponData::class.java,
536+
"abandoned_cart" to FetchedReportResponse.FetchedAdditionalData.AdditionalAbandonedCartData::class.java,
536537
)
537538
)
538539
}

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
@@ -34,5 +34,6 @@ enum class ReportType {
3434
conversions,
3535
addToCartConversion,
3636
checkoutSalesFunnel,
37+
abandonedCarts,
3738

3839
}

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
@@ -75,13 +75,18 @@ data class FetchedReportResponse(
7575
val couponName: String? = null,
7676
) : FetchedAdditionalData(AdditionalDataType.COUPONS)
7777

78+
data class AdditionalAbandonedCartData(
79+
val autoAbandonedSalesRecovery: Boolean? = null,
80+
) : FetchedAdditionalData(AdditionalDataType.ABANDONED_CARTS)
81+
7882
enum class AdditionalDataType {
7983
UTM,
8084
ORDERS,
8185
CUSTOMERS,
8286
PRODUCT,
8387
INVENTORY_PRODUCT,
8488
COUPONS,
89+
ABANDONED_CARTS,
8590
}
8691
}
8792

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

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

118118
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalCouponData::couponName),
119119

120+
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalAbandonedCartData::autoAbandonedSalesRecovery),
121+
120122
AllowNullable(CreateBatchRequest::groupId),
121123
AllowNullable(CreateBatchRequestWithIds::groupId),
122124

0 commit comments

Comments
 (0)