airflow.providers.zendesk.hooks.zendesk

Module Contents

Classes

ZendeskHook

Interact with Zendesk. This hook uses the Zendesk conn_id.

class airflow.providers.zendesk.hooks.zendesk.ZendeskHook(zendesk_conn_id=default_conn_name)[source]

Bases: airflow.hooks.base.BaseHook

Interact with Zendesk. This hook uses the Zendesk conn_id.

Parameters

zendesk_conn_id (str) – The Airflow connection used for Zendesk credentials.

conn_name_attr = 'zendesk_conn_id'[source]
default_conn_name = 'zendesk_default'[source]
conn_type = 'zendesk'[source]
hook_name = 'Zendesk'[source]
classmethod get_ui_field_behaviour()[source]
get_conn()[source]

Get the underlying Zenpy client.

Returns

zenpy.Zenpy client.

Return type

zenpy.Zenpy

get_ticket(ticket_id)[source]

Retrieve ticket.

Returns

Ticket object retrieved.

Return type

zenpy.lib.api_objects.Ticket

search_tickets(**kwargs)[source]

Search tickets.

Parameters

kwargs – (optional) Search fields given to the zenpy search method.

Returns

SearchResultGenerator of Ticket objects.

Return type

zenpy.lib.generator.SearchResultGenerator

create_tickets(tickets, **kwargs)[source]

Create tickets.

Parameters
  • tickets (zenpy.lib.api_objects.Ticket | list[zenpy.lib.api_objects.Ticket]) – Ticket or List of Ticket to create.

  • kwargs – (optional) Additional fields given to the zenpy create method.

Returns

A TicketAudit object containing information about the Ticket created. When sending bulk request, returns a JobStatus object.

Return type

zenpy.lib.api_objects.TicketAudit | zenpy.lib.api_objects.JobStatus

update_tickets(tickets, **kwargs)[source]

Update tickets.

Parameters
  • tickets (zenpy.lib.api_objects.Ticket | list[zenpy.lib.api_objects.Ticket]) – Updated Ticket or List of Ticket object to update.

  • kwargs – (optional) Additional fields given to the zenpy update method.

Returns

A TicketAudit object containing information about the Ticket updated. When sending bulk request, returns a JobStatus object.

Return type

zenpy.lib.api_objects.TicketAudit | zenpy.lib.api_objects.JobStatus

delete_tickets(tickets, **kwargs)[source]

Delete tickets, returns nothing on success and raises APIException on failure.

Parameters
  • tickets (zenpy.lib.api_objects.Ticket | list[zenpy.lib.api_objects.Ticket]) – Ticket or List of Ticket to delete.

  • kwargs – (optional) Additional fields given to the zenpy delete method.

Returns

Return type

None

Was this entry helpful?