Class CustomerSignInGraphQLQuery

java.lang.Object
com.netflix.graphql.dgs.client.codegen.GraphQLQuery
com.commercetools.graphql.api.client.CustomerSignInGraphQLQuery

public class CustomerSignInGraphQLQuery extends com.netflix.graphql.dgs.client.codegen.GraphQLQuery
Retrieves the authenticated customer (a customer that matches the given email/password pair). There may be carts and orders created before the sign in that should be assigned to the customer account. With the `anonymousCartId`, a single anonymous cart can be assigned. With the `anonymousId`, all orders and carts that have this `anonymousId` set will be assigned to the customer. If both `anonymousCartId` and `anonymousId` are given, the anonymous cart must have the `anonymousId`. Additionally, there might also exist one or more active customer carts from an earlier session. On customer sign in there are several ways how to proceed with this cart and the cart referenced by the `anonymousCartId`. * If the customer does not have a cart yet, the anonymous cart becomes the customer's cart. * If the customer already has one or more carts, the content of the anonymous cart will be copied to the customer's active cart that has been modified most recently. In this case the `CartState` of the anonymous cart gets changed to `Merged` while the customer's cart remains the `Active` cart. If a `LineItem` in the anonymous cart matches an existing line item, or a `CustomLineItem` matches an existing custom line item in the customer's cart, the maximum quantity of both line items is used as the new quantity. `ItemShippingDetails` are copied from the item with the highest quantity. If `itemShippingAddresses` are different in the two carts, the resulting cart contains the addresses of both the customer cart and the anonymous cart. Note, that it is not possible to merge carts that differ in their currency (set during creation of the cart). If a cart is is returned as part of the `CustomerSignInResult`, it has been recalculated (it will have up-to-date prices, taxes and discounts, and invalid line items have been removed).
  • Constructor Details

    • CustomerSignInGraphQLQuery

      public CustomerSignInGraphQLQuery(CustomerSignInDraft draft, String storeKey, String queryName, Set<String> fieldsSet)
    • CustomerSignInGraphQLQuery

      public CustomerSignInGraphQLQuery()
  • Method Details

    • getOperationName

      public String getOperationName()
      Specified by:
      getOperationName in class com.netflix.graphql.dgs.client.codegen.GraphQLQuery
    • newRequest

      public static CustomerSignInGraphQLQuery.Builder newRequest()