Overview

Packages

  • exceptions
  • messages
  • operations
  • PHP
  • service
  • types

Classes

  • PartnerAPIError
  • PartnerAPIOperation
  • PartnerAPIOperationAddEmailVerification
  • PartnerAPIOperationAddSanVerification
  • PartnerAPIOperationCancelOrder
  • PartnerAPIOperationGetCertificate
  • PartnerAPIOperationGetEmailVerification
  • PartnerAPIOperationGetExpiringCertificates
  • PartnerAPIOperationGetModifiedOrders
  • PartnerAPIOperationGetOrderByOrderID
  • PartnerAPIOperationGetOrdersByDateRange
  • PartnerAPIOperationGetOrderState
  • PartnerAPIOperationGetProductList
  • PartnerAPIOperationGetSanVerificationState
  • PartnerAPIOperationModifySNICertificate
  • PartnerAPIOperationOrderSNICertificate
  • PartnerAPIOperationPerformSanVerification
  • PartnerAPIOperationQuickOrder
  • PartnerAPIOperationReissueCertificate
  • PartnerAPIOperationRenewCertificate
  • PartnerAPIOperationRevokeCertificate
  • PartnerAPIOperationValidateOrderParameters
  • PartnerAPIOperationVerifyOrder
  • Overview
  • Package
  • Class
  • Tree
  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/messageRenewCertificate.php';
 11: require_once 'certumPartnerAPI/messages/messageRenewCertificateResponse.php';
 12: 
 13: /*
 14: <operation name="renewCertificate" parameterOrder="renewCertificate">
 15:     <input message="tns:PartnerServicePortType_renewCertificate">
 16:     </input>
 17:     <output message="tns:PartnerServicePortType_renewCertificateResponse">
 18:     </output>
 19: </operation>
 20: */
 21: 
 22: /**
 23:  * This class represents the renewCertificate WSDL operation.
 24:  *
 25:  * It is based on the PartnerAPIOperation class and derives some properties and methods from that class.
 26:  *
 27:  * @method PartnerAPIMessageRenewCertificateResponse getResponseMessage() A complete response from a service
 28:  * 
 29:  * @package operations
 30:  */
 31: class PartnerAPIOperationRenewCertificate extends PartnerAPIOperation {
 32: 
 33:     /**
 34:      * @var PartnerAPIMessageRenewCertificate
 35:      */
 36:     protected $_input = NULL;
 37: 
 38:     /**
 39:      * @var PartnerAPIMessageRenewCertificateResponse
 40:      */
 41:     protected $_output = NULL;
 42: 
 43:     /**
 44:      * @var string
 45:      */
 46:     protected $_operation = 'renewCertificate';
 47: 
 48:     /**
 49:      * The constructor.
 50:      *
 51:      * It initializes input and output data.
 52:      */
 53:     public function __construct() {
 54:         $this->_input  = new PartnerAPIMessageRenewCertificate();
 55:         $this->_output = new PartnerAPIMessageRenewCertificateResponse();
 56:     }
 57: 
 58:     /**
 59:      * Sets the approverMethod option for SANApprover.
 60:      *
 61:      * This option determines which approve method will be used for domain verification.
 62:      *
 63:      * @param string $approverMethod
 64:      * @return PartnerAPIOperationQuickOrder
 65:      */
 66:     public function setApproverMethod($approverMethod) {
 67:         $approver = $this->_input->renewCertificate->SANApprover;
 68:         if (is_null($approver)) {
 69:             $approver = new PartnerAPITypeSanApprover();
 70:             $this->_input->renewCertificate->setSANApprover($approver);
 71:         }
 72:         $approver->setApproverMethod($approverMethod);
 73:         return $this;
 74:     }
 75: 
 76:     /**
 77:      * Sets the approverEmail option for SANApprover.
 78:      *
 79:      * This option determines where will be sent e-mail with instructions for FILE or DNS approve method.
 80:      * This method cannot be used with EMAIL approve method.
 81:      *
 82:      * @param string $approverEmail
 83:      * @return PartnerAPIOperationQuickOrder
 84:      */
 85:     public function setApproverEmail($approverEmail) {
 86:         $approver = $this->_input->renewCertificate->SANApprover;
 87:         if (is_null($approver)) {
 88:             $approver = new PartnerAPITypeSanApprover();
 89:             $this->_input->renewCertificate->setSANApprover($approver);
 90:         }
 91:         $approver->setApproverEmail($approverEmail);
 92:         return $this;
 93:     }
 94: 
 95:     /**
 96:      * Sets the approverEmailPrefix option for SANApprover.
 97:      *
 98:      * This option determines which e-mail prefix will be used for EMAIL approve method.
 99:      * This method cannot be used with FILE or DNS approve method.
100:      *
101:      * @param string $approverEmailPrefix
102:      * @return PartnerAPIOperationQuickOrder
103:      */
104:     public function setApproverEmailPrefix($approverEmailPrefix) {
105:         $approver = $this->_input->renewCertificate->SANApprover;
106:         if (is_null($approver)) {
107:             $approver = new PartnerAPITypeSanApprover();
108:             $this->_input->renewCertificate->setSANApprover($approver);
109:         }
110:         $approver->setApproverEmailPrefix($approverEmailPrefix);
111:         return $this;
112:     }
113: 
114:     /**
115:      * Sets the verificationNotificationEnabled option for SANApprover.
116:      *
117:      * This option determines if verification e-mails for all approvers will be sent or not.
118:      *
119:      * @param boolean $yes_or_no
120:      * @return PartnerAPIOperationQuickOrder
121:      */
122:     public function setVerificationNotificationEnabled($yes_or_no) {
123:         $approver = $this->_input->renewCertificate->SANApprover;
124:         if (is_null($approver)) {
125:             $approver = new PartnerAPITypeSanApprover();
126:             $this->_input->renewCertificate->setSANApprover($approver);
127:         }
128:         $approver->setVerificationNotificationEnabled($yes_or_no);
129:         return $this;
130:     }
131: 
132:     /**
133:      * Sets a CSR for the request.
134:      *
135:      * Setting this value is required.
136:      *
137:      * @param string $csr
138:      * @return PartnerAPIOperationRenewCertificate
139:      */
140:     public function setCSR($csr) {
141:         $this->_input->renewCertificate->setCSR($csr);
142:         return $this;
143:     }
144: 
145:     /**
146:      * Sets a customer name for the request.
147:      *
148:      * Setting this value is required.
149:      *
150:      * @param string $customer
151:      * @return PartnerAPIOperationRenewCertificate
152:      */
153:     public function setCustomer($customer) {
154:         $this->_input->renewCertificate->setCustomer($customer);
155:         return $this;
156:     }
157: 
158:     /**
159:      * Sets a product code for the request.
160:      *
161:      * Setting this value is required.
162:      *
163:      * @param string $productCode
164:      * @return PartnerAPIOperationRenewCertificate
165:      */
166:     public function setProductCode($productCode) {
167:         $this->_input->renewCertificate->setProductCode($productCode);
168:         return $this;
169:     }
170: 
171:     /**
172:      * Sets the serial number of a certificate to be renew.
173:      *
174:      * It is required to set X509Cert or serialNumber value but only one
175:      * of them may be set. Setting both values is an error.
176:      *
177:      * @param string $serialNumber
178:      * @return PartnerAPIOperationRenewCertificate
179:      */
180:     public function setSerialNumber($serialNumber) {
181:         $this->_input->renewCertificate->setSerialNumber($serialNumber);
182:         return $this;
183:     }
184: 
185:     /**
186:      * Sets a certificate to be renew.
187:      *
188:      * It is required to set X509Cert or serialNumber value but only one
189:      * of them may be set. Setting both values is an error.
190:      *
191:      * @param string $x509cert
192:      * @return PartnerAPIOperationRenewCertificate
193:      */
194:     public function setX509Cert($x509cert) {
195:         $this->_input->renewCertificate->setX509Cert($x509cert);
196:         return $this;
197:     }
198: 
199:     /**
200:      * Sets a hash algorithm to be used.
201:      *
202:      * @param string $hashAlgorithm
203:      * @return PartnerAPIOperationRenewCertificate
204:      */
205:     public function setHashAlgorithm($hashAlgorithm) {
206:         $this->_input->renewCertificate->setHashAlgorithm($hashAlgorithm);
207:         return $this;
208:     }
209: 
210:     /**
211:      * Sets the userAgent for the request
212:      *
213:      * @param string $userAgent
214:      * @return PartnerAPIOperationRenewCertificate
215:      */
216:     public function setUserAgent($userAgent) {
217:         $this->_input->renewCertificate->setUserAgent($userAgent);
218:         return $this;
219:     }
220: 
221:     /**
222:      * Sets a revocation contact email.
223:      *
224:      * It is not required to set this but if your certificate needs to be revoked
225:      * we will contact you using provided email.
226:      *
227:      * @param string $revocationContactEmail Contact email used in certificate's revocation process
228:      * @return PartnerAPIOperationRenewCertificate
229:      */
230:     public function setRevocationContactEmail($revocationContactEmail) {
231:         $this->_input->renewCertificate->setRevocationContactEmail($revocationContactEmail);
232:         return $this;
233:     }
234:     
235:     /**
236:      * Sets a shortened validity period.
237:      *
238:      * It is not required to set this unless you want your certificate to be valid less days than the product allows.
239:      * In that case please specify your requested certificate's expiration date within product's allowed validity range.
240:      *
241:      * @param string $shortenedValidityPeriod Custom certificate's expiration date
242:      * @return PartnerAPIOperationQuickOrder
243:      */
244:     public function setShortenedValidityPeriod($shortenedValidityPeriod) {
245:         $this->_input->renewCertificate->setShortenedValidityPeriod($shortenedValidityPeriod);
246:         return $this;
247:     }
248: 
249:     /**
250:      * Gets an order ID returned in a response.
251:      *
252:      * @return string
253:      */
254:     public function getOrderID() {
255:         return $this->_output->renewCertificateResponse->orderID;
256:     }
257: 
258:     /**
259:      * Returns SANVerification entity containing verification data from a response.
260:      *
261:      * If there is no verification in the response a NULL is returned.
262:      *
263:      * @return PartnerAPITypeSanVerification
264:      */
265:     public function getSANVerification() {
266:         return $this->_output->renewCertificateResponse->SANVerification;
267:     }
268: 
269: }
270: 
API documentation generated by ApiGen 2.8.0