From d0c9e12ed05ed2bce1ef23c268e5055a1c885503 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Tue, 5 Nov 2019 13:03:13 -0600 Subject: [PATCH] remove create_trial in BillingSubscriptionsController --- app/controllers/billing_subscriptions_controller.rb | 9 --------- config/routes.rb | 1 - 2 files changed, 10 deletions(-) diff --git a/app/controllers/billing_subscriptions_controller.rb b/app/controllers/billing_subscriptions_controller.rb index af1fbf26..68629c28 100644 --- a/app/controllers/billing_subscriptions_controller.rb +++ b/app/controllers/billing_subscriptions_controller.rb @@ -6,15 +6,6 @@ class BillingSubscriptionsController < ApplicationController before_action :authenticate_nonprofit_admin! - def create_trial - render JsonResp.new(params) do |_params| - requires(:nonprofit_id).as_int - requires(:stripe_plan_id).as_string - end.when_valid do |params| - InsertBillingSubscriptions.trial(params[:nonprofit_id], params[:stripe_plan_id]) - end - end - def create @nonprofit ||= Nonprofit.find(params[:nonprofit_id]) @subscription = BillingSubscription.create_with_stripe(@nonprofit, params[:billing_subscription]) diff --git a/config/routes.rb b/config/routes.rb index 74d71d59..9ebfa601 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -150,7 +150,6 @@ Rails.application.routes.draw do resource(:billing_subscription, only: [:create]) do post(:cancel) - post(:create_trial, on: :member) get(:cancellation) end