Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@
require_once __DIR__ . '/src/Component/ValueObject/TypePriceNullable.php';
require_once __DIR__ . '/src/Component/ValueObject/TypePriceRatio.php';
require_once __DIR__ . '/src/Component/ValueObject/TypeProductPriceRatio.php';
require_once __DIR__ . '/src/Component/ValueObject/TypeSpecSymbol.php';
require_once __DIR__ . '/src/Component/ValueObject/TypeSpecSymbolNullable.php';
require_once __DIR__ . '/src/Component/ValueObject/TypeUnitRatio.php';
require_once __DIR__ . '/src/Component/ValueObject/TypeVarSymbol.php';
require_once __DIR__ . '/src/Component/ValueObject/TypeVarSymbolNullable.php';
require_once __DIR__ . '/src/Component/ValueObject/TypeVariantCodeRequest.php';
require_once __DIR__ . '/src/Component/ValueObject/TypeVatRate.php';
require_once __DIR__ . '/src/Component/ValueObject/TypeVatRateNullable.php';
Expand Down
14 changes: 8 additions & 6 deletions src/Component/Entity/CreditNote.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use Shoptet\Api\Sdk\Php\Component\Entity\CreditNote\Items;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeDateNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeDateTimeNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeSpecSymbolNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeVarSymbol;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeWeightUnlimited;

class CreditNote extends Entity
Expand All @@ -18,9 +20,9 @@ class CreditNote extends Entity
protected TypeDateTimeNullable $changeTime;
protected TypeDateNullable $dueDate;
protected TypeDateNullable $taxDate;
protected float $varSymbol;
protected TypeVarSymbol $varSymbol;
protected ?int $constSymbol;
protected ?float $specSymbol;
protected TypeSpecSymbolNullable $specSymbol;
protected ?bool $restocked;
protected ?string $stockAmountChangeType;
protected TypeWeightUnlimited $weight;
Expand Down Expand Up @@ -137,12 +139,12 @@ public function setTaxDate(TypeDateNullable $taxDate): static
return $this;
}

public function getVarSymbol(): float
public function getVarSymbol(): TypeVarSymbol
{
return $this->varSymbol;
}

public function setVarSymbol(float $varSymbol): static
public function setVarSymbol(TypeVarSymbol $varSymbol): static
{
$this->varSymbol = $varSymbol;
return $this;
Expand All @@ -159,12 +161,12 @@ public function setConstSymbol(?int $constSymbol): static
return $this;
}

public function getSpecSymbol(): ?float
public function getSpecSymbol(): TypeSpecSymbolNullable
{
return $this->specSymbol;
}

public function setSpecSymbol(?float $specSymbol): static
public function setSpecSymbol(TypeSpecSymbolNullable $specSymbol): static
{
$this->specSymbol = $specSymbol;
return $this;
Expand Down
21 changes: 12 additions & 9 deletions src/Component/Entity/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
namespace Shoptet\Api\Sdk\Php\Component\Entity;

use Shoptet\Api\Sdk\Php\Component\Entity\Invoice\Items;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeConstSymbolNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeDateNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeDateTimeNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeSpecSymbolNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeVarSymbol;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeWeightUnlimited;

class Invoice extends Entity
Expand All @@ -17,9 +20,9 @@ class Invoice extends Entity
protected TypeDateTimeNullable $changeTime;
protected TypeDateNullable $dueDate;
protected TypeDateNullable $taxDate;
protected float $varSymbol;
protected ?string $constSymbol;
protected ?float $specSymbol;
protected TypeVarSymbol $varSymbol;
protected TypeConstSymbolNullable $constSymbol;
protected TypeSpecSymbolNullable $specSymbol;
protected TypeWeightUnlimited $weight;
protected TypeWeightUnlimited $completePackageWeight;
protected ?BillingMethod $billingMethod;
Expand Down Expand Up @@ -123,34 +126,34 @@ public function setTaxDate(TypeDateNullable $taxDate): static
return $this;
}

public function getVarSymbol(): float
public function getVarSymbol(): TypeVarSymbol
{
return $this->varSymbol;
}

public function setVarSymbol(float $varSymbol): static
public function setVarSymbol(TypeVarSymbol $varSymbol): static
{
$this->varSymbol = $varSymbol;
return $this;
}

public function getConstSymbol(): ?string
public function getConstSymbol(): TypeConstSymbolNullable
{
return $this->constSymbol;
}

public function setConstSymbol(?string $constSymbol): static
public function setConstSymbol(TypeConstSymbolNullable $constSymbol): static
{
$this->constSymbol = $constSymbol;
return $this;
}

public function getSpecSymbol(): ?float
public function getSpecSymbol(): TypeSpecSymbolNullable
{
return $this->specSymbol;
}

public function setSpecSymbol(?float $specSymbol): static
public function setSpecSymbol(TypeSpecSymbolNullable $specSymbol): static
{
$this->specSymbol = $specSymbol;
return $this;
Expand Down
21 changes: 12 additions & 9 deletions src/Component/Entity/ProformaInvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
namespace Shoptet\Api\Sdk\Php\Component\Entity;

use Shoptet\Api\Sdk\Php\Component\Entity\ProformaInvoice\Items;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeConstSymbolNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeDateNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeDateTimeNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeSpecSymbolNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeVarSymbol;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeWeightUnlimited;

class ProformaInvoice extends Entity
Expand All @@ -16,9 +19,9 @@ class ProformaInvoice extends Entity
protected TypeDateTimeNullable $creationTime;
protected TypeDateTimeNullable $changeTime;
protected TypeDateNullable $dueDate;
protected float $varSymbol;
protected ?string $constSymbol;
protected ?float $specSymbol;
protected TypeVarSymbol $varSymbol;
protected TypeConstSymbolNullable $constSymbol;
protected TypeSpecSymbolNullable $specSymbol;
protected TypeWeightUnlimited $weight;
protected TypeWeightUnlimited $completePackageWeight;
protected ?BillingMethod $billingMethod;
Expand Down Expand Up @@ -110,34 +113,34 @@ public function setDueDate(TypeDateNullable $dueDate): static
return $this;
}

public function getVarSymbol(): float
public function getVarSymbol(): TypeVarSymbol
{
return $this->varSymbol;
}

public function setVarSymbol(float $varSymbol): static
public function setVarSymbol(TypeVarSymbol $varSymbol): static
{
$this->varSymbol = $varSymbol;
return $this;
}

public function getConstSymbol(): ?string
public function getConstSymbol(): TypeConstSymbolNullable
{
return $this->constSymbol;
}

public function setConstSymbol(?string $constSymbol): static
public function setConstSymbol(TypeConstSymbolNullable $constSymbol): static
{
$this->constSymbol = $constSymbol;
return $this;
}

public function getSpecSymbol(): ?float
public function getSpecSymbol(): TypeSpecSymbolNullable
{
return $this->specSymbol;
}

public function setSpecSymbol(?float $specSymbol): static
public function setSpecSymbol(TypeSpecSymbolNullable $specSymbol): static
{
$this->specSymbol = $specSymbol;
return $this;
Expand Down
21 changes: 12 additions & 9 deletions src/Component/Entity/ProofPaymentDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
namespace Shoptet\Api\Sdk\Php\Component\Entity;

use Shoptet\Api\Sdk\Php\Component\Entity\ProofPaymentDetail\Source;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeConstSymbolNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeDateNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeDateTimeNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeExchangeRate;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeGuidUnlimited;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypePriceNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeSpecSymbolNullable;
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypeVarSymbol;

class ProofPaymentDetail extends Entity
{
Expand Down Expand Up @@ -47,9 +50,9 @@ class ProofPaymentDetail extends Entity
/** @deprecated */
protected ?string $identificationNumber;
protected ?string $remark;
protected float $varSymbol;
protected ?string $constSymbol;
protected ?float $specSymbol;
protected TypeVarSymbol $varSymbol;
protected TypeConstSymbolNullable $constSymbol;
protected TypeSpecSymbolNullable $specSymbol;
protected ?BillingMethod $billingMethod;
protected ?string $billBankAccount;
protected ?string $billIban;
Expand Down Expand Up @@ -443,34 +446,34 @@ public function setRemark(?string $remark): static
return $this;
}

public function getVarSymbol(): float
public function getVarSymbol(): TypeVarSymbol
{
return $this->varSymbol;
}

public function setVarSymbol(float $varSymbol): static
public function setVarSymbol(TypeVarSymbol $varSymbol): static
{
$this->varSymbol = $varSymbol;
return $this;
}

public function getConstSymbol(): ?string
public function getConstSymbol(): TypeConstSymbolNullable
{
return $this->constSymbol;
}

public function setConstSymbol(?string $constSymbol): static
public function setConstSymbol(TypeConstSymbolNullable $constSymbol): static
{
$this->constSymbol = $constSymbol;
return $this;
}

public function getSpecSymbol(): ?float
public function getSpecSymbol(): TypeSpecSymbolNullable
{
return $this->specSymbol;
}

public function setSpecSymbol(?float $specSymbol): static
public function setSpecSymbol(TypeSpecSymbolNullable $specSymbol): static
{
$this->specSymbol = $specSymbol;
return $this;
Expand Down
26 changes: 26 additions & 0 deletions src/Component/ValueObject/TypeSpecSymbol.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace Shoptet\Api\Sdk\Php\Component\ValueObject;

readonly class TypeSpecSymbol implements ValueObjectInterface
{
public function __construct(
public int $typeSpecSymbol,
) {
}

public function equals(self $typeSpecSymbol): bool
{
return $typeSpecSymbol->typeSpecSymbol === $this->typeSpecSymbol;
}

public function __toString(): string
{
return (string) $this->typeSpecSymbol;
}

public function jsonSerialize(): string
{
return $this->__toString();
}
}
29 changes: 29 additions & 0 deletions src/Component/ValueObject/TypeSpecSymbolNullable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace Shoptet\Api\Sdk\Php\Component\ValueObject;

readonly class TypeSpecSymbolNullable implements ValueObjectInterface
{
public function __construct(
public ?int $typeSpecSymbolNullable,
) {
if ($this->typeSpecSymbolNullable === null) {
return;
}
}

public function equals(self $typeSpecSymbolNullable): bool
{
return $typeSpecSymbolNullable->typeSpecSymbolNullable === $this->typeSpecSymbolNullable;
}

public function __toString(): string
{
return (string) $this->typeSpecSymbolNullable;
}

public function jsonSerialize(): string
{
return $this->__toString();
}
}
26 changes: 26 additions & 0 deletions src/Component/ValueObject/TypeVarSymbol.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace Shoptet\Api\Sdk\Php\Component\ValueObject;

readonly class TypeVarSymbol implements ValueObjectInterface
{
public function __construct(
public int $typeVarSymbol,
) {
}

public function equals(self $typeVarSymbol): bool
{
return $typeVarSymbol->typeVarSymbol === $this->typeVarSymbol;
}

public function __toString(): string
{
return (string) $this->typeVarSymbol;
}

public function jsonSerialize(): string
{
return $this->__toString();
}
}
29 changes: 29 additions & 0 deletions src/Component/ValueObject/TypeVarSymbolNullable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace Shoptet\Api\Sdk\Php\Component\ValueObject;

readonly class TypeVarSymbolNullable implements ValueObjectInterface
{
public function __construct(
public ?int $typeVarSymbolNullable,
) {
if ($this->typeVarSymbolNullable === null) {
return;
}
}

public function equals(self $typeVarSymbolNullable): bool
{
return $typeVarSymbolNullable->typeVarSymbolNullable === $this->typeVarSymbolNullable;
}

public function __toString(): string
{
return (string) $this->typeVarSymbolNullable;
}

public function jsonSerialize(): string
{
return $this->__toString();
}
}
Loading
Loading