spree_api 3.0.10 → 3.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/spree/api/base_controller.rb +21 -22
- data/app/controllers/spree/api/v1/addresses_controller.rb +46 -0
- data/app/controllers/spree/api/v1/checkouts_controller.rb +103 -0
- data/app/controllers/spree/api/v1/classifications_controller.rb +20 -0
- data/app/controllers/spree/api/v1/countries_controller.rb +24 -0
- data/app/controllers/spree/api/v1/credit_cards_controller.rb +27 -0
- data/app/controllers/spree/api/v1/images_controller.rb +56 -0
- data/app/controllers/spree/api/v1/inventory_units_controller.rb +54 -0
- data/app/controllers/spree/api/v1/line_items_controller.rb +70 -0
- data/app/controllers/spree/api/v1/option_types_controller.rb +51 -0
- data/app/controllers/spree/api/v1/option_values_controller.rb +60 -0
- data/app/controllers/spree/api/v1/orders_controller.rb +137 -0
- data/app/controllers/spree/api/v1/payments_controller.rb +82 -0
- data/app/controllers/spree/api/v1/product_properties_controller.rb +73 -0
- data/app/controllers/spree/api/v1/products_controller.rb +126 -0
- data/app/controllers/spree/api/v1/promotions_controller.rb +28 -0
- data/app/controllers/spree/api/v1/properties_controller.rb +72 -0
- data/app/controllers/spree/api/v1/return_authorizations_controller.rb +71 -0
- data/app/controllers/spree/api/v1/shipments_controller.rb +163 -0
- data/app/controllers/spree/api/v1/states_controller.rb +37 -0
- data/app/controllers/spree/api/v1/stock_items_controller.rb +77 -0
- data/app/controllers/spree/api/v1/stock_locations_controller.rb +52 -0
- data/app/controllers/spree/api/v1/stock_movements_controller.rb +45 -0
- data/app/controllers/spree/api/v1/stores_controller.rb +57 -0
- data/app/controllers/spree/api/v1/taxonomies_controller.rb +66 -0
- data/app/controllers/spree/api/v1/taxons_controller.rb +95 -0
- data/app/controllers/spree/api/v1/users_controller.rb +60 -0
- data/app/controllers/spree/api/v1/variants_controller.rb +75 -0
- data/app/controllers/spree/api/v1/zones_controller.rb +51 -0
- data/app/helpers/spree/api/api_helpers.rb +3 -2
- data/app/views/spree/api/{addresses → v1/addresses}/show.v1.rabl +0 -0
- data/app/views/spree/api/{adjustments → v1/adjustments}/show.v1.rabl +0 -0
- data/app/views/spree/api/{config → v1/config}/money.v1.rabl +0 -0
- data/app/views/spree/api/{config → v1/config}/show.v1.rabl +0 -0
- data/app/views/spree/api/{countries → v1/countries}/index.v1.rabl +0 -0
- data/app/views/spree/api/{countries → v1/countries}/show.v1.rabl +0 -0
- data/app/views/spree/api/{credit_cards → v1/credit_cards}/index.v1.rabl +1 -1
- data/app/views/spree/api/{credit_cards → v1/credit_cards}/show.v1.rabl +0 -0
- data/app/views/spree/api/{images → v1/images}/index.v1.rabl +1 -1
- data/app/views/spree/api/v1/images/new.v1.rabl +3 -0
- data/app/views/spree/api/{images → v1/images}/show.v1.rabl +0 -0
- data/app/views/spree/api/{inventory_units → v1/inventory_units}/show.rabl +0 -0
- data/app/views/spree/api/{line_items → v1/line_items}/new.v1.rabl +0 -0
- data/app/views/spree/api/{line_items → v1/line_items}/show.v1.rabl +3 -3
- data/app/views/spree/api/v1/option_types/index.v1.rabl +3 -0
- data/app/views/spree/api/v1/option_types/new.v1.rabl +3 -0
- data/app/views/spree/api/{option_types → v1/option_types}/show.v1.rabl +0 -0
- data/app/views/spree/api/v1/option_values/index.v1.rabl +3 -0
- data/app/views/spree/api/v1/option_values/new.v1.rabl +3 -0
- data/app/views/spree/api/{option_values → v1/option_values}/show.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/address.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/canceled.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/cart.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/complete.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/could_not_apply_coupon.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/could_not_transition.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/index.v1.rabl +1 -1
- data/app/views/spree/api/{orders → v1/orders}/invalid_shipping_method.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/mine.v1.rabl +1 -1
- data/app/views/spree/api/{orders → v1/orders}/order.v1.rabl +1 -0
- data/app/views/spree/api/{orders → v1/orders}/payment.v1.rabl +0 -0
- data/app/views/spree/api/{orders → v1/orders}/show.v1.rabl +9 -9
- data/app/views/spree/api/{payments → v1/payments}/credit_over_limit.v1.rabl +0 -0
- data/app/views/spree/api/{payments → v1/payments}/index.v1.rabl +0 -0
- data/app/views/spree/api/{payments → v1/payments}/new.v1.rabl +0 -0
- data/app/views/spree/api/{payments → v1/payments}/show.v1.rabl +0 -0
- data/app/views/spree/api/{payments → v1/payments}/update_forbidden.v1.rabl +0 -0
- data/app/views/spree/api/{product_properties → v1/product_properties}/index.v1.rabl +0 -0
- data/app/views/spree/api/{product_properties → v1/product_properties}/new.v1.rabl +0 -0
- data/app/views/spree/api/{product_properties → v1/product_properties}/show.v1.rabl +0 -0
- data/app/views/spree/api/{products → v1/products}/index.v1.rabl +1 -1
- data/app/views/spree/api/{products → v1/products}/new.v1.rabl +0 -0
- data/app/views/spree/api/{products → v1/products}/product.v1.rabl +0 -0
- data/app/views/spree/api/{products → v1/products}/show.v1.rabl +3 -3
- data/app/views/spree/api/{promotions → v1/promotions}/handler.v1.rabl +0 -0
- data/app/views/spree/api/{promotions → v1/promotions}/show.v1.rabl +0 -0
- data/app/views/spree/api/{properties → v1/properties}/index.v1.rabl +0 -0
- data/app/views/spree/api/{properties → v1/properties}/new.v1.rabl +0 -0
- data/app/views/spree/api/{properties → v1/properties}/show.v1.rabl +0 -0
- data/app/views/spree/api/{return_authorizations → v1/return_authorizations}/index.v1.rabl +0 -0
- data/app/views/spree/api/{return_authorizations → v1/return_authorizations}/new.v1.rabl +0 -0
- data/app/views/spree/api/{return_authorizations → v1/return_authorizations}/show.v1.rabl +0 -0
- data/app/views/spree/api/{shared → v1/shared}/stock_location_required.v1.rabl +0 -0
- data/app/views/spree/api/{shipments → v1/shipments}/big.v1.rabl +7 -7
- data/app/views/spree/api/{shipments → v1/shipments}/cannot_ready_shipment.v1.rabl +0 -0
- data/app/views/spree/api/{shipments → v1/shipments}/mine.v1.rabl +1 -1
- data/app/views/spree/api/{shipments → v1/shipments}/show.v1.rabl +3 -3
- data/app/views/spree/api/{shipments → v1/shipments}/small.v1.rabl +3 -3
- data/app/views/spree/api/{shipping_rates → v1/shipping_rates}/show.v1.rabl +0 -0
- data/app/views/spree/api/{states → v1/states}/index.v1.rabl +0 -0
- data/app/views/spree/api/{states → v1/states}/show.v1.rabl +0 -0
- data/app/views/spree/api/{stock_items → v1/stock_items}/index.v1.rabl +1 -1
- data/app/views/spree/api/{stock_items → v1/stock_items}/show.v1.rabl +1 -1
- data/app/views/spree/api/{stock_locations → v1/stock_locations}/index.v1.rabl +1 -1
- data/app/views/spree/api/{stock_locations → v1/stock_locations}/show.v1.rabl +0 -0
- data/app/views/spree/api/{stock_movements → v1/stock_movements}/index.v1.rabl +1 -1
- data/app/views/spree/api/{stock_movements → v1/stock_movements}/show.v1.rabl +1 -1
- data/app/views/spree/api/{stores → v1/stores}/index.v1.rabl +0 -0
- data/app/views/spree/api/{stores → v1/stores}/show.v1.rabl +0 -0
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/index.v1.rabl +1 -1
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/jstree.rabl +0 -0
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/nested.v1.rabl +1 -1
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/new.v1.rabl +0 -0
- data/app/views/spree/api/{taxonomies → v1/taxonomies}/show.v1.rabl +4 -4
- data/app/views/spree/api/{taxons → v1/taxons}/index.v1.rabl +1 -1
- data/app/views/spree/api/{taxons → v1/taxons}/jstree.rabl +0 -0
- data/app/views/spree/api/{taxons → v1/taxons}/new.v1.rabl +0 -0
- data/app/views/spree/api/{taxons → v1/taxons}/show.v1.rabl +0 -0
- data/app/views/spree/api/v1/taxons/taxons.v1.rabl +5 -0
- data/app/views/spree/api/{users → v1/users}/index.v1.rabl +1 -1
- data/app/views/spree/api/{users → v1/users}/new.v1.rabl +0 -0
- data/app/views/spree/api/{users → v1/users}/show.v1.rabl +2 -2
- data/app/views/spree/api/{variants → v1/variants}/big.v1.rabl +1 -1
- data/app/views/spree/api/{variants → v1/variants}/index.v1.rabl +1 -1
- data/app/views/spree/api/{variants → v1/variants}/new.v1.rabl +0 -0
- data/app/views/spree/api/{variants → v1/variants}/show.v1.rabl +1 -1
- data/app/views/spree/api/{variants → v1/variants}/small.v1.rabl +1 -1
- data/app/views/spree/api/{zones → v1/zones}/index.v1.rabl +1 -1
- data/app/views/spree/api/{zones → v1/zones}/show.v1.rabl +0 -0
- data/config/routes.rb +85 -88
- data/spec/controllers/spree/api/base_controller_spec.rb +14 -42
- data/spec/controllers/spree/api/{addresses_controller_spec.rb → v1/addresses_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{checkouts_controller_spec.rb → v1/checkouts_controller_spec.rb} +51 -3
- data/spec/controllers/spree/api/{classifications_controller_spec.rb → v1/classifications_controller_spec.rb} +2 -2
- data/spec/controllers/spree/api/{countries_controller_spec.rb → v1/countries_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{credit_cards_controller_spec.rb → v1/credit_cards_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{images_controller_spec.rb → v1/images_controller_spec.rb} +23 -1
- data/spec/controllers/spree/api/{inventory_units_controller_spec.rb → v1/inventory_units_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{line_items_controller_spec.rb → v1/line_items_controller_spec.rb} +2 -2
- data/spec/controllers/spree/api/{option_types_controller_spec.rb → v1/option_types_controller_spec.rb} +9 -3
- data/spec/controllers/spree/api/{option_values_controller_spec.rb → v1/option_values_controller_spec.rb} +8 -2
- data/spec/controllers/spree/api/{orders_controller_spec.rb → v1/orders_controller_spec.rb} +29 -8
- data/spec/controllers/spree/api/{payments_controller_spec.rb → v1/payments_controller_spec.rb} +2 -2
- data/spec/controllers/spree/api/{product_properties_controller_spec.rb → v1/product_properties_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{products_controller_spec.rb → v1/products_controller_spec.rb} +5 -5
- data/spec/controllers/spree/api/{promotion_application_spec.rb → v1/promotion_application_spec.rb} +2 -2
- data/spec/controllers/spree/api/{promotions_controller_spec.rb → v1/promotions_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{properties_controller_spec.rb → v1/properties_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{return_authorizations_controller_spec.rb → v1/return_authorizations_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{shipments_controller_spec.rb → v1/shipments_controller_spec.rb} +4 -4
- data/spec/controllers/spree/api/{states_controller_spec.rb → v1/states_controller_spec.rb} +14 -10
- data/spec/controllers/spree/api/{stock_items_controller_spec.rb → v1/stock_items_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{stock_locations_controller_spec.rb → v1/stock_locations_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{stock_movements_controller_spec.rb → v1/stock_movements_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{stores_controller_spec.rb → v1/stores_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{taxonomies_controller_spec.rb → v1/taxonomies_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{taxons_controller_spec.rb → v1/taxons_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{unauthenticated_products_controller_spec.rb → v1/unauthenticated_products_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{users_controller_spec.rb → v1/users_controller_spec.rb} +1 -1
- data/spec/controllers/spree/api/{variants_controller_spec.rb → v1/variants_controller_spec.rb} +3 -3
- data/spec/controllers/spree/api/{zones_controller_spec.rb → v1/zones_controller_spec.rb} +7 -5
- data/spec/requests/rabl_cache_spec.rb +2 -2
- data/spec/requests/ransackable_attributes_spec.rb +6 -6
- data/spec/requests/version_spec.rb +19 -0
- data/spree_api.gemspec +1 -1
- metadata +188 -185
- data/CHANGELOG.md +0 -3
- data/app/controllers/spree/api/addresses_controller.rb +0 -43
- data/app/controllers/spree/api/checkouts_controller.rb +0 -98
- data/app/controllers/spree/api/classifications_controller.rb +0 -18
- data/app/controllers/spree/api/countries_controller.rb +0 -23
- data/app/controllers/spree/api/credit_cards_controller.rb +0 -25
- data/app/controllers/spree/api/images_controller.rb +0 -47
- data/app/controllers/spree/api/inventory_units_controller.rb +0 -52
- data/app/controllers/spree/api/line_items_controller.rb +0 -69
- data/app/controllers/spree/api/option_types_controller.rb +0 -49
- data/app/controllers/spree/api/option_values_controller.rb +0 -58
- data/app/controllers/spree/api/orders_controller.rb +0 -130
- data/app/controllers/spree/api/payments_controller.rb +0 -80
- data/app/controllers/spree/api/product_properties_controller.rb +0 -72
- data/app/controllers/spree/api/products_controller.rb +0 -124
- data/app/controllers/spree/api/promotions_controller.rb +0 -26
- data/app/controllers/spree/api/properties_controller.rb +0 -70
- data/app/controllers/spree/api/return_authorizations_controller.rb +0 -69
- data/app/controllers/spree/api/shipments_controller.rb +0 -149
- data/app/controllers/spree/api/states_controller.rb +0 -38
- data/app/controllers/spree/api/stock_items_controller.rb +0 -75
- data/app/controllers/spree/api/stock_locations_controller.rb +0 -50
- data/app/controllers/spree/api/stock_movements_controller.rb +0 -43
- data/app/controllers/spree/api/stores_controller.rb +0 -55
- data/app/controllers/spree/api/taxonomies_controller.rb +0 -64
- data/app/controllers/spree/api/taxons_controller.rb +0 -93
- data/app/controllers/spree/api/users_controller.rb +0 -56
- data/app/controllers/spree/api/variants_controller.rb +0 -73
- data/app/controllers/spree/api/zones_controller.rb +0 -49
- data/app/models/spree/option_value_decorator.rb +0 -9
- data/app/views/spree/api/option_types/index.v1.rabl +0 -3
- data/app/views/spree/api/option_values/index.v1.rabl +0 -3
- data/app/views/spree/api/taxons/taxons.v1.rabl +0 -5
File without changes
|
@@ -5,11 +5,11 @@ node(:order_id) { |shipment| shipment.order.number }
|
|
5
5
|
node(:stock_location_name) { |shipment| shipment.stock_location.name }
|
6
6
|
|
7
7
|
child :shipping_rates => :shipping_rates do
|
8
|
-
extends "spree/api/shipping_rates/show"
|
8
|
+
extends "spree/api/v1/shipping_rates/show"
|
9
9
|
end
|
10
10
|
|
11
11
|
child :selected_shipping_rate => :selected_shipping_rate do
|
12
|
-
extends "spree/api/shipping_rates/show"
|
12
|
+
extends "spree/api/v1/shipping_rates/show"
|
13
13
|
end
|
14
14
|
|
15
15
|
child :shipping_methods => :shipping_methods do
|
@@ -25,7 +25,7 @@ end
|
|
25
25
|
|
26
26
|
child :manifest => :manifest do
|
27
27
|
child :variant => :variant do
|
28
|
-
extends "spree/api/variants/small"
|
28
|
+
extends "spree/api/v1/variants/small"
|
29
29
|
end
|
30
30
|
node(:quantity) { |m| m.quantity }
|
31
31
|
node(:states) { |m| m.states }
|
@@ -6,11 +6,11 @@ node(:order_id) { |shipment| shipment.order.number }
|
|
6
6
|
node(:stock_location_name) { |shipment| shipment.stock_location.name }
|
7
7
|
|
8
8
|
child :shipping_rates => :shipping_rates do
|
9
|
-
extends "spree/api/shipping_rates/show"
|
9
|
+
extends "spree/api/v1/shipping_rates/show"
|
10
10
|
end
|
11
11
|
|
12
12
|
child :selected_shipping_rate => :selected_shipping_rate do
|
13
|
-
extends "spree/api/shipping_rates/show"
|
13
|
+
extends "spree/api/v1/shipping_rates/show"
|
14
14
|
end
|
15
15
|
|
16
16
|
child :shipping_methods => :shipping_methods do
|
@@ -33,5 +33,5 @@ child :manifest => :manifest do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
child :adjustments => :adjustments do
|
36
|
-
extends "spree/api/adjustments/show"
|
36
|
+
extends "spree/api/v1/adjustments/show"
|
37
37
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,14 +1,14 @@
|
|
1
1
|
object @taxonomy
|
2
2
|
|
3
3
|
if params[:set] == 'nested'
|
4
|
-
extends "spree/api/taxonomies/nested"
|
4
|
+
extends "spree/api/v1/taxonomies/nested"
|
5
5
|
else
|
6
6
|
attributes *taxonomy_attributes
|
7
7
|
|
8
|
-
child :
|
9
|
-
|
8
|
+
child root: :root do
|
9
|
+
attributes *taxon_attributes
|
10
10
|
|
11
|
-
child :
|
11
|
+
child children: :taxons do
|
12
12
|
attributes *taxon_attributes
|
13
13
|
end
|
14
14
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,9 +2,9 @@ object @user
|
|
2
2
|
|
3
3
|
attributes *user_attributes
|
4
4
|
child(:bill_address => :bill_address) do
|
5
|
-
extends "spree/api/addresses/show"
|
5
|
+
extends "spree/api/v1/addresses/show"
|
6
6
|
end
|
7
7
|
|
8
8
|
child(:ship_address => :ship_address) do
|
9
|
-
extends "spree/api/addresses/show"
|
9
|
+
extends "spree/api/v1/addresses/show"
|
10
10
|
end
|
@@ -2,7 +2,7 @@ object @variant
|
|
2
2
|
|
3
3
|
cache [I18n.locale, @current_user_roles.include?('admin'), 'big_variant', root_object]
|
4
4
|
|
5
|
-
extends "spree/api/variants/small"
|
5
|
+
extends "spree/api/v1/variants/small"
|
6
6
|
|
7
7
|
child(:stock_items => :stock_items) do
|
8
8
|
attributes :id, :count_on_hand, :stock_location_id, :backorderable
|
File without changes
|
File without changes
|
data/config/routes.rb
CHANGED
@@ -1,124 +1,121 @@
|
|
1
1
|
Spree::Core::Engine.add_routes do
|
2
|
-
namespace :admin do
|
3
|
-
resources :users do
|
4
|
-
member do
|
5
|
-
put :generate_api_key
|
6
|
-
put :clear_api_key
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
2
|
namespace :api, defaults: { format: 'json' } do
|
12
|
-
|
13
|
-
|
14
|
-
resources :products do
|
15
|
-
resources :images
|
16
|
-
resources :variants
|
17
|
-
resources :product_properties
|
18
|
-
end
|
3
|
+
namespace :v1 do
|
4
|
+
resources :promotions, only: [:show]
|
19
5
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
put :apply_coupon_code
|
6
|
+
resources :products do
|
7
|
+
resources :images
|
8
|
+
resources :variants
|
9
|
+
resources :product_properties
|
25
10
|
end
|
26
11
|
|
27
|
-
|
28
|
-
resources :payments do
|
12
|
+
concern :order_routes do
|
29
13
|
member do
|
30
|
-
put :
|
31
|
-
put :
|
32
|
-
put :
|
33
|
-
put :
|
34
|
-
put :credit
|
14
|
+
put :approve
|
15
|
+
put :cancel
|
16
|
+
put :empty
|
17
|
+
put :apply_coupon_code
|
35
18
|
end
|
36
|
-
end
|
37
19
|
|
38
|
-
|
20
|
+
resources :line_items
|
21
|
+
resources :payments do
|
22
|
+
member do
|
23
|
+
put :authorize
|
24
|
+
put :capture
|
25
|
+
put :purchase
|
26
|
+
put :void
|
27
|
+
put :credit
|
28
|
+
end
|
29
|
+
end
|
39
30
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
31
|
+
resources :addresses, only: [:show, :update]
|
32
|
+
|
33
|
+
resources :return_authorizations do
|
34
|
+
member do
|
35
|
+
put :add
|
36
|
+
put :cancel
|
37
|
+
put :receive
|
38
|
+
end
|
45
39
|
end
|
46
40
|
end
|
47
|
-
end
|
48
41
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
42
|
+
resources :checkouts, only: [:update], concerns: :order_routes do
|
43
|
+
member do
|
44
|
+
put :next
|
45
|
+
put :advance
|
46
|
+
end
|
53
47
|
end
|
54
|
-
end
|
55
48
|
|
56
|
-
|
57
|
-
|
58
|
-
|
49
|
+
resources :variants do
|
50
|
+
resources :images
|
51
|
+
end
|
59
52
|
|
60
|
-
|
53
|
+
resources :option_types do
|
54
|
+
resources :option_values
|
55
|
+
end
|
61
56
|
resources :option_values
|
62
|
-
end
|
63
|
-
resources :option_values
|
64
57
|
|
65
|
-
|
58
|
+
resources :option_values, only: :index
|
66
59
|
|
67
|
-
|
68
|
-
|
60
|
+
get '/orders/mine', to: 'orders#mine', as: 'my_orders'
|
61
|
+
get "/orders/current", to: "orders#current", as: "current_order"
|
69
62
|
|
70
|
-
|
63
|
+
resources :orders, concerns: :order_routes
|
71
64
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
resources :shipments, only: [:create, :update] do
|
78
|
-
collection do
|
79
|
-
post 'transfer_to_location'
|
80
|
-
post 'transfer_to_shipment'
|
81
|
-
get :mine
|
65
|
+
resources :zones
|
66
|
+
resources :countries, only: [:index, :show] do
|
67
|
+
resources :states, only: [:index, :show]
|
82
68
|
end
|
83
69
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
end
|
91
|
-
resources :states, only: [:index, :show]
|
70
|
+
resources :shipments, only: [:create, :update] do
|
71
|
+
collection do
|
72
|
+
post 'transfer_to_location'
|
73
|
+
post 'transfer_to_shipment'
|
74
|
+
get :mine
|
75
|
+
end
|
92
76
|
|
93
|
-
|
94
|
-
|
95
|
-
|
77
|
+
member do
|
78
|
+
put :ready
|
79
|
+
put :ship
|
80
|
+
put :add
|
81
|
+
put :remove
|
82
|
+
end
|
96
83
|
end
|
97
|
-
resources :
|
84
|
+
resources :states, only: [:index, :show]
|
85
|
+
|
86
|
+
resources :taxonomies do
|
98
87
|
member do
|
99
88
|
get :jstree
|
100
89
|
end
|
90
|
+
resources :taxons do
|
91
|
+
member do
|
92
|
+
get :jstree
|
93
|
+
end
|
94
|
+
end
|
101
95
|
end
|
102
|
-
end
|
103
96
|
|
104
|
-
|
97
|
+
resources :taxons, only: [:index]
|
105
98
|
|
106
|
-
|
99
|
+
resources :inventory_units, only: [:show, :update]
|
107
100
|
|
108
|
-
|
109
|
-
|
110
|
-
|
101
|
+
resources :users do
|
102
|
+
resources :credit_cards, only: [:index]
|
103
|
+
end
|
111
104
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
105
|
+
resources :properties
|
106
|
+
resources :stock_locations do
|
107
|
+
resources :stock_movements
|
108
|
+
resources :stock_items
|
109
|
+
end
|
117
110
|
|
118
|
-
|
119
|
-
|
111
|
+
resources :stock_items, only: [:index, :update, :destroy]
|
112
|
+
resources :stores
|
113
|
+
|
114
|
+
put '/classifications', to: 'classifications#update', as: :classifications
|
115
|
+
get '/taxons/products', to: 'taxons#products', as: :taxon_products
|
116
|
+
end
|
120
117
|
|
121
|
-
|
122
|
-
|
118
|
+
match 'v:api/*path', to: redirect("/api/v1/%{path}"), via: [:get, :post, :put, :patch, :delete]
|
119
|
+
match '*path', to: redirect("/api/v1/%{path}"), via: [:get, :post, :put, :patch, :delete]
|
123
120
|
end
|
124
121
|
end
|