-
Notifications
You must be signed in to change notification settings - Fork 1
/
CreateResult.php
65 lines (57 loc) · 1.8 KB
/
CreateResult.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
54
55
56
57
58
59
60
61
62
63
64
65
<?php
declare(strict_types=1);
namespace Upmind\ProvisionProviders\SoftwareLicenses\Data;
use Upmind\ProvisionBase\Provider\DataSet\ResultData;
use Upmind\ProvisionBase\Provider\DataSet\Rules;
/**
* @property-read string $license_key License key
* @property-read string|null $service_identifier Secondary service identifier, if any
* @property-read string|null $package_identifier Service package identifier, if any
* @property-read string|int|null $customer_identifier Service customer identifier, if any
*/
class CreateResult extends ResultData
{
public static function rules(): Rules
{
return new Rules([
'license_key' => ['required', 'string'],
'service_identifier' => ['nullable', 'string'],
'package_identifier' => ['nullable', 'string'],
'customer_identifier' => ['nullable'],
]);
}
/**
* Set the result license_key.
*/
public function setLicenseKey(string $licenseKey): self
{
$this->setValue('license_key', $licenseKey);
return $this;
}
/**
* Set the result secondary service identifier.
*/
public function setServiceIdentifier(?string $serviceIdentifier): self
{
$this->setValue('service_identifier', $serviceIdentifier);
return $this;
}
/**
* Set the result package identifier.
*/
public function setPackageIdentifier(?string $packageIdentifier): self
{
$this->setValue('package_identifier', $packageIdentifier);
return $this;
}
/**
* Set the result package identifier.
*
* @param string|int|null $customerIdentifier
*/
public function setCustomerIdentifier($customerIdentifier): self
{
$this->setValue('customer_identifier', $customerIdentifier);
return $this;
}
}