Skip to content

Epic/new ticket factory api

Administrator requested to merge epic/new-ticket_factory-api into master

Adapt the API of TicketFactory to work with ServiceData and CustomerData models provided by the library with the needed data.

The new API is:

# In the project that uses the TicketFactory (Ex: Tryton)

from otrs_somconnexio.otrs_models.ticket_factory import TicketFactory

...

# These factories for create the service_data and the customer_data are 
# implemented in the project that uses this library.(Ex: Tryton)
service_data = ServiceDataFromEticomContract(eticom_contract).build()
customer_data = CustomerDataFromParty(party).build()

ticket = TicketFactory(service_data, customer_data).build()
ticket.create()
Edited by Administrator

Merge request reports