1: <?php
2:
3: namespace MaxMind\MinFraud\Model;
4:
5: /**
6: * Class Warning
7: * @package MaxMind\MinFraud\Model
8: *
9: * @property string $code This value is a machine-readable code identifying the
10: * warning. Although more codes may be added in the future, the current codes
11: * are:
12: *
13: * * `BILLING_CITY_NOT_FOUND` - the billing city could not be found in our
14: * database.
15: * * `BILLING_COUNTRY_NOT_FOUND` - the billing country could not be found in
16: * our database.
17: * * `BILLING_POSTAL_NOT_FOUND` - the billing postal could not be found in our
18: * database.
19: * * `INPUT_INVALID` - the value associated with the key does not meet the
20: * required constraints, e.g., "United States" in a field that requires a
21: * two-letter country code.
22: * * `INPUT_UNKNOWN` - an unknown key was encountered in the request body.
23: * * `IP_ADDRESS_NOT_FOUND` - the IP address could not be geolocated.
24: * * `SHIPPING_CITY_NOT_FOUND` - the shipping city could not be found in our
25: * database.
26: * * `SHIPPING_COUNTRY_NOT_FOUND` - the shipping country could not be found in
27: * our database.
28: * * `SHIPPING_POSTAL_NOT_FOUND` - the shipping postal could not be found in
29: * our database.
30: *
31: * @property string $warning This property provides a human-readable
32: * explanation of the warning. The description may change at any time and
33: * should not be matched against.
34: * @property array $input This is an array of keys representing the path to the
35: * input that the warning is associated with. For instance, if the warning was
36: * about the billing city, the array would be `["billing", "city"]`. The key is
37: * used for an object and the index number for an array.
38: */
39: class Warning extends AbstractModel
40: {
41: /**
42: * @internal
43: */
44: protected $code;
45:
46: /**
47: * @internal
48: */
49: protected $warning;
50:
51: /**
52: * @internal
53: */
54: protected $input;
55:
56: public function __construct($response, $locales = array('en'))
57: {
58: $this->code = $this->safeArrayLookup($response['code']);
59: $this->warning = $this->safeArrayLookup($response['warning']);
60: $this->input = $this->safeArrayLookup($response['input']);
61: }
62: }
63: