Skip to content

Commit

Permalink
Merge pull request #373 from Ecwid/ECWID-116235_ApiClient-change
Browse files Browse the repository at this point in the history
ECWID-116235 Implement alt-text support for variation images | Add alt for variation in java_api_client
  • Loading branch information
ZimuZhengLightspeed authored Mar 11, 2024
2 parents 5f6f7e6 + a185637 commit 801262a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ fun FetchedVariation.toUpdated(): UpdatedVariation {

customsHsTariffCode = customsHsTariffCode,
subscriptionSettings = subscriptionSettings?.toUpdated(),
alt = alt?.toUpdated()
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.ecwid.apiclient.v3.dto.variation.request
import com.ecwid.apiclient.v3.dto.common.ApiUpdatedDTO
import com.ecwid.apiclient.v3.dto.common.ApiUpdatedDTO.ModifyKind
import com.ecwid.apiclient.v3.dto.common.LocalizedValueMap
import com.ecwid.apiclient.v3.dto.common.UpdatedAlt
import com.ecwid.apiclient.v3.dto.common.UpdatedAttributeValue
import com.ecwid.apiclient.v3.dto.product.enums.AttributeValueAlias
import com.ecwid.apiclient.v3.dto.product.enums.AttributeValueLocation
Expand Down Expand Up @@ -41,6 +42,7 @@ data class UpdatedVariation(

val customsHsTariffCode: String? = null,
val subscriptionSettings: SubscriptionSettings? = null,
val alt: UpdatedAlt? = null,
) : ApiUpdatedDTO {

data class AttributeValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.ecwid.apiclient.v3.dto.variation.result

import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO
import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO.ModifyKind
import com.ecwid.apiclient.v3.dto.common.FetchedAlt
import com.ecwid.apiclient.v3.dto.common.FetchedAttributeValue
import com.ecwid.apiclient.v3.dto.common.LocalizedValueMap
import com.ecwid.apiclient.v3.dto.product.enums.AttributeValueLocation
Expand Down Expand Up @@ -56,6 +57,7 @@ data class FetchedVariation(

val customsHsTariffCode: String? = null,
val subscriptionSettings: SubscriptionSettings? = null,
val alt: FetchedAlt? = null,
) : ApiFetchedDTO {

data class AttributeValue(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.ecwid.apiclient.v3.rule.nullablepropertyrules

import com.ecwid.apiclient.v3.dto.common.FetchedAlt
import com.ecwid.apiclient.v3.dto.variation.result.FetchedVariation
import com.ecwid.apiclient.v3.rule.NullablePropertyRule
import com.ecwid.apiclient.v3.rule.NullablePropertyRule.AllowNullable
Expand Down Expand Up @@ -72,4 +73,7 @@ val fetchedVariationTypeNullablePropertyRules: List<NullablePropertyRule<*, *>>
AllowNullable(FetchedVariation.SubscriptionSettings::oneTimePurchasePrice),
IgnoreNullable(FetchedVariation.SubscriptionSettings::oneTimePurchasePriceFormatted),
AllowNullable(FetchedVariation::locationInventory),
AllowNullable(FetchedVariation::alt),
AllowNullable(FetchedAlt::main),
AllowNullable(FetchedAlt::translated),
)

0 comments on commit 801262a

Please sign in to comment.