Intuit Customer Account Data API - Get Account Type

211 Views Asked by At

I'm using the Intuit IPP .Net Customer Account Data SDK v1, and was wondering how to determine the account types for a user's bank/credit, etc account.

I see the (for example)

<ns2:bankingAccountType>CHECKING</ns2:bankingAccountType>

tag via the getAccount() response, but I see no way to get actually get this data back out so I can make use of it. Is there perhaps another way I'm missing?

1

There are 1 best solutions below

0
On BEST ANSWER

To determine the account type, you need to look at the type of the object, then cast it to the appropriate type. Each account type may have some additional class members (i.e the BankingAccount type has a bankingAccountType property).

For example:

// Check account type
if (account.GetType() == typeof(BankingAccount))
{
    // Get banking account type.
    var bankingAccount = (BankingAccount)account;

    if (bankingAccount.bankingAccountTypeFieldSpecified)
    {
        var bankingAccountType = bankingAccount.bankingAccountType;
    }
}