dmitriy12345work/spsr-shipment

API for SPSR-EXPRESS shipping

v0.1.9 2017-06-22 00:44 UTC

This package is not auto-updated.

Last update: 2024-06-09 00:52:02 UTC


README

This project aims to provide a PHP wrapper for SPSR API.

Installation

The preferred way to install is through composer.

Either run

composer require "stp/spsr-shipment *"

or add

{
    "require": {
        "stp/spsr-shipment": "*"
    }
}

to the require section of your composer.json.

Usage

Constructing the Client

use stp\spsr\SpsrApi;

$api = new SpsrApi($login, $password, $icn);

Create request

Every API method has the same variable name as in official documentation.

use stp\spsr\message\GetCitiesMessage,
    stp\spsr\response\City;

$msg = new GetCitiesMessage();
$msg->CityName = 'Москва';

/** @var City[] $cities */
$cities = $api->request($msg);

For more information, see USAGE.md

Implemented API Methods

Pull requests are very welcome!

Documentation russian: SPSR.WebApi.IntegrationDocs.v.1.3.38.zip Documentation english: SPSR.WebApi.IntegrationDocs.v.1.3.38Eng.zip