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.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +49 -1
  3. data/README.md +250 -26
  4. data/lib/line/bot/v2/messaging_api/api/messaging_api_client.rb +269 -0
  5. data/lib/line/bot/v2/messaging_api/core.rb +39 -0
  6. data/lib/line/bot/v2/messaging_api/model/acquisition_condition_request.rb +77 -0
  7. data/lib/line/bot/v2/messaging_api/model/acquisition_condition_response.rb +78 -0
  8. data/lib/line/bot/v2/messaging_api/model/cash_back_fixed_price_info_request.rb +72 -0
  9. data/lib/line/bot/v2/messaging_api/model/cash_back_fixed_price_info_response.rb +78 -0
  10. data/lib/line/bot/v2/messaging_api/model/cash_back_percentage_price_info_request.rb +72 -0
  11. data/lib/line/bot/v2/messaging_api/model/cash_back_percentage_price_info_response.rb +72 -0
  12. data/lib/line/bot/v2/messaging_api/model/cash_back_price_info_request.rb +77 -0
  13. data/lib/line/bot/v2/messaging_api/model/cash_back_price_info_response.rb +77 -0
  14. data/lib/line/bot/v2/messaging_api/model/coupon_cash_back_reward_request.rb +72 -0
  15. data/lib/line/bot/v2/messaging_api/model/coupon_cash_back_reward_response.rb +72 -0
  16. data/lib/line/bot/v2/messaging_api/model/coupon_create_request.rb +139 -0
  17. data/lib/line/bot/v2/messaging_api/model/coupon_create_response.rb +67 -0
  18. data/lib/line/bot/v2/messaging_api/model/coupon_discount_reward_request.rb +72 -0
  19. data/lib/line/bot/v2/messaging_api/model/coupon_discount_reward_response.rb +72 -0
  20. data/lib/line/bot/v2/messaging_api/model/coupon_free_reward_request.rb +66 -0
  21. data/lib/line/bot/v2/messaging_api/model/coupon_free_reward_response.rb +66 -0
  22. data/lib/line/bot/v2/messaging_api/model/coupon_gift_reward_request.rb +66 -0
  23. data/lib/line/bot/v2/messaging_api/model/coupon_gift_reward_response.rb +66 -0
  24. data/lib/line/bot/v2/messaging_api/model/coupon_list_response.rb +73 -0
  25. data/lib/line/bot/v2/messaging_api/model/coupon_message.rb +91 -0
  26. data/lib/line/bot/v2/messaging_api/model/coupon_others_reward_request.rb +66 -0
  27. data/lib/line/bot/v2/messaging_api/model/coupon_others_reward_response.rb +66 -0
  28. data/lib/line/bot/v2/messaging_api/model/coupon_response.rb +169 -0
  29. data/lib/line/bot/v2/messaging_api/model/coupon_reward_request.rb +80 -0
  30. data/lib/line/bot/v2/messaging_api/model/coupon_reward_response.rb +80 -0
  31. data/lib/line/bot/v2/messaging_api/model/discount_explicit_price_info_request.rb +78 -0
  32. data/lib/line/bot/v2/messaging_api/model/discount_explicit_price_info_response.rb +84 -0
  33. data/lib/line/bot/v2/messaging_api/model/discount_fixed_price_info_request.rb +72 -0
  34. data/lib/line/bot/v2/messaging_api/model/discount_fixed_price_info_response.rb +78 -0
  35. data/lib/line/bot/v2/messaging_api/model/discount_percentage_price_info_request.rb +72 -0
  36. data/lib/line/bot/v2/messaging_api/model/discount_percentage_price_info_response.rb +72 -0
  37. data/lib/line/bot/v2/messaging_api/model/discount_price_info_request.rb +78 -0
  38. data/lib/line/bot/v2/messaging_api/model/discount_price_info_response.rb +78 -0
  39. data/lib/line/bot/v2/messaging_api/model/lottery_acquisition_condition_request.rb +78 -0
  40. data/lib/line/bot/v2/messaging_api/model/lottery_acquisition_condition_response.rb +78 -0
  41. data/lib/line/bot/v2/messaging_api/model/message.rb +1 -0
  42. data/lib/line/bot/v2/messaging_api/model/messaging_api_pager_coupon_list_response.rb +79 -0
  43. data/lib/line/bot/v2/messaging_api/model/normal_acquisition_condition_request.rb +66 -0
  44. data/lib/line/bot/v2/messaging_api/model/normal_acquisition_condition_response.rb +66 -0
  45. data/lib/line/bot/v2/messaging_api/model/referral_acquisition_condition_response.rb +66 -0
  46. data/lib/line/bot/version.rb +1 -1
  47. data/lib/line/bot.rb +0 -9
  48. data/line-bot-api.gemspec +1 -1
  49. data/sig/line/bot/v2/messaging_api/api/messaging_api_client.rbs +156 -0
  50. data/sig/line/bot/v2/messaging_api/model/acquisition_condition_request.rbs +43 -0
  51. data/sig/line/bot/v2/messaging_api/model/acquisition_condition_response.rbs +43 -0
  52. data/sig/line/bot/v2/messaging_api/model/cash_back_fixed_price_info_request.rbs +40 -0
  53. data/sig/line/bot/v2/messaging_api/model/cash_back_fixed_price_info_response.rbs +43 -0
  54. data/sig/line/bot/v2/messaging_api/model/cash_back_percentage_price_info_request.rbs +40 -0
  55. data/sig/line/bot/v2/messaging_api/model/cash_back_percentage_price_info_response.rbs +40 -0
  56. data/sig/line/bot/v2/messaging_api/model/cash_back_price_info_request.rbs +43 -0
  57. data/sig/line/bot/v2/messaging_api/model/cash_back_price_info_response.rbs +43 -0
  58. data/sig/line/bot/v2/messaging_api/model/coupon_cash_back_reward_request.rbs +40 -0
  59. data/sig/line/bot/v2/messaging_api/model/coupon_cash_back_reward_response.rbs +40 -0
  60. data/sig/line/bot/v2/messaging_api/model/coupon_create_request.rbs +76 -0
  61. data/sig/line/bot/v2/messaging_api/model/coupon_create_response.rbs +40 -0
  62. data/sig/line/bot/v2/messaging_api/model/coupon_discount_reward_request.rbs +40 -0
  63. data/sig/line/bot/v2/messaging_api/model/coupon_discount_reward_response.rbs +40 -0
  64. data/sig/line/bot/v2/messaging_api/model/coupon_free_reward_request.rbs +37 -0
  65. data/sig/line/bot/v2/messaging_api/model/coupon_free_reward_response.rbs +37 -0
  66. data/sig/line/bot/v2/messaging_api/model/coupon_gift_reward_request.rbs +37 -0
  67. data/sig/line/bot/v2/messaging_api/model/coupon_gift_reward_response.rbs +37 -0
  68. data/sig/line/bot/v2/messaging_api/model/coupon_list_response.rbs +43 -0
  69. data/sig/line/bot/v2/messaging_api/model/coupon_message.rbs +50 -0
  70. data/sig/line/bot/v2/messaging_api/model/coupon_others_reward_request.rbs +37 -0
  71. data/sig/line/bot/v2/messaging_api/model/coupon_others_reward_response.rbs +37 -0
  72. data/sig/line/bot/v2/messaging_api/model/coupon_response.rbs +91 -0
  73. data/sig/line/bot/v2/messaging_api/model/coupon_reward_request.rbs +43 -0
  74. data/sig/line/bot/v2/messaging_api/model/coupon_reward_response.rbs +43 -0
  75. data/sig/line/bot/v2/messaging_api/model/discount_explicit_price_info_request.rbs +43 -0
  76. data/sig/line/bot/v2/messaging_api/model/discount_explicit_price_info_response.rbs +46 -0
  77. data/sig/line/bot/v2/messaging_api/model/discount_fixed_price_info_request.rbs +40 -0
  78. data/sig/line/bot/v2/messaging_api/model/discount_fixed_price_info_response.rbs +43 -0
  79. data/sig/line/bot/v2/messaging_api/model/discount_percentage_price_info_request.rbs +40 -0
  80. data/sig/line/bot/v2/messaging_api/model/discount_percentage_price_info_response.rbs +40 -0
  81. data/sig/line/bot/v2/messaging_api/model/discount_price_info_request.rbs +43 -0
  82. data/sig/line/bot/v2/messaging_api/model/discount_price_info_response.rbs +43 -0
  83. data/sig/line/bot/v2/messaging_api/model/lottery_acquisition_condition_request.rbs +43 -0
  84. data/sig/line/bot/v2/messaging_api/model/lottery_acquisition_condition_response.rbs +43 -0
  85. data/sig/line/bot/v2/messaging_api/model/messaging_api_pager_coupon_list_response.rbs +43 -0
  86. data/sig/line/bot/v2/messaging_api/model/normal_acquisition_condition_request.rbs +37 -0
  87. data/sig/line/bot/v2/messaging_api/model/normal_acquisition_condition_response.rbs +37 -0
  88. data/sig/line/bot/v2/messaging_api/model/referral_acquisition_condition_response.rbs +37 -0
  89. metadata +81 -24
  90. data/lib/line/bot/v1/api/errors.rb +0 -23
  91. data/lib/line/bot/v1/api/version.rb +0 -23
  92. data/lib/line/bot/v1/api.rb +0 -33
  93. data/lib/line/bot/v1/client.rb +0 -1936
  94. data/lib/line/bot/v1/event/account_link.rb +0 -38
  95. data/lib/line/bot/v1/event/base.rb +0 -39
  96. data/lib/line/bot/v1/event/beacon.rb +0 -43
  97. data/lib/line/bot/v1/event/follow.rb +0 -30
  98. data/lib/line/bot/v1/event/join.rb +0 -29
  99. data/lib/line/bot/v1/event/leave.rb +0 -31
  100. data/lib/line/bot/v1/event/member_joined.rb +0 -29
  101. data/lib/line/bot/v1/event/member_left.rb +0 -31
  102. data/lib/line/bot/v1/event/message.rb +0 -51
  103. data/lib/line/bot/v1/event/postback.rb +0 -29
  104. data/lib/line/bot/v1/event/things.rb +0 -49
  105. data/lib/line/bot/v1/event/unfollow.rb +0 -31
  106. data/lib/line/bot/v1/event/unsend.rb +0 -31
  107. data/lib/line/bot/v1/event/video_play_complete.rb +0 -29
  108. data/lib/line/bot/v1/event.rb +0 -28
  109. data/lib/line/bot/v1/httpclient.rb +0 -91
  110. data/lib/line/bot/v1/util.rb +0 -28
@@ -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 './acquisition_condition_response'
11
+
12
+ module Line
13
+ module Bot
14
+ module V2
15
+ module MessagingApi
16
+ class NormalAcquisitionConditionResponse < AcquisitionConditionResponse
17
+ # @!attribute [r] type
18
+ # @return [String] Determines how the coupon is distributed or used.
19
+ attr_reader :type
20
+
21
+ def initialize(
22
+ **dynamic_attributes
23
+ )
24
+ @type = "normal"
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::NormalAcquisitionConditionResponse] 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 './acquisition_condition_response'
11
+
12
+ module Line
13
+ module Bot
14
+ module V2
15
+ module MessagingApi
16
+ class ReferralAcquisitionConditionResponse < AcquisitionConditionResponse
17
+ # @!attribute [r] type
18
+ # @return [String] Determines how the coupon is distributed or used.
19
+ attr_reader :type
20
+
21
+ def initialize(
22
+ **dynamic_attributes
23
+ )
24
+ @type = "referral"
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::ReferralAcquisitionConditionResponse] 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
@@ -2,6 +2,6 @@ module Line
2
2
  module Bot
3
3
  # This version is updated before releasing a new version in the release process.
4
4
  # You don't have to update this version manually.
5
- VERSION = "1.30.0"
5
+ VERSION = "2.1.0"
6
6
  end
7
7
  end
data/lib/line/bot.rb CHANGED
@@ -12,15 +12,6 @@
12
12
  # License for the specific language governing permissions and limitations
13
13
  # under the License.
14
14
 
15
- # V1
16
- require 'line/bot/v1/util'
17
- require 'line/bot/v1/client'
18
- require 'line/bot/v1/event'
19
- require 'line/bot/v1/api/errors'
20
- require 'line/bot/v1/api'
21
- require 'line/bot/v1/httpclient'
22
- require 'line/bot/v1/api/version'
23
-
24
15
  # V2
25
16
  require 'line/bot/v2/webhook_parser'
26
17
 
data/line-bot-api.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.metadata = {
18
18
  "bug_tracker_uri" => "#{spec.homepage}/issues",
19
19
  "changelog_uri" => "#{spec.homepage}/releases",
20
- "documentation_uri" => "https://rubydoc.info/gems/#{spec.name}/#{spec.version}",
20
+ "documentation_uri" => "https://line.github.io/line-bot-sdk-ruby/",
21
21
  "homepage_uri" => spec.homepage,
22
22
  "source_code_uri" => spec.homepage,
23
23
  }
@@ -112,6 +112,82 @@ module Line
112
112
  | String? # otherwise
113
113
  )
114
114
 
115
+ # Close coupon
116
+ # This requests to <code>PUT https://api.line.me/v2/bot/coupon/{couponId}/close</code>
117
+ # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
118
+ #
119
+ # @param coupon_id [String]
120
+ # @see https://developers.line.biz/en/reference/messaging-api/#discontinue-coupon
121
+ # @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
122
+ # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
123
+ # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 404
124
+ # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 410
125
+ # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
126
+ def close_coupon_with_http_info: (
127
+ coupon_id: String
128
+ ) -> (
129
+ [String?, 200, Hash[untyped, untyped]] # when HTTP status code is 200
130
+ | [ErrorResponse, 400, Hash[untyped, untyped]] # when HTTP status code is 400
131
+ | [ErrorResponse, 404, Hash[untyped, untyped]] # when HTTP status code is 404
132
+ | [ErrorResponse, 410, Hash[untyped, untyped]] # when HTTP status code is 410
133
+ | [String?, Integer, Hash[untyped, untyped]] # otherwise
134
+ )
135
+
136
+ # Close coupon
137
+ # This requests to <code>PUT https://api.line.me/v2/bot/coupon/{couponId}/close</code>
138
+ # When you want to get HTTP status code or response headers, use {#close_coupon_with_http_info} instead of this.
139
+ #
140
+ # @param coupon_id [String]
141
+ # @see https://developers.line.biz/en/reference/messaging-api/#discontinue-coupon
142
+ # @return [String, nil] when HTTP status code is 200
143
+ # @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
144
+ # @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404
145
+ # @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 410
146
+ # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
147
+ def close_coupon: (
148
+ coupon_id: String
149
+ ) -> (
150
+ String? # when HTTP status code is 200
151
+ | ErrorResponse # when HTTP status code is 400
152
+ | ErrorResponse # when HTTP status code is 404
153
+ | ErrorResponse # when HTTP status code is 410
154
+ | String? # otherwise
155
+ )
156
+
157
+ # Create a new coupon. Define coupon details such as type, title, and validity period.
158
+ # This requests to <code>POST https://api.line.me/v2/bot/coupon</code>
159
+ # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
160
+ #
161
+ # @param coupon_create_request [CouponCreateRequest, nil]
162
+ # @see https://developers.line.biz/en/reference/messaging-api/#create-coupon
163
+ # @return [Array(Line::Bot::V2::MessagingApi::CouponCreateResponse, Integer, Hash{String => String})] when HTTP status code is 200
164
+ # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
165
+ # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
166
+ def create_coupon_with_http_info: (
167
+ ?coupon_create_request: CouponCreateRequest?
168
+ ) -> (
169
+ [CouponCreateResponse, 200, Hash[untyped, untyped]] # when HTTP status code is 200
170
+ | [ErrorResponse, 400, Hash[untyped, untyped]] # when HTTP status code is 400
171
+ | [String?, Integer, Hash[untyped, untyped]] # otherwise
172
+ )
173
+
174
+ # Create a new coupon. Define coupon details such as type, title, and validity period.
175
+ # This requests to <code>POST https://api.line.me/v2/bot/coupon</code>
176
+ # When you want to get HTTP status code or response headers, use {#create_coupon_with_http_info} instead of this.
177
+ #
178
+ # @param coupon_create_request [CouponCreateRequest, nil]
179
+ # @see https://developers.line.biz/en/reference/messaging-api/#create-coupon
180
+ # @return [Line::Bot::V2::MessagingApi::CouponCreateResponse] when HTTP status code is 200
181
+ # @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
182
+ # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
183
+ def create_coupon: (
184
+ ?coupon_create_request: CouponCreateRequest?
185
+ ) -> (
186
+ CouponCreateResponse # when HTTP status code is 200
187
+ | ErrorResponse # when HTTP status code is 400
188
+ | String? # otherwise
189
+ )
190
+
115
191
  # Create rich menu
116
192
  # This requests to <code>POST https://api.line.me/v2/bot/richmenu</code>
117
193
  # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@@ -326,6 +402,44 @@ module Line
326
402
  | String? # otherwise
327
403
  )
328
404
 
405
+ # Get coupon detail
406
+ # This requests to <code>GET https://api.line.me/v2/bot/coupon/{couponId}</code>
407
+ # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
408
+ #
409
+ # @param coupon_id [String]
410
+ # @see https://developers.line.biz/en/reference/messaging-api/#get-coupon
411
+ # @return [Array(Line::Bot::V2::MessagingApi::CouponResponse, Integer, Hash{String => String})] when HTTP status code is 200
412
+ # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
413
+ # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 404
414
+ # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
415
+ def get_coupon_detail_with_http_info: (
416
+ coupon_id: String
417
+ ) -> (
418
+ [CouponResponse, 200, Hash[untyped, untyped]] # when HTTP status code is 200
419
+ | [ErrorResponse, 400, Hash[untyped, untyped]] # when HTTP status code is 400
420
+ | [ErrorResponse, 404, Hash[untyped, untyped]] # when HTTP status code is 404
421
+ | [String?, Integer, Hash[untyped, untyped]] # otherwise
422
+ )
423
+
424
+ # Get coupon detail
425
+ # This requests to <code>GET https://api.line.me/v2/bot/coupon/{couponId}</code>
426
+ # When you want to get HTTP status code or response headers, use {#get_coupon_detail_with_http_info} instead of this.
427
+ #
428
+ # @param coupon_id [String]
429
+ # @see https://developers.line.biz/en/reference/messaging-api/#get-coupon
430
+ # @return [Line::Bot::V2::MessagingApi::CouponResponse] when HTTP status code is 200
431
+ # @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
432
+ # @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404
433
+ # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
434
+ def get_coupon_detail: (
435
+ coupon_id: String
436
+ ) -> (
437
+ CouponResponse # when HTTP status code is 200
438
+ | ErrorResponse # when HTTP status code is 400
439
+ | ErrorResponse # when HTTP status code is 404
440
+ | String? # otherwise
441
+ )
442
+
329
443
  # Gets the ID of the default rich menu set with the Messaging API.
330
444
  # This requests to <code>GET https://api.line.me/v2/bot/user/all/richmenu</code>
331
445
  # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@@ -1348,6 +1462,48 @@ module Line
1348
1462
  | String? # otherwise
1349
1463
  )
1350
1464
 
1465
+ # Get a paginated list of coupons.
1466
+ # This requests to <code>GET https://api.line.me/v2/bot/coupon</code>
1467
+ # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
1468
+ #
1469
+ # @param status [Array[String], nil] Filter coupons by their status.
1470
+ # @param start [String, nil] Pagination token to retrieve the next page of results.
1471
+ # @param limit [Integer, nil] Maximum number of coupons to return per request.
1472
+ # @see https://developers.line.biz/en/reference/messaging-api/#get-coupons-list
1473
+ # @return [Array(Line::Bot::V2::MessagingApi::MessagingApiPagerCouponListResponse, Integer, Hash{String => String})] when HTTP status code is 200
1474
+ # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
1475
+ # @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
1476
+ def list_coupon_with_http_info: (
1477
+ ?status: Array[String]?,
1478
+ ?start: String?,
1479
+ ?limit: Integer?
1480
+ ) -> (
1481
+ [MessagingApiPagerCouponListResponse, 200, Hash[untyped, untyped]] # when HTTP status code is 200
1482
+ | [ErrorResponse, 400, Hash[untyped, untyped]] # when HTTP status code is 400
1483
+ | [String?, Integer, Hash[untyped, untyped]] # otherwise
1484
+ )
1485
+
1486
+ # Get a paginated list of coupons.
1487
+ # This requests to <code>GET https://api.line.me/v2/bot/coupon</code>
1488
+ # When you want to get HTTP status code or response headers, use {#list_coupon_with_http_info} instead of this.
1489
+ #
1490
+ # @param status [Array[String], nil] Filter coupons by their status.
1491
+ # @param start [String, nil] Pagination token to retrieve the next page of results.
1492
+ # @param limit [Integer, nil] Maximum number of coupons to return per request.
1493
+ # @see https://developers.line.biz/en/reference/messaging-api/#get-coupons-list
1494
+ # @return [Line::Bot::V2::MessagingApi::MessagingApiPagerCouponListResponse] when HTTP status code is 200
1495
+ # @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
1496
+ # @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
1497
+ def list_coupon: (
1498
+ ?status: Array[String]?,
1499
+ ?start: String?,
1500
+ ?limit: Integer?
1501
+ ) -> (
1502
+ MessagingApiPagerCouponListResponse # when HTTP status code is 200
1503
+ | ErrorResponse # when HTTP status code is 400
1504
+ | String? # otherwise
1505
+ )
1506
+
1351
1507
  # Mark messages from users as read
1352
1508
  # This requests to <code>POST https://api.line.me/v2/bot/message/markAsRead</code>
1353
1509
  # This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@@ -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
+ class AcquisitionConditionRequest
15
+ attr_accessor type: String
16
+
17
+
18
+ # @param type [String] Determines how the coupon is distributed or used.
19
+ def initialize: (
20
+ type: String,
21
+ **untyped dynamic_attributes
22
+ ) -> void
23
+
24
+ # Create an instance of the class from a hash
25
+ # @param args [Hash] Hash containing all the required attributes
26
+ # @return [Line::Bot::V2::MessagingApi::AcquisitionConditionRequest] Instance of the class
27
+ def self.create: (Hash[Symbol, untyped]) -> AcquisitionConditionRequest
28
+
29
+ # @param other [Object] Object to compare
30
+ # @return [Boolean] true if the objects are equal, false otherwise
31
+ def ==: (untyped other) -> bool
32
+
33
+ # @return [Integer] Hash code of the object
34
+ def hash: () -> Integer
35
+
36
+ private
37
+
38
+ def self.detect_class: (type: String) -> Class?
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -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
+ class AcquisitionConditionResponse
15
+ attr_accessor type: String
16
+
17
+
18
+ # @param type [String] Determines how the coupon is distributed or used.
19
+ def initialize: (
20
+ type: String,
21
+ **untyped dynamic_attributes
22
+ ) -> void
23
+
24
+ # Create an instance of the class from a hash
25
+ # @param args [Hash] Hash containing all the required attributes
26
+ # @return [Line::Bot::V2::MessagingApi::AcquisitionConditionResponse] Instance of the class
27
+ def self.create: (Hash[Symbol, untyped]) -> AcquisitionConditionResponse
28
+
29
+ # @param other [Object] Object to compare
30
+ # @return [Boolean] true if the objects are equal, false otherwise
31
+ def ==: (untyped other) -> bool
32
+
33
+ # @return [Integer] Hash code of the object
34
+ def hash: () -> Integer
35
+
36
+ private
37
+
38
+ def self.detect_class: (type: String) -> Class?
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,40 @@
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
+ class CashBackFixedPriceInfoRequest < CashBackPriceInfoRequest
15
+ attr_reader type: String
16
+ attr_accessor fixed_amount: Integer?
17
+
18
+
19
+ # @param fixed_amount [Integer,nil]
20
+ def initialize: (
21
+ ?fixed_amount: Integer?,
22
+ **untyped dynamic_attributes
23
+ ) -> void
24
+
25
+ # Create an instance of the class from a hash
26
+ # @param args [Hash] Hash containing all the required attributes
27
+ # @return [Line::Bot::V2::MessagingApi::CashBackFixedPriceInfoRequest] Instance of the class
28
+ def self.create: (Hash[Symbol, untyped]) -> CashBackFixedPriceInfoRequest
29
+
30
+ # @param other [Object] Object to compare
31
+ # @return [Boolean] true if the objects are equal, false otherwise
32
+ def ==: (untyped other) -> bool
33
+
34
+ # @return [Integer] Hash code of the object
35
+ def hash: () -> Integer
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -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
+ class CashBackFixedPriceInfoResponse < CashBackPriceInfoResponse
15
+ attr_reader type: String
16
+ attr_accessor currency: 'JPY'|'THB'|'TWD'?
17
+ attr_accessor fixed_amount: Integer?
18
+
19
+
20
+ # @param currency [String,nil] ('JPY'|'THB'|'TWD') Currency code (e.g., JPY, THB, TWD).
21
+ # @param fixed_amount [Integer,nil]
22
+ def initialize: (
23
+ ?currency: 'JPY'|'THB'|'TWD'?,
24
+ ?fixed_amount: Integer?,
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::CashBackFixedPriceInfoResponse] Instance of the class
31
+ def self.create: (Hash[Symbol, untyped]) -> CashBackFixedPriceInfoResponse
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,40 @@
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
+ class CashBackPercentagePriceInfoRequest < CashBackPriceInfoRequest
15
+ attr_reader type: String
16
+ attr_accessor percentage: Integer?
17
+
18
+
19
+ # @param percentage [Integer,nil] Specifies the cashback rate as a percentage. Must be an integer between 1 and 99.
20
+ def initialize: (
21
+ ?percentage: Integer?,
22
+ **untyped dynamic_attributes
23
+ ) -> void
24
+
25
+ # Create an instance of the class from a hash
26
+ # @param args [Hash] Hash containing all the required attributes
27
+ # @return [Line::Bot::V2::MessagingApi::CashBackPercentagePriceInfoRequest] Instance of the class
28
+ def self.create: (Hash[Symbol, untyped]) -> CashBackPercentagePriceInfoRequest
29
+
30
+ # @param other [Object] Object to compare
31
+ # @return [Boolean] true if the objects are equal, false otherwise
32
+ def ==: (untyped other) -> bool
33
+
34
+ # @return [Integer] Hash code of the object
35
+ def hash: () -> Integer
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
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
+ class CashBackPercentagePriceInfoResponse < CashBackPriceInfoResponse
15
+ attr_reader type: String
16
+ attr_accessor percentage: Integer?
17
+
18
+
19
+ # @param percentage [Integer,nil]
20
+ def initialize: (
21
+ ?percentage: Integer?,
22
+ **untyped dynamic_attributes
23
+ ) -> void
24
+
25
+ # Create an instance of the class from a hash
26
+ # @param args [Hash] Hash containing all the required attributes
27
+ # @return [Line::Bot::V2::MessagingApi::CashBackPercentagePriceInfoResponse] Instance of the class
28
+ def self.create: (Hash[Symbol, untyped]) -> CashBackPercentagePriceInfoResponse
29
+
30
+ # @param other [Object] Object to compare
31
+ # @return [Boolean] true if the objects are equal, false otherwise
32
+ def ==: (untyped other) -> bool
33
+
34
+ # @return [Integer] Hash code of the object
35
+ def hash: () -> Integer
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -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
+ class CashBackPriceInfoRequest
15
+ attr_accessor type: String
16
+
17
+
18
+ # @param type [String]
19
+ def initialize: (
20
+ type: String,
21
+ **untyped dynamic_attributes
22
+ ) -> void
23
+
24
+ # Create an instance of the class from a hash
25
+ # @param args [Hash] Hash containing all the required attributes
26
+ # @return [Line::Bot::V2::MessagingApi::CashBackPriceInfoRequest] Instance of the class
27
+ def self.create: (Hash[Symbol, untyped]) -> CashBackPriceInfoRequest
28
+
29
+ # @param other [Object] Object to compare
30
+ # @return [Boolean] true if the objects are equal, false otherwise
31
+ def ==: (untyped other) -> bool
32
+
33
+ # @return [Integer] Hash code of the object
34
+ def hash: () -> Integer
35
+
36
+ private
37
+
38
+ def self.detect_class: (type: String) -> Class?
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end