Skip to content

Commit

Permalink
Merge pull request #386 from Ecwid/ECWID_136271
Browse files Browse the repository at this point in the history
ECWID-136271 New reports: internal API for abandonedCarts report
  • Loading branch information
filka96 authored Mar 11, 2024
2 parents 801262a + 419c271 commit dce4bd0
Show file tree
Hide file tree
Showing 4 changed files with 9 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 @@ -533,6 +533,7 @@ private fun createAdditionalDataPolymorphicType(): PolymorphicType<FetchedReport
"inventory_product" to FetchedReportResponse.FetchedAdditionalData.AdditionalInventoryData::class.java,
"product" to FetchedReportResponse.FetchedAdditionalData.AdditionalProductData::class.java,
"coupon" to FetchedReportResponse.FetchedAdditionalData.AdditionalCouponData::class.java,
"abandoned_cart" to FetchedReportResponse.FetchedAdditionalData.AdditionalAbandonedCartData::class.java,
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ enum class ReportType {
conversions,
addToCartConversion,
checkoutSalesFunnel,
abandonedCarts,

}
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,18 @@ data class FetchedReportResponse(
val couponName: String? = null,
) : FetchedAdditionalData(AdditionalDataType.COUPONS)

data class AdditionalAbandonedCartData(
val autoAbandonedSalesRecovery: Boolean? = null,
) : FetchedAdditionalData(AdditionalDataType.ABANDONED_CARTS)

enum class AdditionalDataType {
UTM,
ORDERS,
CUSTOMERS,
PRODUCT,
INVENTORY_PRODUCT,
COUPONS,
ABANDONED_CARTS,
}
}

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

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

AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalAbandonedCartData::autoAbandonedSalesRecovery),

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

Expand Down

0 comments on commit dce4bd0

Please sign in to comment.