How to get all licenses for a WooCommerce order

Use the following code to get all licenses assigned to specific WooCommerce order:

use \IdeoLogix\DigitalLicenseManager\Database\Repositories\Licenses;

$licenses = Licenses::instance()->get(['order_id' => 358]);
foreach($licenses as $license) {
	echo $license->getId() . "\n";
	echo $license->getDecryptedLicenseKey() . "\n";
        echo $license->isExpired() . "\n";
}