From 9cb98ce1967bdba9fb4f42bf1b01650568e766cd Mon Sep 17 00:00:00 2001 From: ringo Date: Fri, 4 Jul 2025 16:57:32 +0400 Subject: [PATCH 1/2] Enable FIXED_PRICE promotions in tests --- .../com/ecwid/apiclient/v3/util/OrderUtils.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/util/OrderUtils.kt b/src/test/kotlin/com/ecwid/apiclient/v3/util/OrderUtils.kt index b890527c..a7c38a69 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/util/OrderUtils.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/util/OrderUtils.kt @@ -164,7 +164,7 @@ fun generateTestOrder(): UpdatedOrder { private fun generateTestOnTotalDiscountInfo() = UpdatedOrder.DiscountInfo( value = randomPrice(), - type = randomEnumValue(exclude = arrayOf(DiscountType.FIXED_PRICE)), + type = randomEnumValue(), base = DiscountBase.ON_TOTAL, orderTotal = randomPrice(), description = "On total discount " + randomAlphanumeric(8) @@ -172,14 +172,14 @@ private fun generateTestOnTotalDiscountInfo() = UpdatedOrder.DiscountInfo( private fun generateTestOnMembershipDiscountInfo() = UpdatedOrder.DiscountInfo( value = randomPrice(), - type = randomEnumValue(exclude = arrayOf(DiscountType.FIXED_PRICE)), + type = randomEnumValue(), base = DiscountBase.ON_MEMBERSHIP, description = "On membership discount " + randomAlphanumeric(8) ) private fun generateTestOnTotalAndMembershipDiscountInfo() = UpdatedOrder.DiscountInfo( value = randomPrice(), - type = randomEnumValue(exclude = arrayOf(DiscountType.FIXED_PRICE)), + type = randomEnumValue(), base = DiscountBase.ON_TOTAL_AND_MEMBERSHIP, orderTotal = randomPrice(), description = "On total and membership discount " + randomAlphanumeric(8) @@ -187,7 +187,7 @@ private fun generateTestOnTotalAndMembershipDiscountInfo() = UpdatedOrder.Discou private fun generateTestCustomDiscountInfo() = UpdatedOrder.DiscountInfo( value = randomPrice(), - type = randomEnumValue(exclude = arrayOf(DiscountType.FIXED_PRICE)), + type = randomEnumValue(), base = DiscountBase.CUSTOM, orderTotal = randomPrice(), description = "Custom discount " + randomAlphanumeric(8) @@ -195,7 +195,7 @@ private fun generateTestCustomDiscountInfo() = UpdatedOrder.DiscountInfo( private fun generateTestItemDiscountInfo() = UpdatedOrder.DiscountInfo( value = randomPrice(), - type = randomEnumValue(exclude = arrayOf(DiscountType.FIXED_PRICE)), + type = randomEnumValue(), base = DiscountBase.ITEM, orderTotal = randomPrice(), description = "On item discount " + randomAlphanumeric(8) @@ -203,7 +203,7 @@ private fun generateTestItemDiscountInfo() = UpdatedOrder.DiscountInfo( private fun generateTestShippingDiscountInfo() = UpdatedOrder.DiscountInfo( value = randomPrice(), - type = randomEnumValue(exclude = arrayOf(DiscountType.FIXED_PRICE)), + type = randomEnumValue(), base = DiscountBase.SHIPPING, orderTotal = randomPrice(), description = "On shipping discount " + randomAlphanumeric(8) @@ -211,7 +211,7 @@ private fun generateTestShippingDiscountInfo() = UpdatedOrder.DiscountInfo( private fun generateTestSubtotalDiscountInfo() = UpdatedOrder.DiscountInfo( value = randomPrice(), - type = randomEnumValue(exclude = arrayOf(DiscountType.FIXED_PRICE)), + type = randomEnumValue(), base = DiscountBase.SUBTOTAL, orderTotal = randomPrice(), description = "On subtotal discount " + randomAlphanumeric(8) From c18ce768fee1a16b5e576f6d286e6bdbfe8de5e2 Mon Sep 17 00:00:00 2001 From: ringo Date: Mon, 7 Jul 2025 15:41:05 +0400 Subject: [PATCH 2/2] Update repositories --- build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 8b53b2a4..2765290b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -206,6 +206,8 @@ nexusPublishing { useStaging.set(!project.isSnapshotVersion()) packageGroup.set(PublicationSettings.STAGING_PACKAGE_GROUP) stagingProfileId.set(PublicationSettings.STAGING_PROFILE_ID) + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) username.set(settingsProvider.ossrhUsername) password.set(settingsProvider.ossrhPassword) }