1: <?php
2: /*
3: * This class was auto-generated from the API references found at
4: * https://apireference.connect.worldline-solutions.com/
5: */
6: namespace Worldline\Connect\Sdk\V1\Domain;
7:
8: use UnexpectedValueException;
9: use Worldline\Connect\Sdk\Domain\DataObject;
10:
11: /**
12: * @package Worldline\Connect\Sdk\V1\Domain
13: */
14: class InAuth extends DataObject
15: {
16: /**
17: * @var string|null
18: */
19: public ?string $deviceCategory = null;
20:
21: /**
22: * @var string|null
23: */
24: public ?string $deviceId = null;
25:
26: /**
27: * @var string|null
28: */
29: public ?string $riskScore = null;
30:
31: /**
32: * @var string|null
33: */
34: public ?string $trueIpAddress = null;
35:
36: /**
37: * @var string|null
38: */
39: public ?string $trueIpAddressCountry = null;
40:
41: /**
42: * @return object
43: */
44: public function toObject(): object
45: {
46: $object = parent::toObject();
47: if (!is_null($this->deviceCategory)) {
48: $object->deviceCategory = $this->deviceCategory;
49: }
50: if (!is_null($this->deviceId)) {
51: $object->deviceId = $this->deviceId;
52: }
53: if (!is_null($this->riskScore)) {
54: $object->riskScore = $this->riskScore;
55: }
56: if (!is_null($this->trueIpAddress)) {
57: $object->trueIpAddress = $this->trueIpAddress;
58: }
59: if (!is_null($this->trueIpAddressCountry)) {
60: $object->trueIpAddressCountry = $this->trueIpAddressCountry;
61: }
62: return $object;
63: }
64:
65: /**
66: * @param object $object
67: *
68: * @return $this
69: * @throws UnexpectedValueException
70: */
71: public function fromObject(object $object): InAuth
72: {
73: parent::fromObject($object);
74: if (property_exists($object, 'deviceCategory')) {
75: $this->deviceCategory = $object->deviceCategory;
76: }
77: if (property_exists($object, 'deviceId')) {
78: $this->deviceId = $object->deviceId;
79: }
80: if (property_exists($object, 'riskScore')) {
81: $this->riskScore = $object->riskScore;
82: }
83: if (property_exists($object, 'trueIpAddress')) {
84: $this->trueIpAddress = $object->trueIpAddress;
85: }
86: if (property_exists($object, 'trueIpAddressCountry')) {
87: $this->trueIpAddressCountry = $object->trueIpAddressCountry;
88: }
89: return $this;
90: }
91: }
92: