karaden-prg-ruby 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.devcontainer/devcontainer.json +45 -0
- data/.devcontainer/docker/ruby/Dockerfile +30 -0
- data/.devcontainer/docker-compose.yml +16 -0
- data/.rspec +3 -0
- data/.rubocop.yml +29 -0
- data/.vscode/launch.json +32 -0
- data/Gemfile +6 -0
- data/LICENSE +21 -0
- data/README.md +44 -0
- data/Rakefile +8 -0
- data/lib/karaden/config.rb +78 -0
- data/lib/karaden/exception/bad_request_exception.rb +10 -0
- data/lib/karaden/exception/forbidden_exception.rb +10 -0
- data/lib/karaden/exception/invalid_params_exception.rb +9 -0
- data/lib/karaden/exception/invalid_request_options_exception.rb +9 -0
- data/lib/karaden/exception/karaden_exception.rb +15 -0
- data/lib/karaden/exception/not_found_exception.rb +10 -0
- data/lib/karaden/exception/too_many_requests_exception.rb +10 -0
- data/lib/karaden/exception/unauthorized_exception.rb +10 -0
- data/lib/karaden/exception/unexpected_value_exception.rb +9 -0
- data/lib/karaden/exception/unknown_error_exception.rb +9 -0
- data/lib/karaden/exception/unprocessable_entity_exception.rb +10 -0
- data/lib/karaden/model/collection.rb +15 -0
- data/lib/karaden/model/error.rb +19 -0
- data/lib/karaden/model/karaden_object.rb +31 -0
- data/lib/karaden/model/message.rb +130 -0
- data/lib/karaden/model/requestable.rb +22 -0
- data/lib/karaden/net/requestor.rb +55 -0
- data/lib/karaden/net/requestor_interface.rb +9 -0
- data/lib/karaden/net/response.rb +71 -0
- data/lib/karaden/net/response_interface.rb +17 -0
- data/lib/karaden/param/message/message_cancel_params.rb +70 -0
- data/lib/karaden/param/message/message_create_params.rb +152 -0
- data/lib/karaden/param/message/message_detail_params.rb +70 -0
- data/lib/karaden/param/message/message_list_params.rb +106 -0
- data/lib/karaden/param/message/message_params.rb +12 -0
- data/lib/karaden/request_options.rb +153 -0
- data/lib/karaden/utility.rb +35 -0
- data/lib/karaden.rb +36 -0
- data/mock/2023-01-01.yaml +776 -0
- data/mock/latest +1 -0
- data/package-lock.json +3474 -0
- data/package.json +21 -0
- data/sig/karaden.rbs +0 -0
- metadata +178 -0
@@ -0,0 +1,776 @@
|
|
1
|
+
openapi: 3.0.3
|
2
|
+
x-stoplight:
|
3
|
+
id: 86da2euinng2g
|
4
|
+
info:
|
5
|
+
title: Karaden API
|
6
|
+
description: This is a Karaden API based on the OpenAPI 3.0 specification.
|
7
|
+
version: '2023-01-01'
|
8
|
+
servers:
|
9
|
+
- url: 'http://localhost/api'
|
10
|
+
- url: 'https://dev.cpaas-karaden.com/api'
|
11
|
+
components:
|
12
|
+
securitySchemes:
|
13
|
+
Bearer:
|
14
|
+
type: http
|
15
|
+
scheme: bearer
|
16
|
+
description: APIにアクセスするためのアクセストークンです。
|
17
|
+
schemas:
|
18
|
+
Message:
|
19
|
+
type: object
|
20
|
+
x-internal: true
|
21
|
+
description: ''
|
22
|
+
title: メッセージ
|
23
|
+
x-examples:
|
24
|
+
example-1:
|
25
|
+
id: 82bdf9de-a532-4bf5-86bc-c9a1366e5f4a
|
26
|
+
object: message
|
27
|
+
service_id: 1
|
28
|
+
billing_address_id: 1
|
29
|
+
to: '09012345678'
|
30
|
+
body: 本文
|
31
|
+
tags:
|
32
|
+
- string
|
33
|
+
is_shorten: true
|
34
|
+
result: done
|
35
|
+
status: done
|
36
|
+
sent_result: none
|
37
|
+
carrier: docomo
|
38
|
+
charged_count_per_sent: 0
|
39
|
+
scheduled_at: '2020-01-31T23:59:59+09:00'
|
40
|
+
limited_at: '2020-01-31T23:59:59+09:00'
|
41
|
+
sent_at: '2020-01-31T23:59:59+09:00'
|
42
|
+
received_at: '2020-01-31T23:59:59+09:00'
|
43
|
+
charged_at: '2020-01-31T23:59:59+09:00'
|
44
|
+
created_at: '2020-01-31T23:59:59+09:00'
|
45
|
+
updated_at: '2020-01-31T23:59:59+09:00'
|
46
|
+
properties:
|
47
|
+
id:
|
48
|
+
type: string
|
49
|
+
example: 82bdf9de-a532-4bf5-86bc-c9a1366e5f4a
|
50
|
+
description: メッセージID
|
51
|
+
format: uuid
|
52
|
+
readOnly: true
|
53
|
+
object:
|
54
|
+
type: string
|
55
|
+
default: message
|
56
|
+
example: message
|
57
|
+
description: オブジェクトの型
|
58
|
+
enum:
|
59
|
+
- message
|
60
|
+
readOnly: true
|
61
|
+
service_id:
|
62
|
+
type: integer
|
63
|
+
example: 1
|
64
|
+
description: サービス設定ID
|
65
|
+
billing_address_id:
|
66
|
+
type: integer
|
67
|
+
description: 請求先ID
|
68
|
+
example: 1
|
69
|
+
readOnly: true
|
70
|
+
to:
|
71
|
+
type: string
|
72
|
+
example: '09012345678'
|
73
|
+
description: 送信先電話番号
|
74
|
+
pattern: '^[0-9]{11}$'
|
75
|
+
body:
|
76
|
+
type: string
|
77
|
+
example: 本文
|
78
|
+
description: 本文
|
79
|
+
tags:
|
80
|
+
type: array
|
81
|
+
description: タグ
|
82
|
+
items:
|
83
|
+
type: string
|
84
|
+
readOnly: true
|
85
|
+
'tags[]':
|
86
|
+
type: array
|
87
|
+
description: |
|
88
|
+
タグ
|
89
|
+
items:
|
90
|
+
type: string
|
91
|
+
writeOnly: true
|
92
|
+
is_shorten:
|
93
|
+
type: boolean
|
94
|
+
description: 短縮URL
|
95
|
+
result:
|
96
|
+
type: string
|
97
|
+
enum:
|
98
|
+
- done
|
99
|
+
- processing
|
100
|
+
description: 結果
|
101
|
+
readOnly: true
|
102
|
+
status:
|
103
|
+
type: string
|
104
|
+
enum:
|
105
|
+
- done
|
106
|
+
- waiting
|
107
|
+
- error
|
108
|
+
- canceled
|
109
|
+
description: 状態
|
110
|
+
readOnly: true
|
111
|
+
sent_result:
|
112
|
+
type: string
|
113
|
+
enum:
|
114
|
+
- none
|
115
|
+
- received
|
116
|
+
- unconnected
|
117
|
+
- error
|
118
|
+
- unknown
|
119
|
+
description: 送達結果
|
120
|
+
readOnly: true
|
121
|
+
carrier:
|
122
|
+
type: string
|
123
|
+
enum:
|
124
|
+
- docomo
|
125
|
+
- softbank
|
126
|
+
- au
|
127
|
+
- rakuten
|
128
|
+
- checking
|
129
|
+
- unknown
|
130
|
+
description: キャリア
|
131
|
+
readOnly: true
|
132
|
+
charged_count_per_sent:
|
133
|
+
type: integer
|
134
|
+
description: 課金対象通数
|
135
|
+
example: 1
|
136
|
+
readOnly: true
|
137
|
+
scheduled_at:
|
138
|
+
type: string
|
139
|
+
example: '2020-01-31T23:59:59+09:00'
|
140
|
+
description: 送信予定日時<br>(ISO 8601形式)
|
141
|
+
format: date-time
|
142
|
+
limited_at:
|
143
|
+
example: '2020-01-31T23:59:59+09:00'
|
144
|
+
description: 送信限度日時<br>(ISO 8601形式)
|
145
|
+
format: date-time
|
146
|
+
type: string
|
147
|
+
sent_at:
|
148
|
+
type: string
|
149
|
+
example: '2020-01-31T23:59:59+09:00'
|
150
|
+
description: 送信日時<br>(ISO 8601形式)
|
151
|
+
format: date-time
|
152
|
+
readOnly: true
|
153
|
+
received_at:
|
154
|
+
type: string
|
155
|
+
example: '2020-01-31T23:59:59+09:00'
|
156
|
+
description: 着信日時<br>(ISO 8601形式)
|
157
|
+
format: date-time
|
158
|
+
readOnly: true
|
159
|
+
charged_at:
|
160
|
+
type: string
|
161
|
+
example: '2020-01-31T23:59:59+09:00'
|
162
|
+
description: 課金確定日時<br>(ISO 8601形式)
|
163
|
+
format: date-time
|
164
|
+
readOnly: true
|
165
|
+
created_at:
|
166
|
+
type: string
|
167
|
+
example: '2020-01-31T23:59:59+09:00'
|
168
|
+
description: 受付日時<br>(ISO 8601形式)
|
169
|
+
format: date-time
|
170
|
+
readOnly: true
|
171
|
+
updated_at:
|
172
|
+
type: string
|
173
|
+
description: 更新日時<br>(ISO 8601形式)
|
174
|
+
format: date-time
|
175
|
+
example: '2020-01-31T23:59:59+09:00'
|
176
|
+
readOnly: true
|
177
|
+
required:
|
178
|
+
- service_id
|
179
|
+
- to
|
180
|
+
- body
|
181
|
+
SentMessage:
|
182
|
+
type: object
|
183
|
+
x-internal: true
|
184
|
+
description: ''
|
185
|
+
title: メッセージ
|
186
|
+
x-examples:
|
187
|
+
example-1:
|
188
|
+
id: 82bdf9de-a532-4bf5-86bc-c9a1366e5f4a
|
189
|
+
object: message
|
190
|
+
service_id: 1
|
191
|
+
billing_address_id: 1
|
192
|
+
to: '09012345678'
|
193
|
+
body: 本文
|
194
|
+
tags:
|
195
|
+
- string
|
196
|
+
is_shorten: true
|
197
|
+
result: done
|
198
|
+
status: done
|
199
|
+
sent_result: none
|
200
|
+
carrier: docomo
|
201
|
+
charged_count_per_sent: 0
|
202
|
+
scheduled_at: '2020-01-31T23:59:59+09:00'
|
203
|
+
limited_at: '2020-01-31T23:59:59+09:00'
|
204
|
+
sent_at: '2020-01-31T23:59:59+09:00'
|
205
|
+
received_at: '2020-01-31T23:59:59+09:00'
|
206
|
+
charged_at: '2020-01-31T23:59:59+09:00'
|
207
|
+
created_at: '2020-01-31T23:59:59+09:00'
|
208
|
+
updated_at: '2020-01-31T23:59:59+09:00'
|
209
|
+
properties:
|
210
|
+
id:
|
211
|
+
type: string
|
212
|
+
example: 82bdf9de-a532-4bf5-86bc-c9a1366e5f4a
|
213
|
+
description: メッセージID
|
214
|
+
format: uuid
|
215
|
+
object:
|
216
|
+
type: string
|
217
|
+
default: message
|
218
|
+
example: message
|
219
|
+
description: オブジェクトの型
|
220
|
+
enum:
|
221
|
+
- message
|
222
|
+
service_id:
|
223
|
+
type: integer
|
224
|
+
example: 1
|
225
|
+
description: サービス設定ID
|
226
|
+
billing_address_id:
|
227
|
+
type: integer
|
228
|
+
description: 請求先ID
|
229
|
+
example: 1
|
230
|
+
to:
|
231
|
+
type: string
|
232
|
+
example: '09012345678'
|
233
|
+
description: 送信先電話番号
|
234
|
+
pattern: '^[0-9]{11}$'
|
235
|
+
readOnly: true
|
236
|
+
body:
|
237
|
+
type: string
|
238
|
+
example: 本文
|
239
|
+
description: 本文
|
240
|
+
readOnly: true
|
241
|
+
tags:
|
242
|
+
type: array
|
243
|
+
description: タグ
|
244
|
+
items:
|
245
|
+
type: string
|
246
|
+
is_shorten:
|
247
|
+
type: boolean
|
248
|
+
description: 短縮URL
|
249
|
+
result:
|
250
|
+
type: string
|
251
|
+
enum:
|
252
|
+
- done
|
253
|
+
- processing
|
254
|
+
description: 結果
|
255
|
+
status:
|
256
|
+
type: string
|
257
|
+
enum:
|
258
|
+
- done
|
259
|
+
- waiting
|
260
|
+
- error
|
261
|
+
- canceled
|
262
|
+
description: 状態
|
263
|
+
sent_result:
|
264
|
+
type: string
|
265
|
+
enum:
|
266
|
+
- none
|
267
|
+
- received
|
268
|
+
- unconnected
|
269
|
+
- error
|
270
|
+
- unknown
|
271
|
+
description: 送達結果
|
272
|
+
carrier:
|
273
|
+
type: string
|
274
|
+
enum:
|
275
|
+
- docomo
|
276
|
+
- softbank
|
277
|
+
- au
|
278
|
+
- rakuten
|
279
|
+
- checking
|
280
|
+
- unknown
|
281
|
+
description: キャリア
|
282
|
+
charged_count_per_sent:
|
283
|
+
type: integer
|
284
|
+
description: 課金対象通数
|
285
|
+
example: 1
|
286
|
+
scheduled_at:
|
287
|
+
type: string
|
288
|
+
example: '2020-01-31T23:59:59+09:00'
|
289
|
+
description: 送信予定日時<br>(ISO 8601形式)
|
290
|
+
format: date-time
|
291
|
+
limited_at:
|
292
|
+
example: '2020-01-31T23:59:59+09:00'
|
293
|
+
description: 送信限度日時<br>(ISO 8601形式)
|
294
|
+
format: date-time
|
295
|
+
type: string
|
296
|
+
sent_at:
|
297
|
+
type: string
|
298
|
+
example: '2020-01-31T23:59:59+09:00'
|
299
|
+
description: 送信日時<br>(ISO 8601形式)
|
300
|
+
format: date-time
|
301
|
+
received_at:
|
302
|
+
type: string
|
303
|
+
example: '2020-01-31T23:59:59+09:00'
|
304
|
+
description: 着信日時<br>(ISO 8601形式)
|
305
|
+
format: date-time
|
306
|
+
charged_at:
|
307
|
+
type: string
|
308
|
+
example: '2020-01-31T23:59:59+09:00'
|
309
|
+
description: 課金確定日時<br>(ISO 8601形式)
|
310
|
+
format: date-time
|
311
|
+
created_at:
|
312
|
+
type: string
|
313
|
+
example: '2020-01-31T23:59:59+09:00'
|
314
|
+
description: 受付日時<br>(ISO 8601形式)
|
315
|
+
format: date-time
|
316
|
+
updated_at:
|
317
|
+
type: string
|
318
|
+
description: 更新日時<br>(ISO 8601形式)
|
319
|
+
readOnly: true
|
320
|
+
required:
|
321
|
+
- id
|
322
|
+
- object
|
323
|
+
- service_id
|
324
|
+
- billing_address_id
|
325
|
+
- to
|
326
|
+
- body
|
327
|
+
- result
|
328
|
+
- status
|
329
|
+
- sent_result
|
330
|
+
- carrier
|
331
|
+
- charged_count_per_sent
|
332
|
+
- created_at
|
333
|
+
- updated_at
|
334
|
+
Error:
|
335
|
+
type: object
|
336
|
+
x-internal: true
|
337
|
+
x-examples:
|
338
|
+
validation_error:
|
339
|
+
object: error
|
340
|
+
code: validation_error
|
341
|
+
message: バリデーションエラーが発生しました
|
342
|
+
errors:
|
343
|
+
key:
|
344
|
+
- エラー詳細1
|
345
|
+
- エラー詳細2
|
346
|
+
title: エラー
|
347
|
+
properties:
|
348
|
+
object:
|
349
|
+
type: string
|
350
|
+
default: error
|
351
|
+
example: error
|
352
|
+
description: オブジェクトの型
|
353
|
+
enum:
|
354
|
+
- error
|
355
|
+
readOnly: true
|
356
|
+
code:
|
357
|
+
type: string
|
358
|
+
description: エラーコード
|
359
|
+
enum:
|
360
|
+
- unauthentication
|
361
|
+
- invalid_tenant
|
362
|
+
- model_not_found
|
363
|
+
- validation_error
|
364
|
+
- can_not_cancel_message
|
365
|
+
- unknown
|
366
|
+
readOnly: true
|
367
|
+
message:
|
368
|
+
type: string
|
369
|
+
description: エラーメッセージ
|
370
|
+
readOnly: true
|
371
|
+
errors:
|
372
|
+
type: object
|
373
|
+
example:
|
374
|
+
key:
|
375
|
+
- エラー詳細1
|
376
|
+
- エラー詳細2
|
377
|
+
description: |-
|
378
|
+
エラーの詳細をエラーが発生したリソースのプロパティ毎に返します。<br />
|
379
|
+
オブジェクトのプロパティ名は、エラーが発生したリソースのプロパティ名です。<br />
|
380
|
+
オブジェクトの値は、発生したすべてのエラーメッセージ(配列)です。
|
381
|
+
readOnly: true
|
382
|
+
required:
|
383
|
+
- object
|
384
|
+
- code
|
385
|
+
- message
|
386
|
+
parameters:
|
387
|
+
ApiVersion:
|
388
|
+
name: Karaden-Version
|
389
|
+
in: header
|
390
|
+
schema:
|
391
|
+
type: string
|
392
|
+
default: '2023-01-01'
|
393
|
+
example: '2023-01-01'
|
394
|
+
description: APIバージョン<br />指定されない場合、空電で管理するAPIバージョンで処理されます。
|
395
|
+
TenantId:
|
396
|
+
name: tenant_id
|
397
|
+
in: path
|
398
|
+
required: true
|
399
|
+
schema:
|
400
|
+
type: string
|
401
|
+
format: uuid
|
402
|
+
description: テナントID
|
403
|
+
MessageId:
|
404
|
+
name: message_id
|
405
|
+
in: path
|
406
|
+
required: true
|
407
|
+
schema:
|
408
|
+
type: string
|
409
|
+
format: uuid
|
410
|
+
description: メッセージID
|
411
|
+
Page:
|
412
|
+
name: page
|
413
|
+
in: query
|
414
|
+
required: false
|
415
|
+
schema:
|
416
|
+
type: integer
|
417
|
+
example: 1
|
418
|
+
description: ページ
|
419
|
+
PerPage:
|
420
|
+
name: per_page
|
421
|
+
in: query
|
422
|
+
required: false
|
423
|
+
schema:
|
424
|
+
type: integer
|
425
|
+
default: 20
|
426
|
+
maximum: 100
|
427
|
+
description: 1ページあたりの取得件数<br>最大100まで
|
428
|
+
Status:
|
429
|
+
name: status
|
430
|
+
in: query
|
431
|
+
schema:
|
432
|
+
type: string
|
433
|
+
enum:
|
434
|
+
- done
|
435
|
+
- waiting
|
436
|
+
- error
|
437
|
+
- canceled
|
438
|
+
description: '状態<br>done: 送信済<br>waiting: 送信待ち<br>error: 送信エラー<br>canceled: 送信キャンセル'
|
439
|
+
Result:
|
440
|
+
name: result
|
441
|
+
in: query
|
442
|
+
required: false
|
443
|
+
schema:
|
444
|
+
type: string
|
445
|
+
enum:
|
446
|
+
- done
|
447
|
+
- processing
|
448
|
+
description: '結果<br>done: 完了<br>processing: 処理中'
|
449
|
+
SentResult:
|
450
|
+
name: sent_result
|
451
|
+
in: query
|
452
|
+
schema:
|
453
|
+
type: string
|
454
|
+
enum:
|
455
|
+
- none
|
456
|
+
- received
|
457
|
+
- unconnected
|
458
|
+
- error
|
459
|
+
- unknown
|
460
|
+
description: '送達結果<br>none: 送達結果なし<br>received: 着信済<br>unconnected: 圏外<br>error: エラー<br>unknown: 不明'
|
461
|
+
security:
|
462
|
+
- Bearer: []
|
463
|
+
paths:
|
464
|
+
'/{tenant_id}/messages':
|
465
|
+
post:
|
466
|
+
tags:
|
467
|
+
- メッセージ
|
468
|
+
summary: メッセージ送信
|
469
|
+
description: メッセージ送信する
|
470
|
+
operationId: post-tenant_id-messages-message_id
|
471
|
+
consumes:
|
472
|
+
- application/x-www-form-urlencoded
|
473
|
+
produces:
|
474
|
+
- application/json
|
475
|
+
parameters:
|
476
|
+
- $ref: '#/components/parameters/ApiVersion'
|
477
|
+
responses:
|
478
|
+
'200':
|
479
|
+
description: 正常
|
480
|
+
content:
|
481
|
+
application/json:
|
482
|
+
schema:
|
483
|
+
$ref: '#/components/schemas/Message'
|
484
|
+
examples:
|
485
|
+
example-1:
|
486
|
+
value:
|
487
|
+
id: 82bdf9de-a532-4bf5-86bc-c9a1366e5f4a
|
488
|
+
object: message
|
489
|
+
service_id: 1
|
490
|
+
billing_address_id: 1
|
491
|
+
to: '09012345678'
|
492
|
+
body: 本文
|
493
|
+
tags:
|
494
|
+
- string
|
495
|
+
is_shorten: true
|
496
|
+
result: done
|
497
|
+
status: done
|
498
|
+
sent_result: none
|
499
|
+
carrier: docomo
|
500
|
+
charged_count_per_sent: 0
|
501
|
+
scheduled_at: '2020-01-31T23:59:59+09:00'
|
502
|
+
limited_at: '2020-01-31T23:59:59+09:00'
|
503
|
+
sent_at: '2020-01-31T23:59:59+09:00'
|
504
|
+
received_at: '2020-01-31T23:59:59+09:00'
|
505
|
+
charged_at: '2020-01-31T23:59:59+09:00'
|
506
|
+
created_at: '2020-01-31T23:59:59+09:00'
|
507
|
+
updated_at: '2020-01-31T23:59:59+09:00'
|
508
|
+
'400':
|
509
|
+
description: Bad Request
|
510
|
+
content:
|
511
|
+
application/json:
|
512
|
+
schema:
|
513
|
+
$ref: '#/components/schemas/Error'
|
514
|
+
examples:
|
515
|
+
invalid_tenant:
|
516
|
+
value:
|
517
|
+
object: error
|
518
|
+
code: invalid_tenant
|
519
|
+
message: 不正なテナントIDが指定されています
|
520
|
+
errors: null
|
521
|
+
invalid_version:
|
522
|
+
value:
|
523
|
+
object: error
|
524
|
+
code: invalid_version
|
525
|
+
message: 不正なバージョンが指定されています
|
526
|
+
errors: null
|
527
|
+
'401':
|
528
|
+
description: Unauthorized
|
529
|
+
content:
|
530
|
+
application/json:
|
531
|
+
schema:
|
532
|
+
$ref: '#/components/schemas/Error'
|
533
|
+
examples:
|
534
|
+
unauthentication:
|
535
|
+
value:
|
536
|
+
object: error
|
537
|
+
code: unauthentication
|
538
|
+
message: 認証に失敗しました、指定されているトークンは利用できません
|
539
|
+
errors: null
|
540
|
+
'404':
|
541
|
+
description: Not Found
|
542
|
+
content:
|
543
|
+
application/json:
|
544
|
+
schema:
|
545
|
+
$ref: '#/components/schemas/Error'
|
546
|
+
examples:
|
547
|
+
model_not_found:
|
548
|
+
value:
|
549
|
+
object: error
|
550
|
+
code: model_not_found
|
551
|
+
message: 対象となるモデルが見つかりませんでした、または指定されたトークンでは操作できない可能性があります。
|
552
|
+
errors: null
|
553
|
+
'422':
|
554
|
+
description: Unprocessable Entity
|
555
|
+
content:
|
556
|
+
application/json:
|
557
|
+
schema:
|
558
|
+
$ref: '#/components/schemas/Error'
|
559
|
+
examples:
|
560
|
+
validation_error:
|
561
|
+
value:
|
562
|
+
object: error
|
563
|
+
code: validation_error
|
564
|
+
message: バリデーションエラーが発生しました
|
565
|
+
errors:
|
566
|
+
key:
|
567
|
+
- エラー詳細1
|
568
|
+
- エラー詳細2
|
569
|
+
'500':
|
570
|
+
description: Internal Server Error
|
571
|
+
content:
|
572
|
+
application/json:
|
573
|
+
schema:
|
574
|
+
$ref: '#/components/schemas/Error'
|
575
|
+
examples:
|
576
|
+
unknown:
|
577
|
+
value:
|
578
|
+
object: error
|
579
|
+
code: unknown
|
580
|
+
message: 不明なエラーが発生しました
|
581
|
+
errors: null
|
582
|
+
requestBody:
|
583
|
+
content:
|
584
|
+
application/x-www-form-urlencoded:
|
585
|
+
schema:
|
586
|
+
$ref: '#/components/schemas/Message'
|
587
|
+
examples:
|
588
|
+
example-1:
|
589
|
+
value:
|
590
|
+
id: 999
|
591
|
+
object: message
|
592
|
+
service_id: 999
|
593
|
+
to: 0
|
594
|
+
body: 本文
|
595
|
+
'tags[]':
|
596
|
+
- タグ1
|
597
|
+
- タグ2
|
598
|
+
scheduled_at: '2020-01-31T23:59:59+09:00'
|
599
|
+
encoding:
|
600
|
+
'tags[]':
|
601
|
+
style: form
|
602
|
+
explode: true
|
603
|
+
description: ''
|
604
|
+
get:
|
605
|
+
tags:
|
606
|
+
- メッセージ
|
607
|
+
summary: メッセージ取得(一覧)
|
608
|
+
description: メッセージ取得(一覧)する
|
609
|
+
operationId: get-tenant_id-messages
|
610
|
+
responses:
|
611
|
+
'200':
|
612
|
+
description: OK
|
613
|
+
content:
|
614
|
+
application/json:
|
615
|
+
schema:
|
616
|
+
type: object
|
617
|
+
properties:
|
618
|
+
object:
|
619
|
+
type: string
|
620
|
+
default: list
|
621
|
+
example: list
|
622
|
+
description: オブジェクトの型
|
623
|
+
readOnly: true
|
624
|
+
has_more:
|
625
|
+
type: boolean
|
626
|
+
data:
|
627
|
+
type: array
|
628
|
+
uniqueItems: true
|
629
|
+
description: 取得したデータ
|
630
|
+
items:
|
631
|
+
$ref: '#/components/schemas/Message'
|
632
|
+
readOnly: true
|
633
|
+
required:
|
634
|
+
- object
|
635
|
+
- has_more
|
636
|
+
- data
|
637
|
+
readOnly: true
|
638
|
+
examples:
|
639
|
+
example-1:
|
640
|
+
value:
|
641
|
+
object: list
|
642
|
+
has_more: true
|
643
|
+
data:
|
644
|
+
- id: 82bdf9de-a532-4bf5-86bc-c9a1366e5f4a
|
645
|
+
object: message
|
646
|
+
service_id: 1
|
647
|
+
billing_address_id: 1
|
648
|
+
to: '09012345678'
|
649
|
+
body: 本文
|
650
|
+
tags:
|
651
|
+
- string
|
652
|
+
is_shorten: true
|
653
|
+
result: done
|
654
|
+
status: done
|
655
|
+
sent_result: none
|
656
|
+
carrier: docomo
|
657
|
+
charged_count_per_sent: 0
|
658
|
+
scheduled_at: '2020-01-31T23:59:59+09:00'
|
659
|
+
limited_at: '2020-01-31T23:59:59+09:00'
|
660
|
+
sent_at: '2020-01-31T23:59:59+09:00'
|
661
|
+
received_at: '2020-01-31T23:59:59+09:00'
|
662
|
+
charged_at: '2020-01-31T23:59:59+09:00'
|
663
|
+
created_at: '2020-01-31T23:59:59+09:00'
|
664
|
+
updated_at: '2020-01-31T23:59:59+09:00'
|
665
|
+
parameters:
|
666
|
+
- $ref: '#/components/parameters/ApiVersion'
|
667
|
+
- schema:
|
668
|
+
type: integer
|
669
|
+
example: 1
|
670
|
+
in: query
|
671
|
+
name: service_id
|
672
|
+
description: サービス設定ID
|
673
|
+
- schema:
|
674
|
+
type: string
|
675
|
+
example: '09012345678'
|
676
|
+
in: query
|
677
|
+
name: to
|
678
|
+
description: 送信先番号
|
679
|
+
- $ref: '#/components/parameters/Status'
|
680
|
+
- $ref: '#/components/parameters/Result'
|
681
|
+
- $ref: '#/components/parameters/SentResult'
|
682
|
+
- schema:
|
683
|
+
type: string
|
684
|
+
in: query
|
685
|
+
name: tag
|
686
|
+
description: タグ
|
687
|
+
- schema:
|
688
|
+
type: string
|
689
|
+
format: date-time
|
690
|
+
example: '2020-01-31T23:59:59+09:00'
|
691
|
+
in: query
|
692
|
+
name: start_at
|
693
|
+
description: 受付日時(開始)<br>(ISO 8601形式)
|
694
|
+
- schema:
|
695
|
+
type: string
|
696
|
+
format: date-time
|
697
|
+
example: '2020-01-31T23:59:59+09:00'
|
698
|
+
in: query
|
699
|
+
name: end_at
|
700
|
+
description: 受付日時(終了)<br>(ISO 8601形式)
|
701
|
+
- $ref: '#/components/parameters/Page'
|
702
|
+
- $ref: '#/components/parameters/PerPage'
|
703
|
+
parameters:
|
704
|
+
- $ref: '#/components/parameters/TenantId'
|
705
|
+
'/{tenant_id}/messages/{message_id}':
|
706
|
+
get:
|
707
|
+
tags:
|
708
|
+
- メッセージ
|
709
|
+
summary: メッセージ取得(単体)
|
710
|
+
description: メッセージ取得(単体)する
|
711
|
+
operationId: get-tenant_id-messages-message_id
|
712
|
+
responses:
|
713
|
+
'200':
|
714
|
+
description: OK
|
715
|
+
content:
|
716
|
+
application/json:
|
717
|
+
schema:
|
718
|
+
$ref: '#/components/schemas/Message'
|
719
|
+
parameters:
|
720
|
+
- $ref: '#/components/parameters/ApiVersion'
|
721
|
+
parameters:
|
722
|
+
- $ref: '#/components/parameters/TenantId'
|
723
|
+
- $ref: '#/components/parameters/MessageId'
|
724
|
+
'/{tenant_id}/messages/{message_id}/cancel':
|
725
|
+
post:
|
726
|
+
tags:
|
727
|
+
- メッセージ
|
728
|
+
summary: メッセージ送信キャンセル
|
729
|
+
description: |-
|
730
|
+
メッセージ送信キャンセルする
|
731
|
+
メッセージは送信予約日時の5分前までキャンセル可能
|
732
|
+
operationId: post-tenant_id-messages-message_id-cancel
|
733
|
+
parameters:
|
734
|
+
- $ref: '#/components/parameters/ApiVersion'
|
735
|
+
responses:
|
736
|
+
'200':
|
737
|
+
description: OK
|
738
|
+
content:
|
739
|
+
application/json:
|
740
|
+
schema:
|
741
|
+
$ref: '#/components/schemas/Message'
|
742
|
+
'400':
|
743
|
+
description: Bad Request
|
744
|
+
content:
|
745
|
+
application/json:
|
746
|
+
schema:
|
747
|
+
$ref: '#/components/schemas/Error'
|
748
|
+
examples:
|
749
|
+
example-1:
|
750
|
+
value:
|
751
|
+
object: error
|
752
|
+
code: can_not_cancel_message
|
753
|
+
message: メッセージのキャンセルができません、予約投稿のメッセージは開始5分前までキャンセル可能です。
|
754
|
+
errors: null
|
755
|
+
parameters:
|
756
|
+
- $ref: '#/components/parameters/TenantId'
|
757
|
+
- $ref: '#/components/parameters/MessageId'
|
758
|
+
/callback/messages/test/sent:
|
759
|
+
post:
|
760
|
+
summary: メッセージ送達結果通知
|
761
|
+
operationId: post-callback-messages-test-sent
|
762
|
+
responses:
|
763
|
+
'200':
|
764
|
+
description: OK
|
765
|
+
description: メッセージを送信した後、serviceに指定されているエンドポイントへ送達結果を通知する
|
766
|
+
security: []
|
767
|
+
parameters:
|
768
|
+
- $ref: '#/components/parameters/ApiVersion'
|
769
|
+
tags:
|
770
|
+
- メッセージ
|
771
|
+
requestBody:
|
772
|
+
content:
|
773
|
+
application/json:
|
774
|
+
schema:
|
775
|
+
$ref: '#/components/schemas/SentMessage'
|
776
|
+
description: ''
|