UNPKG

inventora-shopify-admin-api

Version:

Shopify Admin API is a NodeJS library built to help developers easily authenticate and make calls against the Shopify API. It was inspired by and borrows heavily from ShopifySharp.

36 lines (35 loc) 1.31 kB
import * as Options from '../options'; import { BaseService } from '../infrastructure'; import { PriceRule } from '../interfaces'; /** * A service for manipulating Shopify Price Rules. */ export declare class PriceRules extends BaseService { constructor(shopDomain: string, accessToken: string); /** * Gets a list of up to 250 of the shop's Price Rules. * @param options Options for filtering the results. */ list(options?: Options.ListOptions & Options.FieldOptions): Promise<PriceRule[]>; /** * The API is currently restricted to what the Shopify Discounts admin section offers. Note that for * a price rule to be accessible via the admin section of Shopify, you will need to create a * discount code as well. */ create(PriceRule: Partial<PriceRule>): Promise<PriceRule>; /** * Retrieves the Price Rule with the given id. * @param options Options for filtering the results. */ get(id: number): Promise<PriceRule>; /** * Updates the Price Rule with the given id. * @param tag The updated Price Rule. */ update(id: number, PriceRule: Partial<PriceRule>): Promise<PriceRule>; /** * Deletes the Price Rule with the given id. */ delete(id: number): Promise<void>; } export default PriceRules;