Class ByProjectKeyShippingMethodsMatchingOrdereditGet

All Implemented Interfaces:
Deprecatable200Trait<ByProjectKeyShippingMethodsMatchingOrdereditGet>, ErrorableTrait<ByProjectKeyShippingMethodsMatchingOrdereditGet>, ClientRequestCommand<ShippingMethodPagedQueryResponse>, CreateHttpRequestCommand, HttpRequestCommand<ShippingMethodPagedQueryResponse>, RequestCommand<ShippingMethodPagedQueryResponse>

Retrieves the active ShippingMethods that can ship to the provided Location for an OrderEdit.

Store scoping is evaluated against the Order that results from applying the OrderEdit's staged actions. If the underlying Order belongs to a Store, the results include globally scoped ShippingMethods (those with an empty stores field) and ShippingMethods scoped to that Store. If the underlying Order has no Store, only globally scoped ShippingMethods are returned.

If a matching ShippingMethod has isDefault set to true, it is returned as the first item in the array.

If the OrderEdit preview cannot be generated, an EditPreviewFailed error is returned.



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.shipping_method.ShippingMethodPagedQueryResponse>> result = apiRoot
            .withProjectKey("{projectKey}")
            .shippingMethods()
            .matchingOrderedit()
            .get()
            .withOrderEditId(orderEditId)
            .withCountry(country)
            .execute()