@@ -12,15 +12,14 @@ import { type ThrottlingParameter } from '../../types/parameters';
12
12
import Helper from '../Helper' ;
13
13
import type Chargeback from '../chargebacks/Chargeback' ;
14
14
import { type ChargebackData } from '../chargebacks/Chargeback' ;
15
- import { SequenceType , type Amount } from '../global' ;
16
15
import type Order from '../orders/Order' ;
17
16
import { type OrderData } from '../orders/data' ;
18
17
import type Refund from '../refunds/Refund' ;
19
18
import { type RefundData } from '../refunds/data' ;
20
19
import type Payment from './Payment' ;
21
20
import type Capture from './captures/Capture' ;
22
21
import { type CaptureData } from './captures/data' ;
23
- import { PaymentStatus , type BankTransferLinks , type PaymentData } from './data' ;
22
+ import { type BankTransferLinks , type PaymentData } from './data' ;
24
23
25
24
export default class PaymentHelper extends Helper < PaymentData , Payment > {
26
25
constructor ( networkClient : TransformingNetworkClient , protected readonly links : PaymentData [ '_links' ] , protected readonly embedded : Payment [ '_embedded' ] ) {
@@ -59,6 +58,16 @@ export default class PaymentHelper extends Helper<PaymentData, Payment> {
59
58
return this . links . checkout ?. href ?? null ;
60
59
}
61
60
61
+ /**
62
+ * Returns the direct link to the payment in the Mollie Dashboard.
63
+ *
64
+ * @see https://docs.mollie.com/reference/v2/payments-api/get-payment?path=_links/dashboard#response
65
+ * @since 4.0.0
66
+ */
67
+ public getDashboardUrl ( ) : string {
68
+ return this . links . dashboard . href ;
69
+ }
70
+
62
71
public canBeRefunded ( this : PaymentData ) : boolean {
63
72
return this . amountRemaining != undefined ;
64
73
}
0 commit comments