Skip to content

Commit 3c567e1

Browse files
authored
Merge pull request #383 from Ecwid/ECWID_134030
ECWID-134030 New Reports: internal API for addToCartConversion report…
2 parents 625cbc9 + 1868edb commit 3c567e1

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/main/kotlin/com/ecwid/apiclient/v3/ApiClientHelper.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,8 @@ private fun createAdditionalDataPolymorphicType(): PolymorphicType<FetchedReport
530530
"utm" to FetchedReportResponse.FetchedAdditionalData.AdditionalUtmData::class.java,
531531
"orders" to FetchedReportResponse.FetchedAdditionalData.AdditionalOrdersData::class.java,
532532
"customers" to FetchedReportResponse.FetchedAdditionalData.AdditionalCustomerData::class.java,
533-
"product" to FetchedReportResponse.FetchedAdditionalData.AdditionalInventoryData::class.java
533+
"inventory_product" to FetchedReportResponse.FetchedAdditionalData.AdditionalInventoryData::class.java,
534+
"product" to FetchedReportResponse.FetchedAdditionalData.AdditionalProductData::class.java,
534535
)
535536
)
536537
}

src/main/kotlin/com/ecwid/apiclient/v3/dto/report/result/FetchedReportResponse.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ data class FetchedReportResponse(
6464
val exampleOrder: String? = null,
6565
) : FetchedAdditionalData(AdditionalDataType.INVENTORY_PRODUCT)
6666

67+
data class AdditionalProductData(
68+
val productName: String? = null,
69+
val productSmallThumbnailUrl: String? = null,
70+
val productUrl: String? = null,
71+
val productEditUrl: String? = null,
72+
) : FetchedAdditionalData(AdditionalDataType.PRODUCT)
73+
6774
enum class AdditionalDataType {
6875
UTM,
6976
ORDERS,

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(
110110
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalInventoryData::thumbnailUrl),
111111
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalInventoryData::exampleOrder),
112112

113+
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalProductData::productName),
114+
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalProductData::productSmallThumbnailUrl),
115+
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalProductData::productUrl),
116+
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalProductData::productEditUrl),
117+
113118
AllowNullable(CreateBatchRequest::groupId),
114119
AllowNullable(CreateBatchRequestWithIds::groupId),
115120

0 commit comments

Comments
 (0)