Create invoice method (#89)
Co-authored-by: seregakasyanow <serega.kasyanow@yandex.ru>
This commit is contained in:
parent
5d0e20581c
commit
e68a23885e
@ -27,6 +27,30 @@ namespace RetailCrm\Methods\V5;
|
||||
*/
|
||||
trait IntegrationPayments
|
||||
{
|
||||
/**
|
||||
* Create Invoice
|
||||
*
|
||||
* @param array $createInvoice
|
||||
* @return \RetailCrm\Response\ApiResponse
|
||||
*/
|
||||
public function paymentCreateInvoice($createInvoice)
|
||||
{
|
||||
if (!count($createInvoice)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Parameters `createInvoice` must contains a data'
|
||||
);
|
||||
}
|
||||
|
||||
/* @noinspection PhpUndefinedMethodInspection */
|
||||
return $this->client->makeRequest(
|
||||
'/payment/create-invoice',
|
||||
'POST',
|
||||
[
|
||||
'createInvoice' => json_encode($createInvoice)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Invoice
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user