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: * @property-read string|null $reason The reason for the action. The current
16: * possible values are "custom_rule", "block_list", and "default". If you do
17: * not have custom rules set up, `null` will be returned.
18: */
19: class Disposition extends AbstractModel
20: {
21: /**
22: * @internal
23: */
24: protected $action;
25:
26: /**
27: * @internal
28: */
29: protected $reason;
30:
31: public function __construct($response, $locales = ['en'])
32: {
33: parent::__construct($response, $locales);
34: $this->action = $this->safeArrayLookup($response['action']);
35: $this->reason = $this->safeArrayLookup($response['reason']);
36: }
37: }
38: