Skip to content

Commit 5a2cf06

Browse files
committed
ECWID-149221 added saveToCustomerProfile field to update the extrafield
1 parent 7b1fba5 commit 5a2cf06

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedExtrafieldConfig.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ fun FetchedExtrafieldConfig.toUpdated(): UpdatedExtrafieldConfig {
3030
titleTranslated = if (titleTranslated != null) LocalizedValueMap(titleTranslated) else null,
3131
textPlaceholderTranslated = if (textPlaceholderTranslated != null) LocalizedValueMap(textPlaceholderTranslated) else null,
3232
tipTranslated = if (tipTranslated != null) LocalizedValueMap(tipTranslated) else null,
33-
valueTranslated = if (valueTranslated != null) LocalizedValueMap(valueTranslated) else null
33+
valueTranslated = if (valueTranslated != null) LocalizedValueMap(valueTranslated) else null,
34+
saveToCustomerProfile = saveToCustomerProfile,
3435
)
3536
}
3637

src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedExtrafieldConfig.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ data class UpdatedExtrafieldConfig(
3434
val titleTranslated: LocalizedValueMap? = null,
3535
val textPlaceholderTranslated: LocalizedValueMap? = null,
3636
val tipTranslated: LocalizedValueMap? = null,
37-
val valueTranslated: LocalizedValueMap? = null
37+
val valueTranslated: LocalizedValueMap? = null,
38+
val saveToCustomerProfile: Boolean? = null,
3839
) : ApiUpdatedDTO {
3940

4041
data class UpdatedExtrafieldOptionConfig(

src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedExtrafieldConfig.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ data class FetchedExtrafieldConfig(
3434
val titleTranslated: LocalizedValueMap? = null,
3535
val textPlaceholderTranslated: LocalizedValueMap? = null,
3636
val tipTranslated: LocalizedValueMap? = null,
37-
val valueTranslated: LocalizedValueMap? = null
37+
val valueTranslated: LocalizedValueMap? = null,
38+
val saveToCustomerProfile: Boolean? = null,
3839
) : ApiFetchedDTO {
3940

4041
data class FetchedExtrafieldOptionConfig(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ val fetchedExtrafieldConfigNullablePropertyRules: List<NullablePropertyRule<*, *
2727
AllowNullable(FetchedExtrafieldConfig::textPlaceholderTranslated),
2828
AllowNullable(FetchedExtrafieldConfig::tipTranslated),
2929
AllowNullable(FetchedExtrafieldConfig::valueTranslated),
30+
AllowNullable(FetchedExtrafieldConfig::saveToCustomerProfile),
3031

3132
AllowNullable(FetchedExtrafieldConfig.FetchedExtrafieldOptionConfig::subtitle),
3233
AllowNullable(FetchedExtrafieldConfig.FetchedExtrafieldOptionConfig::subtitleTranslated),

0 commit comments

Comments
 (0)