terminal-africa
Version:
## Introduction The Terminal Shipping API (TShip) provides a single interface for integrating shipping carriers within your applications. The API allows anyone to programatically get shipping rates and arrange pickup and delivery.
65 lines (64 loc) • 2.21 kB
TypeScript
export default class Webhook {
/**
* Create Webhook - This allows you to create webhooks on Terminal Africa
* @param {Object[]} webhookData
* @param {boolean} webhookData[].active
* @param {array} webhookData[].events
* @param {boolean} webhookData[].live
* @param {name} webhookData[].name
* @param {string} webhookData[].url
* @returns object
* @method POST
*/
static createWebhook(webhookData: object): Promise<any>;
/**
* Update Webhook - This allows you to update existing webhooks on Terminal Africa
* @param {string} webhookId
* @param {Object[]} webhookData
* @param {boolean} webhookData[].active
* @param {array} webhookData[].events
* @param {boolean} webhookData[].live
* @param {name} webhookData[].name
* @param {string} webhookData[].url
* @returns object
* @method PUT
*/
static updateWebhook(webhookId: string, webhookData: object): Promise<any>;
/**
* Get Webhooks - This allows you to fetch webhooks on Terminal Africa
* @param {string} queryParams
* @param {string=} queryParams.page
* @param {string=} queryParams.perPage
* @returns object
* @method GET
*/
static getWebhooks(queryParams: any): Promise<any>;
/**
* Get Webhook - This allows you to fetch a webhook on Terminal Africa
* @param {string} webhookId
* @returns object
* @method GET
*/
static getWebhook(webhookId: string): Promise<any>;
/**
* Delete Webhook - This allows you to delete a webhook on Terminal Africa
* @param {string} webhookId
* @returns object
* @method DELETE
*/
static deleteWebhook(webhookId: string): Promise<any>;
/**
* Enable Webhook - This allows you to enable a webhook on Terminal Africa
* @param {string} webhookId
* @returns object
* @method POST
*/
static enableWebhook(webhookId: string): Promise<any>;
/**
* Disable Webhook - This allows you to disable a webhook on Terminal Africa
* @param {string} webhookId
* @returns object
* @method POST
*/
static disableWebhook(webhookId: string): Promise<any>;
}