class Intercom::Service::BaseService

Attributes

client[R]

Public Class Methods

new(client) click to toggle source
# File lib/intercom/service/base_service.rb, line 10
def initialize(client)
  @client = client
end

Public Instance Methods

collection_class() click to toggle source
# File lib/intercom/service/base_service.rb, line 14
def collection_class
  raise NotImplementedError
end
collection_name() click to toggle source
# File lib/intercom/service/base_service.rb, line 22
def collection_name
  @collection_name ||= Utils.resource_class_to_collection_name(collection_class)
end
collection_proxy_class() click to toggle source
# File lib/intercom/service/base_service.rb, line 18
def collection_proxy_class
  Intercom::ClientCollectionProxy
end
from_api(api_response) click to toggle source
# File lib/intercom/service/base_service.rb, line 26
def from_api(api_response)
  object = collection_class.new
  object.client = @client
  object.from_response(api_response)
  object
end