Class ByProjectKeyInStoreKeyByStoreKeyShippingMethodsMatchingCartGet

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

Retrieves the active ShippingMethods that can ship to the shipping address of the provided Cart in a Store.

The Cart must belong to the Store specified in the path. If no Cart exists for the given cartId in the specified Store, either because the Cart does not exist in the Project or because it exists but does not belong to that Store, an InvalidOperation error is returned.

The results include globally scoped ShippingMethods (those with an empty stores field) and ShippingMethods scoped to the Store specified in the path.

Each ShippingMethod contains exactly one ShippingRate with the flag isMatching set to true. This ShippingRate is used when the ShippingMethod is added to the Cart.

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



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.shipping_method.ShippingMethodPagedQueryResponse>> result = apiRoot
            .withProjectKey("{projectKey}")
            .inStoreKeyWithStoreKeyValue("{storeKey}")
            .shippingMethods()
            .matchingCart()
            .get()
            .withCartId(cartId)
            .execute()