Skip to content

Commit dfd61e3

Browse files
committed
first attempt of try to cover all endpoind in separate classes
1 parent 0372046 commit dfd61e3

File tree

4 files changed

+117
-105
lines changed

4 files changed

+117
-105
lines changed

debian/changelog

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
php-spojenet-subreg (1.2.1) UNRELEASED; urgency=medium
1+
php-spojenet-subreg (1.3.0) UNRELEASED; urgency=medium
2+
3+
* try to cover all endpoind in separate classes
4+
5+
-- vitex <[email protected]> Thu, 30 Jan 2025 13:54:59 +0100
6+
7+
php-spojenet-subreg (1.2.1) unstable; urgency=medium
28

39
* update
410

5-
-- vitex <[email protected]> Fri, 10 Jan 2025 12:21:46 +0100
11+
-- vitex <[email protected]> Thu, 30 Jan 2025 13:54:27 +0100
612

713
php-spojenet-subreg (1.2.0) unstable; urgency=medium
814

src/Subreg/Client.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,4 @@ public function makeOrder(string $domain, string $type, array $data = [])
404404
{
405405
return $this->call('Make_Order', ['domain' => $domain, 'type' => $type, 'params' => $data]);
406406
}
407-
408-
409-
410407
}

src/Subreg/Commands.php

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
<?php
22

3+
declare(strict_types=1);
4+
5+
/**
6+
* This file is part of the PHPSubreg package
7+
*
8+
* https://github.com/Spoje-NET/php-subreg
9+
*
10+
* (c) Vítězslav Dvořák <http://spojenet.cz/>
11+
*
12+
* For the full copyright and license information, please view the LICENSE
13+
* file that was distributed with this source code.
14+
*/
15+
316
namespace Subreg;
417

518
class Commands extends Client
@@ -134,9 +147,14 @@ public function Credit_Correction($params)
134147
return $this->call('Credit_Correction', $params);
135148
}
136149

137-
public function Pricelist($params)
150+
/**
151+
* Get Pricelist from your account.
152+
*
153+
* @see https://subreg.cz/manual/?cmd=Pricelist Command: Pricelist
154+
*/
155+
public function pricelist(): array
138156
{
139-
return $this->call('Pricelist', $params);
157+
return $this->call('Pricelist');
140158
}
141159

142160
public function Special_Pricelist($params)
@@ -179,9 +197,32 @@ public function List_Documents($params)
179197
return $this->call('List_Documents', $params);
180198
}
181199

182-
public function Users_List($params)
183-
{
184-
return $this->call('Users_List', $params);
200+
/**
201+
* Summary of Users_List.
202+
*
203+
* @return array Users list
204+
*
205+
* Result fields:
206+
* - int id Unique identification number of this user
207+
* - string username Login name of the user
208+
* - string name Real name of the user
209+
* - string credit Amount of credit available
210+
* - string currency Currency of the credit
211+
* - string billing_name Billing org/person name
212+
* - string billing_street Billing address
213+
* - string billing_city Billing city
214+
* - string billing_pc Billing postal code
215+
* - string billing_country Billing country code
216+
* - string company_id Company identification number
217+
* - string company_vat Value added tax number
218+
* - string email Contact email
219+
* - string phone Contact phone number
220+
* - string last_login Time of last successful login
221+
* - int domains_count Count of domains
222+
*/
223+
public function Users_List(): array
224+
{
225+
return $this->call('Users_List');
185226
}
186227

187228
public function Info_User($params)
@@ -278,4 +319,4 @@ public function OIB_Search($params)
278319
{
279320
return $this->call('OIB_Search', $params);
280321
}
281-
}
322+
}

0 commit comments

Comments
 (0)