-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ECWID-126129 New Customers: SDK improvements: refactoring fields for …
…Customers Request
- Loading branch information
Showing
5 changed files
with
46 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/request/CustomersRequestFields.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.ecwid.apiclient.v3.dto.customer.request | ||
|
||
import com.ecwid.apiclient.v3.dto.common.ApiRequestDTO | ||
|
||
data class CustomersRequestFields( | ||
val keyword: String? = null, | ||
val minOrderCount: Int? = null, | ||
val maxOrderCount: Int? = null, | ||
val minSalesValue: Int? = null, | ||
val maxSalesValue: Int? = null, | ||
val taxExempt: Boolean? = null, | ||
val acceptMarketing: Boolean? = null, | ||
val purchasedProductIds: String? = null, | ||
val customerGroupIds: String? = null, | ||
val countryCodes: String? = null, | ||
val lang: String? = null, | ||
) : ApiRequestDTO |
25 changes: 13 additions & 12 deletions
25
...test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CustomersIdsRequestRules.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
package com.ecwid.apiclient.v3.rule.nullablepropertyrules | ||
|
||
import com.ecwid.apiclient.v3.dto.customer.request.CustomersIdsRequest | ||
import com.ecwid.apiclient.v3.dto.customer.request.CustomersRequestFields | ||
import com.ecwid.apiclient.v3.rule.NullablePropertyRule | ||
import com.ecwid.apiclient.v3.rule.NullablePropertyRule.AllowNullable | ||
|
||
val customersIdsRequestNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf( | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::keyword), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::maxOrderCount), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::minOrderCount), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::maxSalesValue), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::minSalesValue), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::purchasedProductIds), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::customerGroupIds), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::countryCodes), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::taxExempt), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::acceptMarketing), | ||
NullablePropertyRule.AllowNullable(CustomersIdsRequest::lang), | ||
AllowNullable(CustomersRequestFields::keyword), | ||
AllowNullable(CustomersRequestFields::maxOrderCount), | ||
AllowNullable(CustomersRequestFields::minOrderCount), | ||
AllowNullable(CustomersRequestFields::maxSalesValue), | ||
AllowNullable(CustomersRequestFields::minSalesValue), | ||
AllowNullable(CustomersRequestFields::purchasedProductIds), | ||
AllowNullable(CustomersRequestFields::customerGroupIds), | ||
AllowNullable(CustomersRequestFields::countryCodes), | ||
AllowNullable(CustomersRequestFields::taxExempt), | ||
AllowNullable(CustomersRequestFields::acceptMarketing), | ||
AllowNullable(CustomersRequestFields::lang), | ||
) |
25 changes: 12 additions & 13 deletions
25
...tlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CustomersMassUpdateRequestRules.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters