Hellooo,
Ran into a snag while creating a ticket in Intercom using the current stable version of the SDK (5.0.1). The ticket actually does create successfully in Intercom, however, the response is not getting properly parsed from the SDK and is failing, meaning you can't grab the Ticket Id from the response.
It looks like this is already patched on master branch, so just wondering if we can expect a new release soon?
Simplified Example
> use Intercom\IntercomClient;
> use Intercom\Types\CreateTicketRequest;
> use Intercom\Types\CreateTicketRequestContactsItemEmail;
> $client = new IntercomClient(<API_KEY>);
> $ticketsClient = $client->tickets;
> $ticketsClient->create(new CreateTicketRequest([
'ticketTypeId' => <TICKET_TYPE_ID>,
'contacts' => [
new CreateTicketRequestContactsItemEmail(['email' => <EMAIL>]),
],
'ticketAttributes' => [
'_default_title_' => "TICKET TITLE",
'_default_description_' => "TICKET DESCRIPTION",
],
]);
TypeError Cannot assign null to property Intercom\Types\TicketTypeAttributeList::$ticketTypeAttributes of type array.
5.0.1
|
/** |
|
* @var TicketTypeAttributeList $ticketTypeAttributes |
|
*/ |
|
#[JsonProperty('ticket_type_attributes')] |
|
private TicketTypeAttributeList $ticketTypeAttributes; |
master
|
/** |
|
* @var ?TicketTypeAttributeList $ticketTypeAttributes |
|
*/ |
|
#[JsonProperty('ticket_type_attributes')] |
|
private ?TicketTypeAttributeList $ticketTypeAttributes; |