updatePurchasePaymentNote function

Future<ApiResponse<PurchasePaymentNoteUpdated>> updatePurchasePaymentNote(
  1. ExsitedClient client,
  2. Object purchasePaymentId,
  3. Object ppNoteId,
  4. String note, {
  5. Map<String, Object?>? files,
  6. bool? raiseOnError,
  7. String? responseFormat,
})

PATCH /api/{api_version}/purchase_payments/{purchase_payment_id}/notes/{pp_note_id}

Update a note; a form, the text as the note field, answered under note.

Implementation

Future<ApiResponse<PurchasePaymentNoteUpdated>> updatePurchasePaymentNote(
  ExsitedClient client,
  Object purchasePaymentId,
  Object ppNoteId,
  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.sendPatchRequest(PurchasePaymentsUrls.purchasePaymentNote,
      pathParams: {
        'purchase_payment_id': purchasePaymentId,
        'pp_note_id': ppNoteId
      },
      formData: {'note': note},
      files: files,
      raiseOnError: raiseOnError,
      responseFormat: responseFormat,
      dtoDecoder: PurchasePaymentNoteUpdated.fromMap);
}