Build Status Code Climate Gem Version Dependency Status Coverage Status Documentation status

Ruby Gem for Postmen API.

This extension helps developers to integrate with Postmen easily.

Early development stage

This gem is on early stage of development - There are a lot of features that are not covered yet, you may also expect heavy changes in the public API, before we hit version 1.0.0 (see the Milestones section)


  1. Add the following line to your application's Gemfile

    gem "postmen", "~> 0.1.0"
  2. Run bundler

    bundle install


Postmen.configure do |config|
  config.region = 'sandbox' # set 'sandbox' or 'production. Required
  config.api_key = 'YOUR API KEY' # Required
  config.endpoint = '' # Optionally set custom endpoint url.


require 'postmen'

# Configure postmen first, see Configuration section

### Fetch all labels:

Postmen::Label.all # Returns an instance of Postmen::LabelCollection

# optionally you can pass additional params to the query:

Postmen::Label.all(shipper_account_id: '1111')
Postmen::Label.all(status: 'created')
# For more options, please see the documentation:

### Fetch single label

Postmen::Label.find('1111') # Returns an instance of Postmen::Label


An instance of Postmen::Label responds to following methods:

id, status, tracking_numbers files, rate


Postmen::LabelCollection acts as an Array of Label instances. You can do things like:

collection = Postmen::Label.all 

collection.first # Returns an instance of Label
collection.size # Returns number of elements returned
collection.each{|label| puts label.inspect } # Iterates over labels{|label|  } # Selects labels by given criteria

and so on.

The License (MIT)

Released under the MIT license. See the LICENSE file for the complete wording.