diff --git a/lib/SaferpayJson/Request/Container/Address.php b/lib/SaferpayJson/Request/Container/Address.php index 8db8fd8..0acddaa 100644 --- a/lib/SaferpayJson/Request/Container/Address.php +++ b/lib/SaferpayJson/Request/Container/Address.php @@ -14,94 +14,79 @@ final class Address public const GENDER_COMPANY = 'COMPANY'; /** - * @var string|null * @SerializedName("FirstName") */ - private $firstName; + private ?string $firstName = null; /** - * @var string|null * @SerializedName("LastName") */ - private $lastName; + private ?string $lastName = null; /** - * @var string|null * @SerializedName("Company") */ - private $company; + private ?string $company = null; /** - * @var string|null * @SerializedName("Gender") */ - private $gender; + private ?string $gender = null; /** - * @var string|null * @SerializedName("Street") */ - private $street; + private ?string $street = null; /** - * @var string|null * @SerializedName("Zip") */ - private $zip; + private ?string $zip = null; /** - * @var string|null * @SerializedName("City") */ - private $city; + private ?string $city = null; /** - * @var string|null * @SerializedName("CountryCode") */ - private $countryCode; + private ?string $countryCode = null; /** - * @var string|null * @SerializedName("Email") */ - private $email; + private ?string $email = null; /** - * @var \DateTime|null * @SerializedName("DateOfBirth") */ - private $dateOfBirth; + private ?\DateTime $dateOfBirth = null; /** - * @var string|null * @SerializedName("LegalForm") */ - private $legalForm; + private ?string $legalForm = null; /** - * @var string|null * @SerializedName("Street2") */ - private $street2; + private ?string $street2 = null; /** - * @var string|null * @SerializedName("CountrySubdivisionCode") */ - private $countrySubdivisionCode; + private ?string $countrySubdivisionCode = null; /** - * @var string|null * @SerializedName("Phone") */ - private $phone; + private ?string $phone = null; /** - * @var string|null * @SerializedName("VatNumber") */ - private $vatNumber; + private ?string $vatNumber = null; public function getFirstName(): ?string { diff --git a/lib/SaferpayJson/Request/Container/AddressForm.php b/lib/SaferpayJson/Request/Container/AddressForm.php index a9a61ea..d03228e 100644 --- a/lib/SaferpayJson/Request/Container/AddressForm.php +++ b/lib/SaferpayJson/Request/Container/AddressForm.php @@ -25,16 +25,15 @@ final class AddressForm public const ADDRESS_SOURCE_PREFER_PAYMENTMETHOD = 'PREFER_PAYMENTMETHOD'; /** - * @var string * @SerializedName("AddressSource") */ - private $addressSource; + private string $addressSource; /** * @var array|null * @SerializedName("MandatoryFields") */ - private $mandatoryFields = []; + private ?array $mandatoryFields = []; public function __construct(string $addressSource) { diff --git a/lib/SaferpayJson/Request/Container/Alias.php b/lib/SaferpayJson/Request/Container/Alias.php index 08a101b..1e08273 100644 --- a/lib/SaferpayJson/Request/Container/Alias.php +++ b/lib/SaferpayJson/Request/Container/Alias.php @@ -9,16 +9,14 @@ final class Alias { /** - * @var string * @SerializedName("Id") */ - private $id; + private string $id; /** - * @var string|null * @SerializedName("VerificationCode") */ - private $verificationCode; + private ?string $verificationCode = null; public function __construct(string $id) { diff --git a/lib/SaferpayJson/Request/Container/Alipay.php b/lib/SaferpayJson/Request/Container/Alipay.php index 3b9cf2a..d8dc840 100644 --- a/lib/SaferpayJson/Request/Container/Alipay.php +++ b/lib/SaferpayJson/Request/Container/Alipay.php @@ -9,10 +9,9 @@ final class Alipay { /** - * @var string * @SerializedName("LocalWallet") */ - private $localWallet; + private string $localWallet; public function __construct(string $localWallet) { diff --git a/lib/SaferpayJson/Request/Container/Amount.php b/lib/SaferpayJson/Request/Container/Amount.php index 203cf72..359bb75 100644 --- a/lib/SaferpayJson/Request/Container/Amount.php +++ b/lib/SaferpayJson/Request/Container/Amount.php @@ -10,17 +10,15 @@ final class Amount { /** - * @var int * @SerializedName("Value") * @Type("integer") */ - private $value; + private int $value; /** - * @var string * @SerializedName("CurrencyCode") */ - private $currencyCode; + private string $currencyCode; public function __construct(int $value, string $currencyCode) { diff --git a/lib/SaferpayJson/Request/Container/ApplePay.php b/lib/SaferpayJson/Request/Container/ApplePay.php index c276a97..c7630fb 100644 --- a/lib/SaferpayJson/Request/Container/ApplePay.php +++ b/lib/SaferpayJson/Request/Container/ApplePay.php @@ -9,10 +9,9 @@ final class ApplePay { /** - * @var string * @SerializedName("PaymentToken") */ - private $paymentToken; + private string $paymentToken; public function __construct(string $paymentToken) { diff --git a/lib/SaferpayJson/Request/Container/Attachment.php b/lib/SaferpayJson/Request/Container/Attachment.php index bdd37d8..6629887 100644 --- a/lib/SaferpayJson/Request/Container/Attachment.php +++ b/lib/SaferpayJson/Request/Container/Attachment.php @@ -9,16 +9,14 @@ final class Attachment { /** - * @var string * @SerializedName("ContentType") */ - private $contentType; + private string $contentType; /** - * @var string * @SerializedName("Body") */ - private $body; + private string $body; public function __construct(string $contentType, string $body) { diff --git a/lib/SaferpayJson/Request/Container/Authentication.php b/lib/SaferpayJson/Request/Container/Authentication.php index 7f35905..6baf269 100644 --- a/lib/SaferpayJson/Request/Container/Authentication.php +++ b/lib/SaferpayJson/Request/Container/Authentication.php @@ -16,16 +16,14 @@ final class Authentication public const THREEDSCHALLENGE_AVOID = 'AVOID'; /** - * @var string|null * @SerializedName("Exemption") */ - private $exemption; + private ?string $exemption = null; /** - * @var string|null * @SerializedName("ThreeDsChallenge") */ - private $threeDsChallenge; + private ?string $threeDsChallenge = null; public function getExemption(): ?string { diff --git a/lib/SaferpayJson/Request/Container/BankAccount.php b/lib/SaferpayJson/Request/Container/BankAccount.php index 897963f..3c4c742 100644 --- a/lib/SaferpayJson/Request/Container/BankAccount.php +++ b/lib/SaferpayJson/Request/Container/BankAccount.php @@ -9,28 +9,24 @@ final class BankAccount { /** - * @var string * @SerializedName("Iban") */ - private $iban; + private string $iban; /** - * @var string|null * @SerializedName("HolderName") */ - private $holderName; + private ?string $holderName = null; /** - * @var string|null * @SerializedName("BIC") */ - private $bic; + private ?string $bic = null; /** - * @var string|null * @SerializedName("BankName") */ - private $bankName; + private ?string $bankName = null; public function __construct(string $iban) { diff --git a/lib/SaferpayJson/Request/Container/Billpay.php b/lib/SaferpayJson/Request/Container/Billpay.php index 47c5bea..96dd8ed 100644 --- a/lib/SaferpayJson/Request/Container/Billpay.php +++ b/lib/SaferpayJson/Request/Container/Billpay.php @@ -9,10 +9,9 @@ final class Billpay { /** - * @var int|null * @SerializedName("DelayInDays") */ - private $delayInDays; + private ?int $delayInDays = null; public function getDelayInDays(): ?int { diff --git a/lib/SaferpayJson/Request/Container/Brand.php b/lib/SaferpayJson/Request/Container/Brand.php index 8dce9c7..9d55d76 100644 --- a/lib/SaferpayJson/Request/Container/Brand.php +++ b/lib/SaferpayJson/Request/Container/Brand.php @@ -9,16 +9,14 @@ final class Brand { /** - * @var string|null * @SerializedName("PaymentMethod") */ - private $paymentMethod; + private ?string $paymentMethod = null; /** - * @var string|null * @SerializedName("Name") */ - private $name; + private ?string $name = null; public function getPaymentMethod(): ?string { diff --git a/lib/SaferpayJson/Request/Container/CaptureReference.php b/lib/SaferpayJson/Request/Container/CaptureReference.php index 55d16d7..a64d41c 100644 --- a/lib/SaferpayJson/Request/Container/CaptureReference.php +++ b/lib/SaferpayJson/Request/Container/CaptureReference.php @@ -9,28 +9,24 @@ final class CaptureReference { /** - * @var string|null * @SerializedName("CaptureId") */ - private $captureId; + private ?string $captureId = null; /** - * @var string|null * @SerializedName("TransactionId") */ - private $transactionId; + private ?string $transactionId = null; /** - * @var string|null * @SerializedName("OrderId") */ - private $orderId; + private ?string $orderId = null; /** - * @var string|null * @SerializedName("OrderPartId") */ - private $orderPartId; + private ?string $orderPartId = null; public function getCaptureId(): ?string { diff --git a/lib/SaferpayJson/Request/Container/Card.php b/lib/SaferpayJson/Request/Container/Card.php index 272d608..e542324 100644 --- a/lib/SaferpayJson/Request/Container/Card.php +++ b/lib/SaferpayJson/Request/Container/Card.php @@ -10,36 +10,31 @@ final class Card { /** - * @var string|null * @SerializedName("Number") */ - private $number; + private ?string $number = null; /** - * @var int|null * @SerializedName("ExpYear") * @Type("integer") */ - private $expYear; + private ?int $expYear = null; /** - * @var int|null * @SerializedName("ExpMonth") * @Type("integer") */ - private $expMonth; + private ?int $expMonth = null; /** - * @var string|null * @SerializedName("HolderName") */ - private $holderName; + private ?string $holderName = null; /** - * @var string|null * @SerializedName("CountryCode") */ - private $countryCode; + private ?string $countryCode = null; public function getNumber(): ?string { diff --git a/lib/SaferpayJson/Request/Container/CardForm.php b/lib/SaferpayJson/Request/Container/CardForm.php index fe75081..88f71b2 100644 --- a/lib/SaferpayJson/Request/Container/CardForm.php +++ b/lib/SaferpayJson/Request/Container/CardForm.php @@ -12,10 +12,9 @@ final class CardForm public const HOLDER_NAME_MANDATORY = 'MANDATORY'; /** - * @var string|null * @SerializedName("HolderName") */ - private $holderName; + private ?string $holderName = null; public function getHolderName(): ?string { diff --git a/lib/SaferpayJson/Request/Container/Check.php b/lib/SaferpayJson/Request/Container/Check.php index 58a03ed..d80279a 100644 --- a/lib/SaferpayJson/Request/Container/Check.php +++ b/lib/SaferpayJson/Request/Container/Check.php @@ -12,16 +12,14 @@ final class Check public const TYPE_ONLINE_STRONG = 'ONLINE_STRONG'; /** - * @var string|null * @SerializedName("Type") */ - private $type; + private ?string $type = null; /** - * @var string|null * @SerializedName("TerminalId") */ - private $terminalId; + private ?string $terminalId = null; public function getType(): ?string { diff --git a/lib/SaferpayJson/Request/Container/ChosenPlan.php b/lib/SaferpayJson/Request/Container/ChosenPlan.php index 0a2b8f7..330ff33 100644 --- a/lib/SaferpayJson/Request/Container/ChosenPlan.php +++ b/lib/SaferpayJson/Request/Container/ChosenPlan.php @@ -10,51 +10,44 @@ final class ChosenPlan { /** - * @var int * @SerializedName("NumberOfInstallments") * @Type("int") */ - private $numberOfInstallments; + private int $numberOfInstallments; /** - * @var string|null * @SerializedName("InterestRate") */ - private $interestRate; + private ?string $interestRate = null; /** - * @var Amount|null * @SerializedName("InstallmentFee") * @Type("Ticketpark\SaferpayJson\Request\Container\Amount") */ - private $installmentFee; + private ?Amount $installmentFee = null; /** - * @var string|null * @SerializedName("AnnualPercentageRate") */ - private $annualPercentageRate; + private ?string $annualPercentageRate = null; /** - * @var Amount|null * @SerializedName("FirstInstallmentAmount") * @Type("Ticketpark\SaferpayJson\Request\Container\Amount") */ - private $firstInstallmentAmount; + private ?Amount $firstInstallmentAmount = null; /** - * @var Amount|null * @SerializedName("SubsequentInstallmentAmount") * @Type("Ticketpark\SaferpayJson\Request\Container\Amount") */ - private $subsequentInstallmentAmount; + private ?Amount $subsequentInstallmentAmount = null; /** - * @var Amount|null * @SerializedName("TotalAmountDue") * @Type("Ticketpark\SaferpayJson\Request\Container\Amount") */ - private $totalAmountDue; + private ?Amount $totalAmountDue = null; public function __construct(int $numberOfInstallments) { diff --git a/lib/SaferpayJson/Request/Container/ClientInfo.php b/lib/SaferpayJson/Request/Container/ClientInfo.php index 247f6ce..2bfce19 100644 --- a/lib/SaferpayJson/Request/Container/ClientInfo.php +++ b/lib/SaferpayJson/Request/Container/ClientInfo.php @@ -9,16 +9,14 @@ final class ClientInfo { /** - * @var string|null * @SerializedName("ShopInfo") */ - private $shopInfo; + private ?string $shopInfo = null; /** - * @var string|null * @SerializedName("OsInfo") */ - private $osInfo; + private ?string $osInfo = null; public function getShopInfo(): ?string { diff --git a/lib/SaferpayJson/Request/Container/GooglePay.php b/lib/SaferpayJson/Request/Container/GooglePay.php index 7d23c3d..acadb66 100644 --- a/lib/SaferpayJson/Request/Container/GooglePay.php +++ b/lib/SaferpayJson/Request/Container/GooglePay.php @@ -9,10 +9,9 @@ final class GooglePay { /** - * @var string * @SerializedName("PaymentToken") */ - private $paymentToken; + private string $paymentToken; public function __construct(string $paymentToken) { diff --git a/lib/SaferpayJson/Request/Container/Ideal.php b/lib/SaferpayJson/Request/Container/Ideal.php index a246d97..cc0e305 100644 --- a/lib/SaferpayJson/Request/Container/Ideal.php +++ b/lib/SaferpayJson/Request/Container/Ideal.php @@ -9,10 +9,9 @@ final class Ideal { /** - * @var string * @SerializedName("IssuerId") */ - private $issuerId; + private string $issuerId; public function __construct(string $issuerId) { diff --git a/lib/SaferpayJson/Request/Container/Installment.php b/lib/SaferpayJson/Request/Container/Installment.php index 60a9950..ded078d 100644 --- a/lib/SaferpayJson/Request/Container/Installment.php +++ b/lib/SaferpayJson/Request/Container/Installment.php @@ -9,10 +9,9 @@ final class Installment { /** - * @var bool * @SerializedName("Initial") */ - private $initial; + private bool $initial; public function __construct(bool $initial) { diff --git a/lib/SaferpayJson/Request/Container/IssuerReference.php b/lib/SaferpayJson/Request/Container/IssuerReference.php index a239cfa..bd29fc5 100644 --- a/lib/SaferpayJson/Request/Container/IssuerReference.php +++ b/lib/SaferpayJson/Request/Container/IssuerReference.php @@ -10,18 +10,16 @@ final class IssuerReference { /** - * @var string * @SerializedName("TransactionStamp") * @Type("string") */ - private $transactionStamp; + private string $transactionStamp; /** - * @var string|null * @SerializedName("SettlementDate") * @Type("string") */ - private $settlementDate; + private ?string $settlementDate = null; public function __construct(string $transactionStamp) { diff --git a/lib/SaferpayJson/Request/Container/Klarna.php b/lib/SaferpayJson/Request/Container/Klarna.php index 48796ce..e4bf627 100644 --- a/lib/SaferpayJson/Request/Container/Klarna.php +++ b/lib/SaferpayJson/Request/Container/Klarna.php @@ -10,11 +10,10 @@ final class Klarna { /** - * @var Attachment * @SerializedName("Attachment") * @Type("Ticketpark\SaferpayJson\Request\Container\Attachment") */ - private $attachment; + private Attachment $attachment; public function __construct(Attachment $attachment) { diff --git a/lib/SaferpayJson/Request/Container/Marketplace.php b/lib/SaferpayJson/Request/Container/Marketplace.php index b3798f2..d704111 100644 --- a/lib/SaferpayJson/Request/Container/Marketplace.php +++ b/lib/SaferpayJson/Request/Container/Marketplace.php @@ -9,22 +9,19 @@ final class Marketplace { /** - * @var string * @SerializedName("SubmerchantId") */ - private $submerchantId; + private string $submerchantId; /** - * @var Amount|null * @SerializedName("Fee") */ - private $fee; + private ?Amount $fee = null; /** - * @var Amount|null * @SerializedName("FeeRefund") */ - private $feeRefund; + private ?Amount $feeRefund = null; public function __construct(string $submerchantId) { diff --git a/lib/SaferpayJson/Request/Container/MastercardIssuerInstallments.php b/lib/SaferpayJson/Request/Container/MastercardIssuerInstallments.php index 74adbe5..2446667 100644 --- a/lib/SaferpayJson/Request/Container/MastercardIssuerInstallments.php +++ b/lib/SaferpayJson/Request/Container/MastercardIssuerInstallments.php @@ -10,11 +10,10 @@ final class MastercardIssuerInstallments { /** - * @var ChosenPlan|null * @SerializedName("ChosenPlan") * @Type("array") */ - private $chosenPlan; + private ?ChosenPlan $chosenPlan = null; public function getChosenPlan(): ?ChosenPlan { diff --git a/lib/SaferpayJson/Request/Container/Notification.php b/lib/SaferpayJson/Request/Container/Notification.php index 9033b19..c1e7a50 100644 --- a/lib/SaferpayJson/Request/Container/Notification.php +++ b/lib/SaferpayJson/Request/Container/Notification.php @@ -12,25 +12,22 @@ final class Notification * @var array|null * @SerializedName("MerchantEmails") */ - private $merchantEmails = []; + private ?array $merchantEmails = []; /** - * @var string|null * @SerializedName("PayerEmail") */ - private $payerEmail; + private ?string $payerEmail = null; /** - * @var string|null * @SerializedName("SuccessNotifyUrl") */ - private $successNotifyUrl; + private ?string $successNotifyUrl = null; /** - * @var string|null * @SerializedName("FailNotifyUrl") */ - private $failNotifyUrl; + private ?string $failNotifyUrl = null; public function getMerchantEmails(): ?array { diff --git a/lib/SaferpayJson/Request/Container/Options.php b/lib/SaferpayJson/Request/Container/Options.php index c190bf6..e348dce 100644 --- a/lib/SaferpayJson/Request/Container/Options.php +++ b/lib/SaferpayJson/Request/Container/Options.php @@ -9,16 +9,14 @@ final class Options { /** - * @var bool|null * @SerializedName("PreAuth") */ - private $preAuth; + private ?bool $preAuth = null; /** - * @var bool|null * @SerializedName("AllowPartialAuthorization") */ - private $allowPartialAuthorization; + private ?bool $allowPartialAuthorization = null; public function isPreAuth(): ?bool { diff --git a/lib/SaferpayJson/Request/Container/Order.php b/lib/SaferpayJson/Request/Container/Order.php index b709ed8..c386938 100644 --- a/lib/SaferpayJson/Request/Container/Order.php +++ b/lib/SaferpayJson/Request/Container/Order.php @@ -12,7 +12,7 @@ final class Order * @var array|null * @SerializedName("Items") */ - private $items = []; + private ?array $items = []; public function getItems(): ?array { diff --git a/lib/SaferpayJson/Request/Container/OrderItem.php b/lib/SaferpayJson/Request/Container/OrderItem.php index c6d7cf4..19dfb4e 100644 --- a/lib/SaferpayJson/Request/Container/OrderItem.php +++ b/lib/SaferpayJson/Request/Container/OrderItem.php @@ -18,88 +18,74 @@ final class OrderItem public const TYPE_SURCHARGE = 'SURCHARGE'; /** - * @var string|null * @SerializedName("Type") */ - private $type; + private ?string $type = null; /** - * @var string|null * @SerializedName("Id") */ - private $id; + private ?string $id = null; /** - * @var string|null * @SerializedName("VariantId") */ - private $variantId; + private ?string $variantId = null; /** - * @var string|null * @SerializedName("Name") */ - private $name; + private ?string $name = null; /** - * @var string|null * @SerializedName("CategoryName") */ - private $categoryName; + private ?string $categoryName = null; /** - * @var string|null * @SerializedName("Description") */ - private $description; + private ?string $description = null; /** - * @var string|null * @SerializedName("Quantity") */ - private $quantity; + private ?string $quantity = null; /** - * @var string|null * @SerializedName("UnitPrice") */ - private $unitPrice; + private ?string $unitPrice = null; /** - * @var string|null * @SerializedName("IsPreOrder") */ - private $isPreOrder; + private ?string $isPreOrder = null; /** - * @var string|null * @SerializedName("TaxRate") */ - private $taxRate; + private ?string $taxRate = null; /** - * @var string|null * @SerializedName("TaxAmount") */ - private $taxAmount; + private ?string $taxAmount = null; /** - * @var string|null * @SerializedName("DiscountAmount") */ - private $discountAmount; + private ?string $discountAmount = null; /** - * @var string|null * @SerializedName("ProductUrl") */ - private $productUrl; + private ?string $productUrl = null; /** - * @var string|null * @SerializedName("ImageUrl") */ - private $imageUrl; + private ?string $imageUrl = null; public function getType(): ?string diff --git a/lib/SaferpayJson/Request/Container/Payer.php b/lib/SaferpayJson/Request/Container/Payer.php index 5223950..1502412 100644 --- a/lib/SaferpayJson/Request/Container/Payer.php +++ b/lib/SaferpayJson/Request/Container/Payer.php @@ -10,35 +10,30 @@ final class Payer { /** - * @var string|null * @SerializedName("Id") */ - private $id; + private ?string $id = null; /** - * @var string|null * @SerializedName("IpAddress") */ - private $ipAddress; + private ?string $ipAddress = null; /** - * @var string|null * @SerializedName("LanguageCode") */ - private $languageCode; + private ?string $languageCode = null; /** - * @var Address|null * @SerializedName("DeliveryAddress") * @Type("Ticketpark\SaferpayJson\Request\Container\Address") */ - private $deliveryAddress; + private ?Address $deliveryAddress = null; /** - * @var Address|null * @SerializedName("BillingAddress") * @Type("Ticketpark\SaferpayJson\Request\Container\Address") */ - private $billingAddress; + private ?Address $billingAddress = null; public function getId(): ?string { diff --git a/lib/SaferpayJson/Request/Container/PayerProfile.php b/lib/SaferpayJson/Request/Container/PayerProfile.php index 4b4c479..e076e12 100644 --- a/lib/SaferpayJson/Request/Container/PayerProfile.php +++ b/lib/SaferpayJson/Request/Container/PayerProfile.php @@ -15,91 +15,77 @@ final class PayerProfile public const GENDER_COMPANY = "COMPANY"; /** - * @var bool|null * @SerializedName("HasAccount") */ - private $hasAccount; + private ?bool $hasAccount = null; /** - * @var bool|null * @SerializedName("HasPassword") */ - private $hasPassword; + private ?bool $hasPassword = null; /** - * @var bool|null * @SerializedName("PasswordForgotten") */ - private $passwordForgotten; + private ?bool $passwordForgotten = null; /** - * @var string|null * @SerializedName("FirstName") */ - private $firstName; + private ?string $firstName = null; /** - * @var string|null * @SerializedName("LastName") */ - private $lastName; + private ?string $lastName = null; /** - * @var string|null * @SerializedName("Company") */ - private $company; + private ?string $company = null; /** - * @var string|null * @SerializedName("DateOfBirth") */ - private $dateOfBirth; + private ?string $dateOfBirth = null; /** - * @var \DateTime|null * @SerializedName("LastLoginDate") * @Type("DateTime<'Y-m-d\TH:i:s.uT'>") */ - private $lastLoginDate; + private ?\DateTime $lastLoginDate = null; /** - * @var string|null * @SerializedName("Gender") */ - private $gender; + private ?string $gender = null; /** - * @var \DateTime|null * @SerializedName("CreationDate") * @Type("DateTime<'Y-m-d\TH:i:s.uT'>") */ - private $creationDate; + private ?\DateTime $creationDate = null; /** - * @var \DateTime|null * @SerializedName("PasswordLastChangeDate") * @Type("DateTime<'Y-m-d\TH:i:s.uT'>") */ - private $passwordLastChangeDate; + private ?\DateTime $passwordLastChangeDate = null; /** - * @var string|null * @SerializedName("Email") */ - private $email; + private ?string $email = null; /** - * @var string|null * @SerializedName("SecondaryEmail") */ - private $secondaryEmail; + private ?string $secondaryEmail = null; /** - * @var Phone|null * @SerializedName("Phone") */ - private $phone; + private ?Phone $phone = null; public function getHasAccount(): ?bool { diff --git a/lib/SaferpayJson/Request/Container/Payment.php b/lib/SaferpayJson/Request/Container/Payment.php index 8842d03..a73d603 100644 --- a/lib/SaferpayJson/Request/Container/Payment.php +++ b/lib/SaferpayJson/Request/Container/Payment.php @@ -9,52 +9,44 @@ final class Payment { /** - * @var Amount * @SerializedName("Amount") */ - private $amount; + private Amount $amount; /** - * @var string|null * @SerializedName("OrderId") */ - private $orderId; + private ?string $orderId = null; /** - * @var string|null * @SerializedName("PayerNote") */ - private $payerNote; + private ?string $payerNote = null; /** - * @var string|null * @SerializedName("Description") */ - private $description; + private ?string $description = null; /** - * @var string|null * @SerializedName("MandateId") */ - private $mandateId; + private ?string $mandateId = null; /** - * @var Options|null * @SerializedName("Options") */ - private $options; + private ?Options $options = null; /** - * @var Recurring|null * @SerializedName("Recurring") */ - private $recurring; + private ?Recurring $recurring = null; /** - * @var Installment|null * @SerializedName("Installment") */ - private $installment; + private ?Installment $installment = null; public function __construct(Amount $amount) { diff --git a/lib/SaferpayJson/Request/Container/PaymentMeans.php b/lib/SaferpayJson/Request/Container/PaymentMeans.php index 0236177..2800711 100644 --- a/lib/SaferpayJson/Request/Container/PaymentMeans.php +++ b/lib/SaferpayJson/Request/Container/PaymentMeans.php @@ -10,79 +10,68 @@ final class PaymentMeans { /** - * @var Brand|null * @SerializedName("Brand") * @Type("Ticketpark\SaferpayJson\Request\Container\Brand") */ - private $brand; + private ?Brand $brand = null; /** - * @var string|null * @SerializedName("DisplayText") */ - private $displayText; + private ?string $displayText = null; /** - * @var string|null * @SerializedName("Wallet") */ - private $wallet; + private ?string $wallet = null; /** - * @var Card|null * @SerializedName("Card") * @Type("Ticketpark\SaferpayJson\Request\Container\Card") */ - private $card; + private ?Card $card = null; /** - * @var BankAccount|null * @SerializedName("BankAccount") * @Type("Ticketpark\SaferpayJson\Request\Container\BankAccount") */ - private $bankAccount; + private ?BankAccount $bankAccount = null; /** - * @var Twint|null * @SerializedName("Twint") * @Type("Ticketpark\SaferpayJson\Request\Container\Twint") */ - private $twint; + private ?Twint $twint = null; /** - * @var SaferpayFields|null * @SerializedName("SaferpayFields") * @Type("Ticketpark\SaferpayJson\Request\Container\SaferpayFields") */ - private $saferpayFields; + private ?SaferpayFields $saferpayFields = null; /** - * @var Alias|null * @SerializedName("Alias") * @Type("Ticketpark\SaferpayJson\Request\Container\Alias") */ - private $alias; + private ?Alias $alias = null; /** - * @var SchemeToken|null * @SerializedName("SchemeToken") * @Type("Ticketpark\SaferpayJson\Request\Container\SchemeToken") */ - private $schemeToken; + private ?SchemeToken $schemeToken = null; /** - * @var ApplePay|null * @SerializedName("ApplePay") * @Type("Ticketpark\SaferpayJson\Request\Container\ApplePay") */ - private $applePay; + private ?ApplePay $applePay = null; /** - * @var GooglePay|null * @SerializedName("GooglePay") * @Type("Ticketpark\SaferpayJson\Request\Container\GooglePay") */ - private $googlePay; + private ?GooglePay $googlePay = null; public function getBrand(): ?Brand { diff --git a/lib/SaferpayJson/Request/Container/PaymentMethodsOptions.php b/lib/SaferpayJson/Request/Container/PaymentMethodsOptions.php index 026c0ea..4829e3f 100644 --- a/lib/SaferpayJson/Request/Container/PaymentMethodsOptions.php +++ b/lib/SaferpayJson/Request/Container/PaymentMethodsOptions.php @@ -10,25 +10,22 @@ final class PaymentMethodsOptions { /** - * @var Alipay|null * @SerializedName("Alipay") * @Type("Ticketpark\SaferpayJson\Request\Container\Alipay") */ - private $alipay; + private ?Alipay $alipay = null; /** - * @var Ideal|null * @SerializedName("Ideal") * @Type("Ticketpark\SaferpayJson\Request\Container\Ideal") */ - private $ideal; + private ?Ideal $ideal = null; /** - * @var Klarna|null * @SerializedName("Klarna") * @Type("Ticketpark\SaferpayJson\Request\Container\Klarna") */ - private $klarna; + private ?Klarna $klarna = null; public function getAlipay(): ?Alipay { diff --git a/lib/SaferpayJson/Request/Container/PendingNotification.php b/lib/SaferpayJson/Request/Container/PendingNotification.php index 204954f..254048b 100644 --- a/lib/SaferpayJson/Request/Container/PendingNotification.php +++ b/lib/SaferpayJson/Request/Container/PendingNotification.php @@ -12,13 +12,12 @@ final class PendingNotification * @var array|null * @SerializedName("MerchantEmails") */ - private $merchantEmails = []; + private ?array $merchantEmails = []; /** - * @var string|null * @SerializedName("NotifyUrl") */ - private $notifyUrl; + private ?string $notifyUrl = null; public function getMerchantEmails(): ?array { diff --git a/lib/SaferpayJson/Request/Container/Phone.php b/lib/SaferpayJson/Request/Container/Phone.php index 2ad0847..97a4acd 100644 --- a/lib/SaferpayJson/Request/Container/Phone.php +++ b/lib/SaferpayJson/Request/Container/Phone.php @@ -9,22 +9,19 @@ final class Phone { /** - * @var string|null * @SerializedName("Main") */ - private $main; + private ?string $main = null; /** - * @var string|null * @SerializedName("Mobile") */ - private $mobile; + private ?string $mobile = null; /** - * @var string|null * @SerializedName("Work") */ - private $work; + private ?string $work = null; public function getMain(): ?string { diff --git a/lib/SaferpayJson/Request/Container/Recurring.php b/lib/SaferpayJson/Request/Container/Recurring.php index 7b522e2..da2e8cc 100644 --- a/lib/SaferpayJson/Request/Container/Recurring.php +++ b/lib/SaferpayJson/Request/Container/Recurring.php @@ -9,10 +9,9 @@ final class Recurring { /** - * @var bool * @SerializedName("Initial") */ - private $initial; + private bool $initial; public function __construct(bool $initial = true) { diff --git a/lib/SaferpayJson/Request/Container/RedirectNotifyUrls.php b/lib/SaferpayJson/Request/Container/RedirectNotifyUrls.php index fac3ba2..1893353 100644 --- a/lib/SaferpayJson/Request/Container/RedirectNotifyUrls.php +++ b/lib/SaferpayJson/Request/Container/RedirectNotifyUrls.php @@ -9,16 +9,14 @@ final class RedirectNotifyUrls { /** - * @var string * @SerializedName("Success") */ - private $success; + private string $success; /** - * @var string * @SerializedName("Fail") */ - private $fail; + private string $fail; public function __construct(string $success, string $fail) { diff --git a/lib/SaferpayJson/Request/Container/Refund.php b/lib/SaferpayJson/Request/Container/Refund.php index d92bb18..08df477 100644 --- a/lib/SaferpayJson/Request/Container/Refund.php +++ b/lib/SaferpayJson/Request/Container/Refund.php @@ -10,29 +10,25 @@ final class Refund { /** - * @var Amount|null * @SerializedName("Amount") * @Type("Ticketpark\SaferpayJson\Request\Container\Amount") */ - private $amount; + private ?Amount $amount = null; /** - * @var string|null * @SerializedName("OrderId") */ - private $orderId; + private ?string $orderId = null; /** - * @var string|null * @SerializedName("Description") */ - private $description; + private ?string $description = null; /** - * @var bool|null * @SerializedName("RestrictRefundAmountToCapturedAmount") */ - private $restrictRefundAmountToCapturedAmount; + private ?bool $restrictRefundAmountToCapturedAmount = null; public function __construct(?Amount $amount) { diff --git a/lib/SaferpayJson/Request/Container/RegisterAlias.php b/lib/SaferpayJson/Request/Container/RegisterAlias.php index cc56d95..76e29f4 100644 --- a/lib/SaferpayJson/Request/Container/RegisterAlias.php +++ b/lib/SaferpayJson/Request/Container/RegisterAlias.php @@ -14,23 +14,20 @@ final class RegisterAlias public const ID_GENERATOR_RANDOM_UNIQUE = 'RANDOM_UNIQUE'; /** - * @var string * @SerializedName("IdGenerator") */ - private $idGenerator; + private string $idGenerator; /** - * @var string|null * @SerializedName("Id") */ - private $id; + private ?string $id = null; /** - * @var int|null * @SerializedName("Lifetime") * @Type("integer") */ - private $lifetime; + private ?int $lifetime = null; public function __construct(string $idGenerator) { diff --git a/lib/SaferpayJson/Request/Container/RequestHeader.php b/lib/SaferpayJson/Request/Container/RequestHeader.php index 16c4a5e..ec40baf 100644 --- a/lib/SaferpayJson/Request/Container/RequestHeader.php +++ b/lib/SaferpayJson/Request/Container/RequestHeader.php @@ -9,34 +9,29 @@ final class RequestHeader { /** - * @var string * @SerializedName("SpecVersion") */ - private $specVersion = '1.31'; + private string $specVersion = '1.31'; /** - * @var string * @SerializedName("CustomerId") */ - private $customerId; + private string $customerId; /** - * @var string|null * @SerializedName("RequestId") */ - private $requestId; + private ?string $requestId = null; /** - * @var int * @SerializedName("RetryIndicator") */ - private $retryIndicator = 0; + private int $retryIndicator = 0; /** - * @var ClientInfo|null * @SerializedName("ClientInfo") */ - private $clientInfo; + private ?ClientInfo $clientInfo = null; public function __construct(string $customerId, string $requestId = null, int $retryIndicator = 0) { diff --git a/lib/SaferpayJson/Request/Container/ReturnUrls.php b/lib/SaferpayJson/Request/Container/ReturnUrls.php index ab8a511..0abd559 100644 --- a/lib/SaferpayJson/Request/Container/ReturnUrls.php +++ b/lib/SaferpayJson/Request/Container/ReturnUrls.php @@ -9,22 +9,19 @@ final class ReturnUrls { /** - * @var string * @SerializedName("Success") */ - private $success; + private string $success; /** - * @var string * @SerializedName("Fail") */ - private $fail; + private string $fail; /** - * @var string|null * @SerializedName("Abort") */ - private $abort; + private ?string $abort = null; public function __construct(string $success, string $fail, string $abort = null) { diff --git a/lib/SaferpayJson/Request/Container/RiskFactors.php b/lib/SaferpayJson/Request/Container/RiskFactors.php index e338bcb..9c2376d 100644 --- a/lib/SaferpayJson/Request/Container/RiskFactors.php +++ b/lib/SaferpayJson/Request/Container/RiskFactors.php @@ -16,29 +16,25 @@ final class RiskFactors public const DELIVERY_TYPE_HQ = "HQ"; /** - * @var string|null * @SerializedName("DeliveryType") */ - private $deliveryType; + private ?string $deliveryType = null; /** - * @var PayerProfile|null * @SerializedName("PayerProfile") * @Type("Ticketpark\SaferpayJson\Request\Container\PayerProfile") */ - private $payerProfile; + private ?PayerProfile $payerProfile = null; /** - * @var bool|null * @SerializedName("IsB2B") */ - private $isB2B; + private ?bool $isB2B = null; /** - * @var string|null * @SerializedName("DeviceFingerprint") */ - private $deviceFingerprint; + private ?string $deviceFingerprint = null; public function getDeliveryType(): ?string { diff --git a/lib/SaferpayJson/Request/Container/SaferpayFields.php b/lib/SaferpayJson/Request/Container/SaferpayFields.php index 4162213..ae7be43 100644 --- a/lib/SaferpayJson/Request/Container/SaferpayFields.php +++ b/lib/SaferpayJson/Request/Container/SaferpayFields.php @@ -9,10 +9,9 @@ final class SaferpayFields { /** - * @var string * @SerializedName("Token") */ - private $token; + private string $token; public function __construct(string $token) { diff --git a/lib/SaferpayJson/Request/Container/SchemeToken.php b/lib/SaferpayJson/Request/Container/SchemeToken.php index 1b958f5..5443e45 100644 --- a/lib/SaferpayJson/Request/Container/SchemeToken.php +++ b/lib/SaferpayJson/Request/Container/SchemeToken.php @@ -10,38 +10,33 @@ final class SchemeToken { /** - * @var string * @SerializedName("Number") * @Type("string") */ - private $number; + private string $number; /** - * @var int * @SerializedName("ExpMonth") * @Type("integer") */ - private $expMonth; + private int $expMonth; /** - * @var int * @SerializedName("ExpYear") * @Type("integer") */ - private $expYear; + private int $expYear; /** - * @var string * @SerializedName("AuthValue") * @Type("string") */ - private $authValue; + private string $authValue; /** - * @var string|null * @SerializedName("Eci") */ - private $eci; + private ?string $eci = null; public function __construct(string $number, int $expMonth, int $expYear, string $authValue) { diff --git a/lib/SaferpayJson/Request/Container/Styling.php b/lib/SaferpayJson/Request/Container/Styling.php index fd4b9e2..4b71e93 100644 --- a/lib/SaferpayJson/Request/Container/Styling.php +++ b/lib/SaferpayJson/Request/Container/Styling.php @@ -13,22 +13,19 @@ final class Styling public const THEME_NONE = 'NONE'; /** - * @var string|null * @SerializedName("CssUrl") */ - private $cssUrl; + private ?string $cssUrl = null; /** - * @var bool|null * @SerializedName("ContentSecurityEnabled") */ - private $contentSecurityEnabled; + private ?bool $contentSecurityEnabled = null; /** - * @var string|null * @SerializedName("Theme") */ - private $theme; + private ?string $theme = null; public function getCssUrl(): ?string { diff --git a/lib/SaferpayJson/Request/Container/TransactionReference.php b/lib/SaferpayJson/Request/Container/TransactionReference.php index feab0bb..3811a81 100644 --- a/lib/SaferpayJson/Request/Container/TransactionReference.php +++ b/lib/SaferpayJson/Request/Container/TransactionReference.php @@ -9,16 +9,14 @@ final class TransactionReference { /** - * @var string|null * @SerializedName("TransactionId") */ - private $transactionId; + private ?string $transactionId = null; /** - * @var string|null * @SerializedName("OrderId") */ - private $orderId; + private ?string $orderId = null; public function getTransactionId(): ?string { diff --git a/lib/SaferpayJson/Request/Container/Twint.php b/lib/SaferpayJson/Request/Container/Twint.php index 4a517e0..af00bba 100644 --- a/lib/SaferpayJson/Request/Container/Twint.php +++ b/lib/SaferpayJson/Request/Container/Twint.php @@ -10,11 +10,10 @@ final class Twint { /** - * @var \DateTime|null * @SerializedName("CertificateExpirationDate") * @Type("DateTime<'Y-m-d\TH:i:s.uT'>") */ - private $certificateExpirationDate; + private ?\DateTime $certificateExpirationDate = null; public function getCertificateExpirationDate(): ?\DateTime { diff --git a/lib/SaferpayJson/Request/Container/UpdateAlias.php b/lib/SaferpayJson/Request/Container/UpdateAlias.php index 9e3bc61..c2e7c4d 100644 --- a/lib/SaferpayJson/Request/Container/UpdateAlias.php +++ b/lib/SaferpayJson/Request/Container/UpdateAlias.php @@ -10,17 +10,15 @@ final class UpdateAlias { /** - * @var string * @SerializedName("Id") */ - private $id; + private string $id; /** - * @var int|null * @SerializedName("Lifetime") * @Type("integer") */ - private $lifetime; + private ?int $lifetime = null; public function __construct(string $id) { diff --git a/lib/SaferpayJson/Request/Container/UpdatePaymentMeans.php b/lib/SaferpayJson/Request/Container/UpdatePaymentMeans.php index 85d19b8..34cd717 100644 --- a/lib/SaferpayJson/Request/Container/UpdatePaymentMeans.php +++ b/lib/SaferpayJson/Request/Container/UpdatePaymentMeans.php @@ -9,10 +9,9 @@ final class UpdatePaymentMeans { /** - * @var Card * @SerializedName("Card") */ - private $card; + private Card $card; public function __construct(Card $card) { diff --git a/lib/SaferpayJson/Request/Container/Wallet.php b/lib/SaferpayJson/Request/Container/Wallet.php index 8dbf40d..16ffc88 100644 --- a/lib/SaferpayJson/Request/Container/Wallet.php +++ b/lib/SaferpayJson/Request/Container/Wallet.php @@ -34,28 +34,25 @@ final class Wallet public const PAYMENT_METHOD_KLARNA = "KLARNA"; /** - * @var string * @SerializedName("Wallet") */ - private $type; + private string $type; /** * @var array|null * @SerializedName("PaymentMethods") */ - private $paymentMethods; + private ?array $paymentMethods = null; /** - * @var bool|null * @SerializedName("RequestDeliveryAddress") */ - private $requestDeliveryAddress; + private ?bool $requestDeliveryAddress = null; /** - * @var bool|null * @SerializedName("EnableAmountAdjustment") */ - private $enableAmountAdjustment; + private ?bool $enableAmountAdjustment = null; public function __construct(string $type) { diff --git a/lib/SaferpayJson/Request/Exception/SaferpayErrorException.php b/lib/SaferpayJson/Request/Exception/SaferpayErrorException.php index 7d99a68..4472ebb 100644 --- a/lib/SaferpayJson/Request/Exception/SaferpayErrorException.php +++ b/lib/SaferpayJson/Request/Exception/SaferpayErrorException.php @@ -8,8 +8,7 @@ class SaferpayErrorException extends \Exception { - /** @var ErrorResponse */ - private $errorResponse; + private ErrorResponse $errorResponse; public function __construct(ErrorResponse $errorResponse) { diff --git a/lib/SaferpayJson/Request/PaymentPage/AssertRequest.php b/lib/SaferpayJson/Request/PaymentPage/AssertRequest.php index 7d03efd..f9554a7 100644 --- a/lib/SaferpayJson/Request/PaymentPage/AssertRequest.php +++ b/lib/SaferpayJson/Request/PaymentPage/AssertRequest.php @@ -17,10 +17,9 @@ final class AssertRequest extends Request public const RESPONSE_CLASS = AssertResponse::class; /** - * @var string * @SerializedName("Token") */ - private $token; + private string $token; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/PaymentPage/InitializeRequest.php b/lib/SaferpayJson/Request/PaymentPage/InitializeRequest.php index 2857f3e..7ec573d 100644 --- a/lib/SaferpayJson/Request/PaymentPage/InitializeRequest.php +++ b/lib/SaferpayJson/Request/PaymentPage/InitializeRequest.php @@ -62,112 +62,96 @@ final class InitializeRequest extends Request public const CONDITION_IF_ALLOWED_BY_SCHEME = 'IF_ALLOWED_BY_SCHEME'; /** - * @var string * @SerializedName("TerminalId") */ - private $terminalId; + private string $terminalId; /** - * @var Payment * @SerializedName("Payment") */ - private $payment; + private Payment $payment; /** - * @var ReturnUrls * @SerializedName("ReturnUrls") */ - private $returnUrls; + private ReturnUrls $returnUrls; /** - * @var string|null * @SerializedName("ConfigSet") */ - private $configSet; + private ?string $configSet = null; /** * @var array|null * @SerializedName("PaymentMethods") */ - private $paymentMethods; + private ?array $paymentMethods = null; /** - * @var PaymentMethodsOptions|null * @SerializedName("PaymentMethodsOptions") */ - private $paymentMethodsOptions; + private ?PaymentMethodsOptions $paymentMethodsOptions = null; /** - * @var Authentication|null * @SerializedName("Authentication") */ - private $authentication; + private ?Authentication $authentication = null; /** * @var array|null * @SerializedName("Wallets") */ - private $wallets; + private ?array $wallets = null; /** - * @var Payer|null * @SerializedName("Payer") */ - private $payer; + private ?Payer $payer = null; /** - * @var RegisterAlias|null * @SerializedName("RegisterAlias") */ - private $registerAlias; + private ?RegisterAlias $registerAlias = null; /** - * @var Notification|null * @SerializedName("Notification") */ - private $notification; + private ?Notification $notification = null; /** - * @var Styling|null * @SerializedName("Styling") */ - private $styling; + private ?Styling $styling = null; /** - * @var AddressForm|null * @SerializedName("BillingAddressForm") */ - private $billingAddressForm; + private ?AddressForm $billingAddressForm = null; /** - * @var AddressForm|null * @SerializedName("DeliveryAddressForm") */ - private $deliveryAddressForm; + private ?AddressForm $deliveryAddressForm = null; /** - * @var CardForm|null * @SerializedName("CardForm") */ - private $cardForm; + private ?CardForm $cardForm = null; /** - * @var string|null * @SerializedName("Condition") */ - private $condition; + private ?string $condition = null; /** - * @var Order|null * @SerializedName("Order") */ - private $order; + private ?Order $order = null; /** - * @var RiskFactors|null * @SerializedName("RiskFactors") */ - private $riskFactors; + private ?RiskFactors $riskFactors = null; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/Request.php b/lib/SaferpayJson/Request/Request.php index eef5180..d336945 100644 --- a/lib/SaferpayJson/Request/Request.php +++ b/lib/SaferpayJson/Request/Request.php @@ -25,10 +25,9 @@ abstract class Request private const ERROR_RESPONSE_CLASS = ErrorResponse::class; /** - * @var RequestConfig * @Exclude */ - private $requestConfig; + private RequestConfig $requestConfig; abstract public function execute(): Response; diff --git a/lib/SaferpayJson/Request/RequestConfig.php b/lib/SaferpayJson/Request/RequestConfig.php index f05e950..e482ee5 100644 --- a/lib/SaferpayJson/Request/RequestConfig.php +++ b/lib/SaferpayJson/Request/RequestConfig.php @@ -8,30 +8,11 @@ final class RequestConfig { - /** - * @var string - */ - private $apiKey; - - /** - * @var string - */ - private $apiSecret; - - /** - * @var string - */ - private $customerId; - - /** - * @var bool - */ - private $test; - - /** - * @var Client - */ - private $client; + private string $apiKey; + private string $apiSecret; + private string $customerId; + private bool $test; + private ?Client $client = null; public function __construct(string $apiKey, string $apiSecret, string $customerId, bool $test = false) { diff --git a/lib/SaferpayJson/Request/SecureCardData/AliasAssertInsertRequest.php b/lib/SaferpayJson/Request/SecureCardData/AliasAssertInsertRequest.php index eb5e2c2..44dc945 100755 --- a/lib/SaferpayJson/Request/SecureCardData/AliasAssertInsertRequest.php +++ b/lib/SaferpayJson/Request/SecureCardData/AliasAssertInsertRequest.php @@ -17,10 +17,9 @@ final class AliasAssertInsertRequest extends Request public const RESPONSE_CLASS = AliasAssertInsertResponse::class; /** - * @var string * @SerializedName("Token") */ - private $token; + private string $token; public function __construct(RequestConfig $requestConfig, string $token) { diff --git a/lib/SaferpayJson/Request/SecureCardData/AliasDeleteRequest.php b/lib/SaferpayJson/Request/SecureCardData/AliasDeleteRequest.php index 85182c8..743b8e3 100755 --- a/lib/SaferpayJson/Request/SecureCardData/AliasDeleteRequest.php +++ b/lib/SaferpayJson/Request/SecureCardData/AliasDeleteRequest.php @@ -17,10 +17,9 @@ final class AliasDeleteRequest extends Request public const RESPONSE_CLASS = AliasDeleteResponse::class; /** - * @var string * @SerializedName("AliasId") */ - private $aliasId; + private string $aliasId; public function __construct(RequestConfig $requestConfig, string $aliasId) { diff --git a/lib/SaferpayJson/Request/SecureCardData/AliasInsertDirectRequest.php b/lib/SaferpayJson/Request/SecureCardData/AliasInsertDirectRequest.php index 70f03fd..cd4a7f4 100755 --- a/lib/SaferpayJson/Request/SecureCardData/AliasInsertDirectRequest.php +++ b/lib/SaferpayJson/Request/SecureCardData/AliasInsertDirectRequest.php @@ -22,31 +22,27 @@ final class AliasInsertDirectRequest extends Request public const RESPONSE_CLASS = AliasInsertDirectResponse::class; /** - * @var RegisterAlias * @SerializedName("RegisterAlias") */ - private $registerAlias; + private RegisterAlias $registerAlias; /** - * @var PaymentMeans * @SerializedName("PaymentMeans") * @Type("Ticketpark\SaferpayJson\Request\Container\PaymentMeans") */ - private $paymentMeans; + private PaymentMeans $paymentMeans; /** - * @var Check|null * @SerializedName("Check") * @Type("Ticketpark\SaferpayJson\Request\Container\Check") */ - private $check; + private ?Check $check = null; /** - * @var IssuerReference|null * @SerializedName("IssuerReference") * @Type("Ticketpark\SaferpayJson\Request\Container\IssuerReference") */ - private $issuerReference; + private ?IssuerReference $issuerReference = null; public function __construct(RequestConfig $requestConfig, RegisterAlias $registerAlias, PaymentMeans $paymentMeans) { diff --git a/lib/SaferpayJson/Request/SecureCardData/AliasInsertRequest.php b/lib/SaferpayJson/Request/SecureCardData/AliasInsertRequest.php index 59355b4..92f504c 100755 --- a/lib/SaferpayJson/Request/SecureCardData/AliasInsertRequest.php +++ b/lib/SaferpayJson/Request/SecureCardData/AliasInsertRequest.php @@ -43,60 +43,52 @@ final class AliasInsertRequest extends Request public const TYPE_TWINT = 'TWINT'; /** - * @var RegisterAlias * @SerializedName("RegisterAlias") */ - private $registerAlias; + private RegisterAlias $registerAlias; /** - * @var string * @SerializedName("Type") * @Type("string") */ - private $type; + private string $type; /** - * @var ReturnUrls * @SerializedName("ReturnUrls") */ - private $returnUrls; + private ReturnUrls $returnUrls; /** - * @var Styling|null * @SerializedName("Styling") */ - private $styling; + private ?Styling $styling = null; /** - * @var string|null * @SerializedName("LanguageCode") * @Type("string") */ - private $languageCode; + private ?string $languageCode = null; /** - * @var Check|null * @SerializedName("Check") */ - private $check; + private ?Check $check = null; /** * @var array|null * @SerializedName("PaymentMethods") */ - private $paymentMethods; + private ?array $paymentMethods = null; /** - * @var CardForm|null * @SerializedName("CardForm") */ - private $cardForm; + private ?CardForm $cardForm = null; /** - * @var PaymentMeans|null * @SerializedName("PaymentMeans") */ - private $paymentMeans; + private ?PaymentMeans $paymentMeans = null; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/SecureCardData/AliasUpdateRequest.php b/lib/SaferpayJson/Request/SecureCardData/AliasUpdateRequest.php index ba98fb9..6092815 100755 --- a/lib/SaferpayJson/Request/SecureCardData/AliasUpdateRequest.php +++ b/lib/SaferpayJson/Request/SecureCardData/AliasUpdateRequest.php @@ -19,16 +19,14 @@ final class AliasUpdateRequest extends Request public const RESPONSE_CLASS = AliasUpdateResponse::class; /** - * @var UpdateAlias * @SerializedName("UpdateAlias") */ - private $updateAlias; + private UpdateAlias $updateAlias; /** - * @var UpdatePaymentMeans * @SerializedName("UpdatePaymentMeans") */ - private $updatePaymentMeans; + private UpdatePaymentMeans $updatePaymentMeans; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/Transaction/AuthorizeDirectRequest.php b/lib/SaferpayJson/Request/Transaction/AuthorizeDirectRequest.php index 2de064a..ca1c648 100644 --- a/lib/SaferpayJson/Request/Transaction/AuthorizeDirectRequest.php +++ b/lib/SaferpayJson/Request/Transaction/AuthorizeDirectRequest.php @@ -27,58 +27,49 @@ final class AuthorizeDirectRequest extends Request public const INITIATOR_PAYER = 'PAYER'; /** - * @var string * @SerializedName("TerminalId") */ - private $terminalId; + private string $terminalId; /** - * @var Payment * @SerializedName("Payment") */ - private $payment; + private Payment $payment; /** - * @var PaymentMeans * @SerializedName("PaymentMeans") */ - private $paymentMeans; + private PaymentMeans $paymentMeans; /** - * @var Authentication|null * @SerializedName("Authentication") */ - private $authentication; + private ?Authentication $authentication = null; /** - * @var RegisterAlias|null * @SerializedName("RegisterAlias") */ - private $registerAlias; + private ?RegisterAlias $registerAlias = null; /** - * @var Payer|null * @SerializedName("Payer") */ - private $payer; + private ?Payer $payer = null; /** - * @var Order|null * @SerializedName("Order") */ - private $order; + private ?Order $order = null; /** - * @var RiskFactors|null * @SerializedName("RiskFactors") */ - private $riskFactors; + private ?RiskFactors $riskFactors = null; /** - * @var string|null * @SerializedName("Initiator") */ - private $initiator; + private ?string $initiator = null; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/Transaction/AuthorizeReferencedRequest.php b/lib/SaferpayJson/Request/Transaction/AuthorizeReferencedRequest.php index 1ada576..c51423d 100644 --- a/lib/SaferpayJson/Request/Transaction/AuthorizeReferencedRequest.php +++ b/lib/SaferpayJson/Request/Transaction/AuthorizeReferencedRequest.php @@ -20,34 +20,29 @@ final class AuthorizeReferencedRequest extends Request public const RESPONSE_CLASS = AuthorizeReferencedResponse::class; /** - * @var string * @SerializedName("TerminalId") */ - private $terminalId; + private string $terminalId; /** - * @var Payment * @SerializedName("Payment") */ - private $payment; + private Payment $payment; /** - * @var TransactionReference * @SerializedName("TransactionReference") */ - private $transactionReference; + private TransactionReference $transactionReference; /** - * @var Authentication|null * @SerializedName("Authentication") */ - private $authentication; + private ?Authentication $authentication = null; /** - * @var bool|null * @SerializedName("SuppressDcc") */ - private $suppressDcc; + private ?bool $suppressDcc = null; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/Transaction/AuthorizeRequest.php b/lib/SaferpayJson/Request/Transaction/AuthorizeRequest.php index 617dddd..8b0993d 100644 --- a/lib/SaferpayJson/Request/Transaction/AuthorizeRequest.php +++ b/lib/SaferpayJson/Request/Transaction/AuthorizeRequest.php @@ -18,28 +18,24 @@ final class AuthorizeRequest extends Request public const RESPONSE_CLASS = AuthorizeResponse::class; /** - * @var string * @SerializedName("Token") */ - private $token; + private string $token; /** - * @var string|null * @SerializedName("Condition") */ - private $condition; + private ?string $condition = null; /** - * @var string|null * @SerializedName("VerificationCode") */ - private $verificationCode; + private ?string $verificationCode = null; /** - * @var RegisterAlias|null * @SerializedName("RegisterAlias") */ - private $registerAlias; + private ?RegisterAlias $registerAlias = null; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/Transaction/CancelRequest.php b/lib/SaferpayJson/Request/Transaction/CancelRequest.php index 8248689..aca2f09 100644 --- a/lib/SaferpayJson/Request/Transaction/CancelRequest.php +++ b/lib/SaferpayJson/Request/Transaction/CancelRequest.php @@ -18,10 +18,9 @@ final class CancelRequest extends Request public const RESPONSE_CLASS = CancelResponse::class; /** - * @var TransactionReference * @SerializedName("TransactionReference") */ - private $transactionReference; + private TransactionReference $transactionReference; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/Transaction/CaptureRequest.php b/lib/SaferpayJson/Request/Transaction/CaptureRequest.php index fc04a97..66c05d7 100644 --- a/lib/SaferpayJson/Request/Transaction/CaptureRequest.php +++ b/lib/SaferpayJson/Request/Transaction/CaptureRequest.php @@ -23,40 +23,34 @@ final class CaptureRequest extends Request public const RESPONSE_CLASS = CaptureResponse::class; /** - * @var TransactionReference * @SerializedName("TransactionReference") */ - private $transactionReference; + private TransactionReference $transactionReference; /** - * @var Amount|null * @SerializedName("Amount") */ - private $amount; + private ?Amount $amount = null; /** - * @var Billpay|null * @SerializedName("Billpay") */ - private $billpay; + private ?Billpay $billpay = null; /** - * @var PendingNotification|null * @SerializedName("PendingNotification") */ - private $pendingNotification; + private ?PendingNotification $pendingNotification = null; /** - * @var Marketplace|null * @SerializedName("Marketplace") */ - private $marketplace; + private ?Marketplace $marketplace = null; /** - * @var MastercardIssuerInstallments|null * @SerializedName("MastercardIssuerInstallments") */ - private $mastercardIssuerInstallments; + private ?MastercardIssuerInstallments $mastercardIssuerInstallments = null; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/Transaction/InitializeRequest.php b/lib/SaferpayJson/Request/Transaction/InitializeRequest.php index 3948777..c536a54 100644 --- a/lib/SaferpayJson/Request/Transaction/InitializeRequest.php +++ b/lib/SaferpayJson/Request/Transaction/InitializeRequest.php @@ -43,88 +43,75 @@ final class InitializeRequest extends Request public const WALLET_MASTERPASS = "MASTERPASS"; /** - * @var string|null * @SerializedName("ConfigSet") */ - private $configSet; + private ?string $configSet = null; /** - * @var string * @SerializedName("TerminalId") */ - private $terminalId; + private string $terminalId; /** - * @var Payment * @SerializedName("Payment") */ - private $payment; + private Payment $payment; /** - * @var PaymentMeans|null * @SerializedName("PaymentMeans") */ - private $paymentMeans; + private ?PaymentMeans $paymentMeans = null; /** - * @var Authentication|null * @SerializedName("Authentication") */ - private $authentication; + private ?Authentication $authentication = null; /** - * @var Payer|null * @SerializedName("Payer") */ - private $payer; + private ?Payer $payer = null; /** - * @var ReturnUrls * @SerializedName("ReturnUrls") */ - private $returnUrls; + private ReturnUrls $returnUrls; /** - * @var Styling|null * @SerializedName("Styling") */ - private $styling; + private ?Styling $styling = null; /** - * @var Wallet|null * @SerializedName("Wallet") */ - private $wallet; + private ?Wallet $wallet = null; /** * @var array|null * @SerializedName("PaymentMethods") */ - private $paymentMethods; + private ?array $paymentMethods = null; /** - * @var Order|null * @SerializedName("Order") */ - private $order; + private ?Order $order = null; /** - * @var RiskFactors|null * @SerializedName("RiskFactors") */ - private $riskFactors; + private ?RiskFactors $riskFactors = null; /** - * @var CardForm|null * @SerializedName("CardForm") */ - private $cardForm; + private ?CardForm $cardForm = null; /** - * @var RedirectNotifyUrls|null * @SerializedName("RedirectNotifyUrls") */ - private $redirectNotifyUrls; + private ?RedirectNotifyUrls $redirectNotifyUrls = null; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Request/Transaction/RefundRequest.php b/lib/SaferpayJson/Request/Transaction/RefundRequest.php index 6957c86..041fe27 100644 --- a/lib/SaferpayJson/Request/Transaction/RefundRequest.php +++ b/lib/SaferpayJson/Request/Transaction/RefundRequest.php @@ -20,22 +20,19 @@ final class RefundRequest extends Request public const RESPONSE_CLASS = RefundResponse::class; /** - * @var Refund * @SerializedName("Refund") */ - private $refund; + private Refund $refund; /** - * @var CaptureReference * @SerializedName("CaptureReference") */ - private $captureReference; + private CaptureReference $captureReference; /** - * @var PendingNotification|null * @SerializedName("PendingNotification") */ - private $pendingNotification; + private ?PendingNotification $pendingNotification = null; public function __construct( RequestConfig $requestConfig, diff --git a/lib/SaferpayJson/Response/ErrorResponse.php b/lib/SaferpayJson/Response/ErrorResponse.php index 92ed407..6eb3c82 100644 --- a/lib/SaferpayJson/Response/ErrorResponse.php +++ b/lib/SaferpayJson/Response/ErrorResponse.php @@ -51,11 +51,10 @@ class ErrorResponse extends Response private $transactionId; /** - * @var array|null * @SerializedName("ErrorDetail") * @Type("array") */ - private $errorDetail = []; + private array $errorDetail = []; /** * @var string|null diff --git a/rector.php b/rector.php index 9fa3cf5..96668a9 100644 --- a/rector.php +++ b/rector.php @@ -4,6 +4,7 @@ use Rector\Config\RectorConfig; use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector; +use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; return RectorConfig::configure() ->withPaths([ @@ -15,4 +16,5 @@ ->withImportNames(importShortClasses: false, removeUnusedImports: true) ->withRules([ AddVoidReturnTypeWhereNoReturnRector::class, + TypedPropertyFromAssignsRector::class ]); diff --git a/tests/SaferpayJson/Tests/Request/CommonRequestTest.php b/tests/SaferpayJson/Tests/Request/CommonRequestTest.php index dac4734..1937577 100644 --- a/tests/SaferpayJson/Tests/Request/CommonRequestTest.php +++ b/tests/SaferpayJson/Tests/Request/CommonRequestTest.php @@ -16,11 +16,9 @@ abstract class CommonRequestTest extends TestCase { - /** @var bool */ - private $successful; + private ?bool $successful = null; - /** @var ?string */ - private $successfulResponseClass; + private ?string $successfulResponseClass = null; abstract protected function getInstance();