ynab_api::models::category

Struct Category

Source
pub struct Category {
Show 15 fields pub id: String, pub category_group_id: String, pub name: String, pub hidden: bool, pub original_category_group_id: Option<String>, pub note: Option<String>, pub budgeted: i64, pub activity: i64, pub balance: i64, pub goal_type: Option<GoalType>, pub goal_creation_month: Option<String>, pub goal_target: Option<i64>, pub goal_target_month: Option<String>, pub goal_percentage_complete: Option<i32>, pub deleted: bool,
}

Fields§

§id: String§category_group_id: String§name: String§hidden: bool

Whether or not the category is hidden

§original_category_group_id: Option<String>

If category is hidden this is the id of the category group it originally belonged to before it was hidden.

§note: Option<String>§budgeted: i64

Budgeted amount in milliunits format

§activity: i64

Activity amount in milliunits format

§balance: i64

Balance in milliunits format

§goal_type: Option<GoalType>

The type of goal, if the category has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)

§goal_creation_month: Option<String>

The month a goal was created

§goal_target: Option<i64>

The goal target amount in milliunits

§goal_target_month: Option<String>

If the goal type is ‘TBD’ (Target Category Balance by Date), this is the target month for the goal to be completed

§goal_percentage_complete: Option<i32>

The percentage completion of the goal

§deleted: bool

Whether or not the category has been deleted. Deleted categories will only be included in delta requests.

Implementations§

Source§

impl Category

Source

pub fn new( id: String, category_group_id: String, name: String, hidden: bool, budgeted: i64, activity: i64, balance: i64, deleted: bool, ) -> Category

Trait Implementations§

Source§

impl Debug for Category

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Category

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Category

Source§

fn eq(&self, other: &Category) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Category

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Category

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Err = <U as TryFrom<T>>::Err

Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T