Git Product home page Git Product logo

sampleapp-crud-java's Introduction

Rate your SampleYesNo

SampleApp-CRUD-Java

SampleApp-CRUD-Java

Welcome to the Intuit Developer's Java Sample App for CRUD operations.

This sample app is meant to provide working examples of how to integrate your app with the Intuit Small Business ecosystem. Specifically, this sample application demonstrates the following:

  • Create, Read, Query, Update, Delete, Void entities.
  • All operations are performed using QuickBooks Java SDK.

Please note that while these examples work, features not called out above are not intended to be taken and used in production business applications. In other words, this is not a seed project to be taken cart blanche and deployed to your production environment.

For example, certain concerns are not addressed at all in our samples (e.g. security, privacy, scalability). In our sample apps, we strive to strike a balance between clarity, maintainability, and performance where we can. However, clarity is ultimately the most important quality in a sample app.

Therefore there are certain instances where we might forgo a more complicated implementation (e.g. caching a frequently used value, robust error handling, more generic domain model structure) in favor of code that is easier to read. In that light, we welcome any feedback that makes our samples apps easier to learn from.

Table of Contents

Requirements

In order to successfully run this sample app you need a few things:

  1. Java 1.8
  2. A developer.intuit.com account
  3. An app on developer.intuit.com and the associated app token, consumer key, and consumer secret.
  4. One sandbox company, connect the company with your app and generate the oauth tokens.
  5. QuickBooks Java SDK, download from here (see instructions in "Running the code" section on how to include it)

First Use Instructions

  1. Clone the GitHub repo to your computer
  2. Import the project in Eclipse or any other IDE of your choice
  3. In config.properties, set oauth.type as 1 or 2 depending on type of app you have. For OAuth2 apps set value as 2.
  4. For OAuth2 apps, fill in the config.properties file values (realmid, oauth2.accessToken).
  5. For OAuth1 apps, fill in the config.properties file values (realmId, app token, consumer key, consumer secret, access token key, access token secret).
  6. Run maven install.

Note: If you do not want to use maven, just import the project and add the jars to your project externally.

Running the code

This app is directed to provide individual sample code for CRUD operations for various QBO entities. Each class has a main method that can be run individually.

Steps described below is to run the class for creating a customer in Eclipse IDE.

  1. Go to CustomerCreate.java in package com.intuit.developer.sampleapp.crud.entities.customer
  2. Right click the file and Run as Java application
  3. On the console you'll see the log being generated with the new customer id.

Follow similar steps for other classes.

Notes:

  1. The sample code has been implemented for US locale company, certain fields may not be applicable for other locales or minor version. Care should be taken to handle such scenarios separately.
  2. Before running AttachableUpload sample, update the path of the pdf that you wish to upload to point to your local directory.

Project Structure

Standard Java coding structure is used for the sample app

  • Java code for CRUD operations are located under entities directory for each entitiy
  • Java code for Helper Classes are located under helper directory for each entitiy
  • Java code for QBO DataService object are located under qbo directory
  • Config files are located in the resources directory

sampleapp-crud-java's People

Contributors

cdock1029 avatar diana-derose avatar fjolin-intuit avatar rkasaraneni20 avatar shweta-intuitdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sampleapp-crud-java's Issues

Please edit the readme file with some steps to setup the config.properties

Create a sandbox app with three information:

  1. App Id= xxxxx
  2. "Client ID=xxx"
  3. "Client Secret=yyyy"

But I cannot know how to fill them into the config.properties.
Please help me.

==================the config.properties=============
#For OAuth2 app set oauth.type=2
oauth.type=1

#OAuth2 access token
oauth2.accessToken =

#company id or realmId
company.id=

#OAuth1 keys
app.token=
consumer.key=
consumer.secret=
oauth.accessToken=
oauth.accessTokenSecret=
==================END of the config.properties=============

oauth.accessToken

how can i get the oauth.accessToken and the oauth.accessTokenSecret for the config.properties file?
please help

Line Item Order for Estimates

I am currently building a Java web application in Eclipse and I'm trying to integrate the QuickBooks Online API into it. I have successfully added the QuickBooks Java SDK and I am using code from this project.

Unfortunately, when creating an Estimate, setting the Line Number ( e.g., line.setLineNum(new BigInteger("1")); ) seems to have no affect on the order of the Line Items.

The Line Item order seems to be random regardless of what line numbers I set.

Please let me know if there's something I'm missing or if there's possibly an issue with the SDK.

add dependencies

Hi, i have a project buid with ANT, i want to add the depencencies of the example, i mean:
ipp-v3-java-data-2.9.0.jar. and the oders.
How can i do that? i have the error in this line of the code:

import com.intuit.ipp.data.Customer;

HttpResponse error

I add the lib folder to my project and all the pakages, the acces in config.properties is done, but i have this error message:

2417 [main] INFO com.intuit.logger - HttpResponse content-type (deserialization format) : json

please help!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.