public async static Task <ExternalAccount> GetByTagAsync(CancellationToken cancellationToken, int?customerId, string tag = null, Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, null);

            ea.Tag = tag;
            return(await ea.GetByTagAsync(cancellationToken, connection, userDefinedObjectForLogging));
        }
        public static ExternalAccount GetByTag(int?customerId, string tag = null, Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, null);

            ea.Tag = tag;
            return(ea.GetByTag(connection, userDefinedObjectForLogging));
        }
        public async static Task <bool> UpdateAsync(CancellationToken cancellationToken, int?customerId, int?externalAccountId, string nickName = null, string tag = null, Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, externalAccountId);

            ea.NickName = nickName;
            ea.Tag      = tag;
            return(await ea.UpdateAsync(cancellationToken, connection, userDefinedObjectForLogging));
        }
        public static bool Update(int?customerId, int?externalAccountId, string nickName = null, string tag = null, Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, externalAccountId);

            ea.NickName = nickName;
            ea.Tag      = tag;
            return(ea.Update(connection, userDefinedObjectForLogging));
        }
        public async static Task <int> InitiateAsync(CancellationToken cancellationToken, int?customerId, string name, string firstName, string lastName, string type,
                                                     string routingNumber, string accountNumber, string nickName = null, string tag = null,
                                                     Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, null);

            ea.Name          = name;
            ea.FirstName     = firstName;
            ea.LastName      = lastName;
            ea.NickName      = nickName;
            ea.Type          = type;
            ea.Tag           = tag;
            ea.AccountNumber = accountNumber;
            ea.RoutingNumber = routingNumber;
            return(await ea.InitiateAsync(cancellationToken, connection, userDefinedObjectForLogging));
        }
        public static int Initiate(int?customerId, string name, string firstName, string lastName, string type,
                                   string routingNumber, string accountNumber, string nickName = null, string tag = null,
                                   Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, null);

            ea.Name          = name;
            ea.FirstName     = firstName;
            ea.LastName      = lastName;
            ea.NickName      = nickName;
            ea.Type          = type;
            ea.Tag           = tag;
            ea.AccountNumber = accountNumber;
            ea.RoutingNumber = routingNumber;
            return(ea.Initiate(connection, userDefinedObjectForLogging));
        }
        public async static Task <bool> ArchiveAsync(CancellationToken cancellationToken, int?customerId, int?externalAccountId, Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, externalAccountId);

            return(await ea.ArchiveAsync(cancellationToken, connection, userDefinedObjectForLogging));
        }
        public async static Task <bool> VerifyAsync(CancellationToken cancellationToken, int?customerId, int?externalAccountId, decimal amount1, decimal amount2, Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, externalAccountId);

            return(await ea.VerifyAsync(cancellationToken, amount1, amount2, connection, userDefinedObjectForLogging));
        }
        public static bool Archive(int?customerId, int?externalAccountId, Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, externalAccountId);

            return(ea.Archive(connection, userDefinedObjectForLogging));
        }
        public static bool Verify(int?customerId, int?externalAccountId, decimal amount1, decimal amount2, Connection connection = null, object userDefinedObjectForLogging = null)
        {
            var ea = new ExternalAccount(customerId, externalAccountId);

            return(ea.Verify(amount1, amount2, connection, userDefinedObjectForLogging));
        }