Advertisement
IDNPeterL

IPP .NET DevKit v2 - QBD Customer - Add with Billing Address

May 22nd, 2012
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Add QBD Customer with Billing Address
  2. //Documentation:  http://goo.gl/1GCXg
  3.  
  4. var oauthValidator = new OAuthRequestValidator(accessToken, accessTokenSecret, consumerKey, consumerSecret);
  5. var context = new ServiceContext(oauthValidator, realmId, IntuitServicesType.QBD);
  6. var commonService = new DataServices(context);
  7.  
  8. Intuit.Ipp.Data.Qbd.Customer qbdCustomer = new Intuit.Ipp.Data.Qbd.Customer();
  9. qbdCustomer.Name = "Shawn Carter";
  10. PhysicalAddress physicalAddress = new PhysicalAddress();
  11. physicalAddress.Line1 = "123 Main St.";
  12. physicalAddress.Line2 = "Apt. 12";
  13. physicalAddress.City = "Mountain View";
  14. physicalAddress.CountrySubDivisionCode = "CA";
  15. physicalAddress.Country = "USA";
  16. physicalAddress.PostalCode = "94043";
  17. physicalAddress.Tag = new string[] { "Billing" };
  18. qbdCustomer.Address = new PhysicalAddress[] { physicalAddress };
  19. Intuit.Ipp.Data.Qbd.Customer customerAdded =  commonService.Add(qbdCustomer);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement