Skip to content

Commit c0204e0

Browse files
ECWID-138064 New customers: update the internal API for searching of customers - added new fields to CustomersSearchRequest
1 parent cf42b03 commit c0204e0

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/request/CustomersSearchRequest.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ data class CustomersSearchRequest(
2020
val acceptMarketing: Boolean? = null,
2121
val purchasedProductIds: String? = null,
2222
val customerGroupIds: String? = null,
23+
val companyName: String? = null,
2324
val countryCodes: String? = null,
25+
val city: String? = null,
26+
val postalCode: String? = null,
27+
val stateOrProvinceCode: String? = null,
28+
val phone: String? = null,
2429
val createdFrom: Date? = null,
2530
val createdTo: Date? = null,
2631
val updatedFrom: Date? = null,
@@ -78,7 +83,12 @@ data class CustomersSearchRequest(
7883
request.acceptMarketing?.let { put("acceptMarketing", it.toString()) }
7984
request.purchasedProductIds?.let { put("purchasedProductIds", it) }
8085
request.customerGroupIds?.let { put("customerGroupIds", it) }
86+
request.companyName?.let { put("companyName", it) }
8187
request.countryCodes?.let { put("countryCodes", it) }
88+
request.city?.let { put("city", it) }
89+
request.postalCode?.let { put("postalCode", it) }
90+
request.stateOrProvinceCode?.let { put("stateOrProvinceCode", it) }
91+
request.phone?.let { put("phone", it) }
8292
request.lang?.let { put("lang", it) }
8393
request.sortBy?.let { put("sortBy", it.name) }
8494
put("offset", request.offset.toString())

src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CustomersSearchRequestRules.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ val customersSearchRequestNullablePropertyRules: List<NullablePropertyRule<*, *>
2020
AllowNullable(CustomersSearchRequest::updatedTo),
2121
AllowNullable(CustomersSearchRequest::purchasedProductIds),
2222
AllowNullable(CustomersSearchRequest::customerGroupIds),
23+
AllowNullable(CustomersSearchRequest::companyName),
2324
AllowNullable(CustomersSearchRequest::countryCodes),
25+
AllowNullable(CustomersSearchRequest::city),
26+
AllowNullable(CustomersSearchRequest::postalCode),
27+
AllowNullable(CustomersSearchRequest::stateOrProvinceCode),
28+
AllowNullable(CustomersSearchRequest::phone),
2429
AllowNullable(CustomersSearchRequest::taxExempt),
2530
AllowNullable(CustomersSearchRequest::acceptMarketing),
2631
AllowNullable(CustomersSearchRequest::lang),

0 commit comments

Comments
 (0)