Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into feat/version-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ynnoig committed Jun 5, 2024
2 parents f3cf9f2 + dcb0826 commit 650014b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/CXml/Model/PriceBasisQuantity.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(
private string $unitOfMeasure,
#[Serializer\SerializedName('Description')]
#[Serializer\XmlElement(cdata: false)]
private Description $description,
private MultilanguageString $description,
) {
}

Expand All @@ -39,7 +39,7 @@ public function getUnitOfMeasure(): string
return $this->unitOfMeasure;
}

public function getDescription(): Description
public function getDescription(): MultilanguageString
{
return $this->description;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use CXml\Model\Message\PunchOutOrderMessage;
use CXml\Model\Message\PunchOutOrderMessageHeader;
use CXml\Model\MoneyWrapper;
use CXml\Model\MultilanguageString;
use CXml\Model\PayloadIdentity;
use CXml\Model\PriceBasisQuantity;
use CXml\Payload\PayloadIdentityFactoryInterface;
Expand All @@ -32,7 +33,7 @@ protected function setUp(): void
$this->dtdValidator = new DtdValidator(__DIR__ . '/../../metadata/cxml/dtd/1.2.050/');
}

public function testMinimumExample(): void
public function testMinimumExampleAdvPricing(): void
{
$from = new Credential(
'DUNS',
Expand Down Expand Up @@ -61,9 +62,9 @@ public function testMinimumExample(): void
[
new Classification('UNSPSC', 'ean1234'),
],
new PriceBasisQuantity(2, 0.5, 'BOX', Description::createWithShortName('1 Box is 2 EA and the unit price is for 2', null, 'en')),
),
),
new PriceBasisQuantity(2, 0.5, 'BOX', new MultilanguageString('1 Box is 2 EA and the unit price is for 2', null, 'en'))
)
)
);

$cxml = Builder::create('Workchairs cXML Application', 'en-US', $this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
<UnitOfMeasure>EA</UnitOfMeasure>
<PriceBasisQuantity quantity="2" conversionFactor="0.5">
<UnitOfMeasure>BOX</UnitOfMeasure>
<Description xml:lang="en">
<ShortName>1 Box is 2 EA and the unit price is for 2</ShortName>
</Description>
<Description xml:lang="en">1 Box is 2 EA and the unit price is for 2</Description>
</PriceBasisQuantity>
<Classification domain="UNSPSC">ean1234</Classification>
</ItemDetail>
Expand Down

0 comments on commit 650014b

Please sign in to comment.