Class CatalogRequest

java.lang.Object
io.constructor.client.CatalogRequest

public class CatalogRequest extends Object
Constructor.io Catalog Request
  • Constructor Details

    • CatalogRequest

      public CatalogRequest(Map<String,File> files, String section)
      Creates a catalog request
      Parameters:
      files - the files to be uploaded
      section - the autocomplete section to upload the files to
  • Method Details

    • setOnMissing

      public void setOnMissing(CatalogRequest.OnMissing onMissing)
      Parameters:
      onMissing - Either "FAIL", "CREATE", "IGNORE", indicating what to do when a missing item is uploaded for patch requests. "FAIL" will fail the patch catalog request if an item does not exist. "CREATE" will create the item if it does not exist. "IGNORE" will ignore items that do not exist. Defaults to "FAIL". Only applicable to patchCatalog requests.
    • getOnMissing

      public CatalogRequest.OnMissing getOnMissing()
      Returns:
      the onMissing strategy
    • setFiles

      public void setFiles(Map<String,File> files)
      Parameters:
      files - the files to be uploaded (items, variations, item_groups)
    • getFiles

      public Map<String,File> getFiles()
      Returns:
      the files to be uploaded
    • setSection

      public void setSection(String section)
      Parameters:
      section - the section to set
    • getSection

      public String getSection()
      Returns:
      the notification email
    • setNotificationEmail

      @Deprecated public void setNotificationEmail(String email)
      Deprecated.
      Use setNotificationEmails(List) instead to support multiple emails.
      Parameters:
      email - the email address to receive a notification in case the task fails
    • setNotificationEmails

      public void setNotificationEmails(List<String> emails)
      Parameters:
      emails - list of email addresses where you'd like to receive notifications in case the task fails
    • getNotificationEmail

      @Deprecated public String getNotificationEmail()
      Deprecated.
      Use getNotificationEmails() instead to support multiple emails.
      Returns:
      the first notification email, or null if none set
    • getNotificationEmails

      public List<String> getNotificationEmails()
      Returns:
      the list of notification emails, or null if none set
    • setForce

      public void setForce(Boolean force)
      Parameters:
      force - true if the catalog should be processed even if it will invalidate a large number of existing items
    • getForce

      public Boolean getForce()
      Returns:
      the force flag