Mangopay / mangopay2-nodejs-sdk

Node.js SDK for MANGOPAY
https://www.npmjs.com/package/mangopay2-nodejs-sdk
MIT License
51 stars 38 forks source link

client2.models.BankAccountDetailsOther is not a constructor #342

Closed marcinrogacki closed 1 year ago

marcinrogacki commented 1 year ago

Hello. I am getting error client2.models.BankAccountDetailsOther is not a constructor with below code:

        return new client.models.BankAccountDetailsOther({
          Type: client.models.BankAccountType.OTHER,
          OwnerName: user.getFullName(),
          OwnerAddress: {
            AddressLine1: user.address,
            City: user.city,
            Region: user.state,
            PostalCode: user.postalCode,
            Country: user.country as CountryISO,
          },
          Country: bankAccountInput.country as CountryISO,
          BIC: bankAccountInput.bic,
          AccountNumber: bankAccountInput.accountNumber,
        })

mangopay2-nodejs-sdk v1.32.1

fredericdelordm commented 1 year ago

Hello @marcinrogacki, we are looking into it

iulian03 commented 1 year ago

Hi @marcinrogacki,

Please use the following syntax:


const bankAccountDetailsOther: mangopay.models.BankAccountDetailsOther = {
            Type: api.models.BankAccountType.OTHER,
            OwnerName: "placeholder",
            OwnerAddress: {
                AddressLine1: "placeholder",
                AddressLine2: "placeholder",
                City: "placeholder",
                Region: "placeholder",
                PostalCode: "placeholder",
                Country: "FR",
            },
            Country: "FR",
            BIC: "placeholder",
            AccountNumber: "placeholder"
        }