Sha256: b262b5895c2e25dcdc444b493e422f16a00830b047ac697145ba69bd51f6cea0

Contents?: true

Size: 1.01 KB

Versions: 5

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

SolidusSubscriptions::Engine.routes.draw do
  namespace :api, defaults: { format: :json } do
    namespace :v1 do
      resources :line_items, only: [:update, :destroy]
      resources :subscriptions, only: [:create, :update] do
        member do
          post :cancel
          post :skip
          post :pause
          post :resume
        end
      end
    end
  end
end

Spree::Core::Engine.routes.draw do
  mount SolidusSubscriptions::Engine, at: '/subscriptions'

  namespace :admin do
    resources :subscriptions, only: [:index, :new, :create, :edit, :update] do
      member do
        delete :cancel
        post :activate
        post :skip
        post :pause
        post :resume
      end
      resources :installments, only: [:index, :show]
      resources :subscription_events, only: :index
      resources :subscription_orders, path: :orders, only: :index
    end

    resources :users do
      resources :subscriptions, only: [:index], controller: 'users/subscriptions'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_subscriptions-2.0.2 config/routes.rb
solidus_subscriptions-2.0.1 config/routes.rb
solidus_subscriptions-2.0.0 config/routes.rb
solidus_subscriptions-1.1.0 config/routes.rb
solidus_subscriptions-1.0.1 config/routes.rb