No commit activity in last 3 years
No release in over 3 years
Gem for accessing the Endicia Label Server XML API from Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.45, >= 0.45.3
~> 0.3.3, >= 0.3.3
~> 2.2, >= 2.2.0
 Project Readme

Gem Version

Endicia Label Server

Endicia Label Server Gem for accessing the Endicia Label Server API from Ruby. Using the gem you can:

  • Return quotes from the Endicia Label Server API
  • Book shipments
  • Return labels and tracking numbers for a shipment

This gem is currently used in production at Veeqo

Installation

$ gem install endicia_label_server-ruby

...or add it to your project's Gemfile.

Documentation

Yard documentation can be found at RubyDoc.

Sample Usage

Return rates

# For testing on the command line
$ rake console
require 'endicia_label_server'
server = EndiciaLabelServer::Connection.new(test_mode: true)
response = server.rate do |rate_builder|
  rate_builder.add :certified_intermediary, {
    account_id: ENV['ENDICIA_ACCOUNT_ID'],
    pass_phrase: ENV['ENDICIA_PASS_PHRASE'] # or token: ENV['ENDICIA_TOKEN']
  }
  rate_builder.add :requester_id, ENV['ENDICIA_REQUESTER_ID']
  rate_builder.add :mail_class, EndiciaLabelServer::SERVICES.keys.first
  rate_builder.add :mailpiece_dimensions, {
    length: '10',
    width: '10',
    height: '10'
  }
  rate_builder.add :weight_oz, "2"
  rate_builder.add :from_postal_code, '90210'
  rate_builder.add :to_postal_code, '02215'
  rate_builder.add :to_country_code, 'US'
end
# Then use...
response.success?

Running the tests

After installing dependencies with bundle install, you can run the unit tests using rspec.