Class ShopifyService

java.lang.Object
com.northconcepts.datapipeline.shopify.client.ShopifyService

public class ShopifyService extends Object
Calls the Shopify Admin REST API and returns each JSON response as a Record, rethrowing failures as DataExceptions.
  • Constructor Details

    • ShopifyService

      public ShopifyService(String domain, String apiKey)
      Creates a service for the store at domain, a base URL such as https://example.myshopify.com, that authenticates with apiKey as an access token; call close() when done.
  • Method Details

    • getSalesOrders

      public Record getSalesOrders(ShopifyOrder orderCriteria, Integer limit, String nextPageInfo)
      Returns a page of orders whose next field holds the cursor of the following page, if any. When nextPageInfo is not empty, the criteria's filters other than fields are cleared in place first.
    • getAllDraftOrders

      public Record getAllDraftOrders()
    • updateOrder

      public Record updateOrder(String orderId, ShopifyOrder order)
    • getInventoryItems

      public Record getInventoryItems(ShopifyInventoryItemCriteria itemCriteria, Integer limit, String nextPageInfo)
      Returns a page of inventory items whose next field holds the cursor of the following page, if any. When nextPageInfo is not empty, the criteria's IDs are cleared in place first.
    • getLocationInventoryLevel

      public Record getLocationInventoryLevel(ShopifyInventoryLevelCriteria inventoryLevelCriteria, Integer limit, String nextPageInfo)
      Returns a page of inventory levels whose next field holds the cursor of the following page, if any. When nextPageInfo is not empty, the criteria's filters are cleared in place first.
    • updateInventoryItem

      public Record updateInventoryItem(String itemId, ShopifyInventoryItem item)
    • adjustInventoryLevel

      public Record adjustInventoryLevel(String locationId, String inventoryItemId, int availableAdjustment)
    • updateInventoryLevel

      public Record updateInventoryLevel(String locationId, String inventoryItemId, int available)
    • getLocations

      public Record getLocations(Integer limit, String nextPageInfo)
      Returns a page of locations whose next field holds the cursor of the following page, if any.
    • getProducts

      public Record getProducts(ShopifyProductCriteria productCriteria, Integer limit, String nextPageInfo)
      Returns a page of products whose next field holds the cursor of the following page, if any. When nextPageInfo is not empty, the criteria's status, IDs, published status and created/updated dates are cleared in place first.
    • getCustomers

      public Record getCustomers(ShopifyCustomerCriteria customerCriteria, Integer limit, String nextPageInfo)
      Returns a page of customers whose next field holds the cursor of the following page, if any. When nextPageInfo is not empty, the criteria's filters other than fields are cleared in place first.
    • getEvents

      public Record getEvents(ShopifyEventCriteria eventCriteria, Integer limit, String nextPageInfo)
      Returns a page of events whose next field holds the cursor of the following page, if any. When nextPageInfo is not empty, the criteria's filters other than fields are cleared in place first.
    • close

      public void close()
      Closes the underlying RESTEasy client.