line-bot-api 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +49 -1
- data/README.md +37 -17
- data/lib/line/bot/v2/messaging_api/api/messaging_api_client.rb +269 -0
- data/lib/line/bot/v2/messaging_api/core.rb +39 -0
- data/lib/line/bot/v2/messaging_api/model/acquisition_condition_request.rb +77 -0
- data/lib/line/bot/v2/messaging_api/model/acquisition_condition_response.rb +78 -0
- data/lib/line/bot/v2/{webhook/model/link_things_content.rb → messaging_api/model/cash_back_fixed_price_info_request.rb} +15 -15
- data/lib/line/bot/v2/{webhook/model/scenario_result_things_content.rb → messaging_api/model/cash_back_fixed_price_info_response.rb} +21 -21
- data/lib/line/bot/v2/messaging_api/model/cash_back_percentage_price_info_request.rb +72 -0
- data/lib/line/bot/v2/{webhook/model/unlink_things_content.rb → messaging_api/model/cash_back_percentage_price_info_response.rb} +15 -15
- data/lib/line/bot/v2/{webhook/model/things_content.rb → messaging_api/model/cash_back_price_info_request.rb} +10 -11
- data/lib/line/bot/v2/messaging_api/model/cash_back_price_info_response.rb +77 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_cash_back_reward_request.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_cash_back_reward_response.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_create_request.rb +139 -0
- data/lib/line/bot/v2/{webhook/model/action_result.rb → messaging_api/model/coupon_create_response.rb} +13 -18
- data/lib/line/bot/v2/messaging_api/model/coupon_discount_reward_request.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_discount_reward_response.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_free_reward_request.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_free_reward_response.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_gift_reward_request.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_gift_reward_response.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_list_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_message.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_others_reward_request.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_others_reward_response.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_response.rb +169 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_reward_request.rb +80 -0
- data/lib/line/bot/v2/messaging_api/model/coupon_reward_response.rb +80 -0
- data/lib/line/bot/v2/messaging_api/model/discount_explicit_price_info_request.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/discount_explicit_price_info_response.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/discount_fixed_price_info_request.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/discount_fixed_price_info_response.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/discount_percentage_price_info_request.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/discount_percentage_price_info_response.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/discount_price_info_request.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/discount_price_info_response.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/lottery_acquisition_condition_request.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/lottery_acquisition_condition_response.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/message.rb +1 -0
- data/lib/line/bot/v2/messaging_api/model/messaging_api_pager_coupon_list_response.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/normal_acquisition_condition_request.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/normal_acquisition_condition_response.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/referral_acquisition_condition_response.rb +66 -0
- data/lib/line/bot/v2/webhook/core.rb +0 -7
- data/lib/line/bot/v2/webhook/model/event.rb +0 -1
- data/lib/line/bot/version.rb +1 -1
- data/line-bot-api.gemspec +1 -1
- data/sig/line/bot/v2/messaging_api/api/messaging_api_client.rbs +156 -0
- data/sig/line/bot/v2/messaging_api/model/acquisition_condition_request.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/acquisition_condition_response.rbs +43 -0
- data/sig/line/bot/v2/{webhook/model/action_result.rbs → messaging_api/model/cash_back_fixed_price_info_request.rbs} +11 -13
- data/sig/line/bot/v2/messaging_api/model/cash_back_fixed_price_info_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/cash_back_percentage_price_info_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/cash_back_percentage_price_info_response.rbs +40 -0
- data/sig/line/bot/v2/{webhook/model/things_content.rbs → messaging_api/model/cash_back_price_info_request.rbs} +8 -8
- data/sig/line/bot/v2/messaging_api/model/cash_back_price_info_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_cash_back_reward_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_cash_back_reward_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_create_request.rbs +76 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_create_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_discount_reward_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_discount_reward_response.rbs +40 -0
- data/sig/line/bot/v2/{webhook/model/link_things_content.rbs → messaging_api/model/coupon_free_reward_request.rbs} +7 -10
- data/sig/line/bot/v2/{webhook/model/unlink_things_content.rbs → messaging_api/model/coupon_free_reward_response.rbs} +7 -10
- data/sig/line/bot/v2/messaging_api/model/coupon_gift_reward_request.rbs +37 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_gift_reward_response.rbs +37 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_list_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_message.rbs +50 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_others_reward_request.rbs +37 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_others_reward_response.rbs +37 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_response.rbs +91 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_reward_request.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_reward_response.rbs +43 -0
- data/sig/line/bot/v2/{webhook/model/scenario_result_things_content.rbs → messaging_api/model/discount_explicit_price_info_request.rbs} +13 -13
- data/sig/line/bot/v2/messaging_api/model/discount_explicit_price_info_response.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/discount_fixed_price_info_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/discount_fixed_price_info_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/discount_percentage_price_info_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/discount_percentage_price_info_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/discount_price_info_request.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/discount_price_info_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/lottery_acquisition_condition_request.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/lottery_acquisition_condition_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/messaging_api_pager_coupon_list_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/normal_acquisition_condition_request.rbs +37 -0
- data/sig/line/bot/v2/messaging_api/model/normal_acquisition_condition_response.rbs +37 -0
- data/sig/line/bot/v2/messaging_api/model/referral_acquisition_condition_response.rbs +37 -0
- metadata +81 -17
- data/lib/line/bot/v2/webhook/model/scenario_result.rb +0 -115
- data/lib/line/bot/v2/webhook/model/things_event.rb +0 -109
- data/sig/line/bot/v2/webhook/model/scenario_result.rbs +0 -61
- data/sig/line/bot/v2/webhook/model/things_event.rbs +0 -59
@@ -1,109 +0,0 @@
|
|
1
|
-
# Webhook Type Definition
|
2
|
-
# Webhook event definition of the LINE Messaging API
|
3
|
-
#
|
4
|
-
# The version of the OpenAPI document: 1.0.0
|
5
|
-
#
|
6
|
-
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
7
|
-
# https://openapi-generator.tech
|
8
|
-
# Do not edit the class manually.
|
9
|
-
|
10
|
-
require_relative './event'
|
11
|
-
|
12
|
-
module Line
|
13
|
-
module Bot
|
14
|
-
module V2
|
15
|
-
module Webhook
|
16
|
-
# Indicates that a user linked a device with LINE.
|
17
|
-
class ThingsEvent < Event
|
18
|
-
# @!attribute [r] type
|
19
|
-
# @return [String] Type of the event
|
20
|
-
attr_reader :type
|
21
|
-
# @!attribute [rw] source
|
22
|
-
# @return [Source,nil]
|
23
|
-
attr_accessor :source
|
24
|
-
# @!attribute [rw] timestamp
|
25
|
-
# @return [Integer] Time of the event in milliseconds.
|
26
|
-
attr_accessor :timestamp
|
27
|
-
# @!attribute [rw] mode
|
28
|
-
# @return [String] ('active'|'standby')
|
29
|
-
attr_accessor :mode
|
30
|
-
# @!attribute [rw] webhook_event_id
|
31
|
-
# @return [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
|
32
|
-
attr_accessor :webhook_event_id
|
33
|
-
# @!attribute [rw] delivery_context
|
34
|
-
# @return [DeliveryContext]
|
35
|
-
attr_accessor :delivery_context
|
36
|
-
# @!attribute [rw] reply_token
|
37
|
-
# @return [String] Reply token used to send reply message to this event
|
38
|
-
attr_accessor :reply_token
|
39
|
-
# @!attribute [rw] things
|
40
|
-
# @return [ThingsContent]
|
41
|
-
attr_accessor :things
|
42
|
-
|
43
|
-
# @param source [Source, Hash[Symbol, untyped], nil]
|
44
|
-
# @param timestamp [Integer] Time of the event in milliseconds.
|
45
|
-
# @param mode [String] ('active'|'standby')
|
46
|
-
# @param webhook_event_id [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
|
47
|
-
# @param delivery_context [DeliveryContext, Hash[Symbol, untyped]]
|
48
|
-
# @param reply_token [String] Reply token used to send reply message to this event
|
49
|
-
# @param things [ThingsContent, Hash[Symbol, untyped]]
|
50
|
-
def initialize(
|
51
|
-
source: nil,
|
52
|
-
timestamp:,
|
53
|
-
mode:,
|
54
|
-
webhook_event_id:,
|
55
|
-
delivery_context:,
|
56
|
-
reply_token:,
|
57
|
-
things:,
|
58
|
-
**dynamic_attributes
|
59
|
-
)
|
60
|
-
@type = "things"
|
61
|
-
|
62
|
-
@source = source.is_a?(Line::Bot::V2::Webhook::Source) || source.nil? ? source : Line::Bot::V2::Webhook::Source.create(**source) # steep:ignore
|
63
|
-
@timestamp = timestamp
|
64
|
-
@mode = mode
|
65
|
-
@webhook_event_id = webhook_event_id
|
66
|
-
@delivery_context = delivery_context.is_a?(Line::Bot::V2::Webhook::DeliveryContext) ? delivery_context : Line::Bot::V2::Webhook::DeliveryContext.create(**delivery_context) # steep:ignore
|
67
|
-
@reply_token = reply_token
|
68
|
-
@things = things.is_a?(Line::Bot::V2::Webhook::ThingsContent) ? things : Line::Bot::V2::Webhook::ThingsContent.create(**things) # steep:ignore
|
69
|
-
|
70
|
-
dynamic_attributes.each do |key, value|
|
71
|
-
self.class.attr_accessor key
|
72
|
-
|
73
|
-
if value.is_a?(Hash)
|
74
|
-
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
75
|
-
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
76
|
-
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
77
|
-
else
|
78
|
-
instance_variable_set("@#{key}", value)
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
# Create an instance of the class from a hash
|
84
|
-
# @param args [Hash] Hash containing all the required attributes
|
85
|
-
# @return [Line::Bot::V2::Webhook::ThingsEvent] Instance of the class
|
86
|
-
def self.create(args) # steep:ignore
|
87
|
-
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
88
|
-
return new(**symbolized_args) # steep:ignore
|
89
|
-
end
|
90
|
-
|
91
|
-
# @param other [Object] Object to compare
|
92
|
-
# @return [Boolean] true if the objects are equal, false otherwise
|
93
|
-
def ==(other)
|
94
|
-
return false unless self.class == other.class
|
95
|
-
|
96
|
-
instance_variables.all? do |var|
|
97
|
-
instance_variable_get(var) == other.instance_variable_get(var)
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
# @return [Integer] Hash code of the object
|
102
|
-
def hash
|
103
|
-
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
# Webhook Type Definition
|
2
|
-
# Webhook event definition of the LINE Messaging API
|
3
|
-
#
|
4
|
-
# The version of the OpenAPI document: 1.0.0
|
5
|
-
#
|
6
|
-
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
7
|
-
# https://openapi-generator.tech
|
8
|
-
# Do not edit the class manually.
|
9
|
-
|
10
|
-
module Line
|
11
|
-
module Bot
|
12
|
-
module V2
|
13
|
-
module Webhook
|
14
|
-
# @see https://developers.line.biz/en/reference/messaging-api/#scenario-result-event
|
15
|
-
class ScenarioResult
|
16
|
-
attr_accessor scenario_id: String?
|
17
|
-
attr_accessor revision: Integer?
|
18
|
-
attr_accessor start_time: Integer
|
19
|
-
attr_accessor end_time: Integer
|
20
|
-
attr_accessor result_code: String
|
21
|
-
attr_accessor action_results: Array[ActionResult]?
|
22
|
-
attr_accessor ble_notification_payload: String?
|
23
|
-
attr_accessor error_reason: String?
|
24
|
-
|
25
|
-
|
26
|
-
# @param scenario_id [String,nil] Scenario ID executed
|
27
|
-
# @param revision [Integer,nil] Revision number of the scenario set containing the executed scenario
|
28
|
-
# @param start_time [Integer] Timestamp for when execution of scenario action started (milliseconds, LINE app time)
|
29
|
-
# @param end_time [Integer] Timestamp for when execution of scenario was completed (milliseconds, LINE app time)
|
30
|
-
# @param result_code [String] Scenario execution completion status
|
31
|
-
# @param action_results [Array[ActionResult, Hash[Symbol, untyped]],nil] Execution result of individual operations specified in action. Only included when things.result.resultCode is success.
|
32
|
-
# @param ble_notification_payload [String,nil] Data contained in notification.
|
33
|
-
# @param error_reason [String,nil] Error reason.
|
34
|
-
def initialize: (
|
35
|
-
?scenario_id: String?,
|
36
|
-
?revision: Integer?,
|
37
|
-
start_time: Integer,
|
38
|
-
end_time: Integer,
|
39
|
-
result_code: String,
|
40
|
-
?action_results: Array[ActionResult| Hash[Symbol, untyped]]?,
|
41
|
-
?ble_notification_payload: String?,
|
42
|
-
?error_reason: String?,
|
43
|
-
**untyped dynamic_attributes
|
44
|
-
) -> void
|
45
|
-
|
46
|
-
# Create an instance of the class from a hash
|
47
|
-
# @param args [Hash] Hash containing all the required attributes
|
48
|
-
# @return [Line::Bot::V2::Webhook::ScenarioResult] Instance of the class
|
49
|
-
def self.create: (Hash[Symbol, untyped]) -> ScenarioResult
|
50
|
-
|
51
|
-
# @param other [Object] Object to compare
|
52
|
-
# @return [Boolean] true if the objects are equal, false otherwise
|
53
|
-
def ==: (untyped other) -> bool
|
54
|
-
|
55
|
-
# @return [Integer] Hash code of the object
|
56
|
-
def hash: () -> Integer
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
@@ -1,59 +0,0 @@
|
|
1
|
-
# Webhook Type Definition
|
2
|
-
# Webhook event definition of the LINE Messaging API
|
3
|
-
#
|
4
|
-
# The version of the OpenAPI document: 1.0.0
|
5
|
-
#
|
6
|
-
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
7
|
-
# https://openapi-generator.tech
|
8
|
-
# Do not edit the class manually.
|
9
|
-
|
10
|
-
module Line
|
11
|
-
module Bot
|
12
|
-
module V2
|
13
|
-
module Webhook
|
14
|
-
# Indicates that a user linked a device with LINE.
|
15
|
-
class ThingsEvent < Event
|
16
|
-
attr_reader type: String
|
17
|
-
attr_accessor source: Source?
|
18
|
-
attr_accessor timestamp: Integer
|
19
|
-
attr_accessor mode: 'active'|'standby'
|
20
|
-
attr_accessor webhook_event_id: String
|
21
|
-
attr_accessor delivery_context: DeliveryContext
|
22
|
-
attr_accessor reply_token: String
|
23
|
-
attr_accessor things: ThingsContent
|
24
|
-
|
25
|
-
|
26
|
-
# @param source [Source, Hash[Symbol, untyped], nil]
|
27
|
-
# @param timestamp [Integer] Time of the event in milliseconds.
|
28
|
-
# @param mode [String] ('active'|'standby')
|
29
|
-
# @param webhook_event_id [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
|
30
|
-
# @param delivery_context [DeliveryContext, Hash[Symbol, untyped]]
|
31
|
-
# @param reply_token [String] Reply token used to send reply message to this event
|
32
|
-
# @param things [ThingsContent, Hash[Symbol, untyped]]
|
33
|
-
def initialize: (
|
34
|
-
?source: Source?| Hash[Symbol, untyped]?,
|
35
|
-
timestamp: Integer,
|
36
|
-
mode: 'active'|'standby',
|
37
|
-
webhook_event_id: String,
|
38
|
-
delivery_context: DeliveryContext| Hash[Symbol, untyped],
|
39
|
-
reply_token: String,
|
40
|
-
things: ThingsContent| Hash[Symbol, untyped],
|
41
|
-
**untyped dynamic_attributes
|
42
|
-
) -> void
|
43
|
-
|
44
|
-
# Create an instance of the class from a hash
|
45
|
-
# @param args [Hash] Hash containing all the required attributes
|
46
|
-
# @return [Line::Bot::V2::Webhook::ThingsEvent] Instance of the class
|
47
|
-
def self.create: (Hash[Symbol, untyped]) -> ThingsEvent
|
48
|
-
|
49
|
-
# @param other [Object] Object to compare
|
50
|
-
# @return [Boolean] true if the objects are equal, false otherwise
|
51
|
-
def ==: (untyped other) -> bool
|
52
|
-
|
53
|
-
# @return [Integer] Hash code of the object
|
54
|
-
def hash: () -> Integer
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|