line-bot-api 2.1.0 → 2.1.1

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: 6d6263a9bbf4c4a5a3d6a18965c1d81b96b91aeb88bcfd7edf4a1dbdeed1d16e
4
- data.tar.gz: ed03051dcdd9b5bdd24382113758ae84d12e7ce42b900f75ced07efae11358c1
3
+ metadata.gz: b5f95117ed0f756ed78388b6be8db07ad07a9b5131777acc4bf9e7f25ae28360
4
+ data.tar.gz: c83d67fb180d080fda99b9adddc19afb5ed735abcdf707878662565f58ab8c6f
5
5
  SHA512:
6
- metadata.gz: b5eb071cae7e4db290c9a6e8248cd6e288ae9881fb08c2be18811aa083bab6b11636e6e57ec96b662baa0163e50da68274c6a173f1a88af27da82eb4aa660632
7
- data.tar.gz: c7e60c5813c0201f172f373b85d937a93f134b80044710a8289886da635ee0b95fe0ac5b56ca5c6a06acec8697152415f54516ac474898687d3a675913e64094
6
+ metadata.gz: ee628de27dbc86b9d3d1e28ce197ce25b961bac93dde96ff64b7690eae34ebfcca9e6b4b0d139eeaf5883c496264f9c4befb32c8662a01dfa7cdbaec10ff987e
7
+ data.tar.gz: 03250bc3d1418cfd1f1c41fd411841b800e649aa590f42f64b51e599c591fd105799d4b8e3a11981e7b598403b4747c48e59b7f1558da767e6046ac82580a33a
data/README.md CHANGED
@@ -312,9 +312,11 @@ request = Line::Bot::V2::MessagingApi::PushMessageRequest.create(
312
312
  ```
313
313
 
314
314
  ## Versioning
315
+
315
316
  This project respects semantic versioning.
317
+ - See https://semver.org/
316
318
 
317
- See https://semver.org/
319
+ However, if a feature that was publicly released is discontinued for business reasons and becomes completely unusable, we will release changes as a patch release.
318
320
 
319
321
  ### v1 and v2
320
322
  v1 and v2 are completely different implementations. Migration to v2 is strongly recommended.
@@ -10,7 +10,6 @@
10
10
 
11
11
  # Models
12
12
  require_relative './model/account_link_event'
13
- require_relative './model/action_result'
14
13
  require_relative './model/activated_event'
15
14
  require_relative './model/all_mentionee'
16
15
  require_relative './model/attached_module_content'
@@ -41,7 +40,6 @@ require_relative './model/leave_event'
41
40
  require_relative './model/left_members'
42
41
  require_relative './model/left_membership_content'
43
42
  require_relative './model/link_content'
44
- require_relative './model/link_things_content'
45
43
  require_relative './model/location_message_content'
46
44
  require_relative './model/member_joined_event'
47
45
  require_relative './model/member_left_event'
@@ -59,15 +57,10 @@ require_relative './model/postback_content'
59
57
  require_relative './model/postback_event'
60
58
  require_relative './model/renewed_membership_content'
61
59
  require_relative './model/room_source'
62
- require_relative './model/scenario_result'
63
- require_relative './model/scenario_result_things_content'
64
60
  require_relative './model/source'
65
61
  require_relative './model/sticker_message_content'
66
62
  require_relative './model/text_message_content'
67
- require_relative './model/things_content'
68
- require_relative './model/things_event'
69
63
  require_relative './model/unfollow_event'
70
- require_relative './model/unlink_things_content'
71
64
  require_relative './model/unsend_detail'
72
65
  require_relative './model/unsend_event'
73
66
  require_relative './model/user_mentionee'
@@ -113,7 +113,6 @@ module Line
113
113
  module: Line::Bot::V2::Webhook::ModuleEvent,
114
114
  delivery: Line::Bot::V2::Webhook::PnpDeliveryCompletionEvent,
115
115
  postback: Line::Bot::V2::Webhook::PostbackEvent,
116
- things: Line::Bot::V2::Webhook::ThingsEvent,
117
116
  unfollow: Line::Bot::V2::Webhook::UnfollowEvent,
118
117
  unsend: Line::Bot::V2::Webhook::UnsendEvent,
119
118
  videoPlayComplete: Line::Bot::V2::Webhook::VideoPlayCompleteEvent,
@@ -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.1.0"
5
+ VERSION = "2.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: line-bot-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - LINE Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-06 00:00:00.000000000 Z
11
+ date: 2025-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multipart-post
@@ -337,7 +337,6 @@ files:
337
337
  - lib/line/bot/v2/utils.rb
338
338
  - lib/line/bot/v2/webhook/core.rb
339
339
  - lib/line/bot/v2/webhook/model/account_link_event.rb
340
- - lib/line/bot/v2/webhook/model/action_result.rb
341
340
  - lib/line/bot/v2/webhook/model/activated_event.rb
342
341
  - lib/line/bot/v2/webhook/model/all_mentionee.rb
343
342
  - lib/line/bot/v2/webhook/model/attached_module_content.rb
@@ -368,7 +367,6 @@ files:
368
367
  - lib/line/bot/v2/webhook/model/left_members.rb
369
368
  - lib/line/bot/v2/webhook/model/left_membership_content.rb
370
369
  - lib/line/bot/v2/webhook/model/link_content.rb
371
- - lib/line/bot/v2/webhook/model/link_things_content.rb
372
370
  - lib/line/bot/v2/webhook/model/location_message_content.rb
373
371
  - lib/line/bot/v2/webhook/model/member_joined_event.rb
374
372
  - lib/line/bot/v2/webhook/model/member_left_event.rb
@@ -386,15 +384,10 @@ files:
386
384
  - lib/line/bot/v2/webhook/model/postback_event.rb
387
385
  - lib/line/bot/v2/webhook/model/renewed_membership_content.rb
388
386
  - lib/line/bot/v2/webhook/model/room_source.rb
389
- - lib/line/bot/v2/webhook/model/scenario_result.rb
390
- - lib/line/bot/v2/webhook/model/scenario_result_things_content.rb
391
387
  - lib/line/bot/v2/webhook/model/source.rb
392
388
  - lib/line/bot/v2/webhook/model/sticker_message_content.rb
393
389
  - lib/line/bot/v2/webhook/model/text_message_content.rb
394
- - lib/line/bot/v2/webhook/model/things_content.rb
395
- - lib/line/bot/v2/webhook/model/things_event.rb
396
390
  - lib/line/bot/v2/webhook/model/unfollow_event.rb
397
- - lib/line/bot/v2/webhook/model/unlink_things_content.rb
398
391
  - lib/line/bot/v2/webhook/model/unsend_detail.rb
399
392
  - lib/line/bot/v2/webhook/model/unsend_event.rb
400
393
  - lib/line/bot/v2/webhook/model/user_mentionee.rb
@@ -684,7 +677,6 @@ files:
684
677
  - sig/line/bot/v2/shop/model/mission_sticker_request.rbs
685
678
  - sig/line/bot/v2/utils.rbs
686
679
  - sig/line/bot/v2/webhook/model/account_link_event.rbs
687
- - sig/line/bot/v2/webhook/model/action_result.rbs
688
680
  - sig/line/bot/v2/webhook/model/activated_event.rbs
689
681
  - sig/line/bot/v2/webhook/model/all_mentionee.rbs
690
682
  - sig/line/bot/v2/webhook/model/attached_module_content.rbs
@@ -715,7 +707,6 @@ files:
715
707
  - sig/line/bot/v2/webhook/model/left_members.rbs
716
708
  - sig/line/bot/v2/webhook/model/left_membership_content.rbs
717
709
  - sig/line/bot/v2/webhook/model/link_content.rbs
718
- - sig/line/bot/v2/webhook/model/link_things_content.rbs
719
710
  - sig/line/bot/v2/webhook/model/location_message_content.rbs
720
711
  - sig/line/bot/v2/webhook/model/member_joined_event.rbs
721
712
  - sig/line/bot/v2/webhook/model/member_left_event.rbs
@@ -733,15 +724,10 @@ files:
733
724
  - sig/line/bot/v2/webhook/model/postback_event.rbs
734
725
  - sig/line/bot/v2/webhook/model/renewed_membership_content.rbs
735
726
  - sig/line/bot/v2/webhook/model/room_source.rbs
736
- - sig/line/bot/v2/webhook/model/scenario_result.rbs
737
- - sig/line/bot/v2/webhook/model/scenario_result_things_content.rbs
738
727
  - sig/line/bot/v2/webhook/model/source.rbs
739
728
  - sig/line/bot/v2/webhook/model/sticker_message_content.rbs
740
729
  - sig/line/bot/v2/webhook/model/text_message_content.rbs
741
- - sig/line/bot/v2/webhook/model/things_content.rbs
742
- - sig/line/bot/v2/webhook/model/things_event.rbs
743
730
  - sig/line/bot/v2/webhook/model/unfollow_event.rbs
744
- - sig/line/bot/v2/webhook/model/unlink_things_content.rbs
745
731
  - sig/line/bot/v2/webhook/model/unsend_detail.rbs
746
732
  - sig/line/bot/v2/webhook/model/unsend_event.rbs
747
733
  - sig/line/bot/v2/webhook/model/user_mentionee.rbs
@@ -1,72 +0,0 @@
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
- class ActionResult
15
- # @!attribute [rw] type
16
- # @return [String] ('void'|'binary')
17
- attr_accessor :type
18
- # @!attribute [rw] data
19
- # @return [String,nil] Base64-encoded binary data
20
- attr_accessor :data
21
-
22
- # @param type [String] ('void'|'binary')
23
- # @param data [String,nil] Base64-encoded binary data
24
- def initialize(
25
- type:,
26
- data: nil,
27
- **dynamic_attributes
28
- )
29
-
30
- @type = type
31
- @data = data
32
-
33
- dynamic_attributes.each do |key, value|
34
- self.class.attr_accessor key
35
-
36
- if value.is_a?(Hash)
37
- struct_klass = Struct.new(*value.keys.map(&:to_sym))
38
- struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
39
- instance_variable_set("@#{key}", struct_klass.new(*struct_values))
40
- else
41
- instance_variable_set("@#{key}", value)
42
- end
43
- end
44
- end
45
-
46
- # Create an instance of the class from a hash
47
- # @param args [Hash] Hash containing all the required attributes
48
- # @return [Line::Bot::V2::Webhook::ActionResult] Instance of the class
49
- def self.create(args) # steep:ignore
50
- symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
51
- return new(**symbolized_args) # steep:ignore
52
- end
53
-
54
- # @param other [Object] Object to compare
55
- # @return [Boolean] true if the objects are equal, false otherwise
56
- def ==(other)
57
- return false unless self.class == other.class
58
-
59
- instance_variables.all? do |var|
60
- instance_variable_get(var) == other.instance_variable_get(var)
61
- end
62
- end
63
-
64
- # @return [Integer] Hash code of the object
65
- def hash
66
- [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
67
- end
68
- end
69
- end
70
- end
71
- end
72
- end
@@ -1,72 +0,0 @@
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 './things_content'
11
-
12
- module Line
13
- module Bot
14
- module V2
15
- module Webhook
16
- class LinkThingsContent < ThingsContent
17
- # @!attribute [r] type
18
- # @return [String] Type
19
- attr_reader :type
20
- # @!attribute [rw] device_id
21
- # @return [String] Device ID of the device that has been linked with LINE.
22
- attr_accessor :device_id
23
-
24
- # @param device_id [String] Device ID of the device that has been linked with LINE.
25
- def initialize(
26
- device_id:,
27
- **dynamic_attributes
28
- )
29
- @type = "link"
30
-
31
- @device_id = device_id
32
-
33
- dynamic_attributes.each do |key, value|
34
- self.class.attr_accessor key
35
-
36
- if value.is_a?(Hash)
37
- struct_klass = Struct.new(*value.keys.map(&:to_sym))
38
- struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
39
- instance_variable_set("@#{key}", struct_klass.new(*struct_values))
40
- else
41
- instance_variable_set("@#{key}", value)
42
- end
43
- end
44
- end
45
-
46
- # Create an instance of the class from a hash
47
- # @param args [Hash] Hash containing all the required attributes
48
- # @return [Line::Bot::V2::Webhook::LinkThingsContent] Instance of the class
49
- def self.create(args) # steep:ignore
50
- symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
51
- return new(**symbolized_args) # steep:ignore
52
- end
53
-
54
- # @param other [Object] Object to compare
55
- # @return [Boolean] true if the objects are equal, false otherwise
56
- def ==(other)
57
- return false unless self.class == other.class
58
-
59
- instance_variables.all? do |var|
60
- instance_variable_get(var) == other.instance_variable_get(var)
61
- end
62
- end
63
-
64
- # @return [Integer] Hash code of the object
65
- def hash
66
- [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
67
- end
68
- end
69
- end
70
- end
71
- end
72
- end
@@ -1,115 +0,0 @@
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
- # @see https://developers.line.biz/en/reference/messaging-api/#scenario-result-event
15
- class ScenarioResult
16
- # @!attribute [rw] scenario_id
17
- # @return [String,nil] Scenario ID executed
18
- attr_accessor :scenario_id
19
- # @!attribute [rw] revision
20
- # @return [Integer,nil] Revision number of the scenario set containing the executed scenario
21
- attr_accessor :revision
22
- # @!attribute [rw] start_time
23
- # @return [Integer] Timestamp for when execution of scenario action started (milliseconds, LINE app time)
24
- attr_accessor :start_time
25
- # @!attribute [rw] end_time
26
- # @return [Integer] Timestamp for when execution of scenario was completed (milliseconds, LINE app time)
27
- attr_accessor :end_time
28
- # @!attribute [rw] result_code
29
- # @return [String] Scenario execution completion status
30
- attr_accessor :result_code
31
- # @!attribute [rw] action_results
32
- # @return [Array[ActionResult],nil] Execution result of individual operations specified in action. Only included when things.result.resultCode is success.
33
- attr_accessor :action_results
34
- # @!attribute [rw] ble_notification_payload
35
- # @return [String,nil] Data contained in notification.
36
- attr_accessor :ble_notification_payload
37
- # @!attribute [rw] error_reason
38
- # @return [String,nil] Error reason.
39
- attr_accessor :error_reason
40
-
41
- # @param scenario_id [String,nil] Scenario ID executed
42
- # @param revision [Integer,nil] Revision number of the scenario set containing the executed scenario
43
- # @param start_time [Integer] Timestamp for when execution of scenario action started (milliseconds, LINE app time)
44
- # @param end_time [Integer] Timestamp for when execution of scenario was completed (milliseconds, LINE app time)
45
- # @param result_code [String] Scenario execution completion status
46
- # @param action_results [Array[ActionResult, Hash[Symbol, untyped]],nil] Execution result of individual operations specified in action. Only included when things.result.resultCode is success.
47
- # @param ble_notification_payload [String,nil] Data contained in notification.
48
- # @param error_reason [String,nil] Error reason.
49
- def initialize(
50
- scenario_id: nil,
51
- revision: nil,
52
- start_time:,
53
- end_time:,
54
- result_code:,
55
- action_results: nil,
56
- ble_notification_payload: nil,
57
- error_reason: nil,
58
- **dynamic_attributes
59
- )
60
-
61
- @scenario_id = scenario_id
62
- @revision = revision
63
- @start_time = start_time
64
- @end_time = end_time
65
- @result_code = result_code
66
- @action_results = action_results&.map do |item|
67
- if item.is_a?(Hash)
68
- Line::Bot::V2::Webhook::ActionResult.create(**item) # steep:ignore InsufficientKeywordArguments
69
- else
70
- item
71
- end
72
- end
73
- @ble_notification_payload = ble_notification_payload
74
- @error_reason = error_reason
75
-
76
- dynamic_attributes.each do |key, value|
77
- self.class.attr_accessor key
78
-
79
- if value.is_a?(Hash)
80
- struct_klass = Struct.new(*value.keys.map(&:to_sym))
81
- struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
82
- instance_variable_set("@#{key}", struct_klass.new(*struct_values))
83
- else
84
- instance_variable_set("@#{key}", value)
85
- end
86
- end
87
- end
88
-
89
- # Create an instance of the class from a hash
90
- # @param args [Hash] Hash containing all the required attributes
91
- # @return [Line::Bot::V2::Webhook::ScenarioResult] Instance of the class
92
- def self.create(args) # steep:ignore
93
- symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
94
- return new(**symbolized_args) # steep:ignore
95
- end
96
-
97
- # @param other [Object] Object to compare
98
- # @return [Boolean] true if the objects are equal, false otherwise
99
- def ==(other)
100
- return false unless self.class == other.class
101
-
102
- instance_variables.all? do |var|
103
- instance_variable_get(var) == other.instance_variable_get(var)
104
- end
105
- end
106
-
107
- # @return [Integer] Hash code of the object
108
- def hash
109
- [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
110
- end
111
- end
112
- end
113
- end
114
- end
115
- end
@@ -1,78 +0,0 @@
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 './things_content'
11
-
12
- module Line
13
- module Bot
14
- module V2
15
- module Webhook
16
- class ScenarioResultThingsContent < ThingsContent
17
- # @!attribute [r] type
18
- # @return [String] Type
19
- attr_reader :type
20
- # @!attribute [rw] device_id
21
- # @return [String] Device ID of the device that has been linked with LINE.
22
- attr_accessor :device_id
23
- # @!attribute [rw] result
24
- # @return [ScenarioResult]
25
- attr_accessor :result
26
-
27
- # @param device_id [String] Device ID of the device that has been linked with LINE.
28
- # @param result [ScenarioResult, Hash[Symbol, untyped]]
29
- def initialize(
30
- device_id:,
31
- result:,
32
- **dynamic_attributes
33
- )
34
- @type = "scenarioResult"
35
-
36
- @device_id = device_id
37
- @result = result.is_a?(Line::Bot::V2::Webhook::ScenarioResult) ? result : Line::Bot::V2::Webhook::ScenarioResult.create(**result) # steep:ignore
38
-
39
- dynamic_attributes.each do |key, value|
40
- self.class.attr_accessor key
41
-
42
- if value.is_a?(Hash)
43
- struct_klass = Struct.new(*value.keys.map(&:to_sym))
44
- struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
45
- instance_variable_set("@#{key}", struct_klass.new(*struct_values))
46
- else
47
- instance_variable_set("@#{key}", value)
48
- end
49
- end
50
- end
51
-
52
- # Create an instance of the class from a hash
53
- # @param args [Hash] Hash containing all the required attributes
54
- # @return [Line::Bot::V2::Webhook::ScenarioResultThingsContent] Instance of the class
55
- def self.create(args) # steep:ignore
56
- symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
57
- return new(**symbolized_args) # steep:ignore
58
- end
59
-
60
- # @param other [Object] Object to compare
61
- # @return [Boolean] true if the objects are equal, false otherwise
62
- def ==(other)
63
- return false unless self.class == other.class
64
-
65
- instance_variables.all? do |var|
66
- instance_variable_get(var) == other.instance_variable_get(var)
67
- end
68
- end
69
-
70
- # @return [Integer] Hash code of the object
71
- def hash
72
- [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
73
- end
74
- end
75
- end
76
- end
77
- end
78
- end
@@ -1,78 +0,0 @@
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
- class ThingsContent
15
- # @!attribute [rw] type
16
- # @return [String] Type
17
- attr_accessor :type
18
-
19
- # @param type [String] Type
20
- def initialize(
21
- type:,
22
- **dynamic_attributes
23
- )
24
-
25
- @type = type
26
-
27
- dynamic_attributes.each do |key, value|
28
- self.class.attr_accessor key
29
-
30
- if value.is_a?(Hash)
31
- struct_klass = Struct.new(*value.keys.map(&:to_sym))
32
- struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
33
- instance_variable_set("@#{key}", struct_klass.new(*struct_values))
34
- else
35
- instance_variable_set("@#{key}", value)
36
- end
37
- end
38
- end
39
-
40
- # Create an instance of the class from a hash
41
- # @param args [Hash] Hash containing all the required attributes
42
- # @return [Line::Bot::V2::Webhook::ThingsContent] Instance of the class
43
- def self.create(args) # steep:ignore
44
- symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
45
- klass = detect_class(type: symbolized_args[:type])
46
- return klass.new(**symbolized_args) if klass # steep:ignore
47
- return new(**symbolized_args) # steep:ignore
48
- end
49
-
50
- # @param other [Object] Object to compare
51
- # @return [Boolean] true if the objects are equal, false otherwise
52
- def ==(other)
53
- return false unless self.class == other.class
54
-
55
- instance_variables.all? do |var|
56
- instance_variable_get(var) == other.instance_variable_get(var)
57
- end
58
- end
59
-
60
- # @return [Integer] Hash code of the object
61
- def hash
62
- [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
63
- end
64
-
65
- private
66
-
67
- def self.detect_class(type:)
68
- {
69
- link: Line::Bot::V2::Webhook::LinkThingsContent,
70
- scenarioResult: Line::Bot::V2::Webhook::ScenarioResultThingsContent,
71
- unlink: Line::Bot::V2::Webhook::UnlinkThingsContent,
72
- }[type.to_sym]
73
- end
74
- end
75
- end
76
- end
77
- end
78
- end
@@ -1,109 +0,0 @@
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
- # Indicates that a user linked a device with LINE.
17
- class ThingsEvent < Event
18
- # @!attribute [r] type
19
- # @return [String] Type of the event
20
- attr_reader :type
21
- # @!attribute [rw] source
22
- # @return [Source,nil]
23
- attr_accessor :source
24
- # @!attribute [rw] timestamp
25
- # @return [Integer] Time of the event in milliseconds.
26
- attr_accessor :timestamp
27
- # @!attribute [rw] mode
28
- # @return [String] ('active'|'standby')
29
- attr_accessor :mode
30
- # @!attribute [rw] webhook_event_id
31
- # @return [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
32
- attr_accessor :webhook_event_id
33
- # @!attribute [rw] delivery_context
34
- # @return [DeliveryContext]
35
- attr_accessor :delivery_context
36
- # @!attribute [rw] reply_token
37
- # @return [String] Reply token used to send reply message to this event
38
- attr_accessor :reply_token
39
- # @!attribute [rw] things
40
- # @return [ThingsContent]
41
- attr_accessor :things
42
-
43
- # @param source [Source, Hash[Symbol, untyped], nil]
44
- # @param timestamp [Integer] Time of the event in milliseconds.
45
- # @param mode [String] ('active'|'standby')
46
- # @param webhook_event_id [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
47
- # @param delivery_context [DeliveryContext, Hash[Symbol, untyped]]
48
- # @param reply_token [String] Reply token used to send reply message to this event
49
- # @param things [ThingsContent, Hash[Symbol, untyped]]
50
- def initialize(
51
- source: nil,
52
- timestamp:,
53
- mode:,
54
- webhook_event_id:,
55
- delivery_context:,
56
- reply_token:,
57
- things:,
58
- **dynamic_attributes
59
- )
60
- @type = "things"
61
-
62
- @source = source.is_a?(Line::Bot::V2::Webhook::Source) || source.nil? ? source : Line::Bot::V2::Webhook::Source.create(**source) # steep:ignore
63
- @timestamp = timestamp
64
- @mode = mode
65
- @webhook_event_id = webhook_event_id
66
- @delivery_context = delivery_context.is_a?(Line::Bot::V2::Webhook::DeliveryContext) ? delivery_context : Line::Bot::V2::Webhook::DeliveryContext.create(**delivery_context) # steep:ignore
67
- @reply_token = reply_token
68
- @things = things.is_a?(Line::Bot::V2::Webhook::ThingsContent) ? things : Line::Bot::V2::Webhook::ThingsContent.create(**things) # steep:ignore
69
-
70
- dynamic_attributes.each do |key, value|
71
- self.class.attr_accessor key
72
-
73
- if value.is_a?(Hash)
74
- struct_klass = Struct.new(*value.keys.map(&:to_sym))
75
- struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
76
- instance_variable_set("@#{key}", struct_klass.new(*struct_values))
77
- else
78
- instance_variable_set("@#{key}", value)
79
- end
80
- end
81
- end
82
-
83
- # Create an instance of the class from a hash
84
- # @param args [Hash] Hash containing all the required attributes
85
- # @return [Line::Bot::V2::Webhook::ThingsEvent] Instance of the class
86
- def self.create(args) # steep:ignore
87
- symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
88
- return new(**symbolized_args) # steep:ignore
89
- end
90
-
91
- # @param other [Object] Object to compare
92
- # @return [Boolean] true if the objects are equal, false otherwise
93
- def ==(other)
94
- return false unless self.class == other.class
95
-
96
- instance_variables.all? do |var|
97
- instance_variable_get(var) == other.instance_variable_get(var)
98
- end
99
- end
100
-
101
- # @return [Integer] Hash code of the object
102
- def hash
103
- [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
104
- end
105
- end
106
- end
107
- end
108
- end
109
- end
@@ -1,72 +0,0 @@
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 './things_content'
11
-
12
- module Line
13
- module Bot
14
- module V2
15
- module Webhook
16
- class UnlinkThingsContent < ThingsContent
17
- # @!attribute [r] type
18
- # @return [String] Type
19
- attr_reader :type
20
- # @!attribute [rw] device_id
21
- # @return [String] Device ID of the device that has been linked with LINE.
22
- attr_accessor :device_id
23
-
24
- # @param device_id [String] Device ID of the device that has been linked with LINE.
25
- def initialize(
26
- device_id:,
27
- **dynamic_attributes
28
- )
29
- @type = "unlink"
30
-
31
- @device_id = device_id
32
-
33
- dynamic_attributes.each do |key, value|
34
- self.class.attr_accessor key
35
-
36
- if value.is_a?(Hash)
37
- struct_klass = Struct.new(*value.keys.map(&:to_sym))
38
- struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
39
- instance_variable_set("@#{key}", struct_klass.new(*struct_values))
40
- else
41
- instance_variable_set("@#{key}", value)
42
- end
43
- end
44
- end
45
-
46
- # Create an instance of the class from a hash
47
- # @param args [Hash] Hash containing all the required attributes
48
- # @return [Line::Bot::V2::Webhook::UnlinkThingsContent] Instance of the class
49
- def self.create(args) # steep:ignore
50
- symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
51
- return new(**symbolized_args) # steep:ignore
52
- end
53
-
54
- # @param other [Object] Object to compare
55
- # @return [Boolean] true if the objects are equal, false otherwise
56
- def ==(other)
57
- return false unless self.class == other.class
58
-
59
- instance_variables.all? do |var|
60
- instance_variable_get(var) == other.instance_variable_get(var)
61
- end
62
- end
63
-
64
- # @return [Integer] Hash code of the object
65
- def hash
66
- [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
67
- end
68
- end
69
- end
70
- end
71
- end
72
- end
@@ -1,42 +0,0 @@
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
- class ActionResult
15
- attr_accessor type: 'void'|'binary'
16
- attr_accessor data: String?
17
-
18
-
19
- # @param type [String] ('void'|'binary')
20
- # @param data [String,nil] Base64-encoded binary data
21
- def initialize: (
22
- type: 'void'|'binary',
23
- ?data: String?,
24
- **untyped dynamic_attributes
25
- ) -> void
26
-
27
- # Create an instance of the class from a hash
28
- # @param args [Hash] Hash containing all the required attributes
29
- # @return [Line::Bot::V2::Webhook::ActionResult] Instance of the class
30
- def self.create: (Hash[Symbol, untyped]) -> ActionResult
31
-
32
- # @param other [Object] Object to compare
33
- # @return [Boolean] true if the objects are equal, false otherwise
34
- def ==: (untyped other) -> bool
35
-
36
- # @return [Integer] Hash code of the object
37
- def hash: () -> Integer
38
- end
39
- end
40
- end
41
- end
42
- end
@@ -1,40 +0,0 @@
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
- class LinkThingsContent < ThingsContent
15
- attr_reader type: String
16
- attr_accessor device_id: String
17
-
18
-
19
- # @param device_id [String] Device ID of the device that has been linked with LINE.
20
- def initialize: (
21
- device_id: String,
22
- **untyped dynamic_attributes
23
- ) -> void
24
-
25
- # Create an instance of the class from a hash
26
- # @param args [Hash] Hash containing all the required attributes
27
- # @return [Line::Bot::V2::Webhook::LinkThingsContent] Instance of the class
28
- def self.create: (Hash[Symbol, untyped]) -> LinkThingsContent
29
-
30
- # @param other [Object] Object to compare
31
- # @return [Boolean] true if the objects are equal, false otherwise
32
- def ==: (untyped other) -> bool
33
-
34
- # @return [Integer] Hash code of the object
35
- def hash: () -> Integer
36
- end
37
- end
38
- end
39
- end
40
- end
@@ -1,61 +0,0 @@
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
- # @see https://developers.line.biz/en/reference/messaging-api/#scenario-result-event
15
- class ScenarioResult
16
- attr_accessor scenario_id: String?
17
- attr_accessor revision: Integer?
18
- attr_accessor start_time: Integer
19
- attr_accessor end_time: Integer
20
- attr_accessor result_code: String
21
- attr_accessor action_results: Array[ActionResult]?
22
- attr_accessor ble_notification_payload: String?
23
- attr_accessor error_reason: String?
24
-
25
-
26
- # @param scenario_id [String,nil] Scenario ID executed
27
- # @param revision [Integer,nil] Revision number of the scenario set containing the executed scenario
28
- # @param start_time [Integer] Timestamp for when execution of scenario action started (milliseconds, LINE app time)
29
- # @param end_time [Integer] Timestamp for when execution of scenario was completed (milliseconds, LINE app time)
30
- # @param result_code [String] Scenario execution completion status
31
- # @param action_results [Array[ActionResult, Hash[Symbol, untyped]],nil] Execution result of individual operations specified in action. Only included when things.result.resultCode is success.
32
- # @param ble_notification_payload [String,nil] Data contained in notification.
33
- # @param error_reason [String,nil] Error reason.
34
- def initialize: (
35
- ?scenario_id: String?,
36
- ?revision: Integer?,
37
- start_time: Integer,
38
- end_time: Integer,
39
- result_code: String,
40
- ?action_results: Array[ActionResult| Hash[Symbol, untyped]]?,
41
- ?ble_notification_payload: String?,
42
- ?error_reason: String?,
43
- **untyped dynamic_attributes
44
- ) -> void
45
-
46
- # Create an instance of the class from a hash
47
- # @param args [Hash] Hash containing all the required attributes
48
- # @return [Line::Bot::V2::Webhook::ScenarioResult] Instance of the class
49
- def self.create: (Hash[Symbol, untyped]) -> ScenarioResult
50
-
51
- # @param other [Object] Object to compare
52
- # @return [Boolean] true if the objects are equal, false otherwise
53
- def ==: (untyped other) -> bool
54
-
55
- # @return [Integer] Hash code of the object
56
- def hash: () -> Integer
57
- end
58
- end
59
- end
60
- end
61
- end
@@ -1,43 +0,0 @@
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
- class ScenarioResultThingsContent < ThingsContent
15
- attr_reader type: String
16
- attr_accessor device_id: String
17
- attr_accessor result: ScenarioResult
18
-
19
-
20
- # @param device_id [String] Device ID of the device that has been linked with LINE.
21
- # @param result [ScenarioResult, Hash[Symbol, untyped]]
22
- def initialize: (
23
- device_id: String,
24
- result: ScenarioResult| Hash[Symbol, untyped],
25
- **untyped dynamic_attributes
26
- ) -> void
27
-
28
- # Create an instance of the class from a hash
29
- # @param args [Hash] Hash containing all the required attributes
30
- # @return [Line::Bot::V2::Webhook::ScenarioResultThingsContent] Instance of the class
31
- def self.create: (Hash[Symbol, untyped]) -> ScenarioResultThingsContent
32
-
33
- # @param other [Object] Object to compare
34
- # @return [Boolean] true if the objects are equal, false otherwise
35
- def ==: (untyped other) -> bool
36
-
37
- # @return [Integer] Hash code of the object
38
- def hash: () -> Integer
39
- end
40
- end
41
- end
42
- end
43
- end
@@ -1,43 +0,0 @@
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
- class ThingsContent
15
- attr_accessor type: String
16
-
17
-
18
- # @param type [String] Type
19
- def initialize: (
20
- type: String,
21
- **untyped dynamic_attributes
22
- ) -> void
23
-
24
- # Create an instance of the class from a hash
25
- # @param args [Hash] Hash containing all the required attributes
26
- # @return [Line::Bot::V2::Webhook::ThingsContent] Instance of the class
27
- def self.create: (Hash[Symbol, untyped]) -> ThingsContent
28
-
29
- # @param other [Object] Object to compare
30
- # @return [Boolean] true if the objects are equal, false otherwise
31
- def ==: (untyped other) -> bool
32
-
33
- # @return [Integer] Hash code of the object
34
- def hash: () -> Integer
35
-
36
- private
37
-
38
- def self.detect_class: (type: String) -> Class?
39
- end
40
- end
41
- end
42
- end
43
- end
@@ -1,59 +0,0 @@
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
- # Indicates that a user linked a device with LINE.
15
- class ThingsEvent < Event
16
- attr_reader type: String
17
- attr_accessor source: Source?
18
- attr_accessor timestamp: Integer
19
- attr_accessor mode: 'active'|'standby'
20
- attr_accessor webhook_event_id: String
21
- attr_accessor delivery_context: DeliveryContext
22
- attr_accessor reply_token: String
23
- attr_accessor things: ThingsContent
24
-
25
-
26
- # @param source [Source, Hash[Symbol, untyped], nil]
27
- # @param timestamp [Integer] Time of the event in milliseconds.
28
- # @param mode [String] ('active'|'standby')
29
- # @param webhook_event_id [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
30
- # @param delivery_context [DeliveryContext, Hash[Symbol, untyped]]
31
- # @param reply_token [String] Reply token used to send reply message to this event
32
- # @param things [ThingsContent, Hash[Symbol, untyped]]
33
- def initialize: (
34
- ?source: Source?| Hash[Symbol, untyped]?,
35
- timestamp: Integer,
36
- mode: 'active'|'standby',
37
- webhook_event_id: String,
38
- delivery_context: DeliveryContext| Hash[Symbol, untyped],
39
- reply_token: String,
40
- things: ThingsContent| Hash[Symbol, untyped],
41
- **untyped dynamic_attributes
42
- ) -> void
43
-
44
- # Create an instance of the class from a hash
45
- # @param args [Hash] Hash containing all the required attributes
46
- # @return [Line::Bot::V2::Webhook::ThingsEvent] Instance of the class
47
- def self.create: (Hash[Symbol, untyped]) -> ThingsEvent
48
-
49
- # @param other [Object] Object to compare
50
- # @return [Boolean] true if the objects are equal, false otherwise
51
- def ==: (untyped other) -> bool
52
-
53
- # @return [Integer] Hash code of the object
54
- def hash: () -> Integer
55
- end
56
- end
57
- end
58
- end
59
- end
@@ -1,40 +0,0 @@
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
- class UnlinkThingsContent < ThingsContent
15
- attr_reader type: String
16
- attr_accessor device_id: String
17
-
18
-
19
- # @param device_id [String] Device ID of the device that has been linked with LINE.
20
- def initialize: (
21
- device_id: String,
22
- **untyped dynamic_attributes
23
- ) -> void
24
-
25
- # Create an instance of the class from a hash
26
- # @param args [Hash] Hash containing all the required attributes
27
- # @return [Line::Bot::V2::Webhook::UnlinkThingsContent] Instance of the class
28
- def self.create: (Hash[Symbol, untyped]) -> UnlinkThingsContent
29
-
30
- # @param other [Object] Object to compare
31
- # @return [Boolean] true if the objects are equal, false otherwise
32
- def ==: (untyped other) -> bool
33
-
34
- # @return [Integer] Hash code of the object
35
- def hash: () -> Integer
36
- end
37
- end
38
- end
39
- end
40
- end