Class: Intercom::Service::BaseService
- Inherits:
-
Object
- Object
- Intercom::Service::BaseService
show all
- Defined in:
- lib/intercom/service/base_service.rb
Direct Known Subclasses
Admin, Article, Collection, Company, Contact, Conversation, Counts, DataAttribute, Event, ExportContent, Job, Lead, Message, Note, PhoneCallRedirect, Section, Segment, Subscription, SubscriptionType, Tag, Team, User, Visitor
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseService.
10
11
12
|
# File 'lib/intercom/service/base_service.rb', line 10
def initialize(client)
@client = client
end
|
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
8
9
10
|
# File 'lib/intercom/service/base_service.rb', line 8
def client
@client
end
|
Instance Method Details
#collection_class ⇒ Object
14
15
16
|
# File 'lib/intercom/service/base_service.rb', line 14
def collection_class
raise NotImplementedError
end
|
#collection_name ⇒ Object
#collection_proxy_class ⇒ Object
#from_api(api_response) ⇒ Object
26
27
28
29
30
31
|
# 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
|