Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement