-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing ProductCharacteristic, ProductClassification and TradeCur…
…rencyExchange
- Loading branch information
Showing
7 changed files
with
125 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Easybill\ZUGFeRD2\Model; | ||
|
||
use JMS\Serializer\Annotation\SerializedName; | ||
use JMS\Serializer\Annotation\Type; | ||
use JMS\Serializer\Annotation\XmlAttribute; | ||
use JMS\Serializer\Annotation\XmlValue; | ||
|
||
class ClassCode | ||
{ | ||
#[Type('string')] | ||
#[XmlAttribute] | ||
#[SerializedName('listID')] | ||
public ?string $listID = null; | ||
|
||
#[Type('string')] | ||
#[XmlValue(cdata: false)] | ||
public string $value; | ||
|
||
public static function create(string $id, ?string $listID = null): self | ||
{ | ||
$self = new self(); | ||
$self->value = $id; | ||
$self->listID = $listID; | ||
return $self; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Easybill\ZUGFeRD2\Model; | ||
|
||
use JMS\Serializer\Annotation\SerializedName; | ||
use JMS\Serializer\Annotation\Type; | ||
use JMS\Serializer\Annotation\XmlElement; | ||
|
||
class ProductCharacteristic | ||
{ | ||
#[Type('string')] | ||
#[XmlElement(cdata: false, namespace: 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100')] | ||
#[SerializedName('Description')] | ||
public string $description; | ||
|
||
#[Type('string')] | ||
#[XmlElement(cdata: false, namespace: 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100')] | ||
#[SerializedName('Value')] | ||
public string $value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Easybill\ZUGFeRD2\Model; | ||
|
||
use JMS\Serializer\Annotation\SerializedName; | ||
use JMS\Serializer\Annotation\Type; | ||
use JMS\Serializer\Annotation\XmlElement; | ||
|
||
class ProductClassification | ||
{ | ||
#[Type(ClassCode::class)] | ||
#[XmlElement(cdata: false, namespace: 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100')] | ||
#[SerializedName('ClassCode')] | ||
public ?ClassCode $classCode = null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Easybill\ZUGFeRD2\Model; | ||
|
||
use JMS\Serializer\Annotation\SerializedName; | ||
use JMS\Serializer\Annotation\Type; | ||
use JMS\Serializer\Annotation\XmlElement; | ||
|
||
class TradeCurrencyExchange | ||
{ | ||
#[Type('string')] | ||
#[XmlElement(cdata: false, namespace: 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100')] | ||
#[SerializedName('SourceCurrencyCode')] | ||
public string $sourceCurrencyCode; | ||
|
||
#[Type('string')] | ||
#[XmlElement(cdata: false, namespace: 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100')] | ||
#[SerializedName('TargetCurrencyCode')] | ||
public string $targetCurrencyCode; | ||
|
||
#[Type('float')] | ||
#[XmlElement(cdata: false, namespace: 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100')] | ||
#[SerializedName('ConversionRate')] | ||
public float $conversionRate; | ||
|
||
#[Type(DateTime::class)] | ||
#[XmlElement(cdata: false, namespace: 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100')] | ||
#[SerializedName('ConversionRateDateTime')] | ||
public ?DateTime $conversionRateDateTime = null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters