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/messageAddSanVerification.php';
11: require_once 'certumPartnerAPI/messages/messageAddSanVerificationResponse.php';
12:
13: /*
14: <operation name="addSanVerification" parameterOrder="addSanVerification">
15: <input message="tns:PartnerServicePortType_addSanVerification">
16: </input>
17: <output message="tns:PartnerServicePortType_addSanVerificationResponse">
18: </output>
19: </operation>
20: */
21:
22: /**
23: * This class represents the addSanVerification WSDL operation.
24: *
25: * It is based on the PartnerAPIOperation class and derives some properties and methods from that class.
26: *
27: * @method PartnerAPIMessageAddSanVerificationResponse getResponseMessage() A complete response from a service
28: *
29: * @package operations
30: */
31: class PartnerAPIOperationAddSanVerification extends PartnerAPIOperation {
32:
33: /**
34: * @var PartnerAPIMessageAddSanVerification
35: */
36: protected $_input = NULL;
37:
38: /**
39: * @var PartnerAPIMessageAddSanVerificationResponse
40: */
41: protected $_output = NULL;
42:
43: /**
44: * @var string
45: */
46: protected $_operation = 'addSanVerification';
47:
48: /**
49: * The constructor.
50: *
51: * It initializes input and output data.
52: */
53: public function __construct() {
54: $this->_input = new PartnerAPIMessageAddSanVerification();
55: $this->_output = new PartnerAPIMessageAddSanVerificationResponse();
56: }
57:
58: /**
59: * Sets an orderID for the request.
60: *
61: * Setting this value is required.
62: *
63: * @param string $orderID
64: * @return PartnerAPIOperationAddSanVerification
65: */
66: public function setOrderID($orderID) {
67: $this->_input->addSanVerification->setOrderID($orderID);
68: return $this;
69: }
70:
71: /**
72: * Sets the approverMethod option for SANApprover.
73: *
74: * This option determines which approve method will be used for domain verification.
75: *
76: * @param string $approverMethod
77: * @return PartnerAPIOperationAddSanVerification
78: */
79: public function setApproverMethod($approverMethod) {
80: $approver = $this->_input->addSanVerification->SANApprover;
81: if (is_null($approver)) {
82: $approver = new PartnerAPITypeSanApprover();
83: $this->_input->addSanVerification->setSANApprover($approver);
84: }
85: $approver->setApproverMethod($approverMethod);
86: return $this;
87: }
88:
89: /**
90: * Sets the approverEmail option for SANApprover.
91: *
92: * This option determines where will be sent e-mail with instructions for FILE or DNS approve method.
93: * This method cannot be used with EMAIL approve method.
94: *
95: * @param string $approverEmail
96: * @return PartnerAPIOperationAddSanVerification
97: */
98: public function setApproverEmail($approverEmail) {
99: $approver = $this->_input->addSanVerification->SANApprover;
100: if (is_null($approver)) {
101: $approver = new PartnerAPITypeSanApprover();
102: $this->_input->addSanVerification->setSANApprover($approver);
103: }
104: $approver->setApproverEmail($approverEmail);
105: return $this;
106: }
107:
108: /**
109: * Sets the approverEmailPrefix option for SANApprover.
110: *
111: * This option determines which e-mail prefix will be used for EMAIL approve method.
112: * This method cannot be used with FILE or DNS approve method.
113: *
114: * @param string $approverEmailPrefix
115: * @return PartnerAPIOperationAddSanVerification
116: */
117: public function setApproverEmailPrefix($approverEmailPrefix) {
118: $approver = $this->_input->addSanVerification->SANApprover;
119: if (is_null($approver)) {
120: $approver = new PartnerAPITypeSanApprover();
121: $this->_input->addSanVerification->setSANApprover($approver);
122: }
123: $approver->setApproverEmailPrefix($approverEmailPrefix);
124: return $this;
125: }
126:
127: /**
128: * Sets the verificationNotificationEnabled option for SANApprover.
129: *
130: * This option determines if verification e-mails for all approvers will be sent or not.
131: *
132: * @param boolean $yes_or_no
133: * @return PartnerAPIOperationAddSanVerification
134: */
135: public function setVerificationNotificationEnabled($yes_or_no) {
136: $approver = $this->_input->addSanVerification->SANApprover;
137: if (is_null($approver)) {
138: $approver = new PartnerAPITypeSanApprover();
139: $this->_input->addSanVerification->setSANApprover($approver);
140: }
141: $approver->setVerificationNotificationEnabled($yes_or_no);
142: return $this;
143: }
144:
145: /**
146: * Returns SANVerification entity containing verification data from a response.
147: *
148: * If there is no verification in the response a NULL is returned.
149: *
150: * @return PartnerAPITypeSanVerification
151: */
152: public function getSANVerification() {
153: return $this->_output->addSanVerificationResponse->SANVerification;
154: }
155:
156:
157: }
158: