UnitUpsertVehicleInput
Unit asset attributes. Writes directly to asset columns, bypassing the blank?-only guards in before_save callbacks. Omitted fields are untouched. Passing null clears the column (empty strings are normalized to nil). For extended-synced fields (make, model, year, hours, category, unit_status, sales_status): on create, the provided key is mirrored into extended unconditionally; on update, the extended key is updated only if it already exists in extended (provided-null preserves the key with a null value).
Input Fields
String)
Category. Writes to unit.category. Mirrors into extended['category'] on create or when the key already exists. Omit to leave unchanged; null clears.
String)
Unit condition. Writes to unit.condition. Omit to leave unchanged; null clears.
String)
Unit description. Writes to unit.description. Omit to leave unchanged; null clears.
Int)
Hours. Writes to unit.hours. Mirrors into extended['hours'] on create or when the key already exists. Omit to leave unchanged; null clears.
String)
Vehicle make. Writes to unit.make. Mirrors into extended['make'] on create or when the key already exists. Omit to leave unchanged; null clears the column (preserves extended key with null value if present).
String)
Vehicle model. Writes to unit.model. Mirrors into extended['model'] on create or when the key already exists. Omit to leave unchanged; null clears the column (preserves extended key with null value if present).
Int)
Odometer reading. Writes to unit.odometer. Omit to leave unchanged; null clears.
String)
Sales status. Writes to unit.sales_status. Mirrors into extended['sales_status'] on create or when the key already exists. Omit to leave unchanged; null clears.
String)
Serial number. Writes to unit.serial_number. Omit to leave unchanged; null clears.
String)
Unit status. Writes to unit.unit_status. Mirrors into extended['unit_status'] on create or when the key already exists. Omit to leave unchanged; null clears.
Int)
Vehicle year. Writes to unit.year. Mirrors into extended['year'] on create or when the key already exists. Omit to leave unchanged; null clears the column (preserves extended key with null value if present).