Menu

## AccountLinkEvent extends BaseEvent
in package

AccountLinkEvent.php : 30

A class that represents the event of account link.

Event object for when a user has linked his/her LINE account with a provider's service account. You can reply to account link events. If the link token has expired or has already been used, no webhook event will be sent and the user will be shown an error.

### Table of Contents

RESULT_FAILED = 'failed'
RESULT_OK = 'ok'
$event : array<string|int, mixed>
__construct() : mixed
  AccountLinkEvent constructor.
getEvent() : array<string|int, mixed>
  Returns event
getEventSourceId() : null|string
  Returns the identifier of the event source that associated with event source type (i.e. userId, groupId or roomId).
getGroupId() : string|null
  Returns group ID of the event.
getMode() : string
  Returns mode.
getNonce() : string
  Gets the nonce generated from the user ID on the provider's service.
getReplyToken() : string|null
  Returns reply token of the event.
getResult() : string
  Gets the result of the link event One of the following values to indicate whether the link was successful or not.
getRoomId() : string|null
  Returns room ID of the event.
getTimestamp() : int
  Returns timestamp of the event.
getType() : string
  Returns event type.
getUserId() : string|null
  Returns user ID of the event.
getWebhookEventId() : string
  Returns webhook event id
isFailed() : bool
  Returns the account link has failed or not
isGroupEvent() : bool
  Returns the event is group's one or not.
isRedelivery() : bool
  Returns the event is a redelivered one or not.
isRoomEvent() : bool
  Returns the event is room's one or not.
isSuccess() : bool
  Returns the account link has success or not
isUnknownEvent() : bool
  Returns the event is unknown or not.
isUserEvent() : bool
  Returns the event is user's one or not.

### Constants

#### RESULT_FAILED

AccountLinkEvent.php : 33
`public mixed RESULT_FAILED = 'failed'`

#### RESULT_OK

AccountLinkEvent.php : 32
`public mixed RESULT_OK = 'ok'`

### Properties

#### $event

BaseEvent.php : 34
`protected array<string|int, mixed> $event`

### Methods

#### __construct()

AccountLinkEvent.php : 40

AccountLinkEvent constructor.

`public __construct(array<string|int, mixed> $event) : mixed`

##### Parameters

$event : array<string|int, mixed>

##### Return values

mixed —

#### getEvent()

BaseEvent.php : 223

Returns event

`public getEvent() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### getEventSourceId()

BaseEvent.php : 200

Returns the identifier of the event source that associated with event source type (i.e. userId, groupId or roomId).

`public getEventSourceId() : null|string`

##### Tags

throws
  InvalidEventSourceException

##### Return values

null|string —

#### getGroupId()

BaseEvent.php : 167

Returns group ID of the event.

`public getGroupId() : string|null`

##### Tags

throws
  InvalidEventSourceException

  Raise when called with non group type event.

##### Return values

string|null —

#### getMode()

BaseEvent.php : 64

Returns mode.

`public getMode() : string`

active: The channel is active. standby: The channel is waiting.

##### Return values

string —

#### getNonce()

AccountLinkEvent.php : 65

Gets the nonce generated from the user ID on the provider's service.

`public getNonce() : string`

##### Return values

string —

#### getReplyToken()

BaseEvent.php : 104

Returns reply token of the event.

`public getReplyToken() : string|null`

##### Return values

string|null —

#### getResult()

AccountLinkEvent.php : 55

Gets the result of the link event One of the following values to indicate whether the link was successful or not.

`public getResult() : string`

ok: Indicates the link was successful. failed: Indicates the link failed for any reason, such as due to a user impersonation.

##### Tags

see
  AccountLinkEvent::isSuccess()

  To get result of this event has succeed or not

see
  AccountLinkEvent::isFailed()

  To get result of this event has failed or not

##### Return values

string —

#### getRoomId()

BaseEvent.php : 183

Returns room ID of the event.

`public getRoomId() : string|null`

##### Tags

throws
  InvalidEventSourceException

  Raise when called with non room type event.

##### Return values

string|null —

#### getTimestamp()

BaseEvent.php : 74

Returns timestamp of the event.

`public getTimestamp() : int`

##### Return values

int —

#### getType()

BaseEvent.php : 51

Returns event type.

`public getType() : string`

##### Return values

string —

#### getUserId()

BaseEvent.php : 154

Returns user ID of the event.

`public getUserId() : string|null`

##### Return values

string|null —

#### getWebhookEventId()

BaseEvent.php : 84

Returns webhook event id

`public getWebhookEventId() : string`

##### Return values

string —

#### isFailed()

AccountLinkEvent.php : 85

Returns the account link has failed or not

`public isFailed() : bool`

##### Return values

bool —

#### isGroupEvent()

BaseEvent.php : 124

Returns the event is group's one or not.

`public isGroupEvent() : bool`

##### Return values

bool —

#### isRedelivery()

BaseEvent.php : 94

Returns the event is a redelivered one or not.

`public isRedelivery() : bool`

##### Return values

bool —

#### isRoomEvent()

BaseEvent.php : 134

Returns the event is room's one or not.

`public isRoomEvent() : bool`

##### Return values

bool —

#### isSuccess()

AccountLinkEvent.php : 75

Returns the account link has success or not

`public isSuccess() : bool`

##### Return values

bool —

#### isUnknownEvent()

BaseEvent.php : 144

Returns the event is unknown or not.

`public isUnknownEvent() : bool`

##### Return values

bool —

#### isUserEvent()

BaseEvent.php : 114

Returns the event is user's one or not.

`public isUserEvent() : bool`

##### Return values

bool —

## Search results