Skip to content

Commit

Permalink
Merge pull request #387 from Ecwid/ECWID_136326
Browse files Browse the repository at this point in the history
ECWID-136326 New Reports: internal API for topOfShippingMethodsByOrde…
  • Loading branch information
filka96 authored Mar 11, 2024
2 parents dce4bd0 + 012a153 commit 5cc2d7d
Show file tree
Hide file tree
Showing 3 changed files with 11 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 @@ -534,6 +534,7 @@ private fun createAdditionalDataPolymorphicType(): PolymorphicType<FetchedReport
"product" to FetchedReportResponse.FetchedAdditionalData.AdditionalProductData::class.java,
"coupon" to FetchedReportResponse.FetchedAdditionalData.AdditionalCouponData::class.java,
"abandoned_cart" to FetchedReportResponse.FetchedAdditionalData.AdditionalAbandonedCartData::class.java,
"shipping" to FetchedReportResponse.FetchedAdditionalData.AdditionalShippingData::class.java,
)
)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.ecwid.apiclient.v3.dto.report.result

import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO
import com.ecwid.apiclient.v3.dto.order.enums.FulfillmentType
import com.ecwid.apiclient.v3.dto.report.enums.ComparePeriod
import com.ecwid.apiclient.v3.dto.report.enums.ReportType
import com.ecwid.apiclient.v3.dto.report.enums.TimeScaleValue
Expand Down Expand Up @@ -79,6 +80,11 @@ data class FetchedReportResponse(
val autoAbandonedSalesRecovery: Boolean? = null,
) : FetchedAdditionalData(AdditionalDataType.ABANDONED_CARTS)

data class AdditionalShippingData(
val shippingMethodName: String? = null,
val fulfilmentType: FulfillmentType? = null,
) : FetchedAdditionalData(AdditionalDataType.SHIPPING)

enum class AdditionalDataType {
UTM,
ORDERS,
Expand All @@ -87,6 +93,7 @@ data class FetchedReportResponse(
INVENTORY_PRODUCT,
COUPONS,
ABANDONED_CARTS,
SHIPPING,
}
}

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

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

AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalShippingData::shippingMethodName),
AllowNullable(FetchedReportResponse.FetchedAdditionalData.AdditionalShippingData::fulfilmentType),

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

Expand Down

0 comments on commit 5cc2d7d

Please sign in to comment.