From 9bcce8a9c4193a5db7d11e85fd71399382fad04a Mon Sep 17 00:00:00 2001 From: ging-dev Date: Fri, 26 Jul 2024 18:33:46 +0700 Subject: [PATCH] feat: better ux --- README.md | 21 +- docs/ArrayAccess.html | 3 + docs/ArrayIterator.html | 3 + docs/ArrayObject.html | 3 + docs/BackedEnum.html | 228 +++++++++++++ docs/Closure.html | 3 + docs/Countable.html | 3 + docs/DateInterval.html | 3 + docs/DateTime.html | 3 + docs/DateTimeImmutable.html | 3 + docs/DateTimeInterface.html | 3 + docs/DateTimeZone.html | 3 + ...ventSauce.ObjectHydrator.IterableList.html | 3 + ...ventSauce.ObjectHydrator.ObjectMapper.html | 3 + ....ObjectHydrator.UnableToHydrateObject.html | 3 + ...bjectHydrator.UnableToSerializeObject.html | 3 + docs/Exception.html | 7 +- ...ent.Common.HttpMethodsClientInterface.html | 3 + docs/Http.Client.Common.Plugin.html | 3 + docs/Http.Client.Exception.html | 3 + docs/Http.Client.HttpClient.html | 3 + docs/Http.Promise.Promise.html | 3 + docs/IPay.Api.AbstractApi.html | 16 +- docs/IPay.Api.AuthenticatedApi.html | 31 +- docs/IPay.Api.UnauthenticatedApi.html | 21 +- docs/IPay.Builder.BodyBuilder.html | 45 ++- docs/IPay.Builder.TransactionBuilder.html | 312 ++++++++++++++++++ docs/IPay.Captcha.CaptchaSolver.html | 3 + docs/IPay.Encryption.Encrypter.html | 3 + docs/IPay.Entity.Account.html | 3 + docs/IPay.Entity.AccountState.html | 3 + docs/IPay.Entity.Customer.html | 3 + docs/IPay.Entity.Transaction.html | 3 + docs/IPay.Enum.TransactionType.html | 173 ++++++++++ docs/IPay.Exception.LoginException.html | 3 + docs/IPay.Exception.SessionException.html | 3 + docs/IPay.Http.Plugin.ExceptionThrower.html | 3 + docs/IPay.IPayClient.html | 22 +- docs/IPay.Session.AuthenticatedSession.html | 3 + docs/IPay.Session.SessionInterface.html | 3 + docs/IPay.Session.UnauthenticatedSession.html | 3 + docs/InvalidArgumentException.html | 7 +- docs/Iterator.html | 3 + docs/IteratorAggregate.html | 12 + docs/JsonSerializable.html | 3 + docs/LogicException.html | 7 +- docs/OutOfBoundsException.html | 3 + ....Http.Client.ClientExceptionInterface.html | 3 + docs/Psr.Http.Client.ClientInterface.html | 3 + docs/Psr.Http.Message.MessageInterface.html | 3 + docs/Psr.Http.Message.RequestInterface.html | 3 + docs/Psr.Http.Message.ResponseInterface.html | 3 + docs/Psr.Http.Message.StreamInterface.html | 3 + docs/Psr.Http.Message.UriInterface.html | 3 + docs/RuntimeException.html | 3 + docs/SeekableIterator.html | 3 + docs/Serializable.html | 3 + docs/Stringable.html | 25 +- ...onsResolver.Exception.AccessException.html | 3 + ...Resolver.Exception.ExceptionInterface.html | 21 +- ...er.Exception.InvalidArgumentException.html | 7 +- ...ver.Exception.InvalidOptionsException.html | 3 + ...ver.Exception.MissingOptionsException.html | 3 + ...olver.Exception.NoSuchOptionException.html | 3 + ...r.Exception.OptionDefinitionException.html | 3 + ...r.Exception.UndefinedOptionsException.html | 3 + ...nt.OptionsResolver.OptionConfigurator.html | 3 + ...ony.Component.OptionsResolver.Options.html | 3 + ...onent.OptionsResolver.OptionsResolver.html | 3 + ....Component.VarExporter.LazyGhostTrait.html | 3 + docs/Throwable.html | 25 +- docs/Traversable.html | 10 + docs/UnitEnum.html | 188 +++++++++++ docs/assets/elements.js | 2 +- docs/function-ipay.html | 3 + docs/index.html | 6 + docs/namespace-EventSauce.ObjectHydrator.html | 3 + docs/namespace-EventSauce.html | 3 + docs/namespace-Http.Client.Common.html | 3 + docs/namespace-Http.Client.html | 3 + docs/namespace-Http.Promise.html | 3 + docs/namespace-Http.html | 3 + docs/namespace-IPay.Api.html | 12 +- docs/namespace-IPay.Builder.html | 12 + docs/namespace-IPay.Captcha.html | 3 + docs/namespace-IPay.Encryption.html | 3 + docs/namespace-IPay.Entity.html | 3 + docs/namespace-IPay.Enum.html | 125 +++++++ docs/namespace-IPay.Exception.html | 3 + docs/namespace-IPay.Http.Plugin.html | 3 + docs/namespace-IPay.Http.html | 3 + docs/namespace-IPay.Session.html | 3 + docs/namespace-IPay.html | 6 + docs/namespace-Psr.Http.Client.html | 3 + docs/namespace-Psr.Http.Message.html | 3 + docs/namespace-Psr.Http.html | 3 + docs/namespace-Psr.html | 3 + ...y.Component.OptionsResolver.Exception.html | 3 + ...ace-Symfony.Component.OptionsResolver.html | 3 + ...mespace-Symfony.Component.VarExporter.html | 3 + docs/namespace-Symfony.Component.html | 3 + docs/namespace-Symfony.html | 3 + docs/namespace-none.html | 3 + docs/sitemap.xml | 7 +- docs/source-Api.AbstractApi.html | 8 +- docs/source-Api.AuthenticatedApi.html | 10 +- docs/source-Api.UnauthenticatedApi.html | 117 ------- docs/source-Builder.BodyBuilder.html | 10 +- docs/source-Builder.TransactionBuilder.html | 115 +++++++ docs/source-Captcha.CaptchaSolver.html | 3 + docs/source-Encryption.Encrypter.html | 3 + docs/source-Entity.Account.html | 3 + docs/source-Entity.Customer.html | 3 + docs/source-Entity.Transaction.html | 3 + docs/source-Enum.TransactionType.html | 110 ++++++ docs/source-Exception.LoginException.html | 3 + docs/source-Exception.SessionException.html | 3 + docs/source-Http.Plugin.ExceptionThrower.html | 3 + docs/source-IPayClient.html | 5 +- docs/source-Session.AuthenticatedSession.html | 3 + docs/source-Session.SessionInterface.html | 3 + ...source-Session.UnauthenticatedSession.html | 3 + docs/source-functions.html | 3 + docs/tree.html | 32 ++ src/Api/AuthenticatedApi.php | 34 +- src/Api/UnauthenticatedApi.php | 23 +- src/Builder/BodyBuilder.php | 16 +- src/Builder/TransactionBuilder.php | 58 ++++ src/Enum/TransactionType.php | 10 + src/IPayClient.php | 9 +- 130 files changed, 1883 insertions(+), 292 deletions(-) create mode 100644 docs/BackedEnum.html create mode 100644 docs/IPay.Builder.TransactionBuilder.html create mode 100644 docs/IPay.Enum.TransactionType.html create mode 100644 docs/UnitEnum.html create mode 100644 docs/namespace-IPay.Enum.html delete mode 100644 docs/source-Api.UnauthenticatedApi.html create mode 100644 docs/source-Builder.TransactionBuilder.html create mode 100644 docs/source-Enum.TransactionType.html create mode 100644 src/Builder/TransactionBuilder.php create mode 100644 src/Enum/TransactionType.php diff --git a/README.md b/README.md index 5721ee1..fcab3b0 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ declare(strict_types=1); +use IPay\Enum\TransactionType; use IPay\IPayClient; require __DIR__.'/vendor/autoload.php'; @@ -12,15 +13,17 @@ require __DIR__.'/vendor/autoload.php'; $ipay = IPayClient::create(); try { - $session = $ipay->guest()->login([ - 'userName' => 'yourUsername', - 'accessCode' => 'yourPassword' - ]); - - foreach ($session->historyTransactions([ - 'accountNumber' => $session->customer->accountNumber, - 'startDate' => new \DateTimeImmutable('-5 days'), - ]) as $transaction) { + $session = $ipay->login( + userName: 'username', + accessCode: 'password', + ); + + $transactions = $session->transactions() + ->type(TransactionType::CREDIT) + ->today() + ->getIterator(); + + foreach ($transactions as $transaction) { echo $transaction->remark.PHP_EOL; } } catch (Throwable $e) { diff --git a/docs/ArrayAccess.html b/docs/ArrayAccess.html index 5695700..fc88688 100644 --- a/docs/ArrayAccess.html +++ b/docs/ArrayAccess.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/ArrayIterator.html b/docs/ArrayIterator.html index cae61d8..c795ab5 100644 --- a/docs/ArrayIterator.html +++ b/docs/ArrayIterator.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/ArrayObject.html b/docs/ArrayObject.html index 0e78d7f..4c8320a 100644 --- a/docs/ArrayObject.html +++ b/docs/ArrayObject.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/BackedEnum.html b/docs/BackedEnum.html new file mode 100644 index 0000000..60dc9ef --- /dev/null +++ b/docs/BackedEnum.html @@ -0,0 +1,228 @@ + + + + + + + + Interface BackedEnum | API + + + + + +
+ +
+ +
+
+ +
+ +
+

+ Interface BackedEnum +

+ + + + + + + + +
extends +UnitEnum
+ +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Methods
+ + + + + + + +
Methods inherited from UnitEnum
+cases()
+ + + + + + + + + + + +
+ + +
+ +
+ +
+ + diff --git a/docs/Closure.html b/docs/Closure.html index 9cf2d14..8faf535 100644 --- a/docs/Closure.html +++ b/docs/Closure.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/Countable.html b/docs/Countable.html index 734e470..90b405c 100644 --- a/docs/Countable.html +++ b/docs/Countable.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/DateInterval.html b/docs/DateInterval.html index 32b208d..c01de07 100644 --- a/docs/DateInterval.html +++ b/docs/DateInterval.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/DateTime.html b/docs/DateTime.html index 03ba0a9..5d9c0e4 100644 --- a/docs/DateTime.html +++ b/docs/DateTime.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/DateTimeImmutable.html b/docs/DateTimeImmutable.html index 8a7680f..f62ec2e 100644 --- a/docs/DateTimeImmutable.html +++ b/docs/DateTimeImmutable.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/DateTimeInterface.html b/docs/DateTimeInterface.html index 081f1a9..242ed96 100644 --- a/docs/DateTimeInterface.html +++ b/docs/DateTimeInterface.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/DateTimeZone.html b/docs/DateTimeZone.html index 9a9ac8d..2077a1c 100644 --- a/docs/DateTimeZone.html +++ b/docs/DateTimeZone.html @@ -34,6 +34,9 @@

Namespaces

+ diff --git a/docs/EventSauce.ObjectHydrator.IterableList.html b/docs/EventSauce.ObjectHydrator.IterableList.html index e7617a5..dc3b4cb 100644 --- a/docs/EventSauce.ObjectHydrator.IterableList.html +++ b/docs/EventSauce.ObjectHydrator.IterableList.html @@ -42,6 +42,9 @@

Namespaces

+ diff --git a/docs/EventSauce.ObjectHydrator.ObjectMapper.html b/docs/EventSauce.ObjectHydrator.ObjectMapper.html index c7fbe18..aca562f 100644 --- a/docs/EventSauce.ObjectHydrator.ObjectMapper.html +++ b/docs/EventSauce.ObjectHydrator.ObjectMapper.html @@ -42,6 +42,9 @@

Namespaces

+ diff --git a/docs/EventSauce.ObjectHydrator.UnableToHydrateObject.html b/docs/EventSauce.ObjectHydrator.UnableToHydrateObject.html index 1b464b8..7ede6fe 100644 --- a/docs/EventSauce.ObjectHydrator.UnableToHydrateObject.html +++ b/docs/EventSauce.ObjectHydrator.UnableToHydrateObject.html @@ -42,6 +42,9 @@

Namespaces

+ diff --git a/docs/EventSauce.ObjectHydrator.UnableToSerializeObject.html b/docs/EventSauce.ObjectHydrator.UnableToSerializeObject.html index 8c65f8d..a13f6ca 100644 --- a/docs/EventSauce.ObjectHydrator.UnableToSerializeObject.html +++ b/docs/EventSauce.ObjectHydrator.UnableToSerializeObject.html @@ -42,6 +42,9 @@

Namespaces

+ diff --git a/docs/Exception.html b/docs/Exception.html index b4989c5..1c401a7 100644 --- a/docs/Exception.html +++ b/docs/Exception.html @@ -34,6 +34,9 @@

Namespaces

+ @@ -151,12 +154,12 @@

  • -Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException +Symfony\Component\OptionsResolver\Exception\MissingOptionsException
  • -Symfony\Component\OptionsResolver\Exception\MissingOptionsException +Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
  • diff --git a/docs/Http.Client.Common.HttpMethodsClientInterface.html b/docs/Http.Client.Common.HttpMethodsClientInterface.html index 95e41aa..5ede9cb 100644 --- a/docs/Http.Client.Common.HttpMethodsClientInterface.html +++ b/docs/Http.Client.Common.HttpMethodsClientInterface.html @@ -47,6 +47,9 @@

    Namespaces

    + diff --git a/docs/Http.Client.Common.Plugin.html b/docs/Http.Client.Common.Plugin.html index 45a2d9c..4e7f803 100644 --- a/docs/Http.Client.Common.Plugin.html +++ b/docs/Http.Client.Common.Plugin.html @@ -47,6 +47,9 @@

    Namespaces

    + diff --git a/docs/Http.Client.Exception.html b/docs/Http.Client.Exception.html index 19ea150..2818720 100644 --- a/docs/Http.Client.Exception.html +++ b/docs/Http.Client.Exception.html @@ -44,6 +44,9 @@

    Namespaces

    + diff --git a/docs/Http.Client.HttpClient.html b/docs/Http.Client.HttpClient.html index af44d18..d2e3006 100644 --- a/docs/Http.Client.HttpClient.html +++ b/docs/Http.Client.HttpClient.html @@ -44,6 +44,9 @@

    Namespaces

    + diff --git a/docs/Http.Promise.Promise.html b/docs/Http.Promise.Promise.html index e57ded3..ce8206b 100644 --- a/docs/Http.Promise.Promise.html +++ b/docs/Http.Promise.Promise.html @@ -42,6 +42,9 @@

    Namespaces

    + diff --git a/docs/IPay.Api.AbstractApi.html b/docs/IPay.Api.AbstractApi.html index 4d60e2b..54688d0 100644 --- a/docs/IPay.Api.AbstractApi.html +++ b/docs/IPay.Api.AbstractApi.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -64,11 +67,6 @@

    Classes

    AuthenticatedApi -
  • - - UnauthenticatedApi - -
  • @@ -123,16 +121,16 @@

    <T is
  • -IPay\Api\UnauthenticatedApi +IPay\Api\AuthenticatedApi + uses + LazyGhostTrait
  • -IPay\Api\AuthenticatedApi +IPay\Api\UnauthenticatedApi - uses - LazyGhostTrait
  • diff --git a/docs/IPay.Api.AuthenticatedApi.html b/docs/IPay.Api.AuthenticatedApi.html index fdf804c..8da0abe 100644 --- a/docs/IPay.Api.AuthenticatedApi.html +++ b/docs/IPay.Api.AuthenticatedApi.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -64,11 +67,6 @@

    Classes

    AuthenticatedApi -
  • - - UnauthenticatedApi - -
  • @@ -144,7 +142,7 @@

    @@ -165,7 +163,7 @@

    - __construct(IPayClient $iPayClient, AuthenticatedSession $session) + __construct(IPayClient $iPayClient, AuthenticatedSession $session) @@ -185,7 +183,7 @@

    Overrides

    # - + @@ -196,9 +194,7 @@

    Overrides

    - historyTransactions( - array{accountNumber?: string, tranType?: ('Credit'|'Debit'|''), startDate?: DateTimeInterface, endDate?: DateTimeInterface} $parameters, -): iterable<int, Transaction> + transactions(?string $accountNumber = null): TransactionBuilder @@ -206,18 +202,11 @@

    Overrides

    -

    Throws

    - - - - - -
    IPay\Exception\SessionException 
    - # + # @@ -272,7 +261,7 @@

    Throws

    -$customer +$customer
    @@ -296,7 +285,7 @@

    Throws

    -$accounts +$accounts
    diff --git a/docs/IPay.Api.UnauthenticatedApi.html b/docs/IPay.Api.UnauthenticatedApi.html index 8d392e6..a09f15e 100644 --- a/docs/IPay.Api.UnauthenticatedApi.html +++ b/docs/IPay.Api.UnauthenticatedApi.html @@ -4,7 +4,7 @@ - + Class IPay\Api\UnauthenticatedApi | API @@ -34,6 +34,9 @@

    Namespaces

    + @@ -64,11 +67,6 @@

    Classes

    AuthenticatedApi -
  • - - UnauthenticatedApi - -
  • @@ -137,7 +135,7 @@

    @@ -158,7 +156,7 @@

    - login(array{userName: string, accessCode: string} $credentials): AuthenticatedApi + login(string $userName, string $accessCode): AuthenticatedApi @@ -166,13 +164,6 @@

    -

    Throws

    - - - - - -
    IPay\Exception\LoginException 
    diff --git a/docs/IPay.Builder.BodyBuilder.html b/docs/IPay.Builder.BodyBuilder.html index 8995d01..8e9c0c9 100644 --- a/docs/IPay.Builder.BodyBuilder.html +++ b/docs/IPay.Builder.BodyBuilder.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -59,6 +62,11 @@

    Classes

    BodyBuilder +
  • + + TransactionBuilder + +
  • @@ -140,9 +148,32 @@

    + + + + + + + + + + + + +
    Type aliases
    + + + ParametersType + + + + string[] + + # +
    @@ -161,7 +192,7 @@

    - +
    - from(string[] $data): static + from(ParametersType $parameters): static @@ -187,7 +218,7 @@

    - enhance(string[] $parameters): static + enhance(ParametersType $parameters): static @@ -213,7 +244,7 @@

    - build(): self + build(): self @@ -239,7 +270,7 @@

    - encrypt(): string + encrypt(): string @@ -265,7 +296,7 @@

    - __toString(): string + __toString(): string @@ -296,7 +327,7 @@

    Implements

    - jsonSerialize(): string[] + jsonSerialize(): string[] diff --git a/docs/IPay.Builder.TransactionBuilder.html b/docs/IPay.Builder.TransactionBuilder.html new file mode 100644 index 0000000..80546be --- /dev/null +++ b/docs/IPay.Builder.TransactionBuilder.html @@ -0,0 +1,312 @@ + + + + + + + + Class IPay\Builder\TransactionBuilder | API + + + + + +
    + +
    + +
    +
    + +
    + +
    +

    + Class IPay\Builder\TransactionBuilder +

    + + + + + + + + + + + +
    final
    implements +IteratorAggregate<int, Transaction>
    + + + + + + + + + + + + + + + + +
    Type aliases
    + + + ParametersType + + + + array{accountNumber: string, tranType?: value-of<TransactionType>, startDate?: DateTimeInterface, endDate?: DateTimeInterface} + + # +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Methods
    + + + + + + + + + + +
    + + +
    + +
    + +
    + + diff --git a/docs/IPay.Captcha.CaptchaSolver.html b/docs/IPay.Captcha.CaptchaSolver.html index 95cfa22..bcd6674 100644 --- a/docs/IPay.Captcha.CaptchaSolver.html +++ b/docs/IPay.Captcha.CaptchaSolver.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Encryption.Encrypter.html b/docs/IPay.Encryption.Encrypter.html index 0357578..015398e 100644 --- a/docs/IPay.Encryption.Encrypter.html +++ b/docs/IPay.Encryption.Encrypter.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Entity.Account.html b/docs/IPay.Entity.Account.html index ef13609..436e392 100644 --- a/docs/IPay.Entity.Account.html +++ b/docs/IPay.Entity.Account.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Entity.AccountState.html b/docs/IPay.Entity.AccountState.html index 8780c61..8e0e44d 100644 --- a/docs/IPay.Entity.AccountState.html +++ b/docs/IPay.Entity.AccountState.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Entity.Customer.html b/docs/IPay.Entity.Customer.html index 297d021..89fc3a1 100644 --- a/docs/IPay.Entity.Customer.html +++ b/docs/IPay.Entity.Customer.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Entity.Transaction.html b/docs/IPay.Entity.Transaction.html index 7c31e6d..a7aa1df 100644 --- a/docs/IPay.Entity.Transaction.html +++ b/docs/IPay.Entity.Transaction.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Enum.TransactionType.html b/docs/IPay.Enum.TransactionType.html new file mode 100644 index 0000000..c8dff01 --- /dev/null +++ b/docs/IPay.Enum.TransactionType.html @@ -0,0 +1,173 @@ + + + + + + + + Enum IPay\Enum\TransactionType | API + + + + + +
    + +
    + +
    +
    + +
    + +
    +

    + Enum IPay\Enum\TransactionType +

    + + + + + + + +
    implements +BackedEnum
    + + +
    + Located at Enum/TransactionType.php
    +
    + + + + + + + + + + + + + + + + + + + +
    Cases
    + + + +
    + + +
    + +
    + +
    + + diff --git a/docs/IPay.Exception.LoginException.html b/docs/IPay.Exception.LoginException.html index c02b33c..cdeaf5e 100644 --- a/docs/IPay.Exception.LoginException.html +++ b/docs/IPay.Exception.LoginException.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Exception.SessionException.html b/docs/IPay.Exception.SessionException.html index 828ff25..ea3c1d9 100644 --- a/docs/IPay.Exception.SessionException.html +++ b/docs/IPay.Exception.SessionException.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Http.Plugin.ExceptionThrower.html b/docs/IPay.Http.Plugin.ExceptionThrower.html index c0f6390..528eb68 100644 --- a/docs/IPay.Http.Plugin.ExceptionThrower.html +++ b/docs/IPay.Http.Plugin.ExceptionThrower.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.IPayClient.html b/docs/IPay.IPayClient.html index ab8618a..fcc70f9 100644 --- a/docs/IPay.IPayClient.html +++ b/docs/IPay.IPayClient.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -106,7 +109,7 @@

    - Located at IPayClient.php
    + Located at IPayClient.php
    @@ -127,7 +130,7 @@

    - create(): static + create(): static @@ -153,7 +156,7 @@

    - getClient(): HttpMethodsClientInterface + getClient(): HttpMethodsClientInterface @@ -168,7 +171,7 @@

    #

    diff --git a/docs/IPay.Session.AuthenticatedSession.html b/docs/IPay.Session.AuthenticatedSession.html index f65c92f..b072c17 100644 --- a/docs/IPay.Session.AuthenticatedSession.html +++ b/docs/IPay.Session.AuthenticatedSession.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Session.SessionInterface.html b/docs/IPay.Session.SessionInterface.html index 5b53ebd..f2429e3 100644 --- a/docs/IPay.Session.SessionInterface.html +++ b/docs/IPay.Session.SessionInterface.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IPay.Session.UnauthenticatedSession.html b/docs/IPay.Session.UnauthenticatedSession.html index 323dcaf..4ebb274 100644 --- a/docs/IPay.Session.UnauthenticatedSession.html +++ b/docs/IPay.Session.UnauthenticatedSession.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/InvalidArgumentException.html b/docs/InvalidArgumentException.html index 60a356b..a63144f 100644 --- a/docs/InvalidArgumentException.html +++ b/docs/InvalidArgumentException.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -141,12 +144,12 @@

  • -Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException +Symfony\Component\OptionsResolver\Exception\MissingOptionsException
  • -Symfony\Component\OptionsResolver\Exception\MissingOptionsException +Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
  • diff --git a/docs/Iterator.html b/docs/Iterator.html index 76a57fb..63619de 100644 --- a/docs/Iterator.html +++ b/docs/Iterator.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/IteratorAggregate.html b/docs/IteratorAggregate.html index 81922e2..f6341cc 100644 --- a/docs/IteratorAggregate.html +++ b/docs/IteratorAggregate.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -116,6 +119,13 @@

    diff --git a/docs/Symfony.Component.OptionsResolver.Exception.AccessException.html b/docs/Symfony.Component.OptionsResolver.Exception.AccessException.html index da5c515..4bb9703 100644 --- a/docs/Symfony.Component.OptionsResolver.Exception.AccessException.html +++ b/docs/Symfony.Component.OptionsResolver.Exception.AccessException.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Symfony.Component.OptionsResolver.Exception.ExceptionInterface.html b/docs/Symfony.Component.OptionsResolver.Exception.ExceptionInterface.html index 6518526..9ce8c85 100644 --- a/docs/Symfony.Component.OptionsResolver.Exception.ExceptionInterface.html +++ b/docs/Symfony.Component.OptionsResolver.Exception.ExceptionInterface.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -183,13 +186,6 @@

    implements ExceptionInterface - -
  • -Symfony\Component\OptionsResolver\Exception\AccessException - - implements - ExceptionInterface -
  • Symfony\Component\OptionsResolver\Exception\NoSuchOptionException @@ -211,16 +207,23 @@

  • -Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException +Symfony\Component\OptionsResolver\Exception\MissingOptionsException
  • -Symfony\Component\OptionsResolver\Exception\MissingOptionsException +Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
  • + +
  • +Symfony\Component\OptionsResolver\Exception\AccessException + + implements + ExceptionInterface +
  • diff --git a/docs/Symfony.Component.OptionsResolver.Exception.InvalidArgumentException.html b/docs/Symfony.Component.OptionsResolver.Exception.InvalidArgumentException.html index 0db9f95..449f304 100644 --- a/docs/Symfony.Component.OptionsResolver.Exception.InvalidArgumentException.html +++ b/docs/Symfony.Component.OptionsResolver.Exception.InvalidArgumentException.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -208,12 +211,12 @@

  • -Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException +Symfony\Component\OptionsResolver\Exception\MissingOptionsException
  • -Symfony\Component\OptionsResolver\Exception\MissingOptionsException +Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
  • diff --git a/docs/Symfony.Component.OptionsResolver.Exception.InvalidOptionsException.html b/docs/Symfony.Component.OptionsResolver.Exception.InvalidOptionsException.html index 55209f8..8879bbc 100644 --- a/docs/Symfony.Component.OptionsResolver.Exception.InvalidOptionsException.html +++ b/docs/Symfony.Component.OptionsResolver.Exception.InvalidOptionsException.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Symfony.Component.OptionsResolver.Exception.MissingOptionsException.html b/docs/Symfony.Component.OptionsResolver.Exception.MissingOptionsException.html index d3abf09..4890b52 100644 --- a/docs/Symfony.Component.OptionsResolver.Exception.MissingOptionsException.html +++ b/docs/Symfony.Component.OptionsResolver.Exception.MissingOptionsException.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Symfony.Component.OptionsResolver.Exception.NoSuchOptionException.html b/docs/Symfony.Component.OptionsResolver.Exception.NoSuchOptionException.html index 3f9328a..5f1bcc4 100644 --- a/docs/Symfony.Component.OptionsResolver.Exception.NoSuchOptionException.html +++ b/docs/Symfony.Component.OptionsResolver.Exception.NoSuchOptionException.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Symfony.Component.OptionsResolver.Exception.OptionDefinitionException.html b/docs/Symfony.Component.OptionsResolver.Exception.OptionDefinitionException.html index 31bad68..18c463f 100644 --- a/docs/Symfony.Component.OptionsResolver.Exception.OptionDefinitionException.html +++ b/docs/Symfony.Component.OptionsResolver.Exception.OptionDefinitionException.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Symfony.Component.OptionsResolver.Exception.UndefinedOptionsException.html b/docs/Symfony.Component.OptionsResolver.Exception.UndefinedOptionsException.html index 9658ff7..9edc617 100644 --- a/docs/Symfony.Component.OptionsResolver.Exception.UndefinedOptionsException.html +++ b/docs/Symfony.Component.OptionsResolver.Exception.UndefinedOptionsException.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Symfony.Component.OptionsResolver.OptionConfigurator.html b/docs/Symfony.Component.OptionsResolver.OptionConfigurator.html index 26465e7..6110ecb 100644 --- a/docs/Symfony.Component.OptionsResolver.OptionConfigurator.html +++ b/docs/Symfony.Component.OptionsResolver.OptionConfigurator.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Symfony.Component.OptionsResolver.Options.html b/docs/Symfony.Component.OptionsResolver.Options.html index e2cccd7..51ccd8f 100644 --- a/docs/Symfony.Component.OptionsResolver.Options.html +++ b/docs/Symfony.Component.OptionsResolver.Options.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Symfony.Component.OptionsResolver.OptionsResolver.html b/docs/Symfony.Component.OptionsResolver.OptionsResolver.html index d6eb5db..bc48313 100644 --- a/docs/Symfony.Component.OptionsResolver.OptionsResolver.html +++ b/docs/Symfony.Component.OptionsResolver.OptionsResolver.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Symfony.Component.VarExporter.LazyGhostTrait.html b/docs/Symfony.Component.VarExporter.LazyGhostTrait.html index ffcc6a0..5bf3a32 100644 --- a/docs/Symfony.Component.VarExporter.LazyGhostTrait.html +++ b/docs/Symfony.Component.VarExporter.LazyGhostTrait.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/Throwable.html b/docs/Throwable.html index a41257d..93e80e0 100644 --- a/docs/Throwable.html +++ b/docs/Throwable.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -155,12 +158,12 @@

  • -Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException +Symfony\Component\OptionsResolver\Exception\MissingOptionsException
  • -Symfony\Component\OptionsResolver\Exception\MissingOptionsException +Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
  • @@ -246,13 +249,6 @@

    implements ExceptionInterface - -
  • -Symfony\Component\OptionsResolver\Exception\AccessException - - implements - ExceptionInterface -
  • Symfony\Component\OptionsResolver\Exception\NoSuchOptionException @@ -274,16 +270,23 @@

  • -Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException +Symfony\Component\OptionsResolver\Exception\MissingOptionsException
  • -Symfony\Component\OptionsResolver\Exception\MissingOptionsException +Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
  • + +
  • +Symfony\Component\OptionsResolver\Exception\AccessException + + implements + ExceptionInterface +
  • diff --git a/docs/Traversable.html b/docs/Traversable.html index 9713e04..5926f73 100644 --- a/docs/Traversable.html +++ b/docs/Traversable.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -116,6 +119,13 @@

    • +IPay\Builder\TransactionBuilder + + implements + IteratorAggregate<int, Transaction> + +
    • +
    • ArrayObject implements diff --git a/docs/UnitEnum.html b/docs/UnitEnum.html new file mode 100644 index 0000000..aa13cea --- /dev/null +++ b/docs/UnitEnum.html @@ -0,0 +1,188 @@ + + + + + + + + Interface UnitEnum | API + + + + + +
      + +
      + +
      +
      + +
      + +
      +

      + Interface UnitEnum +

      + + + + +
      + +
      + +
      + +
      + +
      + + + + + + + + + + + + + + +
      Methods
      + + + + +
      + + +
      + +
      + +
      + + diff --git a/docs/assets/elements.js b/docs/assets/elements.js index 81e0449..f016338 100644 --- a/docs/assets/elements.js +++ b/docs/assets/elements.js @@ -1 +1 @@ -window.ApiGen?.resolveElements({"namespace":[["EventSauce","namespace-EventSauce.html"],["EventSauce\\ObjectHydrator","namespace-EventSauce.ObjectHydrator.html"],["Http","namespace-Http.html"],["Http\\Client","namespace-Http.Client.html"],["Http\\Client\\Common","namespace-Http.Client.Common.html"],["Http\\Promise","namespace-Http.Promise.html"],["IPay","namespace-IPay.html"],["IPay\\Api","namespace-IPay.Api.html"],["IPay\\Builder","namespace-IPay.Builder.html"],["IPay\\Captcha","namespace-IPay.Captcha.html"],["IPay\\Encryption","namespace-IPay.Encryption.html"],["IPay\\Entity","namespace-IPay.Entity.html"],["IPay\\Exception","namespace-IPay.Exception.html"],["IPay\\Http","namespace-IPay.Http.html"],["IPay\\Http\\Plugin","namespace-IPay.Http.Plugin.html"],["IPay\\Session","namespace-IPay.Session.html"],["Psr","namespace-Psr.html"],["Psr\\Http","namespace-Psr.Http.html"],["Psr\\Http\\Client","namespace-Psr.Http.Client.html"],["Psr\\Http\\Message","namespace-Psr.Http.Message.html"],["Symfony","namespace-Symfony.html"],["Symfony\\Component","namespace-Symfony.Component.html"],["Symfony\\Component\\OptionsResolver","namespace-Symfony.Component.OptionsResolver.html"],["Symfony\\Component\\OptionsResolver\\Exception","namespace-Symfony.Component.OptionsResolver.Exception.html"],["Symfony\\Component\\VarExporter","namespace-Symfony.Component.VarExporter.html"],["","namespace-none.html"]],"classLike":[["ArrayAccess","ArrayAccess.html",{"method":[["offsetExists","_offsetExists"],["offsetGet","_offsetGet"],["offsetSet","_offsetSet"],["offsetUnset","_offsetUnset"]]}],["ArrayIterator","ArrayIterator.html",{"method":[["__construct","___construct"],["offsetExists","_offsetExists"],["offsetGet","_offsetGet"],["offsetSet","_offsetSet"],["offsetUnset","_offsetUnset"],["append","_append"],["getArrayCopy","_getArrayCopy"],["count","_count"],["getFlags","_getFlags"],["setFlags","_setFlags"],["asort","_asort"],["ksort","_ksort"],["uasort","_uasort"],["uksort","_uksort"],["natsort","_natsort"],["natcasesort","_natcasesort"],["unserialize","_unserialize"],["serialize","_serialize"],["__serialize","___serialize"],["__unserialize","___unserialize"],["rewind","_rewind"],["current","_current"],["key","_key"],["next","_next"],["valid","_valid"],["seek","_seek"],["__debugInfo","___debugInfo"]]}],["ArrayObject","ArrayObject.html",{"method":[["__construct","___construct"],["offsetExists","_offsetExists"],["offsetGet","_offsetGet"],["offsetSet","_offsetSet"],["offsetUnset","_offsetUnset"],["append","_append"],["getArrayCopy","_getArrayCopy"],["count","_count"],["getFlags","_getFlags"],["setFlags","_setFlags"],["asort","_asort"],["ksort","_ksort"],["uasort","_uasort"],["uksort","_uksort"],["natsort","_natsort"],["natcasesort","_natcasesort"],["unserialize","_unserialize"],["serialize","_serialize"],["__serialize","___serialize"],["__unserialize","___unserialize"],["getIterator","_getIterator"],["exchangeArray","_exchangeArray"],["setIteratorClass","_setIteratorClass"],["getIteratorClass","_getIteratorClass"],["__debugInfo","___debugInfo"]]}],["Closure","Closure.html",{"method":[["bind","_bind"],["bindTo","_bindTo"],["call","_call"],["fromCallable","_fromCallable"]]}],["Countable","Countable.html",{"method":[["count","_count"]]}],["DateInterval","DateInterval.html",{"method":[["__construct","___construct"],["createFromDateString","_createFromDateString"],["format","_format"],["__serialize","___serialize"],["__unserialize","___unserialize"],["__wakeup","___wakeup"],["__set_state","___set_state"]]}],["DateTime","DateTime.html",{"method":[["__construct","___construct"],["__serialize","___serialize"],["__unserialize","___unserialize"],["__wakeup","___wakeup"],["__set_state","___set_state"],["createFromImmutable","_createFromImmutable"],["createFromInterface","_createFromInterface"],["createFromFormat","_createFromFormat"],["getLastErrors","_getLastErrors"],["format","_format"],["modify","_modify"],["add","_add"],["sub","_sub"],["getTimezone","_getTimezone"],["setTimezone","_setTimezone"],["getOffset","_getOffset"],["setTime","_setTime"],["setDate","_setDate"],["setISODate","_setISODate"],["setTimestamp","_setTimestamp"],["getTimestamp","_getTimestamp"],["diff","_diff"]]}],["DateTimeImmutable","DateTimeImmutable.html",{"method":[["__construct","___construct"],["__serialize","___serialize"],["__unserialize","___unserialize"],["__wakeup","___wakeup"],["__set_state","___set_state"],["createFromFormat","_createFromFormat"],["getLastErrors","_getLastErrors"],["format","_format"],["getTimezone","_getTimezone"],["getOffset","_getOffset"],["getTimestamp","_getTimestamp"],["diff","_diff"],["modify","_modify"],["add","_add"],["sub","_sub"],["setTimezone","_setTimezone"],["setTime","_setTime"],["setDate","_setDate"],["setISODate","_setISODate"],["setTimestamp","_setTimestamp"],["createFromMutable","_createFromMutable"],["createFromInterface","_createFromInterface"]]}],["DateTimeInterface","DateTimeInterface.html",{"method":[["format","_format"],["getTimezone","_getTimezone"],["getOffset","_getOffset"],["getTimestamp","_getTimestamp"],["diff","_diff"],["__wakeup","___wakeup"],["__serialize","___serialize"],["__unserialize","___unserialize"]]}],["DateTimeZone","DateTimeZone.html",{"method":[["__construct","___construct"],["getName","_getName"],["getOffset","_getOffset"],["getTransitions","_getTransitions"],["getLocation","_getLocation"],["listAbbreviations","_listAbbreviations"],["listIdentifiers","_listIdentifiers"],["__serialize","___serialize"],["__unserialize","___unserialize"],["__wakeup","___wakeup"],["__set_state","___set_state"]]}],["EventSauce\\ObjectHydrator\\IterableList","EventSauce.ObjectHydrator.IterableList.html",{"method":[["__construct","___construct"],["getIterator","_getIterator"],["toArray","_toArray"]]}],["EventSauce\\ObjectHydrator\\ObjectMapper","EventSauce.ObjectHydrator.ObjectMapper.html",{"method":[["hydrateObject","_hydrateObject"],["hydrateObjects","_hydrateObjects"],["serializeObject","_serializeObject"],["serializeObjectOfType","_serializeObjectOfType"],["serializeObjects","_serializeObjects"]]}],["EventSauce\\ObjectHydrator\\UnableToHydrateObject","EventSauce.ObjectHydrator.UnableToHydrateObject.html",{"method":[["missingFields","_missingFields"],["stack","_stack"],["dueToError","_dueToError"],["dueToMissingFields","_dueToMissingFields"],["noHydrationDefined","_noHydrationDefined"],["classIsNotInstantiable","_classIsNotInstantiable"]]}],["EventSauce\\ObjectHydrator\\UnableToSerializeObject","EventSauce.ObjectHydrator.UnableToSerializeObject.html",{"method":[["dueToError","_dueToError"]]}],["Exception","Exception.html",{"method":[["__construct","___construct"],["__wakeup","___wakeup"],["getMessage","_getMessage"],["getCode","_getCode"],["getFile","_getFile"],["getLine","_getLine"],["getTrace","_getTrace"],["getPrevious","_getPrevious"],["getTraceAsString","_getTraceAsString"],["__toString","___toString"]]}],["Http\\Client\\Common\\HttpMethodsClientInterface","Http.Client.Common.HttpMethodsClientInterface.html",{"method":[["get","_get"],["head","_head"],["trace","_trace"],["post","_post"],["put","_put"],["patch","_patch"],["delete","_delete"],["options","_options"],["send","_send"]]}],["Http\\Client\\Common\\Plugin","Http.Client.Common.Plugin.html",{"method":[["handleRequest","_handleRequest"]]}],["Http\\Client\\Exception","Http.Client.Exception.html",[]],["Http\\Client\\HttpClient","Http.Client.HttpClient.html",[]],["Http\\Promise\\Promise","Http.Promise.Promise.html",{"constant":[["PENDING","PENDING"],["FULFILLED","FULFILLED"],["REJECTED","REJECTED"]],"method":[["then","_then"],["getState","_getState"],["wait","_wait"]]}],["InvalidArgumentException","InvalidArgumentException.html",[]],["IPay\\Api\\AbstractApi","IPay.Api.AbstractApi.html",{"property":[["objectMapper","$objectMapper"],["iPayClient","$iPayClient"]],"method":[["__construct","___construct"],["post","_post"],["createOptionsResolver","_createOptionsResolver"],["getSession","_getSession"]]}],["IPay\\Api\\AuthenticatedApi","IPay.Api.AuthenticatedApi.html",{"property":[["customer","$customer"],["accounts","$accounts"]],"method":[["__construct","___construct"],["historyTransactions","_historyTransactions"]]}],["IPay\\Api\\UnauthenticatedApi","IPay.Api.UnauthenticatedApi.html",{"method":[["login","_login"]]}],["IPay\\Builder\\BodyBuilder","IPay.Builder.BodyBuilder.html",{"method":[["from","_from"],["enhance","_enhance"],["build","_build"],["encrypt","_encrypt"],["__toString","___toString"],["jsonSerialize","_jsonSerialize"]]}],["IPay\\Captcha\\CaptchaSolver","IPay.Captcha.CaptchaSolver.html",{"method":[["solve","_solve"]]}],["IPay\\Encryption\\Encrypter","IPay.Encryption.Encrypter.html",{"method":[["encrypt","_encrypt"]]}],["IPay\\Entity\\Account","IPay.Entity.Account.html",{"property":[["title","$title"],["number","$number"],["currencyCode","$currencyCode"],["accountState","$accountState"]],"method":[["__construct","___construct"]]}],["IPay\\Entity\\AccountState","IPay.Entity.AccountState.html",{"property":[["availableBalance","$availableBalance"],["balance","$balance"]],"method":[["__construct","___construct"]]}],["IPay\\Entity\\Customer","IPay.Entity.Customer.html",{"property":[["name","$name"],["phone","$phone"],["job","$job"],["accountNumber","$accountNumber"]],"method":[["__construct","___construct"]]}],["IPay\\Entity\\Transaction","IPay.Entity.Transaction.html",{"property":[["currency","$currency"],["amount","$amount"],["remark","$remark"],["corresponsiveAccount","$corresponsiveAccount"],["corresponsiveName","$corresponsiveName"],["processDate","$processDate"]],"method":[["__construct","___construct"]]}],["IPay\\Exception\\LoginException","IPay.Exception.LoginException.html",[]],["IPay\\Exception\\SessionException","IPay.Exception.SessionException.html",[]],["IPay\\Http\\Plugin\\ExceptionThrower","IPay.Http.Plugin.ExceptionThrower.html",{"method":[["handleRequest","_handleRequest"]]}],["IPay\\IPayClient","IPay.IPayClient.html",{"method":[["create","_create"],["getClient","_getClient"],["guest","_guest"]]}],["IPay\\Session\\AuthenticatedSession","IPay.Session.AuthenticatedSession.html",{"property":[["id","$id"]],"method":[["__construct","___construct"],["getRequestParameters","_getRequestParameters"]]}],["IPay\\Session\\SessionInterface","IPay.Session.SessionInterface.html",{"method":[["getRequestParameters","_getRequestParameters"]]}],["IPay\\Session\\UnauthenticatedSession","IPay.Session.UnauthenticatedSession.html",{"method":[["getRequestParameters","_getRequestParameters"]]}],["Iterator","Iterator.html",{"method":[["current","_current"],["next","_next"],["key","_key"],["valid","_valid"],["rewind","_rewind"]]}],["IteratorAggregate","IteratorAggregate.html",{"method":[["getIterator","_getIterator"]]}],["JsonSerializable","JsonSerializable.html",{"method":[["jsonSerialize","_jsonSerialize"]]}],["LogicException","LogicException.html",[]],["OutOfBoundsException","OutOfBoundsException.html",[]],["Psr\\Http\\Client\\ClientExceptionInterface","Psr.Http.Client.ClientExceptionInterface.html",[]],["Psr\\Http\\Client\\ClientInterface","Psr.Http.Client.ClientInterface.html",{"method":[["sendRequest","_sendRequest"]]}],["Psr\\Http\\Message\\MessageInterface","Psr.Http.Message.MessageInterface.html",{"method":[["getProtocolVersion","_getProtocolVersion"],["withProtocolVersion","_withProtocolVersion"],["getHeaders","_getHeaders"],["hasHeader","_hasHeader"],["getHeader","_getHeader"],["getHeaderLine","_getHeaderLine"],["withHeader","_withHeader"],["withAddedHeader","_withAddedHeader"],["withoutHeader","_withoutHeader"],["getBody","_getBody"],["withBody","_withBody"]]}],["Psr\\Http\\Message\\RequestInterface","Psr.Http.Message.RequestInterface.html",{"method":[["getRequestTarget","_getRequestTarget"],["withRequestTarget","_withRequestTarget"],["getMethod","_getMethod"],["withMethod","_withMethod"],["getUri","_getUri"],["withUri","_withUri"]]}],["Psr\\Http\\Message\\ResponseInterface","Psr.Http.Message.ResponseInterface.html",{"method":[["getStatusCode","_getStatusCode"],["withStatus","_withStatus"],["getReasonPhrase","_getReasonPhrase"]]}],["Psr\\Http\\Message\\StreamInterface","Psr.Http.Message.StreamInterface.html",{"method":[["__toString","___toString"],["close","_close"],["detach","_detach"],["getSize","_getSize"],["tell","_tell"],["eof","_eof"],["isSeekable","_isSeekable"],["seek","_seek"],["rewind","_rewind"],["isWritable","_isWritable"],["write","_write"],["isReadable","_isReadable"],["read","_read"],["getContents","_getContents"],["getMetadata","_getMetadata"]]}],["Psr\\Http\\Message\\UriInterface","Psr.Http.Message.UriInterface.html",{"method":[["getScheme","_getScheme"],["getAuthority","_getAuthority"],["getUserInfo","_getUserInfo"],["getHost","_getHost"],["getPort","_getPort"],["getPath","_getPath"],["getQuery","_getQuery"],["getFragment","_getFragment"],["withScheme","_withScheme"],["withUserInfo","_withUserInfo"],["withHost","_withHost"],["withPort","_withPort"],["withPath","_withPath"],["withQuery","_withQuery"],["withFragment","_withFragment"],["__toString","___toString"]]}],["RuntimeException","RuntimeException.html",[]],["SeekableIterator","SeekableIterator.html",{"method":[["seek","_seek"]]}],["Serializable","Serializable.html",{"method":[["serialize","_serialize"],["unserialize","_unserialize"]]}],["Stringable","Stringable.html",{"method":[["__toString","___toString"]]}],["Symfony\\Component\\OptionsResolver\\Exception\\AccessException","Symfony.Component.OptionsResolver.Exception.AccessException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface","Symfony.Component.OptionsResolver.Exception.ExceptionInterface.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException","Symfony.Component.OptionsResolver.Exception.InvalidArgumentException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException","Symfony.Component.OptionsResolver.Exception.InvalidOptionsException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException","Symfony.Component.OptionsResolver.Exception.MissingOptionsException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException","Symfony.Component.OptionsResolver.Exception.NoSuchOptionException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException","Symfony.Component.OptionsResolver.Exception.OptionDefinitionException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException","Symfony.Component.OptionsResolver.Exception.UndefinedOptionsException.html",[]],["Symfony\\Component\\OptionsResolver\\OptionConfigurator","Symfony.Component.OptionsResolver.OptionConfigurator.html",{"method":[["__construct","___construct"],["allowedTypes","_allowedTypes"],["allowedValues","_allowedValues"],["default","_default"],["define","_define"],["deprecated","_deprecated"],["normalize","_normalize"],["required","_required"],["info","_info"],["ignoreUndefined","_ignoreUndefined"]]}],["Symfony\\Component\\OptionsResolver\\Options","Symfony.Component.OptionsResolver.Options.html",[]],["Symfony\\Component\\OptionsResolver\\OptionsResolver","Symfony.Component.OptionsResolver.OptionsResolver.html",{"method":[["setDefault","_setDefault"],["setDefaults","_setDefaults"],["hasDefault","_hasDefault"],["setRequired","_setRequired"],["isRequired","_isRequired"],["getRequiredOptions","_getRequiredOptions"],["isMissing","_isMissing"],["getMissingOptions","_getMissingOptions"],["setDefined","_setDefined"],["isDefined","_isDefined"],["getDefinedOptions","_getDefinedOptions"],["isNested","_isNested"],["setDeprecated","_setDeprecated"],["isDeprecated","_isDeprecated"],["setNormalizer","_setNormalizer"],["addNormalizer","_addNormalizer"],["setAllowedValues","_setAllowedValues"],["addAllowedValues","_addAllowedValues"],["setAllowedTypes","_setAllowedTypes"],["addAllowedTypes","_addAllowedTypes"],["define","_define"],["setInfo","_setInfo"],["getInfo","_getInfo"],["setPrototype","_setPrototype"],["isPrototype","_isPrototype"],["remove","_remove"],["clear","_clear"],["resolve","_resolve"],["offsetGet","_offsetGet"],["offsetExists","_offsetExists"],["offsetSet","_offsetSet"],["offsetUnset","_offsetUnset"],["count","_count"],["setIgnoreUndefined","_setIgnoreUndefined"]]}],["Symfony\\Component\\VarExporter\\LazyGhostTrait","Symfony.Component.VarExporter.LazyGhostTrait.html",{"method":[["createLazyGhost","_createLazyGhost"],["isLazyObjectInitialized","_isLazyObjectInitialized"],["initializeLazyObject","_initializeLazyObject"],["resetLazyObject","_resetLazyObject"],["__get","___get"],["__set","___set"],["__isset","___isset"],["__unset","___unset"],["__clone","___clone"],["__serialize","___serialize"],["__destruct","___destruct"]]}],["Throwable","Throwable.html",{"method":[["getMessage","_getMessage"],["getCode","_getCode"],["getFile","_getFile"],["getLine","_getLine"],["getTrace","_getTrace"],["getPrevious","_getPrevious"],["getTraceAsString","_getTraceAsString"]]}],["Traversable","Traversable.html",[]]],"function":[["ipay","function-ipay.html"]]}) \ No newline at end of file +window.ApiGen?.resolveElements({"namespace":[["EventSauce","namespace-EventSauce.html"],["EventSauce\\ObjectHydrator","namespace-EventSauce.ObjectHydrator.html"],["Http","namespace-Http.html"],["Http\\Client","namespace-Http.Client.html"],["Http\\Client\\Common","namespace-Http.Client.Common.html"],["Http\\Promise","namespace-Http.Promise.html"],["IPay","namespace-IPay.html"],["IPay\\Api","namespace-IPay.Api.html"],["IPay\\Builder","namespace-IPay.Builder.html"],["IPay\\Captcha","namespace-IPay.Captcha.html"],["IPay\\Encryption","namespace-IPay.Encryption.html"],["IPay\\Entity","namespace-IPay.Entity.html"],["IPay\\Enum","namespace-IPay.Enum.html"],["IPay\\Exception","namespace-IPay.Exception.html"],["IPay\\Http","namespace-IPay.Http.html"],["IPay\\Http\\Plugin","namespace-IPay.Http.Plugin.html"],["IPay\\Session","namespace-IPay.Session.html"],["Psr","namespace-Psr.html"],["Psr\\Http","namespace-Psr.Http.html"],["Psr\\Http\\Client","namespace-Psr.Http.Client.html"],["Psr\\Http\\Message","namespace-Psr.Http.Message.html"],["Symfony","namespace-Symfony.html"],["Symfony\\Component","namespace-Symfony.Component.html"],["Symfony\\Component\\OptionsResolver","namespace-Symfony.Component.OptionsResolver.html"],["Symfony\\Component\\OptionsResolver\\Exception","namespace-Symfony.Component.OptionsResolver.Exception.html"],["Symfony\\Component\\VarExporter","namespace-Symfony.Component.VarExporter.html"],["","namespace-none.html"]],"classLike":[["ArrayAccess","ArrayAccess.html",{"method":[["offsetExists","_offsetExists"],["offsetGet","_offsetGet"],["offsetSet","_offsetSet"],["offsetUnset","_offsetUnset"]]}],["ArrayIterator","ArrayIterator.html",{"method":[["__construct","___construct"],["offsetExists","_offsetExists"],["offsetGet","_offsetGet"],["offsetSet","_offsetSet"],["offsetUnset","_offsetUnset"],["append","_append"],["getArrayCopy","_getArrayCopy"],["count","_count"],["getFlags","_getFlags"],["setFlags","_setFlags"],["asort","_asort"],["ksort","_ksort"],["uasort","_uasort"],["uksort","_uksort"],["natsort","_natsort"],["natcasesort","_natcasesort"],["unserialize","_unserialize"],["serialize","_serialize"],["__serialize","___serialize"],["__unserialize","___unserialize"],["rewind","_rewind"],["current","_current"],["key","_key"],["next","_next"],["valid","_valid"],["seek","_seek"],["__debugInfo","___debugInfo"]]}],["ArrayObject","ArrayObject.html",{"method":[["__construct","___construct"],["offsetExists","_offsetExists"],["offsetGet","_offsetGet"],["offsetSet","_offsetSet"],["offsetUnset","_offsetUnset"],["append","_append"],["getArrayCopy","_getArrayCopy"],["count","_count"],["getFlags","_getFlags"],["setFlags","_setFlags"],["asort","_asort"],["ksort","_ksort"],["uasort","_uasort"],["uksort","_uksort"],["natsort","_natsort"],["natcasesort","_natcasesort"],["unserialize","_unserialize"],["serialize","_serialize"],["__serialize","___serialize"],["__unserialize","___unserialize"],["getIterator","_getIterator"],["exchangeArray","_exchangeArray"],["setIteratorClass","_setIteratorClass"],["getIteratorClass","_getIteratorClass"],["__debugInfo","___debugInfo"]]}],["BackedEnum","BackedEnum.html",{"method":[["from","_from"],["tryFrom","_tryFrom"]]}],["Closure","Closure.html",{"method":[["bind","_bind"],["bindTo","_bindTo"],["call","_call"],["fromCallable","_fromCallable"]]}],["Countable","Countable.html",{"method":[["count","_count"]]}],["DateInterval","DateInterval.html",{"method":[["__construct","___construct"],["createFromDateString","_createFromDateString"],["format","_format"],["__serialize","___serialize"],["__unserialize","___unserialize"],["__wakeup","___wakeup"],["__set_state","___set_state"]]}],["DateTime","DateTime.html",{"method":[["__construct","___construct"],["__serialize","___serialize"],["__unserialize","___unserialize"],["__wakeup","___wakeup"],["__set_state","___set_state"],["createFromImmutable","_createFromImmutable"],["createFromInterface","_createFromInterface"],["createFromFormat","_createFromFormat"],["getLastErrors","_getLastErrors"],["format","_format"],["modify","_modify"],["add","_add"],["sub","_sub"],["getTimezone","_getTimezone"],["setTimezone","_setTimezone"],["getOffset","_getOffset"],["setTime","_setTime"],["setDate","_setDate"],["setISODate","_setISODate"],["setTimestamp","_setTimestamp"],["getTimestamp","_getTimestamp"],["diff","_diff"]]}],["DateTimeImmutable","DateTimeImmutable.html",{"method":[["__construct","___construct"],["__serialize","___serialize"],["__unserialize","___unserialize"],["__wakeup","___wakeup"],["__set_state","___set_state"],["createFromFormat","_createFromFormat"],["getLastErrors","_getLastErrors"],["format","_format"],["getTimezone","_getTimezone"],["getOffset","_getOffset"],["getTimestamp","_getTimestamp"],["diff","_diff"],["modify","_modify"],["add","_add"],["sub","_sub"],["setTimezone","_setTimezone"],["setTime","_setTime"],["setDate","_setDate"],["setISODate","_setISODate"],["setTimestamp","_setTimestamp"],["createFromMutable","_createFromMutable"],["createFromInterface","_createFromInterface"]]}],["DateTimeInterface","DateTimeInterface.html",{"method":[["format","_format"],["getTimezone","_getTimezone"],["getOffset","_getOffset"],["getTimestamp","_getTimestamp"],["diff","_diff"],["__wakeup","___wakeup"],["__serialize","___serialize"],["__unserialize","___unserialize"]]}],["DateTimeZone","DateTimeZone.html",{"method":[["__construct","___construct"],["getName","_getName"],["getOffset","_getOffset"],["getTransitions","_getTransitions"],["getLocation","_getLocation"],["listAbbreviations","_listAbbreviations"],["listIdentifiers","_listIdentifiers"],["__serialize","___serialize"],["__unserialize","___unserialize"],["__wakeup","___wakeup"],["__set_state","___set_state"]]}],["EventSauce\\ObjectHydrator\\IterableList","EventSauce.ObjectHydrator.IterableList.html",{"method":[["__construct","___construct"],["getIterator","_getIterator"],["toArray","_toArray"]]}],["EventSauce\\ObjectHydrator\\ObjectMapper","EventSauce.ObjectHydrator.ObjectMapper.html",{"method":[["hydrateObject","_hydrateObject"],["hydrateObjects","_hydrateObjects"],["serializeObject","_serializeObject"],["serializeObjectOfType","_serializeObjectOfType"],["serializeObjects","_serializeObjects"]]}],["EventSauce\\ObjectHydrator\\UnableToHydrateObject","EventSauce.ObjectHydrator.UnableToHydrateObject.html",{"method":[["missingFields","_missingFields"],["stack","_stack"],["dueToError","_dueToError"],["dueToMissingFields","_dueToMissingFields"],["noHydrationDefined","_noHydrationDefined"],["classIsNotInstantiable","_classIsNotInstantiable"]]}],["EventSauce\\ObjectHydrator\\UnableToSerializeObject","EventSauce.ObjectHydrator.UnableToSerializeObject.html",{"method":[["dueToError","_dueToError"]]}],["Exception","Exception.html",{"method":[["__construct","___construct"],["__wakeup","___wakeup"],["getMessage","_getMessage"],["getCode","_getCode"],["getFile","_getFile"],["getLine","_getLine"],["getTrace","_getTrace"],["getPrevious","_getPrevious"],["getTraceAsString","_getTraceAsString"],["__toString","___toString"]]}],["Http\\Client\\Common\\HttpMethodsClientInterface","Http.Client.Common.HttpMethodsClientInterface.html",{"method":[["get","_get"],["head","_head"],["trace","_trace"],["post","_post"],["put","_put"],["patch","_patch"],["delete","_delete"],["options","_options"],["send","_send"]]}],["Http\\Client\\Common\\Plugin","Http.Client.Common.Plugin.html",{"method":[["handleRequest","_handleRequest"]]}],["Http\\Client\\Exception","Http.Client.Exception.html",[]],["Http\\Client\\HttpClient","Http.Client.HttpClient.html",[]],["Http\\Promise\\Promise","Http.Promise.Promise.html",{"constant":[["PENDING","PENDING"],["FULFILLED","FULFILLED"],["REJECTED","REJECTED"]],"method":[["then","_then"],["getState","_getState"],["wait","_wait"]]}],["InvalidArgumentException","InvalidArgumentException.html",[]],["IPay\\Api\\AbstractApi","IPay.Api.AbstractApi.html",{"property":[["objectMapper","$objectMapper"],["iPayClient","$iPayClient"]],"method":[["__construct","___construct"],["post","_post"],["createOptionsResolver","_createOptionsResolver"],["getSession","_getSession"]]}],["IPay\\Api\\AuthenticatedApi","IPay.Api.AuthenticatedApi.html",{"property":[["customer","$customer"],["accounts","$accounts"]],"method":[["__construct","___construct"],["transactions","_transactions"]]}],["IPay\\Api\\UnauthenticatedApi","IPay.Api.UnauthenticatedApi.html",{"method":[["login","_login"]]}],["IPay\\Builder\\BodyBuilder","IPay.Builder.BodyBuilder.html",{"method":[["from","_from"],["enhance","_enhance"],["build","_build"],["encrypt","_encrypt"],["__toString","___toString"],["jsonSerialize","_jsonSerialize"]]}],["IPay\\Builder\\TransactionBuilder","IPay.Builder.TransactionBuilder.html",{"method":[["__construct","___construct"],["between","_between"],["today","_today"],["type","_type"],["getIterator","_getIterator"]]}],["IPay\\Captcha\\CaptchaSolver","IPay.Captcha.CaptchaSolver.html",{"method":[["solve","_solve"]]}],["IPay\\Encryption\\Encrypter","IPay.Encryption.Encrypter.html",{"method":[["encrypt","_encrypt"]]}],["IPay\\Entity\\Account","IPay.Entity.Account.html",{"property":[["title","$title"],["number","$number"],["currencyCode","$currencyCode"],["accountState","$accountState"]],"method":[["__construct","___construct"]]}],["IPay\\Entity\\AccountState","IPay.Entity.AccountState.html",{"property":[["availableBalance","$availableBalance"],["balance","$balance"]],"method":[["__construct","___construct"]]}],["IPay\\Entity\\Customer","IPay.Entity.Customer.html",{"property":[["name","$name"],["phone","$phone"],["job","$job"],["accountNumber","$accountNumber"]],"method":[["__construct","___construct"]]}],["IPay\\Entity\\Transaction","IPay.Entity.Transaction.html",{"property":[["currency","$currency"],["amount","$amount"],["remark","$remark"],["corresponsiveAccount","$corresponsiveAccount"],["corresponsiveName","$corresponsiveName"],["processDate","$processDate"]],"method":[["__construct","___construct"]]}],["IPay\\Enum\\TransactionType","IPay.Enum.TransactionType.html",[]],["IPay\\Exception\\LoginException","IPay.Exception.LoginException.html",[]],["IPay\\Exception\\SessionException","IPay.Exception.SessionException.html",[]],["IPay\\Http\\Plugin\\ExceptionThrower","IPay.Http.Plugin.ExceptionThrower.html",{"method":[["handleRequest","_handleRequest"]]}],["IPay\\IPayClient","IPay.IPayClient.html",{"method":[["create","_create"],["getClient","_getClient"],["login","_login"]]}],["IPay\\Session\\AuthenticatedSession","IPay.Session.AuthenticatedSession.html",{"property":[["id","$id"]],"method":[["__construct","___construct"],["getRequestParameters","_getRequestParameters"]]}],["IPay\\Session\\SessionInterface","IPay.Session.SessionInterface.html",{"method":[["getRequestParameters","_getRequestParameters"]]}],["IPay\\Session\\UnauthenticatedSession","IPay.Session.UnauthenticatedSession.html",{"method":[["getRequestParameters","_getRequestParameters"]]}],["Iterator","Iterator.html",{"method":[["current","_current"],["next","_next"],["key","_key"],["valid","_valid"],["rewind","_rewind"]]}],["IteratorAggregate","IteratorAggregate.html",{"method":[["getIterator","_getIterator"]]}],["JsonSerializable","JsonSerializable.html",{"method":[["jsonSerialize","_jsonSerialize"]]}],["LogicException","LogicException.html",[]],["OutOfBoundsException","OutOfBoundsException.html",[]],["Psr\\Http\\Client\\ClientExceptionInterface","Psr.Http.Client.ClientExceptionInterface.html",[]],["Psr\\Http\\Client\\ClientInterface","Psr.Http.Client.ClientInterface.html",{"method":[["sendRequest","_sendRequest"]]}],["Psr\\Http\\Message\\MessageInterface","Psr.Http.Message.MessageInterface.html",{"method":[["getProtocolVersion","_getProtocolVersion"],["withProtocolVersion","_withProtocolVersion"],["getHeaders","_getHeaders"],["hasHeader","_hasHeader"],["getHeader","_getHeader"],["getHeaderLine","_getHeaderLine"],["withHeader","_withHeader"],["withAddedHeader","_withAddedHeader"],["withoutHeader","_withoutHeader"],["getBody","_getBody"],["withBody","_withBody"]]}],["Psr\\Http\\Message\\RequestInterface","Psr.Http.Message.RequestInterface.html",{"method":[["getRequestTarget","_getRequestTarget"],["withRequestTarget","_withRequestTarget"],["getMethod","_getMethod"],["withMethod","_withMethod"],["getUri","_getUri"],["withUri","_withUri"]]}],["Psr\\Http\\Message\\ResponseInterface","Psr.Http.Message.ResponseInterface.html",{"method":[["getStatusCode","_getStatusCode"],["withStatus","_withStatus"],["getReasonPhrase","_getReasonPhrase"]]}],["Psr\\Http\\Message\\StreamInterface","Psr.Http.Message.StreamInterface.html",{"method":[["__toString","___toString"],["close","_close"],["detach","_detach"],["getSize","_getSize"],["tell","_tell"],["eof","_eof"],["isSeekable","_isSeekable"],["seek","_seek"],["rewind","_rewind"],["isWritable","_isWritable"],["write","_write"],["isReadable","_isReadable"],["read","_read"],["getContents","_getContents"],["getMetadata","_getMetadata"]]}],["Psr\\Http\\Message\\UriInterface","Psr.Http.Message.UriInterface.html",{"method":[["getScheme","_getScheme"],["getAuthority","_getAuthority"],["getUserInfo","_getUserInfo"],["getHost","_getHost"],["getPort","_getPort"],["getPath","_getPath"],["getQuery","_getQuery"],["getFragment","_getFragment"],["withScheme","_withScheme"],["withUserInfo","_withUserInfo"],["withHost","_withHost"],["withPort","_withPort"],["withPath","_withPath"],["withQuery","_withQuery"],["withFragment","_withFragment"],["__toString","___toString"]]}],["RuntimeException","RuntimeException.html",[]],["SeekableIterator","SeekableIterator.html",{"method":[["seek","_seek"]]}],["Serializable","Serializable.html",{"method":[["serialize","_serialize"],["unserialize","_unserialize"]]}],["Stringable","Stringable.html",{"method":[["__toString","___toString"]]}],["Symfony\\Component\\OptionsResolver\\Exception\\AccessException","Symfony.Component.OptionsResolver.Exception.AccessException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface","Symfony.Component.OptionsResolver.Exception.ExceptionInterface.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException","Symfony.Component.OptionsResolver.Exception.InvalidArgumentException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException","Symfony.Component.OptionsResolver.Exception.InvalidOptionsException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException","Symfony.Component.OptionsResolver.Exception.MissingOptionsException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException","Symfony.Component.OptionsResolver.Exception.NoSuchOptionException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException","Symfony.Component.OptionsResolver.Exception.OptionDefinitionException.html",[]],["Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException","Symfony.Component.OptionsResolver.Exception.UndefinedOptionsException.html",[]],["Symfony\\Component\\OptionsResolver\\OptionConfigurator","Symfony.Component.OptionsResolver.OptionConfigurator.html",{"method":[["__construct","___construct"],["allowedTypes","_allowedTypes"],["allowedValues","_allowedValues"],["default","_default"],["define","_define"],["deprecated","_deprecated"],["normalize","_normalize"],["required","_required"],["info","_info"],["ignoreUndefined","_ignoreUndefined"]]}],["Symfony\\Component\\OptionsResolver\\Options","Symfony.Component.OptionsResolver.Options.html",[]],["Symfony\\Component\\OptionsResolver\\OptionsResolver","Symfony.Component.OptionsResolver.OptionsResolver.html",{"method":[["setDefault","_setDefault"],["setDefaults","_setDefaults"],["hasDefault","_hasDefault"],["setRequired","_setRequired"],["isRequired","_isRequired"],["getRequiredOptions","_getRequiredOptions"],["isMissing","_isMissing"],["getMissingOptions","_getMissingOptions"],["setDefined","_setDefined"],["isDefined","_isDefined"],["getDefinedOptions","_getDefinedOptions"],["isNested","_isNested"],["setDeprecated","_setDeprecated"],["isDeprecated","_isDeprecated"],["setNormalizer","_setNormalizer"],["addNormalizer","_addNormalizer"],["setAllowedValues","_setAllowedValues"],["addAllowedValues","_addAllowedValues"],["setAllowedTypes","_setAllowedTypes"],["addAllowedTypes","_addAllowedTypes"],["define","_define"],["setInfo","_setInfo"],["getInfo","_getInfo"],["setPrototype","_setPrototype"],["isPrototype","_isPrototype"],["remove","_remove"],["clear","_clear"],["resolve","_resolve"],["offsetGet","_offsetGet"],["offsetExists","_offsetExists"],["offsetSet","_offsetSet"],["offsetUnset","_offsetUnset"],["count","_count"],["setIgnoreUndefined","_setIgnoreUndefined"]]}],["Symfony\\Component\\VarExporter\\LazyGhostTrait","Symfony.Component.VarExporter.LazyGhostTrait.html",{"method":[["createLazyGhost","_createLazyGhost"],["isLazyObjectInitialized","_isLazyObjectInitialized"],["initializeLazyObject","_initializeLazyObject"],["resetLazyObject","_resetLazyObject"],["__get","___get"],["__set","___set"],["__isset","___isset"],["__unset","___unset"],["__clone","___clone"],["__serialize","___serialize"],["__destruct","___destruct"]]}],["Throwable","Throwable.html",{"method":[["getMessage","_getMessage"],["getCode","_getCode"],["getFile","_getFile"],["getLine","_getLine"],["getTrace","_getTrace"],["getPrevious","_getPrevious"],["getTraceAsString","_getTraceAsString"]]}],["Traversable","Traversable.html",[]],["UnitEnum","UnitEnum.html",{"method":[["cases","_cases"]]}]],"function":[["ipay","function-ipay.html"]]}) \ No newline at end of file diff --git a/docs/function-ipay.html b/docs/function-ipay.html index bce2137..845bdaa 100644 --- a/docs/function-ipay.html +++ b/docs/function-ipay.html @@ -34,6 +34,9 @@

      Namespaces

    • + diff --git a/docs/index.html b/docs/index.html index e0dc8a6..1849faf 100644 --- a/docs/index.html +++ b/docs/index.html @@ -34,6 +34,9 @@

      Namespaces

      + @@ -107,6 +110,9 @@

      API documentation

      IPay\Entity + + IPay\Enum + IPay\Exception diff --git a/docs/namespace-EventSauce.ObjectHydrator.html b/docs/namespace-EventSauce.ObjectHydrator.html index 7315df7..387b1e4 100644 --- a/docs/namespace-EventSauce.ObjectHydrator.html +++ b/docs/namespace-EventSauce.ObjectHydrator.html @@ -42,6 +42,9 @@

      Namespaces

      + diff --git a/docs/namespace-EventSauce.html b/docs/namespace-EventSauce.html index 5123cd3..022b252 100644 --- a/docs/namespace-EventSauce.html +++ b/docs/namespace-EventSauce.html @@ -39,6 +39,9 @@

      Namespaces

      + diff --git a/docs/namespace-Http.Client.Common.html b/docs/namespace-Http.Client.Common.html index 61f6388..60e376e 100644 --- a/docs/namespace-Http.Client.Common.html +++ b/docs/namespace-Http.Client.Common.html @@ -47,6 +47,9 @@

      Namespaces

      + diff --git a/docs/namespace-Http.Client.html b/docs/namespace-Http.Client.html index e145448..c7d096b 100644 --- a/docs/namespace-Http.Client.html +++ b/docs/namespace-Http.Client.html @@ -44,6 +44,9 @@

      Namespaces

      + diff --git a/docs/namespace-Http.Promise.html b/docs/namespace-Http.Promise.html index ff6fbf4..b5b5cd0 100644 --- a/docs/namespace-Http.Promise.html +++ b/docs/namespace-Http.Promise.html @@ -42,6 +42,9 @@

      Namespaces

      + diff --git a/docs/namespace-Http.html b/docs/namespace-Http.html index cde6350..77a1ed8 100644 --- a/docs/namespace-Http.html +++ b/docs/namespace-Http.html @@ -39,6 +39,9 @@

      Namespaces

      + diff --git a/docs/namespace-IPay.Api.html b/docs/namespace-IPay.Api.html index e2be76e..a3a3216 100644 --- a/docs/namespace-IPay.Api.html +++ b/docs/namespace-IPay.Api.html @@ -34,6 +34,9 @@

      Namespaces

      + @@ -64,11 +67,6 @@

      Classes

      AuthenticatedApi -
    • - - UnauthenticatedApi - -
    @@ -117,10 +115,6 @@

    Namespace IPay\AuthenticatedApi - - UnauthenticatedApi - - diff --git a/docs/namespace-IPay.Builder.html b/docs/namespace-IPay.Builder.html index 4ee773b..906f607 100644 --- a/docs/namespace-IPay.Builder.html +++ b/docs/namespace-IPay.Builder.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -59,6 +62,11 @@

    Classes

    BodyBuilder +
  • + + TransactionBuilder + +
  • @@ -103,6 +111,10 @@

    Namespace IPay\BodyBuilder + + TransactionBuilder + + diff --git a/docs/namespace-IPay.Captcha.html b/docs/namespace-IPay.Captcha.html index 757ab7f..9dbf31d 100644 --- a/docs/namespace-IPay.Captcha.html +++ b/docs/namespace-IPay.Captcha.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-IPay.Encryption.html b/docs/namespace-IPay.Encryption.html index 70d318b..2fbc2a6 100644 --- a/docs/namespace-IPay.Encryption.html +++ b/docs/namespace-IPay.Encryption.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-IPay.Entity.html b/docs/namespace-IPay.Entity.html index 5f01083..e67eace 100644 --- a/docs/namespace-IPay.Entity.html +++ b/docs/namespace-IPay.Entity.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-IPay.Enum.html b/docs/namespace-IPay.Enum.html new file mode 100644 index 0000000..ffdd557 --- /dev/null +++ b/docs/namespace-IPay.Enum.html @@ -0,0 +1,125 @@ + + + + + + + + Namespace IPay\Enum | API + + + + + +
    + +
    + +
    +
    + +
    + +
    +

    Namespace IPay\Enum

    + + + + + + + + + + + + + + +
    Enums
    TransactionType
    +
    + + +
    + +
    + +
    + + diff --git a/docs/namespace-IPay.Exception.html b/docs/namespace-IPay.Exception.html index caa5e76..bf8fcfc 100644 --- a/docs/namespace-IPay.Exception.html +++ b/docs/namespace-IPay.Exception.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-IPay.Http.Plugin.html b/docs/namespace-IPay.Http.Plugin.html index 5e4d4b9..4c84a85 100644 --- a/docs/namespace-IPay.Http.Plugin.html +++ b/docs/namespace-IPay.Http.Plugin.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-IPay.Http.html b/docs/namespace-IPay.Http.html index 9972ae5..57250a2 100644 --- a/docs/namespace-IPay.Http.html +++ b/docs/namespace-IPay.Http.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-IPay.Session.html b/docs/namespace-IPay.Session.html index 54e1e7f..484b676 100644 --- a/docs/namespace-IPay.Session.html +++ b/docs/namespace-IPay.Session.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-IPay.html b/docs/namespace-IPay.html index c7c8136..48da95b 100644 --- a/docs/namespace-IPay.html +++ b/docs/namespace-IPay.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -126,6 +129,9 @@

    Namespace IPay

    IPay\Entity + + IPay\Enum + IPay\Exception diff --git a/docs/namespace-Psr.Http.Client.html b/docs/namespace-Psr.Http.Client.html index 5649b11..c2b4f7c 100644 --- a/docs/namespace-Psr.Http.Client.html +++ b/docs/namespace-Psr.Http.Client.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-Psr.Http.Message.html b/docs/namespace-Psr.Http.Message.html index 481e19a..9637ef1 100644 --- a/docs/namespace-Psr.Http.Message.html +++ b/docs/namespace-Psr.Http.Message.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-Psr.Http.html b/docs/namespace-Psr.Http.html index 04c30fb..acd195b 100644 --- a/docs/namespace-Psr.Http.html +++ b/docs/namespace-Psr.Http.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-Psr.html b/docs/namespace-Psr.html index 2140b4d..456d71c 100644 --- a/docs/namespace-Psr.html +++ b/docs/namespace-Psr.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-Symfony.Component.OptionsResolver.Exception.html b/docs/namespace-Symfony.Component.OptionsResolver.Exception.html index ea6bbbc..5f816ec 100644 --- a/docs/namespace-Symfony.Component.OptionsResolver.Exception.html +++ b/docs/namespace-Symfony.Component.OptionsResolver.Exception.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-Symfony.Component.OptionsResolver.html b/docs/namespace-Symfony.Component.OptionsResolver.html index 69db83e..8f08866 100644 --- a/docs/namespace-Symfony.Component.OptionsResolver.html +++ b/docs/namespace-Symfony.Component.OptionsResolver.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-Symfony.Component.VarExporter.html b/docs/namespace-Symfony.Component.VarExporter.html index 6d54e4b..7139366 100644 --- a/docs/namespace-Symfony.Component.VarExporter.html +++ b/docs/namespace-Symfony.Component.VarExporter.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-Symfony.Component.html b/docs/namespace-Symfony.Component.html index 3a63b7b..866180a 100644 --- a/docs/namespace-Symfony.Component.html +++ b/docs/namespace-Symfony.Component.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-Symfony.html b/docs/namespace-Symfony.html index 8b326fa..3bbd9c5 100644 --- a/docs/namespace-Symfony.html +++ b/docs/namespace-Symfony.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/namespace-none.html b/docs/namespace-none.html index e3c8410..f27dec1 100644 --- a/docs/namespace-none.html +++ b/docs/namespace-none.html @@ -34,6 +34,9 @@

    Namespaces

    + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 7886f58..ce88d37 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -10,6 +10,7 @@ namespace-IPay.Captcha.html namespace-IPay.Encryption.html namespace-IPay.Entity.html + namespace-IPay.Enum.html namespace-IPay.Exception.html namespace-IPay.Http.html namespace-IPay.Http.Plugin.html @@ -18,14 +19,15 @@ IPay.Api.AbstractApi.html IPay.Api.AuthenticatedApi.html - IPay.Api.UnauthenticatedApi.html IPay.Builder.BodyBuilder.html + IPay.Builder.TransactionBuilder.html IPay.Captcha.CaptchaSolver.html IPay.Encryption.Encrypter.html IPay.Entity.Account.html IPay.Entity.AccountState.html IPay.Entity.Customer.html IPay.Entity.Transaction.html + IPay.Enum.TransactionType.html IPay.Exception.LoginException.html IPay.Exception.SessionException.html IPay.Http.Plugin.ExceptionThrower.html @@ -38,13 +40,14 @@ source-Api.AbstractApi.html source-Api.AuthenticatedApi.html - source-Api.UnauthenticatedApi.html source-Builder.BodyBuilder.html + source-Builder.TransactionBuilder.html source-Captcha.CaptchaSolver.html source-Encryption.Encrypter.html source-Entity.Account.html source-Entity.Customer.html source-Entity.Transaction.html + source-Enum.TransactionType.html source-Exception.LoginException.html source-Exception.SessionException.html source-Http.Plugin.ExceptionThrower.html diff --git a/docs/source-Api.AbstractApi.html b/docs/source-Api.AbstractApi.html index 0467d94..a689fe0 100644 --- a/docs/source-Api.AbstractApi.html +++ b/docs/source-Api.AbstractApi.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -64,11 +67,6 @@

    Classes

    AuthenticatedApi -
  • - - UnauthenticatedApi - -
  • diff --git a/docs/source-Api.AuthenticatedApi.html b/docs/source-Api.AuthenticatedApi.html index 08226e6..3a714b8 100644 --- a/docs/source-Api.AuthenticatedApi.html +++ b/docs/source-Api.AuthenticatedApi.html @@ -34,6 +34,9 @@

    Namespaces

    + @@ -64,11 +67,6 @@

    Classes

    AuthenticatedApi -
  • - - UnauthenticatedApi - -
  • @@ -102,7 +100,7 @@

    Classes

    -
    1: <?php
    2:
    3: namespace IPay\Api;
    4:
    5: use IPay\Entity\Account;
    6: use IPay\Entity\Customer;
    7: use IPay\Entity\Transaction;
    8: use IPay\IPayClient;
    9: use IPay\Session\AuthenticatedSession;
    10: use Symfony\Component\OptionsResolver\Options;
    11: use Symfony\Component\VarExporter\LazyGhostTrait;
    12:
    13: /**
    14: * @extends AbstractApi<AuthenticatedSession>
    15: */
    16: final class AuthenticatedApi extends AbstractApi
    17: {
    18: use LazyGhostTrait;
    19:
    20: public Customer $customer;
    21:
    22: /** @var list<Account> */
    23: public array $accounts;
    24:
    25: public function __construct(
    26: IPayClient $iPayClient,
    27: AuthenticatedSession $session,
    28: ) {
    29: parent::__construct($iPayClient, $session);
    30: self::createLazyGhost(
    31: initializer: $this->populateLazyProperties(...),
    32: instance: $this,
    33: );
    34: }
    35:
    36: private function populateLazyProperties(): void
    37: {
    38: $this->customer = $this->customer();
    39: $this->accounts = $this->accounts();
    40: }
    41:
    42: /**
    43: * @throws \IPay\Exception\SessionException
    44: */
    45: private function customer(): Customer
    46: {
    47: return $this->objectMapper->hydrateObject(
    48: Customer::class,
    49: $this->post('getCustomerDetails')['customerInfo'],
    50: );
    51: }
    52:
    53: /**
    54: * @return list<Account>
    55: *
    56: * @throws \IPay\Exception\SessionException
    57: */
    58: private function accounts(): array
    59: {
    60: return $this->objectMapper->hydrateObjects(
    61: Account::class,
    62: $this->post('getEntitiesAndAccounts')['accounts'],
    63: )->toArray();
    64: }
    65:
    66: /**
    67: * @param array{
    68: * accountNumber?: string,
    69: * tranType?: 'Credit'|'Debit'|'',
    70: * startDate?: \DateTimeInterface,
    71: * endDate?: \DateTimeInterface,
    72: * } $parameters
    73: *
    74: * @return iterable<int, Transaction>
    75: *
    76: * @throws \IPay\Exception\SessionException
    77: */
    78: public function historyTransactions(array $parameters): iterable
    79: {
    80: $datetimeNormalizer = static function (
    81: Options $resolver,
    82: \DateTimeInterface $value
    83: ): string {
    84: return $value->format('Y-m-d');
    85: };
    86:
    87: $resolver = self::createOptionsResolver()
    88: ->setRequired([
    89: 'accountNumber',
    90: 'tranType',
    91: 'startDate',
    92: 'endDate',
    93: ])
    94: ->setAllowedTypes('accountNumber', 'string')
    95: ->setAllowedValues('tranType', ['Credit', 'Debit', ''])
    96: ->setAllowedTypes('startDate', \DateTimeInterface::class)
    97: ->setAllowedTypes('endDate', \DateTimeInterface::class)
    98: ->setNormalizer('startDate', $datetimeNormalizer)
    99: ->setNormalizer('endDate', $datetimeNormalizer)
    100: ->setDefaults([
    101: 'accountNumber' => $this->customer->accountNumber,
    102: 'tranType' => 'Credit',
    103: 'startDate' => new \DateTimeImmutable(),
    104: 'endDate' => new \DateTimeImmutable(),
    105: ])
    106: ;
    107:
    108: $parameters = $resolver->resolve($parameters);
    109:
    110: $parameters['pageNumber'] = 0;
    111: do {
    112: $transactions = $this->post(
    113: 'getHistTransactions',
    114: $parameters
    115: )['transactions'];
    116: foreach ($this->objectMapper->hydrateObjects(
    117: Transaction::class,
    118: $transactions
    119: )->getIterator() as $transaction) {
    120: yield $transaction;
    121: }
    122: ++$parameters['pageNumber'];
    123: } while (count($transactions) > 0);
    124: }
    125: }
    126:
    +
    1: <?php
    2:
    3: namespace IPay\Api;
    4:
    5: use IPay\Builder\TransactionBuilder;
    6: use IPay\Entity\Account;
    7: use IPay\Entity\Customer;
    8: use IPay\Entity\Transaction;
    9: use IPay\IPayClient;
    10: use IPay\Session\AuthenticatedSession;
    11: use Symfony\Component\OptionsResolver\Options;
    12: use Symfony\Component\VarExporter\LazyGhostTrait;
    13:
    14: /**
    15: * @psalm-import-type ParametersType from TransactionBuilder
    16: *
    17: * @extends AbstractApi<AuthenticatedSession>
    18: */
    19: final class AuthenticatedApi extends AbstractApi
    20: {
    21: use LazyGhostTrait;
    22:
    23: public Customer $customer;
    24:
    25: /** @var list<Account> */
    26: public array $accounts;
    27:
    28: public function __construct(
    29: IPayClient $iPayClient,
    30: AuthenticatedSession $session,
    31: ) {
    32: parent::__construct($iPayClient, $session);
    33: self::createLazyGhost(
    34: initializer: $this->populateLazyProperties(...),
    35: instance: $this,
    36: );
    37: }
    38:
    39: private function populateLazyProperties(): void
    40: {
    41: $this->customer = $this->customer();
    42: $this->accounts = $this->accounts();
    43: }
    44:
    45: /**
    46: * @throws \IPay\Exception\SessionException
    47: */
    48: private function customer(): Customer
    49: {
    50: return $this->objectMapper->hydrateObject(
    51: Customer::class,
    52: $this->post('getCustomerDetails')['customerInfo'],
    53: );
    54: }
    55:
    56: /**
    57: * @return list<Account>
    58: *
    59: * @throws \IPay\Exception\SessionException
    60: */
    61: private function accounts(): array
    62: {
    63: return $this->objectMapper->hydrateObjects(
    64: Account::class,
    65: $this->post('getEntitiesAndAccounts')['accounts'],
    66: )->toArray();
    67: }
    68:
    69: public function transactions(?string $accountNumber = null): TransactionBuilder
    70: {
    71: return new TransactionBuilder(
    72: ['accountNumber' => $accountNumber ?? $this->customer->accountNumber],
    73: $this,
    74: );
    75: }
    76:
    77: /**
    78: * @internal
    79: *
    80: * @param ParametersType $parameters
    81: *
    82: * @return \Traversable<int, Transaction>
    83: *
    84: * @throws \IPay\Exception\SessionException
    85: */
    86: public function historyTransactions(array $parameters): \Traversable
    87: {
    88: $datetimeNormalizer = static function (
    89: Options $resolver,
    90: \DateTimeInterface $value
    91: ): string {
    92: return $value->format('Y-m-d');
    93: };
    94:
    95: $resolver = self::createOptionsResolver()
    96: ->setRequired('accountNumber')
    97: ->setDefined([
    98: 'tranType',
    99: 'startDate',
    100: 'endDate',
    101: ])
    102: ->setAllowedTypes('accountNumber', 'string')
    103: ->setAllowedValues('tranType', ['Credit', 'Debit', ''])
    104: ->setAllowedTypes('startDate', \DateTimeInterface::class)
    105: ->setAllowedTypes('endDate', \DateTimeInterface::class)
    106: ->setNormalizer('startDate', $datetimeNormalizer)
    107: ->setNormalizer('endDate', $datetimeNormalizer)
    108: ;
    109:
    110: $parameters = $resolver->resolve($parameters);
    111:
    112: $parameters['pageNumber'] = 0;
    113: do {
    114: $transactions = $this->post(
    115: 'getHistTransactions',
    116: $parameters
    117: )['transactions'];
    118: foreach ($this->objectMapper->hydrateObjects(
    119: Transaction::class,
    120: $transactions
    121: )->getIterator() as $transaction) {
    122: yield $transaction;
    123: }
    124: ++$parameters['pageNumber'];
    125: } while (count($transactions) > 0);
    126: }
    127: }
    128:
    @@ -92,7 +100,7 @@

    Classes

    -
    1: <?php
    2:
    3: namespace IPay\Builder;
    4:
    5: use IPay\Encryption\Encrypter;
    6: use Nette\Utils\Json;
    7:
    8: /**
    9: * @extends \ArrayObject<string,string>
    10: */
    11: final class BodyBuilder extends \ArrayObject implements \Stringable, \JsonSerializable
    12: {
    13: /**
    14: * @param string[] $data
    15: */
    16: private function __construct(array $data)
    17: {
    18: parent::__construct($data);
    19: }
    20:
    21: /**
    22: * @param string[] $data
    23: */
    24: public static function from(array $data): static
    25: {
    26: return new static($data);
    27: }
    28:
    29: /**
    30: * @param string[] $parameters
    31: */
    32: public function enhance(array $parameters): static
    33: {
    34: return static::from($this->getArrayCopy() + $parameters);
    35: }
    36:
    37: public function build(): self
    38: {
    39: $this->ksort();
    40:
    41: $this['signature'] = md5(http_build_query($this->getArrayCopy()));
    42:
    43: return $this;
    44: }
    45:
    46: public function encrypt(): string
    47: {
    48: return static::from(['encrypted' => Encrypter::encrypt($this)]);
    49: }
    50:
    51: public function __toString(): string
    52: {
    53: return Json::encode($this);
    54: }
    55:
    56: /**
    57: * @return string[]
    58: */
    59: #[\ReturnTypeWillChange]
    60: public function jsonSerialize(): array
    61: {
    62: return $this->getArrayCopy();
    63: }
    64: }
    65:
    +
    1: <?php
    2:
    3: namespace IPay\Builder;
    4:
    5: use IPay\Encryption\Encrypter;
    6: use Nette\Utils\Json;
    7:
    8: /**
    9: * @extends \ArrayObject<string,string>
    10: *
    11: * @psalm-type ParametersType = string[]
    12: */
    13: final class BodyBuilder extends \ArrayObject implements \Stringable, \JsonSerializable
    14: {
    15: /**
    16: * @param ParametersType $array
    17: */
    18: private function __construct(array $array)
    19: {
    20: parent::__construct($array);
    21: }
    22:
    23: /**
    24: * @param ParametersType $parameters
    25: */
    26: public static function from(array $parameters): static
    27: {
    28: return new static($parameters);
    29: }
    30:
    31: /**
    32: * @param ParametersType $parameters
    33: */
    34: public function enhance(array $parameters): static
    35: {
    36: return static::from($this->getArrayCopy() + $parameters);
    37: }
    38:
    39: public function build(): self
    40: {
    41: $this->ksort();
    42:
    43: $this['signature'] = md5(http_build_query($this->getArrayCopy()));
    44:
    45: return $this;
    46: }
    47:
    48: public function encrypt(): string
    49: {
    50: return static::from(['encrypted' => Encrypter::encrypt($this)]);
    51: }
    52:
    53: public function __toString(): string
    54: {
    55: return Json::encode($this);
    56: }
    57:
    58: /**
    59: * @return string[]
    60: */
    61: #[\ReturnTypeWillChange]
    62: public function jsonSerialize(): array
    63: {
    64: return $this->getArrayCopy();
    65: }
    66: }
    67:
    -
    1: <?php
    2:
    3: namespace IPay;
    4:
    5: use Http\Client\Common\HttpMethodsClient;
    6: use Http\Client\Common\HttpMethodsClientInterface;
    7: use Http\Client\Common\Plugin\BaseUriPlugin;
    8: use Http\Client\Common\Plugin\ContentTypePlugin;
    9: use Http\Client\Common\PluginClient;
    10: use Http\Discovery\Psr17FactoryDiscovery;
    11: use Http\Discovery\Psr18ClientDiscovery;
    12: use IPay\Api\UnauthenticatedApi;
    13: use IPay\Http\Plugin\ExceptionThrower;
    14: use IPay\Session\UnauthenticatedSession;
    15:
    16: final class IPayClient
    17: {
    18: public static function create(): static
    19: {
    20: return new self(
    21: new HttpMethodsClient(
    22: new PluginClient(Psr18ClientDiscovery::find(), [
    23: new BaseUriPlugin(Psr17FactoryDiscovery::findUriFactory()
    24: ->createUri('https://api-ipay.vietinbank.vn')
    25: ),
    26: new ContentTypePlugin(),
    27: new ExceptionThrower(),
    28: ]),
    29: Psr17FactoryDiscovery::findRequestFactory(),
    30: Psr17FactoryDiscovery::findStreamFactory(),
    31: ),
    32: );
    33: }
    34:
    35: private function __construct(
    36: private HttpMethodsClientInterface $client,
    37: ) {
    38: }
    39:
    40: public function getClient(): HttpMethodsClientInterface
    41: {
    42: return $this->client;
    43: }
    44:
    45: public function guest(): UnauthenticatedApi
    46: {
    47: return new UnauthenticatedApi($this, new UnauthenticatedSession());
    48: }
    49: }
    50:
    +
    1: <?php
    2:
    3: namespace IPay;
    4:
    5: use Http\Client\Common\HttpMethodsClient;
    6: use Http\Client\Common\HttpMethodsClientInterface;
    7: use Http\Client\Common\Plugin\BaseUriPlugin;
    8: use Http\Client\Common\Plugin\ContentTypePlugin;
    9: use Http\Client\Common\PluginClient;
    10: use Http\Discovery\Psr17FactoryDiscovery;
    11: use Http\Discovery\Psr18ClientDiscovery;
    12: use IPay\Api\AuthenticatedApi;
    13: use IPay\Api\UnauthenticatedApi;
    14: use IPay\Http\Plugin\ExceptionThrower;
    15: use IPay\Session\UnauthenticatedSession;
    16:
    17: final class IPayClient
    18: {
    19: public static function create(): static
    20: {
    21: return new self(
    22: new HttpMethodsClient(
    23: new PluginClient(Psr18ClientDiscovery::find(), [
    24: new BaseUriPlugin(Psr17FactoryDiscovery::findUriFactory()
    25: ->createUri('https://api-ipay.vietinbank.vn')
    26: ),
    27: new ContentTypePlugin(),
    28: new ExceptionThrower(),
    29: ]),
    30: Psr17FactoryDiscovery::findRequestFactory(),
    31: Psr17FactoryDiscovery::findStreamFactory(),
    32: ),
    33: );
    34: }
    35:
    36: private function __construct(
    37: private HttpMethodsClientInterface $client,
    38: ) {
    39: }
    40:
    41: public function getClient(): HttpMethodsClientInterface
    42: {
    43: return $this->client;
    44: }
    45:
    46: /**
    47: * @throws Exception\LoginException
    48: */
    49: public function login(string $userName, string $accessCode): AuthenticatedApi
    50: {
    51: return (new UnauthenticatedApi($this, new UnauthenticatedSession()))
    52: ->login($userName, $accessCode);
    53: }
    54: }
    55: