buckaroo-it / BuckarooSdk_DotNet

Software Development Kit which can be used for easy access to the Buckaroo API.
MIT License
6 stars 18 forks source link

Custom and Additional fields lists uninstantiated in datarequest #57

Open dirkiedirk opened 2 years ago

dirkiedirk commented 2 years ago

Custom and Additional fields lists uninstantiated in datarequest

The problem

In BuckarooSdk.DataTypes.RequestBases.DataBase the CustomParameters and AdditionalParameters classes are not instantiated which means the lists of these classes will also not be instantiated. Thus trying to call the methods AddCustomParameter or AddAdditionalParameter will result in an exception.

Proposed solution

Instantiate classes additionalparameters and customparameters in the constructor of DataBase

public DataBase()
        {
            this.CustomParameters = new CustomParameters();
            this.AdditionalParameters = new AdditionalParameters();
            this.Services = new Services.DataRequestServices();
            this.OriginalTransactionReference = new TransactionReference();
            this.ClientIp = new IpAddress();
        }