Skip to content

Commit

Permalink
Merge pull request #52 from amcintosh/issue-51-tax-number-readonly
Browse files Browse the repository at this point in the history
🐛 Make invoice line TaxNumber read-only
  • Loading branch information
amcintosh committed Apr 12, 2023
2 parents 6a7c83d + 5dc0dd1 commit 6152474
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Added Expense Categories resource
- Added list sort builder
- Updated list models with new `pages()` function to standardize pagination with different models
- Make invoice LineItem's taxNumber1 and taxNumber2 readonly due to FreshBooks API change

## 0.5.0

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"spryker/decimal-object": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "9.5.x-dev",
"phpunit/phpunit": "9.6.x-dev",
"squizlabs/php_codesniffer": "4.0.x-dev",
"php-http/guzzle7-adapter": "1.x-dev",
"php-http/mock-client": "1.x-dev",
Expand Down
3 changes: 1 addition & 2 deletions src/Model/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Spatie\DataTransferObject\Attributes\MapTo;
use Spatie\DataTransferObject\Caster;
use Spatie\DataTransferObject\DataTransferObject;
use amcintosh\FreshBooks\Model\DataModel;
use amcintosh\FreshBooks\Model\Caster\AccountingDateTimeImmutableCaster;
use amcintosh\FreshBooks\Model\Caster\MoneyCaster;

Expand All @@ -26,7 +25,7 @@
*/
class LineItem extends DataTransferObject
{
protected array $exceptKeys = ['amount', 'updated'];
protected array $exceptKeys = ['amount', 'taxNumber1', 'taxNumber2', 'updated'];

/**
* @var int Unique-to-this-invoice line id.
Expand Down
8 changes: 0 additions & 8 deletions tests/Model/InvoiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,6 @@ public function testInvoiceGetContentExisting(): void
'taxAmount2' => '0',
'taxName1' => 'HST1',
'taxName2' => null,
'taxNumber1' => 'RT',
'taxNumber2' => null,
'type' => 0,
'unit_cost' => [
'amount' => '5.00',
Expand All @@ -340,8 +338,6 @@ public function testInvoiceGetContentExisting(): void
'taxAmount2' => '0',
'taxName1' => '',
'taxName2' => '',
'taxNumber1' => null,
'taxNumber2' => null,
'type' => 0,
'unit_cost' => [
'amount' => '4.00',
Expand Down Expand Up @@ -417,8 +413,6 @@ public function testInvoiceGetContentNew(): void
'taxAmount2' => '0',
'taxName1' => 'HST1',
'taxName2' => null,
'taxNumber1' => 'RT',
'taxNumber2' => null,
'type' => 0,
'unit_cost' => [
'amount' => '5.00',
Expand All @@ -435,8 +429,6 @@ public function testInvoiceGetContentNew(): void
'taxAmount2' => '0',
'taxName1' => '',
'taxName2' => '',
'taxNumber1' => null,
'taxNumber2' => null,
'type' => 0,
'unit_cost' => [
'amount' => '4.00',
Expand Down

0 comments on commit 6152474

Please sign in to comment.