Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 39 additions & 32 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,31 +169,7 @@ paths:
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalServerError'
post:
summary: Invoice を作成
tags:
- Invoice
operationId: postInvoice
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PostInvoiceRequest'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/PostInvoiceResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalServerError'

/webhook/invoice-paid:
post:
summary: Webhook の invoice.paid イベントを受け取る
Expand Down Expand Up @@ -370,6 +346,33 @@ paths:
$ref: '#/components/responses/Unauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
/me/invoices:
post:
summary: 現在の認証セッションに関連付けられた請求書を作成
tags:
- User
operationId: postMeInvoice
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostMeInvoiceRequest'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/PostMeInvoiceResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalServerError'
components:
securitySchemes:
EmailVerifiedSession:
Expand Down Expand Up @@ -534,19 +537,23 @@ components:
name:
type: string
description: 氏名
PostInvoiceRequest:
PostMeInvoiceRequest:
description: Invoice 作成リクエスト
type: object
additionalProperties: false
properties:
customer_id:
type: string
description: Customer ID
product_id:
type: string
description: Product ID
description: 商品ID (Product ID)
metadata:
type: object
description: 請求書に付与するメタデータ
additionalProperties: false
properties:
traq_id:
type: string
description: 再入部等でアカウント復旧の対象となる traQ ID
required:
- customer_id
- product_id
InvoiceStatus:
description: 請求書ステータス
Expand All @@ -558,7 +565,7 @@ components:
- uncollectible
- void
example: draft
PostInvoiceResponse:
PostMeInvoiceResponse:
description: Invoice creation result
type: object
properties:
Expand Down
Loading