createRefundNote function
POST /api/{api_version}/refunds/{refund_id}/notes
Attach a note to a refund; a form, the text as the note field, and 201
under note.
Implementation
Future<ApiResponse<RefundNote>> createRefundNote(
ExsitedClient client,
Object refundId,
String note, {
Map<String, Object?>? files,
bool? raiseOnError,
String? responseFormat,
}) {
if (note.isEmpty) {
throw SdkUsageError(
'note is required: the note text is the body of this request');
}
return client.sendPostRequest(RefundsUrls.refundNotes,
pathParams: {'refund_id': refundId},
formData: {'note': note},
files: files,
raiseOnError: raiseOnError,
responseFormat: responseFormat,
dtoDecoder: RefundNote.fromMap);
}