2017 © Pedro Peláez
 

library grastin-api-php

integration grastin api

image

depakespedro/grastin-api-php

integration grastin api

  • Tuesday, June 27, 2017
  • by depakespedro
  • Repository
  • 2 Watchers
  • 1 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 9 % Grown

The README.md

grastin-api-php

Неофициальный PHP-клиент для API службы доставки Грастин, (*1)

Установка

Добавить в composer.json, (*2)

  "repositories": {
    "depakespedro/grastin-api-php": {
      "type": "vcs",
      "url": "https://github.com/depakespedro/grastin-api-php.git"
    }
  }

Установить пакет:, (*3)

    composer require depakespedro/grastin-api-php

Использование

Добавить заказ

    $product = new ProductGrastin();
    $product->set_amount('100')
        ->set_article('123')
        ->set_cost('100')
        ->set_name('213');

    $product2 = new ProductGrastin();
    $product2->set_amount('322')
        ->set_article('434')
        ->set_cost('100')
        ->set_name('432');

    $og = new OrderGrastin($isTest = true);
    $og->set_number('Ваш уникальный номер заказа')
        ->set_address('Адрес получателя')
        ->set_comment('Комментарий курьеру')
        ->set_shippingtimefrom('13:00')
        ->set_shippingtimefor('15:00')
        ->set_shippingdate('01022017') // DDMMYYYY
        ->set_buyer('ФИО получателя')
        ->set_summa('100') // Сумма заказ
        ->set_assessedsumma('100') // Оценочная стоимость
        ->set_phone1('89177755684')
        ->set_service('6') // Код услуги, см. `\Depakespedro\Grastin\Enum\ServiceType`
        ->set_takewarehouse('Москва') // Город отгрузки
        ->set_goods([$product,$product2]);

    $grastin = new Grastin('API key');
    $data_responce = $grastin->newordercourier([$og]);

The Versions

27/06 2017

dev-master

9999999-dev

integration grastin api

  Sources   Download

MIT

by Petrov Dmitry

27/06 2017

1.1.1

1.1.1.0

integration grastin api

  Sources   Download

MIT

by Petrov Dmitry

19/06 2017

1.1.0

1.1.0.0

integration grastin api

  Sources   Download

MIT

by Petrov Dmitry

30/01 2017

1.0.1

1.0.1.0

integration grastin api

  Sources   Download

MIT

by Petrov Dmitry

21/12 2016

1.0.0

1.0.0.0

integration grastin api

  Sources   Download

MIT

by Petrov Dmitry