feat: add subscribe command for plan management and discount coupons#391
Open
gulshngill wants to merge 1 commit into
Open
feat: add subscribe command for plan management and discount coupons#391gulshngill wants to merge 1 commit into
gulshngill wants to merge 1 commit into
Conversation
2d94f42 to
0fc46fc
Compare
0fc46fc to
5bacb9c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nansen subscribewith subcommands:plans,promo-code,create,cancel,statusapp.nansen.aivia newappBaseUrlonNansenAPI(env:NANSEN_APP_URL)--promo-codefor discount couponsNew files
src/commands/subscribe.js— command handler, table formatterssrc/__tests__/subscribe.test.js— 20 unit tests (help, plans, promo-code, create, cancel, status, formatters)Modified files
src/api.js—appBaseUrlproperty,appRequest()helper, 7 new API methodssrc/cli.js— import + register subscribe command, table formatting for subscribe subcommands, HELP stringsrc/schema.json— subscribe command schemaTest plan
npm testpasses (all 24 test files, 1299 tests)nansen subscribe plans --tablenansen subscribe promo-code TESTCODEnansen subscribe create --price-id <id> --promo-code <code>nansen subscribe statusnansen subscribe cancel