From 8eafc58646eeb22959614a12a90fb78839626771 Mon Sep 17 00:00:00 2001 From: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com> Date: Thu, 13 Jan 2022 15:52:22 -0500 Subject: [PATCH] [77881] Add missing `source` field in `Contact` class (#187) This PR adds a missing field to the Contact class. --- CHANGELOG.md | 4 ++++ nylas/client/restful_models.py | 1 + tests/conftest.py | 1 + tests/test_contacts.py | 1 + 4 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a15dd0a4..69317c91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ nylas-python Changelog ====================== +Unreleased +---------------- +* Add missing `source` field in `Contact` class + v5.4.1 ---------------- * Fix issue where keyword arguments calling `_update_resource` were not correctly resolving to URL params diff --git a/nylas/client/restful_models.py b/nylas/client/restful_models.py index f0bed95e..0fcde8d7 100644 --- a/nylas/client/restful_models.py +++ b/nylas/client/restful_models.py @@ -580,6 +580,7 @@ class Contact(NylasAPIObject): "job_status_id", "manager_name", "office_location", + "source", "notes", "picture_url", ] diff --git a/tests/conftest.py b/tests/conftest.py index 174ccb62..2107b98a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1193,6 +1193,7 @@ def mock_contact(mocked_responses, account_id, api_url): "job_title": "QA Tester", "manager_name": "George", "office_location": "Over the Rainbow", + "source": "inbox", "notes": "This is a note", "picture_url": "{base}/contacts/{id}/picture".format( base=api_url, id="9hga75n6mdvq4zgcmhcn7hpys" diff --git a/tests/test_contacts.py b/tests/test_contacts.py index 1798df3a..66f613b5 100644 --- a/tests/test_contacts.py +++ b/tests/test_contacts.py @@ -20,6 +20,7 @@ def test_get_contact(api_client): assert contact.given_name == "Given" assert contact.surname == "Sur" assert contact.birthday == date(1964, 10, 5) + assert contact.source == "inbox" @pytest.mark.usefixtures("mock_contacts")