Class Category

java.lang.Object
cm.xd.genapi.ynab.model.Category

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-04-26T18:05:30.720340+02:00[Europe/Stockholm]", comments="Generator version: 7.21.0") public class Category extends Object
Category
  • Field Details

  • Constructor Details

    • Category

      public Category()
  • Method Details

    • id

      public Category id(@Nonnull UUID id)
    • getId

      @Nonnull public UUID getId()
      Get id
      Returns:
      id
    • setId

      public void setId(@Nonnull UUID id)
    • categoryGroupId

      public Category categoryGroupId(@Nonnull UUID categoryGroupId)
    • getCategoryGroupId

      @Nonnull public UUID getCategoryGroupId()
      Get categoryGroupId
      Returns:
      categoryGroupId
    • setCategoryGroupId

      public void setCategoryGroupId(@Nonnull UUID categoryGroupId)
    • categoryGroupName

      public Category categoryGroupName(@Nullable String categoryGroupName)
    • getCategoryGroupName

      @Nullable public String getCategoryGroupName()
      Get categoryGroupName
      Returns:
      categoryGroupName
    • setCategoryGroupName

      public void setCategoryGroupName(@Nullable String categoryGroupName)
    • name

      public Category name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Get name
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • hidden

      public Category hidden(@Nonnull Boolean hidden)
    • getHidden

      @Nonnull public Boolean getHidden()
      Whether or not the category is hidden
      Returns:
      hidden
    • setHidden

      public void setHidden(@Nonnull Boolean hidden)
    • originalCategoryGroupId

      public Category originalCategoryGroupId(@Nullable UUID originalCategoryGroupId)
    • getOriginalCategoryGroupId

      @Nullable public UUID getOriginalCategoryGroupId()
      DEPRECATED: No longer used. Value will always be null.
      Returns:
      originalCategoryGroupId
    • setOriginalCategoryGroupId

      public void setOriginalCategoryGroupId(@Nullable UUID originalCategoryGroupId)
    • note

      public Category note(@Nullable String note)
    • getNote

      @Nullable public String getNote()
      Get note
      Returns:
      note
    • setNote

      public void setNote(@Nullable String note)
    • budgeted

      public Category budgeted(@Nonnull Long budgeted)
    • getBudgeted

      @Nonnull public Long getBudgeted()
      Assigned (budgeted) amount in milliunits format
      Returns:
      budgeted
    • setBudgeted

      public void setBudgeted(@Nonnull Long budgeted)
    • activity

      public Category activity(@Nonnull Long activity)
    • getActivity

      @Nonnull public Long getActivity()
      Activity amount in milliunits format
      Returns:
      activity
    • setActivity

      public void setActivity(@Nonnull Long activity)
    • balance

      public Category balance(@Nonnull Long balance)
    • getBalance

      @Nonnull public Long getBalance()
      Available balance in milliunits format
      Returns:
      balance
    • setBalance

      public void setBalance(@Nonnull Long balance)
    • goalType

      public Category goalType(@Nullable Category.GoalTypeEnum goalType)
    • getGoalType

      @Nullable public Category.GoalTypeEnum getGoalType()
      The type of goal, if the category has a goal (TB='Target Category Balance', TBD='Target Category Balance by Date', MF='Monthly Funding', NEED='Plan Your Spending')
      Returns:
      goalType
    • setGoalType

      public void setGoalType(@Nullable Category.GoalTypeEnum goalType)
    • goalNeedsWholeAmount

      public Category goalNeedsWholeAmount(@Nullable Boolean goalNeedsWholeAmount)
    • getGoalNeedsWholeAmount

      @Nullable public Boolean getGoalNeedsWholeAmount()
      Indicates the monthly rollover behavior for \"NEED\"-type goals. When \"true\", the goal will always ask for the target amount in the new month (\"Set Aside\"). When \"false\", previous month category funding is used (\"Refill\"). For other goal types, this field will be null.
      Returns:
      goalNeedsWholeAmount
    • setGoalNeedsWholeAmount

      public void setGoalNeedsWholeAmount(@Nullable Boolean goalNeedsWholeAmount)
    • goalDay

      public Category goalDay(@Nullable Integer goalDay)
    • getGoalDay

      @Nullable public Integer getGoalDay()
      A day offset modifier for the goal's due date. When goal_cadence is 2 (Weekly), this value specifies which day of the week the goal is due (0 = Sunday, 6 = Saturday). Otherwise, this value specifies which day of the month the goal is due (1 = 1st, 31 = 31st, null = Last day of Month).
      Returns:
      goalDay
    • setGoalDay

      public void setGoalDay(@Nullable Integer goalDay)
    • goalCadence

      public Category goalCadence(@Nullable Integer goalCadence)
    • getGoalCadence

      @Nullable public Integer getGoalCadence()
      The goal cadence. Value in range 0-14. There are two subsets of these values which behave differently. For values 0, 1, 2, and 13, the goal's due date repeats every goal_cadence * goal_cadence_frequency, where 0 = None, 1 = Monthly, 2 = Weekly, and 13 = Yearly. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. For values 3-12 and 14, goal_cadence_frequency is ignored and the goal's due date repeats every goal_cadence, where 3 = Every 2 Months, 4 = Every 3 Months, ..., 12 = Every 11 Months, and 14 = Every 2 Years.
      Returns:
      goalCadence
    • setGoalCadence

      public void setGoalCadence(@Nullable Integer goalCadence)
    • goalCadenceFrequency

      public Category goalCadenceFrequency(@Nullable Integer goalCadenceFrequency)
    • getGoalCadenceFrequency

      @Nullable public Integer getGoalCadenceFrequency()
      The goal cadence frequency. When goal_cadence is 0, 1, 2, or 13, a goal's due date repeats every goal_cadence * goal_cadence_frequency. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. When goal_cadence is 3-12 or 14, goal_cadence_frequency is ignored.
      Returns:
      goalCadenceFrequency
    • setGoalCadenceFrequency

      public void setGoalCadenceFrequency(@Nullable Integer goalCadenceFrequency)
    • goalCreationMonth

      public Category goalCreationMonth(@Nullable LocalDate goalCreationMonth)
    • getGoalCreationMonth

      @Nullable public LocalDate getGoalCreationMonth()
      The month a goal was created
      Returns:
      goalCreationMonth
    • setGoalCreationMonth

      public void setGoalCreationMonth(@Nullable LocalDate goalCreationMonth)
    • goalTarget

      public Category goalTarget(@Nullable Long goalTarget)
    • getGoalTarget

      @Nullable public Long getGoalTarget()
      The goal target amount in milliunits
      Returns:
      goalTarget
    • setGoalTarget

      public void setGoalTarget(@Nullable Long goalTarget)
    • goalTargetMonth

      public Category goalTargetMonth(@Nullable LocalDate goalTargetMonth)
    • getGoalTargetMonth

      @Nullable public LocalDate getGoalTargetMonth()
      DEPRECATED: No longer used. Use `goal_target_date` instead.
      Returns:
      goalTargetMonth
    • setGoalTargetMonth

      public void setGoalTargetMonth(@Nullable LocalDate goalTargetMonth)
    • goalTargetDate

      public Category goalTargetDate(@Nullable LocalDate goalTargetDate)
    • getGoalTargetDate

      @Nullable public LocalDate getGoalTargetDate()
      The target date for the goal to be completed. Only some goal types specify this date.
      Returns:
      goalTargetDate
    • setGoalTargetDate

      public void setGoalTargetDate(@Nullable LocalDate goalTargetDate)
    • goalPercentageComplete

      public Category goalPercentageComplete(@Nullable Integer goalPercentageComplete)
    • getGoalPercentageComplete

      @Nullable public Integer getGoalPercentageComplete()
      The percentage completion of the goal
      Returns:
      goalPercentageComplete
    • setGoalPercentageComplete

      public void setGoalPercentageComplete(@Nullable Integer goalPercentageComplete)
    • goalMonthsToBudget

      public Category goalMonthsToBudget(@Nullable Integer goalMonthsToBudget)
    • getGoalMonthsToBudget

      @Nullable public Integer getGoalMonthsToBudget()
      The number of months, including the current month, left in the current goal period.
      Returns:
      goalMonthsToBudget
    • setGoalMonthsToBudget

      public void setGoalMonthsToBudget(@Nullable Integer goalMonthsToBudget)
    • goalUnderFunded

      public Category goalUnderFunded(@Nullable Long goalUnderFunded)
    • getGoalUnderFunded

      @Nullable public Long getGoalUnderFunded()
      The amount of funding still needed in the current month to stay on track towards completing the goal within the current goal period. This amount will generally correspond to the 'Underfunded' amount in the web and mobile clients except when viewing a category with a Needed for Spending Goal in a future month. The web and mobile clients will ignore any funding from a prior goal period when viewing category with a Needed for Spending Goal in a future month.
      Returns:
      goalUnderFunded
    • setGoalUnderFunded

      public void setGoalUnderFunded(@Nullable Long goalUnderFunded)
    • goalOverallFunded

      public Category goalOverallFunded(@Nullable Long goalOverallFunded)
    • getGoalOverallFunded

      @Nullable public Long getGoalOverallFunded()
      The total amount funded towards the goal within the current goal period.
      Returns:
      goalOverallFunded
    • setGoalOverallFunded

      public void setGoalOverallFunded(@Nullable Long goalOverallFunded)
    • goalOverallLeft

      public Category goalOverallLeft(@Nullable Long goalOverallLeft)
    • getGoalOverallLeft

      @Nullable public Long getGoalOverallLeft()
      The amount of funding still needed to complete the goal within the current goal period.
      Returns:
      goalOverallLeft
    • setGoalOverallLeft

      public void setGoalOverallLeft(@Nullable Long goalOverallLeft)
    • goalSnoozedAt

      public Category goalSnoozedAt(@Nullable OffsetDateTime goalSnoozedAt)
    • getGoalSnoozedAt

      @Nullable public OffsetDateTime getGoalSnoozedAt()
      The date/time the goal was snoozed. If the goal is not snoozed, this will be null.
      Returns:
      goalSnoozedAt
    • setGoalSnoozedAt

      public void setGoalSnoozedAt(@Nullable OffsetDateTime goalSnoozedAt)
    • deleted

      public Category deleted(@Nonnull Boolean deleted)
    • getDeleted

      @Nonnull public Boolean getDeleted()
      Whether or not the category has been deleted. Deleted categories will only be included in delta requests.
      Returns:
      deleted
    • setDeleted

      public void setDeleted(@Nonnull Boolean deleted)
    • balanceFormatted

      public Category balanceFormatted(@Nullable String balanceFormatted)
    • getBalanceFormatted

      @Nullable public String getBalanceFormatted()
      Available balance of the category formatted in the plan's currency format
      Returns:
      balanceFormatted
    • setBalanceFormatted

      public void setBalanceFormatted(@Nullable String balanceFormatted)
    • balanceCurrency

      public Category balanceCurrency(@Nullable Double balanceCurrency)
    • getBalanceCurrency

      @Nullable public Double getBalanceCurrency()
      Available balance of the category as a decimal currency amount
      Returns:
      balanceCurrency
    • setBalanceCurrency

      public void setBalanceCurrency(@Nullable Double balanceCurrency)
    • activityFormatted

      public Category activityFormatted(@Nullable String activityFormatted)
    • getActivityFormatted

      @Nullable public String getActivityFormatted()
      Activity of the category formatted in the plan's currency format
      Returns:
      activityFormatted
    • setActivityFormatted

      public void setActivityFormatted(@Nullable String activityFormatted)
    • activityCurrency

      public Category activityCurrency(@Nullable Double activityCurrency)
    • getActivityCurrency

      @Nullable public Double getActivityCurrency()
      Activity of the category as a decimal currency amount
      Returns:
      activityCurrency
    • setActivityCurrency

      public void setActivityCurrency(@Nullable Double activityCurrency)
    • budgetedFormatted

      public Category budgetedFormatted(@Nullable String budgetedFormatted)
    • getBudgetedFormatted

      @Nullable public String getBudgetedFormatted()
      Assigned (budgeted) amount of the category formatted in the plan's currency format
      Returns:
      budgetedFormatted
    • setBudgetedFormatted

      public void setBudgetedFormatted(@Nullable String budgetedFormatted)
    • budgetedCurrency

      public Category budgetedCurrency(@Nullable Double budgetedCurrency)
    • getBudgetedCurrency

      @Nullable public Double getBudgetedCurrency()
      Assigned (budgeted) amount of the category as a decimal currency amount
      Returns:
      budgetedCurrency
    • setBudgetedCurrency

      public void setBudgetedCurrency(@Nullable Double budgetedCurrency)
    • goalTargetFormatted

      public Category goalTargetFormatted(@Nullable String goalTargetFormatted)
    • getGoalTargetFormatted

      @Nullable public String getGoalTargetFormatted()
      The goal target amount formatted in the plan's currency format
      Returns:
      goalTargetFormatted
    • setGoalTargetFormatted

      public void setGoalTargetFormatted(@Nullable String goalTargetFormatted)
    • goalTargetCurrency

      public Category goalTargetCurrency(@Nullable Double goalTargetCurrency)
    • getGoalTargetCurrency

      @Nullable public Double getGoalTargetCurrency()
      The goal target amount as a decimal currency amount
      Returns:
      goalTargetCurrency
    • setGoalTargetCurrency

      public void setGoalTargetCurrency(@Nullable Double goalTargetCurrency)
    • goalUnderFundedFormatted

      public Category goalUnderFundedFormatted(@Nullable String goalUnderFundedFormatted)
    • getGoalUnderFundedFormatted

      @Nullable public String getGoalUnderFundedFormatted()
      The goal underfunded amount formatted in the plan's currency format
      Returns:
      goalUnderFundedFormatted
    • setGoalUnderFundedFormatted

      public void setGoalUnderFundedFormatted(@Nullable String goalUnderFundedFormatted)
    • goalUnderFundedCurrency

      public Category goalUnderFundedCurrency(@Nullable Double goalUnderFundedCurrency)
    • getGoalUnderFundedCurrency

      @Nullable public Double getGoalUnderFundedCurrency()
      The goal underfunded amount as a decimal currency amount
      Returns:
      goalUnderFundedCurrency
    • setGoalUnderFundedCurrency

      public void setGoalUnderFundedCurrency(@Nullable Double goalUnderFundedCurrency)
    • goalOverallFundedFormatted

      public Category goalOverallFundedFormatted(@Nullable String goalOverallFundedFormatted)
    • getGoalOverallFundedFormatted

      @Nullable public String getGoalOverallFundedFormatted()
      The total amount funded towards the goal formatted in the plan's currency format
      Returns:
      goalOverallFundedFormatted
    • setGoalOverallFundedFormatted

      public void setGoalOverallFundedFormatted(@Nullable String goalOverallFundedFormatted)
    • goalOverallFundedCurrency

      public Category goalOverallFundedCurrency(@Nullable Double goalOverallFundedCurrency)
    • getGoalOverallFundedCurrency

      @Nullable public Double getGoalOverallFundedCurrency()
      The total amount funded towards the goal as a decimal currency amount
      Returns:
      goalOverallFundedCurrency
    • setGoalOverallFundedCurrency

      public void setGoalOverallFundedCurrency(@Nullable Double goalOverallFundedCurrency)
    • goalOverallLeftFormatted

      public Category goalOverallLeftFormatted(@Nullable String goalOverallLeftFormatted)
    • getGoalOverallLeftFormatted

      @Nullable public String getGoalOverallLeftFormatted()
      The amount of funding still needed to complete the goal formatted in the plan's currency format
      Returns:
      goalOverallLeftFormatted
    • setGoalOverallLeftFormatted

      public void setGoalOverallLeftFormatted(@Nullable String goalOverallLeftFormatted)
    • goalOverallLeftCurrency

      public Category goalOverallLeftCurrency(@Nullable Double goalOverallLeftCurrency)
    • getGoalOverallLeftCurrency

      @Nullable public Double getGoalOverallLeftCurrency()
      The amount of funding still needed to complete the goal as a decimal currency amount
      Returns:
      goalOverallLeftCurrency
    • setGoalOverallLeftCurrency

      public void setGoalOverallLeftCurrency(@Nullable Double goalOverallLeftCurrency)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to Category
    • fromJson

      public static Category fromJson(String jsonString) throws IOException
      Create an instance of Category given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Category
      Throws:
      IOException - if the JSON string is invalid with respect to Category
    • toJson

      public String toJson()
      Convert an instance of Category to an JSON string
      Returns:
      JSON string