Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
CdekClient: ID and password made optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Sep 26, 2018
1 parent 64b339e commit 68234c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ require_once 'vendor/autoload.php';

$client = new \CdekSDK\CdekClient('account', 'password');
```
Реквизиты доступа следует [запросить у СДЭК](https://www.cdek.ru/clients/integrator.html). Обычные логин и пароль не подходят.
Реквизиты доступа следует [запросить у СДЭК](https://www.cdek.ru/clients/integrator.html). Обычные логин и пароль не подходят. Если авторизация не нужна, логин и пароль можно указать пустые или пропустить вовсе.

Далее для всей работы с API используются методы объёкта `$client`, который мы получили выше.

Expand Down
2 changes: 1 addition & 1 deletion src/CdekClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ final class CdekClient implements Contracts\Client
/** @var SerializerInterface */
private $serializer;

public function __construct(string $account, string $password, ClientInterface $http = null)
public function __construct(string $account = '', string $password = '', ClientInterface $http = null)
{
$this->account = $account;
$this->password = $password;
Expand Down

0 comments on commit 68234c0

Please sign in to comment.