Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[TypeError] Cannot assign null to property Intercom\Types\TicketTypeAttributeList::$ticketTypeAttributes of type array. #396

Open
@codymoorhouse

Description

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /