-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCreateParams.php
53 lines (49 loc) · 2.51 KB
/
CreateParams.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
declare(strict_types=1);
namespace Upmind\ProvisionProviders\SharedHosting\Data;
use Upmind\ProvisionBase\Provider\DataSet\DataSet;
use Upmind\ProvisionBase\Provider\DataSet\Rules;
/**
* Data for creating a new hosting account.
*
* @property-read string|integer|null $customer_id ID of the customer on the hosting platform
* @property-read string|null $username Username for the new account
* @property-read string|null $owner_username Username of the reseller "owner" of the new account
* @property-read boolean|null $owns_itself Account should own itself (overrides $owner_username)
* @property-read string $email Email address of the new account holder
* @property-read string|null $customer_name Name of the customer
* @property-read string|null $customer_reference Billing system reference/ID for the customer
* @property-read string|null $customer_phone Phone number of the customer in international format
* @property-read CustomerAddressParams|null $customer_address Address of the customer
* @property-read string|null $password Password for the new account
* @property-read string|null $domain Main domain name of the new account
* @property-read string $package_name Name/identifier of the package/tier/quota for the new account
* @property-read boolean|null $as_reseller Whether or not the new account should have reseller privileges
* @property-read ResellerOptionParams|null $reseller_options Additional options for resellers
* @property-read string|null $custom_ip Custom IP address for the new account
* @property-read string|null $location Location of the account
*/
class CreateParams extends DataSet
{
public static function rules(): Rules
{
return new Rules([
'customer_id' => ['nullable'],
'username' => ['nullable', 'string'],
'owner_username' => ['string'],
'owns_itself' => ['bool'],
'email' => ['required', 'email'],
'customer_name' => ['nullable', 'string'],
'customer_reference' => ['nullable', 'string'],
'customer_phone' => ['nullable', 'string', 'international_phone'],
'customer_address' => ['nullable', CustomerAddressParams::class],
'password' => ['string'],
'domain' => ['nullable', 'domain_name'],
'package_name' => ['required', 'string'],
'as_reseller' => ['boolean'],
'reseller_options' => [ResellerOptionParams::class],
'custom_ip' => ['ip'],
'location' => ['nullable', 'string']
]);
}
}