From e026c376fccc6e343e0dd52c109b7a415116881c Mon Sep 17 00:00:00 2001 From: bHosted <50988060+mvdgeijn@users.noreply.github.com> Date: Fri, 24 May 2024 11:01:08 +0200 Subject: [PATCH] Update Response.php Parse the ReactivateDomains response --- src/Factories/Response.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Factories/Response.php b/src/Factories/Response.php index 4349ac4..65aa667 100644 --- a/src/Factories/Response.php +++ b/src/Factories/Response.php @@ -20,6 +20,16 @@ public static function parse( $result ): array if( strcmp( \Str::substr($key, 0, 4 ), "Name" ) == 0 ) { $data[$value->SLD . "." . $value->TLD] = (int)$value->AvailabilityCode; } + + if( strcmp( \Str::substr($key, 0, 6 ), "Domain") == 0 ) { + list($symbol, $fee) = explode(' ', (string)$value->Fee); + $data[$value->SLD . "." . $value->TLD] = [ + 'domain' => (string)$value->SLD . "." . (string)$value->TLD, + 'reactivatableUntil' => \Carbon::createFromFormat( 'd/m/Y H:i:s', (string)$value->ReactivatableUntil . ' 00:00:00'), + 'fee' => \Str::replace(',', '.', $fee ), + 'currency' => $symbol + ]; + } } return $data;