Add new delivery company to Google Now - google-schemas

There is a company named Inpost, there are taking care of deliver things to parcel machines. They are sending standard emails with delivery status (received, in transport and on-place) I want to have information about my parcel on Google Now and also I think Google Now should be able to show extra information about parcel based on location (in each email there is a location where you can pick up parcel) I mean, that if I'm in range of parcel machine I should receive information that I can pick it up.

You'll want to use ParcelDelivery if you want info for the parcel on Google Now.
You can find the documentation here:
https://developers.google.com/gmail/markup/reference/parcel-delivery#parcel_delivery_with_shipping_information
The examples shows the parcel as OrderInTransit for OrderStatus, but if the customer has to pick up the package, you should use OrderPickupAvailable instead.

Related

Lookup Twitter Spaces created by accounts I follow

According to this page,
you can lookup Spaces created by accounts followed by a specific user. Given a single user ID, a dedicated endpoint will traverse the user’s followings and return live or upcoming Spaces created by any of these users.
I would like to check periodically for Spaces scheduled by any of the ~10k accounts I follow, but I can't find the "dedicated endpoint."
Unfortunately this is an error in the Twitter developer documentation - this functionality does not exist in the API. You'd need to build this via a much more manual process of calling the lookup endpoint by creator ID - the endpoint can support up to 100 user IDs at a time, so that will take some time to cover your larger number of accounts followed.
(side note, I've asked for the documentation to be updated to correct this confusing statement)

Here API states that I cannot store results. So how can I use it for address validation/completion?

I've been testing out the Freemium HERE API and just had a deeper look at the FAQs and Docs.
From the pricing plan page, it states the following:
Storing results from geocodes is not allowed for Location Services products
So how can this API possibly be used for address validation / completion? For example, a user enters a misspelled address / zipcode into a web form on my online store. I now have a dirty customer record. Am I prohibited from using the API to autocorrect the address? e.g. from 12 Main Street, Nwe Yrk to 12 Main Street, New York, 90210
Actually, one of the purposes of the geocoder autocomplete API is to autocorrect addresses:
https://developer.here.com/documentation/geocoder-autocomplete/topics/quick-start-get-suggestions.html.
You can readily use this API in your web form to get address suggestions while the user types. In this case the user always enters/chooses the right address and you are of course free to store this in your database. What you are not allowed to do is to store the whole response/results (detailed map information about locations in the response or in the case of batch geocoder, the results zip file) for offline use.

Access Transactions in Quickbooks Online

I'm using trying to interface with Quickbooks Online for an internal application that will push and pull transactions using qbXML. My problem is that I can't figure out which message I need to send in order to list and add the items listed under the "Banking" > "Registers" page. I've gone through the messages listed in the Onscreen Reference for Intuit Software Development Kits and none of them seem to give me this information.
Also, does anyone know of a list that explains what each message does?
If you're in a bank account register, you're writing checks. There are 3 kinds of checks in QuickBooks:
Expense checks - if you added a check directly in the register window, you would be adding an expense check.
Bill payment checks - these appear in a check register, but you can only add them with a bill payment operation.
Payroll checks - these appear in the check register, but they can only be added using the Intuit Payroll Service or by enabling manual payroll (almost no one does manual payroll in actual practice, but it is good to know about for testing purposes).
The first 2 types of checks have their own message type: the Add/Mod Check and Add/Mod BillPayment messages respectively. Payroll checks can't be added by the SDK. You can query all 3 types using a Transaction query message. I should also mention that it's possible to add an entry in any register using a journal entry, but that's not a good idea unless you are certain you know what you're doing.
I hate to tell you this, but the best reference for QuickBooks messages is the one you're already using. There are also XML files in the <sdk root>\docs directory that describe SDK operations. But there is really no substitute for understanding how QuickBooks operates from a user's perspective.
If you're going to be working with QuickBooks integration, it's a good idea to make friends with one or more QuickBooks Pro Advisors so you can run these kinds of issue by them. The relationship is generally mutually beneficial, since QuickBooks Pro Advisors often find it handy to have access to an SDK programmer.

How to restrict purchases to ONLY IP addresses in the United States using Ruby/Rails?

I have a client who has a requirement that they can't sell particular products 'outside the United States'.
They'd prefer that users can see the site, but when they try to checkout present a message indicating they are outside the United States.
Their site is built in Rails 2.3.8.
Check out the GeoIP gem (make sure to read the instructions, you need to download the GeoLiteCity or GeoLiteCountry database in order for it to work). It uses MaxMind's GeoIP database and can give you the country (or city, in the case of the city database) of an IP address, with some accuracy. There is a commercial database with better accuracy available, which I would recommend for your use case.
However, be advised that this is by no means a definitive solution. Some customers will be turned away wrongfully, and some will be able to order even though they should not. Things like satellite connections, proxy servers and VPN services make IP location impossible, and no database is 100% complete or correct.
What you're looking for is some kind of rough geolocation. One way to get this is to query a DNS zone designed specifically for this; one such zone is described at http://countries.nerd.dk.
I am from Ukraine. And when a particular US shop doesn't want to sell products overseas it usually specifies in the policy/faq/etc that only US bank issued payment cards are accepted.
That seems for me the best solution to solve: "can't sell particular products 'outside the United States'. "
As there are package/mail/freight forwarding companies which can be used by a potential client of that customer though residing outside US but whom the customer won't have to ship directly. That customer would still benefit from those sales but are freed from dialing with burden associated with overseas shipping.
And when you will solve it with geolocation, that customer would still be able making additional money, when people would still be using the site through different kind of proxies, if that customer will be worth it. :)
You can use their data that you pull into your database to check the user's IP address. http://www.ipligence.com/geolocation/ (you still have to worry about proxying)
I would also check where your shipping it to (checking addresses like suggested above), also check the card address with the card backer like VISA, etc..
And suggested above, your money processing agent shouldn't allow any transactions from outside the U.S. on particular items (if possible)
But I did read your statement SOME products may not be allowed to be sold outside the U.S. So you'll need a way to mark those products in your system and then let the user know they are unable to purchase those items, but continue on with others in the cart.
You could use a Rack Middleware, but it will require that you fork it on Github first.
https://github.com/roja/rack-geo
At the moment this project gives you City and Organisation names based on the IP address of the computer making the request - you need Country Code too.
You could add it to the code relatively easily here: https://github.com/roja/rack-geo/blob/master/lib/rack/geo.rb
You could then set a Rack environment variable to indicate if the request is from the USA, in the call method:
Rack::Request.new(env)["born"] = "...in the USA"
Add it to your config file:
config.middleware.use Rack::Geo
And then in your controller you can test if the request has this environment variable set appropriately and redirect to a 'sorry you must be from the USA' page:
if params['born'] == "...in the USA"
redirect_to "/not_from_round_here"
end
Bear in mind that IP address sniffing is fallible. I often take trains in the UK and end up with Google in German.
A geoip alternative is can be found here: http://humbuckercode.co.uk/licks/gems/geoip/
Uses the maxmind libraries, easy to set up, no schema updates needed, fast

Getting a list of all packages from shipping carriers

I've been looking at the APIs for UPS, FedEx, USPS, etc, and I can't seem to find any method of pulling all tracking info for a given user. I only see methods that pull info via a tracking number. Has anyone been able to find a way to get at this data? Seems silly to me that these huge carriers wouldn't supply this info in an easy method.
I'm trying to accomplish this in Rails.
We were able to integrate with UPS Quantum View and even with FedEx Insight. These services will give you a list of all inbound and outbound shipments that are billed to your UPS/FedEx account. You can get info on every piece of each shipment: tracking numbers, weight, shipper and recipient info (Company name, city, state, country).
To pull information from UPS Quantum View using their API you will need to obtain a so-called Access Key, and you'll need to create Subscriptions: one for inbound shipments, one for outbound ones. This can be done on ups.com if you already have a UPS shipping account. You don't have to wait, it's provided instantly. We have a video of how to get the key and set up the subscriptions. It's on easytag.net in the Help section. The video title is Obtaining a UPS Access Key.
When creating API requests to UPS, you'll need to include a key and a subscription name.
UPS has a Quantum View API. Quantum View is their service that allows tracking, etc by account, not just individual tracking number. I assume that will get you what you need. I don't have an account so I can't see their detailed API documentation, so I'm just guessing.

Resources