solidus_active_shipping 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +1 -0
  4. data/.simplecov +5 -0
  5. data/.travis.yml +21 -0
  6. data/Gemfile +18 -0
  7. data/README.md +192 -0
  8. data/Rakefile +21 -0
  9. data/app/assets/javascripts/admin/product_packages/edit.js.coffee +4 -0
  10. data/app/assets/javascripts/admin/product_packages/index.js.coffee +28 -0
  11. data/app/assets/javascripts/admin/product_packages/new.js.coffee +7 -0
  12. data/app/assets/javascripts/spree/backend/solidus_active_shipping.js +0 -0
  13. data/app/assets/javascripts/spree/frontend/solidus_active_shipping.js +0 -0
  14. data/app/assets/stylesheets/spree/backend/solidus_active_shipping.css +0 -0
  15. data/app/assets/stylesheets/spree/frontend/solidus_active_shipping.css +0 -0
  16. data/app/controllers/spree/admin/active_shipping_settings_controller.rb +27 -0
  17. data/app/controllers/spree/admin/product_packages_controller.rb +17 -0
  18. data/app/controllers/spree/admin/products_controller_decorator.rb +12 -0
  19. data/app/controllers/spree/checkout_controller_decorator.rb +11 -0
  20. data/app/controllers/spree/orders_controller_decorator.rb +11 -0
  21. data/app/models/spree/calculator/shipping/active_shipping/base.rb +208 -0
  22. data/app/models/spree/calculator/shipping/canada_post/base.rb +17 -0
  23. data/app/models/spree/calculator/shipping/canada_post/expedited.rb +11 -0
  24. data/app/models/spree/calculator/shipping/canada_post/parcel_surface.rb +11 -0
  25. data/app/models/spree/calculator/shipping/canada_post/priority_worldwide_intl.rb +12 -0
  26. data/app/models/spree/calculator/shipping/canada_post/regular.rb +11 -0
  27. data/app/models/spree/calculator/shipping/canada_post/small_packets_air.rb +11 -0
  28. data/app/models/spree/calculator/shipping/canada_post/small_packets_surface.rb +11 -0
  29. data/app/models/spree/calculator/shipping/canada_post/xpresspost.rb +11 -0
  30. data/app/models/spree/calculator/shipping/canada_post/xpresspost_international.rb +11 -0
  31. data/app/models/spree/calculator/shipping/fedex/base.rb +21 -0
  32. data/app/models/spree/calculator/shipping/fedex/express_saver.rb +13 -0
  33. data/app/models/spree/calculator/shipping/fedex/first_overnight.rb +13 -0
  34. data/app/models/spree/calculator/shipping/fedex/ground.rb +13 -0
  35. data/app/models/spree/calculator/shipping/fedex/ground_home_delivery.rb +13 -0
  36. data/app/models/spree/calculator/shipping/fedex/international_economy.rb +13 -0
  37. data/app/models/spree/calculator/shipping/fedex/international_economy_freight.rb +13 -0
  38. data/app/models/spree/calculator/shipping/fedex/international_first.rb +13 -0
  39. data/app/models/spree/calculator/shipping/fedex/international_ground.rb +13 -0
  40. data/app/models/spree/calculator/shipping/fedex/international_priority.rb +13 -0
  41. data/app/models/spree/calculator/shipping/fedex/international_priority_freight.rb +13 -0
  42. data/app/models/spree/calculator/shipping/fedex/international_priority_saturday_delivery.rb +13 -0
  43. data/app/models/spree/calculator/shipping/fedex/one_day_freight.rb +13 -0
  44. data/app/models/spree/calculator/shipping/fedex/one_day_freight_saturday_delivery.rb +13 -0
  45. data/app/models/spree/calculator/shipping/fedex/priority_overnight.rb +13 -0
  46. data/app/models/spree/calculator/shipping/fedex/priority_overnight_saturday_delivery.rb +11 -0
  47. data/app/models/spree/calculator/shipping/fedex/saver.rb +11 -0
  48. data/app/models/spree/calculator/shipping/fedex/standard_overnight.rb +11 -0
  49. data/app/models/spree/calculator/shipping/fedex/three_day_freight.rb +11 -0
  50. data/app/models/spree/calculator/shipping/fedex/three_day_freight_saturday_delivery.rb +11 -0
  51. data/app/models/spree/calculator/shipping/fedex/two_day.rb +11 -0
  52. data/app/models/spree/calculator/shipping/fedex/two_day_freight.rb +11 -0
  53. data/app/models/spree/calculator/shipping/fedex/two_day_freight_saturday_delivery.rb +11 -0
  54. data/app/models/spree/calculator/shipping/fedex/two_day_saturday_delivery.rb +11 -0
  55. data/app/models/spree/calculator/shipping/ups/base.rb +30 -0
  56. data/app/models/spree/calculator/shipping/ups/express.rb +11 -0
  57. data/app/models/spree/calculator/shipping/ups/ground.rb +11 -0
  58. data/app/models/spree/calculator/shipping/ups/next_day_air.rb +11 -0
  59. data/app/models/spree/calculator/shipping/ups/next_day_air_early_am.rb +11 -0
  60. data/app/models/spree/calculator/shipping/ups/next_day_air_saver.rb +11 -0
  61. data/app/models/spree/calculator/shipping/ups/saver.rb +11 -0
  62. data/app/models/spree/calculator/shipping/ups/second_day_air.rb +11 -0
  63. data/app/models/spree/calculator/shipping/ups/standard.rb +11 -0
  64. data/app/models/spree/calculator/shipping/ups/three_day_select.rb +11 -0
  65. data/app/models/spree/calculator/shipping/ups/worldwide_expedited.rb +11 -0
  66. data/app/models/spree/calculator/shipping/usps/base.rb +84 -0
  67. data/app/models/spree/calculator/shipping/usps/express_mail.rb +19 -0
  68. data/app/models/spree/calculator/shipping/usps/express_mail_international.rb +46 -0
  69. data/app/models/spree/calculator/shipping/usps/first_class_mail_international.rb +31 -0
  70. data/app/models/spree/calculator/shipping/usps/first_class_mail_international_large_envelope.rb +31 -0
  71. data/app/models/spree/calculator/shipping/usps/first_class_mail_parcel.rb +28 -0
  72. data/app/models/spree/calculator/shipping/usps/first_class_package_international.rb +49 -0
  73. data/app/models/spree/calculator/shipping/usps/global_express_guaranteed.rb +48 -0
  74. data/app/models/spree/calculator/shipping/usps/media_mail.rb +19 -0
  75. data/app/models/spree/calculator/shipping/usps/priority_mail.rb +19 -0
  76. data/app/models/spree/calculator/shipping/usps/priority_mail_flat_rate_envelope.rb +19 -0
  77. data/app/models/spree/calculator/shipping/usps/priority_mail_international.rb +49 -0
  78. data/app/models/spree/calculator/shipping/usps/priority_mail_international_large_flat_rate_box.rb +43 -0
  79. data/app/models/spree/calculator/shipping/usps/priority_mail_international_medium_flat_rate_box.rb +43 -0
  80. data/app/models/spree/calculator/shipping/usps/priority_mail_international_small_flat_rate_box.rb +43 -0
  81. data/app/models/spree/calculator/shipping/usps/priority_mail_large_flat_rate_box.rb +19 -0
  82. data/app/models/spree/calculator/shipping/usps/priority_mail_medium_flat_rate_box.rb +19 -0
  83. data/app/models/spree/calculator/shipping/usps/priority_mail_small_flat_rate_box.rb +19 -0
  84. data/app/models/spree/calculator/shipping/usps/standard_post.rb +19 -0
  85. data/app/models/spree/content_item_decorator.rb +7 -0
  86. data/app/models/spree/line_item_decorator.rb +4 -0
  87. data/app/models/spree/package_builder.rb +114 -0
  88. data/app/models/spree/product_decorator.rb +10 -0
  89. data/app/models/spree/product_package.rb +10 -0
  90. data/app/models/spree/stock_location_decorator.rb +10 -0
  91. data/app/models/spree/variant_decorator.rb +3 -0
  92. data/app/overrides/spree/admin/shared/_configuration_menu/add_active_shipping_settings_tab.html.erb.deface +3 -0
  93. data/app/overrides/spree/admin/shared/_product_tabs/add_product_packages_tab.html.erb.deface +7 -0
  94. data/app/views/spree/admin/active_shipping_settings/edit.html.erb +92 -0
  95. data/app/views/spree/admin/product_packages/_form.html.erb +24 -0
  96. data/app/views/spree/admin/product_packages/edit.html.erb +15 -0
  97. data/app/views/spree/admin/product_packages/index.html.erb +46 -0
  98. data/app/views/spree/admin/product_packages/new.html.erb +15 -0
  99. data/config/locales/en.yml +93 -0
  100. data/config/locales/fr.yml +12 -0
  101. data/config/routes.rb +9 -0
  102. data/db/migrate/20130107030221_create_product_packages.rb +12 -0
  103. data/lib/solidus_active_shipping.rb +3 -0
  104. data/lib/solidus_active_shipping/engine.rb +44 -0
  105. data/lib/spree/active_shipping_configuration.rb +24 -0
  106. data/lib/spree/shipping_error.rb +3 -0
  107. data/solidus_active_shipping.gemspec +33 -0
  108. data/spec/cassettes/Checkout/with_valid_shipping_address/does_not_break_the_per-item_shipping_method_calculator.yml +134 -0
  109. data/spec/cassettes/FedEx_calculators/with_Canadian_origin_address/Spree_Calculator_Shipping_Fedex_Ground/1_1_1_1.yml +48 -0
  110. data/spec/cassettes/FedEx_calculators/with_Canadian_origin_address/Spree_Calculator_Shipping_Fedex_InternationalEconomy/1_1_2_1.yml +48 -0
  111. data/spec/cassettes/FedEx_calculators/with_Canadian_origin_address/Spree_Calculator_Shipping_Fedex_InternationalFirst/1_1_3_1.yml +48 -0
  112. data/spec/cassettes/FedEx_calculators/with_Canadian_origin_address/Spree_Calculator_Shipping_Fedex_InternationalPriority/1_1_4_1.yml +48 -0
  113. data/spec/cassettes/FedEx_calculators/with_US_origin_address/Spree_Calculator_Shipping_Fedex_ExpressSaver/1_2_5_1.yml +48 -0
  114. data/spec/cassettes/FedEx_calculators/with_US_origin_address/Spree_Calculator_Shipping_Fedex_FirstOvernight/1_2_1_1.yml +48 -0
  115. data/spec/cassettes/FedEx_calculators/with_US_origin_address/Spree_Calculator_Shipping_Fedex_GroundHomeDelivery/1_2_6_1.yml +48 -0
  116. data/spec/cassettes/FedEx_calculators/with_US_origin_address/Spree_Calculator_Shipping_Fedex_PriorityOvernight/1_2_2_1.yml +48 -0
  117. data/spec/cassettes/FedEx_calculators/with_US_origin_address/Spree_Calculator_Shipping_Fedex_StandardOvernight/1_2_3_1.yml +48 -0
  118. data/spec/cassettes/FedEx_calculators/with_US_origin_address/Spree_Calculator_Shipping_Fedex_TwoDay/1_2_4_1.yml +48 -0
  119. data/spec/cassettes/UPS_calculators/with_Canadian_origin_address/Spree_Calculator_Shipping_Ups_Express/1_1_1_1.yml +103 -0
  120. data/spec/cassettes/UPS_calculators/with_Canadian_origin_address/Spree_Calculator_Shipping_Ups_Saver/1_1_3_1.yml +103 -0
  121. data/spec/cassettes/UPS_calculators/with_Canadian_origin_address/Spree_Calculator_Shipping_Ups_Standard/1_1_4_1.yml +103 -0
  122. data/spec/cassettes/UPS_calculators/with_Canadian_origin_address/Spree_Calculator_Shipping_Ups_ThreeDaySelect/1_1_5_1.yml +103 -0
  123. data/spec/cassettes/UPS_calculators/with_Canadian_origin_address/Spree_Calculator_Shipping_Ups_WorldwideExpedited/1_1_2_1.yml +103 -0
  124. data/spec/cassettes/UPS_calculators/with_US_origin_address/Spree_Calculator_Shipping_Ups_Ground/1_2_1_1.yml +103 -0
  125. data/spec/cassettes/UPS_calculators/with_US_origin_address/Spree_Calculator_Shipping_Ups_NextDayAir/1_2_2_1.yml +103 -0
  126. data/spec/cassettes/UPS_calculators/with_US_origin_address/Spree_Calculator_Shipping_Ups_NextDayAirEarlyAm/1_2_3_1.yml +103 -0
  127. data/spec/cassettes/UPS_calculators/with_US_origin_address/Spree_Calculator_Shipping_Ups_NextDayAirSaver/1_2_4_1.yml +103 -0
  128. data/spec/cassettes/UPS_calculators/with_US_origin_address/Spree_Calculator_Shipping_Ups_SecondDayAir/1_2_5_1.yml +103 -0
  129. data/spec/controllers/admin/active_shipping_settings_controller_spec.rb +38 -0
  130. data/spec/controllers/admin/product_packages_controller_spec.rb +36 -0
  131. data/spec/factories/order_factory_override.rb +46 -0
  132. data/spec/factories/product_package_factory.rb +9 -0
  133. data/spec/factories/state_factory_override.rb +28 -0
  134. data/spec/features/checkout_spec.rb +37 -0
  135. data/spec/fixtures/normal_rates_request.xml +2 -0
  136. data/spec/integrations/calculators/fedex_spec.rb +56 -0
  137. data/spec/integrations/calculators/ups_spec.rb +56 -0
  138. data/spec/lib/spree/active_shipping/bogus_carrier.rb +18 -0
  139. data/spec/lib/spree/calculator/shipping/bogus_calculator.rb +17 -0
  140. data/spec/models/active_shipping_calculator_spec.rb +182 -0
  141. data/spec/models/carriers/usps_calculator_spec.rb +72 -0
  142. data/spec/models/package_builder_spec.rb +173 -0
  143. data/spec/spec.opts +6 -0
  144. data/spec/spec_helper.rb +80 -0
  145. data/spec/support/capybara.rb +24 -0
  146. data/spec/support/checkout_helper.rb +12 -0
  147. data/spec/support/feature_helper.rb +7 -0
  148. data/spec/support/package_helper.rb +9 -0
  149. data/spec/support/shared_contexts/checkout_setup.rb +12 -0
  150. data/spec/support/shared_contexts/package_setup.rb +34 -0
  151. data/spec/support/shared_contexts/shipping_carriers/fedex.rb +15 -0
  152. data/spec/support/shared_contexts/shipping_carriers/ups.rb +14 -0
  153. data/spec/support/shared_contexts/stock_location_setup.rb +26 -0
  154. data/spec/support/web_fixtures.rb +6 -0
  155. metadata +444 -0
@@ -0,0 +1,17 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module CanadaPost
6
+ class Base < Spree::Calculator::Shipping::ActiveShipping::Base
7
+ def carrier
8
+ canada_post_options = {
9
+ :login => Spree::ActiveShipping::Config[:canada_post_login],
10
+ :french => (I18n.locale.to_sym == :fr)
11
+ }
12
+ ::ActiveShipping::CanadaPost.new(canada_post_options)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module CanadaPost
4
+ class Expedited < Spree::Calculator::Shipping::CanadaPost::Base
5
+ def self.description
6
+ I18n.t("canada_post.expedited")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module CanadaPost
4
+ class ParcelSurface < Spree::Calculator::Shipping::CanadaPost::Base
5
+ def self.description
6
+ I18n.t("canada_post.parcel_surface")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module CanadaPost
4
+ class PriorityWorldwideIntl < Spree::Calculator::Shipping::CanadaPost::Base
5
+ def self.description
6
+ I18n.t("canada_post.priority_worldwide_intl")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
12
+
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module CanadaPost
4
+ class Regular < Spree::Calculator::Shipping::CanadaPost::Base
5
+ def self.description
6
+ I18n.t("canada_post.regular")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module CanadaPost
4
+ class SmallPacketsAir < Spree::Calculator::Shipping::CanadaPost::Base
5
+ def self.description
6
+ I18n.t("canada_post.small_packets_air")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module CanadaPost
4
+ class SmallPacketsSurface < Spree::Calculator::Shipping::CanadaPost::Base
5
+ def self.description
6
+ I18n.t("canada_post.small_packets_surface")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module CanadaPost
4
+ class Xpresspost < Spree::Calculator::Shipping::CanadaPost::Base
5
+ def self.description
6
+ I18n.t("canada_post.xpresspost")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module CanadaPost
4
+ class XpresspostInternational < Spree::Calculator::Shipping::CanadaPost::Base
5
+ def self.description
6
+ I18n.t("canada_post.xpresspost_international")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,21 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class Base < Spree::Calculator::Shipping::ActiveShipping::Base
7
+ def carrier
8
+ carrier_details = {
9
+ :key => Spree::ActiveShipping::Config[:fedex_key],
10
+ :password => Spree::ActiveShipping::Config[:fedex_password],
11
+ :account => Spree::ActiveShipping::Config[:fedex_account],
12
+ :login => Spree::ActiveShipping::Config[:fedex_login],
13
+ :test => Spree::ActiveShipping::Config[:test_mode]
14
+ }
15
+
16
+ ::ActiveShipping::FedEx.new(carrier_details)
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class ExpressSaver < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.express_saver")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class FirstOvernight < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.first_overnight")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class Ground < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.ground")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class GroundHomeDelivery < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.ground_home_delivery")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class InternationalEconomy < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.intl_economy")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class InternationalEconomyFreight < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.intl_economy_freight")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class InternationalFirst < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.intl_first")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class InternationalGround < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.intl_ground")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class InternationalPriority < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.intl_priority")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class InternationalPriorityFreight < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.intl_priority_freight")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class InternationalPrioritySaturdayDelivery < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.intl_priority_saturday_delivery")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class OneDayFreight < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.one_day_freight")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class OneDayFreightSaturdayDelivery < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.one_day_freight_saturday_delivery")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency 'spree/calculator'
2
+
3
+ module Spree
4
+ module Calculator::Shipping
5
+ module Fedex
6
+ class PriorityOvernight < Spree::Calculator::Shipping::Fedex::Base
7
+ def self.description
8
+ I18n.t("fedex.priority_overnight")
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module Fedex
4
+ class PriorityOvernightSaturdayDelivery < Spree::Calculator::Shipping::Fedex::Base
5
+ def self.description
6
+ I18n.t("fedex.priority_overnight_saturday_delivery")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module Fedex
4
+ class Saver < Spree::Calculator::Shipping::Fedex::Base
5
+ def self.description
6
+ I18n.t("fedex.saver")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module Fedex
4
+ class StandardOvernight < Spree::Calculator::Shipping::Fedex::Base
5
+ def self.description
6
+ I18n.t("fedex.standard_overnight")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module Fedex
4
+ class ThreeDayFreight < Spree::Calculator::Shipping::Fedex::Base
5
+ def self.description
6
+ I18n.t("fedex.three_day_freight")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module Fedex
4
+ class ThreeDayFreightSaturdayDelivery < Spree::Calculator::Shipping::Fedex::Base
5
+ def self.description
6
+ I18n.t("fedex.three_day_freight_saturday_delivery")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module Fedex
4
+ class TwoDay < Spree::Calculator::Shipping::Fedex::Base
5
+ def self.description
6
+ I18n.t("fedex.two_day")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module Fedex
4
+ class TwoDayFreight < Spree::Calculator::Shipping::Fedex::Base
5
+ def self.description
6
+ I18n.t("fedex.two_day_freight")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Calculator::Shipping
3
+ module Fedex
4
+ class TwoDayFreightSaturdayDelivery < Spree::Calculator::Shipping::Fedex::Base
5
+ def self.description
6
+ I18n.t("fedex.two_day_freight_saturday_delivery")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end