Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit b942a06

Browse files
author
Jens Schulze
committed
fix(Payment): correct type for PaymentInfo model
1 parent 2a3d6d9 commit b942a06

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

src/Model/Payment/Payment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
* @method Payment setCustom(CustomFieldObject $custom = null)
4545
* @method PaymentStatus getPaymentStatus()
4646
* @method Payment setPaymentStatus(PaymentStatus $paymentStatus = null)
47-
* @method getTransactions()
48-
* @method Payment setTransactions($transactions = null)
47+
* @method TransactionCollection getTransactions()
48+
* @method Payment setTransactions(TransactionCollection $transactions = null)
4949
* @method CustomFieldObjectCollection getInterfaceInteractions()
5050
* @method Payment setInterfaceInteractions(CustomFieldObjectCollection $interfaceInteractions = null)
5151
*/

src/Model/Payment/PaymentInfo.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
/**
1111
* @package Commercetools\Core\Model\Payment
1212
*
13-
* @method PaymentCollection getPayments()
14-
* @method PaymentInfo setPayments(PaymentCollection $payments = null)
13+
* @method PaymentReferenceCollection getPayments()
14+
* @method PaymentInfo setPayments(PaymentReferenceCollection $payments = null)
1515
*/
1616
class PaymentInfo extends JsonObject
1717
{
1818
public function fieldDefinitions()
1919
{
2020
return [
21-
'payments' => [static::TYPE => '\Commercetools\Core\Model\Payment\PaymentCollection'],
21+
'payments' => [static::TYPE => '\Commercetools\Core\Model\Payment\PaymentReferenceCollection'],
2222
];
2323
}
2424
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
/**
3+
* @author @ct-jensschulze <[email protected]>
4+
*/
5+
6+
namespace Commercetools\Core\Model\Payment;
7+
8+
use Commercetools\Core\Model\Common\Collection;
9+
10+
/**
11+
* @package Commercetools\Core\Model\Payment
12+
*
13+
* @method PaymentReferenceCollection add(PaymentReference $element)
14+
* @method PaymentReference current()
15+
* @method PaymentReference getAt($offset)
16+
*/
17+
class PaymentReferenceCollection extends Collection
18+
{
19+
protected $type = '\Commercetools\Core\Model\Payment\PaymentReference';
20+
}

0 commit comments

Comments
 (0)