From 2d34bfc5b7a3bb7a4f28880fcfb8afcb298914e7 Mon Sep 17 00:00:00 2001 From: winrok Date: Mon, 5 Feb 2024 20:22:38 +0400 Subject: [PATCH] ECWID-129038 New customers: send formatted address via public customers API --- .../ecwid/apiclient/v3/dto/customer/result/FetchedCustomer.kt | 1 + .../com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt | 1 + .../v3/rule/nullablepropertyrules/FetchedCustomerRules.kt | 1 + 3 files changed, 3 insertions(+) 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 a38f4b73b..390eb2cf7 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 @@ -60,6 +60,7 @@ data class FetchedCustomer( val createdDate: Date? = null, val defaultAddress: Boolean? = null, val orderBy: Int? = null, + val addressFormatted: String? = null, ) data class CustomerStats( 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 38faf6337..d95e7c7c1 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt @@ -149,6 +149,7 @@ val nonUpdatablePropertyRules: List> = listOf( Ignored(FetchedCustomer.ShippingAddress::countryName), Ignored(FetchedCustomer.ShippingAddress::stateOrProvinceName), ReadOnly(FetchedCustomer.ShippingAddress::createdDate), + ReadOnly(FetchedCustomer.ShippingAddress::addressFormatted), ReadOnly(FetchedCustomer::stats), ReadOnly(FetchedCustomer.CustomerContact::timestamp), 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 cfac82ccc..0dca3eca2 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 @@ -46,6 +46,7 @@ val fetchedCustomerNullablePropertyRules: List> = lis AllowNullable(FetchedCustomer.ShippingAddress::createdDate), AllowNullable(FetchedCustomer.ShippingAddress::defaultAddress), AllowNullable(FetchedCustomer.ShippingAddress::orderBy), + AllowNullable(FetchedCustomer.ShippingAddress::addressFormatted), AllowNullable(FetchedCustomer::stats), AllowNullable(FetchedCustomer.CustomerStats::firstOrderDate), AllowNullable(FetchedCustomer.CustomerStats::lastOrderDate),