unc_cli_rs/js_command_match/
delete.rs

1#[derive(Debug, Clone, clap::Parser)]
2/// This is a legacy `delete` command. Once you run it with the specified arguments, new syntax command will be suggested.
3pub struct DeleteArgs {
4    account_id: String,
5    beneficiary_id: String,
6    #[clap(allow_hyphen_values = true, num_args = 0..)]
7    _unknown_args: Vec<String>,
8}
9
10impl DeleteArgs {
11    pub fn to_cli_args(&self, network_config: String) -> Vec<String> {
12        vec![
13            "account".to_owned(),
14            "delete-account".to_owned(),
15            self.account_id.to_owned(),
16            "beneficiary".to_owned(),
17            self.beneficiary_id.to_owned(),
18            "network-config".to_owned(),
19            network_config,
20            "sign-with-keychain".to_owned(),
21            "send".to_owned(),
22        ]
23    }
24}