Download the PHP package ometra/heimdal-sdk without Composer

On this page you can find all versions of the php package ometra/heimdal-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package heimdal-sdk

Heimdal SDK Para Laravel

SDK Composer/Laravel para consumir Heimdal /api/v2 desde otros modulos HELA. El paquete encapsula autenticacion bearer, X-Correlation-ID, envelopes normalizados, excepciones tipadas y clientes por dominio.

Instalacion

Laravel descubre automaticamente el service provider y el facade.

Configuracion

Publica el archivo de configuracion:

Variables disponibles:

HEIMDAL_SDK_BASE_URL debe apuntar al host de Heimdal sin /api. El SDK agrega /api/v2 automaticamente.

Dos Niveles De Uso

El SDK expone dos superficies:

Uso Rapido Con Contratos

Uso Raw

Tambien se puede resolver desde el contenedor:

Correlation ID

El SDK genera X-Correlation-ID automaticamente. Para usar uno propio:

Para usar un token distinto en una llamada:

Data Objects

Los payloads criticos tienen objetos tipados:

Cambio de SIM:

Contratos Estables

Los contratos normalizan respuestas comunes de Altan sin perder el payload original en raw.

DTOs principales:

Batch Con Records

Batch Con CSV

Tambien acepta resource y Illuminate\Http\UploadedFile.

Monitoreo

Manejo De Errores

Por default, el SDK lanza excepciones tipadas cuando Heimdal responde success=false o HTTP no exitoso:

Excepciones disponibles:

Para desactivar throws en una cadena:

Clientes Disponibles

Cliente Raw

Para endpoints v2 que aun no tengan helper:

El cliente raw sigue usando /api/v2, bearer token, correlation id, normalizacion y excepciones.

Migrating Auster

No es necesario cambiar Auster en la primera adopcion. El mapeo recomendado para reemplazar gradualmente App\Domain\Vendor\Ometra\Hela\HeimdalAdapter es:

HeimdalAdapter actual Contrato SDK recomendado
getProfile() HeimdalSdk::contracts()->subscribers()->profile($msisdn)
topup($offerId) HeimdalSdk::contracts()->products()->topup($msisdn, $offerId)
changeSimCard($iccid) HeimdalSdk::contracts()->subscribers()->changeSim($msisdn, ChangeSimData::fromFullIccid($iccid))
requestNewMsisdn($zone) HeimdalSdk::contracts()->subscribers()->changeMsisdn($msisdn, new ChangeMsisdnData($zone, '1'))
checkImei($imei) HeimdalSdk::contracts()->imeis()->compatibility($imei)
search($type, $value) HeimdalSdk::contracts()->view360()->search($type, $value)
simHistory(...) HeimdalSdk::contracts()->history()->sim($msisdn, new DateRangeQuery(...))
operationHistory(...) HeimdalSdk::contracts()->history()->operation($msisdn, new DateRangeQuery(...))

La excepcion HeimdalSubscriberNotFoundException reemplaza el parseo manual de errorCode=1211000305 y mensajes The subscriber does not exist.

Pruebas


All versions of heimdal-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ometra/heimdal-sdk contains the following files

Loading the files please wait ...