Last active
December 16, 2015 17:08
-
-
Save IntuitDeveloperRelations/5467757 to your computer and use it in GitHub Desktop.
IPP .NET DevKit v2 - QBO - TimeActivity - Add
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add QBO TimeActivity | |
//Documentation: http://goo.gl/DjJyb | |
List<Employee> employees = commonService.FindAll(new Employee(), 1, 1).ToList<Employee>(); | |
List<Customer> customers = commonService.FindAll(new Customer(), 1, 1).ToList<Customer>(); | |
TimeActivity timeActivity = new TimeActivity(); | |
timeActivity.BillableStatus = BillableStatusEnum.Billable; | |
timeActivity.BillableStatusSpecified = true; | |
timeActivity.Hours = "8"; | |
timeActivity.Minutes = "0"; | |
timeActivity.BreakHours = "1"; | |
timeActivity.BreakMinutes = "0"; | |
timeActivity.Taxable = true; | |
timeActivity.TaxableSpecified = true; | |
timeActivity.TxnDate = DateTime.Now.Date; | |
timeActivity.TxnDateSpecified = true; | |
timeActivity.HourlyRate = new decimal(200); | |
timeActivity.HourlyRateSpecified = true; | |
timeActivity.CustomerId = customers[0].Id; | |
timeActivity.NameOf = TimeActivityTypeEnum.Employee; | |
timeActivity.NameOfSpecified = true; | |
timeActivity.Item = new EmployeeRef() { EmployeeId = employees[0].Id, EmployeeName = employees[0].Name }; | |
timeActivity.ItemName = "TestTimeActivity"; | |
timeActivity.ItemType = ItemTypeEnum.Service; | |
TimeActivity timeActivityResult = commonService.Add(timeActivity); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment