urbanairship/java-library — pull request #7 by rlubbat (2013-10-09 22:54:12+00:00)
Title: Implement support for Push API options with expiry.

I opened Issue #6 - No support for Push Options (and expiry) in the API.

I have forked the code and implemented it according to the documentation at http://docs.urbanairship.com/reference/api/v3/push.html#expiry.

Please note that the documentation (as of Oct 9, 2013) is incorrect. In the example it shows "options" as an element within "notification" as follows:
```javascript
{
"audience" : "all",
"device_types" : [ "ios" ],
"notification" : {
"ios" : {
"badge" : "+1"
},
"options" : {"expiry" : "2015-04-01T12:00:00"}
}
}
```
This is wrong because when I use curl to send a request with a payload like this it is rejected. The proper format is for "options" to be at the same level as "notification", "device_types", etc as follows:
```javascript
{
"audience" : "all",
"device_types" : [ "ios" ],
"notification" : {
"ios" : {
"badge" : "+1"
}
},
"options" : {"expiry" : "2015-04-01T12:00:00"}
}
```
I have implemented the code such that "options" is a top level element as above. I also implemented support for an expiry datetime or an expiry number of seconds, as indicated in the documentation: "The value is expressed as either absolute ISO UTC timestamp, or number of seconds from now."

Please pull into your repository as you see fit. You can ignore the pom.xml changes which are to differentiate the Xoom version of the artifact from the official version.