@@ -55,15 +55,16 @@ public function getConfig(): Configuration
5555 /**
5656 * @return \Hostinger\Model\CommonSuccessEmptyResource
5757 *
58- * @throws ExceptionInterface
5958 * @throws ApiException
6059 * @throws GuzzleException
6160 */
6261 public function deleteDNSRecordsV1 (string $ domain , \Hostinger \Model \DNSV1ZoneDestroyRequest $ dNSV1ZoneDestroyRequest )
6362 {
6463 $ request = new Request (
65- method: 'GET ' ,
66- uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain} ' , $ domain ),
64+ method: 'DELETE ' ,
65+ uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain} ' , [
66+ 'domain ' => $ domain
67+ ]),
6768 headers: $ this ->getHeaders (),
6869 body: $ this ->serializer ->serialize ($ dNSV1ZoneDestroyRequest , JsonEncoder::FORMAT ),
6970 );
@@ -82,15 +83,16 @@ public function deleteDNSRecordsV1(string $domain, \Hostinger\Model\DNSV1ZoneDes
8283 /**
8384 * @return \Hostinger\Model\DNSV1ZoneRecordResource[]
8485 *
85- * @throws ExceptionInterface
8686 * @throws ApiException
8787 * @throws GuzzleException
8888 */
8989 public function getDNSRecordsV1 (string $ domain )
9090 {
9191 $ request = new Request (
9292 method: 'GET ' ,
93- uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain} ' , $ domain ),
93+ uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain} ' , [
94+ 'domain ' => $ domain
95+ ]),
9496 headers: $ this ->getHeaders (),
9597 );
9698
@@ -108,15 +110,16 @@ public function getDNSRecordsV1(string $domain)
108110 /**
109111 * @return \Hostinger\Model\CommonSuccessEmptyResource
110112 *
111- * @throws ExceptionInterface
112113 * @throws ApiException
113114 * @throws GuzzleException
114115 */
115116 public function resetDNSRecordsV1 (string $ domain , \Hostinger \Model \DNSV1ZoneResetRequest $ dNSV1ZoneResetRequest )
116117 {
117118 $ request = new Request (
118- method: 'GET ' ,
119- uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain}/reset ' , $ domain ),
119+ method: 'POST ' ,
120+ uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain}/reset ' , [
121+ 'domain ' => $ domain
122+ ]),
120123 headers: $ this ->getHeaders (),
121124 body: $ this ->serializer ->serialize ($ dNSV1ZoneResetRequest , JsonEncoder::FORMAT ),
122125 );
@@ -135,15 +138,16 @@ public function resetDNSRecordsV1(string $domain, \Hostinger\Model\DNSV1ZoneRese
135138 /**
136139 * @return \Hostinger\Model\CommonSuccessEmptyResource
137140 *
138- * @throws ExceptionInterface
139141 * @throws ApiException
140142 * @throws GuzzleException
141143 */
142144 public function updateDNSRecordsV1 (string $ domain , \Hostinger \Model \DNSV1ZoneUpdateRequest $ dNSV1ZoneUpdateRequest )
143145 {
144146 $ request = new Request (
145- method: 'GET ' ,
146- uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain} ' , $ domain ),
147+ method: 'PUT ' ,
148+ uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain} ' , [
149+ 'domain ' => $ domain
150+ ]),
147151 headers: $ this ->getHeaders (),
148152 body: $ this ->serializer ->serialize ($ dNSV1ZoneUpdateRequest , JsonEncoder::FORMAT ),
149153 );
@@ -162,15 +166,16 @@ public function updateDNSRecordsV1(string $domain, \Hostinger\Model\DNSV1ZoneUpd
162166 /**
163167 * @return \Hostinger\Model\CommonSuccessEmptyResource
164168 *
165- * @throws ExceptionInterface
166169 * @throws ApiException
167170 * @throws GuzzleException
168171 */
169172 public function validateDNSRecordsV1 (string $ domain , \Hostinger \Model \DNSV1ZoneUpdateRequest $ dNSV1ZoneUpdateRequest )
170173 {
171174 $ request = new Request (
172- method: 'GET ' ,
173- uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain}/validate ' , $ domain ),
175+ method: 'POST ' ,
176+ uri: $ this ->buildResourcePath ('/api/dns/v1/zones/{domain}/validate ' , [
177+ 'domain ' => $ domain
178+ ]),
174179 headers: $ this ->getHeaders (),
175180 body: $ this ->serializer ->serialize ($ dNSV1ZoneUpdateRequest , JsonEncoder::FORMAT ),
176181 );
@@ -186,7 +191,10 @@ public function validateDNSRecordsV1(string $domain, \Hostinger\Model\DNSV1ZoneU
186191 return $ this ->serializer ->deserialize ($ response ->getBody ()->getContents (), '\Hostinger\Model\CommonSuccessEmptyResource ' , JsonEncoder::FORMAT );
187192 }
188193
189- private function buildResourcePath (string $ path , mixed ...$ values ): string
194+ /**
195+ * @param array<string, mixed> $values
196+ */
197+ private function buildResourcePath (string $ path , array $ values ): string
190198 {
191199 foreach ($ values as $ key => $ value ) {
192200 if (is_array ($ value )) {
0 commit comments