npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@prezzee/ts-v2-sdks

v1.10.0

Published

This SDK supports Prezzee's V2 Business APIs enabling quicker development. It allows the developers to:

Downloads

22

Readme

Welcome to Prezzee SDKs

This SDK supports Prezzee's V2 Business APIs enabling quicker development. It allows the developers to:

  • List Products
  • Retrieve Product Details
  • List Styles
  • List Orders
  • Create Order
  • Retrieve Order
  • List Order Items
  • Retrieve Float Balance
  • Retrieve Invoice
  • Retrieve Sender Profiles
  • Retrieve Consolidated Invoices

Install

npm install @prezzee/ts-v2-sdks

Install dependencies as well:

npm install axios

Usage

To use the SDK, you need to acquire Business API token by contacting Prezzee.

Example API token: sJ0uOIDRYexgfL2M7BgLiPjb6xddfdskPAi

Initialize the Client

const prezzeeClient = createPrezzeeClient({
  token: "<Your API Token>",
  // Select the correct environnement
  env: "sandbox",
  // Select the target region
  region: "AU",
});

Use APIs

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.

Examples

Below are a few examples

Create order

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.