![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@prezzee/ts-v2-sdks
Advanced tools
This SDK supports Prezzee's V2 Business APIs enabling quicker development. It allows the developers to:
This SDK supports Prezzee's V2 Business APIs enabling quicker development. It allows the developers to:
npm install @prezzee/ts-v2-sdks
Install dependencies as well:
npm install axios
To use the SDK, you need to acquire Business API token by contacting Prezzee.
Example API token: sJ0uOIDRYexgfL2M7BgLiPjb6xddfdskPAi
const prezzeeClient = createPrezzeeClient({
token: "<Your API Token>",
// Select the correct environnement
env: "sandbox",
// Select the target region
region: "AU",
});
Once initialized, the client can be used as below:
const products = await prezzeeClient.listProducts();
For a complete list of available API calls refer to the API documentation.
Below are a few examples
In Prezzee API, orders are fulfilled in the background (asynchronously). Therefore, it is important to note that, prezzeeClient.createOrder()
API always returns order status PROCESSING
, indicating that the order is successfully being processed in the background.
Order items (i.e. gift cards), can only be retrieved once the order has moved into the COMPLETE
status. The API prezzeeClient.retrieveOrder()
can be used to poll the order details to check if a order has moved to COMPLETE
status. Our SDK provides a convenient way handle this by simply specifying a configuration awaitCompletion
. When specified, API will poll retrieve order endpoint until order moves COMPLETE
with incremental delays. This method will throw TimeoutError
, if the order does not move to completion within 20 seconds.
await prezzeeClient.retrieveOrder(
{
orderUuid: order.uuid,
},
{ awaitCompletion: true }
);
To find complete examples please go to /examples
directory in the code.
FAQs
This SDK supports Prezzee's V2 Business APIs enabling quicker development. It allows the developers to:
We found that @prezzee/ts-v2-sdks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 61 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.