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,15 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
5
+ <soap:Body>
6
+ <soap:Fault>
7
+ <faultcode>soap:Server</faultcode>
8
+ <faultstring>Expired Authenticator. [0x002b0202]</faultstring>
9
+ <faultactor>https://swsim.testing.stamps.com/swsim/swsim-v1.asmx</faultactor>
10
+ <detail>
11
+ <sdcerror code="002b0202" xmlns="http://stamps.com/xml/namespace/2008/01/swsim/fault">Expired Authenticator.</sdcerror>
12
+ </detail>
13
+ </soap:Fault>
14
+ </soap:Body>
15
+ </soap:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5
+ xmlns:tns="http://stamps.com/xml/namespace/2013/10/swsim/swsimv33">
6
+ <soap:Body>
7
+ <tns:GetAccountInfo>
8
+ <tns:Authenticator>***authenticator***</tns:Authenticator>
9
+ </tns:GetAccountInfo>
10
+ </soap:Body>
11
+ </soap:Envelope>
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
5
+ <soap:Body>
6
+ <GetAccountInfoResponse xmlns="http://stamps.com/xml/namespace/2013/10/swsim/swsimv33">
7
+ <Authenticator>***authenticator***</Authenticator>
8
+ <AccountInfo>
9
+ <CustomerID>1234567</CustomerID>
10
+ <MeterNumber>1029384756</MeterNumber>
11
+ <UserID>7654321</UserID>
12
+ <PostageBalance>
13
+ <AvailablePostage>123.45</AvailablePostage>
14
+ <ControlTotal>543.21</ControlTotal>
15
+ </PostageBalance>
16
+ <MaxPostageBalance>250</MaxPostageBalance>
17
+ <LPOCity>Los Angeles</LPOCity>
18
+ <LPOState>CA</LPOState>
19
+ <LPOZip>90066</LPOZip>
20
+ <Capabilities>
21
+ <CanPrintShipping>true</CanPrintShipping>
22
+ <CanUseCostCodes>true</CanUseCostCodes>
23
+ <CanUseHiddenPostage>true</CanUseHiddenPostage>
24
+ <CanPurchaseSDCInsurance>true</CanPurchaseSDCInsurance>
25
+ <CanPrintMemoOnShippingLabel>true</CanPrintMemoOnShippingLabel>
26
+ <CanPrintInternational>true</CanPrintInternational>
27
+ <CanPurchasePostage>true</CanPurchasePostage>
28
+ <CanEditCostCodes>true</CanEditCostCodes>
29
+ <MustUseCostCodes>false</MustUseCostCodes>
30
+ <CanViewOnlineReports>true</CanViewOnlineReports>
31
+ <PerPrintLimit>987.65</PerPrintLimit>
32
+ </Capabilities>
33
+ </AccountInfo>
34
+ </GetAccountInfoResponse>
35
+ </soap:Body>
36
+ </soap:Envelope>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5
+ xmlns:tns="http://stamps.com/xml/namespace/2013/10/swsim/swsimv33">
6
+ <soap:Body>
7
+ <tns:GetPurchaseStatus>
8
+ <tns:Authenticator>***authenticator***</tns:Authenticator>
9
+ <tns:TransactionID>1234</tns:TransactionID>
10
+ </tns:GetPurchaseStatus>
11
+ </soap:Body>
12
+ </soap:Envelope>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
5
+ <soap:Body>
6
+ <GetPurchaseStatusResponse xmlns="http://stamps.com/xml/namespace/2013/10/swsim/swsimv33">
7
+ <Authenticator>***authenticator***</Authenticator>
8
+ <PurchaseStatus>Success</PurchaseStatus>
9
+ <PostageBalance>
10
+ <AvailablePostage>543.21</AvailablePostage>
11
+ <ControlTotal>123.45</ControlTotal>
12
+ </PostageBalance>
13
+ <RejectionReason/>
14
+ </GetPurchaseStatusResponse>
15
+ </soap:Body>
16
+ </soap:Envelope>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5
+ xmlns:tns="http://stamps.com/xml/namespace/2013/10/swsim/swsimv33">
6
+ <soap:Body>
7
+ <tns:GetRates>
8
+ <tns:Authenticator>***authenticator***</tns:Authenticator>
9
+ <tns:Rate>
10
+ <tns:FromZIPCode>90405</tns:FromZIPCode>
11
+ <tns:ToZIPCode>90066</tns:ToZIPCode>
12
+ <tns:WeightLb>12</tns:WeightLb>
13
+ <tns:PackageType>Package</tns:PackageType>
14
+ <tns:ShipDate>2009-08-31</tns:ShipDate>
15
+ <tns:InsuredValue>100.00</tns:InsuredValue>
16
+ </tns:Rate>
17
+ </tns:GetRates>
18
+ </soap:Body>
19
+ </soap:Envelope>
@@ -0,0 +1,351 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
5
+ <soap:Body>
6
+ <GetRatesResponse xmlns="http://stamps.com/xml/namespace/2014/01/swsim/swsimv34">
7
+ <Authenticator>***authenticator***</Authenticator>
8
+ <Rates>
9
+ <Rate>
10
+ <FromZIPCode>90405</FromZIPCode>
11
+ <ToZIPCode>90066</ToZIPCode>
12
+ <Amount>12.17</Amount>
13
+ <ServiceType>US-PM</ServiceType>
14
+ <DeliverDays>1-3</DeliverDays>
15
+ <WeightOz>192</WeightOz>
16
+ <PackageType>Package</PackageType>
17
+ <Length>3</Length>
18
+ <Width>2</Width>
19
+ <Height>1</Height>
20
+ <ShipDate>2014-01-31</ShipDate>
21
+ <InsuredValue>100.00</InsuredValue>
22
+ <NonMachinable>true</NonMachinable>
23
+ <DimWeighting>N</DimWeighting>
24
+ <AddOns>
25
+ <AddOnV5>
26
+ <Amount>2.6</Amount>
27
+ <AddOnType>US-A-INS</AddOnType>
28
+ <ProhibitedWithAnyOf>
29
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
30
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
31
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
32
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
33
+ <AddOnTypeV5>SC-A-INS</AddOnTypeV5>
34
+ </ProhibitedWithAnyOf>
35
+ </AddOnV5>
36
+ <AddOnV5>
37
+ <AddOnType>US-A-COD</AddOnType>
38
+ <ProhibitedWithAnyOf>
39
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
40
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
41
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
42
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
43
+ </ProhibitedWithAnyOf>
44
+ <MissingData>CODValue</MissingData>
45
+ </AddOnV5>
46
+ <AddOnV5>
47
+ <AddOnType>US-A-DC</AddOnType>
48
+ <ProhibitedWithAnyOf>
49
+ <AddOnTypeV5>US-A-SC</AddOnTypeV5>
50
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
51
+ </ProhibitedWithAnyOf>
52
+ </AddOnV5>
53
+ <AddOnV5>
54
+ <Amount>2.35</Amount>
55
+ <AddOnType>US-A-SC</AddOnType>
56
+ <ProhibitedWithAnyOf>
57
+ <AddOnTypeV5>US-A-DC</AddOnTypeV5>
58
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
59
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
60
+ </ProhibitedWithAnyOf>
61
+ </AddOnV5>
62
+ <AddOnV5>
63
+ <Amount>3.3</Amount>
64
+ <AddOnType>US-A-CM</AddOnType>
65
+ <ProhibitedWithAnyOf>
66
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
67
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
68
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
69
+ <AddOnTypeV5>US-A-DC</AddOnTypeV5>
70
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
71
+ <AddOnTypeV5>US-A-SC</AddOnTypeV5>
72
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
73
+ <AddOnTypeV5>US-A-SH</AddOnTypeV5>
74
+ </ProhibitedWithAnyOf>
75
+ </AddOnV5>
76
+ <AddOnV5>
77
+ <Amount>2.7</Amount>
78
+ <AddOnType>US-A-RR</AddOnType>
79
+ <RequiresAllOf>
80
+ <RequiresOneOf>
81
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
82
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
83
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
84
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
85
+ </RequiresOneOf>
86
+ </RequiresAllOf>
87
+ <ProhibitedWithAnyOf>
88
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
89
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
90
+ </ProhibitedWithAnyOf>
91
+ </AddOnV5>
92
+ <AddOnV5>
93
+ <Amount>11.95</Amount>
94
+ <AddOnType>US-A-REG</AddOnType>
95
+ <ProhibitedWithAnyOf>
96
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
97
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
98
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
99
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
100
+ <AddOnTypeV5>SC-A-INS</AddOnTypeV5>
101
+ <AddOnTypeV5>US-A-SH</AddOnTypeV5>
102
+ </ProhibitedWithAnyOf>
103
+ </AddOnV5>
104
+ <AddOnV5>
105
+ <Amount>5.05</Amount>
106
+ <AddOnType>US-A-RD</AddOnType>
107
+ <RequiresAllOf>
108
+ <RequiresOneOf>
109
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
110
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
111
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
112
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
113
+ </RequiresOneOf>
114
+ </RequiresAllOf>
115
+ <ProhibitedWithAnyOf>
116
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
117
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
118
+ <AddOnTypeV5>US-A-SH</AddOnTypeV5>
119
+ </ProhibitedWithAnyOf>
120
+ </AddOnV5>
121
+ <AddOnV5>
122
+ <Amount>2.6</Amount>
123
+ <AddOnType>SC-A-INS</AddOnType>
124
+ <ProhibitedWithAnyOf>
125
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
126
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
127
+ </ProhibitedWithAnyOf>
128
+ </AddOnV5>
129
+ <AddOnV5>
130
+ <AddOnType>SC-A-HP</AddOnType>
131
+ <ProhibitedWithAnyOf>
132
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
133
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
134
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
135
+ <AddOnTypeV5>US-A-RD</AddOnTypeV5>
136
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
137
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
138
+ <AddOnTypeV5>US-A-RR</AddOnTypeV5>
139
+ <AddOnTypeV5>US-A-LAWS</AddOnTypeV5>
140
+ </ProhibitedWithAnyOf>
141
+ </AddOnV5>
142
+ <AddOnV5>
143
+ <AddOnType>US-A-NND</AddOnType>
144
+ <RequiresAllOf>
145
+ <RequiresOneOf>
146
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
147
+ </RequiresOneOf>
148
+ </RequiresAllOf>
149
+ </AddOnV5>
150
+ <AddOnV5>
151
+ <Amount>4.4</Amount>
152
+ <AddOnType>US-A-RRM</AddOnType>
153
+ <ProhibitedWithAnyOf>
154
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
155
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
156
+ <AddOnTypeV5>US-A-RD</AddOnTypeV5>
157
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
158
+ <AddOnTypeV5>US-A-SC</AddOnTypeV5>
159
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
160
+ <AddOnTypeV5>US-A-RR</AddOnTypeV5>
161
+ </ProhibitedWithAnyOf>
162
+ </AddOnV5>
163
+ <AddOnV5>
164
+ <Amount>1.35</Amount>
165
+ <AddOnType>US-A-RRE</AddOnType>
166
+ <RequiresAllOf>
167
+ <RequiresOneOf>
168
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
169
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
170
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
171
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
172
+ </RequiresOneOf>
173
+ </RequiresAllOf>
174
+ <ProhibitedWithAnyOf>
175
+ <AddOnTypeV5>US-A-DC</AddOnTypeV5>
176
+ <AddOnTypeV5>US-A-SC</AddOnTypeV5>
177
+ <AddOnTypeV5>US-A-COM</AddOnTypeV5>
178
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
179
+ <AddOnTypeV5>US-A-SH</AddOnTypeV5>
180
+ <AddOnTypeV5>SC-A-INSRM</AddOnTypeV5>
181
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
182
+ <AddOnTypeV5>US-A-NND</AddOnTypeV5>
183
+ </ProhibitedWithAnyOf>
184
+ </AddOnV5>
185
+ <AddOnV5>
186
+ <Amount>13</Amount>
187
+ <AddOnType>US-A-SH</AddOnType>
188
+ <ProhibitedWithAnyOf>
189
+ <AddOnTypeV5>US-A-COM</AddOnTypeV5>
190
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
191
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
192
+ <AddOnTypeV5>US-A-RD</AddOnTypeV5>
193
+ <AddOnTypeV5>US-A-RRE</AddOnTypeV5>
194
+ </ProhibitedWithAnyOf>
195
+ </AddOnV5>
196
+ <AddOnV5>
197
+ <AddOnType>US-A-HM</AddOnType>
198
+ <ProhibitedWithAnyOf>
199
+ <AddOnTypeV5>US-A-CR</AddOnTypeV5>
200
+ <AddOnTypeV5>US-A-LANS</AddOnTypeV5>
201
+ <AddOnTypeV5>US-A-LAWS</AddOnTypeV5>
202
+ </ProhibitedWithAnyOf>
203
+ </AddOnV5>
204
+ <AddOnV5>
205
+ <AddOnType>US-A-LANS</AddOnType>
206
+ <ProhibitedWithAnyOf>
207
+ <AddOnTypeV5>US-A-CR</AddOnTypeV5>
208
+ <AddOnTypeV5>US-A-HM</AddOnTypeV5>
209
+ <AddOnTypeV5>US-A-LAWS</AddOnTypeV5>
210
+ </ProhibitedWithAnyOf>
211
+ </AddOnV5>
212
+ <AddOnV5>
213
+ <Amount>2.4</Amount>
214
+ <AddOnType>US-A-LAWS</AddOnType>
215
+ <ProhibitedWithAnyOf>
216
+ <AddOnTypeV5>US-A-CR</AddOnTypeV5>
217
+ <AddOnTypeV5>US-A-HM</AddOnTypeV5>
218
+ <AddOnTypeV5>US-A-LANS</AddOnTypeV5>
219
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
220
+ </ProhibitedWithAnyOf>
221
+ </AddOnV5>
222
+ </AddOns>
223
+ <EffectiveWeightInOunces>192</EffectiveWeightInOunces>
224
+ <IsIntraBMC>true</IsIntraBMC>
225
+ <Zone>1</Zone>
226
+ <RateCategory>7500</RateCategory>
227
+ <ToState>CA</ToState>
228
+ </Rate>
229
+ <Rate>
230
+ <FromZIPCode>90405</FromZIPCode>
231
+ <ToZIPCode>90066</ToZIPCode>
232
+ <Amount>22.09</Amount>
233
+ <ServiceType>US-XM</ServiceType>
234
+ <DeliverDays>1-2</DeliverDays>
235
+ <WeightOz>192</WeightOz>
236
+ <PackageType>Package</PackageType>
237
+ <Length>3</Length>
238
+ <Width>2</Width>
239
+ <Height>1</Height>
240
+ <ShipDate>2014-01-31</ShipDate>
241
+ <NonMachinable>true</NonMachinable>
242
+ <DimWeighting>N</DimWeighting>
243
+ <AddOns>
244
+ <AddOnV5>
245
+ <AddOnType>US-A-INS</AddOnType>
246
+ <ProhibitedWithAnyOf>
247
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
248
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
249
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
250
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
251
+ <AddOnTypeV5>SC-A-INS</AddOnTypeV5>
252
+ </ProhibitedWithAnyOf>
253
+ </AddOnV5>
254
+ <AddOnV5>
255
+ <AddOnType>US-A-COD</AddOnType>
256
+ <ProhibitedWithAnyOf>
257
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
258
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
259
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
260
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
261
+ </ProhibitedWithAnyOf>
262
+ <MissingData>CODValue</MissingData>
263
+ </AddOnV5>
264
+ <AddOnV5>
265
+ <Amount>2.7</Amount>
266
+ <AddOnType>US-A-RR</AddOnType>
267
+ <ProhibitedWithAnyOf>
268
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
269
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
270
+ </ProhibitedWithAnyOf>
271
+ </AddOnV5>
272
+ <AddOnV5>
273
+ <AddOnType>SC-A-INS</AddOnType>
274
+ <ProhibitedWithAnyOf>
275
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
276
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
277
+ </ProhibitedWithAnyOf>
278
+ </AddOnV5>
279
+ <AddOnV5>
280
+ <AddOnType>SC-A-HP</AddOnType>
281
+ <ProhibitedWithAnyOf>
282
+ <AddOnTypeV5>US-A-RRM</AddOnTypeV5>
283
+ <AddOnTypeV5>US-A-INS</AddOnTypeV5>
284
+ <AddOnTypeV5>US-A-REG</AddOnTypeV5>
285
+ <AddOnTypeV5>US-A-RD</AddOnTypeV5>
286
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
287
+ <AddOnTypeV5>US-A-CM</AddOnTypeV5>
288
+ <AddOnTypeV5>US-A-RR</AddOnTypeV5>
289
+ <AddOnTypeV5>US-A-LAWS</AddOnTypeV5>
290
+ </ProhibitedWithAnyOf>
291
+ </AddOnV5>
292
+ <AddOnV5>
293
+ <AddOnType>US-A-NND</AddOnType>
294
+ <RequiresAllOf>
295
+ <RequiresOneOf>
296
+ <AddOnTypeV5>US-A-COD</AddOnTypeV5>
297
+ </RequiresOneOf>
298
+ </RequiresAllOf>
299
+ </AddOnV5>
300
+ <AddOnV5>
301
+ <AddOnType>US-A-SR</AddOnType>
302
+ </AddOnV5>
303
+ <AddOnV5>
304
+ <AddOnType>US-A-CR</AddOnType>
305
+ <ProhibitedWithAnyOf>
306
+ <AddOnTypeV5>US-A-HM</AddOnTypeV5>
307
+ <AddOnTypeV5>US-A-LANS</AddOnTypeV5>
308
+ <AddOnTypeV5>US-A-LAWS</AddOnTypeV5>
309
+ </ProhibitedWithAnyOf>
310
+ </AddOnV5>
311
+ <AddOnV5>
312
+ <AddOnType>US-A-HM</AddOnType>
313
+ <ProhibitedWithAnyOf>
314
+ <AddOnTypeV5>US-A-CR</AddOnTypeV5>
315
+ <AddOnTypeV5>US-A-LANS</AddOnTypeV5>
316
+ <AddOnTypeV5>US-A-LAWS</AddOnTypeV5>
317
+ </ProhibitedWithAnyOf>
318
+ </AddOnV5>
319
+ <AddOnV5>
320
+ <AddOnType>US-A-LANS</AddOnType>
321
+ <ProhibitedWithAnyOf>
322
+ <AddOnTypeV5>US-A-CR</AddOnTypeV5>
323
+ <AddOnTypeV5>US-A-HM</AddOnTypeV5>
324
+ <AddOnTypeV5>US-A-LAWS</AddOnTypeV5>
325
+ </ProhibitedWithAnyOf>
326
+ </AddOnV5>
327
+ <AddOnV5>
328
+ <Amount>2.4</Amount>
329
+ <AddOnType>US-A-LAWS</AddOnType>
330
+ <ProhibitedWithAnyOf>
331
+ <AddOnTypeV5>US-A-CR</AddOnTypeV5>
332
+ <AddOnTypeV5>US-A-HM</AddOnTypeV5>
333
+ <AddOnTypeV5>US-A-LANS</AddOnTypeV5>
334
+ <AddOnTypeV5>SC-A-HP</AddOnTypeV5>
335
+ </ProhibitedWithAnyOf>
336
+ </AddOnV5>
337
+ <AddOnV5>
338
+ <Amount>5</Amount>
339
+ <AddOnType>US-A-1030</AddOnType>
340
+ </AddOnV5>
341
+ </AddOns>
342
+ <EffectiveWeightInOunces>192</EffectiveWeightInOunces>
343
+ <IsIntraBMC>true</IsIntraBMC>
344
+ <Zone>1</Zone>
345
+ <RateCategory>7003</RateCategory>
346
+ <ToState>CA</ToState>
347
+ </Rate>
348
+ </Rates>
349
+ </GetRatesResponse>
350
+ </soap:Body>
351
+ </soap:Envelope>