Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECWID-136326 New Reports: internal API for topOfShippingMethodsByOrde… #387

Merged
merged 1 commit into from
Mar 11, 2024
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 @@ -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
Loading