0
我无法在填写了完整的运输和帐单地址的Quickbooks Online发票沙箱帐户中获取客户数据,主要是State和ZipCode。以下任何“行”属性是否对应于Zip或State字段?我无法让这些填充到我的沙箱中。Intuit QuickBooks集成(C#.NET/SDK) - 哪个PhysicalAddress属性用于ZipCode和状态字段?
var billaddr = addressRepository.Get(a => a.ContactMethodID == contactMethod.ContactMethodID && a.AddressTypeId == 2).First();
var shipaddr = addressRepository.Get(a => a.ContactMethodID == contactMethod.ContactMethodID && a.AddressTypeId == 3).First();
newCustomer.BillAddr = new PhysicalAddress() { City = billaddr.City, Line1 = billaddr.Address1, Line2 = billaddr.Address2, PostalCode = billaddr.ZipCode, Country = billaddr.Country, Line3 = billaddr.State, Line4 = billaddr.ZipCode };
newCustomer.ShipAddr = new PhysicalAddress() { City = shipaddr.City, Line1 = shipaddr.Address1, Line2 = shipaddr.Address2, PostalCode = shipaddr.ZipCode, Country = shipaddr.Country, Line3 = shipaddr.State, Line4 = shipaddr.ZipCode };
Public property Line1
Product: QBW Description: First line of the address.[br /]Max. length: 41 characters. Product: QBO Description: First line of the address.[br /]Max. length: 500 characters.
Public property Line2
Product: QBW Description: Second line of the address.[br /]Max. length: 41 characters. Product: QBO Description: Second line of the address.[br /]Max. length: 500 characters.
Public property Line3
Product: QBW Description: Third line of the address.[br /]Max. length: 41 characters. Product: QBO Description: Third line of the address.[br /]Max. length: 500 characters.
Public property Line4
Product: QBW Description: Fourth line of the address.[br /]Max. length: 41 characters. Product: QBO Description: Fourth line of the address.[br /]Max. length: 500 characters.
Public property Line5
Product: QBW Description: Fifth line of the address.[br /]Max. length: 41 characters. Product: QBO Description: Fifth line of the address.[br /]Max. length: 500 characters.
谢谢你的回应! Zip Example - 9000,State - CA – Vahe
@Vahe对不起,我昨天没有时间回复。我查看了ILSPY中的DLL以查看PostalCode属性中是否有一些验证(可能需要5个字符作为示例),但没有找到任何验证,所以我不确定它为什么不出现。你是否能够使用CountrySubDivisionCode属性来填充状态? –
不用担心,我在我的例子中犯了一个错误,例如状态应该是90000。最少5个字符。 – Vahe