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.28 kB
import * as Options from '../options'; import { BaseService } from '../infrastructure'; import { RecurringCharge } from '../interfaces'; /** * A service for manipulating Shopify's RecurringCharge API. */ export declare class RecurringCharges extends BaseService { constructor(shopDomain: string, accessToken: string); /** * Creates a new charge. */ create(charge: Partial<RecurringCharge>): Promise<RecurringCharge>; /** * Gets a charge with the given id. * @param id The id of the charge to get. * @param options Options for filtering the result. */ get(id: number, options?: Options.FieldOptions): Promise<RecurringCharge>; /** * Retrieves a list of all past and present charges. * @param options Options for filtering the result. */ list(options?: Options.ListOptions & Options.DateOptions & Options.FieldOptions): Promise<RecurringCharge[]>; /** * Activates a charge. Can only be activated if the charge's status is "accepted". * @param id The id of the charge to activate. */ activate(id: number): Promise<void>; /** * Deletes a charge. * @param id The id of the charge to delete. */ delete(id: number): Promise<void>; } export default RecurringCharges;