Basic DHL implementation, Refactor redundant code
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Xentral\Carrier\Dhl\Data;
|
||||
|
||||
class Country
|
||||
{
|
||||
public ?string $country;
|
||||
public string $countryISOCode;
|
||||
public ?string $state;
|
||||
|
||||
public static function Create(string $isoCode, ?string $state = null):Country {
|
||||
$obj = new Country();
|
||||
$obj->countryISOCode = $isoCode;
|
||||
$obj->state = $state;
|
||||
return $obj;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user