Giter Club home page Giter Club logo

endicia_label_server's Introduction

Gem Version Dependency Status Build Status Coverage Status Code Climate

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

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

Documentation

Yard documentation can be found at RubyDoc.

Sample Usage

Return rates

require 'endicia_label_server'
server = EndiciaLabelServer::Connection.new(test_mode: true)
server.rate do |rate_builder|
  rate_builder.add :certified_intermediary, {
    account_id: ENV['ENDICIA_ACCOUNT_ID'],
    pass_phrase: ENV['ENDICIA_PASS_PHRASE'],
    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.

endicia_label_server's People

Contributors

721p avatar matt423 avatar yevgenko avatar calvinhughes avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.