Class: Line::Bot::V2::MessagingApi::ApiClient

Inherits:
Object
  • Object
show all
Defined in:
lib/line/bot/v2/messaging_api/api/messaging_api_client.rb,
sig/line/bot/v2/messaging_api/api/messaging_api_client.rbs

Instance Method Summary collapse

Constructor Details

#initialize(base_url: nil, channel_access_token:, http_options: {}) ⇒ Object

Initializes a new Line::Bot::V2::MessagingApi::ApiClient instance.

Examples:

@client ||= Line::Bot::V2::MessagingApi::ApiClient.new(
  channel_access_token: "YOUR_CHANNEL_ACCESS_TOKEN",
  http_options: {
    open_timeout: 5,
    read_timeout: 5,
  }
)

Parameters:

  • base_url (String) (defaults to: nil) —

    The base URL for requests (optional). Defaults to 'https://api.line.me' if none is provided. You can override this for testing or to use a mock server.

  • channel_access_token (String) —

    The channel access token for authorization.

  • http_options (Hash) (defaults to: {}) —

    HTTP options (same as Net::HTTP options). See: https://docs.ruby-lang.org/en/3.4/Net/HTTP.html to understand the options.



38
39
40
41
42
43
44
45
46
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 38

def initialize(base_url: nil, channel_access_token:, http_options: {})
  @http_client = HttpClient.new(
    base_url: base_url || 'https://api.line.me',
    http_headers: {
      Authorization: "Bearer #{channel_access_token}"
    },
    http_options: http_options
  )
end

Instance Method Details

#broadcast(broadcast_request:, x_line_retry_key: nil) ⇒ String, ...

Sends a message to multiple users at any time. This requests to POST https://api.line.me/v2/bot/message/broadcast When you want to get HTTP status code or response headers, use {#broadcast_with_http_info} instead of this.

Parameters:

  • broadcast_request (BroadcastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil) —

    Retry key. Specifies the UUID in hexadecimal format (e.g., 123e4567-e89b-12d3-a456-426614174000) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



125
126
127
128
129
130
131
132
133
134
135
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 125

def broadcast(
  broadcast_request:,
  x_line_retry_key: nil
)
  response_body, _status_code, _headers = broadcast_with_http_info(
    broadcast_request: broadcast_request,
    x_line_retry_key: x_line_retry_key
  )

  response_body
end

#broadcast_with_http_info(broadcast_request:, x_line_retry_key: nil) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Sends a message to multiple users at any time. This requests to POST https://api.line.me/v2/bot/message/broadcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • broadcast_request (BroadcastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil) —

    Retry key. Specifies the UUID in hexadecimal format (e.g., 123e4567-e89b-12d3-a456-426614174000) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 61

def broadcast_with_http_info( 
  broadcast_request:, 
  x_line_retry_key: nil
)
  path = "/v2/bot/message/broadcast"
  header_params = {
    "X-Line-Retry-Key": x_line_retry_key
  }.compact

  response = @http_client.post(
    path: path,
    body_params: broadcast_request,
    headers: header_params
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 403
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 403, response.each_header.to_h]
  when 409
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 409, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#cancel_default_rich_menu ⇒ String?

Cancel default rich menu This requests to DELETE https://api.line.me/v2/bot/user/all/richmenu When you want to get HTTP status code or response headers, use {#cancel_default_rich_menu_with_http_info} instead of this.

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



167
168
169
170
171
172
173
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 167

def cancel_default_rich_menu(
)
  response_body, _status_code, _headers = cancel_default_rich_menu_with_http_info(
  )

  response_body
end

#cancel_default_rich_menu_with_http_info ⇒ Array((String|nil), Integer, Hash{String => String})

Cancel default rich menu This requests to DELETE https://api.line.me/v2/bot/user/all/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 144

def cancel_default_rich_menu_with_http_info(
)
  path = "/v2/bot/user/all/richmenu"

  response = @http_client.delete(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#close_coupon(coupon_id:) ⇒ String, ...

Close coupon This requests to PUT https://api.line.me/v2/bot/coupon/couponId/close When you want to get HTTP status code or response headers, use {#close_coupon_with_http_info} instead of this.

Parameters:

  • coupon_id (String)

Returns:

See Also:



237
238
239
240
241
242
243
244
245
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 237

def close_coupon(
  coupon_id:
)
  response_body, _status_code, _headers = close_coupon_with_http_info(
    coupon_id: coupon_id
  )

  response_body
end

#close_coupon_with_http_info(coupon_id:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Close coupon This requests to PUT https://api.line.me/v2/bot/coupon/couponId/close This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • coupon_id (String)

Returns:

See Also:



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 186

def close_coupon_with_http_info( 
  coupon_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/coupon/{couponId}/close", {
    "couponId": coupon_id
  })

  response = @http_client.put(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  when 410
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 410, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#create_coupon(coupon_create_request: nil) ⇒ Line::Bot::V2::MessagingApi::CouponCreateResponse, ...

Create a new coupon. Define coupon details such as type, title, and validity period. This requests to POST https://api.line.me/v2/bot/coupon When you want to get HTTP status code or response headers, use {#create_coupon_with_http_info} instead of this.

Parameters:

Returns:

See Also:



295
296
297
298
299
300
301
302
303
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 295

def create_coupon(
  coupon_create_request: nil
)
  response_body, _status_code, _headers = create_coupon_with_http_info(
    coupon_create_request: coupon_create_request
  )

  response_body
end

#create_coupon_with_http_info(coupon_create_request: nil) ⇒ Array(Line::Bot::V2::MessagingApi::CouponCreateResponse, Integer, Hash{String => String}), ...

Create a new coupon. Define coupon details such as type, title, and validity period. This requests to POST https://api.line.me/v2/bot/coupon This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

See Also:



256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 256

def create_coupon_with_http_info( 
  coupon_create_request: nil
)
  path = "/v2/bot/coupon"

  response = @http_client.post(
    path: path,
    body_params: coupon_create_request,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::CouponCreateResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#create_rich_menu(rich_menu_request:) ⇒ Line::Bot::V2::MessagingApi::RichMenuIdResponse, ...

Create rich menu This requests to POST https://api.line.me/v2/bot/richmenu When you want to get HTTP status code or response headers, use {#create_rich_menu_with_http_info} instead of this.

Parameters:

Returns:

See Also:



344
345
346
347
348
349
350
351
352
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 344

def create_rich_menu(
  rich_menu_request:
)
  response_body, _status_code, _headers = create_rich_menu_with_http_info(
    rich_menu_request: rich_menu_request
  )

  response_body
end

#create_rich_menu_alias(create_rich_menu_alias_request:) ⇒ String, ...

Create rich menu alias This requests to POST https://api.line.me/v2/bot/richmenu/alias When you want to get HTTP status code or response headers, use {#create_rich_menu_alias_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse) —

    when HTTP status code is 400

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



397
398
399
400
401
402
403
404
405
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 397

def create_rich_menu_alias(
  create_rich_menu_alias_request:
)
  response_body, _status_code, _headers = create_rich_menu_alias_with_http_info(
    create_rich_menu_alias_request: create_rich_menu_alias_request
  )

  response_body
end

#create_rich_menu_alias_with_http_info(create_rich_menu_alias_request:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Create rich menu alias This requests to POST https://api.line.me/v2/bot/richmenu/alias This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})) —

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 363

def create_rich_menu_alias_with_http_info( 
  create_rich_menu_alias_request:
)
  path = "/v2/bot/richmenu/alias"

  response = @http_client.post(
    path: path,
    body_params: create_rich_menu_alias_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#create_rich_menu_with_http_info(rich_menu_request:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Create rich menu This requests to POST https://api.line.me/v2/bot/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 313

def create_rich_menu_with_http_info( 
  rich_menu_request:
)
  path = "/v2/bot/richmenu"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_request,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuIdResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#delete_rich_menu(rich_menu_id:) ⇒ String?

Deletes a rich menu. This requests to DELETE https://api.line.me/v2/bot/richmenu/richMenuId When you want to get HTTP status code or response headers, use {#delete_rich_menu_with_http_info} instead of this.

Parameters:

  • rich_menu_id (String) —

    ID of a rich menu

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



442
443
444
445
446
447
448
449
450
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 442

def delete_rich_menu(
  rich_menu_id:
)
  response_body, _status_code, _headers = delete_rich_menu_with_http_info(
    rich_menu_id: rich_menu_id
  )

  response_body
end

#delete_rich_menu_alias(rich_menu_alias_id:) ⇒ String, ...

Delete rich menu alias This requests to DELETE https://api.line.me/v2/bot/richmenu/alias/richMenuAliasId When you want to get HTTP status code or response headers, use {#delete_rich_menu_alias_with_http_info} instead of this.

Parameters:

  • rich_menu_alias_id (String) —

    Rich menu alias ID that you want to delete.

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse) —

    when HTTP status code is 400

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



496
497
498
499
500
501
502
503
504
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 496

def delete_rich_menu_alias(
  rich_menu_alias_id:
)
  response_body, _status_code, _headers = delete_rich_menu_alias_with_http_info(
    rich_menu_alias_id: rich_menu_alias_id
  )

  response_body
end

#delete_rich_menu_alias_with_http_info(rich_menu_alias_id:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Delete rich menu alias This requests to DELETE https://api.line.me/v2/bot/richmenu/alias/richMenuAliasId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_alias_id (String) —

    Rich menu alias ID that you want to delete.

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})) —

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 461

def delete_rich_menu_alias_with_http_info( 
  rich_menu_alias_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/alias/{richMenuAliasId}", {
    "richMenuAliasId": rich_menu_alias_id
  })

  response = @http_client.delete(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#delete_rich_menu_with_http_info(rich_menu_id:) ⇒ Array((String|nil), Integer, Hash{String => String})

Deletes a rich menu. This requests to DELETE https://api.line.me/v2/bot/richmenu/richMenuId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_id (String) —

    ID of a rich menu

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 415

def delete_rich_menu_with_http_info( 
  rich_menu_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/{richMenuId}", {
    "richMenuId": rich_menu_id
  })

  response = @http_client.delete(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_aggregation_unit_name_list(limit: nil, start: nil) ⇒ Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse, ...

Get name list of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/list When you want to get HTTP status code or response headers, use {#get_aggregation_unit_name_list_with_http_info} instead of this.

Parameters:

  • limit (String, nil) (defaults to: nil) —

    The maximum number of aggregation units you can get per request.

  • start (String, nil) (defaults to: nil) —

    Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all the aggregation units in one request, include this parameter to get the remaining array.

Returns:

See Also:



552
553
554
555
556
557
558
559
560
561
562
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 552

def get_aggregation_unit_name_list(
  limit: nil,
  start: nil
)
  response_body, _status_code, _headers = get_aggregation_unit_name_list_with_http_info(
    limit: limit,
    start: start
  )

  response_body
end

#get_aggregation_unit_name_list_with_http_info(limit: nil, start: nil) ⇒ Array(Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get name list of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/list This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • limit (String, nil) (defaults to: nil) —

    The maximum number of aggregation units you can get per request.

  • start (String, nil) (defaults to: nil) —

    Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all the aggregation units in one request, include this parameter to get the remaining array.

Returns:

See Also:



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 515

def get_aggregation_unit_name_list_with_http_info( 
  limit: nil, 
  start: nil
)
  path = "/v2/bot/message/aggregation/list"
  query_params = {
    "limit": limit,
    "start": start
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_aggregation_unit_usage ⇒ Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse, ...

Get number of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/info When you want to get HTTP status code or response headers, use {#get_aggregation_unit_usage_with_http_info} instead of this.

Returns:

See Also:



599
600
601
602
603
604
605
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 599

def get_aggregation_unit_usage(
)
  response_body, _status_code, _headers = get_aggregation_unit_usage_with_http_info(
  )

  response_body
end

#get_aggregation_unit_usage_with_http_info ⇒ Array(Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/info This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

See Also:



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 571

def get_aggregation_unit_usage_with_http_info(
)
  path = "/v2/bot/message/aggregation/info"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_bot_info ⇒ Line::Bot::V2::MessagingApi::BotInfoResponse, ...

Get bot info This requests to GET https://api.line.me/v2/bot/info When you want to get HTTP status code or response headers, use {#get_bot_info_with_http_info} instead of this.

Returns:

See Also:



642
643
644
645
646
647
648
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 642

def get_bot_info(
)
  response_body, _status_code, _headers = get_bot_info_with_http_info(
  )

  response_body
end

#get_bot_info_with_http_info ⇒ Array(Line::Bot::V2::MessagingApi::BotInfoResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get bot info This requests to GET https://api.line.me/v2/bot/info This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::BotInfoResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 614

def get_bot_info_with_http_info(
)
  path = "/v2/bot/info"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::BotInfoResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_coupon_detail(coupon_id:) ⇒ Line::Bot::V2::MessagingApi::CouponResponse, ...

Get coupon detail This requests to GET https://api.line.me/v2/bot/coupon/couponId When you want to get HTTP status code or response headers, use {#get_coupon_detail_with_http_info} instead of this.

Parameters:

  • coupon_id (String)

Returns:

See Also:



708
709
710
711
712
713
714
715
716
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 708

def get_coupon_detail(
  coupon_id:
)
  response_body, _status_code, _headers = get_coupon_detail_with_http_info(
    coupon_id: coupon_id
  )

  response_body
end

#get_coupon_detail_with_http_info(coupon_id:) ⇒ Array(Line::Bot::V2::MessagingApi::CouponResponse, Integer, Hash{String => String}), ...

Get coupon detail This requests to GET https://api.line.me/v2/bot/coupon/couponId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • coupon_id (String)

Returns:

See Also:



660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 660

def get_coupon_detail_with_http_info( 
  coupon_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/coupon/{couponId}", {
    "couponId": coupon_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::CouponResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_default_rich_menu_id ⇒ Line::Bot::V2::MessagingApi::RichMenuIdResponse, ...

Gets the ID of the default rich menu set with the Messaging API. This requests to GET https://api.line.me/v2/bot/user/all/richmenu When you want to get HTTP status code or response headers, use {#get_default_rich_menu_id_with_http_info} instead of this.

Returns:

See Also:



753
754
755
756
757
758
759
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 753

def get_default_rich_menu_id(
)
  response_body, _status_code, _headers = get_default_rich_menu_id_with_http_info(
  )

  response_body
end

#get_default_rich_menu_id_with_http_info ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets the ID of the default rich menu set with the Messaging API. This requests to GET https://api.line.me/v2/bot/user/all/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 725

def get_default_rich_menu_id_with_http_info(
)
  path = "/v2/bot/user/all/richmenu"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuIdResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_followers(start: nil, limit: nil) ⇒ Line::Bot::V2::MessagingApi::GetFollowersResponse, ...

Get a list of users who added your LINE Official Account as a friend This requests to GET https://api.line.me/v2/bot/followers/ids When you want to get HTTP status code or response headers, use {#get_followers_with_http_info} instead of this.

Parameters:

  • start (String, nil) (defaults to: nil) —

    Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs.

  • limit (Integer, nil) (defaults to: nil) —

    The maximum number of user IDs to retrieve in a single request.

Returns:

See Also:



807
808
809
810
811
812
813
814
815
816
817
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 807

def get_followers(
  start: nil,
  limit: nil
)
  response_body, _status_code, _headers = get_followers_with_http_info(
    start: start,
    limit: limit
  )

  response_body
end

#get_followers_with_http_info(start: nil, limit: nil) ⇒ Array(Line::Bot::V2::MessagingApi::GetFollowersResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get a list of users who added your LINE Official Account as a friend This requests to GET https://api.line.me/v2/bot/followers/ids This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • start (String, nil) (defaults to: nil) —

    Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs.

  • limit (Integer, nil) (defaults to: nil) —

    The maximum number of user IDs to retrieve in a single request.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::GetFollowersResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 770

def get_followers_with_http_info( 
  start: nil, 
  limit: nil
)
  path = "/v2/bot/followers/ids"
  query_params = {
    "start": start,
    "limit": limit
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetFollowersResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_group_member_count(group_id:) ⇒ Line::Bot::V2::MessagingApi::GroupMemberCountResponse, ...

Get number of users in a group chat This requests to GET https://api.line.me/v2/bot/group/groupId/members/count When you want to get HTTP status code or response headers, use {#get_group_member_count_with_http_info} instead of this.

Parameters:

  • group_id (String) —

    Group ID

Returns:

See Also:



859
860
861
862
863
864
865
866
867
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 859

def get_group_member_count(
  group_id:
)
  response_body, _status_code, _headers = get_group_member_count_with_http_info(
    group_id: group_id
  )

  response_body
end

#get_group_member_count_with_http_info(group_id:) ⇒ Array(Line::Bot::V2::MessagingApi::GroupMemberCountResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of users in a group chat This requests to GET https://api.line.me/v2/bot/group/groupId/members/count This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String) —

    Group ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::GroupMemberCountResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 827

def get_group_member_count_with_http_info( 
  group_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/members/count", {
    "groupId": group_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GroupMemberCountResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_group_member_profile(group_id:, user_id:) ⇒ Line::Bot::V2::MessagingApi::GroupUserProfileResponse, ...

Get group chat member profile This requests to GET https://api.line.me/v2/bot/group/groupId/member/userId When you want to get HTTP status code or response headers, use {#get_group_member_profile_with_http_info} instead of this.

Parameters:

  • group_id (String) —

    Group ID

  • user_id (String) —

    User ID

Returns:

See Also:



913
914
915
916
917
918
919
920
921
922
923
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 913

def get_group_member_profile(
  group_id:,
  user_id:
)
  response_body, _status_code, _headers = get_group_member_profile_with_http_info(
    group_id: group_id,
    user_id: user_id
  )

  response_body
end

#get_group_member_profile_with_http_info(group_id:, user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::GroupUserProfileResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get group chat member profile This requests to GET https://api.line.me/v2/bot/group/groupId/member/userId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String) —

    Group ID

  • user_id (String) —

    User ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::GroupUserProfileResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 878

def get_group_member_profile_with_http_info( 
  group_id:, 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/member/{userId}", {
    "groupId": group_id,
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GroupUserProfileResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_group_members_ids(group_id:, start: nil) ⇒ Line::Bot::V2::MessagingApi::MembersIdsResponse, ...

Get group chat member user IDs This requests to GET https://api.line.me/v2/bot/group/groupId/members/ids When you want to get HTTP status code or response headers, use {#get_group_members_ids_with_http_info} instead of this.

Parameters:

  • group_id (String) —

    Group ID

  • start (String, nil) (defaults to: nil) —

    Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.

Returns:

See Also:



972
973
974
975
976
977
978
979
980
981
982
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 972

def get_group_members_ids(
  group_id:,
  start: nil
)
  response_body, _status_code, _headers = get_group_members_ids_with_http_info(
    group_id: group_id,
    start: start
  )

  response_body
end

#get_group_members_ids_with_http_info(group_id:, start: nil) ⇒ Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get group chat member user IDs This requests to GET https://api.line.me/v2/bot/group/groupId/members/ids This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String) —

    Group ID

  • start (String, nil) (defaults to: nil) —

    Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 934

def get_group_members_ids_with_http_info( 
  group_id:, 
  start: nil
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/members/ids", {
    "groupId": group_id
  })
  query_params = {
    "start": start
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MembersIdsResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_group_summary(group_id:) ⇒ Line::Bot::V2::MessagingApi::GroupSummaryResponse, ...

Get group chat summary This requests to GET https://api.line.me/v2/bot/group/groupId/summary When you want to get HTTP status code or response headers, use {#get_group_summary_with_http_info} instead of this.

Parameters:

  • group_id (String) —

    Group ID

Returns:

See Also:



1024
1025
1026
1027
1028
1029
1030
1031
1032
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1024

def get_group_summary(
  group_id:
)
  response_body, _status_code, _headers = get_group_summary_with_http_info(
    group_id: group_id
  )

  response_body
end

#get_group_summary_with_http_info(group_id:) ⇒ Array(Line::Bot::V2::MessagingApi::GroupSummaryResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get group chat summary This requests to GET https://api.line.me/v2/bot/group/groupId/summary This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String) —

    Group ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::GroupSummaryResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 992

def get_group_summary_with_http_info( 
  group_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/summary", {
    "groupId": group_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GroupSummaryResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_joined_membership_users(membership_id:, start: nil, limit: nil) ⇒ Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse, ...

Get a list of user IDs who joined the membership. This requests to GET https://api.line.me/v2/bot/membership/membershipId/users/ids When you want to get HTTP status code or response headers, use {#get_joined_membership_users_with_http_info} instead of this.

Parameters:

  • membership_id (Integer) —

    Membership plan ID.

  • start (String, nil) (defaults to: nil) —

    A continuation token to get next remaining membership user IDs. Returned only when there are remaining user IDs that weren't returned in the userIds property in the previous request. The continuation token expires in 24 hours (86,400 seconds).

  • limit (Integer, nil) (defaults to: nil) —

    The max number of items to return for this API call. The value is set to 300 by default, but the max acceptable value is 1000.

Returns:

See Also:



1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1103

def get_joined_membership_users(
  membership_id:,
  start: nil,
  limit: nil
)
  response_body, _status_code, _headers = get_joined_membership_users_with_http_info(
    membership_id: membership_id,
    start: start,
    limit: limit
  )

  response_body
end

#get_joined_membership_users_with_http_info(membership_id:, start: nil, limit: nil) ⇒ Array(Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse, Integer, Hash{String => String}), ...

Get a list of user IDs who joined the membership. This requests to GET https://api.line.me/v2/bot/membership/membershipId/users/ids This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • membership_id (Integer) —

    Membership plan ID.

  • start (String, nil) (defaults to: nil) —

    A continuation token to get next remaining membership user IDs. Returned only when there are remaining user IDs that weren't returned in the userIds property in the previous request. The continuation token expires in 24 hours (86,400 seconds).

  • limit (Integer, nil) (defaults to: nil) —

    The max number of items to return for this API call. The value is set to 300 by default, but the max acceptable value is 1000.

Returns:

See Also:



1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1046

def get_joined_membership_users_with_http_info( 
  membership_id:, 
  start: nil, 
  limit: nil
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/membership/{membershipId}/users/ids", {
    "membershipId": membership_id
  })
  query_params = {
    "start": start,
    "limit": limit
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_membership_list ⇒ Line::Bot::V2::MessagingApi::MembershipListResponse, ...

Get a list of memberships. This requests to GET https://api.line.me/v2/bot/membership/list When you want to get HTTP status code or response headers, use {#get_membership_list_with_http_info} instead of this.

Returns:

See Also:



1161
1162
1163
1164
1165
1166
1167
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1161

def get_membership_list(
)
  response_body, _status_code, _headers = get_membership_list_with_http_info(
  )

  response_body
end

#get_membership_list_with_http_info ⇒ Array(Line::Bot::V2::MessagingApi::MembershipListResponse, Integer, Hash{String => String}), ...

Get a list of memberships. This requests to GET https://api.line.me/v2/bot/membership/list This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

See Also:



1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1125

def get_membership_list_with_http_info(
)
  path = "/v2/bot/membership/list"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MembershipListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_membership_subscription(user_id:) ⇒ Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse, ...

Get a user's membership subscription. This requests to GET https://api.line.me/v2/bot/membership/subscription/userId When you want to get HTTP status code or response headers, use {#get_membership_subscription_with_http_info} instead of this.

Parameters:

  • user_id (String) —

    User ID

Returns:

See Also:



1227
1228
1229
1230
1231
1232
1233
1234
1235
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1227

def get_membership_subscription(
  user_id:
)
  response_body, _status_code, _headers = get_membership_subscription_with_http_info(
    user_id: user_id
  )

  response_body
end

#get_membership_subscription_with_http_info(user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse, Integer, Hash{String => String}), ...

Get a user's membership subscription. This requests to GET https://api.line.me/v2/bot/membership/subscription/userId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String) —

    User ID

Returns:

See Also:



1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1179

def get_membership_subscription_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/membership/subscription/{userId}", {
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_message_quota ⇒ Line::Bot::V2::MessagingApi::MessageQuotaResponse, ...

Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned. This requests to GET https://api.line.me/v2/bot/message/quota When you want to get HTTP status code or response headers, use {#get_message_quota_with_http_info} instead of this.

Returns:

See Also:



1272
1273
1274
1275
1276
1277
1278
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1272

def get_message_quota(
)
  response_body, _status_code, _headers = get_message_quota_with_http_info(
  )

  response_body
end

#get_message_quota_consumption ⇒ Line::Bot::V2::MessagingApi::QuotaConsumptionResponse, ...

Gets the number of messages sent in the current month. This requests to GET https://api.line.me/v2/bot/message/quota/consumption When you want to get HTTP status code or response headers, use {#get_message_quota_consumption_with_http_info} instead of this.

Returns:

See Also:



1315
1316
1317
1318
1319
1320
1321
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1315

def get_message_quota_consumption(
)
  response_body, _status_code, _headers = get_message_quota_consumption_with_http_info(
  )

  response_body
end

#get_message_quota_consumption_with_http_info ⇒ Array(Line::Bot::V2::MessagingApi::QuotaConsumptionResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets the number of messages sent in the current month. This requests to GET https://api.line.me/v2/bot/message/quota/consumption This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::QuotaConsumptionResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1287

def get_message_quota_consumption_with_http_info(
)
  path = "/v2/bot/message/quota/consumption"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::QuotaConsumptionResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_message_quota_with_http_info ⇒ Array(Line::Bot::V2::MessagingApi::MessageQuotaResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned. This requests to GET https://api.line.me/v2/bot/message/quota This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::MessageQuotaResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1244

def get_message_quota_with_http_info(
)
  path = "/v2/bot/message/quota"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MessageQuotaResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_narrowcast_progress(request_id:) ⇒ Line::Bot::V2::MessagingApi::NarrowcastProgressResponse, ...

Gets the status of a narrowcast message. This requests to GET https://api.line.me/v2/bot/message/progress/narrowcast When you want to get HTTP status code or response headers, use {#get_narrowcast_progress_with_http_info} instead of this.

Parameters:

  • request_id (String) —

    The narrowcast message's request ID. Each Messaging API request has a request ID.

Returns:

See Also:



1365
1366
1367
1368
1369
1370
1371
1372
1373
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1365

def get_narrowcast_progress(
  request_id:
)
  response_body, _status_code, _headers = get_narrowcast_progress_with_http_info(
    request_id: request_id
  )

  response_body
end

#get_narrowcast_progress_with_http_info(request_id:) ⇒ Array(Line::Bot::V2::MessagingApi::NarrowcastProgressResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets the status of a narrowcast message. This requests to GET https://api.line.me/v2/bot/message/progress/narrowcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • request_id (String) —

    The narrowcast message's request ID. Each Messaging API request has a request ID.

Returns:

See Also:



1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1331

def get_narrowcast_progress_with_http_info( 
  request_id:
)
  path = "/v2/bot/message/progress/narrowcast"
  query_params = {
    "requestId": request_id
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NarrowcastProgressResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_number_of_sent_broadcast_messages(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent broadcast messages This requests to GET https://api.line.me/v2/bot/message/delivery/broadcast When you want to get HTTP status code or response headers, use {#get_number_of_sent_broadcast_messages_with_http_info} instead of this.

Parameters:

  • date (String) —

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

See Also:



1417
1418
1419
1420
1421
1422
1423
1424
1425
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1417

def get_number_of_sent_broadcast_messages(
  date:
)
  response_body, _status_code, _headers = get_number_of_sent_broadcast_messages_with_http_info(
    date: date
  )

  response_body
end

#get_number_of_sent_broadcast_messages_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent broadcast messages This requests to GET https://api.line.me/v2/bot/message/delivery/broadcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String) —

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1383

def get_number_of_sent_broadcast_messages_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/broadcast"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_number_of_sent_multicast_messages(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent multicast messages This requests to GET https://api.line.me/v2/bot/message/delivery/multicast When you want to get HTTP status code or response headers, use {#get_number_of_sent_multicast_messages_with_http_info} instead of this.

Parameters:

  • date (String) —

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

See Also:



1469
1470
1471
1472
1473
1474
1475
1476
1477
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1469

def get_number_of_sent_multicast_messages(
  date:
)
  response_body, _status_code, _headers = get_number_of_sent_multicast_messages_with_http_info(
    date: date
  )

  response_body
end

#get_number_of_sent_multicast_messages_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent multicast messages This requests to GET https://api.line.me/v2/bot/message/delivery/multicast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String) —

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1435

def get_number_of_sent_multicast_messages_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/multicast"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_number_of_sent_push_messages(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent push messages This requests to GET https://api.line.me/v2/bot/message/delivery/push When you want to get HTTP status code or response headers, use {#get_number_of_sent_push_messages_with_http_info} instead of this.

Parameters:

  • date (String) —

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

See Also:



1521
1522
1523
1524
1525
1526
1527
1528
1529
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1521

def get_number_of_sent_push_messages(
  date:
)
  response_body, _status_code, _headers = get_number_of_sent_push_messages_with_http_info(
    date: date
  )

  response_body
end

#get_number_of_sent_push_messages_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent push messages This requests to GET https://api.line.me/v2/bot/message/delivery/push This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String) —

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1487

def get_number_of_sent_push_messages_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/push"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_number_of_sent_reply_messages(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent reply messages This requests to GET https://api.line.me/v2/bot/message/delivery/reply When you want to get HTTP status code or response headers, use {#get_number_of_sent_reply_messages_with_http_info} instead of this.

Parameters:

  • date (String) —

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

See Also:



1573
1574
1575
1576
1577
1578
1579
1580
1581
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1573

def get_number_of_sent_reply_messages(
  date:
)
  response_body, _status_code, _headers = get_number_of_sent_reply_messages_with_http_info(
    date: date
  )

  response_body
end

#get_number_of_sent_reply_messages_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent reply messages This requests to GET https://api.line.me/v2/bot/message/delivery/reply This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String) —

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1539

def get_number_of_sent_reply_messages_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/reply"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_pnp_message_statistics(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent LINE notification messages This requests to GET https://api.line.me/v2/bot/message/delivery/pnp When you want to get HTTP status code or response headers, use {#get_pnp_message_statistics_with_http_info} instead of this.

Parameters:

  • date (String) —

    Date the message was sent Format: yyyyMMdd (Example:20211231) Time zone: UTC+9

Returns:

See Also:



1625
1626
1627
1628
1629
1630
1631
1632
1633
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1625

def get_pnp_message_statistics(
  date:
)
  response_body, _status_code, _headers = get_pnp_message_statistics_with_http_info(
    date: date
  )

  response_body
end

#get_pnp_message_statistics_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent LINE notification messages This requests to GET https://api.line.me/v2/bot/message/delivery/pnp This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String) —

    Date the message was sent Format: yyyyMMdd (Example:20211231) Time zone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1591

def get_pnp_message_statistics_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/pnp"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_pnp_templated_message_statistics(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent LINE notification messages (template) This requests to GET https://api.line.me/v2/bot/message/delivery/pnp/templated When you want to get HTTP status code or response headers, use {#get_pnp_templated_message_statistics_with_http_info} instead of this.

Parameters:

  • date (String) —

    Date the message was sent Format: yyyyMMdd (Example:20211231) Time zone: UTC+9

Returns:

See Also:



1677
1678
1679
1680
1681
1682
1683
1684
1685
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1677

def get_pnp_templated_message_statistics(
  date:
)
  response_body, _status_code, _headers = get_pnp_templated_message_statistics_with_http_info(
    date: date
  )

  response_body
end

#get_pnp_templated_message_statistics_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent LINE notification messages (template) This requests to GET https://api.line.me/v2/bot/message/delivery/pnp/templated This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String) —

    Date the message was sent Format: yyyyMMdd (Example:20211231) Time zone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1643

def get_pnp_templated_message_statistics_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/pnp/templated"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_profile(user_id:) ⇒ Line::Bot::V2::MessagingApi::UserProfileResponse, ...

Get profile This requests to GET https://api.line.me/v2/bot/profile/userId When you want to get HTTP status code or response headers, use {#get_profile_with_http_info} instead of this.

Parameters:

  • user_id (String) —

    User ID

Returns:

See Also:



1727
1728
1729
1730
1731
1732
1733
1734
1735
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1727

def get_profile(
  user_id:
)
  response_body, _status_code, _headers = get_profile_with_http_info(
    user_id: user_id
  )

  response_body
end

#get_profile_with_http_info(user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::UserProfileResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get profile This requests to GET https://api.line.me/v2/bot/profile/userId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String) —

    User ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::UserProfileResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1695

def get_profile_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/profile/{userId}", {
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::UserProfileResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu(rich_menu_id:) ⇒ Line::Bot::V2::MessagingApi::RichMenuResponse, ...

Gets a rich menu via a rich menu ID. This requests to GET https://api.line.me/v2/bot/richmenu/richMenuId When you want to get HTTP status code or response headers, use {#get_rich_menu_with_http_info} instead of this.

Parameters:

  • rich_menu_id (String) —

    ID of a rich menu

Returns:

See Also:



1777
1778
1779
1780
1781
1782
1783
1784
1785
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1777

def get_rich_menu(
  rich_menu_id:
)
  response_body, _status_code, _headers = get_rich_menu_with_http_info(
    rich_menu_id: rich_menu_id
  )

  response_body
end

#get_rich_menu_alias(rich_menu_alias_id:) ⇒ Line::Bot::V2::MessagingApi::RichMenuAliasResponse, ...

Get rich menu alias information This requests to GET https://api.line.me/v2/bot/richmenu/alias/richMenuAliasId When you want to get HTTP status code or response headers, use {#get_rich_menu_alias_with_http_info} instead of this.

Parameters:

  • rich_menu_alias_id (String) —

    The rich menu alias ID whose information you want to obtain.

Returns:

See Also:



1827
1828
1829
1830
1831
1832
1833
1834
1835
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1827

def get_rich_menu_alias(
  rich_menu_alias_id:
)
  response_body, _status_code, _headers = get_rich_menu_alias_with_http_info(
    rich_menu_alias_id: rich_menu_alias_id
  )

  response_body
end

#get_rich_menu_alias_list ⇒ Line::Bot::V2::MessagingApi::RichMenuAliasListResponse, ...

Get list of rich menu alias This requests to GET https://api.line.me/v2/bot/richmenu/alias/list When you want to get HTTP status code or response headers, use {#get_rich_menu_alias_list_with_http_info} instead of this.

Returns:

See Also:



1872
1873
1874
1875
1876
1877
1878
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1872

def get_rich_menu_alias_list(
)
  response_body, _status_code, _headers = get_rich_menu_alias_list_with_http_info(
  )

  response_body
end

#get_rich_menu_alias_list_with_http_info ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuAliasListResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get list of rich menu alias This requests to GET https://api.line.me/v2/bot/richmenu/alias/list This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

See Also:



1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1844

def get_rich_menu_alias_list_with_http_info(
)
  path = "/v2/bot/richmenu/alias/list"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuAliasListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_alias_with_http_info(rich_menu_alias_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuAliasResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get rich menu alias information This requests to GET https://api.line.me/v2/bot/richmenu/alias/richMenuAliasId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_alias_id (String) —

    The rich menu alias ID whose information you want to obtain.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuAliasResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1795

def get_rich_menu_alias_with_http_info( 
  rich_menu_alias_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/alias/{richMenuAliasId}", {
    "richMenuAliasId": rich_menu_alias_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuAliasResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_batch_progress(request_id:) ⇒ Line::Bot::V2::MessagingApi::RichMenuBatchProgressResponse, ...

Get the status of Replace or unlink a linked rich menus in batches. This requests to GET https://api.line.me/v2/bot/richmenu/progress/batch When you want to get HTTP status code or response headers, use {#get_rich_menu_batch_progress_with_http_info} instead of this.

Parameters:

  • request_id (String) —

    A request ID used to batch control the rich menu linked to the user. Each Messaging API request has a request ID.

Returns:

See Also:



1922
1923
1924
1925
1926
1927
1928
1929
1930
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1922

def get_rich_menu_batch_progress(
  request_id:
)
  response_body, _status_code, _headers = get_rich_menu_batch_progress_with_http_info(
    request_id: request_id
  )

  response_body
end

#get_rich_menu_batch_progress_with_http_info(request_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuBatchProgressResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get the status of Replace or unlink a linked rich menus in batches. This requests to GET https://api.line.me/v2/bot/richmenu/progress/batch This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • request_id (String) —

    A request ID used to batch control the rich menu linked to the user. Each Messaging API request has a request ID.

Returns:

See Also:



1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1888

def get_rich_menu_batch_progress_with_http_info( 
  request_id:
)
  path = "/v2/bot/richmenu/progress/batch"
  query_params = {
    "requestId": request_id
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuBatchProgressResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_id_of_user(user_id:) ⇒ Line::Bot::V2::MessagingApi::RichMenuIdResponse, ...

Get rich menu ID of user This requests to GET https://api.line.me/v2/bot/user/userId/richmenu When you want to get HTTP status code or response headers, use {#get_rich_menu_id_of_user_with_http_info} instead of this.

Parameters:

  • user_id (String) —

    User ID. Found in the source object of webhook event objects. Do not use the LINE ID used in LINE.

Returns:

See Also:



1972
1973
1974
1975
1976
1977
1978
1979
1980
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1972

def get_rich_menu_id_of_user(
  user_id:
)
  response_body, _status_code, _headers = get_rich_menu_id_of_user_with_http_info(
    user_id: user_id
  )

  response_body
end

#get_rich_menu_id_of_user_with_http_info(user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get rich menu ID of user This requests to GET https://api.line.me/v2/bot/user/userId/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String) —

    User ID. Found in the source object of webhook event objects. Do not use the LINE ID used in LINE.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1940

def get_rich_menu_id_of_user_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/{userId}/richmenu", {
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuIdResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_list ⇒ Line::Bot::V2::MessagingApi::RichMenuListResponse, ...

Get rich menu list This requests to GET https://api.line.me/v2/bot/richmenu/list When you want to get HTTP status code or response headers, use {#get_rich_menu_list_with_http_info} instead of this.

Returns:

See Also:



2017
2018
2019
2020
2021
2022
2023
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2017

def get_rich_menu_list(
)
  response_body, _status_code, _headers = get_rich_menu_list_with_http_info(
  )

  response_body
end

#get_rich_menu_list_with_http_info ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuListResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get rich menu list This requests to GET https://api.line.me/v2/bot/richmenu/list This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuListResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1989

def get_rich_menu_list_with_http_info(
)
  path = "/v2/bot/richmenu/list"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_with_http_info(rich_menu_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets a rich menu via a rich menu ID. This requests to GET https://api.line.me/v2/bot/richmenu/richMenuId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_id (String) —

    ID of a rich menu

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1745

def get_rich_menu_with_http_info( 
  rich_menu_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/{richMenuId}", {
    "richMenuId": rich_menu_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_room_member_count(room_id:) ⇒ Line::Bot::V2::MessagingApi::RoomMemberCountResponse, ...

Get number of users in a multi-person chat This requests to GET https://api.line.me/v2/bot/room/roomId/members/count When you want to get HTTP status code or response headers, use {#get_room_member_count_with_http_info} instead of this.

Parameters:

  • room_id (String) —

    Room ID

Returns:

See Also:



2065
2066
2067
2068
2069
2070
2071
2072
2073
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2065

def get_room_member_count(
  room_id:
)
  response_body, _status_code, _headers = get_room_member_count_with_http_info(
    room_id: room_id
  )

  response_body
end

#get_room_member_count_with_http_info(room_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RoomMemberCountResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of users in a multi-person chat This requests to GET https://api.line.me/v2/bot/room/roomId/members/count This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • room_id (String) —

    Room ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RoomMemberCountResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2033

def get_room_member_count_with_http_info( 
  room_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/room/{roomId}/members/count", {
    "roomId": room_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RoomMemberCountResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_room_member_profile(room_id:, user_id:) ⇒ Line::Bot::V2::MessagingApi::RoomUserProfileResponse, ...

Get multi-person chat member profile This requests to GET https://api.line.me/v2/bot/room/roomId/member/userId When you want to get HTTP status code or response headers, use {#get_room_member_profile_with_http_info} instead of this.

Parameters:

  • room_id (String) —

    Room ID

  • user_id (String) —

    User ID

Returns:

See Also:



2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2119

def get_room_member_profile(
  room_id:,
  user_id:
)
  response_body, _status_code, _headers = get_room_member_profile_with_http_info(
    room_id: room_id,
    user_id: user_id
  )

  response_body
end

#get_room_member_profile_with_http_info(room_id:, user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RoomUserProfileResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get multi-person chat member profile This requests to GET https://api.line.me/v2/bot/room/roomId/member/userId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • room_id (String) —

    Room ID

  • user_id (String) —

    User ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RoomUserProfileResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2084

def get_room_member_profile_with_http_info( 
  room_id:, 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/room/{roomId}/member/{userId}", {
    "roomId": room_id,
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RoomUserProfileResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_room_members_ids(room_id:, start: nil) ⇒ Line::Bot::V2::MessagingApi::MembersIdsResponse, ...

Get multi-person chat member user IDs This requests to GET https://api.line.me/v2/bot/room/roomId/members/ids When you want to get HTTP status code or response headers, use {#get_room_members_ids_with_http_info} instead of this.

Parameters:

  • room_id (String) —

    Room ID

  • start (String, nil) (defaults to: nil) —

    Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.

Returns:

See Also:



2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2178

def get_room_members_ids(
  room_id:,
  start: nil
)
  response_body, _status_code, _headers = get_room_members_ids_with_http_info(
    room_id: room_id,
    start: start
  )

  response_body
end

#get_room_members_ids_with_http_info(room_id:, start: nil) ⇒ Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get multi-person chat member user IDs This requests to GET https://api.line.me/v2/bot/room/roomId/members/ids This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • room_id (String) —

    Room ID

  • start (String, nil) (defaults to: nil) —

    Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2140

def get_room_members_ids_with_http_info( 
  room_id:, 
  start: nil
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/room/{roomId}/members/ids", {
    "roomId": room_id
  })
  query_params = {
    "start": start
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MembersIdsResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_webhook_endpoint ⇒ Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse, ...

Get webhook endpoint information This requests to GET https://api.line.me/v2/bot/channel/webhook/endpoint When you want to get HTTP status code or response headers, use {#get_webhook_endpoint_with_http_info} instead of this.

Returns:

See Also:



2225
2226
2227
2228
2229
2230
2231
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2225

def get_webhook_endpoint(
)
  response_body, _status_code, _headers = get_webhook_endpoint_with_http_info(
  )

  response_body
end

#get_webhook_endpoint_with_http_info ⇒ Array(Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get webhook endpoint information This requests to GET https://api.line.me/v2/bot/channel/webhook/endpoint This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

See Also:



2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2197

def get_webhook_endpoint_with_http_info(
)
  path = "/v2/bot/channel/webhook/endpoint"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Issue link token This requests to POST https://api.line.me/v2/bot/user/userId/linkToken When you want to get HTTP status code or response headers, use {#issue_link_token_with_http_info} instead of this.

Parameters:

  • user_id (String) —

    User ID for the LINE account to be linked. Found in the source object of account link event objects. Do not use the LINE ID used in LINE.

Returns:

See Also:



2273
2274
2275
2276
2277
2278
2279
2280
2281
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2273

def issue_link_token(
  user_id:
)
  response_body, _status_code, _headers = issue_link_token_with_http_info(
    user_id: user_id
  )

  response_body
end

Issue link token This requests to POST https://api.line.me/v2/bot/user/userId/linkToken This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String) —

    User ID for the LINE account to be linked. Found in the source object of account link event objects. Do not use the LINE ID used in LINE.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::IssueLinkTokenResponse, Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2241

def issue_link_token_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/{userId}/linkToken", {
    "userId": user_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::IssueLinkTokenResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#leave_group(group_id:) ⇒ String, ...

Leave group chat This requests to POST https://api.line.me/v2/bot/group/groupId/leave When you want to get HTTP status code or response headers, use {#leave_group_with_http_info} instead of this.

Parameters:

  • group_id (String) —

    Group ID

Returns:

See Also:



2336
2337
2338
2339
2340
2341
2342
2343
2344
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2336

def leave_group(
  group_id:
)
  response_body, _status_code, _headers = leave_group_with_http_info(
    group_id: group_id
  )

  response_body
end

#leave_group_with_http_info(group_id:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Leave group chat This requests to POST https://api.line.me/v2/bot/group/groupId/leave This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String) —

    Group ID

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})) —

    when HTTP status code is 400

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})) —

    when HTTP status code is 404

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2293

def leave_group_with_http_info( 
  group_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/leave", {
    "groupId": group_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#leave_room(room_id:) ⇒ String?

Leave multi-person chat This requests to POST https://api.line.me/v2/bot/room/roomId/leave When you want to get HTTP status code or response headers, use {#leave_room_with_http_info} instead of this.

Parameters:

  • room_id (String) —

    Room ID

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2381
2382
2383
2384
2385
2386
2387
2388
2389
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2381

def leave_room(
  room_id:
)
  response_body, _status_code, _headers = leave_room_with_http_info(
    room_id: room_id
  )

  response_body
end

#leave_room_with_http_info(room_id:) ⇒ Array((String|nil), Integer, Hash{String => String})

Leave multi-person chat This requests to POST https://api.line.me/v2/bot/room/roomId/leave This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • room_id (String) —

    Room ID

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2354

def leave_room_with_http_info( 
  room_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/room/{roomId}/leave", {
    "roomId": room_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Link rich menu to user. This requests to POST https://api.line.me/v2/bot/user/userId/richmenu/richMenuId When you want to get HTTP status code or response headers, use {#link_rich_menu_id_to_user_with_http_info} instead of this.

Parameters:

  • user_id (String) —

    User ID. Found in the source object of webhook event objects. Do not use the LINE ID used in LINE.

  • rich_menu_id (String) —

    ID of a rich menu

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2430

def link_rich_menu_id_to_user(
  user_id:,
  rich_menu_id:
)
  response_body, _status_code, _headers = link_rich_menu_id_to_user_with_http_info(
    user_id: user_id,
    rich_menu_id: rich_menu_id
  )

  response_body
end

Link rich menu to user. This requests to POST https://api.line.me/v2/bot/user/userId/richmenu/richMenuId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String) —

    User ID. Found in the source object of webhook event objects. Do not use the LINE ID used in LINE.

  • rich_menu_id (String) —

    ID of a rich menu

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2400

def link_rich_menu_id_to_user_with_http_info( 
  user_id:, 
  rich_menu_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/{userId}/richmenu/{richMenuId}", {
    "userId": user_id,
    "richMenuId": rich_menu_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Link rich menu to multiple users This requests to POST https://api.line.me/v2/bot/richmenu/bulk/link When you want to get HTTP status code or response headers, use {#link_rich_menu_id_to_users_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 202

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2476
2477
2478
2479
2480
2481
2482
2483
2484
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2476

def link_rich_menu_id_to_users(
  rich_menu_bulk_link_request:
)
  response_body, _status_code, _headers = link_rich_menu_id_to_users_with_http_info(
    rich_menu_bulk_link_request: rich_menu_bulk_link_request
  )

  response_body
end

Link rich menu to multiple users This requests to POST https://api.line.me/v2/bot/richmenu/bulk/link This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 202

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2450

def link_rich_menu_id_to_users_with_http_info( 
  rich_menu_bulk_link_request:
)
  path = "/v2/bot/richmenu/bulk/link"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_bulk_link_request,
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#list_coupon(status: nil, start: nil, limit: nil) ⇒ Line::Bot::V2::MessagingApi::MessagingApiPagerCouponListResponse, ...

Get a paginated list of coupons. This requests to GET https://api.line.me/v2/bot/coupon When you want to get HTTP status code or response headers, use {#list_coupon_with_http_info} instead of this.

Parameters:

  • status (Array[String], nil) (defaults to: nil) —

    Filter coupons by their status.

  • start (String, nil) (defaults to: nil) —

    Pagination token to retrieve the next page of results.

  • limit (Integer, nil) (defaults to: nil) —

    Maximum number of coupons to return per request.

Returns:

See Also:



2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2545

def list_coupon(
  status: nil,
  start: nil,
  limit: nil
)
  response_body, _status_code, _headers = list_coupon_with_http_info(
    status: status,
    start: start,
    limit: limit
  )

  response_body
end

#list_coupon_with_http_info(status: nil, start: nil, limit: nil) ⇒ Array(Line::Bot::V2::MessagingApi::MessagingApiPagerCouponListResponse, Integer, Hash{String => String}), ...

Get a paginated list of coupons. This requests to GET https://api.line.me/v2/bot/coupon This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • status (Array[String], nil) (defaults to: nil) —

    Filter coupons by their status.

  • start (String, nil) (defaults to: nil) —

    Pagination token to retrieve the next page of results.

  • limit (Integer, nil) (defaults to: nil) —

    Maximum number of coupons to return per request.

Returns:

See Also:



2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2497

def list_coupon_with_http_info( 
  status: nil, 
  start: nil, 
  limit: nil
)
  path = "/v2/bot/coupon"
  query_params = {
    "status": status&.join(','),
    "start": start,
    "limit": limit
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MessagingApiPagerCouponListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#mark_messages_as_read(mark_messages_as_read_request:) ⇒ String?

Mark messages from users as read This requests to POST https://api.line.me/v2/bot/message/markAsRead When you want to get HTTP status code or response headers, use {#mark_messages_as_read_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2593
2594
2595
2596
2597
2598
2599
2600
2601
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2593

def mark_messages_as_read(
  mark_messages_as_read_request:
)
  response_body, _status_code, _headers = mark_messages_as_read_with_http_info(
    mark_messages_as_read_request: mark_messages_as_read_request
  )

  response_body
end

#mark_messages_as_read_by_token(mark_messages_as_read_by_token_request:) ⇒ String, ...

Mark messages from users as read by token This requests to POST https://api.line.me/v2/bot/chat/markAsRead When you want to get HTTP status code or response headers, use {#mark_messages_as_read_by_token_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse) —

    when HTTP status code is 400

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2646
2647
2648
2649
2650
2651
2652
2653
2654
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2646

def mark_messages_as_read_by_token(
  mark_messages_as_read_by_token_request:
)
  response_body, _status_code, _headers = mark_messages_as_read_by_token_with_http_info(
    mark_messages_as_read_by_token_request: mark_messages_as_read_by_token_request
  )

  response_body
end

#mark_messages_as_read_by_token_with_http_info(mark_messages_as_read_by_token_request:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Mark messages from users as read by token This requests to POST https://api.line.me/v2/bot/chat/markAsRead This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})) —

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2612

def mark_messages_as_read_by_token_with_http_info( 
  mark_messages_as_read_by_token_request:
)
  path = "/v2/bot/chat/markAsRead"

  response = @http_client.post(
    path: path,
    body_params: mark_messages_as_read_by_token_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#mark_messages_as_read_with_http_info(mark_messages_as_read_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Mark messages from users as read This requests to POST https://api.line.me/v2/bot/message/markAsRead This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2567

def mark_messages_as_read_with_http_info( 
  mark_messages_as_read_request:
)
  path = "/v2/bot/message/markAsRead"

  response = @http_client.post(
    path: path,
    body_params: mark_messages_as_read_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#multicast(multicast_request:, x_line_retry_key: nil) ⇒ String, ...

An API that efficiently sends the same message to multiple user IDs. You can't send messages to group chats or multi-person chats. This requests to POST https://api.line.me/v2/bot/message/multicast When you want to get HTTP status code or response headers, use {#multicast_with_http_info} instead of this.

Parameters:

  • multicast_request (MulticastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil) —

    Retry key. Specifies the UUID in hexadecimal format (e.g., 123e4567-e89b-12d3-a456-426614174000) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2733

def multicast(
  multicast_request:,
  x_line_retry_key: nil
)
  response_body, _status_code, _headers = multicast_with_http_info(
    multicast_request: multicast_request,
    x_line_retry_key: x_line_retry_key
  )

  response_body
end

#multicast_with_http_info(multicast_request:, x_line_retry_key: nil) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

An API that efficiently sends the same message to multiple user IDs. You can't send messages to group chats or multi-person chats. This requests to POST https://api.line.me/v2/bot/message/multicast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • multicast_request (MulticastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil) —

    Retry key. Specifies the UUID in hexadecimal format (e.g., 123e4567-e89b-12d3-a456-426614174000) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2669

def multicast_with_http_info( 
  multicast_request:, 
  x_line_retry_key: nil
)
  path = "/v2/bot/message/multicast"
  header_params = {
    "X-Line-Retry-Key": x_line_retry_key
  }.compact

  response = @http_client.post(
    path: path,
    body_params: multicast_request,
    headers: header_params
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 403
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 403, response.each_header.to_h]
  when 409
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 409, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#narrowcast(narrowcast_request:, x_line_retry_key: nil) ⇒ String, ...

Send narrowcast message This requests to POST https://api.line.me/v2/bot/message/narrowcast When you want to get HTTP status code or response headers, use {#narrowcast_with_http_info} instead of this.

Parameters:

  • narrowcast_request (NarrowcastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil) —

    Retry key. Specifies the UUID in hexadecimal format (e.g., 123e4567-e89b-12d3-a456-426614174000) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2822

def narrowcast(
  narrowcast_request:,
  x_line_retry_key: nil
)
  response_body, _status_code, _headers = narrowcast_with_http_info(
    narrowcast_request: narrowcast_request,
    x_line_retry_key: x_line_retry_key
  )

  response_body
end

#narrowcast_with_http_info(narrowcast_request:, x_line_retry_key: nil) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Send narrowcast message This requests to POST https://api.line.me/v2/bot/message/narrowcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • narrowcast_request (NarrowcastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil) —

    Retry key. Specifies the UUID in hexadecimal format (e.g., 123e4567-e89b-12d3-a456-426614174000) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2758

def narrowcast_with_http_info( 
  narrowcast_request:, 
  x_line_retry_key: nil
)
  path = "/v2/bot/message/narrowcast"
  header_params = {
    "X-Line-Retry-Key": x_line_retry_key
  }.compact

  response = @http_client.post(
    path: path,
    body_params: narrowcast_request,
    headers: header_params
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 403
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 403, response.each_header.to_h]
  when 409
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 409, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#push_message(push_message_request:, x_line_retry_key: nil) ⇒ Line::Bot::V2::MessagingApi::PushMessageResponse, ...

Sends a message to a user, group chat, or multi-person chat at any time. This requests to POST https://api.line.me/v2/bot/message/push When you want to get HTTP status code or response headers, use {#push_message_with_http_info} instead of this.

Parameters:

  • push_message_request (PushMessageRequest)
  • x_line_retry_key (String, nil) (defaults to: nil) —

    Retry key. Specifies the UUID in hexadecimal format (e.g., 123e4567-e89b-12d3-a456-426614174000) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2916

def push_message(
  push_message_request:,
  x_line_retry_key: nil
)
  response_body, _status_code, _headers = push_message_with_http_info(
    push_message_request: push_message_request,
    x_line_retry_key: x_line_retry_key
  )

  response_body
end

#push_message_with_http_info(push_message_request:, x_line_retry_key: nil) ⇒ Array(Line::Bot::V2::MessagingApi::PushMessageResponse, Integer, Hash{String => String}), ...

Sends a message to a user, group chat, or multi-person chat at any time. This requests to POST https://api.line.me/v2/bot/message/push This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • push_message_request (PushMessageRequest)
  • x_line_retry_key (String, nil) (defaults to: nil) —

    Retry key. Specifies the UUID in hexadecimal format (e.g., 123e4567-e89b-12d3-a456-426614174000) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2847

def push_message_with_http_info( 
  push_message_request:, 
  x_line_retry_key: nil
)
  path = "/v2/bot/message/push"
  header_params = {
    "X-Line-Retry-Key": x_line_retry_key
  }.compact

  response = @http_client.post(
    path: path,
    body_params: push_message_request,
    headers: header_params
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::PushMessageResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 403
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 403, response.each_header.to_h]
  when 409
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 409, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#push_messages_by_phone(pnp_messages_request:, x_line_delivery_tag: nil) ⇒ String, ...

Send LINE notification message This requests to POST https://api.line.me/bot/pnp/push When you want to get HTTP status code or response headers, use {#push_messages_by_phone_with_http_info} instead of this.

Parameters:

  • pnp_messages_request (PnpMessagesRequest)
  • x_line_delivery_tag (String, nil) (defaults to: nil) —

    String returned in the delivery.data property of the delivery completion event via Webhook.

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse) —

    when HTTP status code is 422

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2978

def push_messages_by_phone(
  pnp_messages_request:,
  x_line_delivery_tag: nil
)
  response_body, _status_code, _headers = push_messages_by_phone_with_http_info(
    pnp_messages_request: pnp_messages_request,
    x_line_delivery_tag: x_line_delivery_tag
  )

  response_body
end

#push_messages_by_phone_with_http_info(pnp_messages_request:, x_line_delivery_tag: nil) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Send LINE notification message This requests to POST https://api.line.me/bot/pnp/push This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • pnp_messages_request (PnpMessagesRequest)
  • x_line_delivery_tag (String, nil) (defaults to: nil) —

    String returned in the delivery.data property of the delivery completion event via Webhook.

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})) —

    when HTTP status code is 422

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2938

def push_messages_by_phone_with_http_info( 
  pnp_messages_request:, 
  x_line_delivery_tag: nil
)
  path = "/bot/pnp/push"
  header_params = {
    "X-Line-Delivery-Tag": x_line_delivery_tag
  }.compact

  response = @http_client.post(
    path: path,
    body_params: pnp_messages_request,
    headers: header_params
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 422
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 422, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#push_templated_messages_by_phone(pnp_templated_message_request:, x_line_delivery_tag: nil) ⇒ String, ...

Send LINE notification message (template) This requests to POST https://api.line.me/v2/bot/message/pnp/templated/push When you want to get HTTP status code or response headers, use {#push_templated_messages_by_phone_with_http_info} instead of this.

Parameters:

  • pnp_templated_message_request (PnpTemplatedMessageRequest)
  • x_line_delivery_tag (String, nil) (defaults to: nil) —

    String returned in the delivery.data property of the delivery completion event via Webhook.

Returns:

  • (String, nil) —

    when HTTP status code is 202

  • (Line::Bot::V2::MessagingApi::ErrorResponse) —

    when HTTP status code is 422

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3040

def push_templated_messages_by_phone(
  pnp_templated_message_request:,
  x_line_delivery_tag: nil
)
  response_body, _status_code, _headers = push_templated_messages_by_phone_with_http_info(
    pnp_templated_message_request: pnp_templated_message_request,
    x_line_delivery_tag: x_line_delivery_tag
  )

  response_body
end

#push_templated_messages_by_phone_with_http_info(pnp_templated_message_request:, x_line_delivery_tag: nil) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Send LINE notification message (template) This requests to POST https://api.line.me/v2/bot/message/pnp/templated/push This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • pnp_templated_message_request (PnpTemplatedMessageRequest)
  • x_line_delivery_tag (String, nil) (defaults to: nil) —

    String returned in the delivery.data property of the delivery completion event via Webhook.

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 202

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})) —

    when HTTP status code is 422

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3000

def push_templated_messages_by_phone_with_http_info( 
  pnp_templated_message_request:, 
  x_line_delivery_tag: nil
)
  path = "/v2/bot/message/pnp/templated/push"
  header_params = {
    "X-Line-Delivery-Tag": x_line_delivery_tag
  }.compact

  response = @http_client.post(
    path: path,
    body_params: pnp_templated_message_request,
    headers: header_params
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  when 422
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 422, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#reply_message(reply_message_request:) ⇒ Line::Bot::V2::MessagingApi::ReplyMessageResponse, ...

Send reply message This requests to POST https://api.line.me/v2/bot/message/reply When you want to get HTTP status code or response headers, use {#reply_message_with_http_info} instead of this.

Parameters:

Returns:

See Also:



3109
3110
3111
3112
3113
3114
3115
3116
3117
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3109

def reply_message(
  reply_message_request:
)
  response_body, _status_code, _headers = reply_message_with_http_info(
    reply_message_request: reply_message_request
  )

  response_body
end

#reply_message_with_http_info(reply_message_request:) ⇒ Array(Line::Bot::V2::MessagingApi::ReplyMessageResponse, Integer, Hash{String => String}), ...

Send reply message This requests to POST https://api.line.me/v2/bot/message/reply This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

See Also:



3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3062

def reply_message_with_http_info( 
  reply_message_request:
)
  path = "/v2/bot/message/reply"

  response = @http_client.post(
    path: path,
    body_params: reply_message_request,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ReplyMessageResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#rich_menu_batch(rich_menu_batch_request:) ⇒ String?

You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu This requests to POST https://api.line.me/v2/bot/richmenu/batch When you want to get HTTP status code or response headers, use {#rich_menu_batch_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 202

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3153
3154
3155
3156
3157
3158
3159
3160
3161
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3153

def rich_menu_batch(
  rich_menu_batch_request:
)
  response_body, _status_code, _headers = rich_menu_batch_with_http_info(
    rich_menu_batch_request: rich_menu_batch_request
  )

  response_body
end

#rich_menu_batch_with_http_info(rich_menu_batch_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu This requests to POST https://api.line.me/v2/bot/richmenu/batch This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 202

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3127

def rich_menu_batch_with_http_info( 
  rich_menu_batch_request:
)
  path = "/v2/bot/richmenu/batch"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_batch_request,
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#set_default_rich_menu(rich_menu_id:) ⇒ String?

Set default rich menu This requests to POST https://api.line.me/v2/bot/user/all/richmenu/richMenuId When you want to get HTTP status code or response headers, use {#set_default_rich_menu_with_http_info} instead of this.

Parameters:

  • rich_menu_id (String) —

    ID of a rich menu

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3198
3199
3200
3201
3202
3203
3204
3205
3206
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3198

def set_default_rich_menu(
  rich_menu_id:
)
  response_body, _status_code, _headers = set_default_rich_menu_with_http_info(
    rich_menu_id: rich_menu_id
  )

  response_body
end

#set_default_rich_menu_with_http_info(rich_menu_id:) ⇒ Array((String|nil), Integer, Hash{String => String})

Set default rich menu This requests to POST https://api.line.me/v2/bot/user/all/richmenu/richMenuId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_id (String) —

    ID of a rich menu

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3171

def set_default_rich_menu_with_http_info( 
  rich_menu_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/all/richmenu/{richMenuId}", {
    "richMenuId": rich_menu_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#set_webhook_endpoint(set_webhook_endpoint_request:) ⇒ String?

Set webhook endpoint URL This requests to PUT https://api.line.me/v2/bot/channel/webhook/endpoint When you want to get HTTP status code or response headers, use {#set_webhook_endpoint_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3242
3243
3244
3245
3246
3247
3248
3249
3250
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3242

def set_webhook_endpoint(
  set_webhook_endpoint_request:
)
  response_body, _status_code, _headers = set_webhook_endpoint_with_http_info(
    set_webhook_endpoint_request: set_webhook_endpoint_request
  )

  response_body
end

#set_webhook_endpoint_with_http_info(set_webhook_endpoint_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Set webhook endpoint URL This requests to PUT https://api.line.me/v2/bot/channel/webhook/endpoint This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3216

def set_webhook_endpoint_with_http_info( 
  set_webhook_endpoint_request:
)
  path = "/v2/bot/channel/webhook/endpoint"

  response = @http_client.put(
    path: path,
    body_params: set_webhook_endpoint_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#show_loading_animation(show_loading_animation_request:) ⇒ String, ...

Display a loading animation in one-on-one chats between users and LINE Official Accounts. This requests to POST https://api.line.me/v2/bot/chat/loading/start When you want to get HTTP status code or response headers, use {#show_loading_animation_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 202

  • (Line::Bot::V2::MessagingApi::ErrorResponse) —

    when HTTP status code is 400

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3295
3296
3297
3298
3299
3300
3301
3302
3303
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3295

def show_loading_animation(
  show_loading_animation_request:
)
  response_body, _status_code, _headers = show_loading_animation_with_http_info(
    show_loading_animation_request: show_loading_animation_request
  )

  response_body
end

#show_loading_animation_with_http_info(show_loading_animation_request:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Display a loading animation in one-on-one chats between users and LINE Official Accounts. This requests to POST https://api.line.me/v2/bot/chat/loading/start This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 202

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})) —

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3261

def show_loading_animation_with_http_info( 
  show_loading_animation_request:
)
  path = "/v2/bot/chat/loading/start"

  response = @http_client.post(
    path: path,
    body_params: show_loading_animation_request,
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#test_webhook_endpoint(test_webhook_endpoint_request: nil) ⇒ Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse, ...

Test webhook endpoint This requests to POST https://api.line.me/v2/bot/channel/webhook/test When you want to get HTTP status code or response headers, use {#test_webhook_endpoint_with_http_info} instead of this.

Parameters:

Returns:

See Also:



3344
3345
3346
3347
3348
3349
3350
3351
3352
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3344

def test_webhook_endpoint(
  test_webhook_endpoint_request: nil
)
  response_body, _status_code, _headers = test_webhook_endpoint_with_http_info(
    test_webhook_endpoint_request: test_webhook_endpoint_request
  )

  response_body
end

#test_webhook_endpoint_with_http_info(test_webhook_endpoint_request: nil) ⇒ Array(Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Test webhook endpoint This requests to POST https://api.line.me/v2/bot/channel/webhook/test This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

See Also:



3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3313

def test_webhook_endpoint_with_http_info( 
  test_webhook_endpoint_request: nil
)
  path = "/v2/bot/channel/webhook/test"

  response = @http_client.post(
    path: path,
    body_params: test_webhook_endpoint_request,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Unlink rich menu from user This requests to DELETE https://api.line.me/v2/bot/user/userId/richmenu When you want to get HTTP status code or response headers, use {#unlink_rich_menu_id_from_user_with_http_info} instead of this.

Parameters:

  • user_id (String) —

    User ID. Found in the source object of webhook event objects. Do not use the LINE ID used in LINE.

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3389
3390
3391
3392
3393
3394
3395
3396
3397
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3389

def unlink_rich_menu_id_from_user(
  user_id:
)
  response_body, _status_code, _headers = unlink_rich_menu_id_from_user_with_http_info(
    user_id: user_id
  )

  response_body
end

Unlink rich menu from user This requests to DELETE https://api.line.me/v2/bot/user/userId/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String) —

    User ID. Found in the source object of webhook event objects. Do not use the LINE ID used in LINE.

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3362

def unlink_rich_menu_id_from_user_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/{userId}/richmenu", {
    "userId": user_id
  })

  response = @http_client.delete(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Unlink rich menus from multiple users This requests to POST https://api.line.me/v2/bot/richmenu/bulk/unlink When you want to get HTTP status code or response headers, use {#unlink_rich_menu_id_from_users_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 202

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3433
3434
3435
3436
3437
3438
3439
3440
3441
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3433

def unlink_rich_menu_id_from_users(
  rich_menu_bulk_unlink_request:
)
  response_body, _status_code, _headers = unlink_rich_menu_id_from_users_with_http_info(
    rich_menu_bulk_unlink_request: rich_menu_bulk_unlink_request
  )

  response_body
end

Unlink rich menus from multiple users This requests to POST https://api.line.me/v2/bot/richmenu/bulk/unlink This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 202

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3407

def unlink_rich_menu_id_from_users_with_http_info( 
  rich_menu_bulk_unlink_request:
)
  path = "/v2/bot/richmenu/bulk/unlink"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_bulk_unlink_request,
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#update_rich_menu_alias(rich_menu_alias_id:, update_rich_menu_alias_request:) ⇒ String, ...

Update rich menu alias This requests to POST https://api.line.me/v2/bot/richmenu/alias/richMenuAliasId When you want to get HTTP status code or response headers, use {#update_rich_menu_alias_with_http_info} instead of this.

Parameters:

  • rich_menu_alias_id (String) —

    The rich menu alias ID you want to update.

  • update_rich_menu_alias_request (UpdateRichMenuAliasRequest)

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse) —

    when HTTP status code is 400

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3491

def update_rich_menu_alias(
  rich_menu_alias_id:,
  update_rich_menu_alias_request:
)
  response_body, _status_code, _headers = update_rich_menu_alias_with_http_info(
    rich_menu_alias_id: rich_menu_alias_id,
    update_rich_menu_alias_request: update_rich_menu_alias_request
  )

  response_body
end

#update_rich_menu_alias_with_http_info(rich_menu_alias_id:, update_rich_menu_alias_request:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Update rich menu alias This requests to POST https://api.line.me/v2/bot/richmenu/alias/richMenuAliasId This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_alias_id (String) —

    The rich menu alias ID you want to update.

  • update_rich_menu_alias_request (UpdateRichMenuAliasRequest)

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})) —

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3453

def update_rich_menu_alias_with_http_info( 
  rich_menu_alias_id:, 
  update_rich_menu_alias_request:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/alias/{richMenuAliasId}", {
    "richMenuAliasId": rich_menu_alias_id
  })

  response = @http_client.post(
    path: path,
    body_params: update_rich_menu_alias_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_broadcast(validate_message_request:) ⇒ String?

Validate message objects of a broadcast message This requests to POST https://api.line.me/v2/bot/message/validate/broadcast When you want to get HTTP status code or response headers, use {#validate_broadcast_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3537
3538
3539
3540
3541
3542
3543
3544
3545
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3537

def validate_broadcast(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_broadcast_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_broadcast_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a broadcast message This requests to POST https://api.line.me/v2/bot/message/validate/broadcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3511

def validate_broadcast_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/broadcast"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_multicast(validate_message_request:) ⇒ String?

Validate message objects of a multicast message This requests to POST https://api.line.me/v2/bot/message/validate/multicast When you want to get HTTP status code or response headers, use {#validate_multicast_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3581
3582
3583
3584
3585
3586
3587
3588
3589
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3581

def validate_multicast(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_multicast_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_multicast_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a multicast message This requests to POST https://api.line.me/v2/bot/message/validate/multicast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3555

def validate_multicast_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/multicast"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_narrowcast(validate_message_request:) ⇒ String?

Validate message objects of a narrowcast message This requests to POST https://api.line.me/v2/bot/message/validate/narrowcast When you want to get HTTP status code or response headers, use {#validate_narrowcast_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3625
3626
3627
3628
3629
3630
3631
3632
3633
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3625

def validate_narrowcast(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_narrowcast_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_narrowcast_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a narrowcast message This requests to POST https://api.line.me/v2/bot/message/validate/narrowcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3599

def validate_narrowcast_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/narrowcast"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_push(validate_message_request:) ⇒ String?

Validate message objects of a push message This requests to POST https://api.line.me/v2/bot/message/validate/push When you want to get HTTP status code or response headers, use {#validate_push_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3669
3670
3671
3672
3673
3674
3675
3676
3677
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3669

def validate_push(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_push_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_push_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a push message This requests to POST https://api.line.me/v2/bot/message/validate/push This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3643

def validate_push_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/push"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_reply(validate_message_request:) ⇒ String?

Validate message objects of a reply message This requests to POST https://api.line.me/v2/bot/message/validate/reply When you want to get HTTP status code or response headers, use {#validate_reply_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3713
3714
3715
3716
3717
3718
3719
3720
3721
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3713

def validate_reply(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_reply_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_reply_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a reply message This requests to POST https://api.line.me/v2/bot/message/validate/reply This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3687

def validate_reply_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/reply"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_rich_menu_batch_request(rich_menu_batch_request:) ⇒ String?

Validate a request body of the Replace or unlink the linked rich menus in batches endpoint. This requests to POST https://api.line.me/v2/bot/richmenu/validate/batch When you want to get HTTP status code or response headers, use {#validate_rich_menu_batch_request_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3757
3758
3759
3760
3761
3762
3763
3764
3765
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3757

def validate_rich_menu_batch_request(
  rich_menu_batch_request:
)
  response_body, _status_code, _headers = validate_rich_menu_batch_request_with_http_info(
    rich_menu_batch_request: rich_menu_batch_request
  )

  response_body
end

#validate_rich_menu_batch_request_with_http_info(rich_menu_batch_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate a request body of the Replace or unlink the linked rich menus in batches endpoint. This requests to POST https://api.line.me/v2/bot/richmenu/validate/batch This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3731

def validate_rich_menu_batch_request_with_http_info( 
  rich_menu_batch_request:
)
  path = "/v2/bot/richmenu/validate/batch"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_batch_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_rich_menu_object(rich_menu_request:) ⇒ String?

Validate rich menu object This requests to POST https://api.line.me/v2/bot/richmenu/validate When you want to get HTTP status code or response headers, use {#validate_rich_menu_object_with_http_info} instead of this.

Parameters:

Returns:

  • (String, nil) —

    when HTTP status code is 200

  • (String, nil) —

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3801
3802
3803
3804
3805
3806
3807
3808
3809
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3801

def validate_rich_menu_object(
  rich_menu_request:
)
  response_body, _status_code, _headers = validate_rich_menu_object_with_http_info(
    rich_menu_request: rich_menu_request
  )

  response_body
end

#validate_rich_menu_object_with_http_info(rich_menu_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate rich menu object This requests to POST https://api.line.me/v2/bot/richmenu/validate This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String})) —

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String})) —

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3775

def validate_rich_menu_object_with_http_info( 
  rich_menu_request:
)
  path = "/v2/bot/richmenu/validate"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end