feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - insert service vehical working
This commit is contained in:
@@ -121,10 +121,13 @@ async function ensureRRServiceVehicle(args = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- Attempt insert (idempotent) ---
|
// --- Attempt insert (idempotent) ---
|
||||||
|
// IMPORTANT: The current RR lib build validates `vehicleServInfo.customerNo`.
|
||||||
|
// To be future-proof, we also include top-level `customerNo`.
|
||||||
const insertPayload = {
|
const insertPayload = {
|
||||||
vin: vinStr,
|
vin: vinStr,
|
||||||
customerNo: custNoStr,
|
customerNo: custNoStr, // fallback form (some builds accept this)
|
||||||
license: license ? String(license).trim() : undefined
|
vehicleServInfo: { customerNo: custNoStr }, // primary form expected by the lib
|
||||||
|
vehicleDetail: license ? { licNo: String(license).trim() } : undefined
|
||||||
};
|
};
|
||||||
|
|
||||||
const insertOpts = {
|
const insertOpts = {
|
||||||
|
|||||||
Reference in New Issue
Block a user