diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/result/FetchedCustomer.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/result/FetchedCustomer.kt index 390eb2cf7..bee396dad 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/result/FetchedCustomer.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/result/FetchedCustomer.kt @@ -6,6 +6,7 @@ import com.ecwid.apiclient.v3.dto.customer.enums.CommercialRelationshipScheme import com.ecwid.apiclient.v3.dto.customer.request.UpdatedCustomer import com.ecwid.apiclient.v3.jsontransformer.JsonFieldName import java.util.* +import kotlin.collections.ArrayList data class FetchedCustomer( val id: Int = 0, @@ -24,6 +25,7 @@ data class FetchedCustomer( val lang: String? = null, val stats: CustomerStats? = null, val privateAdminNotes: String? = null, + val favorites: List = ArrayList(), @JsonFieldName("b2b_b2c") val commercialRelationshipScheme: CommercialRelationshipScheme = CommercialRelationshipScheme.b2c, @@ -82,5 +84,10 @@ data class FetchedCustomer( val timestamp: Date? = null, ) + data class CustomerFavorite( + val productId: Long = 0, + val addedTimestamp: Date? = null, + ) + override fun getModifyKind() = ModifyKind.ReadWrite(UpdatedCustomer::class) } diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt index 3f4c3755c..5af0d161c 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt @@ -157,6 +157,9 @@ val nonUpdatablePropertyRules: List> = listOf( ReadOnly(FetchedCustomer.ShippingAddress::addressFormatted), ReadOnly(FetchedCustomer::stats), ReadOnly(FetchedCustomer.CustomerContact::timestamp), + ReadOnly(FetchedCustomer::favorites), + ReadOnly(FetchedCustomer.CustomerFavorite::productId), + ReadOnly(FetchedCustomer.CustomerFavorite::addedTimestamp), ReadOnly(FetchedCustomerGroup::id), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedCustomerRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedCustomerRules.kt index 0dca3eca2..76258fbd5 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedCustomerRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedCustomerRules.kt @@ -54,6 +54,7 @@ val fetchedCustomerNullablePropertyRules: List> = lis AllowNullable(FetchedCustomer.CustomerContact::handle), AllowNullable(FetchedCustomer.CustomerContact::note), AllowNullable(FetchedCustomer.CustomerContact::timestamp), + AllowNullable(FetchedCustomer.CustomerFavorite::addedTimestamp), AllowNullable(CustomerFilterShippingAddress::street), AllowNullable(CustomerFilterShippingAddress::city),