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

finops-andrew-sdk

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

finops-andrew-sdk

## How to use

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Node.js SDK for the Prototype of our Service Catalogue

How to use

I have wrapped up the SDK to hide a lot of the functionality to help make it clearer how to use the sdk.

The current approach should give you intellisense via typescript defintions. However the functionality needed to give proper type checking on the client side via the use of typescript isn't yet functional. It won't be hard to implement however I didn't have time to figure out how to expose that while keeping the SDK api clean and simple to understand.

There are 3 endpoints you can hit:

  1. createProduct
  2. createUsage
  3. registerUsageOfProduct

However I would suggest just using the 3rd one. This is an endpoint which allows you to provide a usage along with either a ProductName or ProductId. If you provide a ProductName and there is no Product object in the DB it will automatically create it for you.

I think this is a nicer workflow which then allows the accountants to view all the automatically created products and assign the correct business area and pricing to it etc.

Basically this should be all the code you need to implement it into teammo

const SDK = require('finops-andrew-sdk')

const client = new SDK.Client()

const callback = (err, res) => {
  if (err) console.error(err);
  if (res) console.log(res);
}


client.registerUsageOfProduct({
  productName:'TeammoPaymentTypeX',
  usage:{
    name: 'A usage',      // Required
    code: '1234'          // Optional
    metadata: {           // Optional
      "Key": "Value",     // Must be a string value
      "Key2": "Value2"
    }
  }
}, callback)

FAQs

Package last updated on 27 Nov 2019

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