Skip to content

Commit 577155a

Browse files
committed
Fix importInvoice
1 parent 96fe007 commit 577155a

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
/**
4+
* PHP version 7.3
5+
*
6+
* @category ApiImportInvoicePaymentRefund
7+
* @package RetailCrm\Api\Model\Entity\Payments
8+
*/
9+
10+
namespace RetailCrm\Api\Model\Entity\Payments;
11+
12+
use RetailCrm\Api\Component\Serializer\Annotation as JMS;
13+
14+
/**
15+
* Class ApiImportInvoicePaymentRefund
16+
*
17+
* @category ApiImportInvoicePaymentRefund
18+
* @package RetailCrm\Api\Model\Entity\Payments
19+
*/
20+
class ApiImportInvoicePaymentRefund extends PaymentRefund
21+
{
22+
/**
23+
* @var string
24+
*
25+
* @JMS\Type("string")
26+
* @JMS\SerializedName("status")
27+
*/
28+
public $status;
29+
30+
/**
31+
* @var string
32+
*
33+
* @JMS\Type("string")
34+
* @JMS\SerializedName("comment")
35+
*/
36+
public $comment;
37+
38+
/**
39+
* @var float
40+
*
41+
* @JMS\Type("float")
42+
* @JMS\SerializedName("amount")
43+
*/
44+
public $amount;
45+
}

src/Model/Entity/Payments/ApiImportInvoiceRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ class ApiImportInvoiceRequest
8484
public $discountAmount;
8585

8686
/**
87-
* @var \RetailCrm\Api\Model\Entity\Payments\ModuleRefund[]
87+
* @var \RetailCrm\Api\Model\Entity\Payments\ApiImportInvoicePaymentRefund[]
8888
*
89-
* @JMS\Type("array<RetailCrm\Api\Model\Entity\Payments\ModuleRefund>")
89+
* @JMS\Type("array<RetailCrm\Api\Model\Entity\Payments\ApiImportInvoicePaymentRefund>")
9090
* @JMS\SerializedName("refunds")
9191
*/
9292
public $refunds;

src/ResourceGroup/Payments.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ public function getInvoice(string $invoiceUuid): PaymentGetInvoiceResponse
282282
* $invoice->currency = 'RUB';
283283
* $invoice->createdAt = '2025-07-08 00:00:00';
284284
* $invoice->paidAt = '2025-07-08 00:10:00';
285+
* $invoice->refundable = true;
285286
*
286287
* $request->invoice = $invoice;
287288
*

0 commit comments

Comments
 (0)