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

[Ticket Create and Update] Is there a mismatch between doc and real code ? #516

Open
rtkwlf-hzzz opened this issue Jun 24, 2022 · 0 comments

Comments

@rtkwlf-hzzz
Copy link

Hey :

Notice that there is a mismatch between doc and code :

  1. In doc , here mentioned :

a. we can create an object firstly :

user = User(name="John Doe", email="john@doe.com")
created_user = zenpy_client.users.create(user)

then update it :

created_user.role = 'agent'
created_user.phone = '123 434 333'
modified_user = zenpy_client.users.update(created_user)
  1. However, In the most recent code, create action returns a TicketAudit object instead of Ticket object, so to make the code above work, we should :
user = User(name="John Doe", email="john@doe.com")
# notice here, need to retrieve `.ticket` attribute
created_user = zenpy_client.users.create(user).ticket

and then call update action


wanna a secnd 👀 to help me confirm this issue . reallllly appreciate it a lot ( : -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant