Added Supplier Domain importing - using dreamscape API

This commit is contained in:
Deon George
2022-08-10 15:18:56 +10:00
parent 53c665787e
commit e4c1305da5
8 changed files with 268 additions and 45 deletions

View File

@@ -165,6 +165,16 @@ class Supplier extends Model
return $this->api_class() && (collect(['api_key','api_secret'])->diff($this->detail->connections->keys())->count() === 0);
}
/**
* If this supplier has a domain registrar, return it.
*
* @return DomainRegistrar|null
*/
public function registrar(): ?DomainRegistrar
{
return ($x=config('services.supplier.'.strtolower($this->name).'.registrar')) ? DomainRegistrar::where('name',$x)->single() : NULL;
}
/**
* Return the traffic records, that were not matched to a service.
*