parsedBody->toArray(); $geoRule = GeoRoutingRule::create( linkId: SmartLinkId::fromString($linkId), countryCode: CountryCode::fromString($data['country_code']), destinationId: $data['destination_id'], priority: $data['priority'] ?? 0 ); $this->geoRoutingRuleRepository->save($geoRule); return new JsonResult([ 'id' => $geoRule->id->toString(), 'link_id' => $geoRule->linkId->toString(), 'country_code' => $geoRule->countryCode->toString(), 'destination_id' => $geoRule->destinationId, 'priority' => $geoRule->priority, 'created_at' => $geoRule->createdAt->format('Y-m-d H:i:s'), ], Status::CREATED); } }