Sha256: effaa401ef81780e17e3d23949cedc7f3ef7549714ef13272179d62666df5176
Contents?: true
Size: 1.24 KB
Versions: 86
Compression:
Stored size: 1.24 KB
Contents
require_dependency "zuora_connect/application_controller" module ZuoraConnect class Api::V1::AppInstanceController < ApplicationController def create Apartment::Tenant.create(session['AppInstance']) respond_to do |format| format.json {render :json => "Created"} end end def drop instance_id = @appinstance.id if session["#{instance_id}::destroy"] && ZuoraConnect::AppInstance.where(:id => instance_id).size != 0 if @appinstance.drop_instance ZuoraConnect::AppInstance.destroy(instance_id) msg = Apartment::Tenant.drop(instance_id) respond_to do |format| if msg.error_message.present? format.json {render json: {"message" => msg.error_message}, status: :bad_request } else format.json {render json: {}, status: :ok} end end else respond_to do |format| format.json {render json: {"message" => @appinstance.drop_message}, status: :bad_request} end end else respond_to do |format| format.json { render json: { "message" => "Unauthorized"}, status: :unauthorized } end end end def status end end end
Version data entries
86 entries across 86 versions & 1 rubygems