Skip to content

Commit

Permalink
Correcting serialization errors in Checkout models
Browse files Browse the repository at this point in the history
  • Loading branch information
zaporylie committed Aug 1, 2024
1 parent 38dd0b4 commit 69843b1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
17 changes: 14 additions & 3 deletions src/Model/Checkout/v3/GetCheckoutSessionResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,27 @@ class GetCheckoutSessionResponse
* @Serializer\Type("string")
*/
protected $sessionId;

/**
* @var string
* @var string|null
* @Serializer\Type("string")
*/
protected $merchantSerialNumber;

/**
* @var string
* @Serializer\Type("string")
*/
protected $reference;

/**
* @var string
* @Serializer\Type("string")
*/
protected $sessionState;

/**
* @var string
* @var string|null
* @Serializer\Type("string")
*/
protected $paymentMethod;
Expand All @@ -44,15 +48,22 @@ class GetCheckoutSessionResponse
*/
protected $paymentDetails;


/**
* @var \zaporylie\Vipps\Model\Checkout\v3\UserInfo
* @Serializer\Type("zaporylie\Vipps\Model\Checkout\v3\UserInfo")
*/
protected $userInfo;

/**
* @var \zaporylie\Vipps\Model\Checkout\v3\ShippingDetails
* @Serializer\Type("zaporylie\Vipps\Model\Checkout\v3\ShippingDetails")
*/
protected $shippingDetails;

/**
* @var \zaporylie\Vipps\Model\Checkout\v3\BillingDetails
* @Serializer\Type("zaporylie\Vipps\Model\Checkout\v3\BillingDetails")
*/
protected $billingDetails;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Checkout/v3/OrderBottomLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class OrderBottomLine

/**
* @var \zaporylie\Vipps\Model\Checkout\v3\PaymentSources|null
* @Serializer\Type("array<zaporylie\Vipps\Model\Checkout\v3\PaymentSources>")
* @Serializer\Type("zaporylie\Vipps\Model\Checkout\v3\PaymentSources")
*/
protected $paymentSources;

Expand Down
2 changes: 1 addition & 1 deletion src/Model/Checkout/v3/OrderLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class OrderLine

/**
* @var \zaporylie\Vipps\Model\Checkout\v3\UnitInfo
* @Serializer\Type("array<zaporylie\Vipps\Model\Checkout\v3\UnitInfo>")
* @Serializer\Type("zaporylie\Vipps\Model\Checkout\v3\UnitInfo")
*/
protected $unitInfo;

Expand Down
2 changes: 1 addition & 1 deletion src/Model/Checkout/v3/OtherLogisticsOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class OtherLogisticsOption

/**
* @var \zaporylie\Vipps\Model\Checkout\v3\Amount
* @Serializer\Type("array<zaporylie\Vipps\Model\Checkout\v3\OrderLine>")
* @Serializer\Type("zaporylie\Vipps\Model\Checkout\v3\Amount")
*/
protected $amount;

Expand Down
2 changes: 1 addition & 1 deletion src/Model/Checkout/v3/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Transaction
*
* @return $this
*/
public function setAmount(\zaporylie\Vipps\Model\Checkout\v3\Amount $amount
public function setAmount(Amount $amount
) {
$this->amount = $amount;
return $this;
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Checkout/v3/WalletPaymentDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class WalletPaymentDetails

/**
* @var \zaporylie\Vipps\Model\Checkout\v3\Amount
* @Serializer\Type("array<zaporylie\Vipps\Model\Checkout\v3\OrderLine>")
* @Serializer\Type("zaporylie\Vipps\Model\Checkout\v3\Amount")
*/
protected $amount;

Expand All @@ -21,7 +21,7 @@ class WalletPaymentDetails

/**
* @var \zaporylie\Vipps\Model\Checkout\v3\Aggregate
* @Serializer\Type("array<zaporylie\Vipps\Model\Checkout\v3\Aggregate>")
* @Serializer\Type("zaporylie\Vipps\Model\Checkout\v3\Aggregate")
*/
protected $aggregate;

Expand Down

0 comments on commit 69843b1

Please sign in to comment.