Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ Returns environment/auth snapshots and the full command tree.
- `gddy application add extension checkout --name <name> --handle <handle> --source <source> --target <targets>`
- `gddy application add extension blocks --source <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

Expand Down
6 changes: 3 additions & 3 deletions rust/src/domain/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
);
}
Expand Down Expand Up @@ -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,
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion rust/src/domain/purchase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 3 additions & 3 deletions rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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\
Expand Down Expand Up @@ -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()),
);
Expand Down
10 changes: 5 additions & 5 deletions rust/src/payments/mod.rs → rust/src/payment_methods/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `gddy payments` — payment method management.
//! `gddy payment-methods` — payment method management.

use cli_engine::{
CliCoreError, CommandResult, CommandSpec, GroupSpec, Module, NextActionParam,
Expand All @@ -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.",
),
)
Expand All @@ -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 {
Expand Down