zendesk / zendesk_api_client_php

Official Zendesk API v2 client library for PHP
336 stars 259 forks source link

tickets createMany method implementation #526

Closed shagarah closed 7 months ago

shagarah commented 9 months ago

Can someone please give me a sample code (no data) for creating multiple tickets using createMany function, with "use" part included? I can't seem to get it working. e.g.:

$client->tickets()->createMany([$ticket1, $ticket2]);

generates error as createMany is not a method of resulting tickets() object.

cryptomail commented 7 months ago

Hi there, Have you tried create() with an array? Create seems to take an array of hashes, each of which are a ticket. Please see the example https://github.com/zendesk/zendesk_api_client_php/blob/master/samples/tickets/createTicket.php

And let me know if this works. Closing in 48hrs if no ACK or NACK.

cryptomail commented 7 months ago

closing based on non response and answer provided.