Skip to content

Instantly share code, notes, and snippets.

View IntuitDeveloperRelations's full-sized avatar

Intuit Partner Platform IntuitDeveloperRelations

View GitHub Profile
@IntuitDeveloperRelations
IntuitDeveloperRelations / QbApi-Entitlements.cs
Created May 28, 2014 19:17
QuickBooks API - .NET/DevDefined - Call QBO Entitlements API
using DevDefined.OAuth.Consumer;
using DevDefined.OAuth.Framework;
using System.IO;
using System.Text;
using System.Net;
namespace IPPQbApiConsoleApp
{
static class SampleCalls
{
<?php
# The MIT License (MIT)
#
# Copyright (c) 2014 Intuit Partner Platform
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
@IntuitDeveloperRelations
IntuitDeveloperRelations / Payments-ExecuteCharge
Created October 21, 2014 15:34
Payments API - Execute Charge
//string body = "{\"amount\": \"10.55\",\"token\": \"s2ZJuHhJQkZMXBngU7fP00At21c\",\"currency\": \"USD\"}";
//string responseXML = ExecutePaymentsCharge(consumerKey, consumerSecret, accessToken, accessSecret, realmId, body);
public static string ExecutePaymentsCharge(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret, string realmId, string body)
{
string uri = string.Format("https://sandbox.api.intuit.com/quickbooks/v4/payments/charges");
HttpWebRequest httpWebRequest = WebRequest.Create(uri) as HttpWebRequest;
httpWebRequest.Headers.Add("Request-Id", "iuy87t79t3861796t87r670");
httpWebRequest.Method = "POST";
httpWebRequest.Accept = "application/json";
@IntuitDeveloperRelations
IntuitDeveloperRelations / BatchAttach.java
Created April 8, 2015 06:09
QBO V3 API - Java SDK - Upload multiple files and attach with Batch request
package attachable;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.FileInputStream;
public class OAuthTest {
public static final Logger LOG = Logger.getLogger(OAuthTest.class);
public static final String REQUEST_TOKEN_URL = "https://oauth.intuit.com/oauth/v1/get_request_token";
public static final String ACCESS_TOKEN_URL = "https://oauth.intuit.com/oauth/v1/get_access_token";
public static final String AUTHORIZE_URL = "https://appcenter.intuit.com/connect/begin";
package com.poc.oauth;
/**
* Created by Manas Mukherjee on 12/8/2014.
* Intuit Developer Group
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
var openid_identifier = ConfigurationManager.AppSettings["openid_identifier"];
var returnUrl = "OpenIdHandler.aspx";
var response = openid.GetResponse();
if (response == null)
{
// Stage 2: user submitting Identifier
Identifier id;
if (Identifier.TryParse(openid_identifier, out id))
{
try
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-06-09T05:37:09.563-07:00">
<Customer domain="QBO" sparse="false">
<Id>68</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2015-06-09T05:37:09-07:00</CreateTime>
<LastUpdatedTime>2015-06-09T05:37:09-07:00</LastUpdatedTime>
</MetaData>
<Title>Mr</Title>
<GivenName>James</GivenName>
<script src="https://js.appcenter.intuit.com/Content/IA/intuit.ipp.anywhere-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
intuit.ipp.anywhere.setup({
grantUrl: 'http://www.mycompany.com/HelloWorld/RequestTokenServlet'
datasources: {
quickbooks : true,
payments : true
},
paymentOptions:{
intuitReferred : true
<script src="https://js.appcenter.intuit.com/Content/IA/intuit.ipp.anywhere-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
intuit.ipp.anywhere.setup({
grantUrl: 'http://www.mycompany.com/HelloWorld/RequestTokenServlet'
datasources: {
quickbooks : true,
payments : true
},
paymentOptions:{
intuitReferred : true