Plan changes
Upgrades and downgrades: the rules for what can become what, the proration configuration and the statistics of what actually changed.
| Command | HTTP | Description |
|---|---|---|
plan-changes list | GET /v1/plan_changes | List plan changes |
plan-changes create | POST /v1/plan_changes | Run a plan change |
plan-changes get | GET /v1/plan_changes/{id} | Get a plan change |
plan-changes config list | GET /v1/plan_changes/config | Get the plan-change configuration |
plan-changes config update | PATCH /v1/plan_changes/config | Update the plan-change configuration |
plan-changes rules list | GET /v1/plan_changes/rules | List plan-change rules |
plan-changes rules create | POST /v1/plan_changes/rules | Create a plan-change rule |
plan-changes rules get | GET /v1/plan_changes/rules/{id} | Get a plan-change rule |
plan-changes rules update | PATCH /v1/plan_changes/rules/{id} | Update a plan-change rule |
plan-changes rules delete | DELETE /v1/plan_changes/rules/{id} | Delete a plan-change rule |
plan-changes stats list | GET /v1/plan_changes/stats | Plan-change statistics |
Examples
--params carries query and path parameters (id, page, filters); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.
# List plan changes
kobana billing plan-changes list \
--fields "id,public_id,external_id,subscription_id,billing_account_id"
# Get a plan change
kobana billing plan-changes get --params '{"id": "PLAN_CHANGE_ID"}'
# Run a plan change
kobana billing plan-changes create \
--json '{"subscription_id": "SUBSCRIPTION_ID", "to_plan_id": "TO_PLAN_ID"}'
# Update the plan-change configuration
kobana billing plan-changes config update \
--json '{"allow_upgrade": true, "allow_downgrade": true, "upgrade_proration": "full_proration"}'
# Delete a plan-change rule
kobana billing plan-changes rules delete \
--params '{"id": "RULE_ID"}' \
--dry-run
Next steps
- Billing accounts
- Schema introspection — every parameter this resource accepts.