UNPKG

privacy.com

Version:

Wrapper for the Privacy.com API using Axios and TypeScript

30 lines (29 loc) 865 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _1 = require("."); const _defaultParams = { approval_status: "ALL", }; /** * List transactions associated with the privacy account or a specific card */ class ListTransactionsRequest extends _1.GetEndpoint { constructor(params = _defaultParams) { super(); this.path = "/transaction"; this.params = params; switch (this.params.approval_status) { case "ALL": this.path += "/all"; break; case "APPROVALS": this.path += "/approvals"; break; case "DECLINES": this.path += "/declines"; break; } delete this.params.approval_status; } } exports.ListTransactionsRequest = ListTransactionsRequest;