diff --git a/example/src/test/java/org/wordpress/android/fluxc/wc/order/WCOrderStoreTest.kt b/example/src/test/java/org/wordpress/android/fluxc/wc/order/WCOrderStoreTest.kt index a75aa3eb1d..f380ee9d58 100644 --- a/example/src/test/java/org/wordpress/android/fluxc/wc/order/WCOrderStoreTest.kt +++ b/example/src/test/java/org/wordpress/android/fluxc/wc/order/WCOrderStoreTest.kt @@ -653,7 +653,7 @@ class WCOrderStoreTest { } @Test - fun `given mixed success and failure response when batch updating status then returns successful and failed orders`() { + fun `given mixed response when batch updating status then returns successful and failed orders`() { runBlocking { // Given val site = SiteModel().apply { id = 1 } diff --git a/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/order/OrderRestClient.kt b/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/order/OrderRestClient.kt index 4598c170ac..a481ee20ef 100644 --- a/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/order/OrderRestClient.kt +++ b/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/order/OrderRestClient.kt @@ -1261,7 +1261,7 @@ class OrderRestClient @Inject constructor( "tracking_provider" ).joinToString(separator = ",") - private val BATCH_UPDATE_LIMIT = 100 + private const val BATCH_UPDATE_LIMIT = 100 } enum class SortOrder(val value: String) { diff --git a/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/store/WCOrderStore.kt b/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/store/WCOrderStore.kt index e6b7f56294..7d501976c9 100644 --- a/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/store/WCOrderStore.kt +++ b/plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/store/WCOrderStore.kt @@ -27,7 +27,6 @@ import org.wordpress.android.fluxc.network.rest.wpcom.wc.WooError import org.wordpress.android.fluxc.network.rest.wpcom.wc.WooErrorType.API_ERROR import org.wordpress.android.fluxc.network.rest.wpcom.wc.WooResult import org.wordpress.android.fluxc.network.rest.wpcom.wc.order.BatchOrderApiResponse -import org.wordpress.android.fluxc.network.rest.wpcom.wc.order.BatchOrderApiResponse.ErrorResponse import org.wordpress.android.fluxc.network.rest.wpcom.wc.order.OrderRestClient import org.wordpress.android.fluxc.network.rest.wpcom.wc.order.OrderRestClient.OrderBy import org.wordpress.android.fluxc.network.rest.wpcom.wc.order.OrderRestClient.SortOrder @@ -1171,6 +1170,7 @@ class WCOrderStore @Inject constructor( } } + @Suppress("NestedBlockDepth") suspend fun batchUpdateOrdersStatus( site: SiteModel, orderIds: List,