From 616e4f370bbe166e8b9922f7102aca5237eb35c0 Mon Sep 17 00:00:00 2001 From: Igor Fedoronchuk Date: Thu, 12 Mar 2026 23:49:24 +0100 Subject: [PATCH] Fix outdated build() references in README to use withId() --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 77ef28b..4c0b130 100644 --- a/README.md +++ b/README.md @@ -394,10 +394,10 @@ client.dids().update(did); ### Building a resource for update -Use `build(id)` to create a lightweight resource for PATCH without fetching first: +Use `withId(id)` to create a lightweight resource for PATCH without fetching first: ```java -VoiceInTrunk trunk = VoiceInTrunk.build("trunk-uuid"); +VoiceInTrunk trunk = new VoiceInTrunk().withId("trunk-uuid"); trunk.setName("New name"); // PATCH payload includes only "name" client.voiceInTrunks().update(trunk); @@ -408,7 +408,7 @@ client.voiceInTrunks().update(trunk); Calling a setter with `null` marks the field as dirty and includes an explicit `null` in the payload, which clears the server-side value: ```java -Did did = Did.build("uuid"); +Did did = new Did().withId("uuid"); did.setDescription(null); // PATCH payload includes "description": null client.dids().update(did); @@ -419,7 +419,7 @@ client.dids().update(did); Calling a relationship setter with `null` sends `"data": null` for to-one or `"data": []` for to-many relationships: ```java -Did did = Did.build("uuid"); +Did did = new Did().withId("uuid"); did.setVoiceInTrunk(null); // PATCH payload includes: "relationships": { "voice_in_trunk": { "data": null } } client.dids().update(did);