Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag: add delete #193

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions intercom/service/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def collection_class(self):

def resource_url(self, _id):
"""Return the URL for the specified resource in this collection."""
return "/%s/%s/reply" % (self.collection, _id)
return "/%s/%s" % (self.collection, _id)

def reply(self, **reply_data):
"""Reply to a message."""
Expand Down Expand Up @@ -59,5 +59,5 @@ def __reply(self, reply_data):
"""Send requests to the resource handler."""
_id = reply_data.pop('id')
reply_data['conversation_id'] = _id
response = self.client.post(self.resource_url(_id), reply_data)
response = self.client.post(self.resource_url(_id) + "/reply", reply_data)
return self.collection_class().from_response(response)
3 changes: 2 additions & 1 deletion intercom/service/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
from intercom.api_operations.find import Find
from intercom.api_operations.find_all import FindAll
from intercom.api_operations.save import Save
from intercom.api_operations.delete import Delete
from intercom.service.base_service import BaseService


class Tag(BaseService, All, Find, FindAll, Save):
class Tag(BaseService, All, Find, FindAll, Save, Delete):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good:)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellakz could you grant me write access so I could merge this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Granted.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellakz thanks! strangely it didn't get through. I still might not have the write access

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apassant hello! Could you help us review on this change? :D

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need access to intercom/python-intercom to merge...


@property
def collection_class(self):
Expand Down