Sha256: 65ceaefb60f4c176bc8dca836bb276366b0822a05291cc3121e0fc4fee7c7816

Contents?: true

Size: 825 Bytes

Versions: 10

Compression:

Stored size: 825 Bytes

Contents

module Kanaui
  module DashboardHelper

    class DashboardApi < KillBillClient::Model::Resource

      KILLBILL_ANALYTICS_PREFIX = "/plugins/killbill-analytics"

      class << self

        def available_reports(options = {})
          path = "#{KILLBILL_ANALYTICS_PREFIX}/plugins/killbill-analytics/reports"
          response = KillBillClient::API.get path, {}, options
          response.body
        end

        def reports(start_date, end_date, name, smooth, format, options = {})
          path = "#{KILLBILL_ANALYTICS_PREFIX}/plugins/killbill-analytics/reports?format=json&startDate=#{start_date}&endDate=#{end_date}&name=#{name}"
          path = "#{path}&smooth=#{smooth}" if smooth
          response = KillBillClient::API.get path, {}, options
          response.body
        end

      end
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kanaui-0.4.2 app/helpers/kanaui/dashboard_helper.rb
kanaui-0.4.1 app/helpers/kanaui/dashboard_helper.rb
kanaui-0.4.0 app/helpers/kanaui/dashboard_helper.rb
kanaui-0.3.0 app/helpers/kanaui/dashboard_helper.rb
kanaui-0.2.0 app/helpers/kanaui/dashboard_helper.rb
kanaui-0.1.0 app/helpers/kanaui/dashboard_helper.rb
kanaui-0.0.4 app/helpers/kanaui/dashboard_helper.rb
kanaui-0.0.3 app/helpers/kanaui/dashboard_helper.rb
kanaui-0.0.2 app/helpers/kanaui/dashboard_helper.rb
kanaui-0.0.1 app/helpers/kanaui/dashboard_helper.rb