USPS API + Rails: How to get started? - ruby-on-rails

I'm working on a web store for my company. Right now we do most of our transactions through eBay, but we are wanting to build our own web store so as to avoid having to pay eBay's fees.
I've registered with USPS for API access and I've downloaded the technical documentation, but I'm a little lost. I'm fairly new to Rails, and I have no idea how to send the data to the USPS server.
So, where do I start?
EDIT: The API that I am going to be using most is the Shipping Calculator API.

Use this gem:
https://github.com/FotoVerite/awesome-usps

Related

Integrate quickbooks with rails and angularjs application

I am developing internal CRM for a client, in which it is required to synchronize with quickbooks for all financial transactions.
I am stuck here. I do not know where to start? Someone asked me to start with webconnector. The CRM application is on AngularJs and rails. I searched but couldnot find anything specific to integration of quickbooks desktop with Angularjs and rails.
So Please please can any one there help me out? I want to to know the full process and if any sample code available for the same in rails and angularjs would be great help.
Thanks
Start by downloading the QuickBooks SDK:
https://developer.intuit.com/docs/0250_qb/0020_get_set_up/sdk_downloads
Install it, and look at the file named:
QuickBooks Web Connector Programmers Guide, QBWC_proguide.pdf
It's about 100 pages, and a spec/guide of what you'll need to implement since there's not much else out there pre-built for RoR.
At a (very) high level, you're going to create a SOAP service which listens for HTTP requests. There's a number of methods you'll need to implement:
authenticate(...) - QuickBooks will call this to authenticate to your service
sendRequestXML(...) - QuickBooks will call this to ask "What data do you want to exchange?" at which time you respond with a qbXML request telling to add an invoice, or add a customer, or give you a list of customers, or etc. etc. etc.
receiveResponseXML(...) - When QuickBooks has finished doing whatever it is you told it to do in the previous step, it will call this method to let you know what happened (e.g. was whatever you told it to do successful or not).
There's more details here that you should read:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_web_connector
The QuickBooks SDK also includes examples in C# and Java for this. Look for the Web Connector-specific ones, not the COM/QBFC examples (those aren't relevent to you).
You might also look at this for reference/ideas (it's in PHP, but might still serve as a reference):
https://github.com/consolibyte/quickbooks-php
https://github.com/consolibyte/quickbooks-php/blob/master/docs/web_connector/example_web_connector.php

QuickBooks Online from Desktop application

I am new to QuickBooks and all my searching has been leading to conflicting answers. I really need to know this to move forward.
We have an on-premise application (legacy MFC app if that matters). Some of our customers use QuickBooks Online and we can send information up to it. In the past we have used QBXML which I believe is not supported for online anymore.
Everything I read at intuit.com talks about web applications. I think I have to have OAuth security and I do not see how intuit is supporting that from a non-browser based application.
I cannot believe that intuit would not have an answer for this situation so I must be confused.
So, can I send data to QuickBooks Online from a desktop application?
If yes, which API/SDK should I be using?
If I need OAuth how exactly do I implement this?
Does any of this require an independent security review?
I think I just need a little help getting pointed in the right direction.
Thanks
Unfortunately I think you have the most difficult scenario in the QB ecosystem.
I've used the DevDefined OAuth library with some success:
https://github.com/bittercoder/DevDefined.OAuth
You can get this to work on the desktop if you have a localhost server that the browser can redirect to on the OAuth callback.
Anything that talks to QBO needs to use the QBO API v3 now.
For a custom app that talks to QBO, you would need to set up your app # Intuit to run in development mode, so it wouldn't have to go through their security review, etc. But that limits the number of connections you can have (I think it's 10). So it might not work in your case. Also, if you're distributing your app to "normal" customers it may not be the best user experience, and probably isn't practical, to set it up so OAuth will work on the desktop.
You might just have to bite the bullet and create an intermediate web service on something like Azure or Heroku, then go through the whole process of getting Intuit to bless your app for production.

Quickbook Desktop Development Basics

I've been asked to develop some software for a friend who has a business that he manages using Quickbooks Desktop. I don't have Quickbooks Desktop, and I'm not quite sure how to get started. I've read the docs for about a week now and can't seem to figure out the first step.
From what I've read, it seems like maybe the Quickbooks application starts a web server and mine application will be issuing HTTP requests against that web server ? It would be nice if I didn't have to have the Quickbooks application to do this development; is there a way to read the data file itself ? Does it cost money to develop software that uses this API ?
It looks like I would probably like to use the V2 XML protocol for what I'm trying to do which is: retrieve checks and deposits, make a monthly summary, format that summary according to his specifications, and create a PDF of the statement.
From what I've read, it seems like maybe the Quickbooks application
starts a web server and mine application will be issuing HTTP requests
against that web server ?
That's one possible way to implement things.
If you give more detail about specifically what you're trying to do (what programming language? what version of QuickBooks?) you'll probably get better recommendations than that route.
It would be nice if I didn't have to have the Quickbooks application
to do this development; is there a way to read the data file itself ?
You will have to have QuickBooks, there's no way to read the raw datafile.
It's cheap on Amazon - buy it there.
Does it cost money to develop software that uses this API ?
There are no charges while developing, and for one-off/custom/in-house integrations like you're talking about, there are no charges at all.
It looks like I would probably like to use the V2 XML protocol for what I'm trying to do which is:
Be aware that v2 and v3 is technically only for SaaS applications (e.g. you have to be reselling this as an app, and allowing many people to connect their QuickBooks to your app).
According to Intuit, you should be using the SDK.

FedEx api for shipping

I want to apply FedEx API in my e-commerce website.
but I did't know how to apply that API.
I have done "Test Key registration" and get Test Account information.
so what I am doing next.
Thanks
The following answer is concerning the tracking service which is part of the shipping services:
After receiving your test credentials (key, password, account number and meter number), use them to send SOAP requests (as you normally do using your programming language) to the service at https://wsbeta.fedex.com:443/web-services/track
Use 123456789012 as a test tracking number.
When you are ready to move to the production environment, change the service path to https://ws.fedex.com:443/web-services/track (or https://gateway.fedex.com:443/web-services/track) and use the production credentials that can be obtained from here
Please refer to the documentation to be informed on how to use the services with your programming language.
According to FedEx, they are retiring their API soon. I believe the target date is the end of May, 2012. Now they are going to web services instead of an API. Here is more on the announcement:
http://www.fedex.com/us/developer/migration.html
As far as the web services are concerned, they have good documentation on their site for both how to access the web services directly and how to put a widget on your site that will allow a customer to look up their shipping. Here are those resources:
http://www.fedex.com/us/developer/solutions.html
There are also demos and tutorials here:
http://www.fedex.com/us/developer/web-services/index.html
I hope that helps you get started.
If you feel you are ready to test live shipments you wil now need to contact the fedex help desk and ask to get a user key that will be associated with your fedex account.
The test key only gets you to the testing side of web services. To get real rates and such you will need to point to the live gateway using a real user key.

doubts about foursquare API

My question is not about FourSquare API and its functions, but about more simpler details that are not well explained on Foursquare API explanations. Thank you very much in advance if someone wants to help me with this doubts:
Foursquare API is a framework you can use to build applications for mobile devices, above of IOS and Android, so i can imagine that they have API for IOS (Objective-C) and Android (Java), right?
From API Doc: "Be sure to note that although API requests are against api.foursquare.com, OAuth token and authorization requests are against foursquare.com.". Does it mean that if i want to use FourSquare app, the users has to have an account on FourSquare?
From API Doc: "For example, if you write an iPhone application, every user who logs in with their foursquare account will be able to make up to 500 users/* requests and up to 500 venues/* requests, etc." I dont understand this sentence. Does it mean that for example, if you use an API method request like "checkins.add()", this method create two methods? one against api.foursquare.com to monitor the API limit requests, and another to your Web Application Server?
So as a question related to the third one, where do you have to store your database? is it stored on Foursquare cloud database because you are loggin there, or you have to create your own Web Service application with its own SQL database?
From API Doc: "All requests are simple GET or POST requests that return JSON or JSONP respones", so i can imagine that the Web Application Service should understand JSON. Well, my main question is, can i use Ruby on Rails to build the Web Application Service and Web Page frontend? I am seeing that there are some wrapps for RoR designed from third companies, but are not official and doesnt cover all the 2.0 API, just the ones they needed for their services.
If i want to create an app using FourSquare API, what do you advice me to use as a programming language/framework for the Web Service Application? the WSA that has to process the JSON requests and later store them on the database, interaction with users on the WebPage, etc.
i am so sorry if my questions are so simple, but i dont have any other place of this level of expertise.
thank you very very much in advance.
The API is REST/JSON based, which means that any language that can do an HTTP request and parse a string can be used. There are Java and iOS libraries available. But you could use just about anything - curl with bash would be a bit extreme but if that floats your boat...
For some of the APIs (search a venue, for example) you do not necessarily need a FourSquar OAuth user token. For others (like checkin) a FourSquare token is required. For any API calls that require a userid, your users will have to be FourSquare users and "trust" your application with their FourSquare data.
Only requests to FourSquare is counted. So if you do a single call to checkins.add() it counts as one call for the user that is doing the checkin. I wouldn't worry about the limits. As long as you're usage of the API is sensible they will not be a problem. And if they do become a problem and you're doing something extraordinarily cool, the folks at FourSquare might be sympathetic.
You have to create your own web server with your own database to store some information. The OAuth token is one. You probably want to cache venue information here for short periods as well.
Yes, your webapp will need to be able to understand JSON. Ruby has excellent JSON support - look for the json gem.
It is really difficult to suggest a language or framework without knowing what it is that you're trying to do. I wouldn't choose a framework based on the fact that you want to use FourSquare (anything will do) but rather on your experience and the unique features of your application. You mentioned RoR before - that would definitely work.

Resources