Skip to content

Commit b8a58f7

Browse files
feat(tem): add project consumption (#4536)
Co-authored-by: Rémy Léone <[email protected]>
1 parent be3e6a4 commit b8a58f7

File tree

4 files changed

+47
-6
lines changed

4 files changed

+47
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Project consumption allow you to see your project consumption.
4+
5+
USAGE:
6+
scw tem project-consumption
7+
8+
FLAGS:
9+
-h, --help help for project-consumption
10+
11+
GLOBAL FLAGS:
12+
-c, --config string The path to the config file
13+
-D, --debug Enable debug mode
14+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
15+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-tem-usage.golden

+7-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ USAGE:
66
scw tem <command>
77

88
AVAILABLE COMMANDS:
9-
blocklists Blocklist
10-
domain Domain management commands
11-
email Email management commands
12-
offers Project offers management commands
13-
project-settings Project settings management commands
14-
webhook Webhook management commands
9+
blocklists Blocklist
10+
domain Domain management commands
11+
email Email management commands
12+
offers Project offers management commands
13+
project-consumption Project consumption management commands
14+
project-settings Project settings management commands
15+
webhook Webhook management commands
1516

1617
FLAGS:
1718
-h, --help help for tem

docs/commands/tem.md

+15
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This API allows you to manage your Transactional Email services.
2121
- [Email statuses](#email-statuses)
2222
- [List emails](#list-emails)
2323
- [Project offers management commands](#project-offers-management-commands)
24+
- [Project consumption management commands](#project-consumption-management-commands)
2425
- [Project settings management commands](#project-settings-management-commands)
2526
- [Webhook management commands](#webhook-management-commands)
2627
- [Create a Webhook](#create-a-webhook)
@@ -407,6 +408,20 @@ scw tem offers
407408

408409

409410

411+
## Project consumption management commands
412+
413+
Project consumption allow you to see your project consumption.
414+
415+
Project consumption allow you to see your project consumption.
416+
417+
**Usage:**
418+
419+
```
420+
scw tem project-consumption
421+
```
422+
423+
424+
410425
## Project settings management commands
411426

412427
Project settings allow you to manage the configuration of your projects.

internal/namespaces/tem/v1alpha1/tem_cli.go

+10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func GetGeneratedCommands() *core.Commands {
2626
temProjectSettings(),
2727
temBlocklists(),
2828
temOffers(),
29+
temProjectConsumption(),
2930
temEmailCreate(),
3031
temEmailGet(),
3132
temEmailList(),
@@ -111,6 +112,15 @@ func temOffers() *core.Command {
111112
}
112113
}
113114

115+
func temProjectConsumption() *core.Command {
116+
return &core.Command{
117+
Short: `Project consumption management commands`,
118+
Long: `Project consumption allow you to see your project consumption.`,
119+
Namespace: "tem",
120+
Resource: "project-consumption",
121+
}
122+
}
123+
114124
func temEmailCreate() *core.Command {
115125
return &core.Command{
116126
Short: `Send an email`,

0 commit comments

Comments
 (0)