New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

assembly-payments

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assembly-payments

Assembly Payments API Typescript/Javascript Bindings

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
130
decreased by-28.18%
Maintainers
1
Weekly downloads
 
Created
Source

Assembly Payments (Node.js Client)

Version License: Apache--2.0

An (unofficial) Assembly Payments Typescript/Javascript client

swagger generated - https://reference.assemblypayments.com/

Usage

yarn

yarn add assembly-payments

npm

npm install --save assembly-payments

Contributing

Install

yarn install

Run tests

yarn run test

Author

👤 engineering@ordermentum.com

Generating updated client

Copy swagger.yaml file into root directory and run

  npx swagger-typescript-api -p ./swagger.yaml -o ./src -n index.ts --axios

Example

import { Api } from 'assembly-payments';

const authClient = new Api({
  baseURL: 'https://au-0000.auth.assemblypay.com/',
});

const tokenResponse = await authClient.tokens.token({
  client_id: process.env.AP_CLIENT_ID,
  client_secret: process.env.AP_CLIENT_SECRET,
  grant_type: 'client_credentials',
  scope: process.env.AP_CLIENT_SCOPE,
});

const token = tokenResponse.data.access_token;
const securityWorker = async (data) => ({
  headers: {
    Authorization: `Bearer ${data.token}`,
  },
});
const client = new Api({
  securityWorker,
  baseURL: 'https://secure.api.promisepay.com/',
});

client.setSecurityData({ token });
const itemResponse = await client.items.showItem(
  '6865E25F-3CFE-4C8C-8673-9231E0A19CF5'
);
console.log(itemResponse.data.items);

Keywords

FAQs

Package last updated on 08 Apr 2021

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