pokepay_partner_ruby_sdk 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5027b7fd2a102a6e077dc1d3d68ce6c65f8b7216c6320fefcbf3882cba87b146
4
- data.tar.gz: 10a43dad44d77fd654cc0744a17c9996df903ed4f03cc2a671708c2f631a39f8
3
+ metadata.gz: ef55822676f9f2e427fd76e1434e510c90491a72d57ce38d0be9c6f9f271936b
4
+ data.tar.gz: a48fb9effd3ae012dc51d9efc19021088d8d01e6c3eab08745beb5b6e6fbef6d
5
5
  SHA512:
6
- metadata.gz: d430a4b622d7ef751ef766ef7b278688d314157d0477c490096db6a1d81e269e290b3c5dbdd62c725375b4934d830948e3bcc9e60e00376f57060abe4e249af4
7
- data.tar.gz: 889991f4824194bd01e404744061857eae3866c571342e775ddd6240c1f103f31bfb2f01459134ac525a3ba312c97fb8439a3846f350e7df239efb1311d95ce5
6
+ metadata.gz: dce0a61b071729c5b85af8035d7e1cc767d5eb99b55da16a0126c344aba7b8fee5a17a70994d8284bc3fe02910cceda320ff646dcba3aea2230c908a57906cdb
7
+ data.tar.gz: 2f4f017ff5a6fa72c2dcce10155ec211f9db9f4ca00f8f8f28914502fb85a4721564c014c27efee938889aeeffc3de999e6e4f4bf0bd6e72cd854a05f7c07919
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pokepay_partner_ruby_sdk (0.1.2)
4
+ pokepay_partner_ruby_sdk (0.1.4)
5
5
  inifile (~> 3.0.0)
6
6
  json (~> 2.3.0)
7
7
  openssl (~> 2.1.2)
@@ -1,28 +1,30 @@
1
1
  # encoding: utf-8
2
+ # DO NOT EDIT: File is generated by code generator.
2
3
 
3
4
  require "pokepay_partner_ruby_sdk/version"
4
5
  require "pokepay_partner_ruby_sdk/client"
5
6
  require "pokepay_partner_ruby_sdk/request/request"
6
7
  require "pokepay_partner_ruby_sdk/response/response"
7
- require "pokepay_partner_ruby_sdk/request/get_private_money_organization_summaries"
8
- require "pokepay_partner_ruby_sdk/request/create_shop"
9
- require "pokepay_partner_ruby_sdk/request/create_organization"
10
- require "pokepay_partner_ruby_sdk/request/list_transfers"
11
- require "pokepay_partner_ruby_sdk/request/create_cpm_transaction"
12
- require "pokepay_partner_ruby_sdk/request/get_transaction"
13
- require "pokepay_partner_ruby_sdk/request/create_exchange_transaction"
14
- require "pokepay_partner_ruby_sdk/request/create_payment_transaction"
15
- require "pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check"
16
- require "pokepay_partner_ruby_sdk/request/create_topup_transaction"
17
- require "pokepay_partner_ruby_sdk/request/create_transaction"
18
- require "pokepay_partner_ruby_sdk/request/list_transactions"
19
- require "pokepay_partner_ruby_sdk/request/create_check"
20
- require "pokepay_partner_ruby_sdk/request/create_customer_account"
21
- require "pokepay_partner_ruby_sdk/request/list_account_balances"
22
- require "pokepay_partner_ruby_sdk/request/get_account"
23
- require "pokepay_partner_ruby_sdk/request/get_user"
24
- require "pokepay_partner_ruby_sdk/request/send_echo"
25
8
  require "pokepay_partner_ruby_sdk/request/get_ping"
9
+ require "pokepay_partner_ruby_sdk/request/send_echo"
10
+ require "pokepay_partner_ruby_sdk/request/get_user"
11
+ require "pokepay_partner_ruby_sdk/request/get_account"
12
+ require "pokepay_partner_ruby_sdk/request/update_account"
13
+ require "pokepay_partner_ruby_sdk/request/list_account_balances"
14
+ require "pokepay_partner_ruby_sdk/request/create_customer_account"
15
+ require "pokepay_partner_ruby_sdk/request/create_check"
16
+ require "pokepay_partner_ruby_sdk/request/list_transactions"
17
+ require "pokepay_partner_ruby_sdk/request/create_transaction"
18
+ require "pokepay_partner_ruby_sdk/request/create_topup_transaction"
19
+ require "pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check"
20
+ require "pokepay_partner_ruby_sdk/request/create_payment_transaction"
21
+ require "pokepay_partner_ruby_sdk/request/create_exchange_transaction"
22
+ require "pokepay_partner_ruby_sdk/request/get_transaction"
23
+ require "pokepay_partner_ruby_sdk/request/refund_transaction"
24
+ require "pokepay_partner_ruby_sdk/request/list_transfers"
25
+ require "pokepay_partner_ruby_sdk/request/create_organization"
26
+ require "pokepay_partner_ruby_sdk/request/create_shop"
27
+ require "pokepay_partner_ruby_sdk/request/get_private_money_organization_summaries"
26
28
  require "pokepay_partner_ruby_sdk/response/pong"
27
29
  require "pokepay_partner_ruby_sdk/response/echo"
28
30
  require "pokepay_partner_ruby_sdk/response/pagination"
@@ -39,7 +41,6 @@ require "pokepay_partner_ruby_sdk/response/transaction"
39
41
  require "pokepay_partner_ruby_sdk/response/user_transaction"
40
42
  require "pokepay_partner_ruby_sdk/response/account_without_private_money_detail"
41
43
  require "pokepay_partner_ruby_sdk/response/transfer"
42
- require "pokepay_partner_ruby_sdk/parameter/product"
43
44
  require "pokepay_partner_ruby_sdk/response/organization_summary"
44
45
  require "pokepay_partner_ruby_sdk/response/private_money_organization_summary"
45
46
  require "pokepay_partner_ruby_sdk/response/paginated_private_money_organization_summaries"
@@ -4,11 +4,12 @@ require "pokepay_partner_ruby_sdk/response/organization"
4
4
 
5
5
  module Pokepay::Request
6
6
  class CreateOrganization < Request
7
- def initialize(code, name, issuer_admin_user_email, member_admin_user_email, rest_args = {})
7
+ def initialize(code, name, private_money_ids, issuer_admin_user_email, member_admin_user_email, rest_args = {})
8
8
  @path = "/organizations"
9
9
  @method = "POST"
10
10
  @body_params = { "code" => code,
11
11
  "name" => name,
12
+ "private_money_ids" => private_money_ids,
12
13
  "issuer_admin_user_email" => issuer_admin_user_email,
13
14
  "member_admin_user_email" => member_admin_user_email }.merge(rest_args)
14
15
  @response_class = Pokepay::Response::Organization
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/transfer"
4
+
5
+ module Pokepay::Request
6
+ class RefundTransaction < Request
7
+ def initialize(transaction_id, rest_args = {})
8
+ @path = "/transactions" + "/" + transaction_id + "/refund"
9
+ @method = "POST"
10
+ @body_params = { }.merge(rest_args)
11
+ @response_class = Pokepay::Response::Transfer
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/account_detail"
4
+
5
+ module Pokepay::Request
6
+ class UpdateAccount < Request
7
+ def initialize(account_id, rest_args = {})
8
+ @path = "/accounts" + "/" + account_id
9
+ @method = "PATCH"
10
+ @body_params = { }.merge(rest_args)
11
+ @response_class = Pokepay::Response::AccountDetail
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -4,8 +4,8 @@
4
4
  module Pokepay::Response
5
5
  class Pong
6
6
  def initialize(row)
7
- @ok = row["ok"]
7
+ @pong = row["pong"]
8
8
  end
9
- attr_reader :ok
9
+ attr_reader :pong
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Pokepay
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -0,0 +1,1609 @@
1
+ # NOTE:
2
+ # エントリーポイントについて、x-pokepay-allow-server-side: true がついているものはサーバーサイドで正しいことが保証されているが
3
+ # それ以外は存在しないか間違っているので注意
4
+
5
+ openapi: '3.0.1'
6
+
7
+ info:
8
+ description: >-
9
+ Partner APIs
10
+ title: Partner APIs
11
+ version: 0.0.0
12
+
13
+ components:
14
+ schemas:
15
+ Pong:
16
+ x-pokepay-schema-type: "response"
17
+ properties:
18
+ pong:
19
+ type: string
20
+ pattern: '^ok$'
21
+ Echo:
22
+ x-pokepay-schema-type: "response"
23
+ properties:
24
+ status:
25
+ type: string
26
+ pattern: '^ok$'
27
+ message:
28
+ type: string
29
+ Pagination:
30
+ x-pokepay-schema-type: "response"
31
+ properties:
32
+ current:
33
+ type: integer
34
+ per_page:
35
+ type: integer
36
+ minimum: 1
37
+ max_page:
38
+ type: integer
39
+ minimum: 1
40
+ has_prev:
41
+ type: boolean
42
+ has_next:
43
+ type: boolean
44
+ AdminUserWithShopsAndPrivateMoneys:
45
+ x-pokepay-schema-type: "response"
46
+ properties:
47
+ id:
48
+ type: string
49
+ format: uuid
50
+ role:
51
+ type: string
52
+ pattern: '^(SERVICE|ORGANIZATION|SHOP)-(MANAGER|STAFF)$'
53
+ email:
54
+ type: string
55
+ format: email
56
+ name:
57
+ type: string
58
+ is_active:
59
+ type: boolean
60
+ organization:
61
+ $ref: '#/components/schemas/Organization'
62
+ shops:
63
+ type: array
64
+ items:
65
+ $ref: '#/components/schemas/User'
66
+ private_moneys:
67
+ type: array
68
+ items:
69
+ $ref: '#/components/schemas/PrivateMoney'
70
+ Account:
71
+ x-pokepay-schema-type: "response"
72
+ properties:
73
+ id:
74
+ type: string
75
+ format: uuid
76
+ summary: 'ウォレットID'
77
+ name:
78
+ type: string
79
+ summary: 'ウォレット名'
80
+ is_suspended:
81
+ type: boolean
82
+ summary: 'ウォレットが凍結されているかどうか'
83
+ private_money:
84
+ $ref: '#/components/schemas/PrivateMoney'
85
+ summary: '設定マネー情報'
86
+ AccountWithUser:
87
+ x-pokepay-schema-type: "response"
88
+ properties:
89
+ id:
90
+ type: string
91
+ format: uuid
92
+ name:
93
+ type: string
94
+ is_suspended:
95
+ type: boolean
96
+ private_money:
97
+ $ref: '#/components/schemas/PrivateMoney'
98
+ user:
99
+ $ref: '#/components/schemas/User'
100
+ AccountDetail:
101
+ x-pokepay-schema-type: "response"
102
+ properties:
103
+ id:
104
+ type: string
105
+ format: uuid
106
+ name:
107
+ type: string
108
+ is_suspended:
109
+ type: boolean
110
+ balance:
111
+ type: number
112
+ format: decimal
113
+ money_balance:
114
+ type: number
115
+ format: decimal
116
+ point_balance:
117
+ type: number
118
+ format: decimal
119
+ private_money:
120
+ $ref: '#/components/schemas/PrivateMoney'
121
+ AccountBalance:
122
+ x-pokepay-schema-type: "response"
123
+ properties:
124
+ expires_at:
125
+ type: string
126
+ format: date-time
127
+ money_amount:
128
+ type: number
129
+ format: decimal
130
+ point_amount:
131
+ type: number
132
+ format: decimal
133
+ Check:
134
+ x-pokepay-schema-type: "response"
135
+ properties:
136
+ id:
137
+ type: string
138
+ format: uuid
139
+ summary: チャージQRコードのID
140
+ amount:
141
+ type: number
142
+ format: decimal
143
+ deprecated: true
144
+ summary: チャージマネー額
145
+ money_amount:
146
+ type: number
147
+ format: decimal
148
+ summary: チャージマネー額
149
+ point_amount:
150
+ type: number
151
+ format: decimal
152
+ summary: チャージポイント額
153
+ description:
154
+ type: string
155
+ summary: チャージQRコードの説明文(アプリ上で取引の説明文として表示される)
156
+ user:
157
+ $ref: '#/components/schemas/User'
158
+ summary: 送金元ユーザ情報
159
+ is_onetime:
160
+ type: boolean
161
+ summary: 使用回数が一回限りかどうか
162
+ is_disabled:
163
+ type: boolean
164
+ summary: 無効化されているかどうか
165
+ expires_at:
166
+ type: string
167
+ format: date-time
168
+ summary: チャージQRコード自体の失効日時
169
+ private_money:
170
+ $ref: '#/components/schemas/PrivateMoney'
171
+ summary: 対象マネー情報
172
+ usage_limit:
173
+ type: integer
174
+ summary: 一回限りでない場合の最大読み取り回数
175
+ usage_count:
176
+ type: number
177
+ summary: 一回限りでない場合の現在までに読み取られた回数
178
+ token:
179
+ type: string
180
+ summary: チャージQRコードを解析したときに出てくるURL
181
+ User:
182
+ x-pokepay-schema-type: "response"
183
+ properties:
184
+ id:
185
+ type: string
186
+ format: uuid
187
+ summary: 'ユーザー (または店舗) ID'
188
+ name:
189
+ type: string
190
+ summary: 'ユーザー (または店舗) 名'
191
+ is_merchant:
192
+ type: boolean
193
+ summary: '店舗ユーザーかどうか'
194
+ PrivateMoney:
195
+ x-pokepay-schema-type: "response"
196
+ properties:
197
+ id:
198
+ type: string
199
+ format: uuid
200
+ summary: 'マネーID'
201
+ name:
202
+ type: string
203
+ maxLength: 256
204
+ summary: 'マネー名'
205
+ unit:
206
+ type: string
207
+ summary: 'マネー単位 (例: 円)'
208
+ is_exclusive:
209
+ type: boolean
210
+ summary: '会員制のマネーかどうか'
211
+ description:
212
+ type: string
213
+ summary: 'マネー説明文'
214
+ oneline_message:
215
+ type: string
216
+ summary: 'マネーの要約'
217
+ organization:
218
+ summary: 'マネーを発行した組織'
219
+ $ref: '#/components/schemas/Organization'
220
+ max_balance:
221
+ type: number
222
+ format: decimal
223
+ summary: 'ウォレットの上限金額'
224
+ transfer_limit:
225
+ type: number
226
+ format: decimal
227
+ summary: 'マネーの取引上限額'
228
+ type:
229
+ type: string
230
+ enum: [own, third-party]
231
+ summary: 'マネー種別 (自家型=own, 第三者型=third-party)'
232
+ expiration_type:
233
+ type: string
234
+ enum: [static, last-update, last-topup-update]
235
+ summary: '有効期限種別 (チャージ日起算=static, 最終利用日起算=last-update, 最終チャージ日起算=last-topup-update)'
236
+ enable_topup_by_member:
237
+ type: boolean
238
+ nullable: true
239
+ summary: '加盟店によるチャージが有効かどうか'
240
+ account_image:
241
+ type: string
242
+ nullable: true
243
+ summary: 'マネーの画像URL'
244
+ Organization:
245
+ x-pokepay-schema-type: "response"
246
+ properties:
247
+ code:
248
+ type: string
249
+ maxLength: 32
250
+ summary: '組織コード'
251
+ name:
252
+ type: string
253
+ maxLength: 256
254
+ summary: '組織名'
255
+ Transaction:
256
+ x-pokepay-schema-type: "response"
257
+ properties:
258
+ id:
259
+ type: string
260
+ format: uuid
261
+ summary: '取引ID'
262
+ type:
263
+ type: string
264
+ summary: '取引種別 (チャージ=topup, 支払い=payment)'
265
+ is_modified:
266
+ type: boolean
267
+ summary: '返金された取引かどうか'
268
+ sender:
269
+ $ref: '#/components/schemas/User'
270
+ summary: '送金者情報'
271
+ sender_account:
272
+ $ref: '#/components/schemas/Account'
273
+ summary: '送金ウォレット情報'
274
+ receiver:
275
+ $ref: '#/components/schemas/User'
276
+ summary: '受取者情報'
277
+ receiver_account:
278
+ $ref: '#/components/schemas/Account'
279
+ summary: '受取ウォレット情報'
280
+ amount:
281
+ type: number
282
+ summary: '決済総額 (マネー額 + ポイント額)'
283
+ money_amount:
284
+ type: number
285
+ summary: '決済マネー額'
286
+ point_amount:
287
+ type: number
288
+ summary: '決済ポイント額'
289
+ done_at:
290
+ type: string
291
+ format: date-time
292
+ summary: '取引日時'
293
+ description:
294
+ type: string
295
+ summary: '取引説明文'
296
+ UserTransaction:
297
+ x-pokepay-schema-type: "response"
298
+ properties:
299
+ id:
300
+ type: string
301
+ format: uuid
302
+ user:
303
+ $ref: '#/components/schemas/User'
304
+ balance:
305
+ type: number
306
+ format: decimal
307
+ amount:
308
+ type: number
309
+ format: decimal
310
+ minimum: 0
311
+ money_amount:
312
+ type: number
313
+ format: decimal
314
+ minimum: 0
315
+ point_amount:
316
+ type: number
317
+ format: decimal
318
+ minimum: 0
319
+ account:
320
+ $ref: '#/components/schemas/Account'
321
+ description:
322
+ type: string
323
+ done_at:
324
+ type: string
325
+ format: date-time
326
+ type:
327
+ type: string
328
+ enum: [topup, payment, transfer, exchange]
329
+ is_modified:
330
+ type: boolean
331
+ AccountWithoutPrivateMoneyDetail:
332
+ x-pokepay-schema-type: "response"
333
+ properties:
334
+ id:
335
+ type: string
336
+ format: uuid
337
+ name:
338
+ type: string
339
+ is_suspended:
340
+ type: boolean
341
+ private_money_id:
342
+ type: string
343
+ format: uuid
344
+ user:
345
+ $ref: '#/components/schemas/User'
346
+ Transfer:
347
+ x-pokepay-schema-type: "response"
348
+ properties:
349
+ id:
350
+ type: string
351
+ format: uuid
352
+ sender_account:
353
+ $ref: '#/components/schemas/AccountWithoutPrivateMoneyDetail'
354
+ receiver_account:
355
+ $ref: '#/components/schemas/AccountWithoutPrivateMoneyDetail'
356
+ amount:
357
+ type: number
358
+ format: decimal
359
+ minimum: 0
360
+ money_amount:
361
+ type: number
362
+ format: decimal
363
+ minimum: 0
364
+ point_amount:
365
+ type: number
366
+ format: decimal
367
+ minimum: 0
368
+ done_at:
369
+ type: string
370
+ format: date-time
371
+ type:
372
+ type: string
373
+ enum: [topup, payment, refund-topup, refund-payment, transfer, exchange-inflow, exchange-outflow]
374
+ description:
375
+ type: string
376
+ transaction_id:
377
+ type: string
378
+ format: uuid
379
+
380
+ OrganizationSummary:
381
+ x-pokepay-schema-type: "response"
382
+ properties:
383
+ count:
384
+ type: integer
385
+ money_amount:
386
+ type: number
387
+ format: decimal
388
+ minimum: 0
389
+ money_count:
390
+ type: integer
391
+ point_amount:
392
+ type: number
393
+ format: decimal
394
+ minimum: 0
395
+ point_count:
396
+ type: integer
397
+ PrivateMoneyOrganizationSummary:
398
+ x-pokepay-schema-type: "response"
399
+ properties:
400
+ organization_code:
401
+ type: string
402
+ pattern: '^[a-zA-Z0-9-]*$'
403
+ maxLength: 32
404
+ topup:
405
+ $ref: '#/components/schemas/OrganizationSummary'
406
+ payment:
407
+ $ref: '#/components/schemas/OrganizationSummary'
408
+ PaginatedPrivateMoneyOrganizationSummaries:
409
+ x-pokepay-schema-type: "response"
410
+ properties:
411
+ rows:
412
+ type: array
413
+ items:
414
+ $ref: '#/components/schemas/PrivateMoneyOrganizationSummary'
415
+ count:
416
+ type: integer
417
+ minimum: 0
418
+ pagination:
419
+ $ref: '#/components/schemas/Pagination'
420
+ PaginatedTransaction:
421
+ x-pokepay-schema-type: "response"
422
+ properties:
423
+ rows:
424
+ type: array
425
+ items:
426
+ $ref: '#/components/schemas/Transaction'
427
+ count:
428
+ type: integer
429
+ minimum: 0
430
+ pagination:
431
+ $ref: '#/components/schemas/Pagination'
432
+ PaginatedTransfers:
433
+ x-pokepay-schema-type: "response"
434
+ properties:
435
+ rows:
436
+ type: array
437
+ items:
438
+ $ref: '#/components/schemas/Transfer'
439
+ count:
440
+ type: integer
441
+ minimum: 0
442
+ pagination:
443
+ $ref: '#/components/schemas/Pagination'
444
+ PaginatedAccountBalance:
445
+ x-pokepay-schema-type: "response"
446
+ properties:
447
+ rows:
448
+ type: array
449
+ items:
450
+ $ref: '#/components/schemas/AccountBalance'
451
+ count:
452
+ type: integer
453
+ minimum: 0
454
+ pagination:
455
+ $ref: '#/components/schemas/Pagination'
456
+
457
+ BadRequest:
458
+ x-pokepay-schema-type: "response"
459
+ oneOf:
460
+ - $ref: '#/components/schemas/PartnerClientNotFound'
461
+ - $ref: '#/components/schemas/PartnerDecryptionFailed'
462
+ - $ref: '#/components/schemas/PartnerRequestExpired'
463
+ - $ref: '#/components/schemas/PartnerRequestAlreadyDone'
464
+ - $ref: '#/components/schemas/InvalidParameters'
465
+ PartnerClientNotFound:
466
+ x-pokepay-schema-type: "response"
467
+ properties:
468
+ type:
469
+ type: string
470
+ pattern: '^partner_client_not_found$'
471
+ message:
472
+ type: string
473
+ PartnerDecryptionFailed:
474
+ x-pokepay-schema-type: "response"
475
+ properties:
476
+ type:
477
+ type: string
478
+ pattern: '^partner_decryption_failed$'
479
+ message:
480
+ type: string
481
+ PartnerRequestExpired:
482
+ x-pokepay-schema-type: "response"
483
+ properties:
484
+ type:
485
+ type: string
486
+ pattern: '^partner_request_expired$'
487
+ message:
488
+ type: string
489
+ example: 'This request is expired.'
490
+ PartnerRequestAlreadyDone:
491
+ x-pokepay-schema-type: "response"
492
+ properties:
493
+ type:
494
+ type: string
495
+ pattern: '^partner_request_already_done$'
496
+ message:
497
+ type: string
498
+ InvalidParameters:
499
+ x-pokepay-schema-type: "response"
500
+ properties:
501
+ type:
502
+ type: string
503
+ pattern: '^invalid_parameter'
504
+ message:
505
+ type: string
506
+ errors:
507
+ type: object
508
+ properties:
509
+ missing:
510
+ type: array
511
+ nullable: true
512
+ items:
513
+ type: string
514
+ invalid:
515
+ type: array
516
+ nullable: true
517
+ items:
518
+ type: string
519
+ unpermitted:
520
+ type: array
521
+ nullable: true
522
+ items:
523
+ type: string
524
+ Forbidden:
525
+ properties:
526
+ type:
527
+ type: string
528
+ example: forbidden
529
+ message:
530
+ type: string
531
+ example: Forbidden
532
+ NotFound:
533
+ properties:
534
+ type:
535
+ type: string
536
+ example: api_error
537
+ message:
538
+ type: string
539
+ example: Not Found
540
+ UnprocessableEntity:
541
+ properties:
542
+ type:
543
+ type: string
544
+ example: unprocessable
545
+ message:
546
+ type: string
547
+ Conflict:
548
+ properties:
549
+ type:
550
+ type: string
551
+ message:
552
+ type: string
553
+
554
+ responses:
555
+ BadRequest:
556
+ description: Bad Request
557
+ content:
558
+ application/json:
559
+ schema:
560
+ $ref: '#/components/schemas/BadRequest'
561
+ InvalidParameters:
562
+ description: Invalid Parameters
563
+ content:
564
+ application/json:
565
+ schema:
566
+ $ref: '#/components/schemas/InvalidParameters'
567
+ Forbidden:
568
+ description: Forbidden
569
+ content:
570
+ application/json:
571
+ schema:
572
+ $ref: '#/components/schemas/Forbidden'
573
+ NotFound:
574
+ description: Not Found
575
+ content:
576
+ application/json:
577
+ schema:
578
+ $ref: '#/components/schemas/NotFound'
579
+ UnprocessableEntity:
580
+ description: Unprocessable Entity
581
+ content:
582
+ application/json:
583
+ schema:
584
+ $ref: '#/components/schemas/UnprocessableEntity'
585
+ Conflict:
586
+ description: Conflict
587
+ content:
588
+ application/json:
589
+ schema:
590
+ $ref: '#/components/schemas/Conflict'
591
+
592
+ paths:
593
+ /ping:
594
+ get:
595
+ responses:
596
+ '200':
597
+ description: OK
598
+ content:
599
+ application/json:
600
+ schema:
601
+ $ref: '#/components/schemas/Pong'
602
+ /echo:
603
+ post:
604
+ x-pokepay-operator-name: "SendEcho"
605
+ x-pokepay-allow-server-side: true
606
+ requestBody:
607
+ required: true
608
+ content:
609
+ application/json:
610
+ schema:
611
+ required: ["message"]
612
+ properties:
613
+ message:
614
+ type: string
615
+ responses:
616
+ '200':
617
+ description: OK
618
+ content:
619
+ application/json:
620
+ schema:
621
+ $ref: '#/components/schemas/Echo'
622
+ '400':
623
+ $ref: '#/components/responses/BadRequest'
624
+ /user:
625
+ get:
626
+ responses:
627
+ '200':
628
+ description: OK
629
+ content:
630
+ application/json:
631
+ schema:
632
+ $ref: '#/components/schemas/AdminUserWithShopsAndPrivateMoneys'
633
+ /accounts/{account_id}:
634
+ get:
635
+ summary: 'エンドユーザーのウォレット情報を表示する'
636
+ description: ウォレットを取得します。
637
+ x-pokepay-operator-name: "GetAccount"
638
+ x-pokepay-allow-server-side: true
639
+ parameters:
640
+ - in: path
641
+ name: account_id
642
+ required: true
643
+ schema:
644
+ type: string
645
+ format: uuid
646
+ summary: 'ウォレットID'
647
+ description: |-
648
+ ウォレットIDです。
649
+
650
+ フィルターとして使われ、指定したウォレットIDのウォレットを取得します。
651
+ responses:
652
+ '200':
653
+ description: OK
654
+ content:
655
+ application/json:
656
+ schema:
657
+ $ref: '#/components/schemas/AccountDetail'
658
+ '400':
659
+ $ref: '#/components/responses/BadRequest'
660
+ '403':
661
+ $ref: '#/components/responses/Forbidden'
662
+ '404':
663
+ $ref: '#/components/responses/NotFound'
664
+ patch:
665
+ description: ウォレットの状態を更新します。現在はウォレットの凍結/凍結解除の切り替えにのみ対応しています。
666
+ x-pokepay-operator-name: "UpdateAccount"
667
+ x-pokepay-allow-server-side: true
668
+ parameters:
669
+ - in: path
670
+ name: account_id
671
+ required: true
672
+ schema:
673
+ type: string
674
+ format: uuid
675
+ description: |-
676
+ ウォレットIDです。
677
+
678
+ 指定したウォレットIDのウォレットの状態を更新します。
679
+ requestBody:
680
+ required: true
681
+ content:
682
+ application/json:
683
+ schema:
684
+ properties:
685
+ is_suspended:
686
+ type: boolean
687
+ description: ウォレットの凍結状態です。真にするとウォレットが凍結され、そのウォレットでは新規取引ができなくなります。偽にすると凍結解除されます。
688
+ responses:
689
+ '200':
690
+ description: OK
691
+ content:
692
+ application/json:
693
+ schema:
694
+ $ref: '#/components/schemas/AccountDetail'
695
+ '400':
696
+ $ref: '#/components/responses/BadRequest'
697
+ '403':
698
+ $ref: '#/components/responses/Forbidden'
699
+ '404':
700
+ $ref: '#/components/responses/NotFound'
701
+ /accounts/{account_id}/balances:
702
+ get:
703
+ summary: 'エンドユーザーの残高内訳を表示する'
704
+ description: エンドユーザーの残高は有効期限別のリストとして取得できます。
705
+ x-pokepay-operator-name: "ListAccountBalances"
706
+ x-pokepay-allow-server-side: true
707
+ parameters:
708
+ - name: account_id
709
+ in: path
710
+ required: true
711
+ schema:
712
+ type: string
713
+ format: uuid
714
+ summary: 'ウォレットID'
715
+ description: |-
716
+ ウォレットIDです。
717
+
718
+ フィルターとして使われ、指定したウォレットIDのウォレット残高を取得します。
719
+ requestBody:
720
+ required: true
721
+ content:
722
+ application/json:
723
+ schema:
724
+ properties:
725
+ page:
726
+ type: integer
727
+ minimum: 1
728
+ summary: 'ページ番号'
729
+ description: 取得したいページ番号です。
730
+ per_page:
731
+ type: integer
732
+ minimum: 1
733
+ summary: '1ページ分の取引数'
734
+ description: 1ページ分のウォレット残高数です。
735
+ responses:
736
+ '200':
737
+ description: OK
738
+ content:
739
+ application/json:
740
+ schema:
741
+ $ref: '#/components/schemas/PaginatedAccountBalance'
742
+ '400':
743
+ $ref: '#/components/responses/BadRequest'
744
+ '403':
745
+ $ref: '#/components/responses/Forbidden'
746
+ '404':
747
+ $ref: '#/components/responses/NotFound'
748
+ /accounts/customers:
749
+ post:
750
+ summary: '新規エンドユーザーウォレットを追加する'
751
+ description: |-
752
+ 指定したマネーのウォレットを作成し、同時にそのウォレットを保有するユーザも作成します。
753
+ x-pokepay-operator-name: "CreateCustomerAccount"
754
+ x-pokepay-allow-server-side: true
755
+ requestBody:
756
+ required: true
757
+ content:
758
+ application/json:
759
+ schema:
760
+ required: ["private_money_id"]
761
+ properties:
762
+ private_money_id:
763
+ summary: 'マネーID'
764
+ description: |-
765
+ マネーIDです。
766
+
767
+ これによって作成するウォレットのマネーを指定します。
768
+ type: string
769
+ format: uuid
770
+ user_name:
771
+ summary: 'ユーザー名'
772
+ description: |-
773
+ ウォレットと共に作成するユーザ名です。省略した場合は空文字となります。
774
+ type: string
775
+ maxLength: 256
776
+ example: ポケペイ太郎
777
+ account_name:
778
+ summary: 'アカウント名'
779
+ description: |-
780
+ 作成するウォレット名です。省略した場合は空文字となります。
781
+ type: string
782
+ maxLength: 256
783
+ example: ポケペイ太郎のアカウント
784
+ responses:
785
+ '200':
786
+ description: OK
787
+ content:
788
+ application/json:
789
+ schema:
790
+ $ref: '#/components/schemas/AccountWithUser'
791
+ '400':
792
+ $ref: '#/components/responses/BadRequest'
793
+ '403':
794
+ $ref: '#/components/responses/Forbidden'
795
+ '422':
796
+ $ref: '#/components/responses/UnprocessableEntity'
797
+ /checks:
798
+ post:
799
+ summary: 'チャージQRコードの発行'
800
+ x-pokepay-operator-name: "CreateCheck"
801
+ requestBody:
802
+ required: true
803
+ content:
804
+ application/json:
805
+ schema:
806
+ required: ["account_id"]
807
+ x-pokepay-conditional-parameters: {or: [money_amount, point_amount]}
808
+ properties:
809
+ money_amount:
810
+ type: number
811
+ minimum: 0
812
+ format: decimal
813
+ summary: '付与マネー額'
814
+ point_amount:
815
+ type: number
816
+ minimum: 0
817
+ format: decimal
818
+ summary: '付与ポイント額'
819
+ account_id:
820
+ type: string
821
+ format: uuid
822
+ summary: '送金元の店舗アカウントID'
823
+ description:
824
+ type: string
825
+ maxLength: 200
826
+ summary: '説明文(アプリ上で取引の説明文として表示される)'
827
+ example: 'test check'
828
+ is_onetime:
829
+ type: boolean
830
+ summary: 'ワンタイムかどうか。真の場合1度読み込まれた時点でそのチャージQRは失効する(デフォルト値は真)'
831
+ description: |
832
+ チャージQRコードが一度の読み取りで失効するときに`true`にします。デフォルト値は`true`です。
833
+ `false`の場合、そのチャージQRコードは1ユーザについては1回きりですが、複数ユーザによって読み取り可能なQRコードになります。
834
+ usage_limit:
835
+ type: integer
836
+ nullable: true
837
+ summary: 'ワンタイムでない場合、複数ユーザから読み取られ得る。その場合の最大読み取り回数'
838
+ description: |
839
+ 複数ユーザによって読み取り可能なチャージQRコードの読み取り回数に制限をつけるために指定します。
840
+ 省略すると無制限に読み取り可能なチャージQRコードになります。
841
+ チャージQRコードは管理画面からいつでも無効化(有効化)することができます。
842
+ expires_at:
843
+ type: string
844
+ format: date-time
845
+ summary: 'チャージQR自体の失効日時'
846
+ point_expires_at:
847
+ type: string
848
+ format: date-time
849
+ summary: 'チャージQRによって付与されるポイントの失効日時'
850
+ point_expires_in_days:
851
+ type: integer
852
+ minimum: 1
853
+ summary: 'チャージQRによって付与されるポイントの有効期限(相対指定、単位は日)'
854
+ example: 60
855
+ bear_point_account:
856
+ type: string
857
+ format: uuid
858
+ summary: 'ポイント額を負担する店舗アカウントのID'
859
+ responses:
860
+ '200':
861
+ description: OK
862
+ content:
863
+ application/json:
864
+ schema:
865
+ $ref: '#/components/schemas/Check'
866
+ '400':
867
+ $ref: '#/components/responses/InvalidParameters'
868
+ /transactions:
869
+ get:
870
+ summary: '取引履歴を取得する'
871
+ description: 取引一覧を返します。
872
+ x-pokepay-operator-name: "ListTransactions"
873
+ x-pokepay-allow-server-side: true
874
+ requestBody:
875
+ required: true
876
+ content:
877
+ application/json:
878
+ schema:
879
+ properties:
880
+ from:
881
+ type: string
882
+ format: date-time
883
+ summary: '開始日時'
884
+ description: |-
885
+ 抽出期間の開始日時です。
886
+
887
+ フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
888
+ to:
889
+ type: string
890
+ format: date-time
891
+ summary: '終了日時'
892
+ description: |-
893
+ 抽出期間の終了日時です。
894
+
895
+ フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
896
+ page:
897
+ type: integer
898
+ minimum: 1
899
+ summary: 'ページ番号'
900
+ description: 取得したいページ番号です。
901
+ example: 1
902
+ per_page:
903
+ type: integer
904
+ minimum: 1
905
+ summary: '1ページ分の取引数'
906
+ description: 1ページ分の取引数です。
907
+ example: 50
908
+ shop_id:
909
+ type: string
910
+ format: uuid
911
+ summary: '店舗ID'
912
+ description: |-
913
+ 店舗IDです。
914
+
915
+ フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。
916
+ customer_id:
917
+ type: string
918
+ format: uuid
919
+ summary: 'エンドユーザーID'
920
+ description: |-
921
+ エンドユーザーIDです。
922
+
923
+ フィルターとして使われ、指定されたエンドユーザーでの取引のみ一覧に表示されます。
924
+ customer_name:
925
+ type: string
926
+ maxLength: 256
927
+ summary: 'エンドユーザー名'
928
+ description: |-
929
+ エンドユーザー名です。
930
+
931
+ フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。
932
+ example: 太郎
933
+ terminal_id:
934
+ type: string
935
+ format: uuid
936
+ summary: '端末ID'
937
+ description: |-
938
+ 端末IDです。
939
+
940
+ フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。
941
+ transaction_id:
942
+ type: string
943
+ format: uuid
944
+ summary: '取引ID'
945
+ description: |-
946
+ 取引IDです。
947
+
948
+ フィルターとして使われ、指定された取引のみ一覧に表示されます。
949
+ organization_code:
950
+ type: string
951
+ pattern: '^[a-zA-Z0-9-]*$'
952
+ maxLength: 32
953
+ summary: '組織コード'
954
+ description: |-
955
+ 組織コードです。
956
+
957
+ フィルターとして使われ、指定された組織での取引のみ一覧に表示されます。
958
+ example: 'pocketchange'
959
+ private_money_id:
960
+ type: string
961
+ format: uuid
962
+ summary: 'マネーID'
963
+ description: |-
964
+ マネーIDです。
965
+
966
+ フィルターとして使われ、指定したマネーでの取引のみ一覧に表示されます。
967
+ is_modified:
968
+ type: boolean
969
+ summary: 'キャンセルフラグ'
970
+ description: |-
971
+ キャンセルフラグです。
972
+
973
+ これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
974
+ デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。
975
+ types:
976
+ type: array
977
+ summary: '取引種別 (複数指定可)、チャージ=topup、支払い=payment'
978
+ example: '["topup", "payment"]'
979
+ description: |-
980
+ 取引の種類でフィルターします。
981
+
982
+ 以下の種類を指定できます。
983
+
984
+ 1. topup
985
+ 店舗からエンドユーザーへの送金取引(チャージ)
986
+
987
+ 2. payment
988
+ エンドユーザーから店舗への送金取引(支払い)
989
+
990
+ 3. exchange-outflow
991
+   他マネーへの流出
992
+
993
+ 4. exchange-inflow
994
+ 他マネーからの流入
995
+ items:
996
+ type: string
997
+ enum: [topup, payment, exchange_outflow, exchange_inflow]
998
+ responses:
999
+ '200':
1000
+ description: OK
1001
+ content:
1002
+ application/json:
1003
+ schema:
1004
+ $ref: '#/components/schemas/PaginatedTransaction'
1005
+ '400':
1006
+ $ref: '#/components/responses/InvalidParameters'
1007
+ post:
1008
+ x-pokepay-operator-name: "CreateTransaction"
1009
+ x-pokepay-allow-server-side: true
1010
+ deprecated: true
1011
+ requestBody:
1012
+ required: true
1013
+ content:
1014
+ application/json:
1015
+ schema:
1016
+ required: ["private_money_id", "shop_id", "customer_id"]
1017
+ properties:
1018
+ shop_id:
1019
+ type: string
1020
+ format: uuid
1021
+ customer_id:
1022
+ type: string
1023
+ format: uuid
1024
+ private_money_id:
1025
+ type: string
1026
+ format: uuid
1027
+ money_amount:
1028
+ type: integer
1029
+ format: decimal
1030
+ minimum: 0
1031
+ point_amount:
1032
+ type: integer
1033
+ format: decimal
1034
+ minimum: 0
1035
+ description:
1036
+ type: string
1037
+ maxLength: 200
1038
+ responses:
1039
+ '200':
1040
+ description: OK
1041
+ content:
1042
+ application/json:
1043
+ schema:
1044
+ $ref: '#/components/schemas/Transaction'
1045
+ '400':
1046
+ $ref: '#/components/responses/BadRequest'
1047
+ '403':
1048
+ $ref: '#/components/responses/Forbidden'
1049
+ '422':
1050
+ $ref: '#/components/responses/UnprocessableEntity'
1051
+ /transactions/topup:
1052
+ post:
1053
+ summary: 'チャージする'
1054
+ description: チャージ取引を作成します。
1055
+ x-pokepay-operator-name: "CreateTopupTransaction"
1056
+ x-pokepay-allow-server-side: true
1057
+ requestBody:
1058
+ required: true
1059
+ content:
1060
+ application/json:
1061
+ schema:
1062
+ required: ["private_money_id", "shop_id", "customer_id"]
1063
+ properties:
1064
+ shop_id:
1065
+ type: string
1066
+ format: uuid
1067
+ summary: '店舗ID'
1068
+ description: |-
1069
+ マネー店舗IDです。
1070
+
1071
+ 送金元の店舗を指定します。
1072
+ customer_id:
1073
+ type: string
1074
+ format: uuid
1075
+ summary: 'エンドユーザーのID'
1076
+ description: |-
1077
+ エンドユーザーIDです。
1078
+
1079
+ 送金先のエンドユーザーを指定します。
1080
+ private_money_id:
1081
+ type: string
1082
+ format: uuid
1083
+ summary: 'マネーID'
1084
+ description: |-
1085
+ マネーIDです。
1086
+
1087
+ マネーを指定します。
1088
+ bear_point_shop_id:
1089
+ type: string
1090
+ format: uuid
1091
+ summary: 'ポイント支払時の負担店舗ID'
1092
+ description: |-
1093
+ ポイント支払時の負担店舗IDです。
1094
+
1095
+ ポイント支払い時に実際お金を負担する店舗を指定します。
1096
+ money_amount:
1097
+ type: number
1098
+ minimum: 0
1099
+ summary: 'マネー額'
1100
+ description: |-
1101
+ マネー額です。
1102
+
1103
+ 送金するマネー額を指定します。
1104
+ point_amount:
1105
+ type: number
1106
+ minimum: 0
1107
+ summary: 'ポイント額'
1108
+ description: |-
1109
+ ポイント額です。
1110
+
1111
+ 送金するポイント額を指定します。
1112
+ description:
1113
+ type: string
1114
+ maxLength: 200
1115
+ summary: '取引履歴に表示する説明文'
1116
+ description: |-
1117
+ 取引説明文です。
1118
+
1119
+ 任意入力で、取引履歴に表示される説明文です。
1120
+ example: 初夏のチャージキャンペーン
1121
+ responses:
1122
+ '200':
1123
+ description: OK
1124
+ content:
1125
+ application/json:
1126
+ schema:
1127
+ $ref: '#/components/schemas/Transaction'
1128
+ '400':
1129
+ $ref: '#/components/responses/BadRequest'
1130
+ '403':
1131
+ $ref: '#/components/responses/Forbidden'
1132
+ '422':
1133
+ $ref: '#/components/responses/UnprocessableEntity'
1134
+ /transactions/topup/check:
1135
+ post:
1136
+ summary: 'チャージQRコードを読み取ることでチャージする'
1137
+ description: |
1138
+ 通常チャージQRコードはエンドユーザのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
1139
+
1140
+ エンドユーザから受け取ったチャージ用QRコードのIDをエンドユーザIDと共に渡すことでチャージ取引が作られます。
1141
+ x-pokepay-operator-name: "CreateTopupTransactionWithCheck"
1142
+ x-pokepay-allow-server-side: true
1143
+ requestBody:
1144
+ required: true
1145
+ content:
1146
+ application/json:
1147
+ schema:
1148
+ required: ["check_id", "customer_id"]
1149
+ properties:
1150
+ check_id:
1151
+ type: string
1152
+ format: uuid
1153
+ summary: 'チャージ用QRコードのID'
1154
+ description: |-
1155
+ チャージ用QRコードのIDです。
1156
+
1157
+ QRコード生成時に送金元店舗のウォレット情報や、送金額などが登録されています。
1158
+ customer_id:
1159
+ type: string
1160
+ format: uuid
1161
+ summary: 'エンドユーザーのID'
1162
+ description: |-
1163
+ エンドユーザーIDです。
1164
+
1165
+ 送金先のエンドユーザーを指定します。
1166
+ responses:
1167
+ '200':
1168
+ description: OK
1169
+ content:
1170
+ application/json:
1171
+ schema:
1172
+ $ref: '#/components/schemas/Transaction'
1173
+ '400':
1174
+ $ref: '#/components/responses/BadRequest'
1175
+ '403':
1176
+ $ref: '#/components/responses/Forbidden'
1177
+ '404':
1178
+ $ref: '#/components/responses/NotFound'
1179
+ '422':
1180
+ $ref: '#/components/responses/UnprocessableEntity'
1181
+ /transactions/payment:
1182
+ post:
1183
+ summary: '支払いする'
1184
+ description: 支払取引を作成します。
1185
+ x-pokepay-operator-name: "CreatePaymentTransaction"
1186
+ x-pokepay-allow-server-side: true
1187
+ requestBody:
1188
+ required: true
1189
+ content:
1190
+ application/json:
1191
+ schema:
1192
+ required: ["private_money_id", "shop_id", "customer_id", "amount"]
1193
+ properties:
1194
+ shop_id:
1195
+ type: string
1196
+ format: uuid
1197
+ summary: '店舗ID'
1198
+ description: |-
1199
+ マネー店舗IDです。
1200
+
1201
+ 送金先の店舗を指定します。
1202
+ customer_id:
1203
+ type: string
1204
+ format: uuid
1205
+ summary: 'エンドユーザーID'
1206
+ description: |-
1207
+ エンドユーザーIDです。
1208
+
1209
+ 送金元のエンドユーザーを指定します。
1210
+ private_money_id:
1211
+ type: string
1212
+ format: uuid
1213
+ summary: 'マネーID'
1214
+ description: |-
1215
+ マネーIDです。
1216
+
1217
+ マネーを指定します。
1218
+ amount:
1219
+ type: number
1220
+ minimum: 0
1221
+ summary: '支払い額'
1222
+ description: |-
1223
+ マネー額です。
1224
+
1225
+ 送金するマネー額を指定します。
1226
+ description:
1227
+ type: string
1228
+ maxLength: 200
1229
+ summary: '取引履歴に表示する説明文'
1230
+ description: |-
1231
+ 取引説明文です。
1232
+
1233
+ 任意入力で、取引履歴に表示される説明文です。
1234
+ example: たい焼き(小倉)
1235
+ responses:
1236
+ '200':
1237
+ description: OK
1238
+ content:
1239
+ application/json:
1240
+ schema:
1241
+ $ref: '#/components/schemas/Transaction'
1242
+ '400':
1243
+ $ref: '#/components/responses/BadRequest'
1244
+ '403':
1245
+ $ref: '#/components/responses/Forbidden'
1246
+ '422':
1247
+ $ref: '#/components/responses/UnprocessableEntity'
1248
+ /transactions/exchange:
1249
+ post:
1250
+ x-pokepay-allow-server-side: true
1251
+ requestBody:
1252
+ required: true
1253
+ content:
1254
+ application/json:
1255
+ schema:
1256
+ required: ["user_id", "sender_private_money_id", "receiver_private_money_id", "amount"]
1257
+ properties:
1258
+ user_id:
1259
+ type: string
1260
+ format: uuid
1261
+ sender_private_money_id:
1262
+ type: string
1263
+ format: uuid
1264
+ receiver_private_money_id:
1265
+ type: string
1266
+ format: uuid
1267
+ amount:
1268
+ type: number
1269
+ minimum: 1
1270
+ description:
1271
+ type: string
1272
+ maxLength: 200
1273
+ responses:
1274
+ '200':
1275
+ description: OK
1276
+ content:
1277
+ application/json:
1278
+ schema:
1279
+ $ref: '#/components/schemas/Transaction'
1280
+ '400':
1281
+ $ref: '#/components/responses/BadRequest'
1282
+ '422':
1283
+ $ref: '#/components/responses/UnprocessableEntity'
1284
+ /transactions/{transaction_id}:
1285
+ get:
1286
+ summary: '取引情報を取得する'
1287
+ description: 取引を取得します。
1288
+ x-pokepay-operator-name: "GetTransaction"
1289
+ x-pokepay-allow-server-side: true
1290
+ parameters:
1291
+ - in: path
1292
+ name: transaction_id
1293
+ required: true
1294
+ schema:
1295
+ type: string
1296
+ format: uuid
1297
+ summary: '取引ID'
1298
+ description: |-
1299
+ 取引IDです。
1300
+
1301
+ フィルターとして使われ、指定した取引IDの取引を取得します。
1302
+ responses:
1303
+ '200':
1304
+ description: OK
1305
+ content:
1306
+ application/json:
1307
+ schema:
1308
+ $ref: '#/components/schemas/Transaction'
1309
+ '400':
1310
+ $ref: '#/components/responses/InvalidParameters'
1311
+ '403':
1312
+ $ref: '#/components/responses/Forbidden'
1313
+ '404':
1314
+ $ref: '#/components/responses/NotFound'
1315
+ /transactions/{transaction_id}/refund:
1316
+ post:
1317
+ summary: 返金する
1318
+ x-pokepay-operator-name: RefundTransaction
1319
+ parameters:
1320
+ - in: path
1321
+ name: transaction_id
1322
+ required: true
1323
+ schema:
1324
+ type: string
1325
+ format: uuid
1326
+ summary: '取引ID'
1327
+ requestBody:
1328
+ required: true
1329
+ content:
1330
+ application/json:
1331
+ schema:
1332
+ properties:
1333
+ description:
1334
+ type: string
1335
+ maxLength: 200
1336
+ summary: '取引履歴に表示する返金事由'
1337
+ example: '返品対応のため'
1338
+ responses:
1339
+ '200':
1340
+ description: OK
1341
+ content:
1342
+ application/json:
1343
+ schema:
1344
+ $ref: '#/components/schemas/Transfer'
1345
+ '403':
1346
+ $ref: '#/components/responses/Forbidden'
1347
+ '404':
1348
+ $ref: '#/components/responses/NotFound'
1349
+ '422':
1350
+ $ref: '#/components/responses/UnprocessableEntity'
1351
+ /transfers:
1352
+ get:
1353
+ x-pokepay-operator-name: "ListTransfers"
1354
+ x-pokepay-allow-server-side: true
1355
+ requestBody:
1356
+ required: true
1357
+ content:
1358
+ application/json:
1359
+ schema:
1360
+ properties:
1361
+ from:
1362
+ type: string
1363
+ format: date-time
1364
+ to:
1365
+ type: string
1366
+ format: date-time
1367
+ page:
1368
+ type: integer
1369
+ minimum: 1
1370
+ per_page:
1371
+ type: integer
1372
+ minimum: 1
1373
+ shop_id:
1374
+ type: string
1375
+ format: uuid
1376
+ shop_name:
1377
+ type: string
1378
+ maxLength: 256
1379
+ customer_id:
1380
+ type: string
1381
+ format: uuid
1382
+ customer_name:
1383
+ type: string
1384
+ maxLength: 256
1385
+ transaction_id:
1386
+ type: string
1387
+ format: uuid
1388
+ private_money_id:
1389
+ type: string
1390
+ format: uuid
1391
+ is_modified:
1392
+ type: boolean
1393
+ transaction_types:
1394
+ type: array
1395
+ items:
1396
+ type: string
1397
+ enum: [topup, payment, transfer, exchange]
1398
+ transfer_types:
1399
+ type: array
1400
+ items:
1401
+ type: string
1402
+ enum: [topup, payment, exchange, transfer]
1403
+ responses:
1404
+ '200':
1405
+ description: OK
1406
+ content:
1407
+ application/json:
1408
+ schema:
1409
+ $ref: '#/components/schemas/PaginatedTransfers'
1410
+ '400':
1411
+ $ref: '#/components/responses/InvalidParameters'
1412
+
1413
+ /organizations:
1414
+ post:
1415
+ summary: '新規加盟店組織を追加する'
1416
+ x-pokepay-operator-name: "CreateOrganization"
1417
+ requestBody:
1418
+ required: true
1419
+ content:
1420
+ application/json:
1421
+ schema:
1422
+ required: ["code", "name", "private_money_ids", "issuer_admin_user_email", "member_admin_user_email"]
1423
+ properties:
1424
+ code:
1425
+ type: string
1426
+ maxLength: 32
1427
+ summary: '新規組織コード'
1428
+ example: ox_supermarket
1429
+ name:
1430
+ type: string
1431
+ maxLength: 256
1432
+ summary: '新規組織名'
1433
+ example: oxスーパー
1434
+ private_money_ids:
1435
+ type: array
1436
+ items:
1437
+ type: string
1438
+ format: uuid
1439
+ minItems: 1
1440
+ summary: '加盟店組織で有効にするマネーIDの配列'
1441
+ issuer_admin_user_email:
1442
+ type: string
1443
+ format: email
1444
+ summary: '発行体担当者メールアドレス'
1445
+ member_admin_user_email:
1446
+ type: string
1447
+ format: email
1448
+ summary: '新規組織担当者メールアドレス'
1449
+ bank_name:
1450
+ type: string
1451
+ maxLength: 64
1452
+ summary: '銀行名'
1453
+ example: XYZ銀行
1454
+ bank_code:
1455
+ type: string
1456
+ pattern: '^$|^[0-9]{4}$'
1457
+ summary: '銀行金融機関コード'
1458
+ example: 99X
1459
+ bank_branch_name:
1460
+ type: string
1461
+ maxLength: 64
1462
+ summary: '銀行支店名'
1463
+ example: ABC支店
1464
+ bank_branch_code:
1465
+ type: string
1466
+ pattern: '^(|[0-9]{3})$'
1467
+ summary: '銀行支店コード'
1468
+ example: 99X
1469
+ bank_account_type:
1470
+ type: string
1471
+ enum: [saving, current, other]
1472
+ summary: '銀行口座種別 (普通=saving, 当座=current, その他=other)'
1473
+ bank_account:
1474
+ type: string
1475
+ maxLength: 7
1476
+ pattern: '[0-9]{0,7}'
1477
+ summary: '銀行口座番号'
1478
+ example: 9999999
1479
+ bank_account_holder_name:
1480
+ # TODO: flico
1481
+ type: string
1482
+ maxLength: 30
1483
+ pattern: '^[0-9A-Zヲア-゚ (-),-/\\「-」]$'
1484
+ summary: '口座名義人名'
1485
+ example: フクザワユキチ
1486
+ contact_name:
1487
+ type: string
1488
+ maxLength: 256
1489
+ summary: '担当者名'
1490
+ example: 佐藤清
1491
+ responses:
1492
+ '200':
1493
+ description: OK
1494
+ content:
1495
+ application/json:
1496
+ schema:
1497
+ $ref: '#/components/schemas/Organization'
1498
+ /shops:
1499
+ post:
1500
+ summary: '新規店舗を追加する'
1501
+ x-pokepay-operator-name: "CreateShop"
1502
+ x-pokepay-allow-server-side: true
1503
+ requestBody:
1504
+ required: true
1505
+ content:
1506
+ application/json:
1507
+ schema:
1508
+ required: ["shop_name"]
1509
+ properties:
1510
+ shop_name:
1511
+ type: string
1512
+ minLength: 1
1513
+ maxLength: 256
1514
+ summary: '店舗名'
1515
+ example: 'oxスーパー三田店'
1516
+ shop_postal_code:
1517
+ type: string
1518
+ pattern: '^[0-9]{3}-?[0-9]{4}$'
1519
+ summary: '店舗の郵便番号'
1520
+ shop_address:
1521
+ type: string
1522
+ maxLength: 256
1523
+ summary: '店舗の住所'
1524
+ example: '東京都港区芝...'
1525
+ shop_tel:
1526
+ type: string
1527
+ pattern: '^0[0-9]{1,3}-?[0-9]{2,4}-?[0-9]{3,4}$'
1528
+ summary: '店舗の電話番号'
1529
+ shop_email:
1530
+ type: string
1531
+ format: email
1532
+ maxLength: 256
1533
+ summary: '店舗のメールアドレス'
1534
+ shop_external_id:
1535
+ type: string
1536
+ maxLength: 36
1537
+ summary: '店舗の外部ID'
1538
+ organization_code:
1539
+ type: string
1540
+ pattern: '^[a-zA-Z0-9-]*$'
1541
+ maxLength: 32
1542
+ summary: '組織コード'
1543
+ example: 'ox-supermarket'
1544
+ responses:
1545
+ '200':
1546
+ description: OK
1547
+ content:
1548
+ application/json:
1549
+ schema:
1550
+ $ref: '#/components/schemas/User'
1551
+ '400':
1552
+ $ref: '#/components/responses/InvalidParameters'
1553
+ '403':
1554
+ $ref: '#/components/responses/Forbidden'
1555
+ '409':
1556
+ $ref: '#/components/responses/Conflict'
1557
+ '422':
1558
+ $ref: '#/components/responses/UnprocessableEntity'
1559
+ /private-moneys/{private_money_id}/organization-summaries:
1560
+ get:
1561
+ summary: 決済加盟店の取引サマリを取得する
1562
+ x-pokepay-operator-name: "GetPrivateMoneyOrganizationSummaries"
1563
+ x-pokepay-allow-server-side: true
1564
+ requestBody:
1565
+ required: true
1566
+ content:
1567
+ application/json:
1568
+ schema:
1569
+ x-pokepay-conditional-parameters: {xnor: [from, to]}
1570
+ properties:
1571
+ from:
1572
+ type: string
1573
+ format: date-time
1574
+ summary: '開始日時(toと同時に指定する必要有)'
1575
+ to:
1576
+ type: string
1577
+ format: date-time
1578
+ summary: '終了日時(fromと同時に指定する必要有)'
1579
+ page:
1580
+ type: integer
1581
+ minimum: 1
1582
+ summary: 'ページ番号'
1583
+ example: 1
1584
+ per_page:
1585
+ type: integer
1586
+ minimum: 1
1587
+ summary: '1ページ分の取引数'
1588
+ example: 50
1589
+ parameters:
1590
+ - in: path
1591
+ name: private_money_id
1592
+ required: true
1593
+ schema:
1594
+ type: string
1595
+ format: uuid
1596
+ summary: マネーID
1597
+ responses:
1598
+ '200':
1599
+ description: OK
1600
+ content:
1601
+ application/json:
1602
+ schema:
1603
+ $ref: '#/components/schemas/PaginatedPrivateMoneyOrganizationSummaries'
1604
+ '400':
1605
+ $ref: '#/components/responses/InvalidParameters'
1606
+ '403':
1607
+ $ref: '#/components/responses/Forbidden'
1608
+ '404':
1609
+ $ref: '#/components/responses/NotFound'