diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt b/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt index 6acf6aade..f9d77b7e7 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt @@ -38,6 +38,7 @@ import com.ecwid.apiclient.v3.dto.saleschannels.response.* import com.ecwid.apiclient.v3.dto.storage.request.* import com.ecwid.apiclient.v3.dto.storage.result.* import com.ecwid.apiclient.v3.dto.subscriptions.request.SubscriptionsSearchRequest +import com.ecwid.apiclient.v3.dto.subscriptions.result.FetchedSubscription import com.ecwid.apiclient.v3.dto.subscriptions.result.SubscriptionsSearchResult import com.ecwid.apiclient.v3.dto.variation.request.* import com.ecwid.apiclient.v3.dto.variation.result.* @@ -348,6 +349,7 @@ interface ReportsApiClient { // https://api-docs.ecwid.com/reference/get-subscription interface SubscriptionsApiClient { fun searchSubscriptions(request: SubscriptionsSearchRequest): SubscriptionsSearchResult + fun searchSubscriptionsAsSequence(request: SubscriptionsSearchRequest): Sequence } interface InstantSiteRedirectsApiClient { diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/ApiClientHelper.kt b/src/main/kotlin/com/ecwid/apiclient/v3/ApiClientHelper.kt index 4e78b49d7..397408d4c 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/ApiClientHelper.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/ApiClientHelper.kt @@ -4,6 +4,7 @@ import com.ecwid.apiclient.v3.config.* import com.ecwid.apiclient.v3.dto.ApiRequest import com.ecwid.apiclient.v3.dto.common.EcwidApiError import com.ecwid.apiclient.v3.dto.product.result.FetchedProduct.ProductOption +import com.ecwid.apiclient.v3.dto.report.result.FetchedReportResponse import com.ecwid.apiclient.v3.exception.EcwidApiException import com.ecwid.apiclient.v3.exception.JsonDeserializationException import com.ecwid.apiclient.v3.httptransport.* @@ -50,7 +51,7 @@ class ApiClientHelper private constructor( credentials = storeCredentials, loggingSettings = loggingSettings, httpTransport = httpTransport, - jsonTransformer = jsonTransformerProvider.build(listOf(createProductOptionsPolymorphicType())) + jsonTransformer = jsonTransformerProvider.build(createPolymorphicTypeList()) ) constructor( @@ -64,7 +65,7 @@ class ApiClientHelper private constructor( credentials = credentials, loggingSettings = loggingSettings, httpTransport = httpTransport, - jsonTransformer = jsonTransformerProvider.build(listOf(createProductOptionsPolymorphicType())) + jsonTransformer = jsonTransformerProvider.build(createPolymorphicTypeList()) ) @PublishedApi @@ -455,6 +456,13 @@ internal fun HttpBody.prepare(jsonTransformer: JsonTransformer): TransportHttpBo } } +fun createPolymorphicTypeList(): List> { + return listOf( + createProductOptionsPolymorphicType(), + createAdditionalDataPolymorphicType() + ) +} + private fun createProductOptionsPolymorphicType(): PolymorphicType { return PolymorphicType( rootClass = ProductOption::class.java, @@ -471,3 +479,13 @@ private fun createProductOptionsPolymorphicType(): PolymorphicType { + return PolymorphicType( + rootClass = FetchedReportResponse.FetchedAdditionalData::class.java, + jsonFieldName = "type", + childClasses = mapOf( + "utm" to FetchedReportResponse.FetchedAdditionalData.AdditionalUtmData::class.java, + ) + ) +} diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt index fc59503f3..786741774 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt @@ -152,6 +152,7 @@ fun FetchedOrder.OrderItem.toUpdated(): UpdatedOrder.OrderItem { taxable = taxable, selectedOptions = selectedOptions?.map(FetchedOrder.OrderItemSelectedOption::toUpdated), + combinationId = combinationId, taxes = taxes?.map(FetchedOrder.OrderItemTax::toUpdated), dimensions = dimensions?.toUpdated(), discounts = discounts?.map(FetchedOrder.OrderItemDiscounts::toUpdated), diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt index 7538f8be1..6a0e02e56 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/request/OrderForCalculate.kt @@ -21,6 +21,9 @@ data class OrderForCalculate( val shippingOption: ShippingOption? = null, val handlingFee: HandlingFee? = null, val paymentOptionsDetails: PaymentOption? = null, + val giftCardCode: String? = null, + val giftCardId: Int? = null, + val giftCardTransactionOrderId: Int? = null, ) : ApiRequestDTO { data class DiscountInfo( @@ -87,6 +90,7 @@ data class OrderForCalculate( val couponApplied: Boolean? = null, val selectedOptions: List? = null, + val combinationId: Int? = null, val taxes: List? = null, val files: List? = null, val dimensions: ProductDimensions? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt index 9810ceebc..3289283ed 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/CalculateOrderDetailsResult.kt @@ -147,6 +147,7 @@ data class CalculateOrderDetailsResult( val couponApplied: Boolean? = null, val selectedOptions: List? = null, + val combinationId: Int? = null, val taxes: List? = null, val files: List? = null, val dimensions: ProductDimensions? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/FetchedCart.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/FetchedCart.kt index 5d81db661..b59baaa9c 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/FetchedCart.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/cart/result/FetchedCart.kt @@ -143,6 +143,7 @@ data class FetchedCart( val couponApplied: Boolean? = null, val selectedOptions: List? = null, + val combinationId: Int? = null, val taxes: List? = null, val files: List? = null, val dimensions: ProductDimensions? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt index 366e1f106..9ffb78393 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt @@ -153,6 +153,7 @@ data class UpdatedOrder( val isGiftCard: Boolean? = null, val selectedOptions: List? = null, + val combinationId: Int? = null, val taxes: List? = null, val dimensions: ProductDimensions? = null, val discountsAllowed: Boolean? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt index 681471730..a43bff991 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt @@ -62,6 +62,7 @@ data class FetchedOrder( val totalBeforeGiftCardRedemption: Double? = null, val giftCardDoubleSpending: Boolean? = null, val giftCardCode: String? = null, + val giftCardId: Int? = null, val total: Double? = null, val totalWithoutTax: Double? = null, @@ -190,6 +191,7 @@ data class FetchedOrder( val subscriptionId: Long? = null, val selectedOptions: List? = null, + val combinationId: Int? = null, val files: List? = null, val taxable: Boolean? = null, val taxes: List? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt index aba83b4b1..d91598bde 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/product/result/FetchedProduct.kt @@ -82,7 +82,8 @@ data class FetchedProduct( val defaultDisplayedCompareToPriceDiscountPercentFormatted: String? = null, val lowestPrice: Double? = null, - val lowestPriceFormatted: String? = null, + val defaultDisplayedLowestPrice: Double? = null, + val defaultDisplayedLowestPriceFormatted: String? = null, val weight: Double? = null, val dimensions: ProductDimensions? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/report/result/FetchedReportResponse.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/report/result/FetchedReportResponse.kt index 4c4f10306..e672ebdd3 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/report/result/FetchedReportResponse.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/report/result/FetchedReportResponse.kt @@ -26,6 +26,7 @@ data class FetchedReportResponse( val percentage: Double? = null, val comparePeriodStartTimeStamp: Long? = null, val comparePeriodEndTimeStamp: Long? = null, + val additionalData: FetchedAdditionalData? = null, ) data class FetchedDataItem( @@ -33,6 +34,24 @@ data class FetchedReportResponse( val dataValue: Double = 0.0, ) + sealed class FetchedAdditionalData( + val type: AdditionalDataType, + ) { + data class AdditionalUtmData( + val utmList: List = emptyList(), + ) : FetchedAdditionalData(AdditionalDataType.UTM) + + enum class AdditionalDataType { + UTM + } + } + + data class FetchedUtmDataItem( + val utmSource: String = "", + val utmMedium: String = "", + val utmCampaign: String = "", + ) + override fun getModifyKind() = ApiFetchedDTO.ModifyKind.ReadOnly } diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/enums/SubscriptionStatus.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/enums/SubscriptionStatus.kt index b23412765..02fc2398b 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/enums/SubscriptionStatus.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/enums/SubscriptionStatus.kt @@ -6,4 +6,5 @@ enum class SubscriptionStatus { CANCELLED, LAST_CHARGE_FAILED, REQUIRES_PAYMENT_CONFIRMATION, + PAUSED, } diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/request/SubscriptionsSearchRequest.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/request/SubscriptionsSearchRequest.kt index eb67bf8e2..32134343b 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/request/SubscriptionsSearchRequest.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/request/SubscriptionsSearchRequest.kt @@ -18,7 +18,7 @@ data class SubscriptionsSearchRequest( val updatedFrom: Date? = null, val updatedTo: Date? = null, val customerId: Int? = null, - val status: SubscriptionStatus? = null, + val status: List? = null, val nextChargeFrom: Date? = null, val nextChargeTo: Date? = null, val recurringInterval: SubscriptionInterval? = null, @@ -29,9 +29,10 @@ data class SubscriptionsSearchRequest( val orderTotal: Double? = null, val orderCreatedFrom: Date? = null, val orderCreatedTo: Date? = null, - val offset: Int? = null, - val limit: Int? = null, + val offset: Int = 0, + val limit: Int = 100, val sortBy: SortOrder = SortOrder.DATE_CREATED_DESC, + val lang: String? = null, val responseFields: ResponseFields = ResponseFields.All, ) : ApiRequest { @@ -53,7 +54,7 @@ data class SubscriptionsSearchRequest( updatedFrom?.let { put("updatedFrom", TimeUnit.MILLISECONDS.toSeconds(it.time).toString()) } updatedTo?.let { put("updatedTo", TimeUnit.MILLISECONDS.toSeconds(it.time).toString()) } customerId?.let { put("customerId", it.toString()) } - status?.let { put("status", it.name) } + status?.let { put("status", it.joinToString(",")) } nextChargeFrom?.let { put("nextChargeFrom", TimeUnit.MILLISECONDS.toSeconds(it.time).toString()) } nextChargeTo?.let { put("nextChargeTo", TimeUnit.MILLISECONDS.toSeconds(it.time).toString()) } recurringInterval?.let { put("recurringInterval", it.name) } @@ -67,6 +68,7 @@ data class SubscriptionsSearchRequest( offset?.let { put("offset", it.toString()) } limit?.let { put("limit", it.toString()) } put("sortBy", sortBy.name) + lang?.let { put("lang", it) } }.toMap() } } diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/result/FetchedSubscription.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/result/FetchedSubscription.kt index cd0a10835..8149503b4 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/result/FetchedSubscription.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/subscriptions/result/FetchedSubscription.kt @@ -2,6 +2,7 @@ package com.ecwid.apiclient.v3.dto.subscriptions.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.LocalizedValueMap import com.ecwid.apiclient.v3.dto.subscriptions.enums.PriceModifierType import com.ecwid.apiclient.v3.dto.subscriptions.enums.ProductOptionType import com.ecwid.apiclient.v3.dto.subscriptions.enums.SubscriptionInterval @@ -17,6 +18,7 @@ data class FetchedSubscription( val created: Date = Date(), val cancelled: Date? = null, val nextCharge: Date = Date(), + val nextChargeFormatted: String = "", val createTimestamp: Long? = null, val updateTimestamp: Long? = null, val chargeSettings: ChargeSettings = ChargeSettings(), @@ -110,6 +112,7 @@ data class FetchedSubscription( val sku: String? = null, val name: String? = null, + val nameTranslated: LocalizedValueMap? = null, val shortDescription: String? = null, val quantity: Int? = null, val quantityInStock: Int? = null, @@ -120,7 +123,10 @@ data class FetchedSubscription( val digital: Boolean? = null, val productAvailable: Boolean? = null, + val imageUrl: String? = null, + val smallThumbnailUrl: String? = null, + val hdThumbnailUrl: String? = null, val recurringChargeSettings: RecurringChargeSettings? = null, val selectedOptions: List? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt index 2870e47f2..c3e3f3e63 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/variation/result/FetchedVariation.kt @@ -30,7 +30,8 @@ data class FetchedVariation( val costPrice: Double? = null, val compareToPrice: Double? = null, val lowestPrice: Double? = null, - val lowestPriceFormatted: String? = null, + val defaultDisplayedLowestPrice: Double? = null, + val defaultDisplayedLowestPriceFormatted: String? = null, val wholesalePrices: List? = null, val quantity: Int? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/impl/SubscriptionsApiClientImpl.kt b/src/main/kotlin/com/ecwid/apiclient/v3/impl/SubscriptionsApiClientImpl.kt index 75ac21513..ff8a22417 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/impl/SubscriptionsApiClientImpl.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/impl/SubscriptionsApiClientImpl.kt @@ -4,6 +4,7 @@ import com.ecwid.apiclient.v3.ApiClientHelper import com.ecwid.apiclient.v3.SubscriptionsApiClient import com.ecwid.apiclient.v3.dto.subscriptions.request.SubscriptionsSearchRequest import com.ecwid.apiclient.v3.dto.subscriptions.result.SubscriptionsSearchResult +import com.ecwid.apiclient.v3.responsefields.AS_SEQUENCE_SEARCH_RESULT_REQUIRED_FIELDS class SubscriptionsApiClientImpl( private val apiClientHelper: ApiClientHelper @@ -12,4 +13,15 @@ class SubscriptionsApiClientImpl( override fun searchSubscriptions(request: SubscriptionsSearchRequest) = apiClientHelper.makeObjectResultRequest(request) + override fun searchSubscriptionsAsSequence(request: SubscriptionsSearchRequest) = sequence { + var offsetRequest = request.copy( + responseFields = request.responseFields + AS_SEQUENCE_SEARCH_RESULT_REQUIRED_FIELDS + ) + do { + val searchResult = searchSubscriptions(offsetRequest) + yieldAll(searchResult.items) + offsetRequest = offsetRequest.copy(offset = offsetRequest.offset + searchResult.count) + } while (searchResult.count >= searchResult.limit) + } + } diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/DtoContractUnitTest.kt b/src/test/kotlin/com/ecwid/apiclient/v3/DtoContractUnitTest.kt index 95dbf42b5..5f282bf3d 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/DtoContractUnitTest.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/DtoContractUnitTest.kt @@ -191,7 +191,7 @@ class DtoContractUnitTest { val ignoreNullablePropertiesCount = nullablePropertyRules .filterIsInstance>() .size - assertEquals(975, ignoreNullablePropertiesCount) { + assertEquals(976, ignoreNullablePropertiesCount) { "You MUST NOT add exclusion with type IgnoreNullable() which is used only for old fields until they are fixed.\n" + "Please make added property non-nullable if possible.\n" + "If Ecwid API sometimes return null as value for this property you CAN add it to as `AllowNullable()` exclusion type instead." diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/entity/CartsTest.kt b/src/test/kotlin/com/ecwid/apiclient/v3/entity/CartsTest.kt index d59fa9ad6..2e47d80d4 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/entity/CartsTest.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/entity/CartsTest.kt @@ -111,6 +111,7 @@ class CartsTest : BaseEntityTest() { assertEquals(orderSelectedOption.type, cartSelectedOptions.type) // TODO Discover why after each create field `valuesArray` some times resets to null } + assertEquals(orderItem.combinationId, cartItem.combinationId) assertEquals(orderItem.taxes?.count(), cartItem.taxes?.count()) cartItem.taxes?.forEachIndexed { taxIndex, cartTaxes -> @@ -316,6 +317,7 @@ class CartsTest : BaseEntityTest() { calculatedOrderItemOptions.files?.count() ) // TODO Discover why after each calculation this field resets to null } + assertEquals(forCalculateItem.combinationId, calculatedItem.combinationId) assertEquals(forCalculateItem.files?.count(), calculatedItem.files?.count()) calculatedItem.files?.forEachIndexed { taxIndex, calculatedFile -> @@ -488,6 +490,7 @@ class CartsTest : BaseEntityTest() { generateDateSelectedOption(), generateFilesSelectedOption() ), + combinationId = randomId(), taxes = listOf( generateTestOrderItemTax() ), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt index b71e9578a..6b45b8dc9 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt @@ -41,7 +41,8 @@ val nonUpdatablePropertyRules: List> = listOf( ReadOnly(FetchedProduct::defaultDisplayedCompareToPriceDiscountPercent), ReadOnly(FetchedProduct::defaultDisplayedCompareToPriceDiscountPercentFormatted), Ignored(FetchedProduct::lowestPrice), - ReadOnly(FetchedProduct::lowestPriceFormatted), + ReadOnly(FetchedProduct::defaultDisplayedLowestPrice), + ReadOnly(FetchedProduct::defaultDisplayedLowestPriceFormatted), Ignored(FetchedProduct.AttributeValue::name), Ignored(FetchedProduct.AttributeValue::type), Ignored(FetchedProduct.AttributeValue::show), @@ -150,6 +151,7 @@ val nonUpdatablePropertyRules: List> = listOf( ReadOnly(FetchedOrder::orderExtraFields), ReadOnly(FetchedOrder::giftCardCode), ReadOnly(FetchedOrder::giftCardDoubleSpending), + ReadOnly(FetchedOrder::giftCardId), ReadOnly(FetchedOrder::giftCardRedemption), ReadOnly(FetchedOrder::totalBeforeGiftCardRedemption), ReadOnly(FetchedOrder::totalWithoutTax), @@ -254,7 +256,8 @@ val nonUpdatablePropertyRules: List> = listOf( ReadOnly(FetchedVariation::inStock), Ignored(FetchedVariation::borderInfo), Ignored(FetchedVariation::lowestPrice), - ReadOnly(FetchedVariation::lowestPriceFormatted), + ReadOnly(FetchedVariation::defaultDisplayedLowestPrice), + ReadOnly(FetchedVariation::defaultDisplayedLowestPriceFormatted), Ignored(FetchedVariation.AttributeValue::name), Ignored(FetchedVariation.AttributeValue::type), Ignored(FetchedVariation.AttributeValue::show), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt index d7dd25f18..51398b46f 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt @@ -96,6 +96,7 @@ val otherNullablePropertyRules: List> = listOf( AllowNullable(FetchedReportResponse.FetchedDataset::percentage), AllowNullable(FetchedReportResponse.FetchedDataset::comparePeriodStartTimeStamp), AllowNullable(FetchedReportResponse.FetchedDataset::comparePeriodEndTimeStamp), + AllowNullable(FetchedReportResponse.FetchedDataset::additionalData), AllowNullable(InstantSiteRedirectsSearchRequest::keyword), AllowNullable(InstantSiteRedirectsSearchRequest::limit), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CalculateOrderDetailsResultRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CalculateOrderDetailsResultRules.kt index aa4dedc8e..264026b43 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CalculateOrderDetailsResultRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/CalculateOrderDetailsResultRules.kt @@ -53,6 +53,7 @@ val calculateOrderDetailsResultNullablePropertyRules: List> = listOf( IgnoreNullable(FetchedCart::acceptMarketing), @@ -97,6 +97,7 @@ val fetchedCartNullablePropertyRules: List> = listOf( IgnoreNullable(FetchedCart.OrderItem::quantity), IgnoreNullable(FetchedCart.OrderItem::quantityInStock), IgnoreNullable(FetchedCart.OrderItem::selectedOptions), + AllowNullable(FetchedCart.OrderItem::combinationId), IgnoreNullable(FetchedCart.OrderItem::shipping), IgnoreNullable(FetchedCart.OrderItem::shortDescription), IgnoreNullable(FetchedCart.OrderItem::sku), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt index 366fcff13..2734edd26 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt @@ -81,6 +81,7 @@ val fetchedOrderNullablePropertyRules: List> = listOf AllowNullable(FetchedOrder.RecurringChargeSettings::subscriptionPriceWithSignUpFee), AllowNullable(FetchedOrder.RecurringChargeSettings::signUpFee), IgnoreNullable(FetchedOrder.OrderItem::selectedOptions), + AllowNullable(FetchedOrder.OrderItem::combinationId), AllowNullable(FetchedOrder.OrderItem::selectedPrice), IgnoreNullable(FetchedOrder.OrderItem::shipping), IgnoreNullable(FetchedOrder.OrderItem::shortDescription), @@ -237,6 +238,7 @@ val fetchedOrderNullablePropertyRules: List> = listOf AllowNullable(FetchedOrder::fulfillmentStatus), AllowNullable(FetchedOrder::giftCardCode), AllowNullable(FetchedOrder::giftCardDoubleSpending), + AllowNullable(FetchedOrder::giftCardId), AllowNullable(FetchedOrder::giftCardRedemption), AllowNullable(FetchedOrder::globalReferer), AllowNullable(FetchedOrder::handlingFee), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedProductRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedProductRules.kt index d9a11071f..a6ab87178 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedProductRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedProductRules.kt @@ -24,7 +24,8 @@ val fetchedProductNullablePropertyRules: List> = list AllowNullable(FetchedProduct::defaultDisplayedCompareToPriceDiscountPercent), AllowNullable(FetchedProduct::defaultDisplayedCompareToPriceDiscountPercentFormatted), AllowNullable(FetchedProduct::lowestPrice), - AllowNullable(FetchedProduct::lowestPriceFormatted), + AllowNullable(FetchedProduct::defaultDisplayedLowestPrice), + AllowNullable(FetchedProduct::defaultDisplayedLowestPriceFormatted), AllowNullable(FetchedProduct::customsHsTariffCode), IgnoreNullable(FetchedProduct::defaultCategoryId), IgnoreNullable(FetchedProduct::defaultCombinationId), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedSubscriptionRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedSubscriptionRules.kt index fadec37c0..c8780e6ce 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedSubscriptionRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedSubscriptionRules.kt @@ -56,6 +56,7 @@ val fetchedSubscriptionsNullablePropertyRules: List> AllowNullable(FetchedSubscription.OrderItem::fixedShippingRate), AllowNullable(FetchedSubscription.OrderItem::sku), AllowNullable(FetchedSubscription.OrderItem::name), + AllowNullable(FetchedSubscription.OrderItem::nameTranslated), AllowNullable(FetchedSubscription.OrderItem::shortDescription), AllowNullable(FetchedSubscription.OrderItem::quantity), AllowNullable(FetchedSubscription.OrderItem::quantityInStock), @@ -65,6 +66,8 @@ val fetchedSubscriptionsNullablePropertyRules: List> AllowNullable(FetchedSubscription.OrderItem::digital), AllowNullable(FetchedSubscription.OrderItem::productAvailable), AllowNullable(FetchedSubscription.OrderItem::imageUrl), + AllowNullable(FetchedSubscription.OrderItem::smallThumbnailUrl), + AllowNullable(FetchedSubscription.OrderItem::hdThumbnailUrl), AllowNullable(FetchedSubscription.OrderItem::recurringChargeSettings), AllowNullable(FetchedSubscription.OrderItem::selectedOptions), AllowNullable(FetchedSubscription.OrderItem::taxes), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedVariationRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedVariationRules.kt index eb39aa593..c1ba0ed9d 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedVariationRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedVariationRules.kt @@ -10,7 +10,8 @@ val fetchedVariationTypeNullablePropertyRules: List> AllowNullable(FetchedVariation::borderInfo), IgnoreNullable(FetchedVariation::compareToPrice), IgnoreNullable(FetchedVariation::lowestPrice), - IgnoreNullable(FetchedVariation::lowestPriceFormatted), + IgnoreNullable(FetchedVariation::defaultDisplayedLowestPrice), + IgnoreNullable(FetchedVariation::defaultDisplayedLowestPriceFormatted), AllowNullable(FetchedVariation::costPrice), AllowNullable(FetchedVariation::customsHsTariffCode), IgnoreNullable(FetchedVariation::defaultDisplayedPrice), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/OrderForCalculateRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/OrderForCalculateRules.kt index ebe06d026..e810da5da 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/OrderForCalculateRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/OrderForCalculateRules.kt @@ -14,6 +14,9 @@ val orderForCalculateNullablePropertyRules: List> = l IgnoreNullable(OrderForCalculate::discountInfo), IgnoreNullable(OrderForCalculate::email), AllowNullable(OrderForCalculate::handlingFee), + AllowNullable(OrderForCalculate::giftCardCode), + AllowNullable(OrderForCalculate::giftCardId), + AllowNullable(OrderForCalculate::giftCardTransactionOrderId), IgnoreNullable(OrderForCalculate::ipAddress), IgnoreNullable(OrderForCalculate::items), AllowNullable(OrderForCalculate::paymentOptionsDetails), @@ -70,6 +73,7 @@ val orderForCalculateNullablePropertyRules: List> = l IgnoreNullable(OrderForCalculate.OrderItem::quantity), IgnoreNullable(OrderForCalculate.OrderItem::quantityInStock), IgnoreNullable(OrderForCalculate.OrderItem::selectedOptions), + AllowNullable(OrderForCalculate.OrderItem::combinationId), IgnoreNullable(OrderForCalculate.OrderItem::shipping), IgnoreNullable(OrderForCalculate.OrderItem::shortDescription), IgnoreNullable(OrderForCalculate.OrderItem::sku), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/SubscriptionsSearchRequestRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/SubscriptionsSearchRequestRules.kt index 38ce8ec10..c746afb34 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/SubscriptionsSearchRequestRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/SubscriptionsSearchRequestRules.kt @@ -24,6 +24,5 @@ val subscriptionsSearchRequestNullablePropertyRules: List