Passed
Push — master ( b7c0cf...4514bd )
by Matt
02:18
created

PaymentProfile::addCustomerPaymentProfileId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace CommerceGuys\AuthNet\DataTypes;
4
5
class PaymentProfile extends BaseDataType
6
{
7
8
    protected $propertyMap = [
9
        'customerType',
10
        'billTo',
11
        'payment',
12
        'defaultPaymentProfile',
13
        'customerPaymentProfileId'
14
    ];
15
16 3
    public function addPayment(PaymentMethodInterface $paymentMethod)
17
    {
18 3
        $this->properties['payment'][$paymentMethod->getType()] = $paymentMethod->toArray();
19 3
    }
20
21 3
    public function addBillTo(BillTo $billTo)
22
    {
23 3
        $this->addDataType($billTo);
24 3
    }
25
26 1
    public function addCustomerPaymentProfileId($id)
27
    {
28 1
        $this->properties['customerPaymentProfileId'] = $id;
29 1
    }
30
}
31