File tree Expand file tree Collapse file tree
main/kotlin/com/ecwid/apiclient/v3
test/kotlin/com/ecwid/apiclient/v3
rule/nullablepropertyrules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ fun FetchedCustomer.toUpdated(): UpdatedCustomer {
1212 taxId = taxId,
1313 taxIdValid = taxIdValid,
1414 taxExempt = taxExempt,
15- acceptMarketing = acceptMarketing
15+ acceptMarketing = acceptMarketing,
16+ lang = lang,
1617 )
1718}
1819
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ data class UpdatedCustomer(
1313 val taxId : String? = null ,
1414 val taxIdValid : Boolean? = null ,
1515 val taxExempt : Boolean? = null ,
16- val acceptMarketing : Boolean? = null
16+ val acceptMarketing : Boolean? = null ,
17+ val lang : String? = null ,
1718) : ApiUpdatedDTO {
1819
1920 data class BillingPerson (
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ data class FetchedCustomer(
1717 val taxId : String? = null ,
1818 val taxIdValid : Boolean? = null ,
1919 val taxExempt : Boolean? = null ,
20- val acceptMarketing : Boolean? = null
20+ val acceptMarketing : Boolean? = null ,
21+ val lang : String? = null ,
2122) : ApiFetchedDTO {
2223
2324 data class BillingPerson (
Original file line number Diff line number Diff line change @@ -378,7 +378,8 @@ private fun generateTestCustomerForCreate(customerGroupId: Int?): UpdatedCustome
378378 taxId = randomAlphanumeric(8 ),
379379 taxIdValid = randomBoolean(),
380380 taxExempt = randomBoolean(),
381- acceptMarketing = randomBoolean()
381+ acceptMarketing = randomBoolean(),
382+ lang = " en" ,
382383 )
383384}
384385
@@ -400,7 +401,8 @@ private fun generateTestCustomerForUpdate(
400401 taxId = randomAlphanumeric(8 ),
401402 taxIdValid = randomBoolean(),
402403 taxExempt = randomBoolean(),
403- acceptMarketing = randomBoolean()
404+ acceptMarketing = randomBoolean(),
405+ lang = " ru" ,
404406 )
405407}
406408
Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ package com.ecwid.apiclient.v3.rule.nullablepropertyrules
22
33import com.ecwid.apiclient.v3.dto.customer.result.FetchedCustomer
44import com.ecwid.apiclient.v3.rule.NullablePropertyRule
5+ import com.ecwid.apiclient.v3.rule.NullablePropertyRule.AllowNullable
56import com.ecwid.apiclient.v3.rule.NullablePropertyRule.IgnoreNullable
67
78val fetchedCustomerNullablePropertyRules: List <NullablePropertyRule <* , * >> = listOf (
89 IgnoreNullable (FetchedCustomer ::acceptMarketing),
910 IgnoreNullable (FetchedCustomer ::billingPerson),
1011 IgnoreNullable (FetchedCustomer ::customerGroupId),
1112 IgnoreNullable (FetchedCustomer ::customerGroupName),
13+ AllowNullable (FetchedCustomer ::lang),
1214 IgnoreNullable (FetchedCustomer ::registered),
1315 IgnoreNullable (FetchedCustomer ::shippingAddresses),
1416 IgnoreNullable (FetchedCustomer ::taxExempt),
You can’t perform that action at this time.
0 commit comments