@@ -13,6 +13,11 @@ export class InvoicePaymentGateway {
1313 this . config = gateway . config ;
1414 }
1515
16+ /**
17+ * Create a new invoice payment
18+ * @param invoicePayment Body of the invoice payment
19+ * @returns InvoicePayment
20+ */
1621 async create ( invoicePayment : InvoicePaymentInput ) {
1722 const endPoint = buildURL ( 'invoices/payment/create' ) ;
1823
@@ -24,6 +29,11 @@ export class InvoicePaymentGateway {
2429 return Object . assign ( new InvoicePayment ( ) , result . invoicePayment ) ;
2530 }
2631
32+ /**
33+ * Update an existing invoice payment
34+ * @param invoicePayment Body of the invoice payment
35+ * @returns InvoicePayment
36+ */
2737 async update ( payload : any ) {
2838 const endPoint = buildURL ( 'invoices/payment/update' ) ;
2939
@@ -35,6 +45,11 @@ export class InvoicePaymentGateway {
3545 return result . ok ;
3646 }
3747
48+ /**
49+ * Delete an existing invoice payment
50+ * @param invoicePayment Body of the invoice payment
51+ * @returns boolean
52+ */
3853 async delete ( payload : any ) {
3954 const endPoint = buildURL ( 'invoices/payment/delete' ) ;
4055
@@ -46,6 +61,11 @@ export class InvoicePaymentGateway {
4661 return result . ok ;
4762 }
4863
64+ /**
65+ * Search for invoice payments
66+ * @param payload Search parameters
67+ * @returns InvoicePayment[]
68+ */
4969 async search ( payload ?: any ) {
5070 const endPoint = buildURL ( 'invoices/payment/search' ) ;
5171
0 commit comments