You've already forked wc-licensed-product-client
23 lines
414 B
PHP
23 lines
414 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace Magdev\WcLicensedProductClient\Dto;
|
||
|
|
|
||
|
|
final readonly class ActivationResult
|
||
|
|
{
|
||
|
|
public function __construct(
|
||
|
|
public bool $success,
|
||
|
|
public string $message,
|
||
|
|
) {
|
||
|
|
}
|
||
|
|
|
||
|
|
public static function fromArray(array $data): self
|
||
|
|
{
|
||
|
|
return new self(
|
||
|
|
success: $data['success'],
|
||
|
|
message: $data['message'],
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|