1: <?php
2: /**
3: * Partner API Library
4: *
5: * @copyright Copyright (c) 2020 Asseco Data Systems SA
6: * @license license.txt
7: */
8:
9: require_once 'operation.php';
10: require_once 'certumPartnerAPI/messages/messageGetSanVerificationState.php';
11: require_once 'certumPartnerAPI/messages/messageGetSanVerificationStateResponse.php';
12:
13: /*
14: <operation name="getSanVerificationState" parameterOrder="getSanVerificationState">
15: <input message="tns:PartnerServicePortType_getSanVerificationState">
16: </input>
17: <output message="tns:PartnerServicePortType_getSanVerificationStateResponse">
18: </output>
19: </operation>
20: */
21:
22: /**
23: * This class represents the getSanVerificationState WSDL operation.
24: *
25: * It is based on the PartnerAPIOperation class and derives some properties and methods from that class.
26: *
27: * @method PartnerAPIMessageGetSanVerificationStateResponse getResponseMessage() A complete response from a service
28: *
29: * @package operations
30: */
31: class PartnerAPIOperationGetSanVerificationState extends PartnerAPIOperation {
32:
33: /**
34: * @var PartnerAPIMessageGetSanVerificationState
35: */
36: protected $_input = NULL;
37:
38: /**
39: * @var PartnerAPIMessageGetSanVerificationStateResponse
40: */
41: protected $_output = NULL;
42:
43: /**
44: * @var string
45: */
46: protected $_operation = 'getSanVerificationState';
47:
48: /**
49: * The constructor.
50: *
51: * It initializes input and output data.
52: */
53: public function __construct() {
54: $this->_input = new PartnerAPIMessageGetSanVerificationState();
55: $this->_output = new PartnerAPIMessageGetSanVerificationStateResponse();
56: }
57:
58: /**
59: * Sets an order ID for the request.
60: *
61: * Setting this value is required.
62: *
63: * @param string $orderID
64: * @return PartnerAPIOperationGetSanVerificationState
65: */
66: public function setOrderID($orderID) {
67: $this->_input->getSanVerificationState->setOrderID($orderID);
68: return $this;
69: }
70:
71: /**
72: * Returns sanVerifications contained in a response.
73: *
74: * This method always returns an array.
75: * If there is no sanVerifications in the response an empty array is returned.
76: * Otherwise, an array with one or more sanVerifications is returned.
77: *
78: * @return PartnerAPITypeSanVerificationState[]
79: */
80: public function getSanVerifications() {
81: $stateList = array();
82: $states = $this->_output->getSanVerificationStateResponse->sanVerifications;
83: if (is_null($states))
84: return $stateList;
85: $state = $states->sanVerification;
86: if (is_array($state))
87: foreach ($state as $s)
88: $stateList[] = $s;
89: else
90: $stateList[] = $state;
91: return $stateList;
92: }
93:
94: }
95: