Sha256: 8225cff5d708916e0f8cc25a14d76920ca88557d7b98e0cff8d45a97f449b706
Contents?: true
Size: 1.82 KB
Versions: 10
Compression:
Stored size: 1.82 KB
Contents
EffectiveOrders::Engine.routes.draw do scope module: 'effective' do resources :orders, except: [:destroy] do member do get :purchased get :deferred get :declined get :send_buyer_receipt post :free post :mark_as_paid post :cheque post :moneris_checkout post :phone post :pretend post :refund post :stripe end collection do post :bulk_send_buyer_receipt post :moneris_postback post :paypal_postback end end post 'orders/:id', to: 'orders#update' # Subscriptions match 'subscribe', to: 'subscripter#update', via: :post, as: :subscripter match 'customer/settings', to: 'customers#edit', as: :customer_settings, via: [:get] match 'customer/settings', to: 'customers#update', via: [:patch, :put, :post] match 'webhooks/stripe', to: 'webhooks#stripe', via: [:get, :post, :put] # Carts match 'cart', to: 'carts#show', as: 'cart', via: :get match 'cart', to: 'carts#destroy', via: :delete # If you Tweak this route, please update EffectiveOrdersHelper too match 'cart/:purchasable_type/:purchasable_id', to: 'carts#add_to_cart', via: [:get, :post], as: 'add_to_cart' match 'cart/:id', to: 'carts#remove_from_cart', via: [:delete], as: 'remove_from_cart' end namespace :admin do resources :customers, only: [:index, :show] resources :orders do member do post :send_payment_request get :checkout post :checkout patch :checkout end collection do post :bulk_send_payment_request end end post 'orders/:id', to: 'orders#update' resources :order_items, only: [:index] end end Rails.application.routes.draw do mount EffectiveOrders::Engine => '/', as: 'effective_orders' end
Version data entries
10 entries across 10 versions & 1 rubygems