diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 180ba13..5bde662 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,7 @@ jobs: php-version: [ '7.4', '8.0', - '8.1', - '8.2', + '8.1' ] steps: diff --git a/src/CXml/Builder/OrderRequestBuilder.php b/src/CXml/Builder/OrderRequestBuilder.php index b91d4e2..5c32ae7 100644 --- a/src/CXml/Builder/OrderRequestBuilder.php +++ b/src/CXml/Builder/OrderRequestBuilder.php @@ -252,7 +252,6 @@ private function buildOrderRequestHeader(): OrderRequestHeader $this->shipTo, $this->billTo, new MoneyWrapper($this->currency, $this->total), - $this->comments, OrderRequestHeader::TYPE_NEW, $this->contacts ) diff --git a/src/CXml/Exception/CXmlAuthenticationInvalidException.php b/src/CXml/Exception/CXmlAuthenticationInvalidException.php index b506e54..e812f5e 100644 --- a/src/CXml/Exception/CXmlAuthenticationInvalidException.php +++ b/src/CXml/Exception/CXmlAuthenticationInvalidException.php @@ -6,8 +6,8 @@ class CXmlAuthenticationInvalidException extends CXmlCredentialInvalidException { - public function __construct(Credential $credential, \Throwable $previous = null) + public function __construct(Credential $credential) { - parent::__construct('Given shared secret does not match.', $credential, $previous); + parent::__construct('Given shared secret does not match.', $credential); } } diff --git a/src/CXml/Model/CommentsTrait.php b/src/CXml/Model/CommentsTrait.php new file mode 100644 index 0000000..52d1a7d --- /dev/null +++ b/src/CXml/Model/CommentsTrait.php @@ -0,0 +1,54 @@ +") + * + * @var Comment[] + */ + private ?array $comments = null; + + public function addCommentAsString(string $comment, string $type = null, string $lang = null): self + { + if (null === $this->comments) { + $this->comments = []; + } + + return $this->addComment(new Comment($comment, $type, $lang)); + } + + public function addComment(Comment $comment): self + { + if (null === $this->comments) { + $this->comments = []; + } + + $this->comments[] = $comment; + + return $this; + } + + public function getComments(): ?array + { + return $this->comments; + } + + public function getCommentsAsString(): ?string + { + $commentStrings = []; + + if ($comments = $this->getComments()) { + foreach ($comments as $comment) { + $commentStrings[] = $comment->getValue(); + } + } + + return empty($commentStrings) ? null : \implode("\n", $commentStrings); + } +} diff --git a/src/CXml/Model/Exception/CXmlModelNotFoundException.php b/src/CXml/Model/Exception/CXmlModelNotFoundException.php index 287831f..58cd0c5 100644 --- a/src/CXml/Model/Exception/CXmlModelNotFoundException.php +++ b/src/CXml/Model/Exception/CXmlModelNotFoundException.php @@ -4,4 +4,10 @@ use CXml\Exception\CXmlNotImplementedException; -class CXmlModelNotFoundException extends CXmlNotImplementedException {} +class CXmlModelNotFoundException extends CXmlNotImplementedException +{ + public function __construct(string $xmlNodeName) + { + parent::__construct('Model not found for cXML-node: '.$xmlNodeName); + } +} diff --git a/src/CXml/Model/Message/QuoteMessage.php b/src/CXml/Model/Message/QuoteMessage.php new file mode 100644 index 0000000..024062f --- /dev/null +++ b/src/CXml/Model/Message/QuoteMessage.php @@ -0,0 +1,32 @@ +quoteMessageHeader = $quoteMessageHeader; + } + + public static function create(OrganizationId $organizationId, MoneyWrapper $total, string $type, string $quoteId, \DateTime $quoteDate, string $lang = 'en'): self + { + return new self( + new QuoteMessageHeader($organizationId, $total, $type, $quoteId, $quoteDate, $total->getMoney()->getCurrency(), $lang) + ); + } + + public function getQuoteMessageHeader(): QuoteMessageHeader + { + return $this->quoteMessageHeader; + } +} diff --git a/src/CXml/Model/Message/QuoteMessageHeader.php b/src/CXml/Model/Message/QuoteMessageHeader.php new file mode 100644 index 0000000..0ba094c --- /dev/null +++ b/src/CXml/Model/Message/QuoteMessageHeader.php @@ -0,0 +1,108 @@ +organizationId = $organizationId; + $this->total = $total; + $this->type = $type; + $this->quoteId = $quoteId; + $this->quoteDate = $quoteDate; + $this->currency = $currency; + $this->lang = $lang; + } + + public function setShipTo(ShipTo $shipTo): self + { + $this->shipTo = $shipTo; + + return $this; + } + + public function setContact(Contact $contact): self + { + $this->contact = $contact; + + return $this; + } +} diff --git a/src/CXml/Model/OrganizationId.php b/src/CXml/Model/OrganizationId.php new file mode 100644 index 0000000..5d6eab1 --- /dev/null +++ b/src/CXml/Model/OrganizationId.php @@ -0,0 +1,23 @@ +credential = $credential; + } + + public function getCredential(): Credential + { + return $this->credential; + } +} diff --git a/src/CXml/Model/Request/OrderRequestHeader.php b/src/CXml/Model/Request/OrderRequestHeader.php index ed71b53..ac9bcf6 100644 --- a/src/CXml/Model/Request/OrderRequestHeader.php +++ b/src/CXml/Model/Request/OrderRequestHeader.php @@ -4,7 +4,7 @@ use Assert\Assertion; use CXml\Model\BillTo; -use CXml\Model\Comment; +use CXml\Model\CommentsTrait; use CXml\Model\Contact; use CXml\Model\ExtrinsicsTrait; use CXml\Model\IdReferencesTrait; @@ -19,6 +19,7 @@ class OrderRequestHeader { use ExtrinsicsTrait; use IdReferencesTrait; + use CommentsTrait; public const TYPE_NEW = 'new'; @@ -77,14 +78,6 @@ class OrderRequestHeader */ private ?array $contacts = null; - /** - * @Ser\XmlList(inline=true, entry="Comments") - * @Ser\Type("array") - * - * @var Comment[] - */ - private ?array $comments = null; - /** * @Ser\SerializedName("SupplierOrderInfo") */ @@ -96,13 +89,9 @@ public function __construct( ?ShipTo $shipTo, BillTo $billTo, MoneyWrapper $total, - array $comments = null, string $type = self::TYPE_NEW, array $contacts = null ) { - if ($comments) { - Assertion::allIsInstanceOf($comments, Comment::class); - } if ($contacts) { Assertion::allIsInstanceOf($contacts, Contact::class); } @@ -113,7 +102,6 @@ public function __construct( $this->total = $total; $this->shipTo = $shipTo; $this->billTo = $billTo; - $this->comments = $comments; $this->contacts = $contacts; } @@ -123,11 +111,10 @@ public static function create( ?ShipTo $shipTo, BillTo $billTo, MoneyWrapper $total, - array $comments = null, string $type = self::TYPE_NEW, array $contacts = null ): self { - return new self($orderId, $orderDate, $shipTo, $billTo, $total, $comments, $type, $contacts); + return new self($orderId, $orderDate, $shipTo, $billTo, $total, $type, $contacts); } public function getShipping(): ?Shipping diff --git a/src/CXml/Model/Request/ShipNoticeHeader.php b/src/CXml/Model/Request/ShipNoticeHeader.php index 53a67f7..a650677 100644 --- a/src/CXml/Model/Request/ShipNoticeHeader.php +++ b/src/CXml/Model/Request/ShipNoticeHeader.php @@ -2,7 +2,7 @@ namespace CXml\Model\Request; -use CXml\Model\Comment; +use CXml\Model\CommentsTrait; use CXml\Model\DocumentReference; use CXml\Model\ExtrinsicsTrait; use CXml\Model\IdReferencesTrait; @@ -12,6 +12,7 @@ class ShipNoticeHeader { use ExtrinsicsTrait; use IdReferencesTrait; + use CommentsTrait; /** * @Ser\XmlAttribute @@ -39,14 +40,6 @@ class ShipNoticeHeader */ private ?DocumentReference $documentReference = null; - /** - * @Ser\XmlList(inline=true, entry="Comments") - * @Ser\Type("array") - * - * @var Comment[] - */ - private ?array $comments = null; - public function __construct(string $shipmentId, \DateTimeInterface $noticeDate = null, \DateTimeInterface $shipmentDate = null, \DateTimeInterface $deliveryDate = null, string $documentReference = null) { $this->shipmentId = $shipmentId; @@ -66,22 +59,6 @@ public function getDocumentReference(): ?DocumentReference return $this->documentReference; } - public function addComment(string $comment, string $type = null, string $lang = null): self - { - if (null === $this->comments) { - $this->comments = []; - } - - $this->comments[] = new Comment($comment, $type, $lang); - - return $this; - } - - public function getComments(): ?array - { - return $this->comments; - } - public function getShipmentId(): string { return $this->shipmentId; diff --git a/src/CXml/Model/Request/ShipNoticeRequest.php b/src/CXml/Model/Request/ShipNoticeRequest.php index abfd9c1..1427c5e 100644 --- a/src/CXml/Model/Request/ShipNoticeRequest.php +++ b/src/CXml/Model/Request/ShipNoticeRequest.php @@ -70,14 +70,6 @@ public function getShipNoticePortions(): array public function getCommentsAsString(): ?string { - $commentStrings = []; - - if ($comments = $this->shipNoticeHeader->getComments()) { - foreach ($comments as $comment) { - $commentStrings[] = $comment->getValue(); - } - } - - return empty($commentStrings) ? null : \implode("\n", $commentStrings); + return $this->shipNoticeHeader->getCommentsAsString(); } } diff --git a/src/CXml/Validation/DtdValidator.php b/src/CXml/Validation/DtdValidator.php index 0cf5f4e..fac704e 100644 --- a/src/CXml/Validation/DtdValidator.php +++ b/src/CXml/Validation/DtdValidator.php @@ -14,6 +14,7 @@ public function __construct(string $pathToCxmlDtds) Assertion::directory($pathToCxmlDtds); Assertion::file($pathToCxmlDtds.'/cXML.dtd'); Assertion::file($pathToCxmlDtds.'/Fulfill.dtd'); + Assertion::file($pathToCxmlDtds.'/Quote.dtd'); $this->pathToCxmlDtds = $pathToCxmlDtds; } @@ -33,7 +34,7 @@ public function validateAgainstDtd(string $xml): void $old = new \DOMDocument(); $old->loadXML($xml); - $validateFiles = ['cXML.dtd', 'Fulfill.dtd']; + $validateFiles = ['cXML.dtd', 'Fulfill.dtd', 'Quote.dtd']; $this->validateAgainstMultipleDtd($validateFiles, $old); diff --git a/tests/CXmlTest/Model/OrderRequestTest.php b/tests/CXmlTest/Model/OrderRequestTest.php index 38f65a5..cb197cb 100644 --- a/tests/CXmlTest/Model/OrderRequestTest.php +++ b/tests/CXmlTest/Model/OrderRequestTest.php @@ -23,6 +23,7 @@ use CXml\Model\ShipTo; use CXml\Payload\PayloadIdentityFactoryInterface; use CXml\Serializer; +use CXml\Validation\DtdValidator; use PHPUnit\Framework\TestCase; /** @@ -31,6 +32,14 @@ */ class OrderRequestTest extends TestCase implements PayloadIdentityFactoryInterface { + + private DtdValidator $dtdValidator; + + protected function setUp(): void + { + $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.050/'); + } + public function testMinimumExample(): void { $from = new Credential( @@ -90,9 +99,10 @@ public function testMinimumExample(): void new MoneyWrapper( 'EUR', 8500 - ), - [new Comment(null, null, null, 'delivery-note.pdf')] + ) ); + $orderRequestHeader->addComment(new Comment(null, null, null, 'delivery-note.pdf')); + $orderRequest = OrderRequest::create( $orderRequestHeader @@ -148,6 +158,8 @@ public function testMinimumExample(): void $xml = Serializer::create()->serialize($cxml); $this->assertXmlStringEqualsXmlFile('tests/metadata/cxml/samples/OrderRequest.xml', $xml); + + $this->dtdValidator->validateAgainstDtd($xml); } public function newPayloadIdentity(): PayloadIdentity diff --git a/tests/CXmlTest/Model/ProductActivityMessageTest.php b/tests/CXmlTest/Model/ProductActivityMessageTest.php index 71d537c..2634b0d 100644 --- a/tests/CXmlTest/Model/ProductActivityMessageTest.php +++ b/tests/CXmlTest/Model/ProductActivityMessageTest.php @@ -14,6 +14,7 @@ use CXml\Model\PayloadIdentity; use CXml\Payload\PayloadIdentityFactoryInterface; use CXml\Serializer; +use CXml\Validation\DtdValidator; use PHPUnit\Framework\TestCase; /** @@ -22,6 +23,14 @@ */ class ProductActivityMessageTest extends TestCase implements PayloadIdentityFactoryInterface { + + private DtdValidator $dtdValidator; + + protected function setUp(): void + { + $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.050/'); + } + public function testMinimumExample(): void { $from = new Credential( @@ -63,7 +72,9 @@ public function testMinimumExample(): void $xml = Serializer::create()->serialize($cxml); $this->assertXmlStringEqualsXmlFile('tests/metadata/cxml/samples/ProductActivityMessage.xml', $xml); - } + + $this->dtdValidator->validateAgainstDtd($xml); + } public function newPayloadIdentity(): PayloadIdentity { diff --git a/tests/CXmlTest/Model/PunchOutSetupRequestTest.php b/tests/CXmlTest/Model/PunchOutSetupRequestTest.php index 40bc8ce..6ef9206 100644 --- a/tests/CXmlTest/Model/PunchOutSetupRequestTest.php +++ b/tests/CXmlTest/Model/PunchOutSetupRequestTest.php @@ -35,7 +35,7 @@ class PunchOutSetupRequestTest extends TestCase implements PayloadIdentityFactor protected function setUp(): void { - $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.053/'); + $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.050/'); } public function testMinimumExample(): void @@ -132,7 +132,7 @@ public function testMinimumExample(): void $this->dtdValidator->validateAgainstDtd($xml); $this->assertXmlStringEqualsXmlFile(__DIR__.'/../../metadata/cxml/samples/PunchOutSetupRequest.xml', $xml); - } + } public function newPayloadIdentity(): PayloadIdentity { diff --git a/tests/CXmlTest/Model/PunchoutOrderMessageTest.php b/tests/CXmlTest/Model/PunchoutOrderMessageTest.php index 8e7304c..5ab9990 100644 --- a/tests/CXmlTest/Model/PunchoutOrderMessageTest.php +++ b/tests/CXmlTest/Model/PunchoutOrderMessageTest.php @@ -28,7 +28,7 @@ class PunchoutOrderMessageTest extends TestCase implements PayloadIdentityFactor protected function setUp(): void { - $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.053/'); + $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.050/'); } public function testMinimumExample(): void diff --git a/tests/CXmlTest/Model/QuoteMessageTest.php b/tests/CXmlTest/Model/QuoteMessageTest.php new file mode 100644 index 0000000..5f74ab6 --- /dev/null +++ b/tests/CXmlTest/Model/QuoteMessageTest.php @@ -0,0 +1,125 @@ +dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.050/'); + } + + public function testMinimumExample(): void + { + $from = new Credential( + 'NetworkId', + 'AN00000123' + ); + $to = new Credential( + 'NetworkId', + 'AN00000456' + ); + $sender = new Credential( + 'NetworkId', + 'AN00000123', + 'abracadabra' + ); + + $organizationId = new OrganizationId( + new Credential( + 'domain', + 'identity' + ) + ); + + $total = new MoneyWrapper('USD', 10000); + + $quoteMessage = QuoteMessage::create( + $organizationId, + $total, + QuoteMessageHeader::TYPE_ACCEPT, + 'quoteId', + new \DateTime('2021-01-08T23:00:06-08:00'), + 'de' + ); + + $contact = Contact::create(new MultilanguageString('Joe Smith')) + ->addEmail('joe.smith@siemens.com') + ->addIdReference('GUID', '123456'); + + $shipTo = new ShipTo( + new Address( + new MultilanguageString('Acme Inc.'), + new PostalAddress( + ['Acme Inc.', 'Joe Smith'], + ['123 Anystreet'], + 'Sunnyvale', + new Country('US', 'United States'), + null, + 'CA', + '90489' + ) + ) + ); + + $quoteMessage->getQuoteMessageHeader() + ->setContact($contact) + ->setShipTo($shipTo) + ->addExtrinsicAsKeyValue('expiry_date', '2023-01-08T23:00:06-08:00') + ->addCommentAsString('This is a comment'); + + $cxml = Builder::create('Supplier’s Super Order Processor', 'en-US', $this) + ->from($from) + ->to($to) + ->sender($sender) + ->payload($quoteMessage) + ->build() + ; + + $this->assertEquals('QuoteMessage_0c30050@supplierorg.com', (string) $cxml); + + $xml = Serializer::create()->serialize($cxml); + $this->assertXmlStringEqualsXmlFile('tests/metadata/cxml/samples/QuoteMessage.xml', $xml); + + $this->dtdValidator->validateAgainstDtd($xml); + } + + public function newPayloadIdentity(): PayloadIdentity + { + return new PayloadIdentity( + '0c30050@supplierorg.com', + new \DateTime('2021-01-08T23:00:06-08:00') + ); + } +} diff --git a/tests/CXmlTest/Model/ShipNoticeRequestTest.php b/tests/CXmlTest/Model/ShipNoticeRequestTest.php index 1eeba99..930e2fd 100644 --- a/tests/CXmlTest/Model/ShipNoticeRequestTest.php +++ b/tests/CXmlTest/Model/ShipNoticeRequestTest.php @@ -13,6 +13,7 @@ use CXml\Model\ShipNoticePortion; use CXml\Payload\PayloadIdentityFactoryInterface; use CXml\Serializer; +use CXml\Validation\DtdValidator; use PHPUnit\Framework\TestCase; /** @@ -21,6 +22,14 @@ */ class ShipNoticeRequestTest extends TestCase implements PayloadIdentityFactoryInterface { + + private DtdValidator $dtdValidator; + + protected function setUp(): void + { + $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.050/'); + } + public function testMinimumExample(): void { $from = new Credential( @@ -44,7 +53,7 @@ public function testMinimumExample(): void new \DateTime('2000-10-14T08:30:19-08:00'), new \DateTime('2000-10-18T09:00:00-08:00'), ) - ->addComment('Got it all into one shipment.', null, 'en-CA') + ->addCommentAsString('Got it all into one shipment.', null, 'en-CA') ) ->addShipControl( ShipControl::create(CarrierIdentifier::fromScacCode('FDE'), new ShipmentIdentifier('8202 8261 1194')) @@ -67,6 +76,8 @@ public function testMinimumExample(): void $xml = Serializer::create()->serialize($cxml); $this->assertXmlStringEqualsXmlFile('tests/metadata/cxml/samples/ShipNoticeRequest.xml', $xml); + + $this->dtdValidator->validateAgainstDtd($xml); } public function newPayloadIdentity(): PayloadIdentity diff --git a/tests/CXmlTest/Model/StatusUpdateRequestTest.php b/tests/CXmlTest/Model/StatusUpdateRequestTest.php index 7c5c13e..359f13d 100644 --- a/tests/CXmlTest/Model/StatusUpdateRequestTest.php +++ b/tests/CXmlTest/Model/StatusUpdateRequestTest.php @@ -9,6 +9,7 @@ use CXml\Model\Status; use CXml\Payload\PayloadIdentityFactoryInterface; use CXml\Serializer; +use CXml\Validation\DtdValidator; use PHPUnit\Framework\TestCase; /** @@ -17,6 +18,14 @@ */ class StatusUpdateRequestTest extends TestCase implements PayloadIdentityFactoryInterface { + + private DtdValidator $dtdValidator; + + protected function setUp(): void + { + $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.050/'); + } + public function testMinimumExample(): void { $from = new Credential( @@ -50,6 +59,8 @@ public function testMinimumExample(): void $xml = Serializer::create()->serialize($cxml); $this->assertXmlStringEqualsXmlFile('tests/metadata/cxml/samples/StatusUpdateRequest.xml', $xml); + + $this->dtdValidator->validateAgainstDtd($xml); } public function newPayloadIdentity(): PayloadIdentity diff --git a/tests/CXmlTest/Validation/MessageValidatorTest.php b/tests/CXmlTest/Validation/MessageValidatorTest.php index 571b830..848c849 100644 --- a/tests/CXmlTest/Validation/MessageValidatorTest.php +++ b/tests/CXmlTest/Validation/MessageValidatorTest.php @@ -16,7 +16,7 @@ class MessageValidatorTest extends TestCase protected function setUp(): void { - $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.053'); + $this->dtdValidator = new DtdValidator(__DIR__.'/../../metadata/cxml/dtd/1.2.050'); } public function testValidateSuccess(): void diff --git a/tests/metadata/cxml/dtd/1.2.050/Quote.dtd b/tests/metadata/cxml/dtd/1.2.050/Quote.dtd new file mode 100644 index 0000000..b937bf5 --- /dev/null +++ b/tests/metadata/cxml/dtd/1.2.050/Quote.dtd @@ -0,0 +1,7330 @@ + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/metadata/cxml/samples/PunchoutOrderMessage.xml b/tests/metadata/cxml/samples/PunchoutOrderMessage.xml index 327a394..39f96dc 100644 --- a/tests/metadata/cxml/samples/PunchoutOrderMessage.xml +++ b/tests/metadata/cxml/samples/PunchoutOrderMessage.xml @@ -1,5 +1,5 @@ - +
diff --git a/tests/metadata/cxml/samples/QuoteMessage.xml b/tests/metadata/cxml/samples/QuoteMessage.xml new file mode 100644 index 0000000..ae82cf6 --- /dev/null +++ b/tests/metadata/cxml/samples/QuoteMessage.xml @@ -0,0 +1,62 @@ + + + +
+ + + AN00000123 + + + + + AN00000456 + + + + + AN00000123 + abracadabra + + Supplier’s Super Order Processor + +
+ + + + + + identity + + + + + 100.00 + + + +
+ Acme Inc. + + Acme Inc. + Joe Smith + 123 Anystreet + Sunnyvale + CA + 90489 + United States + +
+
+ + + Joe Smith + joe.smith@siemens.com + + + + This is a comment + 2023-01-08T23:00:06-08:00 +
+
+
+
\ No newline at end of file