diff --git a/README.md b/README.md index 38d5186..f8a03d4 100644 --- a/README.md +++ b/README.md @@ -107,10 +107,10 @@ Returns environment/auth snapshots and the full command tree. - `gddy application add extension checkout --name --handle --source --target ` - `gddy application add extension blocks --source ` -### Payments +### Payment Methods -- `gddy payments` -- `gddy payments add` — opens your default browser to the GoDaddy payment methods management page. Only credit card or Good-as-Gold can be used for domain purchases. +- `gddy payment-methods` +- `gddy payment-methods add` — opens your default browser to the GoDaddy payment methods management page. Only credit card or Good-as-Gold can be used for domain purchases. ### Webhooks diff --git a/rust/src/domain/common.rs b/rust/src/domain/common.rs index 58a405b..54868dd 100644 --- a/rust/src/domain/common.rs +++ b/rust/src/domain/common.rs @@ -205,7 +205,7 @@ fn format_api_error( if status == 402 { msg.push_str( "\n\nThis usually means your account has no usable payment method. Add one with \ - `gddy payments add` (a credit card or Good-as-Gold balance is required for domain \ + `gddy payment-methods add` (a credit card or Good-as-Gold balance is required for domain \ purchases), then try again.", ); } @@ -429,7 +429,7 @@ mod tests { } #[test] - fn payment_required_error_points_to_payments_add() { + fn payment_required_error_points_to_payment_methods_add() { let msg = format_api_error( "domain purchase", 402, @@ -439,7 +439,7 @@ mod tests { false, ); assert!(msg.contains("402 Payment Required"), "{msg}"); - assert!(msg.contains("gddy payments add"), "{msg}"); + assert!(msg.contains("gddy payment-methods add"), "{msg}"); } #[test] diff --git a/rust/src/domain/purchase.rs b/rust/src/domain/purchase.rs index 2ee059d..b8d9fa4 100644 --- a/rust/src/domain/purchase.rs +++ b/rust/src/domain/purchase.rs @@ -146,7 +146,7 @@ pub(super) fn command() -> RuntimeCommandSpec { `purchase` accepts the token, records your consent to the quote's legal \ agreements (--agree), then registers and waits for the registry to \ finish. A usable payment method must be on file — add one with \ - `gddy payments add`.\n\ + `gddy payment-methods add`.\n\ \n\ Typical flow:\n \ 1. gddy domain quote example.com # review price + agreements\n \ diff --git a/rust/src/main.rs b/rust/src/main.rs index 84248de..541b0f3 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -13,7 +13,7 @@ mod hosting; mod next_action; mod output_schema; mod pat; -mod payments; +mod payment_methods; mod quote_cache; mod scopes; mod update; @@ -47,7 +47,7 @@ async fn main() -> ExitCode { • api — explore and call GoDaddy REST API endpoints directly\n \ • application — build, configure, and deploy platform applications\n \ • hosting — manage Node.js PaaS applications (create, upload, deploy)\n \ - • payments — manage the payment methods used for purchases\n\ + • payment-methods — manage the payment methods used for purchases\n\ \n\ Most commands need authentication; run `gddy auth login` first, or use a PAT via `gddy pat add` / `GDDY_PAT` for non-interactive workflows (or just run a\n\ command and follow the prompt). Use `--env` to target an environment and\n\ @@ -107,7 +107,7 @@ async fn main() -> ExitCode { .with_module(env::module()) .with_module(hosting::module()) .with_module(pat::module()) - .with_module(payments::module()) + .with_module(payment_methods::module()) .with_module(update::module()) .with_module(webhook::module()), ); diff --git a/rust/src/payments/mod.rs b/rust/src/payment_methods/mod.rs similarity index 90% rename from rust/src/payments/mod.rs rename to rust/src/payment_methods/mod.rs index 751468b..f30566b 100644 --- a/rust/src/payments/mod.rs +++ b/rust/src/payment_methods/mod.rs @@ -1,4 +1,4 @@ -//! `gddy payments` — payment method management. +//! `gddy payment-methods` — payment method management. use cli_engine::{ CliCoreError, CommandResult, CommandSpec, GroupSpec, Module, NextActionParam, @@ -14,13 +14,13 @@ fn map_env_err(e: environments::EnvError) -> CliCoreError { } pub fn module() -> Module { - Module::new("Payments", |_ctx| { + Module::new("Payment Methods", |_ctx| { RuntimeGroupSpec::new( - GroupSpec::new("payments", "Manage payment methods").with_long( + GroupSpec::new("payment-methods", "Manage payment methods").with_long( "Manage the payment methods on your GoDaddy account.\n\ A saved payment method is required before you can run \ `gddy domain purchase`.\n\ - Use `gddy payments add` to open the GoDaddy payment methods \ + Use `gddy payment-methods add` to open the GoDaddy payment methods \ page in your browser.", ), ) @@ -38,7 +38,7 @@ fn add_command() -> RuntimeCommandSpec { "Opens your default browser to the GoDaddy payment methods management page.\n\ Note: only credit card or Good-as-Gold can be used for domain purchases.", ) - .with_system("payments") + .with_system("payment-methods") .with_tier(Tier::Mutate) .no_auth(true), |ctx| async move {