Skip to content

Commit

Permalink
fix: allow 10 digit classification numbers (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Ernst authored Sep 13, 2023
1 parent da1d371 commit 595943a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Model/MyParcelCustomsItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function setClassification(?int $classification): self
throw new MissingFieldException('Classification must be set for a MyParcel product');
}

$this->classification = substr("$classification", 0, 6);
$this->classification = substr("$classification", 0, 10);

return $this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function getRules(): array
new ShipmentOptionsRule(),
new DropOffPointRule(),
new MaximumWeightRule(),
new RestrictCountriesRule(AbstractConsignment::EURO_COUNTRIES),
new RestrictCountriesRule(array_merge(AbstractConsignment::EURO_COUNTRIES, ['UK', 'GB']))
];
}
}

0 comments on commit 595943a

Please sign in to comment.