reactive_shipping 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.travis.yml +33 -0
  4. data/.yardopts +13 -0
  5. data/CHANGELOG.md +225 -0
  6. data/CONTRIBUTING.md +23 -0
  7. data/Gemfile +3 -0
  8. data/MIT-LICENSE +21 -0
  9. data/README.md +158 -0
  10. data/Rakefile +35 -0
  11. data/dev.yml +17 -0
  12. data/gemfiles/activesupport42.gemfile +5 -0
  13. data/gemfiles/activesupport50.gemfile +6 -0
  14. data/gemfiles/activesupport51.gemfile +5 -0
  15. data/gemfiles/activesupport52.gemfile +5 -0
  16. data/gemfiles/activesupport_master.gemfile +5 -0
  17. data/lib/certs/eParcel.dtd +111 -0
  18. data/lib/reactive_shipping.rb +26 -0
  19. data/lib/reactive_shipping/address_validation_response.rb +30 -0
  20. data/lib/reactive_shipping/carrier.rb +184 -0
  21. data/lib/reactive_shipping/carriers.rb +35 -0
  22. data/lib/reactive_shipping/carriers/australia_post.rb +248 -0
  23. data/lib/reactive_shipping/carriers/benchmark_carrier.rb +31 -0
  24. data/lib/reactive_shipping/carriers/bogus_carrier.rb +12 -0
  25. data/lib/reactive_shipping/carriers/canada_post.rb +263 -0
  26. data/lib/reactive_shipping/carriers/canada_post_pws.rb +908 -0
  27. data/lib/reactive_shipping/carriers/fedex.rb +797 -0
  28. data/lib/reactive_shipping/carriers/kunaki.rb +155 -0
  29. data/lib/reactive_shipping/carriers/new_zealand_post.rb +260 -0
  30. data/lib/reactive_shipping/carriers/shipwire.rb +178 -0
  31. data/lib/reactive_shipping/carriers/stamps.rb +860 -0
  32. data/lib/reactive_shipping/carriers/ups.rb +1060 -0
  33. data/lib/reactive_shipping/carriers/usps.rb +708 -0
  34. data/lib/reactive_shipping/carriers/usps_returns.rb +86 -0
  35. data/lib/reactive_shipping/delivery_date_estimate.rb +20 -0
  36. data/lib/reactive_shipping/delivery_date_estimates_response.rb +11 -0
  37. data/lib/reactive_shipping/errors.rb +35 -0
  38. data/lib/reactive_shipping/external_return_label_request.rb +417 -0
  39. data/lib/reactive_shipping/external_return_label_response.rb +26 -0
  40. data/lib/reactive_shipping/label.rb +10 -0
  41. data/lib/reactive_shipping/label_response.rb +10 -0
  42. data/lib/reactive_shipping/location.rb +166 -0
  43. data/lib/reactive_shipping/package.rb +165 -0
  44. data/lib/reactive_shipping/package_item.rb +60 -0
  45. data/lib/reactive_shipping/rate_estimate.rb +197 -0
  46. data/lib/reactive_shipping/rate_response.rb +33 -0
  47. data/lib/reactive_shipping/response.rb +44 -0
  48. data/lib/reactive_shipping/shipment_event.rb +22 -0
  49. data/lib/reactive_shipping/shipment_packer.rb +108 -0
  50. data/lib/reactive_shipping/shipping_response.rb +34 -0
  51. data/lib/reactive_shipping/tracking_response.rb +120 -0
  52. data/lib/reactive_shipping/version.rb +3 -0
  53. data/reactive_shipping.gemspec +38 -0
  54. data/shipit.rubygems.yml +1 -0
  55. data/test/console.rb +39 -0
  56. data/test/credentials.yml +76 -0
  57. data/test/fixtures/files/label1.pdf +0 -0
  58. data/test/fixtures/files/ups-shipping-label.gif +0 -0
  59. data/test/fixtures/json/australia_post/calculate_domestic.json +13 -0
  60. data/test/fixtures/json/australia_post/calculate_domestic_2.json +19 -0
  61. data/test/fixtures/json/australia_post/calculate_international.json +12 -0
  62. data/test/fixtures/json/australia_post/calculate_international_2.json +15 -0
  63. data/test/fixtures/json/australia_post/error_message.json +5 -0
  64. data/test/fixtures/json/australia_post/service_domestic.json +117 -0
  65. data/test/fixtures/json/australia_post/service_domestic_2.json +117 -0
  66. data/test/fixtures/json/australia_post/service_international.json +76 -0
  67. data/test/fixtures/json/australia_post/service_international_2.json +59 -0
  68. data/test/fixtures/json/newzealandpost/domestic_book.json +1 -0
  69. data/test/fixtures/json/newzealandpost/domestic_default.json +1 -0
  70. data/test/fixtures/json/newzealandpost/domestic_error.json +1 -0
  71. data/test/fixtures/json/newzealandpost/domestic_poster.json +1 -0
  72. data/test/fixtures/json/newzealandpost/domestic_small_half_pound.json +1 -0
  73. data/test/fixtures/json/newzealandpost/international_book.json +1 -0
  74. data/test/fixtures/json/newzealandpost/international_new_zealand_wii.json +1 -0
  75. data/test/fixtures/json/newzealandpost/international_small_half_pound.json +1 -0
  76. data/test/fixtures/json/newzealandpost/international_wii.json +1 -0
  77. data/test/fixtures/xml/canadapost/example_request.xml +25 -0
  78. data/test/fixtures/xml/canadapost/example_response.xml +130 -0
  79. data/test/fixtures/xml/canadapost/example_response_error.xml +16 -0
  80. data/test/fixtures/xml/canadapost/example_response_french.xml +122 -0
  81. data/test/fixtures/xml/canadapost/example_response_with_nil_value.xml +164 -0
  82. data/test/fixtures/xml/canadapost/example_response_with_postal_outlet.xml +155 -0
  83. data/test/fixtures/xml/canadapost/example_response_with_postal_outlet_french.xml +274 -0
  84. data/test/fixtures/xml/canadapost/example_response_with_strange_delivery_date.xml +130 -0
  85. data/test/fixtures/xml/canadapost_pws/dnc_tracking_details_en.xml +112 -0
  86. data/test/fixtures/xml/canadapost_pws/merchant_details_error.xml +7 -0
  87. data/test/fixtures/xml/canadapost_pws/merchant_details_response.xml +7 -0
  88. data/test/fixtures/xml/canadapost_pws/option_response.xml +13 -0
  89. data/test/fixtures/xml/canadapost_pws/option_response_no_conflicts.xml +7 -0
  90. data/test/fixtures/xml/canadapost_pws/rates_info.xml +190 -0
  91. data/test/fixtures/xml/canadapost_pws/rates_info_error.xml +7 -0
  92. data/test/fixtures/xml/canadapost_pws/receipt_response.xml +42 -0
  93. data/test/fixtures/xml/canadapost_pws/receipt_response_no_priced_options.xml +36 -0
  94. data/test/fixtures/xml/canadapost_pws/register_token_error.xml +7 -0
  95. data/test/fixtures/xml/canadapost_pws/register_token_response.xml +3 -0
  96. data/test/fixtures/xml/canadapost_pws/service_options_response.xml +42 -0
  97. data/test/fixtures/xml/canadapost_pws/services_error.xml +6 -0
  98. data/test/fixtures/xml/canadapost_pws/services_response.xml +32 -0
  99. data/test/fixtures/xml/canadapost_pws/shipment_domestic.xml +69 -0
  100. data/test/fixtures/xml/canadapost_pws/shipment_response.xml +20 -0
  101. data/test/fixtures/xml/canadapost_pws/shipment_us.xml +69 -0
  102. data/test/fixtures/xml/canadapost_pws/tracking_details_en.xml +152 -0
  103. data/test/fixtures/xml/canadapost_pws/tracking_details_en_error.xml +7 -0
  104. data/test/fixtures/xml/canadapost_pws/tracking_details_en_undelivered.xml +116 -0
  105. data/test/fixtures/xml/canadapost_pws/tracking_details_fr.xml +156 -0
  106. data/test/fixtures/xml/canadapost_pws/tracking_details_no_expected_delivery_date.xml +40 -0
  107. data/test/fixtures/xml/fedex/create_shipment_response.xml +2 -0
  108. data/test/fixtures/xml/fedex/freight_rate_request.xml +82 -0
  109. data/test/fixtures/xml/fedex/freight_rate_response.xml +506 -0
  110. data/test/fixtures/xml/fedex/invalid_fedex_reply.xml +27 -0
  111. data/test/fixtures/xml/fedex/ottawa_to_beverly_hills_commercial_rate_request.xml +79 -0
  112. data/test/fixtures/xml/fedex/ottawa_to_beverly_hills_no_saturday_rate_request.xml +79 -0
  113. data/test/fixtures/xml/fedex/ottawa_to_beverly_hills_rate_request.xml +80 -0
  114. data/test/fixtures/xml/fedex/ottawa_to_beverly_hills_rate_response.xml +214 -0
  115. data/test/fixtures/xml/fedex/raterequest_reply.xml +213 -0
  116. data/test/fixtures/xml/fedex/raterequest_response_with_ground_home_delivery.xml +206 -0
  117. data/test/fixtures/xml/fedex/reply_without_notifications.xml +185 -0
  118. data/test/fixtures/xml/fedex/tracking_request.xml +29 -0
  119. data/test/fixtures/xml/fedex/tracking_response_bad_tracking_number.xml +20 -0
  120. data/test/fixtures/xml/fedex/tracking_response_delivered_at_door.xml +254 -0
  121. data/test/fixtures/xml/fedex/tracking_response_delivered_at_facility.xml +403 -0
  122. data/test/fixtures/xml/fedex/tracking_response_delivered_with_signature.xml +269 -0
  123. data/test/fixtures/xml/fedex/tracking_response_empty_status_detail.xml +84 -0
  124. data/test/fixtures/xml/fedex/tracking_response_failure_code_9045.xml +52 -0
  125. data/test/fixtures/xml/fedex/tracking_response_failure_code_9080.xml +51 -0
  126. data/test/fixtures/xml/fedex/tracking_response_in_transit.xml +127 -0
  127. data/test/fixtures/xml/fedex/tracking_response_invalid_tracking_number.xml +52 -0
  128. data/test/fixtures/xml/fedex/tracking_response_missing_status_code.xml +89 -0
  129. data/test/fixtures/xml/fedex/tracking_response_multiple_results.xml +100 -0
  130. data/test/fixtures/xml/fedex/tracking_response_not_found.xml +52 -0
  131. data/test/fixtures/xml/fedex/tracking_response_shipment_exception.xml +209 -0
  132. data/test/fixtures/xml/fedex/tracking_response_unable_to_process.xml +32 -0
  133. data/test/fixtures/xml/fedex/tracking_response_with_blank_state.xml +107 -0
  134. data/test/fixtures/xml/fedex/unknown_fedex_document_reply.xml +3 -0
  135. data/test/fixtures/xml/kunaki/invalid_state_response.xml +3 -0
  136. data/test/fixtures/xml/kunaki/no_valid_items_response.xml +3 -0
  137. data/test/fixtures/xml/kunaki/successful_rates_response.xml +3 -0
  138. data/test/fixtures/xml/kunaki/unsuccessful_rates_response.xml +9 -0
  139. data/test/fixtures/xml/shipwire/international_rates_response.xml +17 -0
  140. data/test/fixtures/xml/shipwire/new_carrier_rate_response.xml +18 -0
  141. data/test/fixtures/xml/shipwire/no_rates_response.xml +7 -0
  142. data/test/fixtures/xml/shipwire/rates_response.xml +36 -0
  143. data/test/fixtures/xml/shipwire/rates_response_no_estimate.xml +14 -0
  144. data/test/fixtures/xml/stamps/authenticate_user_request.xml +15 -0
  145. data/test/fixtures/xml/stamps/authenticate_user_response.xml +10 -0
  146. data/test/fixtures/xml/stamps/cleanse_address_request.xml +19 -0
  147. data/test/fixtures/xml/stamps/cleanse_address_response.xml +27 -0
  148. data/test/fixtures/xml/stamps/create_indicium_request.xml +69 -0
  149. data/test/fixtures/xml/stamps/create_indicium_response.xml +40 -0
  150. data/test/fixtures/xml/stamps/expired_authenticator_response.xml +15 -0
  151. data/test/fixtures/xml/stamps/get_account_info_request.xml +11 -0
  152. data/test/fixtures/xml/stamps/get_account_info_response.xml +36 -0
  153. data/test/fixtures/xml/stamps/get_purchase_status_request.xml +12 -0
  154. data/test/fixtures/xml/stamps/get_purchase_status_response.xml +16 -0
  155. data/test/fixtures/xml/stamps/get_rates_request.xml +19 -0
  156. data/test/fixtures/xml/stamps/get_rates_response.xml +351 -0
  157. data/test/fixtures/xml/stamps/purchase_postage_request.xml +13 -0
  158. data/test/fixtures/xml/stamps/purchase_postage_response.xml +17 -0
  159. data/test/fixtures/xml/stamps/track_shipment_request.xml +12 -0
  160. data/test/fixtures/xml/stamps/track_shipment_response.xml +45 -0
  161. data/test/fixtures/xml/ups/access_request.xml +6 -0
  162. data/test/fixtures/xml/ups/delivered_shipment_with_refund.xml +290 -0
  163. data/test/fixtures/xml/ups/delivered_shipment_without_events_tracking_response.xml +62 -0
  164. data/test/fixtures/xml/ups/delivery_dates_response.xml +140 -0
  165. data/test/fixtures/xml/ups/example_tracking_response.xml +53 -0
  166. data/test/fixtures/xml/ups/in_transit_shipment.xml +183 -0
  167. data/test/fixtures/xml/ups/out_for_delivery_shipment.xml +165 -0
  168. data/test/fixtures/xml/ups/package_exceeds_maximum_length.xml +12 -0
  169. data/test/fixtures/xml/ups/rate_single_service.xml +54 -0
  170. data/test/fixtures/xml/ups/rescheduled_shipment.xml +204 -0
  171. data/test/fixtures/xml/ups/shipment_accept_response.xml +42 -0
  172. data/test/fixtures/xml/ups/shipment_confirm_response.xml +33 -0
  173. data/test/fixtures/xml/ups/shipment_from_tiger_direct.xml +222 -0
  174. data/test/fixtures/xml/ups/test_real_home_as_residential_destination_response.xml +290 -0
  175. data/test/fixtures/xml/ups/test_real_home_as_residential_destination_response_with_insured.xml +289 -0
  176. data/test/fixtures/xml/ups/test_real_home_as_residential_destination_with_origin_account_response.xml +311 -0
  177. data/test/fixtures/xml/ups/tracking_request.xml +9 -0
  178. data/test/fixtures/xml/ups/triple_accept_response.xml +72 -0
  179. data/test/fixtures/xml/ups/triple_confirm_response.xml +32 -0
  180. data/test/fixtures/xml/ups/void_shipment_response.xml +11 -0
  181. data/test/fixtures/xml/usps/api_error_rate_response.xml +53 -0
  182. data/test/fixtures/xml/usps/beverly_hills_to_new_york_book_commercial_base_rate_response.xml +2 -0
  183. data/test/fixtures/xml/usps/beverly_hills_to_new_york_book_commercial_plus_rate_response.xml +258 -0
  184. data/test/fixtures/xml/usps/beverly_hills_to_new_york_book_rate_response.xml +108 -0
  185. data/test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_commercial_base_rate_response.xml +84 -0
  186. data/test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_commercial_plus_rate_response.xml +212 -0
  187. data/test/fixtures/xml/usps/beverly_hills_to_ottawa_american_wii_rate_response.xml +230 -0
  188. data/test/fixtures/xml/usps/first_class_packages_with_invalid_mail_type_response.xml +12 -0
  189. data/test/fixtures/xml/usps/first_class_packages_with_mail_type_response.xml +16 -0
  190. data/test/fixtures/xml/usps/first_class_packages_without_mail_type_response.xml +12 -0
  191. data/test/fixtures/xml/usps/invalid_xml_response.xml +10 -0
  192. data/test/fixtures/xml/usps/invalid_xml_tracking_response_error.xml +2 -0
  193. data/test/fixtures/xml/usps/tracking_request.xml +10 -0
  194. data/test/fixtures/xml/usps/tracking_request_batch.xml +12 -0
  195. data/test/fixtures/xml/usps/tracking_response.xml +162 -0
  196. data/test/fixtures/xml/usps/tracking_response_alt.xml +53 -0
  197. data/test/fixtures/xml/usps/tracking_response_batch.xml +231 -0
  198. data/test/fixtures/xml/usps/tracking_response_failure.xml +11 -0
  199. data/test/fixtures/xml/usps/tracking_response_not_available.xml +12 -0
  200. data/test/fixtures/xml/usps/tracking_response_test_error.xml +8 -0
  201. data/test/fixtures/xml/usps/us_rate_request.xml +18 -0
  202. data/test/fixtures/xml/usps/us_rate_request_large.xml +18 -0
  203. data/test/fixtures/xml/usps/world_rate_request_only_country.xml +22 -0
  204. data/test/fixtures/xml/usps/world_rate_request_with_value.xml +24 -0
  205. data/test/fixtures/xml/usps/world_rate_request_without_value.xml +24 -0
  206. data/test/fixtures/xml/usps_returns/external_return_label_response.xml +2 -0
  207. data/test/fixtures/xml/usps_returns/external_return_label_response_failure.xml +10 -0
  208. data/test/remote/australia_post_test.rb +140 -0
  209. data/test/remote/canada_post_pws_platform_test.rb +259 -0
  210. data/test/remote/canada_post_pws_test.rb +169 -0
  211. data/test/remote/canada_post_test.rb +55 -0
  212. data/test/remote/fedex_test.rb +400 -0
  213. data/test/remote/kunaki_test.rb +37 -0
  214. data/test/remote/new_zealand_post_test.rb +149 -0
  215. data/test/remote/shipwire_test.rb +84 -0
  216. data/test/remote/stamps_test.rb +396 -0
  217. data/test/remote/usps_returns_test.rb +72 -0
  218. data/test/remote/usps_test.rb +243 -0
  219. data/test/test_helper.rb +296 -0
  220. data/test/unit/carrier_test.rb +130 -0
  221. data/test/unit/carriers/australia_post_test.rb +181 -0
  222. data/test/unit/carriers/benchmark_test.rb +18 -0
  223. data/test/unit/carriers/canada_post_pws_rating_test.rb +379 -0
  224. data/test/unit/carriers/canada_post_pws_register_test.rb +76 -0
  225. data/test/unit/carriers/canada_post_pws_shipping_test.rb +258 -0
  226. data/test/unit/carriers/canada_post_pws_test.rb +59 -0
  227. data/test/unit/carriers/canada_post_pws_tracking_test.rb +154 -0
  228. data/test/unit/carriers/canada_post_test.rb +148 -0
  229. data/test/unit/carriers/fedex_test.rb +693 -0
  230. data/test/unit/carriers/kunaki_test.rb +56 -0
  231. data/test/unit/carriers/new_zealand_post_test.rb +177 -0
  232. data/test/unit/carriers/shipwire_test.rb +188 -0
  233. data/test/unit/carriers/stamps_test.rb +245 -0
  234. data/test/unit/carriers/ups_test.rb +580 -0
  235. data/test/unit/carriers/usps_returns_test.rb +45 -0
  236. data/test/unit/carriers/usps_test.rb +633 -0
  237. data/test/unit/carriers_test.rb +16 -0
  238. data/test/unit/external_return_label_request_test.rb +258 -0
  239. data/test/unit/location_test.rb +234 -0
  240. data/test/unit/package_item_test.rb +232 -0
  241. data/test/unit/package_test.rb +404 -0
  242. data/test/unit/rate_estimate_test.rb +93 -0
  243. data/test/unit/response_test.rb +38 -0
  244. data/test/unit/shipment_event_test.rb +20 -0
  245. data/test/unit/shipment_packer_test.rb +212 -0
  246. data/test/unit/tracking_response_test.rb +41 -0
  247. metadata +684 -0
@@ -0,0 +1,155 @@
1
+ <?xml version="1.0"?>
2
+ <eparcel>
3
+ <ratesAndServicesResponse>
4
+ <statusCode>1</statusCode>
5
+ <statusMessage>OK</statusMessage>
6
+ <requestID>7251987</requestID>
7
+ <handling>3.0</handling>
8
+ <language>0</language>
9
+ <product id="1040" sequence="1">
10
+ <name>Priority Courier</name>
11
+ <rate>20.17</rate>
12
+ <shippingDate>2010-08-16</shippingDate>
13
+ <deliveryDate>2010-08-17</deliveryDate>
14
+ <deliveryDayOfWeek>3</deliveryDayOfWeek>
15
+ <nextDayAM>true</nextDayAM>
16
+ <packingID>P_0</packingID>
17
+ </product>
18
+ <product id="1020" sequence="2">
19
+ <name>Expedited</name>
20
+ <rate>9.2</rate>
21
+ <shippingDate>2010-08-16</shippingDate>
22
+ <deliveryDate>2010-08-17</deliveryDate>
23
+ <deliveryDayOfWeek>3</deliveryDayOfWeek>
24
+ <nextDayAM>false</nextDayAM>
25
+ <packingID>P_0</packingID>
26
+ </product>
27
+ <product id="1010" sequence="3">
28
+ <name>Regular</name>
29
+ <rate>9.2</rate>
30
+ <shippingDate>2010-08-16</shippingDate>
31
+ <deliveryDate>2010-08-18</deliveryDate>
32
+ <deliveryDayOfWeek>4</deliveryDayOfWeek>
33
+ <nextDayAM>false</nextDayAM>
34
+ <packingID>P_0</packingID>
35
+ </product>
36
+ <packing>
37
+ <packingID>P_0</packingID>
38
+ <box>
39
+ <name>a box full of stuff</name>
40
+ <weight>5.0</weight>
41
+ <expediterWeight>5.0</expediterWeight>
42
+ <length>4.0</length>
43
+ <width>3.0</width>
44
+ <height>2.0</height>
45
+ <packedItem>
46
+ <quantity>1</quantity>
47
+ <description>a box full of stuff</description>
48
+ </packedItem>
49
+ </box>
50
+ </packing>
51
+ <shippingOptions>
52
+ <insurance>No</insurance>
53
+ <deliveryConfirmation>No</deliveryConfirmation>
54
+ <signature>No</signature>
55
+ </shippingOptions>
56
+ <comment/>
57
+ <nearestPostalOutlet>
58
+ <postalOutletSequenceNo>1</postalOutletSequenceNo>
59
+ <distance>0.2</distance>
60
+ <outletName>C/O: OTTAWA SOUTH PO</outletName>
61
+ <businessName>7-ELEVEN FOOD STORES #23739</businessName>
62
+ <postalAddress>
63
+ <addressLine>1166 BANK ST</addressLine>
64
+ <postalCode>K1S3X0</postalCode>
65
+ <municipality>OTTAWA</municipality>
66
+ <province>ON</province>
67
+ </postalAddress>
68
+ <phoneNumber>613-730-3022</phoneNumber>
69
+ <businessHours>
70
+ <dayId>1</dayId>
71
+ <dayOfWeek>SUN</dayOfWeek>
72
+ <time>07:00-21:00</time>
73
+ </businessHours>
74
+ <businessHours>
75
+ <dayId>2</dayId>
76
+ <dayOfWeek>MON</dayOfWeek>
77
+ <time>07:00-21:00</time>
78
+ </businessHours>
79
+ <businessHours>
80
+ <dayId>3</dayId>
81
+ <dayOfWeek>TUE</dayOfWeek>
82
+ <time>07:00-21:00</time>
83
+ </businessHours>
84
+ <businessHours>
85
+ <dayId>4</dayId>
86
+ <dayOfWeek>WED</dayOfWeek>
87
+ <time>07:00-21:00</time>
88
+ </businessHours>
89
+ <businessHours>
90
+ <dayId>5</dayId>
91
+ <dayOfWeek>THU</dayOfWeek>
92
+ <time>07:00-21:00</time>
93
+ </businessHours>
94
+ <businessHours>
95
+ <dayId>6</dayId>
96
+ <dayOfWeek>FRI</dayOfWeek>
97
+ <time>07:00-21:00</time>
98
+ </businessHours>
99
+ <businessHours>
100
+ <dayId>7</dayId>
101
+ <dayOfWeek>SAT</dayOfWeek>
102
+ <time>07:00-21:00</time>
103
+ </businessHours>
104
+ </nearestPostalOutlet>
105
+ <nearestPostalOutlet>
106
+ <postalOutletSequenceNo>2</postalOutletSequenceNo>
107
+ <distance>0.8</distance>
108
+ <outletName>C/O: BILLINGS PO</outletName>
109
+ <businessName>DAVIS AGENCY</businessName>
110
+ <postalAddress>
111
+ <addressLine>2265 RIVERSIDE DR</addressLine>
112
+ <postalCode>K1H7X0</postalCode>
113
+ <municipality>OTTAWA</municipality>
114
+ <province>ON</province>
115
+ </postalAddress>
116
+ <phoneNumber>613-521-8240</phoneNumber>
117
+ <businessHours>
118
+ <dayId>1</dayId>
119
+ <dayOfWeek>SUN</dayOfWeek>
120
+ <time>07:00-21:00</time>
121
+ </businessHours>
122
+ <businessHours>
123
+ <dayId>2</dayId>
124
+ <dayOfWeek>MON</dayOfWeek>
125
+ <time>07:00-21:00</time>
126
+ </businessHours>
127
+ <businessHours>
128
+ <dayId>3</dayId>
129
+ <dayOfWeek>TUE</dayOfWeek>
130
+ <time>07:00-21:00</time>
131
+ </businessHours>
132
+ <businessHours>
133
+ <dayId>4</dayId>
134
+ <dayOfWeek>WED</dayOfWeek>
135
+ <time>07:00-21:00</time>
136
+ </businessHours>
137
+ <businessHours>
138
+ <dayId>5</dayId>
139
+ <dayOfWeek>THU</dayOfWeek>
140
+ <time>07:00-21:00</time>
141
+ </businessHours>
142
+ <businessHours>
143
+ <dayId>6</dayId>
144
+ <dayOfWeek>FRI</dayOfWeek>
145
+ <time>07:00-21:00</time>
146
+ </businessHours>
147
+ <businessHours>
148
+ <dayId>7</dayId>
149
+ <dayOfWeek>SAT</dayOfWeek>
150
+ <time>07:00-21:00</time>
151
+ </businessHours>
152
+ </nearestPostalOutlet>
153
+ </ratesAndServicesResponse>
154
+ </eparcel>
155
+ <!--END_OF_EPARCEL-->
@@ -0,0 +1,274 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE eparcel [
3
+ <!-- EVERY REQUEST CONTAIN THE eparcel TAG -->
4
+ <!ELEMENT eparcel (ratesAndServicesResponse)>
5
+ <!-- ********************************************************* -->
6
+ <!-- * Standard response for request for rates and services * -->
7
+ <!-- ********************************************************* -->
8
+ <!ELEMENT ratesAndServicesResponse (statusCode, statusMessage+, requestID, handling, language, product+, packing*, emptySpace*, shippingOptions, comment, nearestPostalOutlet*)>
9
+ <!ELEMENT statusCode (#PCDATA)>
10
+ <!ELEMENT statusMessage (#PCDATA)>
11
+ <!ELEMENT requestID (#PCDATA)>
12
+
13
+ <!ELEMENT handling (#PCDATA)>
14
+ <!ELEMENT language (#PCDATA)>
15
+ <!ELEMENT product (name, rate, shippingDate, deliveryDate, deliveryDayOfWeek, nextDayAM?, packingID)>
16
+ <!ATTLIST product
17
+ id CDATA #REQUIRED
18
+ sequence CDATA #REQUIRED
19
+ >
20
+ <!ELEMENT name (#PCDATA)>
21
+ <!ELEMENT rate (#PCDATA)>
22
+ <!ELEMENT shippingDate (#PCDATA)>
23
+ <!ELEMENT deliveryDate (#PCDATA)>
24
+ <!ELEMENT deliveryDayOfWeek (#PCDATA)>
25
+
26
+ <!ELEMENT nextDayAM (#PCDATA)>
27
+ <!ELEMENT packingID (#PCDATA)>
28
+ <!ELEMENT packing (packingID, box+)>
29
+ <!ELEMENT box (name, weight, expediterWeight, length, width, height, packedItem+)>
30
+ <!ELEMENT weight (#PCDATA)>
31
+ <!ELEMENT expediterWeight (#PCDATA)>
32
+ <!ELEMENT length (#PCDATA)>
33
+ <!ELEMENT width (#PCDATA)>
34
+ <!ELEMENT height (#PCDATA)>
35
+
36
+ <!ELEMENT packedItem (quantity, description)>
37
+ <!ELEMENT quantity (#PCDATA)>
38
+ <!ELEMENT description (#PCDATA)>
39
+ <!ELEMENT emptySpace (length, width, height, weight)>
40
+ <!ELEMENT shippingOptions (insurance, deliveryConfirmation, signature, flexiblePaymentAvailable?)>
41
+ <!ELEMENT insurance (#PCDATA)>
42
+ <!ELEMENT deliveryConfirmation (#PCDATA)>
43
+ <!ELEMENT signature (#PCDATA)>
44
+ <!ELEMENT flexiblePaymentAvailable EMPTY>
45
+
46
+ <!ELEMENT comment (#PCDATA)>
47
+ <!-- ********************************************************* -->
48
+ <!-- * 'nearestPostalOutlet' is optional and is returned * -->
49
+ <!-- * only if the merchant profile has this option enabled * -->
50
+ <!-- ********************************************************* -->
51
+ <!ELEMENT nearestPostalOutlet (postalOutletSequenceNo, distance, outletName, businessName, postalAddress, phoneNumber, businessHours+)>
52
+ <!ELEMENT postalOutletSequenceNo (#PCDATA)>
53
+ <!ELEMENT distance (#PCDATA)>
54
+ <!ELEMENT outletName (#PCDATA)>
55
+
56
+ <!ELEMENT businessName (#PCDATA)>
57
+ <!ELEMENT postalAddress (addressLine+, postalCode, municipality, province?)>
58
+ <!ELEMENT addressLine (#PCDATA)>
59
+ <!ELEMENT postalCode (#PCDATA)>
60
+ <!ELEMENT municipality (#PCDATA)>
61
+ <!ELEMENT province (#PCDATA)>
62
+ <!ELEMENT phoneNumber (#PCDATA)>
63
+ <!ELEMENT businessHours (dayId, dayOfWeek, time)>
64
+ <!ELEMENT dayId (#PCDATA)>
65
+
66
+ <!ELEMENT dayOfWeek (#PCDATA)>
67
+ <!ELEMENT time (#PCDATA)>
68
+
69
+ ]>
70
+ <eparcel>
71
+ <ratesAndServicesResponse>
72
+
73
+ <statusCode>1</statusCode>
74
+ <statusMessage>OK</statusMessage>
75
+ <requestID>7838448</requestID>
76
+
77
+ <handling>3.0</handling>
78
+ <language>1</language>
79
+ <product id="1040" sequence="1">
80
+ <name>Messageries prioritaires</name>
81
+ <rate>38.68</rate>
82
+ <shippingDate>2010-09-07</shippingDate>
83
+
84
+ <deliveryDate>2010-09-08</deliveryDate>
85
+ <deliveryDayOfWeek>4</deliveryDayOfWeek>
86
+ <nextDayAM>true</nextDayAM>
87
+ <packingID>P_0</packingID>
88
+ </product>
89
+ <product id="1020" sequence="2">
90
+ <name>Colis acc&#xE9;l&#xE9;r&#xE9;s</name>
91
+
92
+ <rate>17.84</rate>
93
+ <shippingDate>2010-09-07</shippingDate>
94
+ <deliveryDate>2010-09-08</deliveryDate>
95
+ <deliveryDayOfWeek>4</deliveryDayOfWeek>
96
+ <nextDayAM>false</nextDayAM>
97
+ <packingID>P_0</packingID>
98
+
99
+ </product>
100
+ <product id="1010" sequence="3">
101
+ <name>Colis standard</name>
102
+ <rate>17.84</rate>
103
+ <shippingDate>2010-09-07</shippingDate>
104
+ <deliveryDate>2010-09-10</deliveryDate>
105
+ <deliveryDayOfWeek>6</deliveryDayOfWeek>
106
+
107
+ <nextDayAM>false</nextDayAM>
108
+ <packingID>P_0</packingID>
109
+ </product>
110
+
111
+
112
+ <packing>
113
+ <packingID>P_0</packingID>
114
+ <box>
115
+ <name>Dummy box - Change me</name>
116
+
117
+ <weight>4.5</weight>
118
+ <expediterWeight>1.991</expediterWeight>
119
+ <length>30.0</length>
120
+ <width>30.0</width>
121
+ <height>30.0</height>
122
+ <packedItem>
123
+
124
+ <quantity>1</quantity>
125
+ <description>KAO Diskettes</description>
126
+ </packedItem>
127
+
128
+
129
+ </box>
130
+ <box>
131
+ <name>My Ready To Ship Item</name>
132
+ <weight>2.0</weight>
133
+
134
+ <expediterWeight>1.5</expediterWeight>
135
+ <length>30.0</length>
136
+ <width>20.0</width>
137
+ <height>20.0</height>
138
+ <packedItem>
139
+ <quantity>1</quantity>
140
+
141
+ <description>My Ready To Ship Item</description>
142
+ </packedItem>
143
+
144
+
145
+ </box>
146
+
147
+ </packing>
148
+
149
+ <shippingOptions>
150
+ <insurance>No</insurance>
151
+ <deliveryConfirmation>No</deliveryConfirmation>
152
+
153
+ <signature>No</signature>
154
+
155
+ </shippingOptions>
156
+
157
+ <comment></comment>
158
+
159
+ <nearestPostalOutlet >
160
+ <postalOutletSequenceNo>1</postalOutletSequenceNo>
161
+ <distance>0.7</distance>
162
+ <outletName>A/S: CP ATWATER</outletName>
163
+
164
+ <businessName>BRUNET ATWATER</businessName>
165
+ <postalAddress>
166
+ <addressLine>151 ATWATER</addressLine>
167
+ <postalCode>H3J2J0</postalCode>
168
+ <municipality>MONTR?AL</municipality>
169
+ <province>QC</province>
170
+ </postalAddress>
171
+ <phoneNumber>514-935-5637</phoneNumber>
172
+
173
+ <businessHours>
174
+ <dayId>1</dayId>
175
+ <dayOfWeek>DIM</dayOfWeek>
176
+ <time>ferm&#xE9;</time>
177
+ </businessHours>
178
+ <businessHours>
179
+ <dayId>2</dayId>
180
+
181
+ <dayOfWeek>LUN</dayOfWeek>
182
+ <time>09:00-19:00</time>
183
+ </businessHours>
184
+ <businessHours>
185
+ <dayId>3</dayId>
186
+ <dayOfWeek>MAR</dayOfWeek>
187
+ <time>09:00-19:00</time>
188
+
189
+ </businessHours>
190
+ <businessHours>
191
+ <dayId>4</dayId>
192
+ <dayOfWeek>MER</dayOfWeek>
193
+ <time>09:00-19:00</time>
194
+ </businessHours>
195
+ <businessHours>
196
+
197
+ <dayId>5</dayId>
198
+ <dayOfWeek>JEU</dayOfWeek>
199
+ <time>09:00-19:00</time>
200
+ </businessHours>
201
+ <businessHours>
202
+ <dayId>6</dayId>
203
+ <dayOfWeek>VEN</dayOfWeek>
204
+
205
+ <time>09:00-19:00</time>
206
+ </businessHours>
207
+ <businessHours>
208
+ <dayId>7</dayId>
209
+ <dayOfWeek>SAM</dayOfWeek>
210
+ <time>10:00-15:00</time>
211
+ </businessHours>
212
+
213
+ </nearestPostalOutlet>
214
+ <nearestPostalOutlet >
215
+ <postalOutletSequenceNo>2</postalOutletSequenceNo>
216
+ <distance>0.9</distance>
217
+ <outletName>A/S: BP MONTREAL D</outletName>
218
+ <businessName>BP MONTREAL D</businessName>
219
+ <postalAddress>
220
+ <addressLine>1695 GRAND TRUNK</addressLine>
221
+ <postalCode>H3K1J0</postalCode>
222
+
223
+ <municipality>MONTREAL</municipality>
224
+ <province>QC</province>
225
+ </postalAddress>
226
+ <phoneNumber>514-846-5391</phoneNumber>
227
+ <businessHours>
228
+ <dayId>1</dayId>
229
+ <dayOfWeek>DIM</dayOfWeek>
230
+
231
+ <time>ferm&#xE9;</time>
232
+ </businessHours>
233
+ <businessHours>
234
+ <dayId>2</dayId>
235
+ <dayOfWeek>LUN</dayOfWeek>
236
+ <time>09:30-17:30</time>
237
+ </businessHours>
238
+
239
+ <businessHours>
240
+ <dayId>3</dayId>
241
+ <dayOfWeek>MAR</dayOfWeek>
242
+ <time>09:30-17:30</time>
243
+ </businessHours>
244
+ <businessHours>
245
+ <dayId>4</dayId>
246
+
247
+ <dayOfWeek>MER</dayOfWeek>
248
+ <time>09:30-17:30</time>
249
+ </businessHours>
250
+ <businessHours>
251
+ <dayId>5</dayId>
252
+ <dayOfWeek>JEU</dayOfWeek>
253
+ <time>09:30-17:30</time>
254
+
255
+ </businessHours>
256
+ <businessHours>
257
+ <dayId>6</dayId>
258
+ <dayOfWeek>VEN</dayOfWeek>
259
+ <time>09:30-17:30</time>
260
+ </businessHours>
261
+ <businessHours>
262
+
263
+ <dayId>7</dayId>
264
+ <dayOfWeek>SAM</dayOfWeek>
265
+ <time>ferm&#xE9;</time>
266
+ </businessHours>
267
+
268
+ </nearestPostalOutlet>
269
+
270
+ </ratesAndServicesResponse>
271
+ </eparcel>
272
+
273
+ <!--END_OF_EPARCEL-->
274
+
@@ -0,0 +1,130 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE eparcel [
3
+ <!-- EVERY REQUEST CONTAIN THE eparcel TAG -->
4
+ <!ELEMENT eparcel (ratesAndServicesResponse)>
5
+ <!-- ********************************************************* -->
6
+ <!-- * Standard response for request for rates and services * -->
7
+ <!-- ********************************************************* -->
8
+ <!ELEMENT ratesAndServicesResponse (statusCode , statusMessage+ , requestID , handling , language , product+ , packing* , emptySpace* , shippingOptions , comment , nearestPostalOutlet*)>
9
+ <!ELEMENT statusCode (#PCDATA)>
10
+ <!ELEMENT statusMessage (#PCDATA)>
11
+ <!ELEMENT requestID (#PCDATA)>
12
+ <!ELEMENT handling (#PCDATA)>
13
+ <!ELEMENT language (#PCDATA)>
14
+ <!ELEMENT product (name , rate , shippingDate , deliveryDate , deliveryDayOfWeek , nextDayAM? , packingID)>
15
+ <!ATTLIST product id CDATA #REQUIRED>
16
+ <!ATTLIST product sequence CDATA #REQUIRED>
17
+ <!ELEMENT name (#PCDATA)>
18
+ <!ELEMENT rate (#PCDATA)>
19
+ <!ELEMENT shippingDate (#PCDATA)>
20
+ <!ELEMENT deliveryDate (#PCDATA)>
21
+ <!ELEMENT deliveryDayOfWeek (#PCDATA)>
22
+ <!ELEMENT nextDayAM (#PCDATA)>
23
+ <!ELEMENT packingID (#PCDATA)>
24
+ <!ELEMENT packing (packingID , box+)>
25
+ <!ELEMENT box (name , weight , expediterWeight , length , width , height , packedItem+)>
26
+ <!ELEMENT weight (#PCDATA)>
27
+ <!ELEMENT expediterWeight (#PCDATA)>
28
+ <!ELEMENT length (#PCDATA)>
29
+ <!ELEMENT width (#PCDATA)>
30
+ <!ELEMENT height (#PCDATA)>
31
+ <!ELEMENT packedItem (quantity , description)>
32
+ <!ELEMENT quantity (#PCDATA)>
33
+ <!ELEMENT description (#PCDATA)>
34
+ <!ELEMENT emptySpace (length , width , height , weight)>
35
+ <!ELEMENT shippingOptions (insurance , deliveryConfirmation , signature , flexiblePaymentAvailable?)>
36
+ <!ELEMENT insurance (#PCDATA)>
37
+ <!ELEMENT deliveryConfirmation (#PCDATA)>
38
+ <!ELEMENT signature (#PCDATA)>
39
+ <!ELEMENT flexiblePaymentAvailable EMPTY>
40
+ <!ELEMENT comment (#PCDATA)>
41
+ <!-- ********************************************************* -->
42
+ <!-- * 'nearestPostalOutlet' is optional and is returned * -->
43
+ <!-- * only if the merchant profile has this option enabled * -->
44
+ <!-- ********************************************************* -->
45
+ <!ELEMENT nearestPostalOutlet (postalOutletSequenceNo , distance , outletName , businessName , postalAddress , phoneNumber , businessHours+)>
46
+ <!ELEMENT postalOutletSequenceNo (#PCDATA)>
47
+ <!ELEMENT distance (#PCDATA)>
48
+ <!ELEMENT outletName (#PCDATA)>
49
+ <!ELEMENT businessName (#PCDATA)>
50
+ <!ELEMENT postalAddress (addressLine+ , postalCode , municipality , province?)>
51
+ <!ELEMENT addressLine (#PCDATA)>
52
+ <!ELEMENT postalCode (#PCDATA)>
53
+ <!ELEMENT municipality (#PCDATA)>
54
+ <!ELEMENT province (#PCDATA)>
55
+ <!ELEMENT phoneNumber (#PCDATA)>
56
+ <!ELEMENT businessHours (dayId , dayOfWeek , time)>
57
+ <!ELEMENT dayId (#PCDATA)>
58
+ <!ELEMENT dayOfWeek (#PCDATA)>
59
+ <!ELEMENT time (#PCDATA)>
60
+ ]>
61
+ <eparcel>
62
+ <ratesAndServicesResponse>
63
+ <statusCode>1</statusCode>
64
+ <statusMessage>OK</statusMessage>
65
+ <requestID>6877575</requestID>
66
+ <handling>0.0</handling>
67
+ <language>0</language>
68
+ <product id="1040" sequence="1">
69
+ <name>Priority Courier</name>
70
+ <rate>40.28</rate>
71
+ <shippingDate>2010-08-03</shippingDate>
72
+ <deliveryDate>1 to 3 months</deliveryDate>
73
+ <deliveryDayOfWeek>4</deliveryDayOfWeek>
74
+ <nextDayAM>true</nextDayAM>
75
+ <packingID>P_0</packingID>
76
+ </product>
77
+ <product id="1020" sequence="2">
78
+ <name>Expedited</name>
79
+ <rate>17.16</rate>
80
+ <shippingDate>2010-08-03</shippingDate>
81
+ <deliveryDate>1 to 3 months</deliveryDate>
82
+ <deliveryDayOfWeek>4</deliveryDayOfWeek>
83
+ <nextDayAM>false</nextDayAM>
84
+ <packingID>P_0</packingID>
85
+ </product>
86
+ <product id="1010" sequence="3">
87
+ <name>Regular</name>
88
+ <rate>17.16</rate>
89
+ <shippingDate>2010-08-03</shippingDate>
90
+ <deliveryDate>1 to 3 months</deliveryDate>
91
+ <deliveryDayOfWeek>6</deliveryDayOfWeek>
92
+ <nextDayAM>false</nextDayAM>
93
+ <packingID>P_0</packingID>
94
+ </product>
95
+ <packing>
96
+ <packingID>P_0</packingID>
97
+ <box>
98
+ <name>Small Box</name>
99
+ <weight>1.691</weight>
100
+ <expediterWeight>1.691</expediterWeight>
101
+ <length>25.0</length>
102
+ <width>17.0</width>
103
+ <height>16.0</height>
104
+ <packedItem>
105
+ <quantity>1</quantity>
106
+ <description>KAO Diskettes</description>
107
+ </packedItem>
108
+ </box>
109
+ <box>
110
+ <name>My Ready To Ship Item</name>
111
+ <weight>2.0</weight>
112
+ <expediterWeight>1.5</expediterWeight>
113
+ <length>30.0</length>
114
+ <width>20.0</width>
115
+ <height>20.0</height>
116
+ <packedItem>
117
+ <quantity>1</quantity>
118
+ <description>My Ready To Ship Item</description>
119
+ </packedItem>
120
+ </box>
121
+ </packing>
122
+ <shippingOptions>
123
+ <insurance>No</insurance>
124
+ <deliveryConfirmation>No</deliveryConfirmation>
125
+ <signature>No</signature>
126
+ </shippingOptions>
127
+ <comment/>
128
+ </ratesAndServicesResponse>
129
+ </eparcel>
130
+ <!--END_OF_EPARCEL-->