mailinator-client
Version:
Mailinator REST API client for JavaScript applications.
19 lines (18 loc) • 741 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.PrivateInboxWebhookRequest = void 0;
const MailinatorRestClient_1 = require("../MailinatorRestClient");
const _resolveTemplateUrl = (whToken, inbox) => {
return `https://api.mailinator.com/api/v2/domains/private/webhook/${inbox}/?whtoken=${whToken}`;
};
class PrivateInboxWebhookRequest {
constructor(whToken, inbox, webhook) {
this.whToken = whToken;
this.inbox = inbox;
this.webhook = webhook;
}
execute() {
return MailinatorRestClient_1.default.create(_resolveTemplateUrl(this.whToken, this.inbox), this.webhook);
}
}
exports.PrivateInboxWebhookRequest = PrivateInboxWebhookRequest;
;