feat(dashboard,core-flows,js-sdk,types): ability to mark payment as paid (#8679)

* feat(core-flows): create or update payment collections in RMA flows

* chore: change ui to pick payment link from unpaid payment collection

* Apply suggestions from code review

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* chore: fix mathbn

* feat(dashboard,core-flows,js-sdk,types): ability to mark payment as paid

* chore: add captured bt

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
Riqwan Thamir
2024-08-20 22:58:28 +02:00
committed by GitHub
parent 99eca64c20
commit 8bd284779e
12 changed files with 273 additions and 6 deletions

View File

@@ -60,4 +60,21 @@ export class PaymentCollection {
}
)
}
async markAsPaid(
id: string,
body: HttpTypes.AdminMarkPaymentCollectionAsPaid,
query?: SelectParams,
headers?: ClientHeaders
) {
return await this.client.fetch<HttpTypes.AdminPaymentCollectionResponse>(
`/admin/payment-collections/${id}/mark-as-paid`,
{
method: "POST",
headers,
body,
query,
}
)
}
}