You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

temando

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

temando

0.1.4
bundlerRubygems
Version published
Maintainers
1
Created
Source

Temando

The temando gem provides a Ruby interface to the Temando shipping fulfilment provider.

Currently, it only supports fetching quotes from the API and returning them.

Installation

Add this line to your application's Gemfile:

gem 'temando'

And then execute:

$ bundle

Or install it yourself as:

$ gem install temando

Usage

Temando authentication details should be set before calling any methods :

 Temando::Api::Base.config.username = 'myuser@example.com'
 Temando::Api::Base.config.password = 'sekrit'

Example:

request = Temando::Request.new

# Add the items to be shipped
request.items << Temando::Item::GeneralGoods.new(...)
request.items << Temando::Item::GeneralGoods.new(...)

# Add the details for the actual shipment method and its locations
anywhere = Temando::Delivery::DoorToDoor.new
anywhere.origin      = Temando::Location.new(...)
anywhere.destination = Temando::Location.new(...)

# Ask the server for the quotes
quotes = request.quotes_for(anywhere)

quotes.first # => #<Temando::Quote>

Tests

rake spec to run the tests.

rake spec:remote to run the remote specs.

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 05 Dec 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts