Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Ruby Wrapper to the Endicia Web Services API
Ruby
branch: master

This branch is 3 commits ahead of lovehandle:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
features
lib
spec
.gitignore
Gemfile
README.md
Rakefile
lady_gaga.gemspec

README.md

Lady Gaga

travis

Lady Gaga is a minimalistic, Nokogiri-based Ruby wrapper to the Endicia Web Services API.

Currently the following APIs are supported:

Usage

Set up.

LadyGaga.configure do |config|
  config.user = '1234'
  config.password = 'password'
end

Initialize a request

request = LadyGaga::DialAZip.new

Build request params.

request << {
  'ADDRESS0' => 'John Doe',
  'ADDRESS1' => 'DYMO Endicia',
  'ADDRESS2' => '385 Sherman Ave',
  'ADDRESS3' => 'Palo Alto, CA 94306'
}

Get a response.

response = request.post

Check response validity:

response.code
returns: "200"

response.valid?
returns: true

Convert response to hash:

response.to_h

returns: {
'Dial-A-ZIP_Response' => {
    'AddrLine1'    => '385 Sherman Ave',
    'AddrLine2'    => 'DYMO ENDICIA',
    'AddrLine3'    => '',
    'AddrLineLast' => 'PALO ALTO CA 94306-1864'
  }
 }

Or parse a response with Nokogiri:

response.xml.css("Dial-A-ZIP_Response").each do |r|
  some business value
end

response.xml.xpath("//User")

To get started with the Dial-A-Zip Address Verification API, Sign Up for an Endicia Account and request API access.

Something went wrong with that request. Please try again.