pub struct Account {Show 15 fields
pub id: Option<Uuid>,
pub name: String,
pub slug: String,
pub tags: Option<Vec<Tag>>,
pub is_active: bool,
pub is_checked: bool,
pub is_archived: bool,
pub verbose_status: Option<VerboseStatus>,
pub is_default: bool,
pub owners: Children<User, Uuid>,
pub account_type: AccountType,
pub guest_users: Option<Children<GuestUser, Uuid>>,
pub created: DateTime<Local>,
pub updated: Option<DateTime<Local>>,
pub meta: Option<HashMap<AccountMetaKey, String>>,
}Expand description
This is a re-exportation from the myc core to allow users to import both from myc-api instead of the myc-core.
Fields§
§id: Option<Uuid>The Account ID
name: StringThe Account Name
slug: StringThe Account Slug
This is generated from the account name. This is used for programmatic access and verification of the account.
Account Tags
Information about the account. This is used for categorizing and filter account.
is_active: boolAccount is active
If the account is active. This is used for logic trash and restore account.
is_checked: boolAccount is checked
If the account was verified by a human. This is used for account verification.
is_archived: boolAccount is archived
If the account is archived. This is used for account archiving.
verbose_status: Option<VerboseStatus>Verbose status
Is the human readable status of the account.
is_default: bool§owners: Children<User, Uuid>The Account Owners
This is the list of account owners. The account owners are the users who have the account owner role.
account_type: AccountTypeThe Account Type
Account type is the type of the account. The account type is used to categorize the account.
guest_users: Option<Children<GuestUser, Uuid>>The Account Guest Users
This is the list of guest users of the account.
created: DateTime<Local>The Account Created Date
updated: Option<DateTime<Local>>The Account Updated Date
meta: Option<HashMap<AccountMetaKey, String>>The Account Meta
Store metadata about the account.
Implementations§
Source§impl Account
impl Account
Sourcepub fn new_subscription_account(
account_name: String,
tenant_id: Uuid,
) -> Account
pub fn new_subscription_account( account_name: String, tenant_id: Uuid, ) -> Account
Create a new subscription account
Use this method to create standard subscription accounts.
pub fn new_tenant_management_account( account_name: String, tenant_id: Uuid, ) -> Account
pub fn with_id(&mut self) -> Account
pub fn new( account_name: String, principal_owner: User, account_type: AccountType, ) -> Account
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Account
impl<'de> Deserialize<'de> for Account
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Account, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Account, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Account
impl Serialize for Account
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl<'__r> ToResponse<'__r> for Account
impl<'__r> ToResponse<'__r> for Account
impl Eq for Account
impl StructuralPartialEq for Account
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.