createPurchaseCreditNotePurchaseRefund function
Future<ApiResponse<PurchaseRefund> >
createPurchaseCreditNotePurchaseRefund(
- ExsitedClient client,
- Object purchaseCreditNoteId,
- Object payload, {
- bool? raiseOnError,
- String? responseFormat,
POST /api/{api_version}/purchase_credit_notes/{purchase_credit_note_id}/purchase_refunds
Refund from a purchase credit note; 201, as getPurchaseRefund reads it.
payment_method is the supplier's method reference.
Implementation
Future<ApiResponse<PurchaseRefund>> createPurchaseCreditNotePurchaseRefund(
ExsitedClient client,
Object purchaseCreditNoteId,
Object payload, {
bool? raiseOnError,
String? responseFormat,
}) =>
client.sendPostRequest(
PurchaseRefundsUrls.purchaseCreditNotePurchaseRefunds,
pathParams: {'purchase_credit_note_id': purchaseCreditNoteId},
jsonBody: payload,
raiseOnError: raiseOnError,
responseFormat: responseFormat,
dtoDecoder: PurchaseRefund.fromMap);