feat(account,purchases): missing endpoints and a plan field fix - #20
Merged
Conversation
…ield Issue #12 named nine endpoints across these two families. Five had no CLI command, and one printed the wrong thing. New account subcommands: kit account colors kit account set-colors <hex...> kit account creator-profile kit account email-stats kit account growth-stats [--starting <date>] [--ending <date>] set-colors validates hex format and the ten-color limit before sending. New purchases subcommand: kit purchases create --file purchase.json A purchase requires eleven fields including a products array, so it comes from JSON. The command names any missing required field instead of relaying a 422. Bug fix: kit account read the plan from plan_name, then fell back to plan. The API returns plan_type as a string and plan as an object, so the fallback printed [object Object]. It now reads plan_type, and adds the billing interval, subscriber limit, trial flag, renewal date, time zone, and sending addresses.
This was referenced Aug 20, 2026
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.
Part 7 of 8. Base: #19.
What this adds
Issue #12 named nine endpoints across the account and purchases families. Five had no CLI command. One printed the wrong value.
New account subcommands:
set-colorsvalidates hex format and the ten-color limit before it sends.New purchases subcommand:
Bug fix
kit accountread the plan fromplan_name, then fell back toplan. The API returnsplan_typeas a string andplanas an object. The fallback therefore printed[object Object].The command now reads
plan_type. It also prints the billing interval, the subscriber limit, the trial flag, the renewal date, the time zone, and the sending addresses. A test asserts that the output never contains[object Object].Design notes
A purchase requires eleven fields, including a
productsarray. It therefore comes from JSON rather than from eleven flags. The command names any missing required field instead of relaying a 422.The field check tests
=== undefined, not falsiness. A purchase with a zero discount is valid. A test covers this.Review notes
Tests: 334 before, 368 after.
Closes #12
The stack
Merge from the top down. Each part builds on the one above it.
Base branch:
mainfor part 1, the previous part's branch for the rest.GitHub retargets each base to
mainas the part below it merges.