All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.shippingmethods.queries.ShippingMethodsByCartGetImpl Maven / Gradle / Ivy

The newest version!
package io.sphere.sdk.shippingmethods.queries;

import com.fasterxml.jackson.core.type.TypeReference;
import io.sphere.sdk.http.NameValuePair;
import io.sphere.sdk.queries.MetaModelGetDslBuilder;
import io.sphere.sdk.queries.MetaModelGetDslImpl;
import io.sphere.sdk.shippingmethods.ShippingMethod;
import io.sphere.sdk.shippingmethods.expansion.ShippingMethodExpansionModel;

import java.util.Collections;
import java.util.List;

final class ShippingMethodsByCartGetImpl extends MetaModelGetDslImpl, ShippingMethod, ShippingMethodsByCartGet, ShippingMethodExpansionModel> implements ShippingMethodsByCartGet {
    ShippingMethodsByCartGetImpl(final String cartId) {
        super(ShippingMethodEndpoint.ENDPOINT.withTypeReference(new TypeReference>() {
            @Override
            public String toString() {
                return "TypeReference>";
            }
        }), "", ShippingMethodExpansionModel.of(), ShippingMethodsByCartGetImpl::new, createQueryParameters(cartId));
    }

    ShippingMethodsByCartGetImpl(MetaModelGetDslBuilder, ShippingMethod, ShippingMethodsByCartGet, ShippingMethodExpansionModel> builder) {
        super(builder);
    }

    private static List createQueryParameters(final String cartId) {
        return Collections.singletonList(NameValuePair.of("cartId", cartId));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy