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

stripe-mock-data

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stripe-mock-data

Stripe webhook & object data for mocking / testing purposes

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
72
decreased by-43.75%
Maintainers
1
Weekly downloads
 
Created
Source

Stripe Mock Data Gitter chat

Stripe webhook & resource object data for mocking / testing purposes.

Install

$ npm install stripe-mock-data --save-dev

Features

  • Quick access to entire dataset via .collection
  • Quick select of a specific version using constructor.

Versioning

Resource Object Builders

Webhook Data

Don't see your version? Open an issue, or start a pull request by forking.

Usage

Basic usage:

var StripeMockData = require('stripe-mock-data')
console.log(StripeMockData.collection)

Access Specific Version:

var StripeMockData = require('stripe-mock-data')
var StripeVersion = '2015-10-01'

// Access Version
var StripeData = StripeMockData(StripeVersion)

// View data
console.log(StripeData)

When attempting to access a version that doesn't exist, an error is thrown:

try {
  StripeData = StripeMockData('Invalid')
} catch (e) {
  console.log(e.message, e.stack)
}

Using resource object builders:

console.log(StripeData.resources.account({
  id: 'cus_CUSTOM_ID' // overrides default parameters
}))

Todo

  • Write tests (entry file, resource objects)
  • Clean up older webhook objects of invalid identifiers
  • Core for webhooks / resources, extend off core objects.

License

MIT © Nijiko Yonskai

Keywords

FAQs

Package last updated on 09 Dec 2015

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