Download the PHP package sarissaops/enviatodo-php without Composer

On this page you can find all versions of the php package sarissaops/enviatodo-php. 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 enviatodo-php

Enviatodo PHP SDK

A clean, framework-agnostic PSR-18 HTTP client wrapper around the Enviatodo Shipping API (V2) — quotes, orders, labels, pickups, addresses, packages, carriers and catalogs for shipping inside Mexico.

Latest Version

The SDK is not coupled to any specific HTTP library. Bring your own PSR-18 client (e.g. symfony/http-client, guzzlehttp/guzzle) and PSR-7/PSR-17 implementation (e.g. nyholm/psr7); auto-discovery configures them for you.


Table of Contents


Requirements


Installation


Quick Start

Every request carries Authorization: Bearer <token> plus x-api-key: enviatodo and x-enviatodo-app: custom automatically. Prefer a custom PSR-18 client or factories? Inject them:


Balance

Check the account balance:


Postal Codes

Look up a postal code:


Usage

One method per API operation across 10 domains — address(), package(), parcel(), quote(), order(), guide(), pickup(), catalog() (plus balance() and zipCode() above). Full per-resource recipes live in doc/errors.md.


Response Handling

All API methods return typed model objects with IDE-friendly getters by default. The Enviatodo envelope ({success, message, data, error, code}) is unwrapped for you — and error: true raises even on HTTP 200, since this API can fail inside a 200 response:

Array responses

Prefer raw arrays? Inject ArrayHydrator:

Raw PSR-7 response

Need the raw response? Use NoopHydrator — note: no exceptions are thrown on error responses when using this hydrator.


Debugging

Point the client at a request bin and dump traffic with the raw hydrator:


Framework Integration

The package is framework-free by design: it only needs any PSR-18 client. It stays portable across Symfony, Laravel, WooCommerce and plain CLI scripts.

Backend Install
Symfony HttpClient composer require symfony/http-client
Guzzle composer require php-http/guzzle7-adapter guzzlehttp/guzzle
PSR-7/PSR-17 factory composer require nyholm/psr7

Symfony bundle live in follow-up package sarissaops/enviatodo-bundle.


Contributing

TDD is mandatory: Red → Green → Refactor. Every endpoint ships as Api\*Api + Model/ value object + facade method + tests/Api + tests/Model.

Sandbox runs need a token without hardcoding one: copy .env.example to .env and set ENVIATODO_TOKEN (see doc/testing.md). Integration tests read it from the environment and are skipped without it; mutating tests live behind --group=mutating and never run by default.


All versions of enviatodo-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
php-http/client-common Version ^2.2.1
php-http/discovery Version ^1.19
psr/http-client Version ^1.0
psr/http-message Version ^1.0 || ^2.0
webmozart/assert Version ^1.9.1 || ^2.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 sarissaops/enviatodo-php contains the following files

Loading the files please wait ...