International Shipping Rate Functionality #3

Closed
wants to merge 7 commits into
from

Conversation

Projects
None yet
2 participants

Uses the IntlRateV2 API to request international shipping rates

+ def initialize(*packages)
+ @packages = packages.flatten
+ if @packages.none?
+ raise ArgumentError, 'A shipping rate lookup requires at least one package (USPS::Package)'
@nhance

nhance Sep 18, 2012

Owner

The class name for this changed, didn't it?

Why did it change?

@spartan-developer

spartan-developer Sep 18, 2012

Domestic and International packages have different properties, so it didn't make sense anymore to have a single Package class. So Package is a base class, with InternationalPackage and DomesticPackage inheriting from it.
I changed the message to refer the specific package class.

+
+module USPS::Request::Package
+ describe USPS::Request::Package::InternationalPackage do
+ VALID_PROPERTIES = {
@nhance

nhance Sep 18, 2012

Owner

Should be REQUIRED_PROPERTIES?

It looks like these are all necessary, so that would make the spec a little clearer

Owner

nhance commented Sep 18, 2012

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment