Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/V4/DomainsController.php
Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | public function show($id) | ||||
$response['mx'] = self::getMXConfig($domain->namespace); | $response['mx'] = self::getMXConfig($domain->namespace); | ||||
// Domain configuration, e.g. spf whitelist | // Domain configuration, e.g. spf whitelist | ||||
$response['config'] = $domain->getConfig(); | $response['config'] = $domain->getConfig(); | ||||
// Status info | // Status info | ||||
$response['statusInfo'] = self::statusInfo($domain); | $response['statusInfo'] = self::statusInfo($domain); | ||||
// Entitlements info | // Entitlements/Wallet info | ||||
$response['skus'] = \App\Entitlement::objectEntitlementsSummary($domain); | SkusController::objectEntitlements($domain, $response); | ||||
// Some basic information about the domain wallet | |||||
$wallet = $domain->wallet(); | |||||
$response['wallet'] = $wallet->toArray(); | |||||
if ($wallet->discount) { | |||||
$response['wallet']['discount'] = $wallet->discount->discount; | |||||
$response['wallet']['discount_description'] = $wallet->discount->description; | |||||
} | |||||
return response()->json($response); | return response()->json($response); | ||||
} | } | ||||
/** | /** | ||||
* Provide DNS MX information to configure specified domain for | * Provide DNS MX information to configure specified domain for | ||||
*/ | */ | ||||
protected static function getMXConfig(string $namespace): array | protected static function getMXConfig(string $namespace): array | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |