@@ -261,6 +261,40 @@ def __init__(self, timestamp=None, source=None, reply_token=None,
261
261
)
262
262
263
263
264
+ class AccountLinkEvent (Event ):
265
+ """Webhook AccountLinkEvent.
266
+
267
+ https://developers.line.me/en/docs/messaging-api/reference/#account-link-event
268
+
269
+ Event object for when a user has linked his/her LINE account with a provider's service account.
270
+ You can reply to account link events.
271
+ If the link token has expired or has already been used,
272
+ no webhook event will be sent and the user will be shown an error.
273
+ """
274
+
275
+ def __init__ (self , timestamp = None , source = None , reply_token = None , link = None , ** kwargs ):
276
+ """__init__ method.
277
+
278
+ :param long timestamp: Time of the event in milliseconds
279
+ :param source: Source object
280
+ :type source: T <= :py:class:`linebot.models.sources.Source`
281
+ :param str reply_token: Reply token
282
+ :param link: Link object
283
+ :type link: :py:class:`linebot.models.events.Link`
284
+ :param kwargs:
285
+ """
286
+ super (AccountLinkEvent , self ).__init__ (
287
+ timestamp = timestamp , source = source , reply_token = reply_token , link = link
288
+ )
289
+
290
+ self .type = 'accountLink'
291
+ self .source = source
292
+ self .reply_token = reply_token
293
+ self .link = self .get_or_new_from_json_dict (
294
+ link , Link
295
+ )
296
+
297
+
264
298
class Postback (Base ):
265
299
"""Postback.
266
300
@@ -310,3 +344,21 @@ def device_message(self):
310
344
:return:
311
345
"""
312
346
return bytearray .fromhex (self .dm ) if self .dm is not None else None
347
+
348
+
349
+ class Link (Base ):
350
+ """Link.
351
+
352
+ https://developers.line.me/en/docs/messaging-api/reference/#link-object
353
+ """
354
+
355
+ def __init__ (self , result = None , nonce = None , ** kwargs ):
356
+ """__init__ method.
357
+
358
+ :param str result: Indicate whether the link was successful or not.
359
+ :param str nonce: Specified nonce when verifying the user ID.
360
+ """
361
+ super (Link , self ).__init__ (** kwargs )
362
+
363
+ self .result = result
364
+ self .nonce = nonce
0 commit comments