phrohdoh/ynab-rs

Change Category. goal_type to be optional

phrohdoh opened this issue · 1 comments

Category, in components/ynab-types/src/lib.rs, is currently defined like so:

pub struct Category {
    // ...
    pub goal_type: String,
    // ...
}

But the goal_type field can be null since a category is not required to have a goal in YNAB.

In light of that we should change the definition to:

pub struct Category {
    // ...
    pub goal_type: Option<String>,
    // ...
}

Note that if this ticket is worked after #5 has been addressed then Category should be changed to:

pub struct Category {
    // ...
    pub goal_type: Option<GoalType>,
    // ...
}

This was done in 652648b.