1
0
mirror of synced 2024-11-25 06:46:07 +03:00

Create invoice method (#89)

Co-authored-by: seregakasyanow <serega.kasyanow@yandex.ru>
This commit is contained in:
serega-kasyanow 2020-09-11 17:23:24 +04:00 committed by GitHub
parent 5d0e20581c
commit e68a23885e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,30 @@ namespace RetailCrm\Methods\V5;
*/ */
trait IntegrationPayments 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 * Update Invoice
* *