UNPKG

modem-pay

Version:
16 lines (15 loc) 804 B
import BaseResource from "./base"; import { PromotionCode, PromotionCodeParams, PromotionCodeListOption, List } from "../types"; export default class PromotionCodeResource extends BaseResource { constructor(apiKey: string, maxRetries: number, timeout: number); /** Creates a new promotion code. */ create(params: PromotionCodeParams): Promise<PromotionCode>; /** Retrieves a Promotion Code's data. */ retrieve(id: string): Promise<PromotionCode>; /** Returns a list of promotion codes. */ list(options?: PromotionCodeListOption): Promise<List<PromotionCode>>; /** Updates the specified promotion code. */ update(id: string, params: PromotionCodeParams): Promise<PromotionCode>; /** Permanently deletes a promotion code. */ delete(id: string): Promise<void>; }