obscuravpn_api/cmd/account/
info.rs1use crate::cmd::Cmd;
2use crate::types::AccountInfo;
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Serialize, Deserialize, Clone)]
6pub struct GetAccountInfo();
7
8impl Cmd for GetAccountInfo {
9 type Output = AccountInfo;
10 const METHOD: http::Method = http::Method::GET;
11 const PATH: &'static str = super::PATH;
12}
13
14#[test]
15fn test_account_info_json() {
16 let output_json = r#"
17 {
18 "id": "0000000000000000000",
19 "active": true,
20 "top_up": { "credit_expires_at": 1000 },
21 "subscription": null
22 }
23 "#;
24 crate::cmd::check_cmd_json::<GetAccountInfo>(None, Some(output_json));
25}