public static IInvoiceBuilder AddMellatCumulativeAccounts(this IInvoiceBuilder builder, IEnumerable <MellatCumulativeDynamicAccount> accounts)
        {
            if (accounts == null)
            {
                throw new ArgumentNullException(nameof(accounts));
            }
            if (!accounts.Any())
            {
                throw new ArgumentException("Accounts cannot be an empty collection.", nameof(accounts));
            }

            List <MellatCumulativeDynamicAccount> allAccounts = null;

            builder.ChangeAdditionalData(data =>
            {
                if (data.ContainsKey(MellatHelper.CumulativeAccountsKey))
                {
                    allAccounts = (List <MellatCumulativeDynamicAccount>)data[MellatHelper.CumulativeAccountsKey];
                }
                else
                {
                    allAccounts = new List <MellatCumulativeDynamicAccount>();
                }

                allAccounts.AddRange(accounts);
            });

            builder.AddAdditionalData(MellatHelper.CumulativeAccountsKey, allAccounts);

            return(builder);
        }