From 7551ef91a7c64aa2c14201bb896b95e1529c5aaa Mon Sep 17 00:00:00 2001 From: Michael Woodward Date: Wed, 7 Feb 2024 12:30:24 +0000 Subject: [PATCH] fix!: Transaction include to use core Adjustment --- src/Entities/Transaction.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Entities/Transaction.php b/src/Entities/Transaction.php index 9a34c71..a9741a0 100644 --- a/src/Entities/Transaction.php +++ b/src/Entities/Transaction.php @@ -20,7 +20,6 @@ use Paddle\SDK\Entities\Shared\TransactionOrigin; use Paddle\SDK\Entities\Shared\TransactionPaymentAttempt; use Paddle\SDK\Entities\Shared\TransactionStatus; -use Paddle\SDK\Entities\Transaction\TransactionAdjustment; use Paddle\SDK\Entities\Transaction\TransactionAdjustmentsTotals; use Paddle\SDK\Entities\Transaction\TransactionDetails; use Paddle\SDK\Entities\Transaction\TransactionItem; @@ -33,7 +32,7 @@ class Transaction implements Entity * * @param array $items * @param array $payments - * @param array $adjustments + * @param array $adjustments * @param array $availablePaymentMethods */ protected function __construct( @@ -97,7 +96,7 @@ public static function from(array $data): self billedAt: isset($data['billed_at']) ? DateTime::from($data['billed_at']) : null, receiptData: $data['receipt_data'] ?? null, address: isset($data['address']) ? Address::from($data['address']) : null, - adjustments: array_map(fn (array $adjustment): TransactionAdjustment => TransactionAdjustment::from($adjustment), $data['adjustments'] ?? []), + adjustments: array_map(fn (array $adjustment): Adjustment => Adjustment::from($adjustment), $data['adjustments'] ?? []), adjustmentsTotals: isset($data['adjustments_totals']) ? TransactionAdjustmentsTotals::from($data['adjustments_totals']) : null, business: isset($data['business']) ? Business::from($data['business']) : null, customer: isset($data['customer']) ? Customer::from($data['customer']) : null,