This is a Ruby wrapper for ShipStation's OData API.
This is version 0.0.1 of the gem. It currently only supports querying and filtering of ShipStation resources.
ShipStation-Ruby is packaged as a Ruby gem. I recommend you install it with Bundler by adding the following line to your Gemfile:
gem 'shipstation-ruby', '~> 0.0.1'
The ShipStation API uses basic HTTP authentication. Inside config/initializers, create a new configuration file and use the following template to pass in your ShipStation credentials:
ShipStationRuby.username = ENV['SHIPSTATION_USERNAME']
ShipStationRuby.password = ENV['SHIPSTATION_PASSWORD']
ShipStationRuby.username = "shipstation_username"
ShipStationRuby.password = "shipstation_password"
client = ShipStationRuby::Client.new
client = ShipStationRuby::Client.new("shipstation_username", "shipstation_password")
order = client.order.find(12345)
orders = client.order.all
open_texas_orders = client.order.where("active" => "true", "ship_state" => "TX")
all_warehouses = client.warehouse.all
customer_12345 = client.customer.find(12345)
texas_fedex_shipments = client.shipment.where("shipping_service_id" => 0001, "state" => "TX")
etc.
client = ShipStationRuby::Client.new
order = client.order.find(12345)
order.order_id ## 12345
order.ship_city ## Boise
order.order_total ## $343.32
This gem has been tested on Ruby 1.9.3 on version 1.1 of ShipStation's API.
Please report bugs at https://github.com/codyduval/shipstation-ruby/issues
- Fork the project from https://github.com/codyduval/shipstation-ruby/
- Make your feature addition or bug fix.
- Add tests
- Commit
- Send me a pull request. Bonus points for topic branches.
Thanks to Nate Berkopec for advice and guidance.
(The MIT License.)
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, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.