PaymentPolicy::edit()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace MerchantSafeUnipay\SDK\Action;
5
6
use MerchantSafeUnipay;
7
8
final class PaymentPolicy extends ActionAbstract implements ActionInterface
9
{
10
    static private $addKeys = [
11
        'PAYMENTSYSTEM', 'PPOLICY', 'CURRENCY', 'AMOUNTLIMIT'
12
    ];
13
    static private $editKeys = [
14
        'PAYMENTSYSTEM', 'PPOLICY', 'CURRENCY', 'AMOUNTLIMIT'
15
    ];
16
17
    public function add($args)
18
    {
19
        $this->action = 'PAYMENTPOLICYADD';
20
        $args = MerchantSafeUnipay\filter(self::$addKeys, $args);
21
        $this->queryParameters = array_merge($this->merchantParams, $args);
22
    }
23
24
    public function edit($args)
25
    {
26
        $this->action = 'PAYMENTPOLICYEDIT';
27
        $args = MerchantSafeUnipay\filter(self::$editKeys, $args);
28
        $this->queryParameters = array_merge($this->merchantParams, $args);
29
    }
30
}
31