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