@paddle/paddle-node-sdk
Version:
A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.
21 lines (20 loc) • 616 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PathParameters = void 0;
class PathParameters {
constructor(url, pathParameters) {
this.url = url;
this.pathParameters = pathParameters;
}
deriveUrl() {
let updatedUrl = this.url;
for (const key in this.pathParameters) {
const value = this.pathParameters[key];
if (key && value) {
updatedUrl = updatedUrl.split(`{${key}}`).join(value.toString());
}
}
return updatedUrl;
}
}
exports.PathParameters = PathParameters;