Class NewCategory

java.lang.Object
build.cursed.genapi.ynab.model.NewCategory

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-08-03T05:02:43.013937+02:00[Europe/Stockholm]", comments="Generator version: 7.21.0") public class NewCategory extends Object
NewCategory
  • Field Details

  • Constructor Details

    • NewCategory

      public NewCategory()
  • Method Details

    • name

      public NewCategory name(@Nullable String name)
    • getName

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

      public void setName(@Nullable String name)
    • note

      public NewCategory note(@Nullable String note)
    • getNote

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

      public void setNote(@Nullable String note)
    • categoryGroupId

      public NewCategory categoryGroupId(@Nullable UUID categoryGroupId)
    • getCategoryGroupId

      @Nullable public UUID getCategoryGroupId()
      The id of the category group to which this category belongs. An internal category group may not be specified.
      Returns:
      categoryGroupId
    • setCategoryGroupId

      public void setCategoryGroupId(@Nullable UUID categoryGroupId)
    • goalTarget

      public NewCategory goalTarget(@Nullable Long goalTarget)
    • getGoalTarget

      @Nullable public Long getGoalTarget()
      The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goal_type is not specified, it will default to 'NEED' or 'MF' for Credit Card Payment categories. When updating a category, passing null removes any existing target.
      Returns:
      goalTarget
    • setGoalTarget

      public void setGoalTarget(@Nullable Long goalTarget)
    • goalTargetDate

      public NewCategory goalTargetDate(@Nullable LocalDate goalTargetDate)
    • getGoalTargetDate

      @Nullable public LocalDate getGoalTargetDate()
      The goal target date in ISO format (e.g. 2016-12-01).
      Returns:
      goalTargetDate
    • setGoalTargetDate

      public void setGoalTargetDate(@Nullable LocalDate goalTargetDate)
    • goalNeedsWholeAmount

      public NewCategory goalNeedsWholeAmount(@Nullable Boolean goalNeedsWholeAmount)
    • getGoalNeedsWholeAmount

      @Nullable public Boolean getGoalNeedsWholeAmount()
      Whether the goal requires the full target amount each period. Only supported for 'NEED' goals. When true, the goal is configured as 'Set aside another...'. When false, the goal is configured as 'Refill up to...'.
      Returns:
      goalNeedsWholeAmount
    • setGoalNeedsWholeAmount

      public void setGoalNeedsWholeAmount(@Nullable Boolean goalNeedsWholeAmount)
    • goalFrequency

      public NewCategory goalFrequency(@Nullable NewCategory.GoalFrequencyEnum goalFrequency)
    • getGoalFrequency

      @Nullable public NewCategory.GoalFrequencyEnum getGoalFrequency()
      When specified, configures a recurring 'NEED' target of goal_target that repeats at this frequency, replacing any existing target. Requires goal_target. Cannot be combined with goal_target_date and is not supported for Credit Card Payment categories. Omit to leave an existing target's cadence unchanged.
      Returns:
      goalFrequency
    • setGoalFrequency

      public void setGoalFrequency(@Nullable NewCategory.GoalFrequencyEnum goalFrequency)
    • 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 NewCategory
    • fromJson

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

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