Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
6822dce
Add .rvmrc to .gitignore
blaix Jul 12, 2011
d04f220
Require 'active_support/core_ext/string'
blaix Jul 12, 2011
bd403dd
Add new response params (and test).
blaix Jul 12, 2011
e7e129e
Require all of 'active_support/core_ext'
blaix Jul 12, 2011
1c65bd9
Fix loading of defaults from config/endicia.yml
blaix Jul 12, 2011
ad10bf3
Support attributes on the root node of the request
blaix Jul 14, 2011
952912f
Support req. attrs in config/endicia.yml (Rails).
blaix Jul 14, 2011
e346caa
Include raw response from Endicia on Label object.
blaix Jul 19, 2011
a503fd4
Add Endicia.change_pass_phrase method.
blaix Jul 20, 2011
88c9029
Documentation.
blaix Jul 20, 2011
24846f0
Fix request paths and support production url.
blaix Jul 20, 2011
58431d3
Return raw response in change_pass_phrase ret val.
blaix Jul 20, 2011
70dd476
No old pass phrase param for change_pass_phrase.
blaix Jul 20, 2011
6baf49c
Add Endicia.buy_postage method.
blaix Jul 20, 2011
6f3363f
Begin refactoring to remove some duplication.
blaix Jul 21, 2011
3c52b00
Separate concerns.
blaix Jul 29, 2011
8f099b8
DRY up result parsing
blaix Jul 29, 2011
4f2301d
Update method documentation/comments.
blaix Jul 29, 2011
bee6cc6
Add Endicia.status_request.
blaix Jul 29, 2011
b35b0d0
Comments/documentation for Endicia.status_request
blaix Aug 1, 2011
1b6daec
Integration specs.
blaix Aug 2, 2011
b9d6d0f
Add support for insured mail.
blaix Aug 2, 2011
93f7bc7
Add Endicia.carrier_pickup_request
blaix Aug 3, 2011
b22dfdc
Clean up README formatting
blaix Aug 9, 2011
846be1f
Exclude certain zips if shipping jewelry with Endicia insurance.
blaix Aug 25, 2011
0828c7d
Don't pass :Jewelry option to Endicia.
blaix Aug 25, 2011
0ed2a0c
raw_response is now response_body
blaix Sep 7, 2011
e45cd14
Add request_body to labels.
blaix Sep 7, 2011
0aa8e95
support single RefundRequest
ne0zen Sep 9, 2011
9900b3f
called the wrong method in a test
ne0zen Sep 9, 2011
e1f279f
Duck punch a fix for relative xmlns uri.
blaix Sep 22, 2011
fc4f4ec
Added support for MailpieceDimenions (Length, Width, Height) and Imag…
Oct 14, 2011
7bcf9c1
Removed unnecessary file.
Oct 14, 2011
d06d5a2
Merge pull request #2 from tablexi/master
Oct 17, 2011
44bd727
Don't send empty values in request.
blaix Oct 24, 2011
422741b
Make sure <Jewelry> doesn't show up in request xml
blaix Oct 24, 2011
12b3146
Add request url to the label object.
blaix Oct 27, 2011
069aa49
Fix status request call.
blaix Nov 20, 2011
de230b4
Friendlier integration test output.
blaix Nov 21, 2011
7d7e7e0
Handle extended zips for ToPostalCode.
blaix Nov 21, 2011
63b4d3f
Fixes for 1.8.7
blaix Nov 21, 2011
9ca3ced
Allow for full status
jeffrafter Jan 17, 2012
ee630db
100% more endicia
jeffrafter Jan 18, 2012
f210a61
Don't always jump to the end of the line
jeffrafter Jan 18, 2012
793c14a
Add the ability to get more logging when doing status requests by pas…
jeffrafter Apr 11, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ doc
# jeweler generated
pkg

# rvm
.rvmrc

# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
#
# * Create a file at ~/.gitignore
Expand Down Expand Up @@ -46,3 +49,9 @@ pkg

# For rubinius:
#*.rbc

# Sample labels created by integration tests
test/images/*.gif
test/images/*.jpg
test/images/*.png
test/images/*.pdf
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
source "http://rubygems.org"
# Add dependencies required to use your gem here.
# Example:
# gem "activesupport", ">= 2.3.5"
gem "activesupport", ">= 2.3.5"
gem "i18n", ">= 0.6.0"
gem "httparty", ">= 0.4.4"
gem "builder", ">= 3.0.0"

# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
# gem "shoulda", ">= 0"
gem "shoulda", ">= 0"
gem "mocha", ">= 0"
gem "bundler", "~> 1.0.0"
gem "jeweler", "~> 1.6.0"
gem "rcov", ">= 0"
gem "nokogiri", ">= 0"
end
12 changes: 12 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
GEM
remote: http://rubygems.org/
specs:
activesupport (3.0.9)
builder (3.0.0)
crack (0.1.6)
git (1.2.5)
httparty (0.5.2)
crack (= 0.1.6)
i18n (0.6.0)
jeweler (1.6.0)
bundler (~> 1.0.0)
git (>= 1.2.5)
rake
mocha (0.9.12)
nokogiri (1.5.0)
rake (0.8.7)
rcov (0.9.9)
shoulda (2.11.3)

PLATFORMS
ruby

DEPENDENCIES
activesupport (>= 2.3.5)
builder (>= 3.0.0)
bundler (~> 1.0.0)
httparty (>= 0.4.4)
i18n (>= 0.6.0)
jeweler (~> 1.6.0)
mocha
nokogiri
rcov
shoulda
70 changes: 48 additions & 22 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,36 +1,63 @@
= endicia

This gem allows you to connect to your Endicia API to print USPS labels. It is in no way meant to be exhaustive--fork away!

This gem allows you to connect to your Endicia API to print USPS labels. It is
in no way meant to be exhaustive--fork away!

== Configuration
You'll need an endicia.yml file in config, with:
AccountID (6 digits)
RequesterID (string--you have to request this from Endicia)
PassPhrase (string)
and optionally
Test (set this to true while in testing and/or in development env)


If you're using Rails, you'll want an endicia.yml file in config, with:

development: &development
AccountID: (any 6 digit number for dev)
RequesterID: (any string for dev)
PassPhrase: (any string for dev)
Test: YES

test:
<<: *development

production:
AccountID: (6 digits)
RequesterID (string--you have to request this from Endicia)
PassPhrase (string)
Test: NO

Additionally, you may want to set a few defaults like your address:
FromCompany
FromCity
FromState
FromPostalCode
ReturnCompany
ReturnCity
ReturnState
ReturnCode

You can also specify any of the options that Endicia allows for 'GetPostageLabel' as defaults. Most of them you'll want to pass in, but you might find it convenient to switch the default image format globally, for instance. Any options you pass in directly will override that defaults in the config file.
FromCompany:
FromCity:
FromState:
FromPostalCode:
ReturnCompany:
ReturnCity:
ReturnState:
ReturnCode:

You can also specify any of the options that Endicia allows for
'GetPostageLabel' as defaults. Most of them you'll want to pass in, but you
might find it convenient to switch the default image format globally, for
instance. Any options you pass in directly will override that defaults in the
config file.

Outside of Rails, you will need to pass these options to Endicia.get_label.

Cheers!

== Usage
There's only one method--_get_label_.

Ex. Endicia.get_label({:ToPostalCode => RECIPIENT ZIP, :ToAddress1 => RECIPIENT ADDRESS, :ToCity => RECIPIENT CITY, :ToState => RECIPIENT STATE, :PartnerTransactionID => GENERALLY THE ORDER (OR SOME MODEL) ID, :PartnerCustomerID => GENERALLY CUSTOMER/USER ID, :MailClass => SHIPPING METHOD, :WeightOz => INTEGER WEIGHT})
label = Endicia.get_label({
:ToPostalCode => RECIPIENT ZIP,
:ToAddress1 => RECIPIENT ADDRESS,
:ToCity => RECIPIENT CITY,
:ToState => RECIPIENT STATE,
:PartnerTransactionID => GENERALLY THE ORDER (OR SOME MODEL) ID,
:PartnerCustomerID => GENERALLY CUSTOMER/USER ID,
:MailClass => SHIPPING METHOD,
:WeightOz => INTEGER WEIGHT
})

== Contributing to endicia

* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
* Fork the project
Expand All @@ -43,4 +70,3 @@ Ex. Endicia.get_label({:ToPostalCode => RECIPIENT ZIP, :ToAddress1 => RECIPIENT

Copyright (c) 2011 Mark Dickson. See LICENSE.txt for
further details.

11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ Rake::TestTask.new(:test) do |test|
test.verbose = true
end

namespace(:test) do
Rake::TestTask.new(:integration) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/integration.rb'
test.verbose = true
end

desc "Run unit and integration tests"
task(:all => ['test', 'test:integration'])
end

require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.1
Loading