Skip to content

Instantly share code, notes, and snippets.

View IntuitDeveloperRelations's full-sized avatar

Intuit Partner Platform IntuitDeveloperRelations

View GitHub Profile
@IntuitDeveloperRelations
IntuitDeveloperRelations / V2-QBO-TimeActivity-Add.cs
Last active December 16, 2015 17:08
IPP .NET DevKit v2 - QBO - TimeActivity - Add
//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";
@IntuitDeveloperRelations
IntuitDeveloperRelations / IPP-Reconnect-V2SDK-DevDefined.cs
Last active December 15, 2015 23:10
DevDefined / IPP .NET DevKit v2 - Platform - Call Reconnect API #DotNetDevKitV2 #Reconnect #IPP
//Documentation: http://docs.developer.intuit.com/0025_Intuit_Anywhere/0060_Reference/3002_Reconnect_API
public string CallReconnectAPI(DataServices dataServices)
{
HttpWebRequest httpWebRequest = WebRequest.Create("https://appcenter.intuit.com/api/v1/Connection/Reconnect") as HttpWebRequest;
httpWebRequest.Method = "GET";
httpWebRequest.Headers.Add("Authorization", GetDevDefinedOAuthHeader(dataServices,httpWebRequest, ""));
UTF8Encoding encoding = new UTF8Encoding();
HttpWebResponse httpWebResponse = httpWebRequest.GetResponse() as HttpWebResponse;
using (Stream data = httpWebResponse.GetResponseStream())
@IntuitDeveloperRelations
IntuitDeveloperRelations / V2-QBD-Customer-FilterWithMinimumBalance.cs
Last active December 15, 2015 10:38
IPP .NET DevKit v2 - QBD - Retrieve Active QBD Customers with a minimum balance #DotNetDevKitV2 #Customer #QBD
// #DotNetDevKitV2 #Customer #QBD
//Retrieve Active QBD Customers with a minimum balance
//Documentation: http://goo.gl/jUdxR
var oauthValidator = new OAuthRequestValidator(accessToken, accessTokenSecret, consumerKey,consumerSecret);
var context = new ServiceContext(oauthValidator, realmId, IntuitServicesType.QBD);
var commonService = new DataServices(context);
var qbdCustomerQuery = new Intuit.Ipp.Data.Qbd.CustomerQuery
{
ActiveOnly = true,
@IntuitDeveloperRelations
IntuitDeveloperRelations / V2-QBD-Customer-Add.cs
Last active December 15, 2015 10:38
IPP .NET DevKit v2 - QBD - Add Customer with Name #DotNetDevKitV2 #Customer #QBD
// #DotNetDevKitV2 #Customer #QBD
//Simple routine to add QBD customer
//Documentation: http://goo.gl/XGNz4
var oauthValidator = new OAuthRequestValidator(accessToken, accessTokenSecret, consumerKey,consumerSecret);
var context = new ServiceContext(oauthValidator, realmId, IntuitServicesType.QBD);
var commonService = new DataServices(context);
var cust = new Intuit.Ipp.Data.Qbd.Customer()
{