UNPKG

@paddle/paddle-node-sdk

Version:

A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.

17 lines (16 loc) 472 B
export 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; } }