-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
Add incremental calls api #454
Conversation
4de3c75
to
ff66b08
Compare
@facetoe bit stuck here, I'm testing with the following:
and getting
I'm struggling to debug as a result of the (very neat) auto generated classes, any ideas? |
Removing phone_number_id from the call spec fixes the error, but isn't ideal as that's missing from the result now |
This should fix the phone number issue: diff --git a/tools/gen_classes.py b/tools/gen_classes.py
index 8666d2f..3a0672c 100755
--- a/tools/gen_classes.py
+++ b/tools/gen_classes.py
@@ -213,7 +213,7 @@ class Attribute(object):
return attr_name
def get_attr_assignment(self, object_name, object_type, key):
- if object_type != key and object_type != 'date' and key.endswith('_id'):
+ if object_type != key and object_type != 'date' and object_name != 'phone_number' and key.endswith('_id'):
return '%s.id' % object_name
elif key.endswith('_ids'):
return '[o.id for o in %(object_name)s]' % locals()
|
Hey @facetoe thanks for looking into this. I think we're getting there, the change you suggested results in:
which results in records returned with
then I get the correct result of |
Manually changing the output won't work as next time the script is run it will be clobbered. |
Yeah I realise, my question really is how we change the class generator to achieve that result? Does it need a new template or just some additional logic to accommodate the phone number like you previously suggested? |
48e69ff
to
1f9e25a
Compare
Ok @facetoe I've got this working with the class generator. The shim I've put in does the job, but not sure if you think it should go somewhere else. Thanks :) |
@facetoe just a bump on this if you have any ideas otherwise could we merge? |
@facetoe Any status update? Would love to see this merged. |
Adds the incremental calls api: https://developer.zendesk.com/rest_api/docs/voice-api/incremental_exports#incremental-calls