setUnmaskExpirationDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace CommerceGuys\AuthNet;
4
5
use CommerceGuys\AuthNet\Request\RequestInterface;
6
7
/**
8
 * Retrieve a customer payment profile for an existing customer profile.
9
 *
10
 * @link http://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-payment-profile
11
 */
12
class GetCustomerPaymentProfileRequest extends BaseApiRequest
13
{
14
    protected $customerProfileId;
15
    protected $customerPaymentProfileId;
16
    protected $unmaskExpirationDate = false;
17
18
    /**
19
     * @param mixed $customerProfileId
20
     */
21 1
    public function setCustomerProfileId($customerProfileId)
22
    {
23 1
        $this->customerProfileId = $customerProfileId;
24 1
    }
25
26
    /**
27
     * @param mixed $customerPaymentProfileId
28
     */
29 1
    public function setCustomerPaymentProfileId($customerPaymentProfileId)
30
    {
31 1
        $this->customerPaymentProfileId = $customerPaymentProfileId;
32 1
    }
33
34
    /**
35
     * @param boolean $unmaskExpirationDate
36
     */
37
    public function setUnmaskExpirationDate($unmaskExpirationDate)
38
    {
39
        $this->unmaskExpirationDate = $unmaskExpirationDate;
40
    }
41
42
43
44 1
    protected function attachData(RequestInterface $request)
45
    {
46 1
        $request->addData('customerProfileId', $this->customerProfileId);
47 1
        $request->addData('customerPaymentProfileId', $this->customerPaymentProfileId);
48 1
        if ($this->unmaskExpirationDate) {
49
            $request->addData('unmaskExpirationDate', $this->unmaskExpirationDate);
50
        }
51 1
    }
52
}
53