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

Add "contact_us" model field to the AgencyChain resource #141

Merged
merged 1 commit into from
May 30, 2024

Conversation

marz619
Copy link
Contributor

@marz619 marz619 commented May 30, 2024

The new field contains three attributes; email, phone_number, and website_url; which provide corresponding "contact us" values.

This will be released as version 2.36.0 (Release: https://pypi.org/project/gapipy/2.36.0/)

NOTE: This field will be None (null) if all of the contained fields have None values.

Usage:

In [1]: from gapipy import Client

In [2]: gapi = Client(application_key="test_abcd...")

In [3]: ac = gapi.agency_chains.get("a1234000000ABCDEF4")  # null contact_us

In [4]: ac.contact_us is None
Out [4]: True

In [5]: ac = gapi.agency_chains.get("a1234000000ABCDEF5")  # non-null contact_us

In [6]: ac.contact_us
Out[6]: <gapipy.resources.booking.agency_chain.ContactUs at 0x1053a9760>

In [7]: ac.contact_us.website_url
Out[7]: 'https://www.example.com/contact-us'

In [8]: ac._raw_data['contact_us']
Out[8]:
{'email': None,
 'phone_number': None,
 'website_url': 'https://www.example.com/contact-us'}

@marz619 marz619 self-assigned this May 30, 2024
The new field contains three attributes; email, phone_number, and
website_url; which provide corresponding "contact us" values.

NOTE: This field will be `None` if all of the contained fields have
      no value.
@marz619 marz619 merged commit 1828b2f into master May 30, 2024
0 of 12 checks passed
@marz619 marz619 deleted the agency-chain-contact-us branch May 30, 2024 18:05
marz619 added a commit that referenced this pull request May 30, 2024
* 1828b2f - Add "contact_us" model field to the AgencyChain resource (#141)
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

Successfully merging this pull request may close these issues.

1 participant