diff --git a/src/Enums/AccessScope.php b/src/Enums/AccessScope.php index c535a5e..edf3e0b 100644 --- a/src/Enums/AccessScope.php +++ b/src/Enums/AccessScope.php @@ -2,21 +2,18 @@ namespace Nordigen\NordigenPHP\Enums; -final class AccessScope +enum AccessScope: string { /** * Details scope. - * @var string */ - public const DETAILS = 'details'; + case DETAILS = 'details'; /** * Balance scope. - * @var string */ - public const BALANCES = 'balances'; + case BALANCES = 'balances'; /** * Transactions scope. - * @var string */ - public const TRANSACTIONS = 'transactions'; + case TRANSACTIONS = 'transactions'; } diff --git a/src/Enums/AccountProcessingStatus.php b/src/Enums/AccountProcessingStatus.php index 30a93a7..04204c4 100644 --- a/src/Enums/AccountProcessingStatus.php +++ b/src/Enums/AccountProcessingStatus.php @@ -2,36 +2,30 @@ namespace Nordigen\NordigenPHP\Enums; -class AccountProcessingStatus +enum AccountProcessingStatus: string { /** * User has successfully authenticated themselves, and the account has been discovered. - * @var string */ - public const DISCOVERED = 'DISCOVERED'; + case DISCOVERED = 'DISCOVERED'; /** * An error was encountered while processing the account. - * @var string */ - public const PROCESSING = 'PROCESSING'; + case PROCESSING = 'PROCESSING'; /** * Account has been successfully processed. - * @var string */ - public const READY = 'READY'; + case READY = 'READY'; /** * An error was encountered while processing the account. - * @var string */ - public const ERROR = 'ERROR'; + case ERROR = 'ERROR'; /** * Account has been suspended (more than 10 consecutive failed attempts to access the account). - * @var string */ - public const SUSPENDED = 'SUSPENDED'; + case SUSPENDED = 'SUSPENDED'; /** * Access to account has expired as set in the End User Agreement. - * @var string */ - public const EXPIRED = 'EXPIRED'; + case EXPIRED = 'EXPIRED'; } diff --git a/src/Enums/AccountUsage.php b/src/Enums/AccountUsage.php index 6f366cf..f06910e 100644 --- a/src/Enums/AccountUsage.php +++ b/src/Enums/AccountUsage.php @@ -2,16 +2,14 @@ namespace Nordigen\NordigenPHP\Enums; -class AccountUsage +enum AccountUsage: string { /** * Professional account. - * @var string */ - public const ORGA = 'ORGA'; + case ORGA = 'ORGA'; /** * Private personal account. - * @var string */ - public const PRIV = 'PRIVATE'; + case PRIV = 'PRIVATE'; } diff --git a/src/Enums/BalanceType.php b/src/Enums/BalanceType.php index da77090..680d971 100644 --- a/src/Enums/BalanceType.php +++ b/src/Enums/BalanceType.php @@ -2,7 +2,7 @@ namespace Nordigen\NordigenPHP\Enums; -class BalanceType +enum BalanceType: string { /** * Balance of the account at the end of the pre-agreed account reporting period. @@ -11,14 +11,12 @@ class BalanceType * * For card-accounts, this is composed of: * - invoiced, but not yet paid entries. - * @var string */ - public const CLOSING_BOOKED = 'closingBooked'; + case CLOSING_BOOKED = 'closingBooked'; /** * Closing balance of amount of money that is at the disposal of the account owner on the date specified. - * @var string */ - public const CLOSING_AVAILABLE = 'closingAvailable'; + case CLOSING_AVAILABLE = 'closingAvailable'; /** * Balance composed of booked entries and pending items known at the time of calculation, * which projects the end of day balance if everything is booked @@ -28,31 +26,26 @@ class BalanceType * - invoiced, but not yet paid entries, * - not yet invoiced but already booked entries, * - pending items (not yet booked) - * @var string */ - public const EXPECTED = 'expected'; + case EXPECTED = 'expected'; /** * Book balance of the account at the beginning of the account reporting period.
* It always equals the closing book balance from the previous report. - * @var string */ - public const OPENING_BOOKED = 'openingBooked'; + case OPENING_BOOKED = 'openingBooked'; /** * Opening balance of amount of money that is at the disposal of the account owner on the date specified. - * @var string */ - public const OPENING_AVAILABLE = 'openingAvailable'; + case OPENING_AVAILABLE = 'openingAvailable'; /** * Balance of the account at the previously closed account reporting period.
* The opening booked balance for the new period has to be equal to this balance. - * @var string */ - public const PREVIOUSLY_CLOSING_BOOKED = 'previouslyClosingBooked'; + case PREVIOUSLY_CLOSING_BOOKED = 'previouslyClosingBooked'; /** * Balance for informational purposes. - * @var string */ - public const INFORMATION = 'information'; + case INFORMATION = 'information'; /** * Available balance calculated in the course of the account servicer’s business day, at the time specified, * and subject to further changes during the business day.
@@ -61,30 +54,25 @@ class BalanceType * For card-accounts, this is composed of: * - invoiced, but not yet paid entries, * - not yet invoiced but already booked entries - * @var string */ - public const INTERIM_AVAILABLE = 'interimAvailable'; + case INTERIM_AVAILABLE = 'interimAvailable'; /** * Balance calculated in the course of the account servicer's business day, at the time specified, * and subject to further changes during the business day.
* The interim balance is calculated on the basis of * booked credit and debit items during the calculation time/period specified. - * @var string */ - public const INTERIM_BOOKED = 'interimBooked'; + case INTERIM_BOOKED = 'interimBooked'; /** * Forward available balance of money that is at the disposal of the account owner on the date specified. - * @var string */ - public const FORWARD_AVAILABLE = 'forwardAvailable'; + case FORWARD_AVAILABLE = 'forwardAvailable'; /** * Only for card accounts, to be defined yet. - * @var string */ - public const NON_INVOICED = 'nonInvoiced'; + case NON_INVOICED = 'nonInvoiced'; /** * Deprecated value. Analogous to interimBooked. - * @var string */ - public const AUTHORIZED = 'authorized'; + case AUTHORIZED = 'authorized'; } diff --git a/src/Enums/RequisitionStatus.php b/src/Enums/RequisitionStatus.php index f8a052e..4a5539d 100644 --- a/src/Enums/RequisitionStatus.php +++ b/src/Enums/RequisitionStatus.php @@ -2,51 +2,42 @@ namespace Nordigen\NordigenPHP\Enums; -class RequisitionStatus +enum RequisitionStatus: string { /** * Requisition has been successfully created. - * @var string */ - public const CREATED = 'CR'; + case CREATED = 'CR'; /** * Account has been successfully linked to requisition. - * @var string */ - public const LINKED = 'LN'; + case LINKED = 'LN'; /** * Requisition is suspended due to numerous consecutive errors that happened while accessing its accounts. - * @var string */ - public const SUSPENDED = 'SU'; + case SUSPENDED = 'SU'; /** * End-user is giving consent at Nordigen's consent screen. - * @var string */ - public const GIVING_CONSENT = 'GC'; + case GIVING_CONSENT = 'GC'; /** * End-user is redirected to the financial institution for authentication. - * @var string */ - public const UNDERGOING_AUTHENTICATION = 'UA'; + case UNDERGOING_AUTHENTICATION = 'UA'; /** * SSN verification has failed. - * @var string */ - public const REJECTED = 'RJ'; + case REJECTED = 'RJ'; /** * End-user is selecting accounts. - * @var string */ - public const SELECTING_ACCOUNTS = 'SA'; + case SELECTING_ACCOUNTS = 'SA'; /** * End-user is granting access to their account information. - * @var string */ - public const GRANTING_ACCESS = 'GA'; + case GRANTING_ACCESS = 'GA'; /** - * Access to accounts has expired as set in End User Agreement. - * @var string + * Access to accounts has expired as set in End User Agreement. */ - public const EXPIRED = 'EX'; + case EXPIRED = 'EX'; }