reactive_shipping 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.travis.yml +33 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +225 -0
- data/CONTRIBUTING.md +23 -0
- data/Gemfile +3 -0
- data/MIT-LICENSE +21 -0
- data/README.md +158 -0
- data/Rakefile +35 -0
- data/dev.yml +17 -0
- data/gemfiles/activesupport42.gemfile +5 -0
- data/gemfiles/activesupport50.gemfile +6 -0
- data/gemfiles/activesupport51.gemfile +5 -0
- data/gemfiles/activesupport52.gemfile +5 -0
- data/gemfiles/activesupport_master.gemfile +5 -0
- data/lib/certs/eParcel.dtd +111 -0
- data/lib/reactive_shipping.rb +26 -0
- data/lib/reactive_shipping/address_validation_response.rb +30 -0
- data/lib/reactive_shipping/carrier.rb +184 -0
- data/lib/reactive_shipping/carriers.rb +35 -0
- data/lib/reactive_shipping/carriers/australia_post.rb +248 -0
- data/lib/reactive_shipping/carriers/benchmark_carrier.rb +31 -0
- data/lib/reactive_shipping/carriers/bogus_carrier.rb +12 -0
- data/lib/reactive_shipping/carriers/canada_post.rb +263 -0
- data/lib/reactive_shipping/carriers/canada_post_pws.rb +908 -0
- data/lib/reactive_shipping/carriers/fedex.rb +797 -0
- data/lib/reactive_shipping/carriers/kunaki.rb +155 -0
- data/lib/reactive_shipping/carriers/new_zealand_post.rb +260 -0
- data/lib/reactive_shipping/carriers/shipwire.rb +178 -0
- data/lib/reactive_shipping/carriers/stamps.rb +860 -0
- data/lib/reactive_shipping/carriers/ups.rb +1060 -0
- data/lib/reactive_shipping/carriers/usps.rb +708 -0
- data/lib/reactive_shipping/carriers/usps_returns.rb +86 -0
- data/lib/reactive_shipping/delivery_date_estimate.rb +20 -0
- data/lib/reactive_shipping/delivery_date_estimates_response.rb +11 -0
- data/lib/reactive_shipping/errors.rb +35 -0
- data/lib/reactive_shipping/external_return_label_request.rb +417 -0
- data/lib/reactive_shipping/external_return_label_response.rb +26 -0
- data/lib/reactive_shipping/label.rb +10 -0
- data/lib/reactive_shipping/label_response.rb +10 -0
- data/lib/reactive_shipping/location.rb +166 -0
- data/lib/reactive_shipping/package.rb +165 -0
- data/lib/reactive_shipping/package_item.rb +60 -0
- data/lib/reactive_shipping/rate_estimate.rb +197 -0
- data/lib/reactive_shipping/rate_response.rb +33 -0
- data/lib/reactive_shipping/response.rb +44 -0
- data/lib/reactive_shipping/shipment_event.rb +22 -0
- data/lib/reactive_shipping/shipment_packer.rb +108 -0
- data/lib/reactive_shipping/shipping_response.rb +34 -0
- data/lib/reactive_shipping/tracking_response.rb +120 -0
- data/lib/reactive_shipping/version.rb +3 -0
- data/reactive_shipping.gemspec +38 -0
- data/shipit.rubygems.yml +1 -0
- data/test/console.rb +39 -0
- data/test/credentials.yml +76 -0
- data/test/fixtures/files/label1.pdf +0 -0
- data/test/fixtures/files/ups-shipping-label.gif +0 -0
- data/test/fixtures/json/australia_post/calculate_domestic.json +13 -0
- data/test/fixtures/json/australia_post/calculate_domestic_2.json +19 -0
- data/test/fixtures/json/australia_post/calculate_international.json +12 -0
- data/test/fixtures/json/australia_post/calculate_international_2.json +15 -0
- data/test/fixtures/json/australia_post/error_message.json +5 -0
- data/test/fixtures/json/australia_post/service_domestic.json +117 -0
- data/test/fixtures/json/australia_post/service_domestic_2.json +117 -0
- data/test/fixtures/json/australia_post/service_international.json +76 -0
- data/test/fixtures/json/australia_post/service_international_2.json +59 -0
- data/test/fixtures/json/newzealandpost/domestic_book.json +1 -0
- data/test/fixtures/json/newzealandpost/domestic_default.json +1 -0
- data/test/fixtures/json/newzealandpost/domestic_error.json +1 -0
- data/test/fixtures/json/newzealandpost/domestic_poster.json +1 -0
- data/test/fixtures/json/newzealandpost/domestic_small_half_pound.json +1 -0
- data/test/fixtures/json/newzealandpost/international_book.json +1 -0
- data/test/fixtures/json/newzealandpost/international_new_zealand_wii.json +1 -0
- data/test/fixtures/json/newzealandpost/international_small_half_pound.json +1 -0
- data/test/fixtures/json/newzealandpost/international_wii.json +1 -0
- data/test/fixtures/xml/canadapost/example_request.xml +25 -0
- data/test/fixtures/xml/canadapost/example_response.xml +130 -0
- data/test/fixtures/xml/canadapost/example_response_error.xml +16 -0
- data/test/fixtures/xml/canadapost/example_response_french.xml +122 -0
- data/test/fixtures/xml/canadapost/example_response_with_nil_value.xml +164 -0
- data/test/fixtures/xml/canadapost/example_response_with_postal_outlet.xml +155 -0
- data/test/fixtures/xml/canadapost/example_response_with_postal_outlet_french.xml +274 -0
- data/test/fixtures/xml/canadapost/example_response_with_strange_delivery_date.xml +130 -0
- data/test/fixtures/xml/canadapost_pws/dnc_tracking_details_en.xml +112 -0
- data/test/fixtures/xml/canadapost_pws/merchant_details_error.xml +7 -0
- data/test/fixtures/xml/canadapost_pws/merchant_details_response.xml +7 -0
- data/test/fixtures/xml/canadapost_pws/option_response.xml +13 -0
- data/test/fixtures/xml/canadapost_pws/option_response_no_conflicts.xml +7 -0
- data/test/fixtures/xml/canadapost_pws/rates_info.xml +190 -0
- data/test/fixtures/xml/canadapost_pws/rates_info_error.xml +7 -0
- data/test/fixtures/xml/canadapost_pws/receipt_response.xml +42 -0
- data/test/fixtures/xml/canadapost_pws/receipt_response_no_priced_options.xml +36 -0
- data/test/fixtures/xml/canadapost_pws/register_token_error.xml +7 -0
- data/test/fixtures/xml/canadapost_pws/register_token_response.xml +3 -0
- data/test/fixtures/xml/canadapost_pws/service_options_response.xml +42 -0
- data/test/fixtures/xml/canadapost_pws/services_error.xml +6 -0
- data/test/fixtures/xml/canadapost_pws/services_response.xml +32 -0
- data/test/fixtures/xml/canadapost_pws/shipment_domestic.xml +69 -0
- data/test/fixtures/xml/canadapost_pws/shipment_response.xml +20 -0
- data/test/fixtures/xml/canadapost_pws/shipment_us.xml +69 -0
- data/test/fixtures/xml/canadapost_pws/tracking_details_en.xml +152 -0
- data/test/fixtures/xml/canadapost_pws/tracking_details_en_error.xml +7 -0
- data/test/fixtures/xml/canadapost_pws/tracking_details_en_undelivered.xml +116 -0
- data/test/fixtures/xml/canadapost_pws/tracking_details_fr.xml +156 -0
- data/test/fixtures/xml/canadapost_pws/tracking_details_no_expected_delivery_date.xml +40 -0
- data/test/fixtures/xml/fedex/create_shipment_response.xml +2 -0
- data/test/fixtures/xml/fedex/freight_rate_request.xml +82 -0
- data/test/fixtures/xml/fedex/freight_rate_response.xml +506 -0
- data/test/fixtures/xml/fedex/invalid_fedex_reply.xml +27 -0
- data/test/fixtures/xml/fedex/ottawa_to_beverly_hills_commercial_rate_request.xml +79 -0
- data/test/fixtures/xml/fedex/ottawa_to_beverly_hills_no_saturday_rate_request.xml +79 -0
- data/test/fixtures/xml/fedex/ottawa_to_beverly_hills_rate_request.xml +80 -0
- data/test/fixtures/xml/fedex/ottawa_to_beverly_hills_rate_response.xml +214 -0
- data/test/fixtures/xml/fedex/raterequest_reply.xml +213 -0
- data/test/fixtures/xml/fedex/raterequest_response_with_ground_home_delivery.xml +206 -0
- data/test/fixtures/xml/fedex/reply_without_notifications.xml +185 -0
- data/test/fixtures/xml/fedex/tracking_request.xml +29 -0
- data/test/fixtures/xml/fedex/tracking_response_bad_tracking_number.xml +20 -0
- data/test/fixtures/xml/fedex/tracking_response_delivered_at_door.xml +254 -0
- data/test/fixtures/xml/fedex/tracking_response_delivered_at_facility.xml +403 -0
- data/test/fixtures/xml/fedex/tracking_response_delivered_with_signature.xml +269 -0
- data/test/fixtures/xml/fedex/tracking_response_empty_status_detail.xml +84 -0
- data/test/fixtures/xml/fedex/tracking_response_failure_code_9045.xml +52 -0
- data/test/fixtures/xml/fedex/tracking_response_failure_code_9080.xml +51 -0
- data/test/fixtures/xml/fedex/tracking_response_in_transit.xml +127 -0
- data/test/fixtures/xml/fedex/tracking_response_invalid_tracking_number.xml +52 -0
- data/test/fixtures/xml/fedex/tracking_response_missing_status_code.xml +89 -0
- data/test/fixtures/xml/fedex/tracking_response_multiple_results.xml +100 -0
- data/test/fixtures/xml/fedex/tracking_response_not_found.xml +52 -0
- data/test/fixtures/xml/fedex/tracking_response_shipment_exception.xml +209 -0
- data/test/fixtures/xml/fedex/tracking_response_unable_to_process.xml +32 -0
- data/test/fixtures/xml/fedex/tracking_response_with_blank_state.xml +107 -0
- data/test/fixtures/xml/fedex/unknown_fedex_document_reply.xml +3 -0
- data/test/fixtures/xml/kunaki/invalid_state_response.xml +3 -0
- data/test/fixtures/xml/kunaki/no_valid_items_response.xml +3 -0
- data/test/fixtures/xml/kunaki/successful_rates_response.xml +3 -0
- data/test/fixtures/xml/kunaki/unsuccessful_rates_response.xml +9 -0
- data/test/fixtures/xml/shipwire/international_rates_response.xml +17 -0
- data/test/fixtures/xml/shipwire/new_carrier_rate_response.xml +18 -0
- data/test/fixtures/xml/shipwire/no_rates_response.xml +7 -0
- data/test/fixtures/xml/shipwire/rates_response.xml +36 -0
- data/test/fixtures/xml/shipwire/rates_response_no_estimate.xml +14 -0
- data/test/fixtures/xml/stamps/authenticate_user_request.xml +15 -0
- data/test/fixtures/xml/stamps/authenticate_user_response.xml +10 -0
- data/test/fixtures/xml/stamps/cleanse_address_request.xml +19 -0
- data/test/fixtures/xml/stamps/cleanse_address_response.xml +27 -0
- data/test/fixtures/xml/stamps/create_indicium_request.xml +69 -0
- data/test/fixtures/xml/stamps/create_indicium_response.xml +40 -0
- data/test/fixtures/xml/stamps/expired_authenticator_response.xml +15 -0
- data/test/fixtures/xml/stamps/get_account_info_request.xml +11 -0
- data/test/fixtures/xml/stamps/get_account_info_response.xml +36 -0
- data/test/fixtures/xml/stamps/get_purchase_status_request.xml +12 -0
- data/test/fixtures/xml/stamps/get_purchase_status_response.xml +16 -0
- data/test/fixtures/xml/stamps/get_rates_request.xml +19 -0
- data/test/fixtures/xml/stamps/get_rates_response.xml +351 -0
- data/test/fixtures/xml/stamps/purchase_postage_request.xml +13 -0
- data/test/fixtures/xml/stamps/purchase_postage_response.xml +17 -0
- data/test/fixtures/xml/stamps/track_shipment_request.xml +12 -0
- data/test/fixtures/xml/stamps/track_shipment_response.xml +45 -0
- data/test/fixtures/xml/ups/access_request.xml +6 -0
- data/test/fixtures/xml/ups/delivered_shipment_with_refund.xml +290 -0
- data/test/fixtures/xml/ups/delivered_shipment_without_events_tracking_response.xml +62 -0
- data/test/fixtures/xml/ups/delivery_dates_response.xml +140 -0
- data/test/fixtures/xml/ups/example_tracking_response.xml +53 -0
- data/test/fixtures/xml/ups/in_transit_shipment.xml +183 -0
- data/test/fixtures/xml/ups/out_for_delivery_shipment.xml +165 -0
- data/test/fixtures/xml/ups/package_exceeds_maximum_length.xml +12 -0
- data/test/fixtures/xml/ups/rate_single_service.xml +54 -0
- data/test/fixtures/xml/ups/rescheduled_shipment.xml +204 -0
- data/test/fixtures/xml/ups/shipment_accept_response.xml +42 -0
- data/test/fixtures/xml/ups/shipment_confirm_response.xml +33 -0
- data/test/fixtures/xml/ups/shipment_from_tiger_direct.xml +222 -0
- data/test/fixtures/xml/ups/test_real_home_as_residential_destination_response.xml +290 -0
- data/test/fixtures/xml/ups/test_real_home_as_residential_destination_response_with_insured.xml +289 -0
- data/test/fixtures/xml/ups/test_real_home_as_residential_destination_with_origin_account_response.xml +311 -0
- data/test/fixtures/xml/ups/tracking_request.xml +9 -0
- data/test/fixtures/xml/ups/triple_accept_response.xml +72 -0
- data/test/fixtures/xml/ups/triple_confirm_response.xml +32 -0
- data/test/fixtures/xml/ups/void_shipment_response.xml +11 -0
- data/test/fixtures/xml/usps/api_error_rate_response.xml +53 -0
- data/test/fixtures/xml/usps/beverly_hills_to_new_york_book_commercial_base_rate_response.xml +2 -0
- data/test/fixtures/xml/usps/beverly_hills_to_new_york_book_commercial_plus_rate_response.xml +258 -0
- data/test/fixtures/xml/usps/beverly_hills_to_new_york_book_rate_response.xml +108 -0
- data/test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_commercial_base_rate_response.xml +84 -0
- data/test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_commercial_plus_rate_response.xml +212 -0
- data/test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_rate_response.xml +230 -0
- data/test/fixtures/xml/usps/first_class_packages_with_invalid_mail_type_response.xml +12 -0
- data/test/fixtures/xml/usps/first_class_packages_with_mail_type_response.xml +16 -0
- data/test/fixtures/xml/usps/first_class_packages_without_mail_type_response.xml +12 -0
- data/test/fixtures/xml/usps/invalid_xml_response.xml +10 -0
- data/test/fixtures/xml/usps/invalid_xml_tracking_response_error.xml +2 -0
- data/test/fixtures/xml/usps/tracking_request.xml +10 -0
- data/test/fixtures/xml/usps/tracking_request_batch.xml +12 -0
- data/test/fixtures/xml/usps/tracking_response.xml +162 -0
- data/test/fixtures/xml/usps/tracking_response_alt.xml +53 -0
- data/test/fixtures/xml/usps/tracking_response_batch.xml +231 -0
- data/test/fixtures/xml/usps/tracking_response_failure.xml +11 -0
- data/test/fixtures/xml/usps/tracking_response_not_available.xml +12 -0
- data/test/fixtures/xml/usps/tracking_response_test_error.xml +8 -0
- data/test/fixtures/xml/usps/us_rate_request.xml +18 -0
- data/test/fixtures/xml/usps/us_rate_request_large.xml +18 -0
- data/test/fixtures/xml/usps/world_rate_request_only_country.xml +22 -0
- data/test/fixtures/xml/usps/world_rate_request_with_value.xml +24 -0
- data/test/fixtures/xml/usps/world_rate_request_without_value.xml +24 -0
- data/test/fixtures/xml/usps_returns/external_return_label_response.xml +2 -0
- data/test/fixtures/xml/usps_returns/external_return_label_response_failure.xml +10 -0
- data/test/remote/australia_post_test.rb +140 -0
- data/test/remote/canada_post_pws_platform_test.rb +259 -0
- data/test/remote/canada_post_pws_test.rb +169 -0
- data/test/remote/canada_post_test.rb +55 -0
- data/test/remote/fedex_test.rb +400 -0
- data/test/remote/kunaki_test.rb +37 -0
- data/test/remote/new_zealand_post_test.rb +149 -0
- data/test/remote/shipwire_test.rb +84 -0
- data/test/remote/stamps_test.rb +396 -0
- data/test/remote/usps_returns_test.rb +72 -0
- data/test/remote/usps_test.rb +243 -0
- data/test/test_helper.rb +296 -0
- data/test/unit/carrier_test.rb +130 -0
- data/test/unit/carriers/australia_post_test.rb +181 -0
- data/test/unit/carriers/benchmark_test.rb +18 -0
- data/test/unit/carriers/canada_post_pws_rating_test.rb +379 -0
- data/test/unit/carriers/canada_post_pws_register_test.rb +76 -0
- data/test/unit/carriers/canada_post_pws_shipping_test.rb +258 -0
- data/test/unit/carriers/canada_post_pws_test.rb +59 -0
- data/test/unit/carriers/canada_post_pws_tracking_test.rb +154 -0
- data/test/unit/carriers/canada_post_test.rb +148 -0
- data/test/unit/carriers/fedex_test.rb +693 -0
- data/test/unit/carriers/kunaki_test.rb +56 -0
- data/test/unit/carriers/new_zealand_post_test.rb +177 -0
- data/test/unit/carriers/shipwire_test.rb +188 -0
- data/test/unit/carriers/stamps_test.rb +245 -0
- data/test/unit/carriers/ups_test.rb +580 -0
- data/test/unit/carriers/usps_returns_test.rb +45 -0
- data/test/unit/carriers/usps_test.rb +633 -0
- data/test/unit/carriers_test.rb +16 -0
- data/test/unit/external_return_label_request_test.rb +258 -0
- data/test/unit/location_test.rb +234 -0
- data/test/unit/package_item_test.rb +232 -0
- data/test/unit/package_test.rb +404 -0
- data/test/unit/rate_estimate_test.rb +93 -0
- data/test/unit/response_test.rb +38 -0
- data/test/unit/shipment_event_test.rb +20 -0
- data/test/unit/shipment_packer_test.rb +212 -0
- data/test/unit/tracking_response_test.rb +41 -0
- metadata +684 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<TrackResponse>
|
3
|
+
<TrackInfo ID="9102901000462189604217">
|
4
|
+
<Error>
|
5
|
+
<Number>-2147219302</Number>
|
6
|
+
<Description>The Postal Service could not locate the tracking information for your request. Please verify your tracking number and try again later.</Description>
|
7
|
+
<HelpFile/>
|
8
|
+
<HelpContext/>
|
9
|
+
</Error>
|
10
|
+
</TrackInfo>
|
11
|
+
</TrackResponse>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<TrackResponse>
|
3
|
+
<TrackInfo ID="9574211957289221353248">
|
4
|
+
<Error>
|
5
|
+
<Number>-2147219301</Number>
|
6
|
+
<Description>Delivery status information is not available for your item via this web site.</Description>
|
7
|
+
<HelpFile/>
|
8
|
+
<HelpContext/>
|
9
|
+
</Error>
|
10
|
+
</TrackInfo>
|
11
|
+
</TrackResponse>
|
12
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<Error>
|
3
|
+
<Number>-2147219040</Number>
|
4
|
+
<Source>SOLServerTest;SOLServerTest.Track_Respond</Source>
|
5
|
+
<Description>This Information has not been included in this Test Server.</Description>
|
6
|
+
<HelpFile></HelpFile>
|
7
|
+
<HelpContext></HelpContext>
|
8
|
+
</Error>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<RateV4Request USERID="login">
|
3
|
+
<Package ID="0">
|
4
|
+
<Service>ALL</Service>
|
5
|
+
<FirstClassMailType/>
|
6
|
+
<ZipOrigination>90210</ZipOrigination>
|
7
|
+
<ZipDestination>10017</ZipDestination>
|
8
|
+
<Pounds>0</Pounds>
|
9
|
+
<Ounces>8.8</Ounces>
|
10
|
+
<Container/>
|
11
|
+
<Size>REGULAR</Size>
|
12
|
+
<Width>5.51</Width>
|
13
|
+
<Length>7.48</Length>
|
14
|
+
<Height>0.79</Height>
|
15
|
+
<Girth>12.60</Girth>
|
16
|
+
<Machinable>TRUE</Machinable>
|
17
|
+
</Package>
|
18
|
+
</RateV4Request>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<RateV4Request USERID="login">
|
3
|
+
<Package ID="0">
|
4
|
+
<Service>ALL</Service>
|
5
|
+
<FirstClassMailType/>
|
6
|
+
<ZipOrigination>90210</ZipOrigination>
|
7
|
+
<ZipDestination>10017</ZipDestination>
|
8
|
+
<Pounds>0</Pounds>
|
9
|
+
<Ounces>800.0</Ounces>
|
10
|
+
<Container>RECTANGULAR</Container>
|
11
|
+
<Size>LARGE</Size>
|
12
|
+
<Width>24.00</Width>
|
13
|
+
<Length>36.00</Length>
|
14
|
+
<Height>24.00</Height>
|
15
|
+
<Girth>96.00</Girth>
|
16
|
+
<Machinable>FALSE</Machinable>
|
17
|
+
</Package>
|
18
|
+
</RateV4Request>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<IntlRateV2Request USERID="login">
|
3
|
+
<Revision>2</Revision>
|
4
|
+
<Package ID="0">
|
5
|
+
<Pounds>0</Pounds>
|
6
|
+
<Ounces>120</Ounces>
|
7
|
+
<MailType>Package</MailType>
|
8
|
+
<GXG>
|
9
|
+
<POBoxFlag>N</POBoxFlag>
|
10
|
+
<GiftFlag>N</GiftFlag>
|
11
|
+
</GXG>
|
12
|
+
<ValueOfContents>269.99</ValueOfContents>
|
13
|
+
<Country>Czech Republic</Country>
|
14
|
+
<Container>RECTANGULAR</Container>
|
15
|
+
<Size>LARGE</Size>
|
16
|
+
<Width>10.00</Width>
|
17
|
+
<Length>15.00</Length>
|
18
|
+
<Height>4.50</Height>
|
19
|
+
<Girth>29.00</Girth>
|
20
|
+
<OriginZip>90210</OriginZip>
|
21
|
+
</Package>
|
22
|
+
</IntlRateV2Request>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<IntlRateV2Request USERID="login">
|
3
|
+
<Revision>2</Revision>
|
4
|
+
<Package ID="0">
|
5
|
+
<Pounds>0</Pounds>
|
6
|
+
<Ounces>120</Ounces>
|
7
|
+
<MailType>Package</MailType>
|
8
|
+
<GXG>
|
9
|
+
<POBoxFlag>N</POBoxFlag>
|
10
|
+
<GiftFlag>N</GiftFlag>
|
11
|
+
</GXG>
|
12
|
+
<ValueOfContents>269.99</ValueOfContents>
|
13
|
+
<Country>Canada</Country>
|
14
|
+
<Container>RECTANGULAR</Container>
|
15
|
+
<Size>LARGE</Size>
|
16
|
+
<Width>10.00</Width>
|
17
|
+
<Length>15.00</Length>
|
18
|
+
<Height>4.50</Height>
|
19
|
+
<Girth>29.00</Girth>
|
20
|
+
<OriginZip>90210</OriginZip>
|
21
|
+
<AcceptanceDateTime>2015-06-01T20:34:29Z</AcceptanceDateTime>
|
22
|
+
<DestinationPostalCode>K1P 1J1</DestinationPostalCode>
|
23
|
+
</Package>
|
24
|
+
</IntlRateV2Request>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<IntlRateV2Request USERID="login">
|
3
|
+
<Revision>2</Revision>
|
4
|
+
<Package ID="0">
|
5
|
+
<Pounds>0</Pounds>
|
6
|
+
<Ounces>9</Ounces>
|
7
|
+
<MailType>Package</MailType>
|
8
|
+
<GXG>
|
9
|
+
<POBoxFlag>N</POBoxFlag>
|
10
|
+
<GiftFlag>N</GiftFlag>
|
11
|
+
</GXG>
|
12
|
+
<ValueOfContents>0.0</ValueOfContents>
|
13
|
+
<Country>Canada</Country>
|
14
|
+
<Container>RECTANGULAR</Container>
|
15
|
+
<Size>REGULAR</Size>
|
16
|
+
<Width>5.51</Width>
|
17
|
+
<Length>7.48</Length>
|
18
|
+
<Height>0.79</Height>
|
19
|
+
<Girth>12.60</Girth>
|
20
|
+
<OriginZip>90210</OriginZip>
|
21
|
+
<AcceptanceDateTime>2015-06-01T20:34:29Z</AcceptanceDateTime>
|
22
|
+
<DestinationPostalCode>K1P 1J1</DestinationPostalCode>
|
23
|
+
</Package>
|
24
|
+
</IntlRateV2Request>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<ExternalReturnLabelResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
2
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ReturnLabel>JVBERi0xLjcKJdP0zOEKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlKEQ6MjAxNDA3MjIxNTUwMDMrMDAnMDAnKQovQ3JlYXRvcihQREZzaGFycCAxLjMyLjI2MDgtZyBcKHd3dy5wZGZzaGFycC5uZXRcKSkKL1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al//wZHX//Ykij//kNgn//sgXA//8EU5DNV//+///v/5XDBCcEImPOgZX7/+1KdItw/+//lcJGpHFaBA3/7mi/6C90nyTjO/f/4S80BKv/7//oL///3X/hLx//7//oL///f/4S/r/7//pD2v/7//kHGigbS//1/42fmK/+3/+VxQHsNhhf///xhF04//f/zvwyA+V9B9//7//0dwiP7eaBMf9kEiv/629vr/uC///vsNTWv/YL///4Yq8fuF///xH/31/j3pD/bf/9uGdMl0Qh////FhWfoZ6QedAyv//534ZAfGiOg3CI+G0dwRdf+3//yuItlT7b1soZ/v1/+CXfv//9t//HBF12/ZXf8f//+gW2vf6/7//2D2K2SOHFf3ev/Bkw4aw0Hr///4NiIiI/2//8EvJwZyODORw2ff/zvwyA+VwzzoGVngyAMdv//4R2ahP//X/7DO8//7BHH//wZPb8k4zv7///lcvsoZ//fr/+P//e+v/yutgi///f//NBP/7e1/+W5rwv///+Pj/////1/7H//6/+YX/8rq/1/7a/+EvC/+Gl/6XomO1/hj/zvwyA+EERQEwl/4YNf/oL0m0vyoDT/+VwxiaA+Eo/yYBp/+Vxl6TX5EwMf/DZNM38Jr8lAaP/sMiYv8IGC/JaGP/htHJ/ofypBP/tpfj+SU//j//j/9////lfUsfIx///R7bIpXCny/Kc/46CbXVB/yEBf/cTqfCX/I9//QegkTh/sSMX/O/DID/kXkfvVPgyjIhlCvIQELr/9pBB0yhlavH8mBf/7Gj8UH+lf/BFx/47Cq///+nzZf8VfX6//9EEGf7pM9r///0D/nfhkB8rhhPYr1//+//1EmL//9j5ef/lcuvvX/+ic//2JoJulX+14///vC/7X//EiqN5BrtIJf4//9U72Ov8gy7/+VwwekCLr2q/wpH9v/5Xr12UVQwoL/Qvg/47fWdbEf+9kOM/030gg//RfPYP/hAi/aqjuEXX/1KHe3/O/DID6CbYqq7yLX/i+UCf/ScR9//9vOp//Ef//98vj/HK6WXr///JJP8I0O9L//+Q5f/hB24r/9v5Bev878MgPrYj//fngf/+//8NcoE/+650DK/2DBLB//9EMJ/+x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j/CH///4j//zWx/Xh//yuVvb+D///YSO9QTh//H2KXYP//hqeQrBh//IwTxSwYP/4IH/sH/9Bj/MOH/9crP+DB//RKjIsGQH8qYjfhh//ggfJgNHhBt+D//7/JR4RP2iDyUd////JIwg2vhf/9fwek2Pgl/+GFyKs28lpdP4IF/+MfwYevxC/+1+G+m+C/+Gl8MP8kAmCC/+GC/DH6eEC/+K+9pMLBBf/C+HfKj4L/534ZAdNcbW+F/8jBcIjHHtpPwX/wRDBTSrYaS4//T6fJVGm9Nf/0+EwtYYcRyrf/0Q7vodBBxyXD//l8wcYXTZ2QGMIP/9O96RmutP//dwf25BAzkJ6Je///wf/t6CBv/+tQf2u30//4aQWD29Z/P30m//seRYMgORsE7CCI4//p//1WwexTX/rf/w1C5n7Q/pdP/8GUqcHx/JAP//8fD/9f//8L/j5+//lQMcFyCf///86ycf////1TCBf/+v/1TIsGQHBAv/OkbffX/6RfeC/EUk99f/1T8F4pI0e9f/r3wX1V/pf/f+Cx/2NL/+3WPr71/+G2FEiYuVNlSDP1/C/+xFBB5KsIP9LEf/unqmTJtqv/9hJ6CRuYQUVX/8MJEuelTpBof/40/pYQQ//zvwyA6Tf7pZ0DK//0/vhBf///btUv/+P9ukEF///2HDCpc1DT//tdiKCC////gwkv//7DSxkM8lT//+1///+d+GQHesf//5rPeslaPF///vDTWFCf//+GIjpI2Mmn///vqg3///5bh6S////2yunDR9P///8MP/////t+7r///9h/d/4//yGDcrpy2G2kQUM/j//b2Irx//kVDIDhvaOx//+a33kFP//+E8f//4T//+OiKO8lH//8IJvsov/+KCb7v//pPwiPhsf/5J0J/bf//cJ/b//7dP9uQQM//9xH2///2SgMgP7akkz///IYbP2/86Blf/vJgNHsMJf////Yr////4a///j+I/knGd/8R////hP///oER///+d+GQH0v///kwGjKrhK1//+S5/4SYrX/+agx+3Ca//+n+3Q4X/+nkqH2Ov/9MQgslAZ9f/8sOEF5BPCJDtf/02EFjDwk2v//S2D0or//QQWGDwgmv/2oQWDD6a//GRYMgOEFzjg+E1/9rkNE+DD6H/7X+GHwv/hhf4Pj/8f8L//x8Ev/4+CBZ0DK/+S58Qv/+agwVwYuEC//6YQeCC//6aegXNQ0//00+F///lh0R48f//9Nwn////pN////oiwZAenzsoDP///tf////x/////aHMP517///a////+GFev///xJUGQHfX////Gl////6///+L/+P/92F/j/8R/H/+P//yLX////////////8pwpKwyA///wQP//+n///TEiUbv//yaJXDv86Blf/hB4////ZFQyA8edlAZ///+GD/Itf/6wYfPr//8GC81///+x5MXM////1x4///8MIY///+DBBg///+IMP///zX////M/tcf/lOF8d6//ggZKAyA4jwwv/9P2KyDAj/6fhhZTg3//JojgwWv/4QfHX//fomk///r//Xpf/gwXOygM/X/2P///WdhWf//+GF///wYL///j//////+d+GQH/7/+U4X19v/4IH6f3/9P0CI/7IF//9Pwl+//5NH0mGFw//4QccJRWD//74TWP//4Q//+sf/8GC//9j//9edAyv/hhf//Bgv//iSwMgP///8k4zv/mt///+GP//+///8P///LHf///b9f/+GH///2/C//8MP1//kMNnr//sioZAfwiQ7X//+Em1///pRX/zWx8IJr//9Nf/a+E1/8SqBkB/of//wv//j////////zoGV/8f///////+d+GQH8iRf//CX//0F/8k78Jf/v9Bf/b/CX/3H0F/+/CWVsMEcGcjgo/5DDZ6C4j/9+Ev//6C5iCjQoR//4S8R/+JFQyA/oL///ohlf///////////+eIjjPgwfBg+iOGP//j6H8f/yXMf9GwpJIhspH/5qDHlW/SEhBhBCEF/9PwQP6BAkkv/p+EH+VAoQQQX/0/RPn+ESVhIL/8sP6BA3/CCQS//TZFQyA/pN/wwgggv//+k39hkWpJf/6/Sb9skxhBBFDhf/tf6Lgu/sjHI6gcgx4kMZ/8f//sZEP//tfqaZzvyQjoDAsoR/7Q/Xv44//DC//8f/j+v+d1D/+d+GQH/X/MCEcZ/IMGAg///4TX+OD0Xj///hEx2v5IRhsHPx8wg3//+0mKXxCCBh/pP//94TVekwf63//+4Qr4RQ4U7g/6f/4+416eDf///+18Lh////7DCXhAsL////bS9LBL///+xXhBRBf2v//DC+RByNAL96/+d+GQH8ML4wQWPa///HyQkCEYYS///4wQYr///iUgwwv/+dmYHhv+EGP///zAhHGfBhF4//j/8egg3///yQhSf//LWf49////Kfp/////////z4Mf/878MgP//////8jH/ODa///8KfL/fPojhj/4/6oPzAhHHwwlH///hL8e3TKw/f//6CROH5IRzw9D///+qfx8R///+tX/////pX///+d+GQH///xIMGP////X///////Gfj5tf/j5Uf6/lIDH7a//8jA//+YEI4/+K//4Qf3r8c/Hz+Gv/+n7pV8/Hz/+P//T+8L//////kfv7SCX///kgf//QIP7HX///hB//+m/ar///0Xj//6T+GFBf///CDf/zvwyA//4j//+Ok///9///8RW///////0///9f//HJ7/////74ips////f50DK8RFJP//j7a//Cmf///gwl/5SAwqV2v//f+ahp/MCEcfW71//2q//45w/Xa//96//5/Kz/8MJf/8Owv//H/XDFf/O/DID+I////+GF//////7pR//////7apf//JcX///4pSi//+awX///tQ1CU2f//0//+1bSEaT/+PoP//bShhUFM///r//wwoYhEOVK//+iej//wwaCDSmzrf//0//+GKFJPr//+//+SFCmf/////H8VSvX/+d+GQH/XxH63////DC//XdL//9iv/9tUv/j7X/rxS//9r//lDqF//wwvOgZX3SiI//8qP/21SIT//4/+einBiKX///knGd6mzw1C////+lYiP//yMD//wkZ5G///4IH/+qVwf/878MgP6f/9bsGakRwx//9P//rPgwDDj///JUf//+wbKD//H0CNT9f9ciHO4Mf///6//hBYN///39f71Sw///9fC/tpJBBYX//9r6JjtfilQWCX//2K8Jf4ahBKIIoQ//O/DID/+k2l4iEEgUnX//7XhKPyn0gQTB///DC9Jr8IJApTh//HwYL4TX8gx4IWD//4/CBgv8Z3B///6H8cG///4/kaBjD///yLXmBCOPwv//NUcvC/GSjOeCX//WRAnBfJCOfxBf/9OQQZwvj+gX///wQL/wgv/+gn8IF+uEC//9S4+CBfrwX//p38IL8g8Lv/878MgP//ggXmMcIER5RMD///a/hAvg9Lwg////+gXsHoJikXj/+PsML/Xg301CDf//iv4fsik8IUn//7X7B/O4MzBgVv//tfgw/5TvIRU///DQ+GD/EOQev//8fBg/wuF//534ZAf/DD/CWlnP///4MH8QWgv///+GH6BYSvX///g34IIjrS+v//+H9AhE+Ebwv///B/guOv/j/j4kPPgwdXwv///+2I////zrhh//O/DID/50DK/2/////7f////8OfRHDH//j/zAhHHvH///H48Z+Pn///5IRz///j/4////H/////+fBj///lQP////4IH+P///Cfj///wg////6I6PzAhHGRoGP///BB/jPgx4//zvwyA/pN/Px84uP//6f/5+Pkf//rf/////p/////////nwY////////////865z///////////////4/a//////ev3////9r4iOP//zvwyA/sMJeI///9hpeev//+9eps//+PvXpWP//w4/CRnj//x9Ur/+d+GQH/63////X///////nQMr9f////////71/+P/tpJf/+ahp/il////hqF////Ef////////////////////////////////////8hgcgzj////Ef/////+PndETRf/xHEf///////////////////////////////////yDOOQZxyDOOQZxyDOOQZxyDOOQZxyB4M45BnHIM45BnHIM45BnHIM45BnHIM4/EREREREREREcf///////////////////////8yS4pDphBUeGF9ggXwS9ggrEER4ERExW02ECixUy8GDwMMjOQsEH4gvxDGEF+IYwgvxDHkE4hjiD+QxxDHEMcQx5DHEH8h+IPxCcQvELxE8h+IfiH8gnEL5BOIXiF4g/ELxC+QvEJhCYQvkJ5CcQnkLxC+ROIXiE4hfIfiF4hfIXyJxBOITiH8hPITyJ5CzIXyE8heInkL5C8QTyH8g+EHwg/EF/IJxB/IJxCbVfDX////////////////////////8RCYiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiMyS4IHTRcB0eBhg/OQQiYD8GD+D2KBh2gw4j//////////////////////////////////////+XUf///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8txTjV1YAKZW5kc3RyZWFtCmVuZG9iagp4JVBERi0xLjcKJdP0zOEKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlKEQ6MjAxNDA3MjIxNTUwMDMrMDAnMDAnKQovQ3JlYXRvcihQREZzaGFycCAxLjMyLjI2MDgtZy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Kc3RyZWFtCv////8tQFUf///////////////////K5kB2BX+QOYbmhRoUNmMFAmTVTt1ZBG6CCNwQggUQSRXHj///////////////////zX//9kal//wZHX//Ykij//kNgn//sgXA//8EU5DNV//+///v/5XDBCcEImPOgZX7/+1KdItw/+//lcJGpHFaBA3/7mi/6C90nyTjO/f/4S80BKv/7//oL///3X/hLx//7//oL///f/4S/r/7//pD2v/7//kHGigbS//1/42fmK/+3/+VxQHsNhhf///xhF04//f/zvwyA+V9B9//7//0dwiP7eaBMf9kEiv/629vr/uC///vsNTWv/YL///4Yq8fuF///xH/31/j3pD/bf/9uGdMl0Qh////FhWfoZ6QedAyv//534ZAfGiOg3CI+G0dwRdf+3//yuItlT7b1soZ/v1/+CXfv//9t//HBF12/ZXf8f//+gW2vf6/7//2D2K2SOHFf3ev/Bkw4aw0Hr///4NiIiI/2//8EvJwZyODORw2ff/zvwyA+VwzzoGVngyAMdv//4R2ahP//X/7DO8//7BHH//wZPb8k4zv7///lcvsoZ//fr/+P//e+v/yutgi///f//NBP/7e1/+W5rwv///+Pj/////1/7H//6/+YX/8rq/1/7a/+EvC/+Gl/6XomO1/hj/zvwyA+EERQEwl/4YNf/oL0m0vyoDT/+VwxiaA+Eo/yYBp/+Vxl6TX5EwMf/DZNM38Jr8lAaP/sMiYv8IGC/JaGP/htHJ/ofypBP/tpfj+SU//j//j/9////lfUsfIx///R7bIpXCny/Kc/46CbXVB/yEBf/cTqfCX/I9//QegkTh/sSMX/O/DID/kXkfvVPgyjIhlCvIQELr/9pBB0yhlavH8mBf/7Gj8UH+lf/BFx/47Cq///+nzZf8VfX6//9EEGf7pM9r///0D/nfhkB8rhhPYr1//+//1EmL//9j5ef/lcuvvX/+ic//2JoJulX+14///vC/7X//EiqN5BrtIJf4//9U72Ov8gy7/+VwwekCLr2q/wpH9v/5Xr12UVQwoL/Qvg/47fWdbEf+9kOM/030gg//RfPYP/hAi/aqjuEXX/1KHe3/O/DID6CbYqq7yLX/i+UCf/ScR9//9vOp//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f/9v8IK8JN//ww/yWBUmyk9BN//2/wg0m/CTf/9v9GOwgmyGBHCf/5DDZ+gg3Tr0//7yYDR09POg8lGn///q4j/CH///4j//zWx/Xh//yuVvb+D///YSO9QTh//H2KXYP//hqeQrBh//IwTxSwYP/4IH/sH/9Bj/MOH/9crP+DB//RKjIsGQH8qYjfhh//ggfJgNHhBt+D//7/JR4RP2iDyUd////JIwg2vhf/9fwek2Pgl/+GFyKs28lpdP4IF/+MfwYevxC/+1+G+m+C/+Gl8MP8kAmCC/+GC/DH6eEC/+K+9pMLBBf/C+HfKj4L/534ZAdNcbW+F/8jBcIjHHtpPwX/wRDBTSrYaS4//T6fJVGm9Nf/0+EwtYYcRyrf/0Q7vodBBxyXD//l8wcYXTZ2QGMIP/9O96RmutP//dwf25BAzkJ6Je///wf/t6CBv/+tQf2u30//4aQWD29Z/P30m//seRYMgORsE7CCI4//p//1WwexTX/rf/w1C5n7Q/pdP/8GUqcHx/JAP//8fD/9f//8L/j5+//lQMcFyCf///86ycf////1TCBf/+v/1TIsGQHBAv/OkbffX/6RfeC/EUk99f/1T8F4pI0e9f/r3wX1V/pf/f+Cx/2NL/+3WPr71/+G2FEiYuVNlSDP1/C/+xFBB5KsIP9LEf/unqmTJtqv/9hJ6CRuYQUVX/8MJEuelTpBof/40/pYQQ//zvwyA6Tf7pZ0DK//0/vhBf///btUv/+P9ukEF///2HDCpc1DT//tdiKCC////gwkv//7DSxkM8lT//+1///+d+GQHesf//5rPeslaPF///vDTWFCf//+GIjpI2Mmn///vqg3///5bh6S////2yunDR9P///8MP/////t+7r///9h/d/4//yGDcrpy2G2kQUM/j//b2Irx//kVDIDhvaOx//+a33kFP//+E8f//4T//+OiKO8lH//8IJvsov/+KCb7v//pPwiPhsf/5J0J/bf//cJ/b//7dP9uQQM//9xH2///2SgMgP7akkz///IYbP2/86Blf/vJgNHsMJf////Yr////4a///j+I/knGd/8R////hP///oER///+d+GQH0v///kwGjKrhK1//+S5/4SYrX/+agx+3Ca//+n+3Q4X/+nkqH2Ov/9MQgslAZ9f/8sOEF5BPCJDtf/02EFjDwk2v//S2D0or//QQWGDwgmv/2oQWDD6a//GRYMgOEFzjg+E1/9rkNE+DD6H/7X+GHwv/hhf4Pj/8f8L//x8Ev/4+CBZ0DK/+S58Qv/+agwVwYuEC//6YQeCC//6aegXNQ0//00+F///lh0R48f//9Nwn////pN////oiwZAenzsoDP///tf////x/////aHMP517///a////+GFev///xJUGQHfX////Gl////6///+L/+P/92F/j/8R/H/+P//yLX////////////8pwpKwyA///wQP//+n///TEiUbv//yaJXDv86Blf/hB4////ZFQyA8edlAZ///+GD/Itf/6wYfPr//8GC81///+x5MXM////1x4///8MIY///+DBBg///+IMP///zX////M/tcf/lOF8d6//ggZKAyA4jwwv/9P2KyDAj/6fhhZTg3//JojgwWv/4QfHX//fomk///r//Xpf/gwXOygM/X/2P///WdhWf//+GF///wYL///j//////+d+GQH/7/+U4X19v/4IH6f3/9P0CI/7IF//9Pwl+//5NH0mGFw//4QccJRWD//74TWP//4Q//+sf/8GC//9j//9edAyv/hhf//Bgv//iSwMgP///8k4zv/mt///+GP//+///8P///LHf///b9f/+GH///2/C//8MP1//kMNnr//sioZAfwiQ7X//+Em1///pRX/zWx8IJr//9Nf/a+E1/8SqBkB/of//wv//j////////zoGV/8f///////+d+GQH8iRf//CX//0F/8k78Jf/v9Bf/b/CX/3H0F/+/CWVsMEcGcjgo/5DDZ6C4j/9+Ev//6C5iCjQoR//4S8R/+JFQyA/oL///ohlf///////////+eIjjPgwfBg+iOGP//j6H8f/yXMf9GwpJIhspH/5qDHlW/SEhBhBCEF/9PwQP6BAkkv/p+EH+VAoQQQX/0/RPn+ESVhIL/8sP6BA3/CCQS//TZFQyA/pN/wwgggv//+k39hkWpJf/6/Sb9skxhBBFDhf/tf6Lgu/sjHI6gcgx4kMZ/8f//sZEP//tfqaZzvyQjoDAsoR/7Q/Xv44//DC//8f/j+v+d1D/+d+GQH/X/MCEcZ/IMGAg///4TX+OD0Xj///hEx2v5IRhsHPx8wg3//+0mKXxCCBh/pP//94TVekwf63//+4Qr4RQ4U7g/6f/4+416eDf///+18Lh////7DCXhAsL////bS9LBL///+xXhBRBf2v//DC+RByNAL96/+d+GQH8ML4wQWPa///HyQkCEYYS///4wQYr///iUgwwv/+dmYHhv+EGP///zAhHGfBhF4//j/8egg3///yQhSf//LWf49////Kfp/////////z4Mf/878MgP//////8jH/ODa///8KfL/fPojhj/4/6oPzAhHHwwlH///hL8e3TKw/f//6CROH5IRzw9D///+qfx8R///+tX/////pX///+d+GQH///xIMGP////X///////Gfj5tf/j5Uf6/lIDH7a//8jA//+YEI4/+K//4Qf3r8c/Hz+Gv/+n7pV8/Hz/+P//T+8L//////kfv7SCX///kgf//QIP7HX///hB//+m/ar///0Xj//6T+GFBf///CDf/zvwyA//4j//+Ok///9///8RW///////0///9f//HJ7/////74ips////f50DK8RFJP//j7a//Cmf///gwl/5SAwqV2v//f+ahp/MCEcfW71//2q//45w/Xa//96//5/Kz/8MJf/8Owv//H/XDFf/O/DID+I////+GF//////7pR//////7apf//JcX///4pSi//+awX///tQ1CU2f//0//+1bSEaT/+PoP//bShhUFM///r//wwoYhEOVK//+iej//wwaCDSmzrf//0//+GKFJPr//+//+SFCmf/////H8VSvX/+d+GQH/XxH63////DC//XdL//9iv/9tUv/j7X/rxS//9r//lDqF//wwvOgZX3SiI//8qP/21SIT//4/+einBiKX///knGd6mzw1C////+lYiP//yMD//wkZ5G///4IH/+qVwf/878MgP6f/9bsGakRwx//9P//rPgwDDj///JUf//+wbKD//H0CNT9f9ciHO4Mf///6//hBYN///39f71Sw///9fC/tpJBBYX//9r6JjtfilQWCX//2K8Jf4ahBKIIoQ//O/DID/+k2l4iEEgUnX//7XhKPyn0gQTB///DC9Jr8IJApTh//HwYL4TX8gx4IWD//4/CBgv8Z3B///6H8cG///4/kaBjD///yLXmBCOPwv//NUcvC/GSjOeCX//WRAnBfJCOfxBf/9OQQZwvj+gX///wQL/wgv/+gn8IF+uEC//9S4+CBfrwX//p38IL8g8Lv/878MgP//ggXmMcIER5RMD///a/hAvg9Lwg////+gXsHoJikXj/+PsML/Xg301CDf//iv4fsik8IUn//7X7B/O4MzBgVv//tfgw/5TvIRU///DQ+GD/EOQev//8fBg/wuF//534ZAf/DD/CWlnP///4MH8QWgv///+GH6BYSvX///g34IIjrS+v//+H9AhE+Ebwv///B/guOv/j/j4kPPgwdXwv///+2I////zrhh//O/DID/50DK/2/////7f////8OfRHDH//j/zAhHHvH///H48Z+Pn///5IRz///j/4////H/////+fBj///lQP////4IH+P///Cfj///wg////6I6PzAhHGRoGP///BB/jPgx4//zvwyA/pN/Px84uP//6f/5+Pkf//rf/////p/////////nwY////////////865z///////////////4/a//////ev3////9r4iOP//zvwyA/sMJeI///9hpeev//+9eps//+PvXpWP//w4/CRnj//x9Ur/+d+GQH/63////X///////nQMr9f////////71/+P/tpJf/+ahp/il////hqF////Ef////////////////////////////////////8hgcgzj////Ef/////+PndETRf/xHEf///////////////////////////////////yDOOQZxyDOOQZxyDOOQZxyDOOQZxyB4M45BnHIM45BnHIM45BnHIM45BnHIM4/EREREREREREcf///////////////////////8yS4pDphBUeGF9ggXwS9ggrEER4ERExW02ECixUy8GDwMMjOQsEH4gvxDGEF+IYwgvxDHkE4hjiD+QxxDHEMcQx5DHEH8h+IPxCcQvELxE8h+IfiH8gnEL5BOIXiF4g/ELxC+QvEJhCYQvkJ5CcQnkLxC+ROIXiE4hfIfiF4hfIXyJxBOITiH8hPITyJ5CzIXyE8heInkL5C8QTyH8g+EHwg/EF/IJxB/IJxCbVfDX////////////////////////8RCYiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiMyS4IHTRcB0eBhg/OQQiYD8GD+D2KBh2gw4j//////////////////////////////////////+XUf///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8txTjV1YAKZW5kc3RyZWFtCmVuZG9iagp4cmVmCjAgNwowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDc4OTMgMDAwMDAgbiAKMDAwMDAwODA5MiAwMDAwMCBuIAowMDAwMDA4MTQwIDAwMDAwIG4gCjAwMDAwMDgxOTUgMDAwMDAgbiAKMDAwMDAwODQyNCAwMDAwMCBuIAowMDAwMDA4NTQ4IDAwMDAwIG4gCnRyYWlsZXIKPDwKL0lEWzxDQjc5QkRGMUM2RDI5MjRDQTg1MUNCREI5RDk2NDAyNT48NThEQkIyNDNGMEZEQzk0NUJCRUJDMEE4MjFBNTQ5MjM+XQovSW5mbyAxIDAgUgovUm9vdCAyIDAgUgovU2l6ZSA3Cj4+CnN0YXJ0eHJlZgoxNTc4OAolJUVPRgo=</ReturnLabel><PostalRouting>420770739921</PostalRouting><TrackingNumber>9202090140694100000410</TrackingNumber></ExternalReturnLabelResponse>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<ExternalReturnLabelErrorResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
3
|
+
<errors>
|
4
|
+
<ExternalReturnLabelError>
|
5
|
+
<InternalErrorNumber>4001</InternalErrorNumber>
|
6
|
+
<InternalErrorDescription>Authorization
|
7
|
+
error. MID must correspond to MerchantAccountID.</InternalErrorDescription>
|
8
|
+
</ExternalReturnLabelError>
|
9
|
+
</errors>
|
10
|
+
</ExternalReturnLabelErrorResponse>
|
@@ -0,0 +1,140 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RemoteAustraliaPostTest < ActiveSupport::TestCase
|
4
|
+
include ReactiveShipping::Test::Credentials
|
5
|
+
include ReactiveShipping::Test::Fixtures
|
6
|
+
|
7
|
+
def setup
|
8
|
+
@carrier = AustraliaPost.new(credentials(:australia_post))
|
9
|
+
@sydney = location_fixtures[:sydney]
|
10
|
+
@melbourne = location_fixtures[:melbourne]
|
11
|
+
@ottawa = location_fixtures[:ottawa]
|
12
|
+
rescue NoCredentialsFound => e
|
13
|
+
skip(e.message)
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_valid_credentials
|
17
|
+
assert @carrier.valid_credentials?
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_service_domestic_simple_request
|
21
|
+
response = @carrier.find_rates(@sydney, @melbourne, package_fixtures[:wii])
|
22
|
+
|
23
|
+
assert response.is_a?(RateResponse)
|
24
|
+
assert response.success?
|
25
|
+
assert response.rates.any?
|
26
|
+
assert response.rates.first.is_a?(RateEstimate)
|
27
|
+
assert_equal 1, response.params["responses"].size
|
28
|
+
assert_equal 1, response.request.size
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_service_domestic_combined_request
|
32
|
+
response = @carrier.find_rates(@sydney, @melbourne, package_fixtures.values_at(:book, :small_half_pound))
|
33
|
+
|
34
|
+
assert response.is_a?(RateResponse)
|
35
|
+
assert response.success?
|
36
|
+
assert response.rates.any?
|
37
|
+
assert response.rates.first.is_a?(RateEstimate)
|
38
|
+
assert_equal 2, response.params["responses"].size
|
39
|
+
assert_equal 2, response.request.size
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_service_international_simple_request
|
43
|
+
response = @carrier.find_rates(@sydney, @ottawa, package_fixtures[:wii])
|
44
|
+
|
45
|
+
assert response.is_a?(RateResponse)
|
46
|
+
assert response.success?
|
47
|
+
assert response.rates.any?
|
48
|
+
assert response.rates.first.is_a?(RateEstimate)
|
49
|
+
assert_equal 1, response.params["responses"].size
|
50
|
+
assert_equal 1, response.request.size
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_service_domestic_combined_request
|
54
|
+
response = @carrier.find_rates(@sydney, @ottawa, package_fixtures.values_at(:book, :small_half_pound))
|
55
|
+
|
56
|
+
assert response.is_a?(RateResponse)
|
57
|
+
assert response.success?
|
58
|
+
assert response.rates.any?
|
59
|
+
assert response.rates.first.is_a?(RateEstimate)
|
60
|
+
assert_equal 2, response.params["responses"].size
|
61
|
+
assert_equal 2, response.request.size
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_service_domestic_response_error
|
65
|
+
error = assert_raises(ReactiveShipping::ResponseError) do
|
66
|
+
@carrier.find_rates(@sydney, @melbourne, package_fixtures[:largest_gold_bar])
|
67
|
+
end
|
68
|
+
|
69
|
+
assert_equal 'The maximum weight of a parcel is 22 kg.', error.message
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_service_international_response_error
|
73
|
+
error = assert_raises(ReactiveShipping::ResponseError) do
|
74
|
+
@carrier.find_rates(@sydney, @ottawa, package_fixtures[:largest_gold_bar])
|
75
|
+
end
|
76
|
+
|
77
|
+
assert_equal 'The maximum weight of a parcel is 20 kg.', error.message
|
78
|
+
end
|
79
|
+
|
80
|
+
def test_calculate_domestic_simple_request
|
81
|
+
response = @carrier.calculate_rates(@sydney, @melbourne, package_fixtures[:wii], 'AUS_PARCEL_EXPRESS')
|
82
|
+
|
83
|
+
assert response.is_a?(RateResponse)
|
84
|
+
assert response.success?
|
85
|
+
assert response.rates.any?
|
86
|
+
assert response.rates.first.is_a?(RateEstimate)
|
87
|
+
assert_equal 1, response.params["responses"].size
|
88
|
+
assert_equal 1, response.request.size
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_calculate_domestic_combined_request
|
92
|
+
response = @carrier.calculate_rates(@sydney, @melbourne, package_fixtures.values_at(:book, :small_half_pound), 'AUS_PARCEL_EXPRESS')
|
93
|
+
|
94
|
+
assert response.is_a?(RateResponse)
|
95
|
+
assert response.success?
|
96
|
+
assert response.rates.any?
|
97
|
+
assert response.rates.first.is_a?(RateEstimate)
|
98
|
+
assert_equal 2, response.params["responses"].size
|
99
|
+
assert_equal 2, response.request.size
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_calculate_international_simple_request
|
103
|
+
response = @carrier.calculate_rates(@sydney, @ottawa, package_fixtures[:wii], 'INT_PARCEL_COR_OWN_PACKAGING')
|
104
|
+
|
105
|
+
assert response.is_a?(RateResponse)
|
106
|
+
assert response.success?
|
107
|
+
assert response.rates.any?
|
108
|
+
assert response.rates.first.is_a?(RateEstimate)
|
109
|
+
assert_equal 1, response.params["responses"].size
|
110
|
+
assert_equal 1, response.request.size
|
111
|
+
end
|
112
|
+
|
113
|
+
def test_calculate_domestic_combined_request
|
114
|
+
response = @carrier.calculate_rates(@sydney, @ottawa, package_fixtures.values_at(:book, :small_half_pound), 'INT_PARCEL_COR_OWN_PACKAGING')
|
115
|
+
|
116
|
+
assert response.is_a?(RateResponse)
|
117
|
+
assert response.success?
|
118
|
+
assert response.rates.any?
|
119
|
+
assert response.rates.first.is_a?(RateEstimate)
|
120
|
+
assert_equal 2, response.params["responses"].size
|
121
|
+
assert_equal 2, response.request.size
|
122
|
+
end
|
123
|
+
|
124
|
+
def test_calculate_domestic_response_error
|
125
|
+
error = assert_raises(ReactiveShipping::ResponseError) do
|
126
|
+
@carrier.calculate_rates(@sydney, @melbourne, package_fixtures[:wii], 'INT_PARCEL_COR_OWN_PACKAGING')
|
127
|
+
end
|
128
|
+
|
129
|
+
assert_equal 'Please enter a valid Service code.', error.message
|
130
|
+
end
|
131
|
+
|
132
|
+
def test_calculate_international_response_error
|
133
|
+
error = assert_raises(ReactiveShipping::ResponseError) do
|
134
|
+
@carrier.calculate_rates(@sydney, @ottawa, package_fixtures[:wii], 'AUS_PARCEL_EXPRESS')
|
135
|
+
end
|
136
|
+
|
137
|
+
assert_equal 'Please enter a valid Service code.', error.message
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
@@ -0,0 +1,259 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
# All remote tests require Canada Post development environment credentials
|
4
|
+
class RemoteCanadaPostPWSPlatformTest < ActiveSupport::TestCase
|
5
|
+
include ReactiveShipping::Test::Credentials
|
6
|
+
include ReactiveShipping::Test::Fixtures
|
7
|
+
|
8
|
+
def setup
|
9
|
+
@login = credentials(:canada_post_pws_platform).merge(endpoint: "https://ct.soa-gw.canadapost.ca/")
|
10
|
+
|
11
|
+
# 100 grams, 93 cm long, 10 cm diameter, cylinders have different volume calculations
|
12
|
+
# @pkg1 = Package.new(1000, [93,10], :value => 10.00)
|
13
|
+
@pkg1 = Package.new(10, nil, :value => 10.00)
|
14
|
+
@pkg2 = Package.new(10, [20.0, 10.0, 1.0], :value => 10.00)
|
15
|
+
|
16
|
+
@line_item1 = line_item_fixture
|
17
|
+
|
18
|
+
@shipping_opts1 = {:dc => true, :cod => true, :cod_amount => 500.00, :cov => true, :cov_amount => 100.00,
|
19
|
+
:so => true, :pa18 => true}
|
20
|
+
|
21
|
+
@home_params = {
|
22
|
+
:name => "John Smith",
|
23
|
+
:company => "test",
|
24
|
+
:phone => "613-555-1212",
|
25
|
+
:address1 => "123 Elm St.",
|
26
|
+
:city => 'Ottawa',
|
27
|
+
:province => 'ON',
|
28
|
+
:country => 'CA',
|
29
|
+
:postal_code => 'K1P 1J1'
|
30
|
+
}
|
31
|
+
@home = Location.new(@home_params)
|
32
|
+
|
33
|
+
@dom_params = {
|
34
|
+
:name => "John Smith Sr.",
|
35
|
+
:company => "",
|
36
|
+
:phone => '123-123-1234',
|
37
|
+
:address1 => "5500 Oak Ave",
|
38
|
+
:city => 'Vancouver',
|
39
|
+
:province => 'BC',
|
40
|
+
:country => 'CA',
|
41
|
+
:postal_code => 'V5J 2T4'
|
42
|
+
}
|
43
|
+
|
44
|
+
@dest_params = {
|
45
|
+
:name => "Frank White",
|
46
|
+
:phone => '123-123-1234',
|
47
|
+
:address1 => '999 Wiltshire Blvd',
|
48
|
+
:city => 'Beverly Hills',
|
49
|
+
:state => 'CA',
|
50
|
+
:country => 'US',
|
51
|
+
:zip => '90210'
|
52
|
+
}
|
53
|
+
@dest = Location.new(@dest_params)
|
54
|
+
|
55
|
+
@dom_params = {
|
56
|
+
:name => "Mrs. Smith",
|
57
|
+
:company => "",
|
58
|
+
:phone => "604-555-1212",
|
59
|
+
:address1 => "5000 Oak St.",
|
60
|
+
:address2 => "",
|
61
|
+
:city => 'Vancouver',
|
62
|
+
:province => 'BC',
|
63
|
+
:country => 'CA',
|
64
|
+
:postal_code => 'V5J 2N2'
|
65
|
+
}
|
66
|
+
|
67
|
+
@intl_params = {
|
68
|
+
:name => "Mrs. Yamamoto",
|
69
|
+
:company => "",
|
70
|
+
:phone => "011-123-123-1234",
|
71
|
+
:address1 => "123 Yokohama Road",
|
72
|
+
:address2 => "",
|
73
|
+
:city => 'Tokyo',
|
74
|
+
:province => '',
|
75
|
+
:country => 'JP'
|
76
|
+
}
|
77
|
+
|
78
|
+
@usa_params = {
|
79
|
+
:name => "John Smith",
|
80
|
+
:company => "",
|
81
|
+
:phone => "555-555-5555",
|
82
|
+
:address1 => "123 Fake Street",
|
83
|
+
:address2 => "",
|
84
|
+
:city => 'New York',
|
85
|
+
:province => 'NY',
|
86
|
+
:country => 'US',
|
87
|
+
:zip => '12345'
|
88
|
+
}
|
89
|
+
|
90
|
+
@cp = CanadaPostPWS.new(@login)
|
91
|
+
@cp.logger = Logger.new(StringIO.new)
|
92
|
+
|
93
|
+
rescue NoCredentialsFound => e
|
94
|
+
skip(e.message)
|
95
|
+
end
|
96
|
+
|
97
|
+
def build_options
|
98
|
+
{ :customer_number => @login[:customer_number] }
|
99
|
+
end
|
100
|
+
|
101
|
+
def test_rates
|
102
|
+
rate_response = @cp.find_rates(@home_params, @dom_params, [@pkg1], build_options)
|
103
|
+
assert_kind_of ReactiveShipping::RateResponse, rate_response
|
104
|
+
assert_kind_of ReactiveShipping::RateEstimate, rate_response.rates.first
|
105
|
+
end
|
106
|
+
|
107
|
+
def test_rates_with_insurance_changes_price
|
108
|
+
rates = @cp.find_rates(@home_params, @dom_params, [@pkg1], build_options)
|
109
|
+
insured_rates = @cp.find_rates(@home_params, @dom_params, [@pkg1], build_options.merge(@shipping_opts1))
|
110
|
+
refute_equal rates.rates.first.price, insured_rates.rates.first.price
|
111
|
+
end
|
112
|
+
|
113
|
+
def test_rates_with_invalid_customer_raises_exception
|
114
|
+
opts = {:customer_number => "0000000000", :service => "DOM.XP"}
|
115
|
+
assert_raises(ResponseError) do
|
116
|
+
@cp.find_rates(@home_params, @dom_params, [@pkg1], opts)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_rates_USA_returns_small_packet_rates
|
121
|
+
rates = @cp.find_rates(@home_params, @usa_params, [@pkg1], build_options, @pkg2, ['USA.SP.AIR'])
|
122
|
+
assert_equal CPPWSRateResponse, rates.class
|
123
|
+
assert_equal RateEstimate, rates.rates.first.class
|
124
|
+
assert rates.rates.map(&:service_code).include? "USA.SP.AIR"
|
125
|
+
end
|
126
|
+
|
127
|
+
def test_tracking
|
128
|
+
pin = "1371134583769923" # valid pin
|
129
|
+
response = @cp.find_tracking_info(pin, build_options)
|
130
|
+
assert_equal 'Xpresspost', response.service_name
|
131
|
+
assert response.expected_date.is_a?(Date)
|
132
|
+
assert response.customer_number
|
133
|
+
assert_equal 13, response.shipment_events.count
|
134
|
+
end
|
135
|
+
|
136
|
+
def test_tracking_invalid_pin_raises_exception
|
137
|
+
pin = "000000000000000"
|
138
|
+
exception = assert_raises(ResponseError) do
|
139
|
+
@cp.find_tracking_info(pin, build_options)
|
140
|
+
end
|
141
|
+
assert_equal "No Tracking", exception.message
|
142
|
+
end
|
143
|
+
|
144
|
+
def test_create_shipment_with_invalid_customer_raises_exception
|
145
|
+
opts = {:customer_number => "0000000000", :service => "DOM.XP"}
|
146
|
+
assert_raises(ResponseError) do
|
147
|
+
@cp.create_shipment(@home_params, @dom_params, @pkg1, @line_item1, opts)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
def test_register_merchant
|
152
|
+
response = @cp.register_merchant
|
153
|
+
assert response.is_a?(CPPWSRegisterResponse)
|
154
|
+
assert_match /^(\d|[a-f]){22}$/, response.token_id
|
155
|
+
end
|
156
|
+
|
157
|
+
def test_merchant_details_empty_details
|
158
|
+
register_response = @cp.register_merchant
|
159
|
+
details_response = @cp.retrieve_merchant_details(:token_id => register_response.token_id)
|
160
|
+
assert_kind_of ReactiveShipping::CPPWSMerchantDetailsResponse, details_response
|
161
|
+
|
162
|
+
assert_equal '0000000000', details_response.customer_number
|
163
|
+
assert_equal '1234567890', details_response.contract_number
|
164
|
+
assert_equal '0000000000000000', details_response.username
|
165
|
+
assert_equal '1a2b3c4d5e6f7a8b9c0d12', details_response.password
|
166
|
+
end
|
167
|
+
|
168
|
+
def test_find_services_no_country
|
169
|
+
response = @cp.find_services(nil, build_options)
|
170
|
+
assert response
|
171
|
+
end
|
172
|
+
|
173
|
+
def test_find_services_country_JP
|
174
|
+
response = @cp.find_services('JP', build_options)
|
175
|
+
assert response
|
176
|
+
end
|
177
|
+
|
178
|
+
def test_find_services_invalid_country
|
179
|
+
exception = assert_raises(ResponseError) do
|
180
|
+
@cp.find_services('XX', build_options)
|
181
|
+
end
|
182
|
+
assert_equal "A valid destination country must be supplied.", exception.message
|
183
|
+
end
|
184
|
+
|
185
|
+
def test_find_service_options_no_country
|
186
|
+
assert response = @cp.find_service_options("INT.XP", nil, build_options)
|
187
|
+
assert_equal "INT.XP", response[:service_code]
|
188
|
+
assert_equal "Xpresspost International", response[:service_name]
|
189
|
+
assert_equal 5, response[:options].size
|
190
|
+
assert_equal "COV", response[:options][0][:code]
|
191
|
+
assert_equal false, response[:options][0][:required]
|
192
|
+
assert_equal true, response[:options][0][:qualifier_required]
|
193
|
+
assert_equal 5000, response[:options][0][:qualifier_max]
|
194
|
+
assert_equal 0, response[:restrictions][:min_weight]
|
195
|
+
assert_equal 30000, response[:restrictions][:max_weight]
|
196
|
+
assert_equal 0.1, response[:restrictions][:min_length]
|
197
|
+
assert_equal 150, response[:restrictions][:max_length]
|
198
|
+
assert_equal 0.1, response[:restrictions][:min_height]
|
199
|
+
assert_equal 150, response[:restrictions][:max_height]
|
200
|
+
assert_equal 0.1, response[:restrictions][:min_width]
|
201
|
+
assert_equal 150, response[:restrictions][:max_width]
|
202
|
+
end
|
203
|
+
|
204
|
+
def test_find_service_options
|
205
|
+
assert response = @cp.find_service_options("INT.XP", "JP", build_options)
|
206
|
+
assert_equal "INT.XP", response[:service_code]
|
207
|
+
assert_equal "Xpresspost International", response[:service_name]
|
208
|
+
assert_equal 4, response[:options].size
|
209
|
+
assert_equal "COV", response[:options][0][:code]
|
210
|
+
assert_equal false, response[:options][0][:required]
|
211
|
+
assert_equal true, response[:options][0][:qualifier_required]
|
212
|
+
assert_equal 1000, response[:options][0][:qualifier_max]
|
213
|
+
assert_equal 0, response[:restrictions][:min_weight]
|
214
|
+
assert_equal 30000, response[:restrictions][:max_weight]
|
215
|
+
assert_equal 0.1, response[:restrictions][:min_length]
|
216
|
+
assert_equal 150, response[:restrictions][:max_length]
|
217
|
+
assert_equal 0.1, response[:restrictions][:min_height]
|
218
|
+
assert_equal 150, response[:restrictions][:max_height]
|
219
|
+
assert_equal 0.1, response[:restrictions][:min_width]
|
220
|
+
assert_equal 150, response[:restrictions][:max_width]
|
221
|
+
end
|
222
|
+
|
223
|
+
def test_find_option_details
|
224
|
+
assert response = @cp.find_option_details("SO", build_options)
|
225
|
+
assert_equal "SO", response[:code]
|
226
|
+
assert_equal "Signature option", response[:name]
|
227
|
+
assert_equal "FEAT", response[:class]
|
228
|
+
assert_equal true, response[:prints_on_label]
|
229
|
+
assert_equal false, response[:qualifier_required]
|
230
|
+
assert_equal 1, response[:conflicting_options].size
|
231
|
+
assert_equal "LAD", response[:conflicting_options][0]
|
232
|
+
assert_equal 1, response[:prerequisite_options].size
|
233
|
+
assert_equal "DC", response[:prerequisite_options][0]
|
234
|
+
end
|
235
|
+
|
236
|
+
def test_find_option_details_french
|
237
|
+
cp = CanadaPostPWS.new(@login.merge(:language => 'fr'))
|
238
|
+
assert response = cp.find_option_details("LAD", build_options)
|
239
|
+
assert_equal "LAD", response[:code]
|
240
|
+
assert_equal "Laisser à la porte (pas d'avis)", response[:name]
|
241
|
+
end
|
242
|
+
|
243
|
+
def test_register_merchant
|
244
|
+
response = @cp.register_merchant
|
245
|
+
assert response.is_a?(CPPWSRegisterResponse)
|
246
|
+
assert_equal "1111111111111111111111", response.token_id
|
247
|
+
end
|
248
|
+
|
249
|
+
def test_merchant_details
|
250
|
+
token_id = "1111111111111111111111"
|
251
|
+
response = @cp.retrieve_merchant_details(:token_id => token_id)
|
252
|
+
assert response.is_a?(CPPWSMerchantDetailsResponse)
|
253
|
+
assert_equal "0000000000", response.customer_number
|
254
|
+
assert_equal "1234567890", response.contract_number
|
255
|
+
assert_equal "0000000000000000", response.username
|
256
|
+
assert_equal "1a2b3c4d5e6f7a8b9c0d12", response.password
|
257
|
+
assert_equal true, response.has_default_credit_card
|
258
|
+
end
|
259
|
+
end
|