Skip to content

Commit

Permalink
Merge pull request #3 from xervin/feature/getMoneyReturnOrder
Browse files Browse the repository at this point in the history
feature/getMoneyReturnOrder получения акта возврата денег
  • Loading branch information
sch-group authored Sep 9, 2020
2 parents aca4fab + c362cfc commit 0094eff
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/PickPoint/PickPointConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -924,4 +924,36 @@ public function getClosestPostamatList(int $postIndex)

return $response['PostamatList'] ?? null;
}

/**
* Команда предназначена для получения акта возврата денег.
* https://pickpoint.ru/sales/api/#_Toc24018654
* @param null $actNumber
* @param null $dateFrom
* @param null $dateEnd
* @return mixed|null
* @throws PickPointMethodCallException
*/
public function getMoneyReturnOrder($actNumber = null, $dateFrom = null, $dateEnd = null)
{
$url = $this->pickPointConf->getHost() . '/getmoneyreturnorder';

$arrayRequest = [
'SessionId' => $this->auth(),
'IKN' => $this->pickPointConf->getIKN(),
'DocumentNumber' => $actNumber,
'DateFrom' => $dateFrom,
'DateEnd' => $dateEnd
];

$request = $this->client->post($url, [
'json' => $arrayRequest,
]);

$response = json_decode($request->getBody()->getContents(), true);

$this->checkMethodException($response, $url);

return $response ?? null;
}
}

0 comments on commit 0094eff

Please sign in to comment.