line-bot-api 2.10.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.
- checksums.yaml +4 -4
- data/lib/line/bot/v2/messaging_api/api/messaging_api_client.rb +114 -0
- data/lib/line/bot/v2/messaging_api/core.rb +5 -0
- data/lib/line/bot/v2/messaging_api/model/acquisition_condition_request.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/acquisition_condition_response.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/action.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/cash_back_price_info_request.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/cash_back_price_info_response.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/coupon_reward_request.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/coupon_reward_response.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/demographic_filter.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/discount_price_info_request.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/discount_price_info_response.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/flex_box_background.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/flex_component.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/flex_container.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/imagemap_action.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/mention_target.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/message.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/pnp_messages_request.rb +6 -0
- data/lib/line/bot/v2/messaging_api/model/pnp_templated_button.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/pnp_templated_emphasized_item.rb +74 -0
- data/lib/line/bot/v2/messaging_api/model/pnp_templated_item.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/pnp_templated_message_body.rb +92 -0
- data/lib/line/bot/v2/messaging_api/model/pnp_templated_message_request.rb +85 -0
- data/lib/line/bot/v2/messaging_api/model/recipient.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/rich_menu_batch_operation.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/substitution_object.rb +1 -1
- data/lib/line/bot/v2/messaging_api/model/template.rb +1 -1
- data/lib/line/bot/v2/webhook/model/event.rb +1 -1
- data/lib/line/bot/v2/webhook/model/membership_content.rb +1 -1
- data/lib/line/bot/v2/webhook/model/mentionee.rb +1 -1
- data/lib/line/bot/v2/webhook/model/message_content.rb +1 -1
- data/lib/line/bot/v2/webhook/model/module_content.rb +1 -1
- data/lib/line/bot/v2/webhook/model/source.rb +1 -1
- data/lib/line/bot/version.rb +1 -1
- data/sig/line/bot/v2/messaging_api/api/messaging_api_client.rbs +68 -0
- data/sig/line/bot/v2/messaging_api/model/pnp_messages_request.rbs +3 -0
- data/sig/line/bot/v2/messaging_api/model/pnp_templated_button.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/pnp_templated_emphasized_item.rbs +44 -0
- data/sig/line/bot/v2/messaging_api/model/pnp_templated_item.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/pnp_templated_message_body.rbs +47 -0
- data/sig/line/bot/v2/messaging_api/model/pnp_templated_message_request.rbs +49 -0
- metadata +12 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 58f75c16c5deffac0948b216f6af802e1a736edc0017471b9947920d9d01a576
|
|
4
|
+
data.tar.gz: 032dab1369ac0b46233cdcae89f35fa1689eba5211269ae8768315213e090d04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fd22b6a86335ff63881ff0f0b45b619e1471627dc60060cd1f18c6d2d5d298efc06fca5173d8e8e73a1d52ccc44d52e36d38fdd9c74eb817ebc3e98c388a9808
|
|
7
|
+
data.tar.gz: 73c1d19420d5737d6b8d35e3a99e546fe39d25a2a9c62bdf8a989cf230f4ef5a38bf0966f237fde4c7bc5dd1b195597619e10a8e04477371d31f135976778ccc
|
|
@@ -1632,6 +1632,58 @@ module Line
|
|
|
1632
1632
|
response_body
|
|
1633
1633
|
end
|
|
1634
1634
|
|
|
1635
|
+
# Get number of sent LINE notification messages (template)
|
|
1636
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp/templated</code>
|
|
1637
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
|
1638
|
+
#
|
|
1639
|
+
# @param date [String] Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
|
|
1640
|
+
# @see https://developers.line.biz/en/reference/line-notification-messages/#get-number-of-sent-line-notification-messages-template
|
|
1641
|
+
# @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
|
1642
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
|
1643
|
+
def get_pnp_templated_message_statistics_with_http_info(
|
|
1644
|
+
date:
|
|
1645
|
+
)
|
|
1646
|
+
path = "/v2/bot/message/delivery/pnp/templated"
|
|
1647
|
+
query_params = {
|
|
1648
|
+
"date": date
|
|
1649
|
+
}.compact
|
|
1650
|
+
|
|
1651
|
+
response = @http_client.get(
|
|
1652
|
+
path: path,
|
|
1653
|
+
query_params: query_params,
|
|
1654
|
+
)
|
|
1655
|
+
|
|
1656
|
+
case response.code.to_i
|
|
1657
|
+
when 200
|
|
1658
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
|
1659
|
+
json.transform_keys! do |key|
|
|
1660
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
|
1661
|
+
end
|
|
1662
|
+
response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
|
|
1663
|
+
[response_body, 200, response.each_header.to_h]
|
|
1664
|
+
else
|
|
1665
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
|
1666
|
+
end
|
|
1667
|
+
end
|
|
1668
|
+
|
|
1669
|
+
# Get number of sent LINE notification messages (template)
|
|
1670
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp/templated</code>
|
|
1671
|
+
# When you want to get HTTP status code or response headers, use {#get_pnp_templated_message_statistics_with_http_info} instead of this.
|
|
1672
|
+
#
|
|
1673
|
+
# @param date [String] Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
|
|
1674
|
+
# @see https://developers.line.biz/en/reference/line-notification-messages/#get-number-of-sent-line-notification-messages-template
|
|
1675
|
+
# @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200
|
|
1676
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
|
1677
|
+
def get_pnp_templated_message_statistics(
|
|
1678
|
+
date:
|
|
1679
|
+
)
|
|
1680
|
+
response_body, _status_code, _headers = get_pnp_templated_message_statistics_with_http_info(
|
|
1681
|
+
date: date
|
|
1682
|
+
)
|
|
1683
|
+
|
|
1684
|
+
response_body
|
|
1685
|
+
end
|
|
1686
|
+
|
|
1635
1687
|
# Get profile
|
|
1636
1688
|
# This requests to <code>GET https://api.line.me/v2/bot/profile/{userId}</code>
|
|
1637
1689
|
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
|
@@ -2935,6 +2987,68 @@ module Line
|
|
|
2935
2987
|
response_body
|
|
2936
2988
|
end
|
|
2937
2989
|
|
|
2990
|
+
# Send LINE notification message (template)
|
|
2991
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/pnp/templated/push</code>
|
|
2992
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
|
2993
|
+
#
|
|
2994
|
+
# @param pnp_templated_message_request [PnpTemplatedMessageRequest]
|
|
2995
|
+
# @param x_line_delivery_tag [String, nil] String returned in the delivery.data property of the delivery completion event via Webhook.
|
|
2996
|
+
# @see https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template
|
|
2997
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 202
|
|
2998
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 422
|
|
2999
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
|
3000
|
+
def push_templated_messages_by_phone_with_http_info(
|
|
3001
|
+
pnp_templated_message_request:,
|
|
3002
|
+
x_line_delivery_tag: nil
|
|
3003
|
+
)
|
|
3004
|
+
path = "/v2/bot/message/pnp/templated/push"
|
|
3005
|
+
header_params = {
|
|
3006
|
+
"X-Line-Delivery-Tag": x_line_delivery_tag
|
|
3007
|
+
}.compact
|
|
3008
|
+
|
|
3009
|
+
response = @http_client.post(
|
|
3010
|
+
path: path,
|
|
3011
|
+
body_params: pnp_templated_message_request,
|
|
3012
|
+
headers: header_params
|
|
3013
|
+
)
|
|
3014
|
+
|
|
3015
|
+
case response.code.to_i
|
|
3016
|
+
when 202
|
|
3017
|
+
[response.body, 202, response.each_header.to_h]
|
|
3018
|
+
when 422
|
|
3019
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
|
3020
|
+
json.transform_keys! do |key|
|
|
3021
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
|
3022
|
+
end
|
|
3023
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
|
|
3024
|
+
[response_body, 422, response.each_header.to_h]
|
|
3025
|
+
else
|
|
3026
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
|
3027
|
+
end
|
|
3028
|
+
end
|
|
3029
|
+
|
|
3030
|
+
# Send LINE notification message (template)
|
|
3031
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/pnp/templated/push</code>
|
|
3032
|
+
# When you want to get HTTP status code or response headers, use {#push_templated_messages_by_phone_with_http_info} instead of this.
|
|
3033
|
+
#
|
|
3034
|
+
# @param pnp_templated_message_request [PnpTemplatedMessageRequest]
|
|
3035
|
+
# @param x_line_delivery_tag [String, nil] String returned in the delivery.data property of the delivery completion event via Webhook.
|
|
3036
|
+
# @see https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template
|
|
3037
|
+
# @return [String, nil] when HTTP status code is 202
|
|
3038
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 422
|
|
3039
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
|
3040
|
+
def push_templated_messages_by_phone(
|
|
3041
|
+
pnp_templated_message_request:,
|
|
3042
|
+
x_line_delivery_tag: nil
|
|
3043
|
+
)
|
|
3044
|
+
response_body, _status_code, _headers = push_templated_messages_by_phone_with_http_info(
|
|
3045
|
+
pnp_templated_message_request: pnp_templated_message_request,
|
|
3046
|
+
x_line_delivery_tag: x_line_delivery_tag
|
|
3047
|
+
)
|
|
3048
|
+
|
|
3049
|
+
response_body
|
|
3050
|
+
end
|
|
3051
|
+
|
|
2938
3052
|
# Send reply message
|
|
2939
3053
|
# This requests to <code>POST https://api.line.me/v2/bot/message/reply</code>
|
|
2940
3054
|
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
|
@@ -148,6 +148,11 @@ require_relative './model/number_of_messages_response'
|
|
|
148
148
|
require_relative './model/operator_demographic_filter'
|
|
149
149
|
require_relative './model/operator_recipient'
|
|
150
150
|
require_relative './model/pnp_messages_request'
|
|
151
|
+
require_relative './model/pnp_templated_button'
|
|
152
|
+
require_relative './model/pnp_templated_emphasized_item'
|
|
153
|
+
require_relative './model/pnp_templated_item'
|
|
154
|
+
require_relative './model/pnp_templated_message_body'
|
|
155
|
+
require_relative './model/pnp_templated_message_request'
|
|
151
156
|
require_relative './model/postback_action'
|
|
152
157
|
require_relative './model/push_message_request'
|
|
153
158
|
require_relative './model/push_message_response'
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ module Line
|
|
|
51
51
|
def self.create(args)
|
|
52
52
|
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
53
53
|
klass = detect_class(type: symbolized_args[:type])
|
|
54
|
-
return klass.new(**symbolized_args) if klass
|
|
54
|
+
return klass.new(**symbolized_args) if klass
|
|
55
55
|
return new(**symbolized_args)
|
|
56
56
|
end
|
|
57
57
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
47
|
+
return klass.new(**symbolized_args) if klass
|
|
48
48
|
return new(**symbolized_args)
|
|
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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
53
|
+
return klass.new(**symbolized_args) if klass
|
|
54
54
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
59
|
+
return klass.new(**symbolized_args) if klass
|
|
60
60
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
61
61
|
end
|
|
62
62
|
|
|
@@ -22,14 +22,19 @@ module Line
|
|
|
22
22
|
# @!attribute [rw] notification_disabled
|
|
23
23
|
# @return [Boolean,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.
|
|
24
24
|
attr_accessor :notification_disabled
|
|
25
|
+
# @!attribute [rw] custom_aggregation_units
|
|
26
|
+
# @return [Array[String],nil] Name of aggregation unit. Case-sensitive.
|
|
27
|
+
attr_accessor :custom_aggregation_units
|
|
25
28
|
|
|
26
29
|
# @param messages [Array[Message, Hash[Symbol, untyped]]] Message to be sent.
|
|
27
30
|
# @param to [String] Message destination. Specify a phone number that has been normalized to E.164 format and hashed with SHA256.
|
|
28
31
|
# @param notification_disabled [Boolean,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.
|
|
32
|
+
# @param custom_aggregation_units [Array[String],nil] Name of aggregation unit. Case-sensitive.
|
|
29
33
|
def initialize(
|
|
30
34
|
messages:,
|
|
31
35
|
to:,
|
|
32
36
|
notification_disabled: false,
|
|
37
|
+
custom_aggregation_units: nil,
|
|
33
38
|
**dynamic_attributes
|
|
34
39
|
)
|
|
35
40
|
|
|
@@ -42,6 +47,7 @@ module Line
|
|
|
42
47
|
end
|
|
43
48
|
@to = to
|
|
44
49
|
@notification_disabled = notification_disabled
|
|
50
|
+
@custom_aggregation_units = custom_aggregation_units
|
|
45
51
|
|
|
46
52
|
dynamic_attributes.each do |key, value|
|
|
47
53
|
self.class.attr_accessor key
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
# @!attribute [rw] button_key
|
|
17
|
+
# @return [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
|
|
18
|
+
attr_accessor :button_key
|
|
19
|
+
# @!attribute [rw] url
|
|
20
|
+
# @return [String] URL of the page to be opened when the user presses the button.
|
|
21
|
+
attr_accessor :url
|
|
22
|
+
|
|
23
|
+
# @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
|
|
24
|
+
# @param url [String] URL of the page to be opened when the user presses the button.
|
|
25
|
+
def initialize(
|
|
26
|
+
button_key:,
|
|
27
|
+
url:,
|
|
28
|
+
**dynamic_attributes
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
@button_key = button_key
|
|
32
|
+
@url = url
|
|
33
|
+
|
|
34
|
+
dynamic_attributes.each do |key, value|
|
|
35
|
+
self.class.attr_accessor key
|
|
36
|
+
|
|
37
|
+
if value.is_a?(Hash)
|
|
38
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
|
39
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
|
40
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
|
41
|
+
else
|
|
42
|
+
instance_variable_set("@#{key}", value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Create an instance of the class from a hash
|
|
48
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
49
|
+
# @return [Line::Bot::V2::MessagingApi::PnpTemplatedButton] Instance of the class
|
|
50
|
+
def self.create(args)
|
|
51
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
52
|
+
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# @param other [Object] Object to compare
|
|
56
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
57
|
+
def ==(other)
|
|
58
|
+
return false unless self.class == other.class
|
|
59
|
+
|
|
60
|
+
instance_variables.all? do |var|
|
|
61
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# @return [Integer] Hash code of the object
|
|
66
|
+
def hash
|
|
67
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
# @!attribute [rw] item_key
|
|
18
|
+
# @return [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
|
|
19
|
+
attr_accessor :item_key
|
|
20
|
+
# @!attribute [rw] content
|
|
21
|
+
# @return [String] String to be displayed as the value of the item.
|
|
22
|
+
attr_accessor :content
|
|
23
|
+
|
|
24
|
+
# @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
|
|
25
|
+
# @param content [String] String to be displayed as the value of the item.
|
|
26
|
+
def initialize(
|
|
27
|
+
item_key:,
|
|
28
|
+
content:,
|
|
29
|
+
**dynamic_attributes
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
@item_key = item_key
|
|
33
|
+
@content = content
|
|
34
|
+
|
|
35
|
+
dynamic_attributes.each do |key, value|
|
|
36
|
+
self.class.attr_accessor key
|
|
37
|
+
|
|
38
|
+
if value.is_a?(Hash)
|
|
39
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
|
40
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
|
41
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
|
42
|
+
else
|
|
43
|
+
instance_variable_set("@#{key}", value)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Create an instance of the class from a hash
|
|
49
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
50
|
+
# @return [Line::Bot::V2::MessagingApi::PnpTemplatedEmphasizedItem] Instance of the class
|
|
51
|
+
def self.create(args)
|
|
52
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
53
|
+
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# @param other [Object] Object to compare
|
|
57
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
58
|
+
def ==(other)
|
|
59
|
+
return false unless self.class == other.class
|
|
60
|
+
|
|
61
|
+
instance_variables.all? do |var|
|
|
62
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# @return [Integer] Hash code of the object
|
|
67
|
+
def hash
|
|
68
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
# @!attribute [rw] item_key
|
|
17
|
+
# @return [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
|
|
18
|
+
attr_accessor :item_key
|
|
19
|
+
# @!attribute [rw] content
|
|
20
|
+
# @return [String] String to be displayed as the value of the item.
|
|
21
|
+
attr_accessor :content
|
|
22
|
+
|
|
23
|
+
# @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
|
|
24
|
+
# @param content [String] String to be displayed as the value of the item.
|
|
25
|
+
def initialize(
|
|
26
|
+
item_key:,
|
|
27
|
+
content:,
|
|
28
|
+
**dynamic_attributes
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
@item_key = item_key
|
|
32
|
+
@content = content
|
|
33
|
+
|
|
34
|
+
dynamic_attributes.each do |key, value|
|
|
35
|
+
self.class.attr_accessor key
|
|
36
|
+
|
|
37
|
+
if value.is_a?(Hash)
|
|
38
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
|
39
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
|
40
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
|
41
|
+
else
|
|
42
|
+
instance_variable_set("@#{key}", value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Create an instance of the class from a hash
|
|
48
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
49
|
+
# @return [Line::Bot::V2::MessagingApi::PnpTemplatedItem] Instance of the class
|
|
50
|
+
def self.create(args)
|
|
51
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
52
|
+
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# @param other [Object] Object to compare
|
|
56
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
57
|
+
def ==(other)
|
|
58
|
+
return false unless self.class == other.class
|
|
59
|
+
|
|
60
|
+
instance_variables.all? do |var|
|
|
61
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# @return [Integer] Hash code of the object
|
|
66
|
+
def hash
|
|
67
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
46
|
+
return klass.new(**symbolized_args) if klass
|
|
47
47
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -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
|
|
77
|
+
return klass.new(**symbolized_args) if klass
|
|
78
78
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
79
79
|
end
|
|
80
80
|
|
|
@@ -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
|
|
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
|
|
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
|
|
53
|
+
return klass.new(**symbolized_args) if klass
|
|
54
54
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -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
|
|
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
|
|
48
|
+
return klass.new(**symbolized_args) if klass
|
|
49
49
|
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
50
50
|
end
|
|
51
51
|
|
data/lib/line/bot/version.rb
CHANGED
|
@@ -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
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
attr_accessor emphasized_item: PnpTemplatedEmphasizedItem?
|
|
18
|
+
attr_accessor items: Array[PnpTemplatedItem]?
|
|
19
|
+
attr_accessor buttons: Array[PnpTemplatedButton]?
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# @param emphasized_item [PnpTemplatedEmphasizedItem, Hash[Symbol, untyped], nil]
|
|
23
|
+
# @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`.
|
|
24
|
+
# @param buttons [Array[PnpTemplatedButton, Hash[Symbol, untyped]],nil] Array of buttons to include in the message. The `buttonKey` must be unique.
|
|
25
|
+
def initialize: (
|
|
26
|
+
?emphasized_item: PnpTemplatedEmphasizedItem?| Hash[Symbol, untyped]?,
|
|
27
|
+
?items: Array[PnpTemplatedItem| Hash[Symbol, untyped]]?,
|
|
28
|
+
?buttons: Array[PnpTemplatedButton| Hash[Symbol, untyped]]?,
|
|
29
|
+
**untyped dynamic_attributes
|
|
30
|
+
) -> void
|
|
31
|
+
|
|
32
|
+
# Create an instance of the class from a hash
|
|
33
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
34
|
+
# @return [Line::Bot::V2::MessagingApi::PnpTemplatedMessageBody] Instance of the class
|
|
35
|
+
def self.create: (Hash[Symbol, untyped]) -> PnpTemplatedMessageBody
|
|
36
|
+
|
|
37
|
+
# @param other [Object] Object to compare
|
|
38
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
39
|
+
def ==: (untyped other) -> bool
|
|
40
|
+
|
|
41
|
+
# @return [Integer] Hash code of the object
|
|
42
|
+
def hash: () -> Integer
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
attr_accessor to: String
|
|
17
|
+
attr_accessor template_key: String
|
|
18
|
+
attr_accessor body: PnpTemplatedMessageBody?
|
|
19
|
+
attr_accessor custom_aggregation_units: Array[String]?
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# @param to [String] Message destination. Specify a phone number that has been normalized to E.164 format and hashed with SHA256.
|
|
23
|
+
# @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
|
|
24
|
+
# @param body [PnpTemplatedMessageBody, Hash[Symbol, untyped], nil]
|
|
25
|
+
# @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
|
|
26
|
+
def initialize: (
|
|
27
|
+
to: String,
|
|
28
|
+
template_key: String,
|
|
29
|
+
?body: PnpTemplatedMessageBody?| Hash[Symbol, untyped]?,
|
|
30
|
+
?custom_aggregation_units: Array[String]?,
|
|
31
|
+
**untyped dynamic_attributes
|
|
32
|
+
) -> void
|
|
33
|
+
|
|
34
|
+
# Create an instance of the class from a hash
|
|
35
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
36
|
+
# @return [Line::Bot::V2::MessagingApi::PnpTemplatedMessageRequest] Instance of the class
|
|
37
|
+
def self.create: (Hash[Symbol, untyped]) -> PnpTemplatedMessageRequest
|
|
38
|
+
|
|
39
|
+
# @param other [Object] Object to compare
|
|
40
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
41
|
+
def ==: (untyped other) -> bool
|
|
42
|
+
|
|
43
|
+
# @return [Integer] Hash code of the object
|
|
44
|
+
def hash: () -> Integer
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
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.
|
|
4
|
+
version: 2.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- LINE Corporation
|
|
@@ -270,6 +270,11 @@ files:
|
|
|
270
270
|
- lib/line/bot/v2/messaging_api/model/operator_demographic_filter.rb
|
|
271
271
|
- lib/line/bot/v2/messaging_api/model/operator_recipient.rb
|
|
272
272
|
- lib/line/bot/v2/messaging_api/model/pnp_messages_request.rb
|
|
273
|
+
- lib/line/bot/v2/messaging_api/model/pnp_templated_button.rb
|
|
274
|
+
- lib/line/bot/v2/messaging_api/model/pnp_templated_emphasized_item.rb
|
|
275
|
+
- lib/line/bot/v2/messaging_api/model/pnp_templated_item.rb
|
|
276
|
+
- lib/line/bot/v2/messaging_api/model/pnp_templated_message_body.rb
|
|
277
|
+
- lib/line/bot/v2/messaging_api/model/pnp_templated_message_request.rb
|
|
273
278
|
- lib/line/bot/v2/messaging_api/model/postback_action.rb
|
|
274
279
|
- lib/line/bot/v2/messaging_api/model/push_message_request.rb
|
|
275
280
|
- lib/line/bot/v2/messaging_api/model/push_message_response.rb
|
|
@@ -626,6 +631,11 @@ files:
|
|
|
626
631
|
- sig/line/bot/v2/messaging_api/model/operator_demographic_filter.rbs
|
|
627
632
|
- sig/line/bot/v2/messaging_api/model/operator_recipient.rbs
|
|
628
633
|
- sig/line/bot/v2/messaging_api/model/pnp_messages_request.rbs
|
|
634
|
+
- sig/line/bot/v2/messaging_api/model/pnp_templated_button.rbs
|
|
635
|
+
- sig/line/bot/v2/messaging_api/model/pnp_templated_emphasized_item.rbs
|
|
636
|
+
- sig/line/bot/v2/messaging_api/model/pnp_templated_item.rbs
|
|
637
|
+
- sig/line/bot/v2/messaging_api/model/pnp_templated_message_body.rbs
|
|
638
|
+
- sig/line/bot/v2/messaging_api/model/pnp_templated_message_request.rbs
|
|
629
639
|
- sig/line/bot/v2/messaging_api/model/postback_action.rbs
|
|
630
640
|
- sig/line/bot/v2/messaging_api/model/push_message_request.rbs
|
|
631
641
|
- sig/line/bot/v2/messaging_api/model/push_message_response.rbs
|
|
@@ -782,7 +792,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
782
792
|
- !ruby/object:Gem::Version
|
|
783
793
|
version: '0'
|
|
784
794
|
requirements: []
|
|
785
|
-
rubygems_version: 4.0.
|
|
795
|
+
rubygems_version: 4.0.20
|
|
786
796
|
specification_version: 4
|
|
787
797
|
summary: SDK of the LINE Messaging API for Ruby
|
|
788
798
|
test_files: []
|