create method
Implementation
Future<IContact> create(
IContact contact,
) async {
final builder = RequestBuilder();
builder.body = contact;
if (contact == null) {
throw BadRequestException.singleField(
"contact",
"Missing required request parameter",
keyword: "required",
);
}
// create path and map variables
// create path and map variables
builder.path = "/mverse/0.0.1/contact/contact";
List<String> contentTypes = [];
String contentType =
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
builder.contentType = contentType;
builder.basePath = apiClient.basePaths["contact_v2"];
builder.method = HttpMethod.POST;
final response = await apiClient.invokeRequest(builder);
final value = json.decode(response.body);
return IContact.fromJson(value);
}