line-bot-api 2.9.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 591b6fa1640c88a50a6e09496245d4ba2732edb7ad997c7089c0821060b5875e
4
- data.tar.gz: aab0b9c74007a7732f4e51d28e6caeb88c51a03559124556fe7d5dd6bb7dcff3
3
+ metadata.gz: baaf7d084ca126ba079dcf24e6f6854daf6385417fa2ef6f680dde976e21380c
4
+ data.tar.gz: f721e8f89681f0e27ff1a38bf86f5037f8b856f2a5e49eaaa14fe88682a846b2
5
5
  SHA512:
6
- metadata.gz: f689ce6cd26aa001bde9006dab4988abcd5922d51e38554436ef9f4956031742e8f573b2f4e5423b802b760690d8a7699ab51fb0a77ede62ac1dce9e19d1f874
7
- data.tar.gz: 1e2cbabf8ea11824b28c897d81705923629c75a50a7fe5ce2b0365cdd113011f4057865c4bf9d011ff471552f52a13c2f6dbdd2465eef49badf1a1fe02a26643
6
+ metadata.gz: b920e4fa09ac608e5175f22610234ceca1a105e9e6ca6bb4c1fa1ff7ac099fdb75c764a4c1c0d9578f6415998e228f804b3e290a875902b2cd9fe63e72e30416
7
+ data.tar.gz: 3d183bb69f04710942eeaa458659ee50c592e8e91bf8d42b8950207f9b49ace7abf93b87efec28fa412a84833e26580226f21d3d8e04e4f13dbec17a155b20ae
@@ -48,6 +48,7 @@ require_relative './model/membership_event'
48
48
  require_relative './model/mention'
49
49
  require_relative './model/mentionee'
50
50
  require_relative './model/message_content'
51
+ require_relative './model/message_edited_event'
51
52
  require_relative './model/message_event'
52
53
  require_relative './model/module_content'
53
54
  require_relative './model/module_event'
@@ -109,6 +109,7 @@ module Line
109
109
  memberJoined: Line::Bot::V2::Webhook::MemberJoinedEvent,
110
110
  memberLeft: Line::Bot::V2::Webhook::MemberLeftEvent,
111
111
  membership: Line::Bot::V2::Webhook::MembershipEvent,
112
+ messageEdited: Line::Bot::V2::Webhook::MessageEditedEvent,
112
113
  message: Line::Bot::V2::Webhook::MessageEvent,
113
114
  module: Line::Bot::V2::Webhook::ModuleEvent,
114
115
  delivery: Line::Bot::V2::Webhook::PnpDeliveryCompletionEvent,
@@ -0,0 +1,110 @@
1
+ # Webhook Type Definition
2
+ # Webhook event definition of the LINE Messaging API
3
+ #
4
+ # The version of the OpenAPI document: 1.0.0
5
+ #
6
+ # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7
+ # https://openapi-generator.tech
8
+ # Do not edit the class manually.
9
+
10
+ require_relative './event'
11
+
12
+ module Line
13
+ module Bot
14
+ module V2
15
+ module Webhook
16
+ # Webhook event object which contains the edited message. This event is triggered when a user edits a text message. Currently, message editing is not available in one-on-one chats with LINE Official Accounts, so this event is only triggered in group chats. Multiple messageEdited webhook events may arrive out of order. The event with the largest timestamp represents the latest edit state.
17
+ # @see https://developers.line.biz/en/reference/messaging-api/#edit-event
18
+ class MessageEditedEvent < Event
19
+ # @!attribute [r] type
20
+ # @return [String] Type of the event
21
+ attr_reader :type
22
+ # @!attribute [rw] source
23
+ # @return [Source,nil]
24
+ attr_accessor :source
25
+ # @!attribute [rw] timestamp
26
+ # @return [Integer] Time of the event in milliseconds.
27
+ attr_accessor :timestamp
28
+ # @!attribute [rw] mode
29
+ # @return [String] ('active'|'standby')
30
+ attr_accessor :mode
31
+ # @!attribute [rw] webhook_event_id
32
+ # @return [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
33
+ attr_accessor :webhook_event_id
34
+ # @!attribute [rw] delivery_context
35
+ # @return [DeliveryContext]
36
+ attr_accessor :delivery_context
37
+ # @!attribute [rw] reply_token
38
+ # @return [String,nil]
39
+ attr_accessor :reply_token
40
+ # @!attribute [rw] message
41
+ # @return [MessageContent]
42
+ attr_accessor :message
43
+
44
+ # @param source [Source, Hash[Symbol, untyped], nil]
45
+ # @param timestamp [Integer] Time of the event in milliseconds.
46
+ # @param mode [String] ('active'|'standby')
47
+ # @param webhook_event_id [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
48
+ # @param delivery_context [DeliveryContext, Hash[Symbol, untyped]]
49
+ # @param reply_token [String,nil]
50
+ # @param message [MessageContent, Hash[Symbol, untyped]]
51
+ def initialize(
52
+ source: nil,
53
+ timestamp:,
54
+ mode:,
55
+ webhook_event_id:,
56
+ delivery_context:,
57
+ reply_token: nil,
58
+ message:,
59
+ **dynamic_attributes
60
+ )
61
+ @type = "messageEdited"
62
+
63
+ @source = source.is_a?(Line::Bot::V2::Webhook::Source) || source.nil? ? source : Line::Bot::V2::Webhook::Source.create(**source)
64
+ @timestamp = timestamp
65
+ @mode = mode
66
+ @webhook_event_id = webhook_event_id
67
+ @delivery_context = delivery_context.is_a?(Line::Bot::V2::Webhook::DeliveryContext) ? delivery_context : Line::Bot::V2::Webhook::DeliveryContext.create(**delivery_context)
68
+ @reply_token = reply_token
69
+ @message = message.is_a?(Line::Bot::V2::Webhook::MessageContent) ? message : Line::Bot::V2::Webhook::MessageContent.create(**message)
70
+
71
+ dynamic_attributes.each do |key, value|
72
+ self.class.attr_accessor key
73
+
74
+ if value.is_a?(Hash)
75
+ struct_klass = Struct.new(*value.keys.map(&:to_sym))
76
+ struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
77
+ instance_variable_set("@#{key}", struct_klass.new(*struct_values))
78
+ else
79
+ instance_variable_set("@#{key}", value)
80
+ end
81
+ end
82
+ end
83
+
84
+ # Create an instance of the class from a hash
85
+ # @param args [Hash] Hash containing all the required attributes
86
+ # @return [Line::Bot::V2::Webhook::MessageEditedEvent] Instance of the class
87
+ def self.create(args)
88
+ symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
89
+ return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
90
+ end
91
+
92
+ # @param other [Object] Object to compare
93
+ # @return [Boolean] true if the objects are equal, false otherwise
94
+ def ==(other)
95
+ return false unless self.class == other.class
96
+
97
+ instance_variables.all? do |var|
98
+ instance_variable_get(var) == other.instance_variable_get(var)
99
+ end
100
+ end
101
+
102
+ # @return [Integer] Hash code of the object
103
+ def hash
104
+ [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
@@ -2,6 +2,6 @@ module Line
2
2
  module Bot
3
3
  # This version is updated before releasing a new version in the release process.
4
4
  # You don't have to update this version manually.
5
- VERSION = "2.9.0"
5
+ VERSION = "2.10.0"
6
6
  end
7
7
  end
@@ -0,0 +1,60 @@
1
+ # Webhook Type Definition
2
+ # Webhook event definition of the LINE Messaging API
3
+ #
4
+ # The version of the OpenAPI document: 1.0.0
5
+ #
6
+ # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7
+ # https://openapi-generator.tech
8
+ # Do not edit the class manually.
9
+
10
+ module Line
11
+ module Bot
12
+ module V2
13
+ module Webhook
14
+ # Webhook event object which contains the edited message. This event is triggered when a user edits a text message. Currently, message editing is not available in one-on-one chats with LINE Official Accounts, so this event is only triggered in group chats. Multiple messageEdited webhook events may arrive out of order. The event with the largest timestamp represents the latest edit state.
15
+ # @see https://developers.line.biz/en/reference/messaging-api/#edit-event
16
+ class MessageEditedEvent < Event
17
+ attr_reader type: String
18
+ attr_accessor source: Source?
19
+ attr_accessor timestamp: Integer
20
+ attr_accessor mode: 'active'|'standby'
21
+ attr_accessor webhook_event_id: String
22
+ attr_accessor delivery_context: DeliveryContext
23
+ attr_accessor reply_token: String?
24
+ attr_accessor message: MessageContent
25
+
26
+
27
+ # @param source [Source, Hash[Symbol, untyped], nil]
28
+ # @param timestamp [Integer] Time of the event in milliseconds.
29
+ # @param mode [String] ('active'|'standby')
30
+ # @param webhook_event_id [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
31
+ # @param delivery_context [DeliveryContext, Hash[Symbol, untyped]]
32
+ # @param reply_token [String,nil]
33
+ # @param message [MessageContent, Hash[Symbol, untyped]]
34
+ def initialize: (
35
+ ?source: Source?| Hash[Symbol, untyped]?,
36
+ timestamp: Integer,
37
+ mode: 'active'|'standby',
38
+ webhook_event_id: String,
39
+ delivery_context: DeliveryContext| Hash[Symbol, untyped],
40
+ ?reply_token: String?,
41
+ message: MessageContent| Hash[Symbol, untyped],
42
+ **untyped dynamic_attributes
43
+ ) -> void
44
+
45
+ # Create an instance of the class from a hash
46
+ # @param args [Hash] Hash containing all the required attributes
47
+ # @return [Line::Bot::V2::Webhook::MessageEditedEvent] Instance of the class
48
+ def self.create: (Hash[Symbol, untyped]) -> MessageEditedEvent
49
+
50
+ # @param other [Object] Object to compare
51
+ # @return [Boolean] true if the objects are equal, false otherwise
52
+ def ==: (untyped other) -> bool
53
+
54
+ # @return [Integer] Hash code of the object
55
+ def hash: () -> Integer
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: line-bot-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LINE Corporation
@@ -384,6 +384,7 @@ files:
384
384
  - lib/line/bot/v2/webhook/model/mention.rb
385
385
  - lib/line/bot/v2/webhook/model/mentionee.rb
386
386
  - lib/line/bot/v2/webhook/model/message_content.rb
387
+ - lib/line/bot/v2/webhook/model/message_edited_event.rb
387
388
  - lib/line/bot/v2/webhook/model/message_event.rb
388
389
  - lib/line/bot/v2/webhook/model/module_content.rb
389
390
  - lib/line/bot/v2/webhook/model/module_event.rb
@@ -735,6 +736,7 @@ files:
735
736
  - sig/line/bot/v2/webhook/model/mention.rbs
736
737
  - sig/line/bot/v2/webhook/model/mentionee.rbs
737
738
  - sig/line/bot/v2/webhook/model/message_content.rbs
739
+ - sig/line/bot/v2/webhook/model/message_edited_event.rbs
738
740
  - sig/line/bot/v2/webhook/model/message_event.rbs
739
741
  - sig/line/bot/v2/webhook/model/module_content.rbs
740
742
  - sig/line/bot/v2/webhook/model/module_event.rbs