Class InventoryRecord

java.lang.Object
com.amilesend.discogs.csv.type.InventoryRecord

public class InventoryRecord extends Object
Defines a record for an inventory item as a CSV row.
  • Field Details

  • Method Details

    • getDefinedHeaders

      public List<InventoryHeader> getDefinedHeaders()
      Gets the list of headers based on the populated fields.
      Returns:
      the list of defined headers
    • validate

      public void validate(@NonNull InventoryRecordType type) throws ValidationException
      Validates the record contents based on the defined record type.
      Parameters:
      type - the record type
      Throws:
      ValidationException - if there is an error with the record
      See Also:
    • toCsvRow

      public List<String> toCsvRow(@NonNull List<InventoryHeader> docCsvHeaders, @NonNull InventoryRecordType type)
      Converts the record to a list of String values that represents the row.
      Parameters:
      docCsvHeaders - the list of headers to include in the row
      type - the record type
      Returns:
      the record represented as a list of strings
      See Also:
    • toString

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

      public static InventoryRecord.InventoryRecordBuilder builder()
    • getReleaseId

      @NonNull public @NonNull Integer getReleaseId()
      The release identifier (required).
    • getPrice

      public Double getPrice()
      The price (required).
    • getMediaCondition

      public Condition getMediaCondition()
      The media condition (required).
      See Also:
    • getSleeveCondition

      public SleeveCondition getSleeveCondition()
      The sleeve condition (optional).
      See Also:
    • getComments

      public String getComments()
      Free-form comments.
    • getAcceptOffer

      public String getAcceptOffer()
      Flag indicator if buyer offers are accepted or not (optional).
      See Also:
    • getLocation

      public String getLocation()
      Free-form text field to describe the location (optional).
    • getExternalId

      public String getExternalId()
      Free-form notes for external identifiers (optional).
    • getWeight

      public Integer getWeight()
      The item weight in grams (optional).
    • getFormatQuantity

      public Integer getFormatQuantity()
      The item format quantity (optional).
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object