Skip to content

Commit

Permalink
Merge pull request paytrail#97 from paytrail/preparing-for-2.7.3-release
Browse files Browse the repository at this point in the history
Preparing for 2.7.3 release
  • Loading branch information
loueranta-paytrail authored Jul 29, 2024
2 parents a962a22 + a5cb944 commit 7036f74
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.7.3] - 2024-07-29
### Added
- Support the new VAT in Finland

## [2.7.2] - 2024-06-06
### Changed
- Updated validation to support negative item rows
Expand Down
8 changes: 4 additions & 4 deletions src/Interfaces/ItemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ public function setUnits(?int $units): ItemInterface;
/**
* Get the VAT percentage.
*
* @return int
* @return float
*/
public function getVatPercentage(): ?int;
public function getVatPercentage(): ?float;

/**
* Set the VAT percentage.
*
* @param int|null $vatPercentage
* @param float|null $vatPercentage
* @return ItemInterface Return self to enable chaining.
*/
public function setVatPercentage(?int $vatPercentage): ItemInterface;
public function setVatPercentage(?float $vatPercentage): ItemInterface;

/**
* Get the product code.
Expand Down
10 changes: 5 additions & 5 deletions src/Model/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Item implements \JsonSerializable, ItemInterface
/**
* The VAT percentage.
*
* @var integer
* @var float
*/
protected $vatPercentage;

Expand Down Expand Up @@ -159,20 +159,20 @@ public function setUnits(?int $units): ItemInterface
/**
* Get the VAT percentage.
*
* @return int
* @return float
*/
public function getVatPercentage(): ?int
public function getVatPercentage(): ?float
{
return $this->vatPercentage;
}

/**
* Set the VAT percentage.
*
* @param int $vatPercentage
* @param float $vatPercentage
* @return ItemInterface Return self to enable chaining.
*/
public function setVatPercentage(?int $vatPercentage): ItemInterface
public function setVatPercentage(?float $vatPercentage): ItemInterface
{
$this->vatPercentage = $vatPercentage;

Expand Down
4 changes: 2 additions & 2 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function setUp(): void

$this->item = (new Item())
->setProductCode('pr1')
->setVatPercentage(24)
->setVatPercentage(25.5)
->setReference('itemReference123')
->setStamp('itemStamp-1' . rand(1, 999999))
->setUnits(1)
Expand All @@ -57,7 +57,7 @@ protected function setUp(): void
$this->item2 = (new Item())
->setDeliveryDate('2020-12-12')
->setProductCode('pr2')
->setVatPercentage(24)
->setVatPercentage(25.5)
->setReference('itemReference123')
->setStamp('itemStamp-2' . rand(1, 999999))
->setUnits(2)
Expand Down

0 comments on commit 7036f74

Please sign in to comment.