line-bot-api 2.9.0 → 2.11.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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/lib/line/bot/v2/messaging_api/api/messaging_api_client.rb +114 -0
  3. data/lib/line/bot/v2/messaging_api/core.rb +5 -0
  4. data/lib/line/bot/v2/messaging_api/model/acquisition_condition_request.rb +1 -1
  5. data/lib/line/bot/v2/messaging_api/model/acquisition_condition_response.rb +1 -1
  6. data/lib/line/bot/v2/messaging_api/model/action.rb +1 -1
  7. data/lib/line/bot/v2/messaging_api/model/cash_back_price_info_request.rb +1 -1
  8. data/lib/line/bot/v2/messaging_api/model/cash_back_price_info_response.rb +1 -1
  9. data/lib/line/bot/v2/messaging_api/model/coupon_reward_request.rb +1 -1
  10. data/lib/line/bot/v2/messaging_api/model/coupon_reward_response.rb +1 -1
  11. data/lib/line/bot/v2/messaging_api/model/demographic_filter.rb +1 -1
  12. data/lib/line/bot/v2/messaging_api/model/discount_price_info_request.rb +1 -1
  13. data/lib/line/bot/v2/messaging_api/model/discount_price_info_response.rb +1 -1
  14. data/lib/line/bot/v2/messaging_api/model/flex_box_background.rb +1 -1
  15. data/lib/line/bot/v2/messaging_api/model/flex_component.rb +1 -1
  16. data/lib/line/bot/v2/messaging_api/model/flex_container.rb +1 -1
  17. data/lib/line/bot/v2/messaging_api/model/imagemap_action.rb +1 -1
  18. data/lib/line/bot/v2/messaging_api/model/mention_target.rb +1 -1
  19. data/lib/line/bot/v2/messaging_api/model/message.rb +1 -1
  20. data/lib/line/bot/v2/messaging_api/model/pnp_messages_request.rb +6 -0
  21. data/lib/line/bot/v2/messaging_api/model/pnp_templated_button.rb +73 -0
  22. data/lib/line/bot/v2/messaging_api/model/pnp_templated_emphasized_item.rb +74 -0
  23. data/lib/line/bot/v2/messaging_api/model/pnp_templated_item.rb +73 -0
  24. data/lib/line/bot/v2/messaging_api/model/pnp_templated_message_body.rb +92 -0
  25. data/lib/line/bot/v2/messaging_api/model/pnp_templated_message_request.rb +85 -0
  26. data/lib/line/bot/v2/messaging_api/model/recipient.rb +1 -1
  27. data/lib/line/bot/v2/messaging_api/model/rich_menu_batch_operation.rb +1 -1
  28. data/lib/line/bot/v2/messaging_api/model/substitution_object.rb +1 -1
  29. data/lib/line/bot/v2/messaging_api/model/template.rb +1 -1
  30. data/lib/line/bot/v2/webhook/core.rb +1 -0
  31. data/lib/line/bot/v2/webhook/model/event.rb +2 -1
  32. data/lib/line/bot/v2/webhook/model/membership_content.rb +1 -1
  33. data/lib/line/bot/v2/webhook/model/mentionee.rb +1 -1
  34. data/lib/line/bot/v2/webhook/model/message_content.rb +1 -1
  35. data/lib/line/bot/v2/webhook/model/message_edited_event.rb +110 -0
  36. data/lib/line/bot/v2/webhook/model/module_content.rb +1 -1
  37. data/lib/line/bot/v2/webhook/model/source.rb +1 -1
  38. data/lib/line/bot/version.rb +1 -1
  39. data/sig/line/bot/v2/messaging_api/api/messaging_api_client.rbs +68 -0
  40. data/sig/line/bot/v2/messaging_api/model/pnp_messages_request.rbs +3 -0
  41. data/sig/line/bot/v2/messaging_api/model/pnp_templated_button.rbs +43 -0
  42. data/sig/line/bot/v2/messaging_api/model/pnp_templated_emphasized_item.rbs +44 -0
  43. data/sig/line/bot/v2/messaging_api/model/pnp_templated_item.rbs +43 -0
  44. data/sig/line/bot/v2/messaging_api/model/pnp_templated_message_body.rbs +47 -0
  45. data/sig/line/bot/v2/messaging_api/model/pnp_templated_message_request.rbs +49 -0
  46. data/sig/line/bot/v2/webhook/model/message_edited_event.rbs +60 -0
  47. metadata +14 -2
@@ -0,0 +1,92 @@
1
+ # LINE Messaging API
2
+ # This document describes LINE Messaging API.
3
+ #
4
+ # The version of the OpenAPI document: 0.0.1
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 MessagingApi
14
+ # The body object of the template you want to send. You can't specify the same item more than once in a single message.
15
+ # @see https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template
16
+ class PnpTemplatedMessageBody
17
+ # @!attribute [rw] emphasized_item
18
+ # @return [PnpTemplatedEmphasizedItem,nil]
19
+ attr_accessor :emphasized_item
20
+ # @!attribute [rw] items
21
+ # @return [Array[PnpTemplatedItem],nil] Array of items to include in the message. The `itemKey` must be unique across `emphasizedItem` and `items`.
22
+ attr_accessor :items
23
+ # @!attribute [rw] buttons
24
+ # @return [Array[PnpTemplatedButton],nil] Array of buttons to include in the message. The `buttonKey` must be unique.
25
+ attr_accessor :buttons
26
+
27
+ # @param emphasized_item [PnpTemplatedEmphasizedItem, Hash[Symbol, untyped], nil]
28
+ # @param items [Array[PnpTemplatedItem, Hash[Symbol, untyped]],nil] Array of items to include in the message. The `itemKey` must be unique across `emphasizedItem` and `items`.
29
+ # @param buttons [Array[PnpTemplatedButton, Hash[Symbol, untyped]],nil] Array of buttons to include in the message. The `buttonKey` must be unique.
30
+ def initialize(
31
+ emphasized_item: nil,
32
+ items: nil,
33
+ buttons: nil,
34
+ **dynamic_attributes
35
+ )
36
+
37
+ @emphasized_item = emphasized_item.is_a?(Line::Bot::V2::MessagingApi::PnpTemplatedEmphasizedItem) || emphasized_item.nil? ? emphasized_item : Line::Bot::V2::MessagingApi::PnpTemplatedEmphasizedItem.create(**emphasized_item)
38
+ @items = items&.map do |item|
39
+ if item.is_a?(Hash)
40
+ Line::Bot::V2::MessagingApi::PnpTemplatedItem.create(**item)
41
+ else
42
+ item
43
+ end
44
+ end
45
+ @buttons = buttons&.map do |item|
46
+ if item.is_a?(Hash)
47
+ Line::Bot::V2::MessagingApi::PnpTemplatedButton.create(**item)
48
+ else
49
+ item
50
+ end
51
+ end
52
+
53
+ dynamic_attributes.each do |key, value|
54
+ self.class.attr_accessor key
55
+
56
+ if value.is_a?(Hash)
57
+ struct_klass = Struct.new(*value.keys.map(&:to_sym))
58
+ struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
59
+ instance_variable_set("@#{key}", struct_klass.new(*struct_values))
60
+ else
61
+ instance_variable_set("@#{key}", value)
62
+ end
63
+ end
64
+ end
65
+
66
+ # Create an instance of the class from a hash
67
+ # @param args [Hash] Hash containing all the required attributes
68
+ # @return [Line::Bot::V2::MessagingApi::PnpTemplatedMessageBody] Instance of the class
69
+ def self.create(args)
70
+ symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
71
+ return new(**symbolized_args)
72
+ end
73
+
74
+ # @param other [Object] Object to compare
75
+ # @return [Boolean] true if the objects are equal, false otherwise
76
+ def ==(other)
77
+ return false unless self.class == other.class
78
+
79
+ instance_variables.all? do |var|
80
+ instance_variable_get(var) == other.instance_variable_get(var)
81
+ end
82
+ end
83
+
84
+ # @return [Integer] Hash code of the object
85
+ def hash
86
+ [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,85 @@
1
+ # LINE Messaging API
2
+ # This document describes LINE Messaging API.
3
+ #
4
+ # The version of the OpenAPI document: 0.0.1
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 MessagingApi
14
+ # @see https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template
15
+ class PnpTemplatedMessageRequest
16
+ # @!attribute [rw] to
17
+ # @return [String] Message destination. Specify a phone number that has been normalized to E.164 format and hashed with SHA256.
18
+ attr_accessor :to
19
+ # @!attribute [rw] template_key
20
+ # @return [String] Specify the key of the template you want to send. For available keys, see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#templates
21
+ attr_accessor :template_key
22
+ # @!attribute [rw] body
23
+ # @return [PnpTemplatedMessageBody,nil]
24
+ attr_accessor :body
25
+ # @!attribute [rw] custom_aggregation_units
26
+ # @return [Array[String],nil] Name of aggregation unit. Case-sensitive. For more information about assigning a unit name, see https://developers.line.biz/en/docs/messaging-api/unit-based-statistics-aggregation/#assign-names-to-units-when-sending-messages
27
+ attr_accessor :custom_aggregation_units
28
+
29
+ # @param to [String] Message destination. Specify a phone number that has been normalized to E.164 format and hashed with SHA256.
30
+ # @param template_key [String] Specify the key of the template you want to send. For available keys, see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#templates
31
+ # @param body [PnpTemplatedMessageBody, Hash[Symbol, untyped], nil]
32
+ # @param custom_aggregation_units [Array[String],nil] Name of aggregation unit. Case-sensitive. For more information about assigning a unit name, see https://developers.line.biz/en/docs/messaging-api/unit-based-statistics-aggregation/#assign-names-to-units-when-sending-messages
33
+ def initialize(
34
+ to:,
35
+ template_key:,
36
+ body: nil,
37
+ custom_aggregation_units: nil,
38
+ **dynamic_attributes
39
+ )
40
+
41
+ @to = to
42
+ @template_key = template_key
43
+ @body = body.is_a?(Line::Bot::V2::MessagingApi::PnpTemplatedMessageBody) || body.nil? ? body : Line::Bot::V2::MessagingApi::PnpTemplatedMessageBody.create(**body)
44
+ @custom_aggregation_units = custom_aggregation_units
45
+
46
+ dynamic_attributes.each do |key, value|
47
+ self.class.attr_accessor key
48
+
49
+ if value.is_a?(Hash)
50
+ struct_klass = Struct.new(*value.keys.map(&:to_sym))
51
+ struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
52
+ instance_variable_set("@#{key}", struct_klass.new(*struct_values))
53
+ else
54
+ instance_variable_set("@#{key}", value)
55
+ end
56
+ end
57
+ end
58
+
59
+ # Create an instance of the class from a hash
60
+ # @param args [Hash] Hash containing all the required attributes
61
+ # @return [Line::Bot::V2::MessagingApi::PnpTemplatedMessageRequest] Instance of the class
62
+ def self.create(args)
63
+ symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
64
+ return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
65
+ end
66
+
67
+ # @param other [Object] Object to compare
68
+ # @return [Boolean] true if the objects are equal, false otherwise
69
+ def ==(other)
70
+ return false unless self.class == other.class
71
+
72
+ instance_variables.all? do |var|
73
+ instance_variable_get(var) == other.instance_variable_get(var)
74
+ end
75
+ end
76
+
77
+ # @return [Integer] Hash code of the object
78
+ def hash
79
+ [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
@@ -44,7 +44,7 @@ module Line
44
44
  def self.create(args)
45
45
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
46
46
  klass = detect_class(type: symbolized_args[:type])
47
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
47
+ return klass.new(**symbolized_args) if klass
48
48
  return new(**symbolized_args)
49
49
  end
50
50
 
@@ -45,7 +45,7 @@ module Line
45
45
  def self.create(args)
46
46
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
47
47
  klass = detect_class(type: symbolized_args[:type])
48
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
48
+ return klass.new(**symbolized_args) if klass
49
49
  return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
50
50
  end
51
51
 
@@ -44,7 +44,7 @@ module Line
44
44
  def self.create(args)
45
45
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
46
46
  klass = detect_class(type: symbolized_args[:type])
47
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
47
+ return klass.new(**symbolized_args) if klass
48
48
  return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
49
49
  end
50
50
 
@@ -43,7 +43,7 @@ module Line
43
43
  def self.create(args)
44
44
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
45
45
  klass = detect_class(type: symbolized_args[:type])
46
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
46
+ return klass.new(**symbolized_args) if klass
47
47
  return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
48
48
  end
49
49
 
@@ -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'
@@ -74,7 +74,7 @@ module Line
74
74
  def self.create(args)
75
75
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
76
76
  klass = detect_class(type: symbolized_args[:type])
77
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
77
+ return klass.new(**symbolized_args) if klass
78
78
  return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
79
79
  end
80
80
 
@@ -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,
@@ -45,7 +45,7 @@ module Line
45
45
  def self.create(args)
46
46
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
47
47
  klass = detect_class(type: symbolized_args[:type])
48
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
48
+ return klass.new(**symbolized_args) if klass
49
49
  return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
50
50
  end
51
51
 
@@ -56,7 +56,7 @@ module Line
56
56
  def self.create(args)
57
57
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
58
58
  klass = detect_class(type: symbolized_args[:type])
59
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
59
+ return klass.new(**symbolized_args) if klass
60
60
  return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
61
61
  end
62
62
 
@@ -50,7 +50,7 @@ module Line
50
50
  def self.create(args)
51
51
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
52
52
  klass = detect_class(type: symbolized_args[:type])
53
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
53
+ return klass.new(**symbolized_args) if klass
54
54
  return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
55
55
  end
56
56
 
@@ -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
@@ -44,7 +44,7 @@ module Line
44
44
  def self.create(args)
45
45
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
46
46
  klass = detect_class(type: symbolized_args[:type])
47
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
47
+ return klass.new(**symbolized_args) if klass
48
48
  return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
49
49
  end
50
50
 
@@ -45,7 +45,7 @@ module Line
45
45
  def self.create(args)
46
46
  symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
47
47
  klass = detect_class(type: symbolized_args[:type])
48
- return klass.new(**symbolized_args) if klass # steep:ignore UnannotatedEmptyCollection
48
+ return klass.new(**symbolized_args) if klass
49
49
  return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
50
50
  end
51
51
 
@@ -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.11.0"
6
6
  end
7
7
  end
@@ -974,6 +974,36 @@ module Line
974
974
  | String? # otherwise
975
975
  )
976
976
 
977
+ # Get number of sent LINE notification messages (template)
978
+ # This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp/templated</code>
979
+ # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
980
+ #
981
+ # @param date [String] Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
982
+ # @see https://developers.line.biz/en/reference/line-notification-messages/#get-number-of-sent-line-notification-messages-template
983
+ # @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})] when HTTP status code is 200
984
+ # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
985
+ def get_pnp_templated_message_statistics_with_http_info: (
986
+ date: String
987
+ ) -> (
988
+ [NumberOfMessagesResponse, 200, Hash[untyped, untyped]] # when HTTP status code is 200
989
+ | [String?, Integer, Hash[untyped, untyped]] # otherwise
990
+ )
991
+
992
+ # Get number of sent LINE notification messages (template)
993
+ # This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp/templated</code>
994
+ # When you want to get HTTP status code or response headers, use {#get_pnp_templated_message_statistics_with_http_info} instead of this.
995
+ #
996
+ # @param date [String] Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
997
+ # @see https://developers.line.biz/en/reference/line-notification-messages/#get-number-of-sent-line-notification-messages-template
998
+ # @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200
999
+ # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
1000
+ def get_pnp_templated_message_statistics: (
1001
+ date: String
1002
+ ) -> (
1003
+ NumberOfMessagesResponse # when HTTP status code is 200
1004
+ | String? # otherwise
1005
+ )
1006
+
977
1007
  # Get profile
978
1008
  # This requests to <code>GET https://api.line.me/v2/bot/profile/{userId}</code>
979
1009
  # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@@ -1756,6 +1786,44 @@ module Line
1756
1786
  | String? # otherwise
1757
1787
  )
1758
1788
 
1789
+ # Send LINE notification message (template)
1790
+ # This requests to <code>POST https://api.line.me/v2/bot/message/pnp/templated/push</code>
1791
+ # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
1792
+ #
1793
+ # @param pnp_templated_message_request [PnpTemplatedMessageRequest]
1794
+ # @param x_line_delivery_tag [String, nil] String returned in the delivery.data property of the delivery completion event via Webhook.
1795
+ # @see https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template
1796
+ # @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 202
1797
+ # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 422
1798
+ # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
1799
+ def push_templated_messages_by_phone_with_http_info: (
1800
+ pnp_templated_message_request: PnpTemplatedMessageRequest,
1801
+ ?x_line_delivery_tag: String?
1802
+ ) -> (
1803
+ [String?, 202, Hash[untyped, untyped]] # when HTTP status code is 202
1804
+ | [ErrorResponse, 422, Hash[untyped, untyped]] # when HTTP status code is 422
1805
+ | [String?, Integer, Hash[untyped, untyped]] # otherwise
1806
+ )
1807
+
1808
+ # Send LINE notification message (template)
1809
+ # This requests to <code>POST https://api.line.me/v2/bot/message/pnp/templated/push</code>
1810
+ # When you want to get HTTP status code or response headers, use {#push_templated_messages_by_phone_with_http_info} instead of this.
1811
+ #
1812
+ # @param pnp_templated_message_request [PnpTemplatedMessageRequest]
1813
+ # @param x_line_delivery_tag [String, nil] String returned in the delivery.data property of the delivery completion event via Webhook.
1814
+ # @see https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template
1815
+ # @return [String, nil] when HTTP status code is 202
1816
+ # @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 422
1817
+ # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
1818
+ def push_templated_messages_by_phone: (
1819
+ pnp_templated_message_request: PnpTemplatedMessageRequest,
1820
+ ?x_line_delivery_tag: String?
1821
+ ) -> (
1822
+ String? # when HTTP status code is 202
1823
+ | ErrorResponse # when HTTP status code is 422
1824
+ | String? # otherwise
1825
+ )
1826
+
1759
1827
  # Send reply message
1760
1828
  # This requests to <code>POST https://api.line.me/v2/bot/message/reply</code>
1761
1829
  # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@@ -16,15 +16,18 @@ module Line
16
16
  attr_accessor messages: Array[Message]
17
17
  attr_accessor to: String
18
18
  attr_accessor notification_disabled: bool?
19
+ attr_accessor custom_aggregation_units: Array[String]?
19
20
 
20
21
 
21
22
  # @param messages [Array[Message, Hash[Symbol, untyped]]] Message to be sent.
22
23
  # @param to [String] Message destination. Specify a phone number that has been normalized to E.164 format and hashed with SHA256.
23
24
  # @param notification_disabled [bool,nil] `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false.
25
+ # @param custom_aggregation_units [Array[String],nil] Name of aggregation unit. Case-sensitive.
24
26
  def initialize: (
25
27
  messages: Array[Message| Hash[Symbol, untyped]],
26
28
  to: String,
27
29
  ?notification_disabled: bool?,
30
+ ?custom_aggregation_units: Array[String]?,
28
31
  **untyped dynamic_attributes
29
32
  ) -> void
30
33
 
@@ -0,0 +1,43 @@
1
+ # LINE Messaging API
2
+ # This document describes LINE Messaging API.
3
+ #
4
+ # The version of the OpenAPI document: 0.0.1
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 MessagingApi
14
+ # @see https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template-buttons
15
+ class PnpTemplatedButton
16
+ attr_accessor button_key: String
17
+ attr_accessor url: String
18
+
19
+
20
+ # @param button_key [String] Specify the key of the button you want to include. For available keys, see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#buttons
21
+ # @param url [String] URL of the page to be opened when the user presses the button.
22
+ def initialize: (
23
+ button_key: String,
24
+ url: String,
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::MessagingApi::PnpTemplatedButton] Instance of the class
31
+ def self.create: (Hash[Symbol, untyped]) -> PnpTemplatedButton
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
@@ -0,0 +1,44 @@
1
+ # LINE Messaging API
2
+ # This document describes LINE Messaging API.
3
+ #
4
+ # The version of the OpenAPI document: 0.0.1
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 MessagingApi
14
+ # Item to emphasize in the message.
15
+ # @see https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template-items
16
+ class PnpTemplatedEmphasizedItem
17
+ attr_accessor item_key: String
18
+ attr_accessor content: String
19
+
20
+
21
+ # @param item_key [String] Specify the key of the item you want to include. For available keys, see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#items
22
+ # @param content [String] String to be displayed as the value of the item.
23
+ def initialize: (
24
+ item_key: String,
25
+ content: String,
26
+ **untyped dynamic_attributes
27
+ ) -> void
28
+
29
+ # Create an instance of the class from a hash
30
+ # @param args [Hash] Hash containing all the required attributes
31
+ # @return [Line::Bot::V2::MessagingApi::PnpTemplatedEmphasizedItem] Instance of the class
32
+ def self.create: (Hash[Symbol, untyped]) -> PnpTemplatedEmphasizedItem
33
+
34
+ # @param other [Object] Object to compare
35
+ # @return [Boolean] true if the objects are equal, false otherwise
36
+ def ==: (untyped other) -> bool
37
+
38
+ # @return [Integer] Hash code of the object
39
+ def hash: () -> Integer
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,43 @@
1
+ # LINE Messaging API
2
+ # This document describes LINE Messaging API.
3
+ #
4
+ # The version of the OpenAPI document: 0.0.1
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 MessagingApi
14
+ # @see https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template-items
15
+ class PnpTemplatedItem
16
+ attr_accessor item_key: String
17
+ attr_accessor content: String
18
+
19
+
20
+ # @param item_key [String] Specify the key of the item you want to include. For available keys, see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#items
21
+ # @param content [String] String to be displayed as the value of the item.
22
+ def initialize: (
23
+ item_key: String,
24
+ content: String,
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::MessagingApi::PnpTemplatedItem] Instance of the class
31
+ def self.create: (Hash[Symbol, untyped]) -> PnpTemplatedItem
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