Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
lobbyist-ruby / lib / lobbyist / v2 / credit_grant.rb
Size: Mime:
# frozen_string_literal: true

module Lobbyist
  module V2
    # Class for getting credit_grants
    class CreditGrant < Lobbyist::V2::Base
      attr_accessor :company_id, :cost, :grant_type, :granter_id, :granter_type
      attr_accessor :status, :expired, :category, :created_at, :updated_at
      attr_accessor :credit_amount, :total_amount

      def self.summary(company_id)
        create_collection_from_response(
            get("/v2/companies/#{company_id}/credit_grants/summary.json")
        )
      end

      def self.texting_summary(company_id)
        create_from_response(
            get("/v2/companies/#{company_id}/credit_grants/texting-summary.json")
        )
        end

      def self.email_summary(company_id)
        create_from_response(
            get("/v2/companies/#{company_id}/credit_grants/email-summary.json")
        )
      end
    end

  end
end