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

io.sphere.sdk.carts.queries.CartLikeQueryModel Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.carts.queries;

import io.sphere.sdk.customergroups.CustomerGroup;
import io.sphere.sdk.queries.*;
import io.sphere.sdk.types.queries.CustomResourceQueryModelImpl;
import io.sphere.sdk.types.queries.WithCustomQueryModel;

/**
 * Base class to create predicates for {@link io.sphere.sdk.carts.CartLike} resources.
 * @param  query context
 */
public abstract class CartLikeQueryModel extends CustomResourceQueryModelImpl implements WithCustomQueryModel {
    protected CartLikeQueryModel(QueryModel parent, String pathSegment) {
        super(parent, pathSegment);
    }

    public StringQuerySortingModel customerId() {
        return stringModel("customerId");
    }

    public StringQuerySortingModel customerEmail() {
        return stringModel("customerEmail");
    }

    public MoneyQueryModel totalPrice() {
        return moneyModel("totalPrice");
    }

    public TaxedPriceOptionalQueryModel taxedPrice() {
        return new TaxedPriceOptionalQueryModelImpl<>(this, "taxedPrice");
    }

    public CountryQueryModel country() {
        return countryQueryModel("country");
    }

    public ReferenceOptionalQueryModel customerGroup() {
        return referenceOptionalModel("customerGroup");
    }

    public LineItemCollectionQueryModel lineItems() {
        return new LineItemLikeCollectionQueryModelImpl<>(this, "lineItems");
    }

    public CustomLineItemCollectionQueryModel customLineItems() {
        return new LineItemLikeCollectionQueryModelImpl<>(this, "customLineItems");
    }

    public AddressQueryModel shippingAddress() {
        return addressModel("shippingAddress");
    }

    public AddressQueryModel billingAddress() {
        return addressModel("billingAddress");
    }

    public CartShippingInfoQueryModel shippingInfo() {
        return new CartShippingInfoQueryModelImpl<>(this, "shippingInfo");
    }

    public DiscountCodeInfoCollectionQueryModel discountCodes() {
        return new DiscountCodeInfoCollectionQueryModelImpl<>(this, "discountCodes");
    }

    public PaymentInfoQueryModel paymentInfo() {
        return new PaymentInfoQueryModelImpl<>(this, "paymentInfo");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy