UNPKG

mpp-sdk

Version:

SDK to talk to the Memento Payments Platform

50 lines (49 loc) 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const base_1 = require("./base"); class VerificationEndpoint extends base_1.BaseEndpoint { getById(id) { return this.doRequest({ url: `/verifications/${id}`, method: "GET", }); } /** * Create a verification. * Verification object is created but the verification flow is not started. * @param data */ create(data) { return this.doRequest({ url: "/verifications", method: "POST", data, }); } /** * Start a verification. * Starts the verification flow for an existing verification. * @param verificationId id of verification * @param data */ start(verificationId, data) { return this.doRequest({ url: `/verifications/${verificationId}/start`, method: "POST", data, }); } /** * Provide data to an existing verification. * @param verificationId id of verification * @param data verification data */ provide(verificationId, data) { return this.doRequest({ url: `/verifications/${verificationId}/data`, method: "POST", data, }); } } exports.default = VerificationEndpoint;