【问题标题】:Intuit Customer Account Data API - Get Account TypeIntuit 客户账户数据 API - 获取账户类型
【发布时间】:2014-01-16 20:40:11
【问题描述】:
我正在使用 Intuit IPP .Net Customer Account Data SDK v1,并且想知道如何确定用户的银行/信用等帐户的帐户类型。
我看到了(例如)
<ns2:bankingAccountType>CHECKING</ns2:bankingAccountType>
通过getAccount() 响应标记,但我看不出有什么办法可以真正取回这些数据,以便我可以使用它。也许还有另一种我想念的方式?
【问题讨论】:
标签:
c#
intuit-partner-platform
customer-account-data-api
【解决方案1】:
要确定帐户类型,您需要查看对象的类型,然后将其转换为适当的类型。每个账户类型可能有一些额外的类成员(即 BankingAccount 类型有一个 bankingAccountType 属性)。
例如:
// Check account type
if (account.GetType() == typeof(BankingAccount))
{
// Get banking account type.
var bankingAccount = (BankingAccount)account;
if (bankingAccount.bankingAccountTypeFieldSpecified)
{
var bankingAccountType = bankingAccount.bankingAccountType;
}
}