UNPKG

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.

31 lines (30 loc) 1.09 kB
import * as Options from '../options'; import { BaseService } from '../infrastructure'; import { Charge } from '../interfaces'; /** * A service for manipulating Shopify's ApplicationCharge API. */ export declare class Charges extends BaseService { constructor(shopDomain: string, accessToken: string); /** * Creates a new charge. */ create(charge: Partial<Charge>): Promise<Charge>; /** * 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<Charge>; /** * 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<Charge[]>; /** * 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>; } export default Charges;