Add USPS First-Class Mail shipping calculators #31

Closed
TylerRick opened this Issue Jun 1, 2012 · 2 comments

Projects

None yet

3 participants

@TylerRick

I noticed that there are not any shipping calculators for any of the USPS First-Class services

(https://github.com/spree/spree_active_shipping/tree/master/app/models/spree/calculator/usps)

Our store would like to add these as shipping methods so I plan to create calculators for them. Should I attach a pull request here?

@TylerRick

I plan to add one for "USPS First-Class Mail Parcel" as well as for International.

Here is a dump of the hash returned from USPS for a U.S. address:

{"USPS First-Class Mail Parcel"=>212,
 "USPS Library Mail"=>235,
 "USPS Media Mail"=>247,
 "USPS Priority Mail Small Flat Rate Envelope"=>515,
 "USPS Priority Mail Window Flat Rate Envelope"=>515,
 "USPS Priority Mail Gift Card Flat Rate Envelope"=>515,
 "USPS Priority Mail Flat Rate Envelope"=>515,
 "USPS Priority Mail Legal Flat Rate Envelope"=>530,
 "USPS Priority Mail Padded Flat Rate Envelope"=>530,
 "USPS Priority Mail Small Flat Rate Box"=>535,
 "USPS Parcel Post"=>570,
 "USPS Priority Mail"=>630,
 "USPS Priority Mail Medium Flat Rate Box"=>1135,
 "USPS Priority Mail Large Flat Rate Box"=>1545,
 "USPS Express Mail Flat Rate Envelope Hold For Pickup"=>1895,
 "USPS Express Mail Legal Flat Rate Envelope"=>1895,
 "USPS Express Mail Legal Flat Rate Envelope Hold For Pickup"=>1895,
 "USPS Express Mail Flat Rate Envelope"=>1895,
 "USPS Express Mail"=>2800,
 "USPS Express Mail Hold For Pickup"=>2800,
 "USPS Express Mail Flat Rate Boxes Hold For Pickup"=>3995,
 "USPS Express Mail Flat Rate Boxes"=>3995}

I assume it will have a "First-Class International" option if I put in a non-U.S. address...

@GeekOnCoffee
Contributor

a Pull Request would be welcomed :)

@jsqu99 jsqu99 added a commit to jsqu99/spree_active_shipping that referenced this issue Aug 4, 2012
@jsqu99 jsqu99 [Fixes #31] Missing USPS First Class Mail c9175bc
@jsqu99 jsqu99 closed this in a49dd71 Oct 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment