Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prezzee/ts-v2-sdks

Package Overview
Dependencies
Maintainers
61
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prezzee/ts-v2-sdks

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

  • 1.10.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90.91%
Maintainers
61
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 09 Feb 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc