Question

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?

Était-ce utile?

La solution

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;
    }
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top