PaymentRefunds::showRefundDetails()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace Srmklive\PayPal\Traits\PayPalAPI;
4
5
trait PaymentRefunds
6
{
7
    /**
8
     * Show details for authorized payment.
9
     *
10
     * @param string $refund_id
11
     *
12
     * @throws \Throwable
13
     *
14
     * @return array|\Psr\Http\Message\StreamInterface|string
15
     *
16
     * @see https://developer.paypal.com/docs/api/payments/v2/#authorizations_get
17
     */
18
    public function showRefundDetails(string $refund_id)
19
    {
20
        $this->apiEndPoint = "v2/payments/refunds/{$refund_id}";
21
22
        $this->verb = 'get';
23
24
        return $this->doPayPalRequest();
25
    }
26
}
27