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: * @deprecated No replacement
15: */
16: class FraudFieldsShippingDetails extends DataObject
17: {
18: /**
19: * @var string|null
20: *
21: * @deprecated No replacement
22: */
23: public ?string $methodDetails = null;
24:
25: /**
26: * @var int|null
27: *
28: * @deprecated No replacement
29: */
30: public ?int $methodSpeed = null;
31:
32: /**
33: * @var int|null
34: *
35: * @deprecated No replacement
36: */
37: public ?int $methodType = null;
38:
39: /**
40: * @return object
41: */
42: public function toObject(): object
43: {
44: $object = parent::toObject();
45: if (!is_null($this->methodDetails)) {
46: $object->methodDetails = $this->methodDetails;
47: }
48: if (!is_null($this->methodSpeed)) {
49: $object->methodSpeed = $this->methodSpeed;
50: }
51: if (!is_null($this->methodType)) {
52: $object->methodType = $this->methodType;
53: }
54: return $object;
55: }
56:
57: /**
58: * @param object $object
59: *
60: * @return $this
61: * @throws UnexpectedValueException
62: */
63: public function fromObject(object $object): FraudFieldsShippingDetails
64: {
65: parent::fromObject($object);
66: if (property_exists($object, 'methodDetails')) {
67: $this->methodDetails = $object->methodDetails;
68: }
69: if (property_exists($object, 'methodSpeed')) {
70: $this->methodSpeed = $object->methodSpeed;
71: }
72: if (property_exists($object, 'methodType')) {
73: $this->methodType = $object->methodType;
74: }
75: return $this;
76: }
77: }
78: