@hideokamoto/fillet
CLI tools for Stripe
Last updated 8 months ago by hideokamoto .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @hideokamoto/fillet 
SYNC missed versions from official npm registry.

Fillet [WIP]

CLI tools for Stripe

oclif Version CircleCI Downloads/week License

Getting Started

$ npm i -g @hideokamoto/fillet

$ fillet init {STRIPE_SK_KEY}
$ fillet COMMAND

Usage

$ npm install -g @hideokamoto/fillet
$ fillet COMMAND
running command...
$ fillet (-v|--version|version)
@hideokamoto/fillet/0.0.0 darwin-x64 node-v10.1.0
$ fillet --help [COMMAND]
USAGE
  $ fillet COMMAND
...

Commands

fillet billing TYPE

Stripe Billing

USAGE
  $ fillet billing TYPE

ARGUMENTS
  TYPE  products, subscriptions

OPTIONS
  -f, --force              Should replace plan or products
  -h, --help               show CLI help
  -n, --fileName=fileName
  -o, --output
  -v, --verbose            debug mode

DESCRIPTION
  ...
  Extra documentation goes here

See code: src/commands/billing.js

fillet help [COMMAND]

display help for fillet

USAGE
  $ fillet help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

fillet init STRIPE

Initialize fillet

USAGE
  $ fillet init STRIPE

ARGUMENTS
  STRIPE  Stripe secret key

OPTIONS
  -h, --help  show CLI help

DESCRIPTION
  ...
  To put Stripe secret key into .fillet/config
  The file will be ignored from git.

See code: src/commands/init.js

fillet billing TYPE

Stripe Billing

USAGE
  $ fillet billing TYPE

ARGUMENTS
  TYPE  products, subscriptions

OPTIONS
  -f, --force              Should replace plan or products
  -h, --help               show CLI help
  -n, --fileName=fileName
  -o, --output
  -v, --verbose            debug mode

DESCRIPTION
  ...
  Extra documentation goes here

See code: src/commands/billing.js

Product / Plan object

You can define your plan as YAML file.

name: example plan
type: service
active: true
statement_descriptor: hello fillet
plans:
  - id: my-plan
    currency: jpy
    interval: month
    nickname: My Plan
    active: true
    amount: 15000
id: prod_XXXXXXXXXXXXX

Create / Update a plan

$ fillet billing import-product -n ./product.yml
Import product:: prod_XXXXXXXXXXXXX
plan created:my-plan
Finished

You can not update price / interval / currency to exists plan.

$ fillet billing import-product -n ./product.yml
Import product:: prod_XXXXXXXXXXXXX
plan: my-plan has been skipped.
If you replace the plan, please run the command with -f / --force option
Finished

Upgrade plan price

You can use -f option to replace plan price. -f option will delete / create plan*

$ fillet billing import-product -n ./product.yml -f
Import product:: prod_XXXXXXXXXXXXX
[Replace]: my-plan
[Replace]:starting to delete my-plan
plan deleted:my-plan
[Replace]:starting to create new plan
plan created:my-plan
[Replace]:replace new plan: my-plan
Finished

Check plan diff

You can check your plan diff between Stripe to your local YAML file.

$ fillet billing diff-plans -n ./product.yml
  [
  {
    "active": true,
-     "amount": 10000,
+     "amount": 15000,
      "currency": "jpy",
    "id": "my-plan",
    "interval": "month",
-     "interval_count": 1,
-
      "nickname": "ใƒ†ใ‚นใƒˆ",
-     "object": "plan",
-
      "product": "prod_XXXXXXXXXXXXX",
    }
]

fillet help [COMMAND]

display help for fillet

USAGE
  $ fillet help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

Current Tags

  • 0.0.1                                ...           latest (8 months ago)

2 Versions

  • 0.0.1                                ...           8 months ago
  • 0.0.0                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 4
Last Month 4
Dependencies (7)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |