1 <?php
2
3 namespace MaxMind\MinFraud\Model;
4
5 /**
6 * Model with the disposition set by custom rules.
7 *
8 * In order to receive a disposition, you must be use the minFraud custom
9 * rules.
10 *
11 * @property-read string|null $action The action to take on the transaction as
12 * defined by your custom rules. The current set of values are "accept",
13 * "manual_review", and "reject". If you do not have custom rules set up,
14 * `null` will be returned.
15 *
16 * @property-read string|null $reason The reason for the action. The current
17 * possible values are "custom_rule", "block_list", and "default". If you do
18 * not have custom rules set up, `null` will be returned.
19 */
20 class Disposition extends AbstractModel
21 {
22 /**
23 * @internal
24 */
25 protected $action;
26
27 /**
28 * @internal
29 */
30 protected $reason;
31
32 public function __construct($response, $locales = ['en'])
33 {
34 parent::__construct($response, $locales);
35 $this->action = $this->safeArrayLookup($response['action']);
36 $this->reason = $this->safeArrayLookup($response['reason']);
37 }
38 }
39