update method
Implementation
Future<ChangeResult> update(String id, IMembership membership,) async {
final builder = RequestBuilder();
builder.body = membership;if (id == null) {
throw BadRequestException.singleField("id", "Missing required request parameter", keyword: "required",);
}
if (membership == null) {
throw BadRequestException.singleField("membership", "Missing required request parameter", keyword: "required",);
}
// create path and map variables
// create path and map variables
builder.path = "/sunny/0.0.1/fact/membership/{id}";
builder.pathParams["id"] = Uri.encodeComponent(id);
List<String> contentTypes = [];
String contentType = contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
builder.contentType = contentType;
builder.basePath = apiClient.basePaths["facts"];
builder.method = HttpMethod.PUT;
final response = await apiClient.invokeRequest(builder);
final value = json.decode(response.body);
return value as ChangeResult;
}