Download the PHP package gam/estafeta-command without Composer
On this page you can find all versions of the php package gam/estafeta-command. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package estafeta-command
Comando Estafeta
PHP library to run 'estafeta interactive command' web portal operations programmatically.
Sponsors
Features
- Get Estafeta Account information programmatically:
- Available services
- Available content types
- Find Locations by Postal code.
- Find Suburbs (Colonia) by name.
- Create Labels (Guias).
Installation
composer require gam/estafeta-command
Usage
This is a simple example:
Model Validation & Cleaner
The package has built-in validation according to official web portal rules. The following models are validated in the constructor because their attributes cannot be modified after object construction.
- Address
- Contact
- ContactPhone
- Dimension
- LabelReference
- Package
- Reference
- Rfc
The following models have buil-in cleaner (data sanitization) to remove not allowed characters:
Address
firstStreet
: Diferent characters of[a-z ÁÉÍÓÚáéíóú\d.,;:#*^\/]
are removed.streetAddress
: Diferent characters of[^a-zÁÉÍÓÚáéíóú \d_]
are removed.apartmentNumber
: Diferent characters of[a-z ÁÉÍÓÚáéíóú\d.,;:#*^\/]
are removed.secondStreet
: Diferent characters of[^a-zÁÉÍÓÚáéíóú \d_]
are removed.
Contact
shortName
: Diferent characters of[a-z ÁÉÍÓÚáéíóú\d.,;:#*^\/]
are removed.contactName
: Diferent characters of[a-z ÁÉÍÓÚáéíóú\d.,;:#*^\/]
are removed.
LabelReference
contentDescription
: Diferent characters of[^a-zÁÉÍÓÚáéíóú \d_]
are removed.reference
: Diferent characters of[a-z ÁÉÍÓÚáéíóú\d.,;:#*^\/]
are removed.description
: Diferent characters of[a-zÁÉÍÓÚáéíóú \d_]
are removed.
Package
additionalInfo
: Diferent characters of[a-z ÁÉÍÓÚáéíóú\d.,;:#*^\/]
are removed.costCenter
: Diferent characters of[a-zÁÉÍÓÚáéíóú \d_]
are removed.
Reference
betweenStreet
: Diferent characters of[a-zÁÉÍÓÚáéíóú \d_]
are removed.andStreet
: Diferent characters of[a-zÁÉÍÓÚáéíóú \d_]
are removed.shed
: Diferent characters of[a-zÁÉÍÓÚáéíóú \d_]
are removed.platform
: Diferent characters of[a-zÁÉÍÓÚáéíóú \d_]
are removed.references
: Diferent characters of[a-zÁÉÍÓÚáéíóú \d_]
are removed.
If you want to disable this sanitization on some models, please set:
Also you could add your own sanitization methods:
See CleanerTest
for more examples.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
The Apache License. Please see License File for more information.
Credits
Todo
- Setup a CD workflow: I need a secret file to run the tests
- Validate models: Validate Model properties according to Estafeta Web App Rules.
- Improve docs: Maybe ReadTheDocs, using markdown, etc...
All versions of estafeta-command with dependencies
ext-json Version *
myclabs/php-enum Version ^1.8
nette/schema Version ^1.2
symfony/browser-kit Version ^6.0
symfony/http-client Version ^6.0
symfony/mime Version ^6.0