Interface GraphQLCountryNotConfiguredInStoreError

All Superinterfaces:
GraphQLErrorObject

public interface GraphQLCountryNotConfiguredInStoreError extends GraphQLErrorObject

Returned when a Cart or an Order in a Store references a country that is not included in the countries configured for the Store.

The error is returned as a failed response to:

  • Create Cart in Store request and Set Country update action on Carts.
  • Create Cart in Store request and Set Country update action on My Carts.
  • Create Order in Store from Cart and Create Order from Quote requests on Orders.
  • Create Order in Store from Cart and Create Order from Quote requests on My Orders.
  • Create Order by Import request on Order Import.
  • Set Country update action on Order Edits.

Example to create an instance using the builder pattern

     GraphQLCountryNotConfiguredInStoreError graphQLCountryNotConfiguredInStoreError = GraphQLCountryNotConfiguredInStoreError.builder()
             .plusStoreCountries(storeCountriesBuilder -> storeCountriesBuilder)
             .country("{country}")
             .build()
 
  • Field Details

    • COUNTRY_NOT_CONFIGURED_IN_STORE

      static final String COUNTRY_NOT_CONFIGURED_IN_STORE
      discriminator value for GraphQLCountryNotConfiguredInStoreError
      See Also:
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: GraphQLErrorObject

      One of the error codes that is listed on the Errors page.

      Specified by:
      getCode in interface GraphQLErrorObject
      Returns:
      code
    • getStoreCountries

      @NotNull @NotNull List<String> getStoreCountries()

      Countries configured for the Store.

      Returns:
      storeCountries
    • getCountry

      @NotNull @NotNull String getCountry()

      The country that is not configured for the Store but referenced on the Cart or Order.

      Returns:
      country
    • setStoreCountries

      void setStoreCountries(String... storeCountries)

      Countries configured for the Store.

      Parameters:
      storeCountries - values to be set
    • setStoreCountries

      void setStoreCountries(List<String> storeCountries)

      Countries configured for the Store.

      Parameters:
      storeCountries - values to be set
    • setCountry

      void setCountry(String country)

      The country that is not configured for the Store but referenced on the Cart or Order.

      Parameters:
      country - value to be set
    • of

      factory method
      Returns:
      instance of GraphQLCountryNotConfiguredInStoreError
    • of

      factory method to create a shallow copy GraphQLCountryNotConfiguredInStoreError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of GraphQLCountryNotConfiguredInStoreError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for GraphQLCountryNotConfiguredInStoreError
      Returns:
      builder
    • builder

      create builder for GraphQLCountryNotConfiguredInStoreError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLCountryNotConfiguredInStoreError

      default <T> T withGraphQLCountryNotConfiguredInStoreError(Function<GraphQLCountryNotConfiguredInStoreError,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<GraphQLCountryNotConfiguredInStoreError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference