line-bot-api 1.30.0 → 2.1.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/CONTRIBUTING.md +49 -1
- data/README.md +250 -26
- 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/messaging_api/model/cash_back_fixed_price_info_request.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/cash_back_fixed_price_info_response.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/cash_back_percentage_price_info_request.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/cash_back_percentage_price_info_response.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/cash_back_price_info_request.rb +77 -0
- 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/messaging_api/model/coupon_create_response.rb +67 -0
- 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/version.rb +1 -1
- data/lib/line/bot.rb +0 -9
- 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/messaging_api/model/cash_back_fixed_price_info_request.rbs +40 -0
- 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/messaging_api/model/cash_back_price_info_request.rbs +43 -0
- 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/messaging_api/model/coupon_free_reward_request.rbs +37 -0
- data/sig/line/bot/v2/messaging_api/model/coupon_free_reward_response.rbs +37 -0
- 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/messaging_api/model/discount_explicit_price_info_request.rbs +43 -0
- 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 -24
- data/lib/line/bot/v1/api/errors.rb +0 -23
- data/lib/line/bot/v1/api/version.rb +0 -23
- data/lib/line/bot/v1/api.rb +0 -33
- data/lib/line/bot/v1/client.rb +0 -1936
- data/lib/line/bot/v1/event/account_link.rb +0 -38
- data/lib/line/bot/v1/event/base.rb +0 -39
- data/lib/line/bot/v1/event/beacon.rb +0 -43
- data/lib/line/bot/v1/event/follow.rb +0 -30
- data/lib/line/bot/v1/event/join.rb +0 -29
- data/lib/line/bot/v1/event/leave.rb +0 -31
- data/lib/line/bot/v1/event/member_joined.rb +0 -29
- data/lib/line/bot/v1/event/member_left.rb +0 -31
- data/lib/line/bot/v1/event/message.rb +0 -51
- data/lib/line/bot/v1/event/postback.rb +0 -29
- data/lib/line/bot/v1/event/things.rb +0 -49
- data/lib/line/bot/v1/event/unfollow.rb +0 -31
- data/lib/line/bot/v1/event/unsend.rb +0 -31
- data/lib/line/bot/v1/event/video_play_complete.rb +0 -29
- data/lib/line/bot/v1/event.rb +0 -28
- data/lib/line/bot/v1/httpclient.rb +0 -91
- data/lib/line/bot/v1/util.rb +0 -28
@@ -0,0 +1,72 @@
|
|
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
|
+
require_relative './coupon_reward_request'
|
11
|
+
|
12
|
+
module Line
|
13
|
+
module Bot
|
14
|
+
module V2
|
15
|
+
module MessagingApi
|
16
|
+
class CouponDiscountRewardRequest < CouponRewardRequest
|
17
|
+
# @!attribute [r] type
|
18
|
+
# @return [String] Type of coupon. Determines the benefit provided.
|
19
|
+
attr_reader :type
|
20
|
+
# @!attribute [rw] price_info
|
21
|
+
# @return [DiscountPriceInfoRequest,nil]
|
22
|
+
attr_accessor :price_info
|
23
|
+
|
24
|
+
# @param price_info [DiscountPriceInfoRequest, Hash[Symbol, untyped], nil]
|
25
|
+
def initialize(
|
26
|
+
price_info: nil,
|
27
|
+
**dynamic_attributes
|
28
|
+
)
|
29
|
+
@type = "discount"
|
30
|
+
|
31
|
+
@price_info = price_info.is_a?(Line::Bot::V2::MessagingApi::DiscountPriceInfoRequest) || price_info.nil? ? price_info : Line::Bot::V2::MessagingApi::DiscountPriceInfoRequest.create(**price_info) # steep:ignore
|
32
|
+
|
33
|
+
dynamic_attributes.each do |key, value|
|
34
|
+
self.class.attr_accessor key
|
35
|
+
|
36
|
+
if value.is_a?(Hash)
|
37
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
38
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
39
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
40
|
+
else
|
41
|
+
instance_variable_set("@#{key}", value)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Create an instance of the class from a hash
|
47
|
+
# @param args [Hash] Hash containing all the required attributes
|
48
|
+
# @return [Line::Bot::V2::MessagingApi::CouponDiscountRewardRequest] Instance of the class
|
49
|
+
def self.create(args) # steep:ignore
|
50
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
51
|
+
return new(**symbolized_args) # steep:ignore
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param other [Object] Object to compare
|
55
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
56
|
+
def ==(other)
|
57
|
+
return false unless self.class == other.class
|
58
|
+
|
59
|
+
instance_variables.all? do |var|
|
60
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# @return [Integer] Hash code of the object
|
65
|
+
def hash
|
66
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,72 @@
|
|
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
|
+
require_relative './coupon_reward_response'
|
11
|
+
|
12
|
+
module Line
|
13
|
+
module Bot
|
14
|
+
module V2
|
15
|
+
module MessagingApi
|
16
|
+
class CouponDiscountRewardResponse < CouponRewardResponse
|
17
|
+
# @!attribute [r] type
|
18
|
+
# @return [String] Type of coupon. Determines the benefit provided.
|
19
|
+
attr_reader :type
|
20
|
+
# @!attribute [rw] price_info
|
21
|
+
# @return [DiscountPriceInfoResponse,nil]
|
22
|
+
attr_accessor :price_info
|
23
|
+
|
24
|
+
# @param price_info [DiscountPriceInfoResponse, Hash[Symbol, untyped], nil]
|
25
|
+
def initialize(
|
26
|
+
price_info: nil,
|
27
|
+
**dynamic_attributes
|
28
|
+
)
|
29
|
+
@type = "discount"
|
30
|
+
|
31
|
+
@price_info = price_info.is_a?(Line::Bot::V2::MessagingApi::DiscountPriceInfoResponse) || price_info.nil? ? price_info : Line::Bot::V2::MessagingApi::DiscountPriceInfoResponse.create(**price_info) # steep:ignore
|
32
|
+
|
33
|
+
dynamic_attributes.each do |key, value|
|
34
|
+
self.class.attr_accessor key
|
35
|
+
|
36
|
+
if value.is_a?(Hash)
|
37
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
38
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
39
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
40
|
+
else
|
41
|
+
instance_variable_set("@#{key}", value)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Create an instance of the class from a hash
|
47
|
+
# @param args [Hash] Hash containing all the required attributes
|
48
|
+
# @return [Line::Bot::V2::MessagingApi::CouponDiscountRewardResponse] Instance of the class
|
49
|
+
def self.create(args) # steep:ignore
|
50
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
51
|
+
return new(**symbolized_args) # steep:ignore
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param other [Object] Object to compare
|
55
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
56
|
+
def ==(other)
|
57
|
+
return false unless self.class == other.class
|
58
|
+
|
59
|
+
instance_variables.all? do |var|
|
60
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# @return [Integer] Hash code of the object
|
65
|
+
def hash
|
66
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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
|
+
require_relative './coupon_reward_request'
|
11
|
+
|
12
|
+
module Line
|
13
|
+
module Bot
|
14
|
+
module V2
|
15
|
+
module MessagingApi
|
16
|
+
class CouponFreeRewardRequest < CouponRewardRequest
|
17
|
+
# @!attribute [r] type
|
18
|
+
# @return [String] Type of coupon. Determines the benefit provided.
|
19
|
+
attr_reader :type
|
20
|
+
|
21
|
+
def initialize(
|
22
|
+
**dynamic_attributes
|
23
|
+
)
|
24
|
+
@type = "free"
|
25
|
+
|
26
|
+
|
27
|
+
dynamic_attributes.each do |key, value|
|
28
|
+
self.class.attr_accessor key
|
29
|
+
|
30
|
+
if value.is_a?(Hash)
|
31
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
32
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
33
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
34
|
+
else
|
35
|
+
instance_variable_set("@#{key}", value)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Create an instance of the class from a hash
|
41
|
+
# @param args [Hash] Hash containing all the required attributes
|
42
|
+
# @return [Line::Bot::V2::MessagingApi::CouponFreeRewardRequest] Instance of the class
|
43
|
+
def self.create(args) # steep:ignore
|
44
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
45
|
+
return new(**symbolized_args) # steep:ignore
|
46
|
+
end
|
47
|
+
|
48
|
+
# @param other [Object] Object to compare
|
49
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
50
|
+
def ==(other)
|
51
|
+
return false unless self.class == other.class
|
52
|
+
|
53
|
+
instance_variables.all? do |var|
|
54
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# @return [Integer] Hash code of the object
|
59
|
+
def hash
|
60
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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
|
+
require_relative './coupon_reward_response'
|
11
|
+
|
12
|
+
module Line
|
13
|
+
module Bot
|
14
|
+
module V2
|
15
|
+
module MessagingApi
|
16
|
+
class CouponFreeRewardResponse < CouponRewardResponse
|
17
|
+
# @!attribute [r] type
|
18
|
+
# @return [String] Type of coupon. Determines the benefit provided.
|
19
|
+
attr_reader :type
|
20
|
+
|
21
|
+
def initialize(
|
22
|
+
**dynamic_attributes
|
23
|
+
)
|
24
|
+
@type = "free"
|
25
|
+
|
26
|
+
|
27
|
+
dynamic_attributes.each do |key, value|
|
28
|
+
self.class.attr_accessor key
|
29
|
+
|
30
|
+
if value.is_a?(Hash)
|
31
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
32
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
33
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
34
|
+
else
|
35
|
+
instance_variable_set("@#{key}", value)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Create an instance of the class from a hash
|
41
|
+
# @param args [Hash] Hash containing all the required attributes
|
42
|
+
# @return [Line::Bot::V2::MessagingApi::CouponFreeRewardResponse] Instance of the class
|
43
|
+
def self.create(args) # steep:ignore
|
44
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
45
|
+
return new(**symbolized_args) # steep:ignore
|
46
|
+
end
|
47
|
+
|
48
|
+
# @param other [Object] Object to compare
|
49
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
50
|
+
def ==(other)
|
51
|
+
return false unless self.class == other.class
|
52
|
+
|
53
|
+
instance_variables.all? do |var|
|
54
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# @return [Integer] Hash code of the object
|
59
|
+
def hash
|
60
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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
|
+
require_relative './coupon_reward_request'
|
11
|
+
|
12
|
+
module Line
|
13
|
+
module Bot
|
14
|
+
module V2
|
15
|
+
module MessagingApi
|
16
|
+
class CouponGiftRewardRequest < CouponRewardRequest
|
17
|
+
# @!attribute [r] type
|
18
|
+
# @return [String] Type of coupon. Determines the benefit provided.
|
19
|
+
attr_reader :type
|
20
|
+
|
21
|
+
def initialize(
|
22
|
+
**dynamic_attributes
|
23
|
+
)
|
24
|
+
@type = "gift"
|
25
|
+
|
26
|
+
|
27
|
+
dynamic_attributes.each do |key, value|
|
28
|
+
self.class.attr_accessor key
|
29
|
+
|
30
|
+
if value.is_a?(Hash)
|
31
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
32
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
33
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
34
|
+
else
|
35
|
+
instance_variable_set("@#{key}", value)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Create an instance of the class from a hash
|
41
|
+
# @param args [Hash] Hash containing all the required attributes
|
42
|
+
# @return [Line::Bot::V2::MessagingApi::CouponGiftRewardRequest] Instance of the class
|
43
|
+
def self.create(args) # steep:ignore
|
44
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
45
|
+
return new(**symbolized_args) # steep:ignore
|
46
|
+
end
|
47
|
+
|
48
|
+
# @param other [Object] Object to compare
|
49
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
50
|
+
def ==(other)
|
51
|
+
return false unless self.class == other.class
|
52
|
+
|
53
|
+
instance_variables.all? do |var|
|
54
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# @return [Integer] Hash code of the object
|
59
|
+
def hash
|
60
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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
|
+
require_relative './coupon_reward_response'
|
11
|
+
|
12
|
+
module Line
|
13
|
+
module Bot
|
14
|
+
module V2
|
15
|
+
module MessagingApi
|
16
|
+
class CouponGiftRewardResponse < CouponRewardResponse
|
17
|
+
# @!attribute [r] type
|
18
|
+
# @return [String] Type of coupon. Determines the benefit provided.
|
19
|
+
attr_reader :type
|
20
|
+
|
21
|
+
def initialize(
|
22
|
+
**dynamic_attributes
|
23
|
+
)
|
24
|
+
@type = "gift"
|
25
|
+
|
26
|
+
|
27
|
+
dynamic_attributes.each do |key, value|
|
28
|
+
self.class.attr_accessor key
|
29
|
+
|
30
|
+
if value.is_a?(Hash)
|
31
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
32
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
33
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
34
|
+
else
|
35
|
+
instance_variable_set("@#{key}", value)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Create an instance of the class from a hash
|
41
|
+
# @param args [Hash] Hash containing all the required attributes
|
42
|
+
# @return [Line::Bot::V2::MessagingApi::CouponGiftRewardResponse] Instance of the class
|
43
|
+
def self.create(args) # steep:ignore
|
44
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
45
|
+
return new(**symbolized_args) # steep:ignore
|
46
|
+
end
|
47
|
+
|
48
|
+
# @param other [Object] Object to compare
|
49
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
50
|
+
def ==(other)
|
51
|
+
return false unless self.class == other.class
|
52
|
+
|
53
|
+
instance_variables.all? do |var|
|
54
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# @return [Integer] Hash code of the object
|
59
|
+
def hash
|
60
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
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
|
+
# Summary information about a coupon, used in coupon lists.
|
15
|
+
class CouponListResponse
|
16
|
+
# @!attribute [rw] coupon_id
|
17
|
+
# @return [String] Unique identifier of the coupon.
|
18
|
+
attr_accessor :coupon_id
|
19
|
+
# @!attribute [rw] title
|
20
|
+
# @return [String] Title of the coupon. Displayed in the coupon list.
|
21
|
+
attr_accessor :title
|
22
|
+
|
23
|
+
# @param coupon_id [String] Unique identifier of the coupon.
|
24
|
+
# @param title [String] Title of the coupon. Displayed in the coupon list.
|
25
|
+
def initialize(
|
26
|
+
coupon_id:,
|
27
|
+
title:,
|
28
|
+
**dynamic_attributes
|
29
|
+
)
|
30
|
+
|
31
|
+
@coupon_id = coupon_id
|
32
|
+
@title = title
|
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::CouponListResponse] Instance of the class
|
50
|
+
def self.create(args) # steep:ignore
|
51
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
52
|
+
return new(**symbolized_args) # steep:ignore
|
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,91 @@
|
|
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
|
+
require_relative './message'
|
11
|
+
|
12
|
+
module Line
|
13
|
+
module Bot
|
14
|
+
module V2
|
15
|
+
module MessagingApi
|
16
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#coupon-message
|
17
|
+
class CouponMessage < Message
|
18
|
+
# @!attribute [r] type
|
19
|
+
# @return [String] Type of message
|
20
|
+
attr_reader :type
|
21
|
+
# @!attribute [rw] quick_reply
|
22
|
+
# @return [QuickReply,nil]
|
23
|
+
attr_accessor :quick_reply
|
24
|
+
# @!attribute [rw] sender
|
25
|
+
# @return [Sender,nil]
|
26
|
+
attr_accessor :sender
|
27
|
+
# @!attribute [rw] coupon_id
|
28
|
+
# @return [String] Unique identifier of the coupon.
|
29
|
+
attr_accessor :coupon_id
|
30
|
+
# @!attribute [rw] delivery_tag
|
31
|
+
# @return [String,nil] Delivery route tag information. It can be used for analysis in LINE OA Manager.
|
32
|
+
attr_accessor :delivery_tag
|
33
|
+
|
34
|
+
# @param quick_reply [QuickReply, Hash[Symbol, untyped], nil]
|
35
|
+
# @param sender [Sender, Hash[Symbol, untyped], nil]
|
36
|
+
# @param coupon_id [String] Unique identifier of the coupon.
|
37
|
+
# @param delivery_tag [String,nil] Delivery route tag information. It can be used for analysis in LINE OA Manager.
|
38
|
+
def initialize(
|
39
|
+
quick_reply: nil,
|
40
|
+
sender: nil,
|
41
|
+
coupon_id:,
|
42
|
+
delivery_tag: nil,
|
43
|
+
**dynamic_attributes
|
44
|
+
)
|
45
|
+
@type = "coupon"
|
46
|
+
|
47
|
+
@quick_reply = quick_reply.is_a?(Line::Bot::V2::MessagingApi::QuickReply) || quick_reply.nil? ? quick_reply : Line::Bot::V2::MessagingApi::QuickReply.create(**quick_reply) # steep:ignore
|
48
|
+
@sender = sender.is_a?(Line::Bot::V2::MessagingApi::Sender) || sender.nil? ? sender : Line::Bot::V2::MessagingApi::Sender.create(**sender) # steep:ignore
|
49
|
+
@coupon_id = coupon_id
|
50
|
+
@delivery_tag = delivery_tag
|
51
|
+
|
52
|
+
dynamic_attributes.each do |key, value|
|
53
|
+
self.class.attr_accessor key
|
54
|
+
|
55
|
+
if value.is_a?(Hash)
|
56
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
57
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
58
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
59
|
+
else
|
60
|
+
instance_variable_set("@#{key}", value)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Create an instance of the class from a hash
|
66
|
+
# @param args [Hash] Hash containing all the required attributes
|
67
|
+
# @return [Line::Bot::V2::MessagingApi::CouponMessage] Instance of the class
|
68
|
+
def self.create(args) # steep:ignore
|
69
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
70
|
+
return new(**symbolized_args) # steep:ignore
|
71
|
+
end
|
72
|
+
|
73
|
+
# @param other [Object] Object to compare
|
74
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
75
|
+
def ==(other)
|
76
|
+
return false unless self.class == other.class
|
77
|
+
|
78
|
+
instance_variables.all? do |var|
|
79
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# @return [Integer] Hash code of the object
|
84
|
+
def hash
|
85
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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
|
+
require_relative './coupon_reward_request'
|
11
|
+
|
12
|
+
module Line
|
13
|
+
module Bot
|
14
|
+
module V2
|
15
|
+
module MessagingApi
|
16
|
+
class CouponOthersRewardRequest < CouponRewardRequest
|
17
|
+
# @!attribute [r] type
|
18
|
+
# @return [String] Type of coupon. Determines the benefit provided.
|
19
|
+
attr_reader :type
|
20
|
+
|
21
|
+
def initialize(
|
22
|
+
**dynamic_attributes
|
23
|
+
)
|
24
|
+
@type = "others"
|
25
|
+
|
26
|
+
|
27
|
+
dynamic_attributes.each do |key, value|
|
28
|
+
self.class.attr_accessor key
|
29
|
+
|
30
|
+
if value.is_a?(Hash)
|
31
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
32
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
33
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
34
|
+
else
|
35
|
+
instance_variable_set("@#{key}", value)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Create an instance of the class from a hash
|
41
|
+
# @param args [Hash] Hash containing all the required attributes
|
42
|
+
# @return [Line::Bot::V2::MessagingApi::CouponOthersRewardRequest] Instance of the class
|
43
|
+
def self.create(args) # steep:ignore
|
44
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
45
|
+
return new(**symbolized_args) # steep:ignore
|
46
|
+
end
|
47
|
+
|
48
|
+
# @param other [Object] Object to compare
|
49
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
50
|
+
def ==(other)
|
51
|
+
return false unless self.class == other.class
|
52
|
+
|
53
|
+
instance_variables.all? do |var|
|
54
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# @return [Integer] Hash code of the object
|
59
|
+
def hash
|
60
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|